Safe API Framework
Layered API framework for safety-related applications (ERTMS RBC reference targeting CENELEC EN 50128 SIL 4)
Loading...
Searching...
No Matches
sapi_notify.h
Go to the documentation of this file.
1
113#ifndef SAFEAPI_COMMON_NOTIFY_H
114#define SAFEAPI_COMMON_NOTIFY_H
115
116#include <stdint.h>
117
118#ifdef __cplusplus
119extern "C" {
120#endif
121
136#define SAFEAPI_DECLARE_CALLBACK_LIST(list_type, callback_fn_type, max_subscribers) \
137 typedef struct \
138 { \
139 callback_fn_type fn; \
140 void *context; \
141 } list_type##_slot_t; \
142 typedef struct \
143 { \
144 list_type##_slot_t slots[(max_subscribers)]; \
145 uint32_t count; \
146 } list_type
147
148#ifdef __cplusplus
149}
150#endif
151
152#endif /* SAFEAPI_COMMON_NOTIFY_H */
153 /* NOTIFY */