ClassFlowMQTT.h 915 B

12345678910111213141516171819202122232425262728293031323334353637
  1. #ifdef ENABLE_MQTT
  2. #pragma once
  3. #include "ClassFlow.h"
  4. #include "ClassFlowPostProcessing.h"
  5. #include <string>
  6. class ClassFlowMQTT :
  7. public ClassFlow
  8. {
  9. protected:
  10. std::string uri, topic, topicError, clientname, topicRate, topicTimeStamp, topicUptime, topicFreeMem;
  11. std::string OldValue;
  12. ClassFlowPostProcessing* flowpostprocessing;
  13. std::string user, password;
  14. int SetRetainFlag;
  15. int keepAlive; // Seconds
  16. float roundInterval; // Minutes
  17. std::string maintopic;
  18. void SetInitialParameter(void);
  19. public:
  20. ClassFlowMQTT();
  21. ClassFlowMQTT(std::vector<ClassFlow*>* lfc);
  22. ClassFlowMQTT(std::vector<ClassFlow*>* lfc, ClassFlow *_prev);
  23. string GetMQTTMainTopic();
  24. bool Start(float AutoIntervall);
  25. bool ReadParameter(FILE* pfile, string& aktparamgraph);
  26. bool doFlow(string time);
  27. string name(){return "ClassFlowMQTT";};
  28. };
  29. #endif //ENABLE_MQTT