eRPC API Reference  Rev. 1.12.0
NXP Semiconductors
erpc::ClientManager Class Reference

Base client implementation. More...

#include <erpc_client_manager.h>

+ Inheritance diagram for erpc::ClientManager:
+ Collaboration diagram for erpc::ClientManager:

Public Member Functions

 ClientManager (void)
 Constructor. More...
 
virtual ~ClientManager (void)
 ClientManager destructor.
 
virtual RequestContext createRequest (bool isOneway)
 This function creates request context. More...
 
virtual void performRequest (RequestContext &request)
 This function performs request. More...
 
virtual void releaseRequest (RequestContext &request)
 This function releases request context. More...
 
void setErrorHandler (client_error_handler_t error_handler)
 This function sets error handler function for infrastructure errors. More...
 
void callErrorHandler (erpc_status_t err, uint32_t functionID)
 This function calls error handler callback function with given status. More...
 
- Public Member Functions inherited from erpc::ClientServerCommon
 ClientServerCommon (void)
 ClientServerCommon constructor.
 
 ~ClientServerCommon (void)
 ClientServerCommon destructor.
 
void setMessageBufferFactory (MessageBufferFactory *factory)
 This function sets message buffer factory to use. More...
 
void setCodecFactory (CodecFactory *factory)
 This function sets codec factory to use. More...
 
CodecFactorygetCodecFactory (void)
 This function sets codec factory to use. More...
 
void setTransport (Transport *transport)
 This function sets transport layer to use. More...
 
TransportgetTransport (void)
 This function gets transport instance. More...
 

Protected Member Functions

virtual void performClientRequest (RequestContext &request)
 This function performs request. More...
 
virtual void verifyReply (RequestContext &request)
 Validate that an incoming message is a reply.
 
CodeccreateBufferAndCodec (void)
 Create message buffer and codec. More...
 

Protected Attributes

uint32_t m_sequence
 Sequence number.
 
client_error_handler_t m_errorHandler
 Pointer to function error handler.
 
- Protected Attributes inherited from erpc::ClientServerCommon
MessageBufferFactorym_messageFactory
 Message buffer factory to use.
 
CodecFactorym_codecFactory
 Codec to use.
 
Transportm_transport
 Transport layer to use.
 

Detailed Description

Base client implementation.

Constructor & Destructor Documentation

erpc::ClientManager::ClientManager ( void  )
inline

Constructor.

This function initializes object attributes.

Member Function Documentation

RequestContext ClientManager::createRequest ( bool  isOneway)
virtual

This function creates request context.

Parameters
[in]isOnewayTrue if need send data only, else false.
void ClientManager::performRequest ( RequestContext request)
virtual

This function performs request.

Parameters
[in]requestRequest context to perform.
void ClientManager::releaseRequest ( RequestContext request)
virtual

This function releases request context.

Parameters
[in]requestRequest context to release.
void erpc::ClientManager::setErrorHandler ( client_error_handler_t  error_handler)
inline

This function sets error handler function for infrastructure errors.

Parameters
[in]error_handlerPointer to error handler function.
void ClientManager::callErrorHandler ( erpc_status_t  err,
uint32_t  functionID 
)

This function calls error handler callback function with given status.

Function is called in client shim code at the end of function when error occurred.

Parameters
[in]errSpecify function status at the end of eRPC call.
[in]functionIDSpecify eRPC function call.
void ClientManager::performClientRequest ( RequestContext request)
protectedvirtual

This function performs request.

Should be called in non server context (do not call another eRPC function in server remote call implementation).

Parameters
[in]requestRequest context to perform.

Reimplemented in erpc::ArbitratedClientManager.

Codec * ClientManager::createBufferAndCodec ( void  )
protected

Create message buffer and codec.

The new codec is set to use the new message buffer. Both codec and buffer are allocated with the relevant factories.

Returns
Pointer to created codec with message buffer.

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