|
SPSP
Simple publish-subscribe protocol. Connects low power IoT clients to MQTT.
|
Go to the documentation of this file.
19 namespace SPSP::FarLayers::MQTT
28 bool m_initializing =
true;
29 std::promise<void> m_connectingPromise;
60 bool publish(
const std::string& src,
const std::string& topic,
61 const std::string& payload);
98 void subDataCb(
const std::string& topic,
const std::string& payload);
bool subscribe(const std::string &topic)
Subscribes to given topic.
MQTT(IAdapter &adapter, const Config &conf)
Constructs a new MQTT layer object.
Interface for platform-dependent MQTT adapter.
Interface for platform-dependent MQTT adapter.
void connectedCb()
Signalizes successful initial connection to broker.
bool publish(const std::string &src, const std::string &topic, const std::string &payload)
Publishes message coming from node.
MQTT client configuration.
Local and far layers for SPSP.
~MQTT()
Destroys MQTT layer object.
void subDataCb(const std::string &topic, const std::string &payload)
Callback for underlaying adapter to receive subscribe data.
bool unsubscribe(const std::string &topic)
Unsubscribes from given topic.