|
SPSP
Simple publish-subscribe protocol. Connects low power IoT clients to MQTT.
|
Interface for far layer. More...
#include <layers.hpp>

Public Member Functions | |
| void | setNode (void *n) |
| Sets pointer to the owner node. More... | |
| IFarNode< IFarLayer > * | getNode () const |
| Gets the node object. More... | |
| bool | nodeConnected () const |
| Checks whether the owner node is connected. More... | |
| virtual bool | publish (const std::string &src, 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... | |
Interface for far layer.
Definition at line 83 of file layers.hpp.
|
inline |
Checks whether the owner node is connected.
Definition at line 114 of file layers.hpp.
|
pure virtual |
Publishes message coming from node.
Should be used by INode only!
| src | Source address |
| topic | Topic |
| payload | Payload (data) |
Implemented in SPSP::FarLayers::DummyFarLayer, SPSP::FarLayers::MQTT::MQTT, and SPSP::FarLayers::LocalBroker::LocalBroker.
|
inline |
|
pure virtual |
Subscribes to given topic.
Should be used by INode only!
| topic | Topic |
Implemented in SPSP::FarLayers::DummyFarLayer, SPSP::FarLayers::MQTT::MQTT, and SPSP::FarLayers::LocalBroker::LocalBroker.
|
pure virtual |
Unsubscribes from given topic.
Should be used by INode only!
| topic | Topic |
Implemented in SPSP::FarLayers::DummyFarLayer, SPSP::FarLayers::MQTT::MQTT, and SPSP::FarLayers::LocalBroker::LocalBroker.
1.8.17