20#ifndef RTE_PROTOCOL_ADAPTER_H
21#define RTE_PROTOCOL_ADAPTER_H
36#define RTE_PROTOCOL_ENDPOINT_STR_MAX (64U)
41typedef enum rte_protocol_type_e
51typedef enum rte_protocol_role_e
62typedef struct rte_protocol_config_s
98typedef struct rte_protocol_adapter_ops_s
#define RTE_PROTOCOL_ENDPOINT_STR_MAX
Maximum length of host, topic, or endpoint string.
const rte_protocol_adapter_ops_t * rte_protocol_adapter_get(rte_protocol_type_t type)
Retrieves the registered ProtocolAdapter for a given protocol type.
const rte_protocol_adapter_ops_t * rte_protocol_adapter_get_udp(void)
Returns the built-in raw UDP ProtocolAdapter vtable.
const rte_protocol_adapter_ops_t * rte_protocol_adapter_get_tcp(void)
Returns the built-in raw TCP ProtocolAdapter vtable.
struct rte_protocol_impl_s * rte_protocol_handle_t
Opaque protocol handle pointer.
rte_protocol_role_t
Communication role of the protocol adapter instance.
rte_status_t rte_protocol_adapter_register(rte_protocol_type_t type, const rte_protocol_adapter_ops_t *ops)
Registers a ProtocolAdapter implementation for a given protocol type.
rte_protocol_type_t
Protocol transport identifier.
@ RTE_PROTOCOL_ROLE_CONNECT
@ RTE_PROTOCOL_ROLE_LISTEN
@ RTE_PROTOCOL_TYPE_RAW_UDP
@ RTE_PROTOCOL_TYPE_RAW_TCP
rte_status_t
Common result/status codes.
uint32_t rte_duration_ms_t
OS Abstraction Layer - Raw OS Socket Interface for OSAdapters.
Common status/error codes returned by every Safe API Framework function. Shared across all OS Abstrac...
Common fixed-width types and the caller-owned-storage handle pattern used by every OAL service (see A...
Vtable of low-level OS socket operations implemented by an OSAdapter.
Operations vtable implemented by a concrete ProtocolAdapter.
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(*) 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(*) close(rte_protocol_handle_t handle)
Closes the protocol adapter endpoint.
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.
Configuration passed to open a protocol adapter instance.
bool use_handshake
Enable handshake (HELLO/ACK) for raw UDP.
char topic[RTE_PROTOCOL_ENDPOINT_STR_MAX]
Topic name (DDS).
uint16_t port
Port (UDP/TCP).
uint32_t domain_id
Domain ID (DDS).
char host[RTE_PROTOCOL_ENDPOINT_STR_MAX]
Host address (UDP/TCP) or domain partition.
rte_duration_ms_t open_timeout_ms
Open / handshake timeout in milliseconds.
rte_duration_ms_t default_timeout_ms
Default read/write timeout in milliseconds.
size_t max_message_size
Maximum expected message payload size.