diff -r 364e09f5faea -r 0145c60b9560 mqtt/mqtt_client_gen.py --- a/mqtt/mqtt_client_gen.py Tue Jul 23 11:05:46 2024 +0200 +++ b/mqtt/mqtt_client_gen.py Tue Jul 23 15:30:04 2024 +0200 @@ -314,6 +314,7 @@ topics = "", cleanup = "", init = "", + init_pubsub = "", retrieve = "", publish = "", publish_changes = "" @@ -344,7 +345,7 @@ formatdict["decl"] += """ DECL_VAR({iec_type}, {C_type}, {c_loc_name})""".format(**locals()) - formatdict["init"] += """ + formatdict["init_pubsub"] += """ INIT_PUBLICATION({Topic}, {QoS}, {C_type}, {c_loc_name}, {Retained})""".format(**locals()) formatdict["publish"] += """ WRITE_VALUE({c_loc_name}, {C_type})""".format(**locals()) @@ -360,7 +361,7 @@ DECL_VAR({iec_type}, {C_type}, {c_loc_name})""".format(**locals()) formatdict["topics"] += """ INIT_TOPIC({Topic}, {iec_type}, {c_loc_name})""".format(**locals()) - formatdict["init"] += """ + formatdict["init_pubsub"] += """ INIT_SUBSCRIPTION({Topic}, {QoS})""".format(**locals()) formatdict["retrieve"] += """ READ_VALUE({c_loc_name}, {C_type})""".format(**locals())