Woman, Life, Freedom


Adaptive AUTOSAR
ARA public interface header documentation
ara::com::helper::NetworkLayer< T > Class Template Referenceabstract

Network communication abstraction layer. More...

#include <network_layer.h>

Public Member Functions

virtual void Send (const T &message)=0
 Send a message through the network. More...
 
void SetReceiver (void *object, std::function< void(T)> receiver)
 Set a receiver callback. More...
 

Protected Member Functions

void FireReceiverCallbacks (const std::vector< uint8_t > &payload)
 Fire all the set receiver callaback. More...
 

Detailed Description

template<typename T>
class ara::com::helper::NetworkLayer< T >

Network communication abstraction layer.

Template Parameters
TMessage type

Member Function Documentation

◆ FireReceiverCallbacks()

template<typename T >
void ara::com::helper::NetworkLayer< T >::FireReceiverCallbacks ( const std::vector< uint8_t > &  payload)
inlineprotected

Fire all the set receiver callaback.

Parameters
payloadReceived payload

◆ Send()

template<typename T >
virtual void ara::com::helper::NetworkLayer< T >::Send ( const T &  message)
pure virtual

Send a message through the network.

Parameters
messageMessage to be sent

◆ SetReceiver()

template<typename T >
void ara::com::helper::NetworkLayer< T >::SetReceiver ( void *  object,
std::function< void(T)>  receiver 
)
inline

Set a receiver callback.

Parameters
objectObject that owns the callback
receiverReceiver callback to be called when a message has been received