SPSP
Simple publish-subscribe protocol. Connects low power IoT clients to MQTT.
All Classes Files Functions Variables Typedefs Enumerations
Public Member Functions | Protected Member Functions | List of all members
SPSP::IFarNode< TFarLayer > Class Template Referenceabstract

Generic far layer node of SPSP. More...

#include <node.hpp>

Inheritance diagram for SPSP::IFarNode< TFarLayer >:
Inheritance graph
[legend]

Public Member Functions

 IFarNode (TFarLayer *fl)
 Constructs a new node. More...
 
virtual bool receiveFar (const std::string &topic, const std::string &payload)=0
 Receives the message from far layer. More...
 

Protected Member Functions

TFarLayer * getFarLayer () const
 Gets the far layer object. More...
 

Detailed Description

template<typename TFarLayer>
class SPSP::IFarNode< TFarLayer >

Generic far layer node of SPSP.

Supplied far layer must be valid during whole lifetime of this

Template Parameters
TFarLayerType of far layer

Definition at line 18 of file layers.hpp.

Constructor & Destructor Documentation

◆ IFarNode()

template<typename TFarLayer >
SPSP::IFarNode< TFarLayer >::IFarNode ( TFarLayer *  fl)
inline

Constructs a new node.

Definition at line 371 of file node.hpp.

Member Function Documentation

◆ getFarLayer()

template<typename TFarLayer >
TFarLayer* SPSP::IFarNode< TFarLayer >::getFarLayer ( ) const
inlineprotected

Gets the far layer object.

Returns
Far layer object

Definition at line 395 of file node.hpp.

◆ receiveFar()

template<typename TFarLayer >
virtual bool SPSP::IFarNode< TFarLayer >::receiveFar ( const std::string &  topic,
const std::string &  payload 
)
pure virtual

Receives the message from far layer.

Acts as a callback for far layer receiver.

Parameters
topicTopic
payloadPayload (data)
Returns
true Message delivery successful
false Message delivery failed

Implemented in SPSP::Nodes::Bridge< TLocalLayer, TFarLayer >.


The documentation for this class was generated from the following files: