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_flow.h
Go to the documentation of this file.
1
57#ifndef RTE_OAL_FLOW_H
58#define RTE_OAL_FLOW_H
59
62
63#ifdef __cplusplus
64extern "C" {
65#endif
66
68RTE_DECLARE_STORAGE(rte_flow_storage_t, 64U);
69
71typedef struct rte_flow_impl_s *rte_flow_handle_t;
72
89
96typedef enum rte_flow_channel_e
97{
101
108typedef struct rte_flow_attr_s
109{
111 uint32_t oflags;
116
118typedef struct rte_flow_config_s
119{
124 const char *name;
127 uint32_t oflags;
133
149rte_status_t rte_flow_open(rte_flow_storage_t *storage,
150 const rte_flow_config_t *config,
151 rte_flow_handle_t *out_handle);
152
161
186 const void *data,
187 size_t data_size,
188 rte_flow_channel_t channel,
189 rte_duration_ms_t timeout_ms);
190
226 void *out_data,
227 size_t buffer_size,
228 rte_flow_channel_t *out_channel,
229 rte_duration_ms_t timeout_ms);
230
240
254 const rte_flow_attr_t *new_attr,
255 rte_flow_attr_t *out_old_attr);
256
257/*
258 * The OSAdapter vtable (rte_osadapter_flow_t) and
259 * rte_osadapter_flow_register() live in
260 * rte_osadapter/flow/rte_osadapter_flow.h, not here (ADR-021 seam,
261 * same posture as rte_netlink). This header is the consumer-facing
262 * surface only.
263 */
264
265#ifdef __cplusplus
266}
267#endif
268
269#endif /* RTE_OAL_FLOW_H */
270 /* FLOW */
rte_status_t rte_flow_send(rte_flow_handle_t handle, const void *data, size_t data_size, rte_flow_channel_t channel, rte_duration_ms_t timeout_ms)
Sends one fixed-size message on the given channel, blocking at most timeout_ms.
Definition rte_flow.c:86
rte_status_t rte_flow_close(rte_flow_handle_t handle)
Closes (leaves/unregisters/unsubscribes from) a Flow.
Definition rte_flow.c:132
rte_status_t rte_flow_receive(rte_flow_handle_t handle, void *out_data, size_t buffer_size, rte_flow_channel_t *out_channel, rte_duration_ms_t timeout_ms)
Receives one fixed-size message, blocking at most timeout_ms.
Definition rte_flow.c:111
rte_status_t rte_flow_getattr(rte_flow_handle_t handle, rte_flow_attr_t *out_attr)
Reads this Flow's current (static and dynamic) attributes.
Definition rte_flow.c:149
rte_status_t rte_flow_open(rte_flow_storage_t *storage, const rte_flow_config_t *config, rte_flow_handle_t *out_handle)
Opens (joins/registers/subscribes to, per OCORA's own fl_open() doc) a named Flow.
Definition rte_flow.c:58
rte_flow_channel_t
Message-channel discriminator, matching OCORA PI API Annex A.1's e_fl_channels: a Flow can carry ordi...
Definition rte_flow.h:97
struct rte_flow_impl_s * rte_flow_handle_t
Opaque handle to an opened Flow, returned by rte_flow_open().
Definition rte_flow.h:71
rte_flow_oflag_t
Open-mode bitmask, matching OCORA PI API Annex A.1's e_fl_oflags values exactly (so an integrator por...
Definition rte_flow.h:80
rte_status_t rte_flow_setattr(rte_flow_handle_t handle, const rte_flow_attr_t *new_attr, rte_flow_attr_t *out_old_attr)
Sets this Flow's mutable (dynamic) attributes.
Definition rte_flow.c:166
@ RTE_FLOW_CHANNEL_CTRL
Definition rte_flow.h:99
@ RTE_FLOW_CHANNEL_USER
Definition rte_flow.h:98
@ RTE_FLOW_O_RESPONDER
Definition rte_flow.h:82
@ RTE_FLOW_O_NONBLOCK
Definition rte_flow.h:85
@ RTE_FLOW_O_SUBSCRIBER
Definition rte_flow.h:84
@ RTE_FLOW_O_PUBLISHER
Definition rte_flow.h:83
@ RTE_FLOW_O_REQUESTER
Definition rte_flow.h:81
rte_status_t
Common result/status codes.
Definition rte_status.h:27
#define RTE_DECLARE_STORAGE(type_name, byte_size)
Declares an opaque, fixed-size, aligned storage type for a service's handle. The real internal layout...
Definition rte_types.h:69
uint32_t rte_duration_ms_t
Definition rte_types.h:27
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...
Flow attributes (OCORA PI API Annex A.1 leaves fl_attr's content as "to be defined" - this is this fr...
Definition rte_flow.h:109
uint32_t oflags
Definition rte_flow.h:111
size_t message_size
Definition rte_flow.h:110
Configuration for rte_flow_open().
Definition rte_flow.h:119
const char * name
Definition rte_flow.h:124
rte_duration_ms_t open_timeout_ms
Definition rte_flow.h:131
size_t message_size
Definition rte_flow.h:129
uint32_t oflags
Definition rte_flow.h:127