|
SPSP
Simple publish-subscribe protocol. Connects low power IoT clients to MQTT.
|
Go to the documentation of this file.
25 template <
typename TLocalMessage>
28 void* m_node =
nullptr;
31 using LocalAddrT =
typename TLocalMessage::LocalAddrT;
32 using LocalMessageT = TLocalMessage;
62 return m_node !=
nullptr;
76 virtual bool send(
const TLocalMessage& msg) = 0;
85 void* m_node =
nullptr;
116 return m_node !=
nullptr;
130 virtual bool publish(
const std::string& src,
const std::string& topic,
131 const std::string& payload) = 0;
142 virtual bool subscribe(
const std::string& topic) = 0;
153 virtual bool unsubscribe(
const std::string& topic) = 0;
Generic local node of SPSP.
virtual bool send(const TLocalMessage &msg)=0
Sends the message to given node.
virtual bool subscribe(const std::string &topic)=0
Subscribes to given topic.
IFarNode< IFarLayer > * getNode() const
Gets the node object.
virtual bool publish(const std::string &src, const std::string &topic, const std::string &payload)=0
Publishes message coming from node.
virtual bool unsubscribe(const std::string &topic)=0
Unsubscribes from given topic.
Generic far layer node of SPSP.
ILocalNode< ILocalLayer > * getNode() const
Gets the node object.
void setNode(void *n)
Sets pointer to the owner node.
bool nodeConnected() const
Checks whether the owner node is connected.
bool nodeConnected() const
Checks whether the owner node is connected.
void setNode(void *n)
Sets pointer to the owner node.
Interface for local layer.