|
SPSP
Simple publish-subscribe protocol. Connects low power IoT clients to MQTT.
|
Interface for platform-dependent MQTT adapter. More...
#include <mqtt_adapter_if.hpp>

Public Member Functions | |
| virtual bool | publish (const std::string &topic, const std::string &payload)=0 |
| Publishes message coming from node. More... | |
| virtual bool | subscribe (const std::string &topic)=0 |
| Subscribes to given topic. More... | |
| virtual bool | unsubscribe (const std::string &topic)=0 |
| Unsubscribes from given topic. More... | |
| virtual void | setSubDataCb (AdapterSubDataCb cb)=0 |
| Sets callback for incoming subscription data. More... | |
| virtual void | setConnectedCb (AdapterConnectedCb cb)=0 |
| Sets connected callback. More... | |
Interface for platform-dependent MQTT adapter.
Adapter doesn't have to check connection timeout.
Definition at line 37 of file mqtt_adapter_if.hpp.
|
pure virtual |
Publishes message coming from node.
This should not block (publish is very time sensitive).
| topic | Topic |
| payload | Payload (data) |
Implemented in SPSP::FarLayers::MQTT::Adapter, SPSP::FarLayers::MQTT::Adapter, and SPSP::FarLayers::MQTT::Adapter.
|
pure virtual |
Sets connected callback.
Should be called on successful connection and reconnection.
| cb | Callback |
Implemented in SPSP::FarLayers::MQTT::Adapter, SPSP::FarLayers::MQTT::Adapter, and SPSP::FarLayers::MQTT::Adapter.
|
pure virtual |
Sets callback for incoming subscription data.
| cb | Callback |
Implemented in SPSP::FarLayers::MQTT::Adapter, SPSP::FarLayers::MQTT::Adapter, and SPSP::FarLayers::MQTT::Adapter.
|
pure virtual |
Subscribes to given topic.
This should block (subscribe is usually not very time sensitive).
| topic | Topic |
Implemented in SPSP::FarLayers::MQTT::Adapter, SPSP::FarLayers::MQTT::Adapter, and SPSP::FarLayers::MQTT::Adapter.
|
pure virtual |
Unsubscribes from given topic.
This should block (unsubscribe is usually not very time sensitive).
| topic | Topic |
Implemented in SPSP::FarLayers::MQTT::Adapter, SPSP::FarLayers::MQTT::Adapter, and SPSP::FarLayers::MQTT::Adapter.
1.8.17