|
Safe API Framework 0.1.0 build 384e6ae
Layered API framework for safety-related applications (ERTMS RBC reference targeting CENELEC EN 50128 SIL 4)
|
Configuration for rte_dual_negotiator_init(). More...
#include <rte_dual_negotiator.h>
Data Fields | |
| rte_dual_channel_t * | channel |
| uint32_t | own_id |
| uint32_t | peer_id |
| rte_duration_ms_t | peer_lost_timeout_ms |
| rte_dual_negotiator_state_change_callback_t | state_change_callback |
| void * | state_change_callback_ctx |
| rte_dual_state_t | resume_own_state |
| uint64_t | resume_own_startup_timestamp_ms |
Configuration for rte_dual_negotiator_init().
Definition at line 105 of file rte_dual_negotiator.h.
| rte_dual_channel_t* rte_dual_negotiator_config_t::channel |
Already-initialized DualChannel this negotiator drives its own STATE beacon traffic through. Ownership stays with the caller - not closed/deinitialized by this module. Must not be NULL.
Definition at line 110 of file rte_dual_negotiator.h.
| uint32_t rte_dual_negotiator_config_t::own_id |
This instance's own tie-break identifier for the startup ONLINE/STANDBY decision (older timestamp wins; this ID is only consulted if both sides' startup timestamps are exactly equal).
Definition at line 114 of file rte_dual_negotiator.h.
| uint32_t rte_dual_negotiator_config_t::peer_id |
Expected peer's own tie-break identifier, for the same comparison.
Definition at line 116 of file rte_dual_negotiator.h.
| rte_duration_ms_t rte_dual_negotiator_config_t::peer_lost_timeout_ms |
How long without a valid peer STATE frame before rte_dual_negotiator_get_peer_state() degrades to RTE_DUAL_STATE_UNKNOWN (and, if this instance's own state was HOTSTANDBY/COLDSTANDBY/IDLE, its own state degrades too - an already-ONLINE instance's own state does not - see rte_dual_negotiator_execute()'s own doc).
Definition at line 123 of file rte_dual_negotiator.h.
| rte_dual_negotiator_state_change_callback_t rte_dual_negotiator_config_t::state_change_callback |
Optional; NULL = no callback.
Definition at line 125 of file rte_dual_negotiator.h.
| void* rte_dual_negotiator_config_t::state_change_callback_ctx |
Opaque context passed back to state_change_callback. Ignored if state_change_callback is NULL.
Definition at line 128 of file rte_dual_negotiator.h.
| rte_dual_state_t rte_dual_negotiator_config_t::resume_own_state |
Optional: seeds own_state instead of defaulting to RTE_DUAL_STATE_IDLE - for a caller resuming an already-established identity across a transient reconnect (a fresh channel/link, but not a fresh instance), where re-litigating the startup tie-break from scratch would risk a spurious promotion/demotion flip-flop. RTE_DUAL_STATE_IDLE (the zero value) means "no resume, use the default" - an existing, zero-initialized config gets exactly today's behavior. peer_state always starts fresh at IDLE regardless (the peer's own state is not something this instance can safely assume across a reconnect).
Definition at line 136 of file rte_dual_negotiator.h.
| uint64_t rte_dual_negotiator_config_t::resume_own_startup_timestamp_ms |
Optional: seeds own_startup_timestamp_ms instead of capturing a fresh rte_timer_now() - same "resume an identity across reconnect" use case as resume_own_state above, but an independent choice: a caller that is still negotiating (own_state not yet decided) may still want its ORIGINAL startup timestamp preserved across a reconnect, so a fresh one captured mid-negotiation cannot flip the tie-break outcome against its peer - resuming the timestamp does not require also resuming own_state. 0 (the zero value, never a legitimate timestamp) means "no resume, capture fresh" - an existing, zero-initialized config gets exactly today's behavior.
Definition at line 145 of file rte_dual_negotiator.h.