38 return lifecycle_status;
48 if ((storage == NULL) || (config == NULL) || (out_handle == NULL))
73 if ((handle == NULL) || (message == NULL) || (message_size == 0U))
85 return s_backend->
send(handle, message, message_size, timeout_ms);
93 if ((handle == NULL) || (out_message == NULL) || (buffer_size == 0U))
sapi_status_t sapi_ipc_register_backend(const sapi_ipc_backend_t *backend)
Registers the backend implementation used by every sapi_ipc_* call (ADR-005 section 2....
sapi_status_t sapi_ipc_create(sapi_ipc_storage_t *storage, const sapi_ipc_config_t *config, sapi_ipc_handle_t *out_handle)
Creates a bounded message channel.
struct sapi_ipc_impl_s * sapi_ipc_handle_t
Opaque handle to a created IPC channel, returned by sapi_ipc_create().
sapi_status_t sapi_ipc_receive(sapi_ipc_handle_t handle, void *out_message, size_t buffer_size, sapi_duration_ms_t timeout_ms)
Receives one message, blocking at most timeout_ms.
sapi_status_t sapi_ipc_destroy(sapi_ipc_handle_t handle)
Destroys a message channel.
sapi_status_t sapi_ipc_send(sapi_ipc_handle_t handle, const void *message, size_t message_size, sapi_duration_ms_t timeout_ms)
Sends one message, blocking at most timeout_ms.
sapi_status_t sapi_lifecycle_check_setup_allowed(void)
Convenience check for a setup-only constructor: call this as one of the first checks in any function ...
sapi_status_t
Common result/status codes.
@ SAPI_STATUS_NOT_SUPPORTED
@ SAPI_STATUS_INVALID_PARAM
@ SAPI_STATUS_NOT_INITIALIZED
uint32_t sapi_duration_ms_t
static const sapi_clocksync_backend_t * s_backend
OS Abstraction Layer - Inter-process/inter-task communication service.
OS-backend adaptation surface for the IPC service (ADR-005, ADR-021).
Process-wide application setup-phase lock (ADR-026).
Backend vtable: an integrator's implementation of the IPC service for a specific OS/RTOS (ADR-005)....
sapi_status_t(*) send(sapi_ipc_handle_t handle, const void *message, size_t message_size, sapi_duration_ms_t timeout_ms)
Backend implementation of sapi_ipc_send(). May be NULL.
sapi_status_t(*) receive(sapi_ipc_handle_t handle, void *out_message, size_t buffer_size, sapi_duration_ms_t timeout_ms)
Backend implementation of sapi_ipc_receive(). May be NULL.
sapi_status_t(*) create(sapi_ipc_storage_t *storage, const sapi_ipc_config_t *config, sapi_ipc_handle_t *out_handle)
Backend implementation of sapi_ipc_create(). May be NULL.
sapi_status_t(*) destroy(sapi_ipc_handle_t handle)
Backend implementation of sapi_ipc_destroy(). May be NULL.
Configuration for sapi_ipc_create().