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_tcp.c File Reference

Raw TCP ProtocolAdapter Implementation using OSAdapter Sockets. More...

Include dependency graph for rte_protocol_adapter_tcp.c:

Go to the source code of this file.

Data Structures

struct  rte_protocol_tcp_state_t

Functions

static rte_status_t tcp_adapter_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)
static rte_status_t tcp_adapter_send (rte_protocol_handle_t handle, const void *data, size_t size, rte_duration_ms_t timeout_ms)
static rte_status_t tcp_adapter_receive (rte_protocol_handle_t handle, void *out_buf, size_t buffer_size, rte_duration_ms_t timeout_ms)
static rte_status_t tcp_adapter_close (rte_protocol_handle_t handle)
const rte_protocol_adapter_ops_t * rte_protocol_adapter_get_tcp (void)
 Returns the built-in raw TCP ProtocolAdapter vtable.

Variables

static const rte_protocol_adapter_ops_t s_tcp_ops

Detailed Description

Raw TCP ProtocolAdapter Implementation using OSAdapter Sockets.

Compliant with CENELEC EN 50128 SIL 4 and MISRA C:2012. Strictly no dynamic allocation. All OS interactions go through rte_os_socket_ops_t.

Definition in file rte_protocol_adapter_tcp.c.

Function Documentation

◆ tcp_adapter_open()

rte_status_t tcp_adapter_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 )
static

Definition at line 21 of file rte_protocol_adapter_tcp.c.

◆ tcp_adapter_send()

rte_status_t tcp_adapter_send ( rte_protocol_handle_t handle,
const void * data,
size_t size,
rte_duration_ms_t timeout_ms )
static

Definition at line 110 of file rte_protocol_adapter_tcp.c.

◆ tcp_adapter_receive()

rte_status_t tcp_adapter_receive ( rte_protocol_handle_t handle,
void * out_buf,
size_t buffer_size,
rte_duration_ms_t timeout_ms )
static

Definition at line 150 of file rte_protocol_adapter_tcp.c.

◆ tcp_adapter_close()

rte_status_t tcp_adapter_close ( rte_protocol_handle_t handle)
static

Definition at line 190 of file rte_protocol_adapter_tcp.c.

Variable Documentation

◆ s_tcp_ops

const rte_protocol_adapter_ops_t s_tcp_ops
static
Initial value:
= {
tcp_adapter_open,
tcp_adapter_send,
tcp_adapter_receive,
tcp_adapter_close
}

Definition at line 206 of file rte_protocol_adapter_tcp.c.