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

Abstract interface for message buffer factory. More...

#include <erpc_message_buffer.hpp>

+ Inheritance diagram for erpc::MessageBufferFactory:

Public Member Functions

 MessageBufferFactory (void)
 Constructor. More...
 
virtual ~MessageBufferFactory (void)
 MessageBufferFactory destructor.
 
virtual MessageBuffer create (void)=0
 This function creates new message buffer. More...
 
MessageBuffer create (uint8_t reserveHeaderSize)
 This function creates new message buffer with reserved bytes at the beginning. More...
 
virtual bool createServerBuffer (void)
 This function informs server if it has to create buffer for received message. More...
 
virtual erpc_status_t prepareServerBufferForSend (MessageBuffer &message, uint8_t reserveHeaderSize=0)
 This function is preparing output buffer on server side. More...
 
virtual void dispose (MessageBuffer *buf)=0
 This function disposes message buffer. More...
 

Detailed Description

Abstract interface for message buffer factory.

Constructor & Destructor Documentation

MessageBufferFactory::MessageBufferFactory ( void  )

Constructor.

This function initializes object attributes.

Member Function Documentation

virtual MessageBuffer erpc::MessageBufferFactory::create ( void  )
pure virtual

This function creates new message buffer.

Returns
New created MessageBuffer.

Implemented in StaticMessageBufferFactory, RPMsgMessageBufferFactory, and DynamicMessageBufferFactory.

MessageBuffer MessageBufferFactory::create ( uint8_t  reserveHeaderSize)

This function creates new message buffer with reserved bytes at the beginning.

Reserved bytes can be used by transport to write transport related header file data.

Parameters
[in]reserveHeaderSizeReserved amount of bytes at the beginning of message buffer.
Returns
New created MessageBuffer.
bool MessageBufferFactory::createServerBuffer ( void  )
virtual

This function informs server if it has to create buffer for received message.

Returns
Has to return TRUE when server need create buffer for receiving message.

Reimplemented in RPMsgMessageBufferFactory.

erpc_status_t MessageBufferFactory::prepareServerBufferForSend ( MessageBuffer message,
uint8_t  reserveHeaderSize = 0 
)
virtual

This function is preparing output buffer on server side.

This function do decision if this function want reuse buffer, or use new buffer. In case of using new buffer function has to free given buffer.

Parameters
[in]messageMessageBuffer which can be reused.
[in]reserveHeaderSizeReserved amount of bytes at the beginning of message buffer.

Reimplemented in RPMsgMessageBufferFactory.

virtual void erpc::MessageBufferFactory::dispose ( MessageBuffer buf)
pure virtual

This function disposes message buffer.

Parameters
[in]bufMessageBuffer to dispose.

Implemented in StaticMessageBufferFactory, RPMsgMessageBufferFactory, and DynamicMessageBufferFactory.


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