Skip to content

Add Features to Align with Entity Topic Structure of MTConnect.NET Agent #535

@pacssys

Description

@pacssys

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>, where ObservationTopic is a configurable parameter like CurrentTopic, ...
    • For example, if ObservationTopic was MTConnect/Devices/[device]/Observations, each data item would be published on the topic MTConnect/Devices/[device]/Observations/<DataItemId>
  • 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:

@wsobel Would it be possible to add this topic structure and payload format into the CPP Agent?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions