eRPC API Reference  Rev. 1.7.2
NXP Semiconductors
Client Setup

Client side setup functions. More...

Overview

Client side setup functions.

+ Collaboration diagram for Client Setup:

Files

file  erpc_arbitrated_client_setup.h
 
file  erpc_client_setup.h
 

Arbitrated client setup

erpc_transport_t erpc_arbitrated_client_init (erpc_transport_t transport, erpc_mbf_t message_buffer_factory)
 Initializes a client that shares its transport with the server. More...
 
void erpc_arbitrated_client_set_error_handler (client_error_handler_t error_handler)
 This function sets error handler function. More...
 
void erpc_arbitrated_client_set_crc (uint32_t crcStart)
 Can be used to set own crcStart number. More...
 
void erpc_arbitrated_client_deinit (void)
 This function de-initializes client. More...
 

Client setup

void erpc_client_init (erpc_transport_t transport, erpc_mbf_t message_buffer_factory)
 This function initializes client. More...
 
void erpc_client_set_error_handler (client_error_handler_t error_handler)
 This function sets error handler function. More...
 
void erpc_client_set_crc (uint32_t crcStart)
 Can be used to set own crcStart number. More...
 
void erpc_client_deinit (void)
 This function de-initializes client. More...
 

Function Documentation

erpc_transport_t erpc_arbitrated_client_init ( erpc_transport_t  transport,
erpc_mbf_t  message_buffer_factory 
)

Initializes a client that shares its transport with the server.

This function initializes a client with all components necessary for sending client requests using the same transport instance as used by a server. Only one instance of the shared transport should be created. The transport arbitrator that wraps the shared transport is returned. This arbitrator, not the shared transport, should be passed to the server setup routine.

Example use:

1 erpc_transport_t sharedSerial = erpc_transport_serial_init(...);
2 erpc_transport_t arbitrator = erpc_arbitrated_client_init(sharedSerial);
3 erpc_server_init(arbitrator);
Returns
Transport arbitrator reference that should be passed to the server setup API.
void erpc_arbitrated_client_set_error_handler ( client_error_handler_t  error_handler)

This function sets error handler function.

Given error_handler function is called when error occur inside eRPC infrastructure.

Parameters
[in]error_handlerPointer to function error handler.
void erpc_arbitrated_client_set_crc ( uint32_t  crcStart)

Can be used to set own crcStart number.

For example can be used generated crc from erpcgen which is providing when annotation is used. Accessed can be through 'extern const uint32_t erpc_generated_crc;'

Parameters
[in]crcStartSet start number for crc.
void erpc_arbitrated_client_deinit ( void  )

This function de-initializes client.

This function de-initializes client and all components which it own.

void erpc_client_init ( erpc_transport_t  transport,
erpc_mbf_t  message_buffer_factory 
)

This function initializes client.

Parameters
[in]transportInitiated transport.
[in]message_buffer_factoryInitiated message buffer factory.

This function initializes client with all components necessary for serve client request.

void erpc_client_set_error_handler ( client_error_handler_t  error_handler)

This function sets error handler function.

Given error_handler function is called when error occur inside eRPC infrastructure.

Parameters
[in]error_handlerPointer to function error handler.
void erpc_client_set_crc ( uint32_t  crcStart)

Can be used to set own crcStart number.

For example can be used generated crc from erpcgen which is providing when annotation is used. Accessed can be through 'extern const uint32_t erpc_generated_crc;'

Parameters
[in]crcStartSet start number for crc.
void erpc_client_deinit ( void  )

This function de-initializes client.

This function de-initializes client and all components which it own.