Topic structure

If MQTT is used for access to the TwinCAT JSON Data Interface, communication takes place via the broker with a defined topic structure. On one side there is a request-topic, on which a requesting client sends its JSON document and on the other side there is the response-topic, on which it receives the response of the JSON Data Interface.

mainTopic: The main topic is defined in the configuration file (cf. Access via MQTT).

req/res: set.

adsPort: The ADS port to be queried is entered here.

invokeId: The Invoke ID is arbitrarily chosen by the user and is used to identify different requests to the same JSON Data Interface.

The JSON Data Interface mirrors the Invoke ID of a request topic and reuses it in the response topic. The requesting client must be subscribed to this response topic in order to receive the response.