| eRPC API Reference Rev. 1.8.1 NXP Semiconductors

- Main Page
- API Reference
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | List of all members
erpc::Transport Class Referenceabstract
Infrastructure » Transports

Abstract interface for transport layer. More...

`#include <erpc_transport.h>`

Inheritance diagram for erpc::Transport:
[legend]

## Public Member Functions
| Transport (void)
| Constructor.
virtual | ~Transport (void)
| Transport destructor.
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...

## Detailed Description

Abstract interface for transport layer.

## Member Function Documentation

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

Prototype for receiving message.

Each transport layer need define this function.

Parameters

  [out] | message | Will return pointer to received message buffer.

Returns
  based on receive implementation.

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

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

Prototype for send message.

Each transport layer need define this function.

Parameters

  [in] | message | Pass message buffer to send.

Returns
  based on send implementation.

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

virtual bool erpc::Transport::hasMessage | ( | void |  | ) |
| inline virtual

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

  True | when a message is available to process, else false.

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

virtual void erpc::Transport::setCrc16 | ( | Crc16 * | crcImpl | ) |
| inline virtual

This functions sets the CRC-16 implementation.

Parameters

  [in] | crcImpl | Object containing crc-16 compute function.

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

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

- erpc_transport.h