MQTT
RemnodeMQTT configures messages with MQTT.
Topics for subscribing and publishing are configured in the remnode object.
Username and password are specified to gain access to the MQTT server. The user has to
be define on the server and given appropriate permissions. For Mosquitto, a password file can be created
with the mosquitto_passwd utility, and the file should be copied to the /etc/mosquitto directory.
In the RemTrans object, Address[0] and Address[1] is used to address a sent message to the corresponding
RemTrans in the target node.
The specification of topics differs if the remote header is disabled or not.
If the header is present
- Sending: publishing is made with the topic in PubishTopic in the RemnodeMQTT.
Address[0] and Address[1] in the RemTrans object is used to match RemTrans objects.
- Receiving: Subscriptions are med with the topic in SubscribeTopic in the RemnodeMQTT object.
The message is directed to the RemTrans with matching Address[0] and Address[1].
If header is disabled
- Sending: publishing is made with the topic in RemTrans.TransName.
- Receiving: A generic topic is set in SubscribeTopic in the RemnodeMQTT object, eg 'lab57/rcv/#'.
A more narrow topic is set in RemTrans.TransName, eg 'lab57/rcv/msg1'.