24 if ((osadapter == NULL) || (osadapter->setup == NULL) || (osadapter->read == NULL) ||
25 (osadapter->
send == NULL) || (osadapter->close == NULL))
37 if ((storage == NULL) || (channel_name == NULL))
47 return lifecycle_status;
50 status = validate_osadapter();
77 return rte_channel_service_setup(storage, def.name);
87 if ((storage == NULL) || (data == NULL) || (data_size == 0U))
91 status = validate_osadapter();
96 return s_osadapter->read(storage, data, data_size, timeout_ms);
103 size_t *out_actual_size)
107 if ((storage == NULL) || (data == NULL) || (data_size == 0U) || (out_actual_size == NULL))
111 status = validate_osadapter();
122 status =
s_osadapter->read(storage, data, data_size, timeout_ms);
125 *out_actual_size = data_size;
137 if ((storage == NULL) || (data == NULL) || (data_size == 0U))
141 status = validate_osadapter();
157 status = validate_osadapter();
rte_status_t rte_lifecycle_check_setup_allowed(void)
Convenience check for a setup-only constructor: call this as one of the first checks in any function ...
rte_status_t
Common result/status codes.
@ RTE_STATUS_INVALID_PARAM
@ RTE_STATUS_NOT_INITIALIZED
uint32_t rte_duration_ms_t
const rte_redundancy_config_t * rte_redundancy_config_get_active(void)
Get the currently active loaded redundancy/channel configuration (if any).
rte_status_t rte_redundancy_config_find_channel_by_id(const rte_redundancy_config_t *config, uint32_t id, rte_channel_def_t *out_channel)
Find channel definition by ID in the given configuration.
Application-facing named channel service.
rte_status_t rte_channel_service_send(rte_channel_service_t *storage, const void *data, size_t data_size, rte_duration_ms_t timeout_ms)
Sends data_size bytes of data on the named channel in storage through the registered OSAdapter's send...
rte_channel_service_storage_t rte_channel_service_t
Opaque handle to a named channel service instance.
rte_status_t rte_channel_service_read_ex(rte_channel_service_t *storage, void *data, size_t data_size, rte_duration_ms_t timeout_ms, size_t *out_actual_size)
Same as rte_channel_service_read, but also reports the actual number of bytes received into data (nev...
rte_status_t rte_osadapter_channel_service_register(const rte_osadapter_channel_service_t *osadapter)
Registers the OSAdapter that implements named channels (ADR-005).
static const rte_osadapter_clocksync_t * s_osadapter
Process-wide application setup-phase lock (ADR-026).
Application-level redundancy topology configuration (2oo2 / 2oo2 with redundancy / 2oo3 / NMR),...
OSAdapter implementation for named channel operations.
rte_status_t(*) send(rte_channel_service_storage_t *storage, const void *data, size_t data_size, rte_duration_ms_t timeout_ms)
Sends data_size bytes of data on the channel set up in storage, within timeout_ms.
rte_status_t(*) read_ex(rte_channel_service_storage_t *storage, void *data, size_t data_size, rte_duration_ms_t timeout_ms, size_t *out_actual_size)
Optional: same as read, but also reports the true number of bytes the transport actually received (a ...