Safe API Framework
Layered API framework for safety-related applications (ERTMS RBC reference targeting CENELEC EN 50128 SIL 4)
Loading...
Searching...
No Matches
sapi_channel.c File Reference

One redundant channel: validates parameters, then dispatches to its configured send/recv callbacks, tracking health as a side effect (ADR-025). More...

Include dependency graph for sapi_channel.c:

Go to the source code of this file.

Functions

sapi_status_t sapi_channel_init (sapi_channel_storage_t *storage, const sapi_channel_config_t *config)
 Initializes one vital channel over a caller-supplied transport.
sapi_status_t sapi_channel_send (sapi_channel_t *handle, const void *data, size_t data_size)
 Sends data on this channel via its backend send callback.
sapi_status_t sapi_channel_receive (sapi_channel_t *handle, void *data, size_t data_size, uint32_t timeout_ms)
 Receives data on this channel via its backend receive callback.
sapi_status_t sapi_channel_get_health (const sapi_channel_t *handle, sapi_channel_health_t *out_health)
 Queries this channel's health statistics.
const char * sapi_channel_get_name (const sapi_channel_t *handle)
 Returns this channel's name, as given in sapi_channel_config_t::name at sapi_channel_init() time.
sapi_status_t sapi_channel_set_healthy (sapi_channel_t *handle, bool is_healthy)
 Marks this channel healthy/unhealthy.
sapi_status_t sapi_channel_destroy (sapi_channel_t *handle)
 Destroys a vital channel instance.

Detailed Description

One redundant channel: validates parameters, then dispatches to its configured send/recv callbacks, tracking health as a side effect (ADR-025).

Definition in file sapi_channel.c.