I am having a project where I have to make a simulator of ASC(Advanced Systems Control) of a boat which has to use MQTT protocol of communication. I have some data like Speed, Power, Water Temperature etc which I have to generate and send it to the MQTT broker. Also, I have different modes that depend on the variables. For example, when the user changes the mode of the boat the program should be able to check if that is possible and change it. I need to subscribe to that topic which is changing the mode.
My question is are: How should I approach this problem? Which design petters should I use? - State Design Pattern How should I handle the callback when I receive a topic for the mode?
Aucun commentaire:
Enregistrer un commentaire