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_ipc.h
Go to the documentation of this file.
1
20#ifndef RTE_OS_IPC_H
21#define RTE_OS_IPC_H
22
25
26#ifdef __cplusplus
27extern "C" {
28#endif
29
31RTE_DECLARE_STORAGE(rte_ipc_storage_t, 64U);
32
34typedef struct rte_ipc_impl_s *rte_ipc_handle_t;
35
37typedef struct rte_ipc_config_s
38{
39 const char *name;
40 size_t message_size;
41 size_t queue_depth;
43
63rte_status_t rte_ipc_create(rte_ipc_storage_t *storage,
64 const rte_ipc_config_t *config,
65 rte_ipc_handle_t *out_handle);
66
83 const void *message,
84 size_t message_size,
85 rte_duration_ms_t timeout_ms);
86
103 void *out_message,
104 size_t buffer_size,
105 rte_duration_ms_t timeout_ms);
106
116
117/*
118 * The OSAdapter vtable (rte_osadapter_ipc_t) and rte_osadapter_ipc_register()
119 * live in rte_osadapter/ipc/rte_osadapter_ipc.h, not here (ADR-021).
120 * This header is the consumer-facing surface only.
121 */
122
123#ifdef __cplusplus
124}
125#endif
126
127#endif /* RTE_OS_IPC_H */
128 /* IPC */
rte_status_t rte_ipc_create(rte_ipc_storage_t *storage, const rte_ipc_config_t *config, rte_ipc_handle_t *out_handle)
Creates a bounded message channel.
Definition rte_ipc.c:44
struct rte_ipc_impl_s * rte_ipc_handle_t
Opaque handle to a created IPC channel, returned by rte_ipc_create().
Definition rte_ipc.h:34
rte_status_t rte_ipc_receive(rte_ipc_handle_t handle, void *out_message, size_t buffer_size, rte_duration_ms_t timeout_ms)
Receives one message, blocking at most timeout_ms.
Definition rte_ipc.c:97
rte_status_t rte_ipc_send(rte_ipc_handle_t handle, const void *message, size_t message_size, rte_duration_ms_t timeout_ms)
Sends one message, blocking at most timeout_ms.
Definition rte_ipc.c:77
rte_status_t rte_ipc_destroy(rte_ipc_handle_t handle)
Destroys a message channel.
Definition rte_ipc.c:117
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...
Configuration for rte_ipc_create().
Definition rte_ipc.h:38
const char * name
Definition rte_ipc.h:39
size_t message_size
Definition rte_ipc.h:40
size_t queue_depth
Definition rte_ipc.h:41