MTConnect.NET-HTTP
4.2.0
See the version list below for details.
dotnet add package MTConnect.NET-HTTP --version 4.2.0
NuGet\Install-Package MTConnect.NET-HTTP -Version 4.2.0
<PackageReference Include="MTConnect.NET-HTTP" Version="4.2.0" />
paket add MTConnect.NET-HTTP --version 4.2.0
#r "nuget: MTConnect.NET-HTTP, 4.2.0"
// Install MTConnect.NET-HTTP as a Cake Addin #addin nuget:?package=MTConnect.NET-HTTP&version=4.2.0 // Install MTConnect.NET-HTTP as a Cake Tool #tool nuget:?package=MTConnect.NET-HTTP&version=4.2.0
MTConnect Http REST Clients
These client classes use the Http REST Api that is described in Part 1 : Section 5.4 & Section 8 of the MTConnect Standard.
MTConnectClient
The MTConnectClient class is the primary class to use when wanting to implement the full MTConnect protocol. This class handles an initial Probe request to gather capabilities of the Agent, a Current request to read the initial values, and a Sample request (at the specified Interval) to read successive values.
Class Initialization
Class initialization is straightforward in that specifiying the BaseUrl (the URL of the Agent) is all that is required. Then call the Start() method to start the request sequence.
No Device Name (Get All Devices)
using MTConnect.Clients.Rest;
var baseUrl = "localhost:5006";
var client = new MTConnectClient(baseUrl);
client.Interval = 500;
client.Start();
Get Specific Device by Name
using MTConnect.Clients.Rest;
var deviceName = "OKUMA.Lathe";
var baseUrl = "localhost:5000";
var client = new MTConnectClient(baseUrl, deviceName);
client.Interval = 500;
client.Start();
Handle Probe Received Event
(MTConnectDevices Response Document received from a Probe Request)
var client = new MTConnectClient(baseUrl, deviceName);
client.OnProbeReceived += (sender, document) =>
{
foreach (var device in document.Devices)
{
// Device
Console.WriteLine(device.Id);
// DataItems
foreach (var dataItem in device.DataItems)
{
Console.WriteLine(dataItem.Id);
}
// Components
foreach (var component in device.Components)
{
Console.WriteLine(component.Id);
}
}
};
client.Start();
Handle Current Received Event
(MTConnectStreams Response Document received from a Current Request)
var client = new MTConnectClient(baseUrl, deviceName);
client.OnCurrentReceived += (sender, document) =>
{
foreach (var deviceStream in document.Streams)
{
// DeviceStream
Console.WriteLine(deviceStream.Name);
// Component Streams
foreach (var componentStream in deviceStream.ComponentStreams)
{
Console.WriteLine(componentStream.Name);
// DataItems (Samples, Events, and Conditions)
foreach (var dataItem in componentStream.DataItems)
{
Console.WriteLine(dataItem.DataItemId);
}
}
}
};
client.Start();
Handle Samples Received Event
(MTConnectStreams Response Document received from a Sample Stream)
var client = new MTConnectClient(baseUrl, deviceName);
client.Interval = 500;
client.OnSampleReceived += (sender, document) =>
{
foreach (var deviceStream in document.Streams)
{
// Device
Console.WriteLine(deviceStream.Name);
// Component Streams
foreach (var componentStream in deviceStream.ComponentStreams)
{
Console.WriteLine(componentStream.Name);
// DataItems
foreach (var dataItem in componentStream.DataItems)
{
Console.WriteLine(dataItem.DataItemId);
}
}
}
};
client.Start();
MTConnectProbeClient
The MTConnectProbeClient class is used to send a Probe request and return an MTConenctDevices Response Document.
using MTConnect.Clients.Rest;
var deviceName = "OKUMA.Lathe";
var baseUrl = "localhost:5000";
var client = new MTConnectProbeClient(baseUrl, deviceName);
var document = client.Get();
foreach (var device in document.Devices)
{
// Device
Console.WriteLine(device.Id);
// DataItems
foreach (var dataItem in device.DataItems)
{
Console.WriteLine(dataItem.Id);
}
// Components
foreach (var component in device.Components)
{
Console.WriteLine(component.Id);
}
}
MTConnectCurrentClient
The MTConnectCurrentClient class is used to send a Current request and return an MTConenctStreams Response Document.
using MTConnect.Clients.Rest;
var deviceName = "OKUMA.Lathe";
var baseUrl = "localhost:5006";
var client = new MTConnectCurrentClient(baseUrl, deviceName);
var document = client.Get();
foreach (var deviceStream in document.Streams)
{
// Device
Console.WriteLine(deviceStream.Name);
// Component Streams
foreach (var componentStream in deviceStream.ComponentStreams)
{
Console.WriteLine(componentStream.Name);
// DataItems
foreach (var dataItem in componentStream.DataItems)
{
Console.WriteLine(dataItem.DataItemId);
}
}
}
MTConnectSampleClient
The MTConnectSampleClient class is used to send a Sample request and return an MTConenctStreams Response Document.
using MTConnect.Clients.Rest;
var deviceName = "OKUMA.Lathe";
var baseUrl = "localhost:5006";
var fromSequence = 150;
var toSequence = 250;
var client = new MTConnectSampleClient(baseUrl, deviceName, fromSequence, toSequence);
var document = client.Get();
foreach (var deviceStream in document.Streams)
{
// Device
Console.WriteLine(deviceStream.Name);
// Component Streams
foreach (var componentStream in deviceStream.ComponentStreams)
{
Console.WriteLine(componentStream.Name);
// DataItems
foreach (var dataItem in componentStream.DataItems)
{
Console.WriteLine(dataItem.DataItemId);
}
}
}
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 is compatible. net5.0-windows was computed. net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 is compatible. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 is compatible. net462 is compatible. net463 was computed. net47 is compatible. net471 is compatible. net472 is compatible. net48 is compatible. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETCoreApp 3.1
- MTConnect.NET-Common (>= 4.2.0)
-
.NETFramework 4.6.1
- MTConnect.NET-Common (>= 4.2.0)
- System.Text.Json (>= 6.0.1)
-
.NETFramework 4.6.2
- MTConnect.NET-Common (>= 4.2.0)
- System.Text.Json (>= 6.0.1)
-
.NETFramework 4.7
- MTConnect.NET-Common (>= 4.2.0)
- System.Text.Json (>= 6.0.1)
-
.NETFramework 4.7.1
- MTConnect.NET-Common (>= 4.2.0)
- System.Text.Json (>= 6.0.1)
-
.NETFramework 4.7.2
- MTConnect.NET-Common (>= 4.2.0)
- System.Text.Json (>= 6.0.1)
-
.NETFramework 4.8
- MTConnect.NET-Common (>= 4.2.0)
- System.Text.Json (>= 6.0.1)
-
.NETStandard 2.0
- MTConnect.NET-Common (>= 4.2.0)
- System.Text.Json (>= 6.0.1)
-
net5.0
- MTConnect.NET-Common (>= 4.2.0)
-
net6.0
- MTConnect.NET-Common (>= 4.2.0)
NuGet packages (6)
Showing the top 5 NuGet packages that depend on MTConnect.NET-HTTP:
Package | Downloads |
---|---|
MTConnect.NET
MTConnect.NET is a fully featured .NET library for MTConnect Agents, Adapters, and Clients. Supports MTConnect Versions up to 2.3. Supports .NET Framework 4.6.1 up to .NET 8 |
|
MTConnect.NET-SHDR
MTConnect.NET-SHDR implements the SHDR Adapter Protocol for use with the MTConnect.NET library. Supports MTConnect Versions up to 2.3. Supports .NET Framework 4.6.1 up to .NET 8 |
|
MTConnect.NET-HTTP-AspNetCore
MTConnect.NET-HTTP-AspNetCore is an extension library to MTConnect.NET that uses ApiControllers and the built-in features for Asp.NET Core up to .NET 7 |
|
MTConnect.NET-DeviceFinder
MTConnect.NET-DeviceFinder contains classes to find MTConnect Devices on a network. Supports MTConnect Versions up to 2.3. Supports .NET Framework 4.6.1 up to .NET 8 |
|
MTConnect.NET-AgentModule-HttpServer
MTConnect.NET-AgentModule-HttpServer implements a server for the MTConnect HTTP REST Protocol for use with the MTConnectAgentApplication class in the MTConnect.NET-Applications-Agents library. Supports MTConnect Versions up to 2.3. Supports .NET Framework 4.6.1 up to .NET 8 |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
6.5.1 | 184 | 12/3/2024 |
6.5.0 | 918 | 10/21/2024 |
6.4.7 | 974 | 8/21/2024 |
6.4.6 | 645 | 8/7/2024 |
6.4.5 | 308 | 8/2/2024 |
6.4.4 | 534 | 7/16/2024 |
6.4.3 | 583 | 6/14/2024 |
6.4.2 | 413 | 6/12/2024 |
6.4.1 | 613 | 5/17/2024 |
6.4.0 | 404 | 5/14/2024 |
6.3.2-beta | 336 | 5/2/2024 |
6.3.1-beta | 478 | 4/24/2024 |
6.3.0-beta | 309 | 4/17/2024 |
6.2.2-beta | 360 | 4/5/2024 |
6.2.1-beta | 335 | 4/3/2024 |
6.2.0-beta | 303 | 3/27/2024 |
6.1.3-beta | 355 | 3/15/2024 |
6.1.2-beta | 325 | 3/15/2024 |
6.0.11-beta | 586 | 2/2/2024 |
6.0.10-beta | 494 | 1/26/2024 |
6.0.9-beta | 623 | 12/28/2023 |
6.0.8-beta | 576 | 12/27/2023 |
6.0.7-beta | 632 | 12/19/2023 |
6.0.5-beta | 700 | 12/14/2023 |
6.0.3-beta | 713 | 12/12/2023 |
6.0.1-beta | 788 | 12/7/2023 |
5.4.4 | 4,698 | 6/6/2023 |
5.4.3 | 2,937 | 5/20/2023 |
5.4.1 | 1,889 | 3/28/2023 |
5.4.0 | 1,923 | 3/20/2023 |
5.3.0 | 1,669 | 3/14/2023 |
5.2.0 | 1,812 | 3/5/2023 |
5.1.0 | 1,863 | 3/3/2023 |
5.0.0 | 5,063 | 2/3/2023 |
4.6.0 | 2,866 | 11/28/2022 |
4.5.0 | 3,096 | 10/18/2022 |
4.4.0 | 2,998 | 10/5/2022 |
4.3.0 | 3,111 | 9/20/2022 |
4.2.0 | 2,797 | 9/13/2022 |
4.1.0 | 2,791 | 8/30/2022 |
4.0.0 | 2,710 | 8/26/2022 |
3.4.2 | 3,379 | 6/20/2022 |
3.4.1 | 2,725 | 6/17/2022 |
3.4.0 | 2,519 | 6/16/2022 |
3.3.1 | 3,046 | 4/27/2022 |
3.3.0 | 2,611 | 4/13/2022 |
3.2.0 | 2,536 | 3/29/2022 |