Safe API Framework
Layered API framework for safety-related applications (ERTMS RBC reference targeting CENELEC EN 50128 SIL 4)
Loading...
Searching...
No Matches
sapi_clocksync_backend.h
Go to the documentation of this file.
1
17#ifndef SAPI_CLOCKSYNC_BACKEND_H
18#define SAPI_CLOCKSYNC_BACKEND_H
19
20#include <stdint.h>
21
24
25#ifdef __cplusplus
26extern "C" {
27#endif
28
35typedef struct sapi_clocksync_backend_s
36{
40 sapi_status_t (*get_offset_ms)(int64_t *out_offset_ms);
44
54
55#ifdef __cplusplus
56}
57#endif
58
59#endif /* SAPI_CLOCKSYNC_BACKEND_H */
60 /* CLOCKSYNC_BACKEND */
sapi_status_t sapi_clocksync_register_backend(const sapi_clocksync_backend_t *backend)
Registers the backend implementation used by every sapi_clocksync_* call (ADR-005-style single global...
sapi_clocksync_quality_t
Coarse quality/confidence of the current clock synchronization.
sapi_status_t
Common result/status codes.
Definition sapi_status.h:27
Pluggable wall-clock synchronization backend (ADR-017).
Common status/error codes returned by every Safe API Framework function. Shared across all OS Abstrac...
Backend vtable: an integrator's implementation of clock synchronization for a specific mechanism (PTP...
sapi_status_t(*) get_offset_ms(int64_t *out_offset_ms)
sapi_status_t(*) get_quality(sapi_clocksync_quality_t *out_quality)