Safe API Framework 0.1.0 build 384e6ae
Layered API framework for safety-related applications (ERTMS RBC reference targeting CENELEC EN 50128 SIL 4)
Loading...
Searching...
No Matches
rte_protocol_adapter_ops_t Struct Reference

Operations vtable implemented by a concrete ProtocolAdapter. More...

#include <rte_protocol_adapter.h>

Data Fields

rte_status_t(*) open (void *storage, size_t storage_size, const rte_protocol_config_t *config, const rte_os_socket_ops_t *os_sockets, rte_protocol_handle_t *out_handle)
 Opens and initializes a protocol adapter endpoint.
rte_status_t(*) send (rte_protocol_handle_t handle, const void *data, size_t size, rte_duration_ms_t timeout_ms)
 Sends a message over the protocol adapter.
rte_status_t(*) receive (rte_protocol_handle_t handle, void *out_buf, size_t buffer_size, rte_duration_ms_t timeout_ms)
 Receives a message from the protocol adapter.
rte_status_t(*) close (rte_protocol_handle_t handle)
 Closes the protocol adapter endpoint.

Detailed Description

Operations vtable implemented by a concrete ProtocolAdapter.

Definition at line 98 of file rte_protocol_adapter.h.

Field Documentation

◆ open

rte_status_t(*) rte_protocol_adapter_ops_t::open(void *storage, size_t storage_size, const rte_protocol_config_t *config, const rte_os_socket_ops_t *os_sockets, rte_protocol_handle_t *out_handle)

Opens and initializes a protocol adapter endpoint.

Parameters
storageCaller-allocated memory buffer for adapter state. Must not be NULL.
storage_sizeSize of storage buffer in bytes.
configAdapter configuration. Must not be NULL.
os_socketsVtable of raw OS socket operations (may be NULL if protocol is standalone e.g. DDS).
out_handleOutput handle. Must not be NULL.

Definition at line 108 of file rte_protocol_adapter.h.

◆ send

rte_status_t(*) rte_protocol_adapter_ops_t::send(rte_protocol_handle_t handle, const void *data, size_t size, rte_duration_ms_t timeout_ms)

Sends a message over the protocol adapter.

Parameters
handleValid protocol handle.
dataMessage buffer. Must not be NULL.
sizeSize of message in bytes.
timeout_msMaximum time to wait.

Definition at line 120 of file rte_protocol_adapter.h.

◆ receive

rte_status_t(*) rte_protocol_adapter_ops_t::receive(rte_protocol_handle_t handle, void *out_buf, size_t buffer_size, rte_duration_ms_t timeout_ms)

Receives a message from the protocol adapter.

Parameters
handleValid protocol handle.
out_bufOutput buffer. Must not be NULL.
buffer_sizeCapacity of output buffer.
timeout_msMaximum time to wait.

Definition at line 130 of file rte_protocol_adapter.h.

◆ close

rte_status_t(*) rte_protocol_adapter_ops_t::close(rte_protocol_handle_t handle)

Closes the protocol adapter endpoint.

Parameters
handleValid protocol handle.

Definition at line 137 of file rte_protocol_adapter.h.


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