eRPC API Reference  Rev. 1.7.2
NXP Semiconductors
erpc::RPMsgRTOSTransport Class Reference

Transport that uses RPMsg zero copy RTOS API for interprocessor messaging. More...

#include <erpc_rpmsg_lite_rtos_transport.h>

+ Inheritance diagram for erpc::RPMsgRTOSTransport:
+ Collaboration diagram for erpc::RPMsgRTOSTransport:

Public Member Functions

 RPMsgRTOSTransport (void)
 Constructor. More...
 
virtual ~RPMsgRTOSTransport (void)
 RPMsgRTOSTransport destructor.
 
virtual erpc_status_t init (unsigned long src_addr, unsigned long dst_addr, void *base_address, unsigned long length, int rpmsg_link_id)
 This function call RPMsg rtos init function - as RPMsg master. More...
 
virtual erpc_status_t init (unsigned long src_addr, unsigned long dst_addr, void *base_address, int rpmsg_link_id, void(*ready_cb)(void), char *nameservice_name)
 This function call RPMsg rtos init function - as RPMsg remote. More...
 
virtual erpc_status_t receive (MessageBuffer *message)
 Store incoming message to message buffer. More...
 
virtual erpc_status_t send (MessageBuffer *message)
 Function to send prepared message. More...
 
virtual bool hasMessage (void)
 Function to check if is message in receive queue and wait for processing. More...
 
- Public Member Functions inherited from erpc::RPMsgBaseTransport
struct rpmsg_lite_instance * get_rpmsg_lite_instance (void)
 This function returns pointer to instance of RPMSG lite. More...
 
- Public Member Functions inherited from erpc::Transport
 Transport (void)
 Constructor.
 
virtual ~Transport (void)
 Transport destructor.
 
virtual void setCrc16 (Crc16 *crcImpl)
 This functions sets the CRC-16 implementation. More...
 

Protected Attributes

struct remote_device * m_rdev
 
struct rpmsg_channel * m_app_rp_chnl
 
unsigned long m_dst_addr
 
rpmsg_queue_handle m_rpmsg_queue
 
struct rpmsg_lite_endpoint * m_rpmsg_ept
 

Additional Inherited Members

- Static Protected Attributes inherited from erpc::RPMsgBaseTransport
static struct rpmsg_lite_instance * s_rpmsg
 
static uint8_t s_initialized
 

Detailed Description

Transport that uses RPMsg zero copy RTOS API for interprocessor messaging.

Constructor & Destructor Documentation

RPMsgRTOSTransport::RPMsgRTOSTransport ( void  )

Constructor.

This function initializes object attributes.

Member Function Documentation

erpc_status_t RPMsgRTOSTransport::init ( unsigned long  src_addr,
unsigned long  dst_addr,
void *  base_address,
unsigned long  length,
int  rpmsg_link_id 
)
virtual

This function call RPMsg rtos init function - as RPMsg master.

Parameters
[in]src_addrSource address.
[in]dst_addrDestination address.
[in]base_addressRPMsg base address in the shared memory.
[in]lengthRPMsg shared memory region length.
[in]rpmsg_link_idSelection between what cores the communication will occur.
Return values
kErpcStatus_SuccessWhen rpmsg init function was executed successfully.
kErpcStatus_InitFailedWhen rpmsg init function wasn't executed successfully.
erpc_status_t RPMsgRTOSTransport::init ( unsigned long  src_addr,
unsigned long  dst_addr,
void *  base_address,
int  rpmsg_link_id,
void(*)(void)  ready_cb,
char *  nameservice_name 
)
virtual

This function call RPMsg rtos init function - as RPMsg remote.

Parameters
[in]src_addrSource address.
[in]dst_addrDestination address.
[in]base_addressRPMsg base address in the shared memory.
[in]rpmsg_link_idSelection between what cores the communication will occur.
[in]ready_cbCallback called after RPMsg init is done and the core is ready.
[in]nameservice_nameName of the nameservice channel to be announced to the other core.
Return values
kErpcStatus_SuccessWhen rpmsg init function was executed successfully.
kErpcStatus_InitFailedWhen rpmsg init function wasn't executed successfully.
erpc_status_t RPMsgRTOSTransport::receive ( MessageBuffer message)
virtual

Store incoming message to message buffer.

In loop while no message come.

Parameters
[in]messageMessage buffer, to which will be stored incoming message.
Return values
kErpcStatus_ReceiveFailedFailed to receive message buffer.
kErpcStatus_SuccessSuccessfully received all data.

Implements erpc::Transport.

erpc_status_t RPMsgRTOSTransport::send ( MessageBuffer message)
virtual

Function to send prepared message.

Parameters
[in]messagePass message buffer to send.
Return values
kErpcStatus_SendFailedFailed to send message buffer.
kErpcStatus_SuccessSuccessfully sent all data.

Implements erpc::Transport.

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

Function to check if is message in receive queue and wait for processing.

This function should be called before function receive() to avoid waiting for new message.

Returns
True if exist received message, else false.

Reimplemented from erpc::Transport.

Member Data Documentation

struct remote_device* erpc::RPMsgRTOSTransport::m_rdev
protected

Device which represent the second core.

struct rpmsg_channel* erpc::RPMsgRTOSTransport::m_app_rp_chnl
protected

Represent connection between two device (two cores).

unsigned long erpc::RPMsgRTOSTransport::m_dst_addr
protected

Destination address used by rpmsg.

rpmsg_queue_handle erpc::RPMsgRTOSTransport::m_rpmsg_queue
protected

Handle of RPMsg queue.

struct rpmsg_lite_endpoint* erpc::RPMsgRTOSTransport::m_rpmsg_ept
protected

Pointer to RPMsg Lite Endpoint structure.


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