stefandreyer / CODESYS-MQTT

MQTT client library for CODESYS, supporting all QoS
MIT License
113 stars 26 forks source link

ask about how to make an example. #56

Closed zhapwey closed 1 year ago

zhapwey commented 2 years ago

Hello good, I am trying to use your library for a simple mqtt send/receive system. I have started with the howto example and it works perfect, I have taken and I have taken the topic as an external variable and I have generated several instances of the FB. Would this be a good approach?

I ask this because reviewing the different examples, not all are done in the same way and it was to know if it is the way to do it well

BR

stefandreyer commented 2 years ago

Hi,

first, if it works its fine ;).

which FB do you mean? publish? I do use one publish FB at most per item/topic, this is smal, less memory usage.

The way I use it in my home automation projekt is like the GreatExampleOfAdvantages, here I made one FB for reuse and the topics are created by the projekt structure. Easy define a instance, call it and it is be done...

More questions? let me hear.

BR Stefan