Zephyr API Documentation 4.1.99
A Scalable Open Source RTOS
 4.1.99
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
ipc_service_cb Struct Reference

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.
 

Detailed Description

Event callback structure.

It is registered during endpoint registration. This structure is part of the endpoint configuration.

Field Documentation

◆ bound

void(* ipc_service_cb::bound) (void *priv)

Bind was successful.

This callback is called when the endpoint binding is successful.

Parameters
[in]privPrivate user data.

◆ error

void(* ipc_service_cb::error) (const char *message, void *priv)

An error occurred.

Parameters
[in]messageError message.
[in]privPrivate user data.

◆ received

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.

Note
When ipc_service_hold_rx_buffer is not used, the data buffer is to be considered released and available again only when this callback returns.
Parameters
[in]dataPointer to data buffer.
[in]lenLength of data.
[in]privPrivate user data.

◆ unbound

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.

Parameters
[in]privPrivate user data.

The documentation for this struct was generated from the following file: