|
Safe API Framework
Layered API framework for safety-related applications (ERTMS RBC reference targeting CENELEC EN 50128 SIL 4)
|
Shared enums for the sapi_dual module (ADR-020): dual-instance state negotiation and the redundant, EN 50159-defended messaging channel it can run over. More...
#include <stdint.h>Go to the source code of this file.
Enumerations | |
| enum | sapi_dual_state_t { SAPI_DUAL_STATE_IDLE = 0 , SAPI_DUAL_STATE_UNKNOWN = 1 , SAPI_DUAL_STATE_ONLINE = 2 , SAPI_DUAL_STATE_HOTSTANDBY = 3 , SAPI_DUAL_STATE_COLDSTANDBY = 4 } |
| State of one instance in a dual (two-redundant-instance) relationship, as decided by sapi_dual_negotiator_t (ADR-020 section 3). Both this instance's own state and its last-known view of the peer's state use this same enum - see sapi_dual_negotiator_get_own_state()/_get_peer_state(). More... | |
| enum | sapi_dual_channel_status_t { SAPI_DUAL_CHANNEL_STATUS_DOWN = 0 , SAPI_DUAL_CHANNEL_STATUS_DEGRADED = 1 , SAPI_DUAL_CHANNEL_STATUS_FULL = 2 } |
| Aggregate connection status of a sapi_dual_channel_t across all of its configured redundant links (ADR-020 section 2). Independent of sapi_dual_state_t: losing some (not all) of the redundant links degrades this status without by itself forcing any sapi_dual_state_t transition - only total loss (DOWN) is a negotiator-relevant liveness event. More... | |
Functions | |
| const char * | sapi_dual_state_to_string (sapi_dual_state_t state) |
| Returns a short, static, human-readable string for a sapi_dual_state_t. Intended for diagnostics/logging only (e.g. as the Info= field of a sapi_log_write_event() call); never on a safety-decision path. | |
| const char * | sapi_dual_channel_status_to_string (sapi_dual_channel_status_t status) |
| Returns a short, static, human-readable string for a sapi_dual_channel_status_t. Same diagnostics-only contract as sapi_dual_state_to_string(). | |
Shared enums for the sapi_dual module (ADR-020): dual-instance state negotiation and the redundant, EN 50159-defended messaging channel it can run over.
REQ-DUAL-TYPES-001: sapi_dual_state_to_string()/_channel_status_to_string() return a non-NULL, static string for every defined enum value and a defensive "UNKNOWN_STATE"/ "UNKNOWN_STATUS" for an unrecognized one.
Definition in file sapi_dual_types.h.