Safe API Framework
0.1.0 build 384e6ae
Layered API framework for safety-related applications (ERTMS RBC reference targeting CENELEC EN 50128 SIL 4)
Toggle main menu visibility
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
23
#include "
rte/utils/status/rte_status.h
"
24
#include "
rte/utils/types/rte_types.h
"
25
26
#ifdef __cplusplus
27
extern
"C"
{
28
#endif
29
31
RTE_DECLARE_STORAGE
(rte_ipc_storage_t, 64U);
32
34
typedef
struct
rte_ipc_impl_s *
rte_ipc_handle_t
;
35
37
typedef
struct
rte_ipc_config_s
38
{
39
const
char
*
name
;
40
size_t
message_size
;
41
size_t
queue_depth
;
42
}
rte_ipc_config_t
;
43
63
rte_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
82
rte_status_t
rte_ipc_send
(
rte_ipc_handle_t
handle,
83
const
void
*message,
84
size_t
message_size,
85
rte_duration_ms_t
timeout_ms);
86
102
rte_status_t
rte_ipc_receive
(
rte_ipc_handle_t
handle,
103
void
*out_message,
104
size_t
buffer_size,
105
rte_duration_ms_t
timeout_ms);
106
115
rte_status_t
rte_ipc_destroy
(
rte_ipc_handle_t
handle);
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_ipc_create
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
rte_ipc_handle_t
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_ipc_receive
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_ipc_send
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_ipc_destroy
rte_status_t rte_ipc_destroy(rte_ipc_handle_t handle)
Destroys a message channel.
Definition
rte_ipc.c:117
rte_status_t
rte_status_t
Common result/status codes.
Definition
rte_status.h:27
RTE_DECLARE_STORAGE
#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
rte_duration_ms_t
uint32_t rte_duration_ms_t
Definition
rte_types.h:27
rte_status.h
Common status/error codes returned by every Safe API Framework function. Shared across all OS Abstrac...
rte_types.h
Common fixed-width types and the caller-owned-storage handle pattern used by every OAL service (see A...
rte_ipc_config_t
Configuration for rte_ipc_create().
Definition
rte_ipc.h:38
rte_ipc_config_t::name
const char * name
Definition
rte_ipc.h:39
rte_ipc_config_t::message_size
size_t message_size
Definition
rte_ipc.h:40
rte_ipc_config_t::queue_depth
size_t queue_depth
Definition
rte_ipc.h:41
include
rte
oal
ipc
rte_ipc.h
Generated by
1.18.0