eRPC API Reference  Rev. 1.12.0
NXP Semiconductors
erpc::Transport Class Referenceabstract

Abstract interface for transport layer. More...

#include <erpc_transport.hpp>

+ Inheritance diagram for erpc::Transport:

Public Member Functions

 Transport (void)
 Constructor.
 
virtual ~Transport (void)
 Transport destructor.
 
virtual uint8_t reserveHeaderSize (void)
 Size of data placed in MessageBuffer before serializing eRPC data. More...
 
virtual erpc_status_t receive (MessageBuffer *message)=0
 Prototype for receiving message. More...
 
virtual erpc_status_t send (MessageBuffer *message)=0
 Prototype for send message. More...
 
virtual bool hasMessage (void)
 Poll for an incoming message. More...
 
virtual void setCrc16 (Crc16 *crcImpl)
 This functions sets the CRC-16 implementation. More...
 
virtual Crc16getCrc16 (void)
 This functions gets the CRC-16 object. More...
 

Detailed Description

Abstract interface for transport layer.

Member Function Documentation

virtual uint8_t erpc::Transport::reserveHeaderSize ( void  )
inlinevirtual

Size of data placed in MessageBuffer before serializing eRPC data.

Returns
uint8_t Amount of bytes, reserved before serialized data.

Reimplemented in erpc::FramedTransport, and erpc::TransportArbitrator.

virtual erpc_status_t erpc::Transport::receive ( MessageBuffer message)
pure virtual

Prototype for receiving message.

Each transport layer need define this function.

Parameters
[out]messageWill return pointer to received message buffer.
Returns
based on receive implementation.

Implemented in erpc::MUTransport, erpc::RPMsgTransport, erpc::FramedTransport, erpc::RPMsgRTOSTransport, erpc::TransportArbitrator, erpc::RPMsgLinuxTransport, and erpc::InterThreadBufferTransport.

virtual erpc_status_t erpc::Transport::send ( MessageBuffer message)
pure virtual

Prototype for send message.

Each transport layer need define this function.

Parameters
[in]messagePass message buffer to send.
Returns
based on send implementation.

Implemented in erpc::MUTransport, erpc::RPMsgTransport, erpc::FramedTransport, erpc::RPMsgRTOSTransport, erpc::TransportArbitrator, erpc::RPMsgLinuxTransport, and erpc::InterThreadBufferTransport.

virtual bool erpc::Transport::hasMessage ( void  )
inlinevirtual

Poll for an incoming message.

This function should return true if are some messages to process by server, the return value should be tested before calling receive function to avoid waiting for a new message (receive can be implemented as blocking function).

Return values
Truewhen a message is available to process, else false.

Reimplemented in erpc::MUTransport, erpc::RPMsgTransport, erpc::RPMsgRTOSTransport, and erpc::TransportArbitrator.

virtual void erpc::Transport::setCrc16 ( Crc16 crcImpl)
inlinevirtual

This functions sets the CRC-16 implementation.

Parameters
[in]crcImplObject containing crc-16 compute function.

Reimplemented in erpc::RPMsgTransport, erpc::RPMsgRTOSTransport, erpc::FramedTransport, and erpc::TransportArbitrator.

virtual Crc16* erpc::Transport::getCrc16 ( void  )
inlinevirtual

This functions gets the CRC-16 object.

Returns
Crc16* Pointer to CRC-16 object containing crc-16 compute function.

Reimplemented in erpc::RPMsgTransport, erpc::RPMsgRTOSTransport, erpc::FramedTransport, and erpc::TransportArbitrator.


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