{"id":26866480,"url":"https://github.com/mtconnect/mtconnectsharp","last_synced_at":"2025-10-14T11:05:55.423Z","repository":{"id":34669510,"uuid":"38641973","full_name":"mtconnect/MTConnectSharp","owner":"mtconnect","description":"MTConnect C# Library","archived":false,"fork":false,"pushed_at":"2022-12-08T02:10:19.000Z","size":30,"stargazers_count":34,"open_issues_count":4,"forks_count":16,"subscribers_count":20,"default_branch":"master","last_synced_at":"2025-07-26T20:29:42.854Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mtconnect.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-07-06T19:45:50.000Z","updated_at":"2025-05-21T13:08:07.000Z","dependencies_parsed_at":"2023-01-15T08:31:01.667Z","dependency_job_id":null,"html_url":"https://github.com/mtconnect/MTConnectSharp","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mtconnect/MTConnectSharp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mtconnect%2FMTConnectSharp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mtconnect%2FMTConnectSharp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mtconnect%2FMTConnectSharp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mtconnect%2FMTConnectSharp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mtconnect","download_url":"https://codeload.github.com/mtconnect/MTConnectSharp/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mtconnect%2FMTConnectSharp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279019030,"owners_count":26086510,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-14T02:00:06.444Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-03-31T04:54:44.601Z","updated_at":"2025-10-14T11:05:55.404Z","avatar_url":"https://github.com/mtconnect.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MTConnectSharp\nA Simple MTConnect C# Client Library\n\nDependencies: RestSharp open source C# REST client library, referenced in the package.config file.\n\nThis library was originally written to monitor individual data items as they changed to better facilitate rule development in the early days of MTconnect. As such it was written to be as simple as possible, so it does not support much beyond simple probe parsing and quasi-streaming the CDATA of dataitem tags as they change.\n\nThe TestConsoleApp project provides a basic example of streaming data from agent.mtconnect.org.\n\nBecause MTConnect is an HTTP protocol, this library handles all communication asynchronously. There are events which an application can subscribe to and react accordingly after successful responses.\n\n## Usage Example\n\nThe entry point is the `MTConnectClient` class, which can be initialized via the constructor:\n\n\tvar client = new MTConnectSharp.MTConnectClient()\n\t{\n\t\tAgentUri = \"http://agent.mtconnect.org\",\n\t\tUpdateInterval = TimeSpan.FromSeconds(.5)\n\t};\n\nThe above code block initializes the client, probes the agent and populate the `Devices` collection of the `MTConnectClient`. When the probe parsing is complete the `ProbeCompleted` event fires.\n\nThe `Devices`  collection is observable and may contain `Component`s and `DataItem`s, and `Component`s may contain `Component`s and `DataItem`s, but `DataItem`s do not have child `DataItem`s or `Component`s, only `DataItemSample`s, which provide `Value`s and `Timestamp`s. All collections are exposed readonly observable collections to prevent modification and support change notification.\n\nAfter the probe is complete, we can start reading data items. There are two ways to initiate a data pull from the Agent: current and sample. `GetCurrentState()` sends a current command and processes the data, and `StartStreaming()` begins with a current, then requests samples at the `UpdateInterval` to get values for any DataItems which have changed.\n\n**Do not use repeated `GetCurrentState()` calls for streaming. It will burden the Agent and the client unneccessarily.**\n\nThe `ReadOnlyObservableCollection\u003cDataItem\u003e` members of `Device` and `Component` will fire a `CollectionChanged` event when a new `DataItemSample` is added to or removed from its buffer.\n\n## Known Issues ##\n\n* There are no tests. This project needs tests before further refactoring and features can be added.\n* Since this version is using the Net Core framework, there is no support for COM/VBA.\n* Potential error points do not have exception wrappers to help identify them when debugging.\n\n## Future Enhancements ##\n\n* Add support for detailed events and conditions separate from sample-based data items\n* Support assets and asset change events\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmtconnect%2Fmtconnectsharp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmtconnect%2Fmtconnectsharp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmtconnect%2Fmtconnectsharp/lists"}