|
SPSP
Simple publish-subscribe protocol. Connects low power IoT clients to MQTT.
|
Local broker far layer. More...
#include <local_broker.hpp>


Public Member Functions | |
| LocalBroker (const std::string topicPrefix="spsp") | |
| Constructs a new local broker object. More... | |
| ~LocalBroker () | |
| Destroys local broker layer object. More... | |
| bool | publish (const std::string &src, const std::string &topic, const std::string &payload) |
| Publishes message coming from node. More... | |
| bool | subscribe (const std::string &topic) |
| Subscribes to given topic. More... | |
| bool | unsubscribe (const std::string &topic) |
| Unsubscribes from given topic. More... | |
Public Member Functions inherited from SPSP::IFarLayer | |
| 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... | |
| SPSP::FarLayers::LocalBroker::LocalBroker::LocalBroker | ( | const std::string | topicPrefix = "spsp" | ) |
Constructs a new local broker object.
| topicPrefix | Topic prefix for publishing |
| SPSP::FarLayers::LocalBroker::LocalBroker::~LocalBroker | ( | ) |
Destroys local broker layer object.
|
virtual |
Publishes message coming from node.
| src | Source address |
| topic | Topic |
| payload | Payload (data) |
Implements SPSP::IFarLayer.
|
virtual |
Subscribes to given topic.
Should be used by INode only!
| topic | Topic |
Implements SPSP::IFarLayer.
|
virtual |
Unsubscribes from given topic.
Should be used by INode only!
| topic | Topic |
Implements SPSP::IFarLayer.
1.8.17