Safe API Framework
Layered API framework for safety-related applications (ERTMS RBC reference targeting CENELEC EN 50128 SIL 4)
Loading...
Searching...
No Matches
sapi_checkpoint_config_t Struct Reference

Checkpoint configuration. More...

#include <sapi_checkpoint.h>

Data Fields

uint32_t checkpoint_id
sapi_duration_ms_t max_delay_ms
uint32_t expected_node_count
sapi_watchdog_t watchdog

Detailed Description

Checkpoint configuration.

Field names match the illustrative usage already present in docs/REDUNDANCY_ARCHITECTURE.md, so those examples describe real behavior rather than an aspirational API.

Definition at line 69 of file sapi_checkpoint.h.

Field Documentation

◆ checkpoint_id

uint32_t sapi_checkpoint_config_t::checkpoint_id

Identifies this checkpoint (e.g. a per-cycle counter). Carried as both the sequence number and payload of the underlying sapi_vital_message_t, so a stale or wrong-cycle reply is rejected rather than silently accepted (REQ-CHECKPOINT-002).

Definition at line 75 of file sapi_checkpoint.h.

◆ max_delay_ms

sapi_duration_ms_t sapi_checkpoint_config_t::max_delay_ms

Maximum time to wait for peer confirmations before treating this checkpoint as failed (REQ-CHECKPOINT-001). Sized using the deployment's known network/clock jitter - see sapi_clocksync.h - never assumed to be zero-jitter.

Definition at line 81 of file sapi_checkpoint.h.

◆ expected_node_count

uint32_t sapi_checkpoint_config_t::expected_node_count

Minimum number of other channels whose valid confirmation must arrive within max_delay_ms for this checkpoint to succeed.

Definition at line 85 of file sapi_checkpoint.h.

◆ watchdog

sapi_watchdog_t sapi_checkpoint_config_t::watchdog

Optional watchdog to kick for liveness monitoring, independent of any single checkpoint's own pass/fail outcome. Kicked once per internal retry round (see sapi_channel_checkpoint()'s own doc) as well as on a fully successful checkpoint - a round that performed real send/receive I/O is genuine forward progress, not a fake kick. Intended for a caller whose own liveness watchdog is kicked once per outer cycle, AFTER this call returns: passing that same watchdog here lets it keep being kicked while this call is still legitimately retrying within its own longer max_delay_ms budget (e.g. a relaxed startup window), rather than firing out from under an in-progress-but-not-hung call. May be NULL.

Definition at line 98 of file sapi_checkpoint.h.


The documentation for this struct was generated from the following file: