Zephyr API Documentation 4.1.99
A Scalable Open Source RTOS
|
|
4.1.99 |
Event callback structure. More...
#include <ipc_service.h>
Data Fields | |
void(* | bound )(void *priv) |
Bind was successful. | |
void(* | unbound )(void *priv) |
The endpoint unbound by the remote. | |
void(* | received )(const void *data, size_t len, void *priv) |
New packet arrived. | |
void(* | error )(const char *message, void *priv) |
An error occurred. | |
Event callback structure.
It is registered during endpoint registration. This structure is part of the endpoint configuration.
void(* ipc_service_cb::bound) (void *priv) |
Bind was successful.
This callback is called when the endpoint binding is successful.
[in] | priv | Private user data. |
void(* ipc_service_cb::error) (const char *message, void *priv) |
An error occurred.
[in] | message | Error message. |
[in] | priv | Private user data. |
void(* ipc_service_cb::received) (const void *data, size_t len, void *priv) |
New packet arrived.
This callback is called when new data is received.
[in] | data | Pointer to data buffer. |
[in] | len | Length of data. |
[in] | priv | Private user data. |
void(* ipc_service_cb::unbound) (void *priv) |
The endpoint unbound by the remote.
This callback is called when the endpoint binding is removed. It may happen on different reasons, e.g. when the remote deregistered the endpoint, connection was lost, or remote CPU got reset.
You may want to do some cleanup, resetting, e.t.c. and after that if you want to bound again, you can register the endpoint. When the remote becomes available again and it also registers the endpoint, the binding will be reestablished and the bound()
callback will be called.
[in] | priv | Private user data. |