Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/trakhound/mtconnect.net
Fully featured .NET library in C# to build MTConnect Agent, Adapter, and Client Applications. Pre-built Agents with Windows Installers. Support for Windows and Linux. Supports MTConnect Versions up to 2.3. Supports .NET Framework 4.6.1 up to .NET 8
https://github.com/trakhound/mtconnect.net
adapter agent csharp dotnet iiot industry40 manufacturing mqtt mtconnect trakhound vbnet
Last synced: 3 days ago
JSON representation
Fully featured .NET library in C# to build MTConnect Agent, Adapter, and Client Applications. Pre-built Agents with Windows Installers. Support for Windows and Linux. Supports MTConnect Versions up to 2.3. Supports .NET Framework 4.6.1 up to .NET 8
- Host: GitHub
- URL: https://github.com/trakhound/mtconnect.net
- Owner: TrakHound
- License: mit
- Created: 2016-05-25T03:47:13.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2024-12-03T14:53:32.000Z (23 days ago)
- Last Synced: 2024-12-15T21:06:46.920Z (10 days ago)
- Topics: adapter, agent, csharp, dotnet, iiot, industry40, manufacturing, mqtt, mtconnect, trakhound, vbnet
- Language: C#
- Homepage: http://www.TrakHound.com
- Size: 8.64 MB
- Stars: 102
- Watchers: 15
- Forks: 40
- Open Issues: 14
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE.md
Awesome Lists containing this project
README
![MTConnect.NET Logo](https://raw.githubusercontent.com/TrakHound/MTConnect.NET/master/img/mtconnect-net-03-md.png)
# MTConnect.NET
[![MTConnect.NET](https://github.com/TrakHound/MTConnect.NET/actions/workflows/dotnet.yml/badge.svg)](https://github.com/TrakHound/MTConnect.NET/actions/workflows/dotnet.yml)
> **New Release 10/21/2024** : Version 6.5 Released with support for MTConnect v2.4
## Download
Name
Link
Agent
Installer
https://github.com/TrakHound/MTConnect.NET/releases/latest
Agent
Docker
https://hub.docker.com/repository/docker/trakhound/mtconnect.net-agent
Client
Nuget
https://www.nuget.org/packages/MTConnect.NET
## Overview
MTConnect.NET is a fully featured and fully Open Source **[.NET](https://dotnet.microsoft.com/)** library for **[MTConnect](https://www.mtconnect.org/)** to develop Agents, Adapters, and Clients. Supports MTConnect Versions up to 2.4. A pre-compiled Agent application is available to download as well as an Adapter application that can be easily customized.- .NET Native MTConnect Agent
- Adapter framework used to send data to an MTConnect Agent
- Libraries to easily implement MTConnect Agent, Adapters, or Clients into custom applications### Features
- Module based Agent & Adapter architecture
- Supports running as Windows Service with easy to use command line arguments
- Presistent Agent Buffers that are backed up on the File System. Retains state after Agent is restarted
- Fully compatible up to the latest MTConnect v2.4
- Kept up to date by utilizing the MTConnect SysML Model to generate source files
- Supports multiple MTConnect Version output. Automatically removes data that is not compatible with the requested version
- Full client support for requesting data from any MTConnect Agent (Probe, Current, Sample Stream, Assets, etc.).
- Supports HTTP, MQTT, and SHDR
- Supports compression (polling & streaming)
- Supports XML & JSON
- Supports HTTPS & TLS for secure communication
- Python Input Processors to transform data before loading into Agent
- Full data validation
- Validation on Input
- XML Schema Validation on output
- Configurable Validation Levels
- Fully documented objects using text from the MTConnect Standard. This enables Intellisense in applications such as Visual Studio.
- Fully supports Unit conversion. Default Units and UnitConversion is done automatically when sending Streams and when reading Streams.### Integrate
- Easily integrate with cloud services such as AWS and Azure
- Use client libraries to export MTConnect data to a Database (ex. SQL, Redis, MongoDB, etc.)
- Create custom dashboards and data collection applications to utilize equipment data
- Embed an MTConnect Agent into your adapter (remove need for separate SHDR Adapter)#### MTConnect Version Compatibility
MTConnect.NET is designed to be fully compatible for all versions of the MTConnect standard. This is done through processing by the [MTConnectAgent](https://github.com/TrakHound/MTConnect.NET/tree/master/libraries/MTConnect.NET-Common/Agents/MTConnectAgent.cs) class before data is output. This allows the version to be a parameter when requesting data from the Agent. More information can be found in the [Devices README](https://github.com/TrakHound/MTConnect.NET/tree/master/libraries/MTConnect.NET-Common/Devices/README.md).#### Data Validation
Validation is performed on a Device, Component, Composition, or DataItem level through the classes in [Devices](https://github.com/TrakHound/MTConnect.NET/tree/master/libraries/MTConnect.NET-Common/Devices). This allows for validation without the need to use XML schemas (although XML Validation against XSD schemas is supported).## Clients
#### Client Interfaces
- [IMTConnectClient](https://github.com/TrakHound/MTConnect.NET/blob/master/libraries/MTConnect.NET-Common/Clients/IMTConnectClient.cs) : Interface used to read MTConnect response documents (Probe, Current, Sample, and Assets)
- [IMTConnectEntityClient](https://github.com/TrakHound/MTConnect.NET/blob/master/libraries/MTConnect.NET-Common/Clients/IMTConnectEntityClient.cs) : Interface used to read MTConnect entities (Device, Observation, Asset)#### Client Classes
- [MTConnectHttpClient](https://github.com/TrakHound/MTConnect.NET/blob/master/libraries/MTConnect.NET-HTTP/Clients/MTConnectHttpClient.cs) : Reads from MTConnect Agents using the MTConnect HTTP REST Api. Supports both polling and streaming. Supports compression. Supports XML & JSON.
- [MTConnectMqttClient](https://github.com/TrakHound/MTConnect.NET/blob/master/libraries/MTConnect.NET-MQTT/Clients/MTConnectMqttClient.cs) : Reads MTConnect data from an MQTT Broker. Supports the latest MTConnect MQTT Protocol.## Agents
#### Embedded Agent Application
An MTConnect Agent can be embedded into an application where the DataSource(s) can be read and the MTConnect Agent can be combined into the same application. This eliminates the need to transfer data from an Adapter to an Agent (typically using the SHDR protocol).##### Option #1 : [DotNet Template](https://github.com/TrakHound/MTConnect.NET/tree/master/templates/mtconnect.net-agent)
```
dotnet new mtconnect.net-agent
```##### Option #2 : [Nuget Package](https://www.nuget.org/packages/MTConnect.NET-Applications-Agents)
```
dotnet add package MTConnect.NET-Applications-Agents
```#### Standalone Agent Application
A standalone preconfigured [Application](https://github.com/TrakHound/MTConnect.NET/tree/master/agent/MTConnect.NET-Agent) ready to download is available and supports:
- Modular architecture
- HTTP Server Module
- SHDR Adapter Module
- MQTT Broker Module
- MQTT Relay Module
- etc.
- Easy Windows Installer
- Linux Compatible
- Run as a Windows Service
- Transform input data using Python scripts
- Extensible configuration file and monitors for changes#### Agent Classes
- [MTConnectAgent](https://github.com/TrakHound/MTConnect.NET/blob/master/libraries/MTConnect.NET-Common/Agents/MTConnectAgent.cs) : Handles MTConnect Entities (Device, Observation, Asset), Unit Conversion, Filtering, etc.
- [MTConnectAgentBroker](https://github.com/TrakHound/MTConnect.NET/blob/master/libraries/MTConnect.NET-Common/Agents/MTConnectAgent.cs) : Handles MTConnect Requests to respond with Response Documents (Probe, Current, Sample, Assets) specified in the MTConnect Standard, Buffers, etc.## Adapters
#### Standalone Modular Adapter Application
A preconfigured [Application](https://github.com/TrakHound/MTConnect.NET/tree/master/adapter/MTConnect.NET-Adapter) & [Library](https://github.com/TrakHound/MTConnect.NET/tree/master/adapter/MTConnect.NET-Applications-Adapter) to build an Adapter is available and supports:
- Modular architecture
- SHDR Module (export data to an MTConnect Agent using the SHDR protocol)
- MQTT Module (export data to an MQTT Broker to be read by an MTConnect Agent)
- Run as a Windows Service
- Extensible configuration file and monitors for changes
- Customizable Data Source engine (to read from a PLC)
- Updated through a Nuget package (no source code copy & paste required when updating to new versions)#### SHDR Adapter Classes
- [ShdrAdapter](https://github.com/TrakHound/MTConnect.NET/blob/master/libraries/MTConnect.NET-SHDR/Adapters/ShdrAdapter.cs) : Sends the most recent values On-Demand using the SendCurrent() method. This is used when full control of the communication is needed.
- [ShdrIntervalAdapter](https://github.com/TrakHound/MTConnect.NET/blob/master/libraries/MTConnect.NET-SHDR/Adapters/ShdrIntervalAdapter.cs) : Sends the most recent values at the specified Interval. This is used when a set interval is adequate and the most recent value is all that is needed
- [ShdrQueueAdapter](https://github.com/TrakHound/MTConnect.NET/blob/master/libraries/MTConnect.NET-SHDR/Adapters/ShdrQueueAdapter.cs) : Queues all values that are sent from the PLC and sends them all on demand using the SendBuffer() method. This is used when all values are needed and full control of the communication is needed.
- [ShdrIntervalQueueAdapter](https://github.com/TrakHound/MTConnect.NET/blob/master/libraries/MTConnect.NET-SHDR/Adapters/ShdrIntervalQueueAdapter.cs) : Queues all values that are sent from the PLC and sends any queued values at the specified Interval. This is used when all values are needed but an interval is adequate.## Nuget Packages
The Nuget packages for the libraries in this repo are listed below:
Name
Downloads
Link
MTConnect.NET
https://www.nuget.org/packages/MTConnect.NET
MTConnect.NET-Common
https://www.nuget.org/packages/MTConnect.NET-Common
MTConnect.NET-HTTP
https://www.nuget.org/packages/MTConnect.NET-HTTP
MTConnect.NET-SHDR
https://www.nuget.org/packages/MTConnect.NET-SHDR
MTConnect.NET-MQTT
https://www.nuget.org/packages/MTConnect.NET-MQTT
MTConnect.NET-XML
https://www.nuget.org/packages/MTConnect.NET-XML
MTConnect.NET-JSON
https://www.nuget.org/packages/MTConnect.NET-JSON
MTConnect.NET-JSON-cppagent
https://www.nuget.org/packages/MTConnect.NET-JSON-cppagent
MTConnect.NET-TLS
https://www.nuget.org/packages/MTConnect.NET-TLS
MTConnect.NET-Services
https://www.nuget.org/packages/MTConnect.NET-Services
MTConnect.NET-DeviceFinder
https://www.nuget.org/packages/MTConnect.NET-DeviceFinder
MTConnect.NET-SysML
https://www.nuget.org/packages/MTConnect.NET-SysML
## Supported Frameworks
- .NET 8.0
- .NET 7.0
- .NET 6.0
- .NET 5.0
- .NET Core 3.1
- .NET Standard 2.0
- .NET Framework 4.8
- .NET Framework 4.7.2
- .NET Framework 4.7.1
- .NET Framework 4.7
- .NET Framework 4.6.2
- .NET Framework 4.6.1## Developer Notes
This repo along with the libraries and applications are free to use and distribute and hopefully will help those that are looking at either getting started using MTConnect or those that are looking to use MTConnect for both basic and more advanced use cases.Feel free to comment, or create pull-requests for anything that could be coded, formatted, or worded better. Attention to detail and continuous improvement are important in manufacturing so they should be just as important for manufacturing software.
Thanks for your interest in using these libraries and applications and feel free to contribute or give feedback.
\- Patrick