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


Public Types | |
| using | LocalAddrT = SPSP::LocalAddr |
| using | LocalMessageT = SPSP::LocalMessage< SPSP::LocalAddr > |
| using | SentMsgsSetT = std::unordered_set< LocalMessageT > |
Public Types inherited from SPSP::ILocalLayer< LocalMessage< LocalAddr > > | |
| using | LocalAddrT = typename LocalMessage< LocalAddr > ::LocalAddrT |
| using | LocalMessageT = LocalMessage< LocalAddr > |
Public Member Functions | |
| virtual bool | send (const LocalMessageT &msg) |
| Sends the message to given node. More... | |
| void | receiveDirect (const LocalMessageT &msg, int rssi=0) |
| Simulates reception of data from local layer. More... | |
| const SentMsgsSetT & | getSentMsgs () |
| Returns set of sent messages. More... | |
| size_t | getSentMsgsCount () |
| Returns count of sent messages. More... | |
Public Member Functions inherited from SPSP::ILocalLayer< LocalMessage< LocalAddr > > | |
| void | setNode (void *n) |
| Sets pointer to the owner node. More... | |
| ILocalNode< ILocalLayer > * | getNode () const |
| Gets the node object. More... | |
| bool | nodeConnected () const |
| Checks whether the owner node is connected. More... | |
| virtual bool | send (const LocalMessage< LocalAddr > &msg)=0 |
| Sends the message to given node. More... | |
Protected Attributes | |
| SentMsgsSetT | m_sentMsgs |
| size_t | m_sentMsgsCount = 0 |
Dummy local layer for testing.
Definition at line 27 of file layers_dummy.hpp.
|
inline |
Returns set of sent messages.
Definition at line 75 of file layers_dummy.hpp.
|
inline |
Returns count of sent messages.
Definition at line 85 of file layers_dummy.hpp.
|
inline |
Simulates reception of data from local layer.
| msg | Message |
| rssi | Received signal strength indicator (in dBm) |
Definition at line 63 of file layers_dummy.hpp.
|
inlinevirtual |
Sends the message to given node.
In the message, empty address means send to the bridge peer.
| msg | Message |
Definition at line 48 of file layers_dummy.hpp.
1.8.17