Bad management of mqtt topic in the python script (generate-s2opc_pubsub-static-config.py) & in the structure (ReaderGroup)
Python script
The mqtt topic in the python script, which generates a static config in c from an XML configuration file, is not well handled. Currently, it only handles the mqtt topic present in the < connection > tag, which it translates with a function that is no longer implemented in S2OPC. However, it should manage the mqtt topics present in the < message > and < dataset > tags to stick to the current implementation of S2OPC. After investigation the mqtt topic should only be in the < message > tag. This requires a modification to the PubSub implementation
Solution : Modification of generate-s2opc_pubsub-static-config.py and the associated XSD (s2opc_pubsub_config.xsd).
PubSub implementation
Problems :
- Mqtt topic in the wrong structure (SOPC_DataSetReader instead of SOPC_ReaderGroup)
- Lack of default initialization function for mqtt topic (for the Subscriber).
Solutions :
- Move mqttTopic to SOPC_DataSetReader struct and modify the associated functions.
- New fct SOPC_ReaderGroup_Set_Default_MqttTopic() (based on SOPC_WriterGroup_Set_Default_MqttTopic())
See other details in #1230 (closed)
Edited by Jérémie Chabod