|
RTE RBC 2oo2 Reference Application 0.1.0 build 0006685
SIL 4 2oo2 Dual-Site Fault-Tolerant ERTMS Radio Block Centre Reference Architecture
|
See ab_gp_startup_timestamp.h. More...
#include "ab_gp_startup_timestamp.h"Go to the source code of this file.
Functions | |
| rte_timestamp_ms_t | ab_gp_startup_timestamp_agree (rte_timestamp_ms_t own_now_ms, rte_timestamp_ms_t sibling_ts_ms, bool have_sibling) |
| The site startup timestamp this channel uses given its own clock and the sibling's value. | |
| void | ab_gp_startup_timestamp_encode (uint8_t *buf, bool is_reply, rte_timestamp_ms_t ts_ms) |
| Encodes a STARTUP_TS payload. | |
| bool | ab_gp_startup_timestamp_decode (const uint8_t *buf, size_t size, bool *is_reply, rte_timestamp_ms_t *ts_ms) |
| Decodes a STARTUP_TS payload. | |
See ab_gp_startup_timestamp.h.
Definition in file ab_gp_startup_timestamp.c.
| rte_timestamp_ms_t ab_gp_startup_timestamp_agree | ( | rte_timestamp_ms_t | own_now_ms, |
| rte_timestamp_ms_t | sibling_ts_ms, | ||
| bool | have_sibling ) |
The site startup timestamp this channel uses given its own clock and the sibling's value.
| own_now_ms | this process's own monotonic time at start-up |
| sibling_ts_ms | the sibling's startup timestamp (ignored when have_sibling is false) |
| have_sibling | a sibling value was received |
sibling_ts_ms when have_sibling, sibling_ts_ms <= own_now_ms and (own_now_ms - sibling_ts_ms) < AB_GP_STARTUP_TS_FRESH_MS; own_now_ms otherwise Definition at line 7 of file ab_gp_startup_timestamp.c.
| void ab_gp_startup_timestamp_encode | ( | uint8_t * | buf, |
| bool | is_reply, | ||
| rte_timestamp_ms_t | ts_ms ) |
Encodes a STARTUP_TS payload.
| buf | out, at least AB_GP_STARTUP_TS_PAYLOAD_SIZE bytes |
| is_reply | false for a request, true for the reply |
| ts_ms | the timestamp carried |
Definition at line 20 of file ab_gp_startup_timestamp.c.
| bool ab_gp_startup_timestamp_decode | ( | const uint8_t * | buf, |
| size_t | size, | ||
| bool * | is_reply, | ||
| rte_timestamp_ms_t * | ts_ms ) |
Decodes a STARTUP_TS payload.
| buf | the payload bytes |
| size | number of bytes available in buf |
| is_reply | out: false for a request, true for a reply |
| ts_ms | out: the timestamp carried |
size is at least AB_GP_STARTUP_TS_PAYLOAD_SIZE and the is_reply byte is 0 or 1; false otherwise (the out parameters are then left unchanged) Definition at line 36 of file ab_gp_startup_timestamp.c.