|
Safe API Framework 0.1.0 build 384e6ae
Layered API framework for safety-related applications (ERTMS RBC reference targeting CENELEC EN 50128 SIL 4)
|
OSAdapter implementation for named channel operations. More...
#include <rte_channel_service.h>
Data Fields | |
| rte_status_t(*) | setup (rte_channel_service_storage_t *storage, const char *channel_name) |
| rte_status_t(*) | read (rte_channel_service_storage_t *storage, void *data, size_t data_size, rte_duration_ms_t timeout_ms) |
| 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(*) | close (rte_channel_service_storage_t *storage) |
| 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 datagram transport preserves message boundaries; read alone gives the caller no way to learn a received message was shorter than its buffer). May be NULL - an OSAdapter that does not implement it is unchanged; rte_channel_service_read_ex falls back to read and reports data_size as the actual size (today's behaviour). | |
OSAdapter implementation for named channel operations.
An OSAdapter may perform blocking or non-blocking transport work internally, but it must return from each operation within the supplied timeout. The OSAdapter owns all transport-specific state and recovery behavior.
Definition at line 42 of file rte_channel_service.h.
| rte_status_t(*) rte_osadapter_channel_service_t::setup(rte_channel_service_storage_t *storage, const char *channel_name) |
Definition at line 44 of file rte_channel_service.h.
| rte_status_t(*) rte_osadapter_channel_service_t::read(rte_channel_service_storage_t *storage, void *data, size_t data_size, rte_duration_ms_t timeout_ms) |
Definition at line 46 of file rte_channel_service.h.
| rte_status_t(*) rte_osadapter_channel_service_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.
REQ-CHANSVC-001 (OSA rule R5): on a listen-role link whose peer is learned from the first datagram it receives, a send before any peer is known shall transmit nothing and return RTE_STATUS_NOT_CONNECTED, never RTE_STATUS_OK. An OSAdapter that keeps the link unopened until its peer is present (the flow-backed channel service: RTE_STATUS_TIMEOUT) is not affected.
RTE_STATUS_OK when the data was handed to the transport; RTE_STATUS_NOT_CONNECTED as above; otherwise an OSAdapter-specific failure status. Definition at line 62 of file rte_channel_service.h.
| rte_status_t(*) rte_osadapter_channel_service_t::close(rte_channel_service_storage_t *storage) |
Definition at line 66 of file rte_channel_service.h.
| rte_status_t(*) rte_osadapter_channel_service_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 datagram transport preserves message boundaries; read alone gives the caller no way to learn a received message was shorter than its buffer). May be NULL - an OSAdapter that does not implement it is unchanged; rte_channel_service_read_ex falls back to read and reports data_size as the actual size (today's behaviour).
Definition at line 74 of file rte_channel_service.h.