ClassFlowMQTT.h 993 B

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