-
Notifications
You must be signed in to change notification settings - Fork 95
Description
We are currently working with the MTConnect CPP Agent version 2.4.0.7, and are attempting to publish data via MQTT to an IoT Gateway, where the gateway is currently consuming MQTT data published by clients using the MTConnect.NET agent. However, the .NET agent publishes data with different payload structure and topic structure, which is preventing us from using the CPP Agent to publish data to this IoT Gateway. We would prefer not to switch to the .NET agent as that would force us to redo many of our build processes and re-test existing functionality, so I am opening this issue to request a few additions to the functionality offered by the CPP Agent.
The topic structure of the MTConnect.NET Agent that we want to emulate is:
ObservationTopic/<DataItemId>
, whereObservationTopic
is a configurable parameter likeCurrentTopic
, ...- For example, if
ObservationTopic
wasMTConnect/Devices/[device]/Observations
, each data item would be published on the topicMTConnect/Devices/[device]/Observations/<DataItemId>
- For example, if
- See "Entity Topic Structure" in https://github.com/TrakHound/MTConnect.NET/tree/master/libraries/MTConnect.NET-MQTT for a more detailed description -- the .NET agent offers both a "Flat" format and "Hierarchy" format for Observation topics. We are asking for the flat format.
- The legacy MQTT sink in the CPP agent seemed to have functionality that published an Observation topic with a Hierarchy format. We need the flat format because the AWS IoT Core limits MQTT topics to 8 topics/7 forward slashes.
The payload structure for each data item that is used by the .NET Agent when publishing Observations
is
{"dataItemId":"L2avail","name":"avail","type":"AVAILABILITY","timestamp":"2023-02-07T20:02:26.8978653Z","result":"AVAILABLE"}
There have been some previous inquiries into having some of these features in the CPP Agent -- see the following:
- Query Regarding FlatMode Configuration in MTConnect CPP Agent
- Unified MQTT Topic and Payload structure
@wsobel Would it be possible to add this topic structure and payload format into the CPP Agent?