|
Safe API Framework
Layered API framework for safety-related applications (ERTMS RBC reference targeting CENELEC EN 50128 SIL 4)
|
Files | |
| file | src/oal/clocksync/sapi_clocksync.c |
| Implementation of the pluggable clock-sync backend (ADR-017). | |
Enumerations | |
| enum | sapi_clocksync_quality_t { SAPI_CLOCKSYNC_UNSYNCHRONIZED = 0 , SAPI_CLOCKSYNC_DEGRADED = 1 , SAPI_CLOCKSYNC_SYNCHRONIZED = 2 } |
| Coarse quality/confidence of the current clock synchronization. More... | |
Functions | |
| sapi_status_t | sapi_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; never use this to decide whether channel results are comparable). | |
| sapi_status_t | sapi_clocksync_get_quality (sapi_clocksync_quality_t *out_quality) |
| Reports the backend's current confidence in the clock offset. | |
REQ-CLOCKSYNC-001: sapi_clocksync_get_offset_ms() and sapi_clocksync_get_quality() shall return SAPI_STATUS_NOT_INITIALIZED if no backend has been registered. REQ-CLOCKSYNC-002: this module shall never be called from, or influence the outcome of, sapi_channel_checkpoint() or any other vital comparison - see the file-level note above.
Coarse quality/confidence of the current clock synchronization.
Definition at line 59 of file sapi_clocksync.h.
| sapi_status_t sapi_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; never use this to decide whether channel results are comparable).
| out_offset_ms | Milliseconds, positive if local clock is ahead of the backend's reference. Must not be NULL. |
Definition at line 48 of file sapi_clocksync.c.
| sapi_status_t sapi_clocksync_get_quality | ( | sapi_clocksync_quality_t * | out_quality | ) |
Reports the backend's current confidence in the clock offset.
| out_quality | Must not be NULL. |
Definition at line 72 of file sapi_clocksync.c.