You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
688 B

2 years ago
  1. #include <stdlib.h>
  2. #include <string.h>
  3. #include <unistd.h>
  4. #include <fstream>
  5. #include <iostream>
  6. #include <nlohmann/json.hpp>
  7. namespace iflytop {
  8. using namespace std;
  9. using namespace nlohmann;
  10. class MQTTConfig {
  11. private:
  12. json m_mqttConfigJson;
  13. string m_address;
  14. string m_username;
  15. string m_password;
  16. string m_clientid;
  17. int m_qos;
  18. string m_topic;
  19. int m_timeout;
  20. public:
  21. MQTTConfig(/* args */){};
  22. ~MQTTConfig(){};
  23. void initialize(string file_name);
  24. string dump();
  25. string getAddress();
  26. string getUsername();
  27. string getPassword();
  28. string getClientid();
  29. int getQos();
  30. string getTopic();
  31. int getTimeout();
  32. };
  33. } // namespace iflytop