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


Public Types | |
| using | PubsSetT = std::unordered_set< std::string > |
| using | SubsSetT = std::unordered_set< std::string > |
| using | SubsLogT = std::vector< std::string > |
Public Member Functions | |
| virtual bool | publish (const std::string &src, const std::string &topic, const std::string &payload) |
| Publishes message coming from node. More... | |
| virtual bool | subscribe (const std::string &topic) |
| Subscribes to given topic. More... | |
| virtual bool | unsubscribe (const std::string &topic) |
| Unsubscribes from given topic. More... | |
| virtual void | receiveDirect (const std::string &topic, const std::string &payload) |
| Simulates reception of data from far layer. More... | |
| const PubsSetT & | getPubs () |
| Returns current publishes set. More... | |
| const SubsSetT & | getSubs () |
| Returns current subscriptions set. More... | |
| const SubsLogT & | getSubsLog () |
| Returns current subscriptions log. More... | |
| const SubsLogT & | getUnsubsLog () |
| Returns current unsubscriptions log. 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... | |
Protected Attributes | |
| PubsSetT | m_pubs |
| SubsSetT | m_subs |
| SubsLogT | m_subsLog |
| SubsLogT | m_unsubsLog |
Dummy far layer for testing.
Definition at line 98 of file layers_dummy.hpp.
|
inline |
Returns current publishes set.
Definition at line 175 of file layers_dummy.hpp.
|
inline |
Returns current subscriptions set.
Definition at line 185 of file layers_dummy.hpp.
|
inline |
Returns current subscriptions log.
Definition at line 195 of file layers_dummy.hpp.
|
inline |
Returns current unsubscriptions log.
Definition at line 205 of file layers_dummy.hpp.
|
inlinevirtual |
Publishes message coming from node.
| src | Source address |
| topic | Topic |
| payload | Payload (data) |
Implements SPSP::IFarLayer.
Definition at line 121 of file layers_dummy.hpp.
|
inlinevirtual |
Simulates reception of data from far layer.
| topic | Topic |
| payload | Payload (data) |
Definition at line 162 of file layers_dummy.hpp.
|
inlinevirtual |
Subscribes to given topic.
| topic | Topic |
Implements SPSP::IFarLayer.
Definition at line 136 of file layers_dummy.hpp.
|
inlinevirtual |
Unsubscribes from given topic.
| topic | Topic |
Implements SPSP::IFarLayer.
Definition at line 150 of file layers_dummy.hpp.
1.8.17