Safe API Framework
Layered API framework for safety-related applications (ERTMS RBC reference targeting CENELEC EN 50128 SIL 4)
Loading...
Searching...
No Matches
sapi_channel_service.h
Go to the documentation of this file.
1#ifndef SAPI_CHANNEL_SERVICE_H
2#define SAPI_CHANNEL_SERVICE_H
3
13
14#include <stddef.h>
15#include <stdint.h>
16
19
20#ifdef __cplusplus
21extern "C" {
22#endif
23
24#define SAPI_CHANNEL_SERVICE_NAME_SIZE (32U)
25
27typedef struct
28{
29 uint8_t reserved[128U];
31
34
42typedef struct
43{
45 const char *channel_name);
47 void *data,
48 size_t data_size,
49 sapi_duration_ms_t timeout_ms);
51 const void *data,
52 size_t data_size,
53 sapi_duration_ms_t timeout_ms);
56
57sapi_status_t sapi_channel_service_register_backend(const sapi_channel_service_backend_t *backend);
58sapi_status_t sapi_channel_service_setup(sapi_channel_service_t *storage, const char *channel_name);
59sapi_status_t sapi_channel_service_read(sapi_channel_service_t *storage,
60 void *data,
61 size_t data_size,
62 sapi_duration_ms_t timeout_ms);
63sapi_status_t sapi_channel_service_send(sapi_channel_service_t *storage,
64 const void *data,
65 size_t data_size,
66 sapi_duration_ms_t timeout_ms);
67sapi_status_t sapi_channel_service_close(sapi_channel_service_t *storage);
68
69#ifdef __cplusplus
70}
71#endif
72
73#endif
sapi_status_t
Common result/status codes.
Definition sapi_status.h:27
uint32_t sapi_duration_ms_t
Definition sapi_types.h:27
sapi_channel_service_storage_t sapi_channel_service_t
Opaque handle to a named channel service instance.
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...
Backend implementation for named channel operations.
Caller-owned storage for one named channel service instance.