![]() |
eRPC API Reference
Rev. 1.7.2
NXP Semiconductors
|
Server side setup and control functions. More...
Server side setup and control functions.
Files | |
file | erpc_server_setup.h |
Typedefs | |
typedef struct ServerType * | erpc_server_t |
Opaque server object type. | |
Server setup | |
erpc_server_t | erpc_server_init (erpc_transport_t transport, erpc_mbf_t message_buffer_factory) |
This function initializes server. More... | |
void | erpc_server_deinit (void) |
This function de-initializes server. More... | |
void | erpc_add_service_to_server (void *service) |
This function adds service to server. More... | |
void | erpc_server_set_crc (uint32_t crcStart) |
Can be used to set own crcStart number. More... | |
Server control | |
erpc_status_t | erpc_server_run (void) |
This function calls server implementation until it is stopped. More... | |
erpc_status_t | erpc_server_poll (void) |
This function calls server implementation only once. More... | |
void | erpc_server_stop (void) |
This functions should be used when client is calling quit server. More... | |
erpc_server_t erpc_server_init | ( | erpc_transport_t | transport, |
erpc_mbf_t | message_buffer_factory | ||
) |
This function initializes server.
This function initializes server with all components necessary for running server.
void erpc_server_deinit | ( | void | ) |
This function de-initializes server.
This function de-initializes server and all components which it own.
void erpc_add_service_to_server | ( | void * | service | ) |
This function adds service to server.
Services contain implementations of functions called from client to server.
[in] | service | Service which contains implementations of functions called from client to server. |
void erpc_server_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;'
[in] | crcStart | Set start number for crc. |
erpc_status_t erpc_server_run | ( | void | ) |
This function calls server implementation until it is stopped.
This is blocking method, where server is trying read (and if it is requested also send) message until it is stopped.
erpc_status_t erpc_server_poll | ( | void | ) |
This function calls server implementation only once.
This is non-blocking method, where server is trying read (and if it is requested also send) message only once.
void erpc_server_stop | ( | void | ) |
This functions should be used when client is calling quit server.
This method sets server from On to OFF. When the server returns from its implementation, erpc_server_deinit() function should be called.