Safe API Framework
Layered API framework for safety-related applications (ERTMS RBC reference targeting CENELEC EN 50128 SIL 4)
Loading...
Searching...
No Matches
sapi_safety_violation.h
Go to the documentation of this file.
1
52#ifndef SAFEAPI_COMMON_SAFETY_VIOLATION_H
53#define SAFEAPI_COMMON_SAFETY_VIOLATION_H
54
57
58#ifdef __cplusplus
59extern "C" {
60#endif
61
79
100 const char *file,
101 int32_t line,
102 const char *message);
103
118
136 const char *file,
137 int32_t line,
138 const char *message);
139
140#ifdef __cplusplus
141}
142#endif
143
144#endif /* SAFEAPI_COMMON_SAFETY_VIOLATION_H */
145 /* SAFETYVIOLATION */
void sapi_safety_violation_report(sapi_safety_violation_kind_t kind, const char *file, int32_t line, const char *message)
Reports one violation to the registered handler, if any.
sapi_status_t sapi_safety_violation_register_handler(sapi_safety_violation_handler_t handler)
Registers the single handler invoked by sapi_safety_violation_report(). Registering again replaces th...
void(*) sapi_safety_violation_handler_t(sapi_safety_violation_kind_t kind, const char *file, int32_t line, const char *message)
Handler invoked by sapi_safety_violation_report().
sapi_safety_violation_kind_t
Which safety primitive detected the violation.
@ SAPI_SAFETY_VIOLATION_CORRUPTION
@ SAPI_SAFETY_VIOLATION_OUT_OF_RANGE
@ SAPI_SAFETY_VIOLATION_OVERFLOW
sapi_status_t
Common result/status codes.
Definition sapi_status.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...