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_clocksync.h
Go to the documentation of this file.
1
43
44
#ifndef RTE_CLOCKSYNC_H
45
#define RTE_CLOCKSYNC_H
46
47
#include <stdint.h>
48
49
#include "
rte/utils/status/rte_status.h
"
50
#include "
rte/utils/types/rte_types.h
"
51
52
#ifdef __cplusplus
53
extern
"C"
{
54
#endif
55
59
typedef
enum
60
{
64
RTE_CLOCKSYNC_UNSYNCHRONIZED
= 0,
67
RTE_CLOCKSYNC_DEGRADED
= 1,
70
RTE_CLOCKSYNC_SYNCHRONIZED
= 2
71
}
rte_clocksync_quality_t
;
72
73
/*
74
* The OSAdapter vtable (rte_osadapter_clocksync_t) and
75
* rte_osadapter_clocksync_register() live in
76
* rte_osadapter/clocksync/rte_osadapter_clocksync.h, not here (ADR-021).
77
* This header is the consumer-facing surface only.
78
*/
79
91
rte_status_t
rte_clocksync_get_offset_ms
(int64_t *out_offset_ms);
92
101
rte_status_t
rte_clocksync_get_quality
(
rte_clocksync_quality_t
*out_quality);
102
103
#ifdef __cplusplus
104
}
105
#endif
106
108
109
#endif
/* RTE_CLOCKSYNC_H */
rte_clocksync_quality_t
rte_clocksync_quality_t
Coarse quality/confidence of the current clock synchronization.
Definition
rte_clocksync.h:60
rte_clocksync_get_quality
rte_status_t rte_clocksync_get_quality(rte_clocksync_quality_t *out_quality)
Reports the OSAdapter's current confidence in the clock offset.
Definition
rte_clocksync.c:72
rte_clocksync_get_offset_ms
rte_status_t rte_clocksync_get_offset_ms(int64_t *out_offset_ms)
Reports this node's estimated clock offset (diagnostic/timeout- sizing only - see the file-level note...
Definition
rte_clocksync.c:48
RTE_CLOCKSYNC_DEGRADED
@ RTE_CLOCKSYNC_DEGRADED
Definition
rte_clocksync.h:67
RTE_CLOCKSYNC_SYNCHRONIZED
@ RTE_CLOCKSYNC_SYNCHRONIZED
Definition
rte_clocksync.h:70
RTE_CLOCKSYNC_UNSYNCHRONIZED
@ RTE_CLOCKSYNC_UNSYNCHRONIZED
Definition
rte_clocksync.h:64
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
oal
clocksync
rte_clocksync.h
Generated by
1.18.0