/**************************************************************************** * COpyright (c) 2023 Open Systems Development B.V. ****************************************************************************/ #include #include #include #include #include "mqttclient.h" using namespace osdev::components::mqtt; using namespace osdev::components::log; /**************************************************************************** * H E L P E R C L A S S E S ****************************************************************************/ /// @brief class to generate a cumulative topic.. class TopicTester { public: TopicTester(); virtual ~TopicTester(); void RunTopicTester(int max_number_of_chars); }; class Publisher { public: Publisher(); virtual ~Publisher() {} void connect(const std::string &hostname, int portnumber = 1883, const std::string &username = std::string(), const std::string &password = std::string(), const std::string &lwt_topic = std::string(), const std::string &lwt_message = std::string() ); void publish(const std::string &message_topic, const std::string &message_payload); private: osdev::components::mqtt::MqttClient m_mqtt_client; };