ClassFlowMQTT.h 876 B

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