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_safety_violation.h
Go to the documentation of this file.
1
52
#ifndef RTE_COMMON_SAFETY_VIOLATION_H
53
#define RTE_COMMON_SAFETY_VIOLATION_H
54
55
#include "
rte/utils/status/rte_status.h
"
56
#include "
rte/utils/types/rte_types.h
"
57
58
#ifdef __cplusplus
59
extern
"C"
{
60
#endif
61
65
typedef
enum
rte_safety_violation_kind_e
66
{
69
RTE_SAFETY_VIOLATION_CORRUPTION
= 0,
72
RTE_SAFETY_VIOLATION_OVERFLOW
= 1,
77
RTE_SAFETY_VIOLATION_OUT_OF_RANGE
= 2
78
}
rte_safety_violation_kind_t
;
79
99
typedef
void (*
rte_safety_violation_handler_t
)(
rte_safety_violation_kind_t
kind,
100
const
char
*file,
101
int32_t line,
102
const
char
*message);
103
117
rte_status_t
rte_safety_violation_register_handler
(
rte_safety_violation_handler_t
handler);
118
135
void
rte_safety_violation_report
(
rte_safety_violation_kind_t
kind,
136
const
char
*file,
137
int32_t line,
138
const
char
*message);
139
140
#ifdef __cplusplus
141
}
142
#endif
143
144
#endif
/* RTE_COMMON_SAFETY_VIOLATION_H */
145
/* SAFETYVIOLATION */
rte_safety_violation_handler_t
void(*) rte_safety_violation_handler_t(rte_safety_violation_kind_t kind, const char *file, int32_t line, const char *message)
Handler invoked by rte_safety_violation_report().
Definition
rte_safety_violation.h:99
rte_safety_violation_kind_t
rte_safety_violation_kind_t
Which safety primitive detected the violation.
Definition
rte_safety_violation.h:66
rte_safety_violation_report
void rte_safety_violation_report(rte_safety_violation_kind_t kind, const char *file, int32_t line, const char *message)
Reports one violation to the registered handler, if any.
Definition
rte_safety_violation.c:20
rte_safety_violation_register_handler
rte_status_t rte_safety_violation_register_handler(rte_safety_violation_handler_t handler)
Registers the single handler invoked by rte_safety_violation_report(). Registering again replaces the...
Definition
rte_safety_violation.c:10
RTE_SAFETY_VIOLATION_OUT_OF_RANGE
@ RTE_SAFETY_VIOLATION_OUT_OF_RANGE
Definition
rte_safety_violation.h:77
RTE_SAFETY_VIOLATION_CORRUPTION
@ RTE_SAFETY_VIOLATION_CORRUPTION
Definition
rte_safety_violation.h:69
RTE_SAFETY_VIOLATION_OVERFLOW
@ RTE_SAFETY_VIOLATION_OVERFLOW
Definition
rte_safety_violation.h:72
rte_status_t
rte_status_t
Common result/status codes.
Definition
rte_status.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...
include
rte
utils
safestate
rte_safety_violation.h
Generated by
1.18.0