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

Configuration for sapi_dual_negotiator_init(). More...

#include <sapi_dual_negotiator.h>

Collaboration diagram for sapi_dual_negotiator_config_t:
[legend]

Data Fields

sapi_dual_channel_tchannel
uint32_t own_id
uint32_t peer_id
sapi_duration_ms_t peer_lost_timeout_ms
sapi_dual_negotiator_state_change_callback_t state_change_callback
void * state_change_callback_ctx

Detailed Description

Configuration for sapi_dual_negotiator_init().

Definition at line 105 of file sapi_dual_negotiator.h.

Field Documentation

◆ channel

sapi_dual_channel_t* sapi_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 sapi_dual_negotiator.h.

◆ own_id

uint32_t sapi_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 sapi_dual_negotiator.h.

◆ peer_id

uint32_t sapi_dual_negotiator_config_t::peer_id

Expected peer's own tie-break identifier, for the same comparison.

Definition at line 116 of file sapi_dual_negotiator.h.

◆ peer_lost_timeout_ms

sapi_duration_ms_t sapi_dual_negotiator_config_t::peer_lost_timeout_ms

How long without a valid peer STATE frame before sapi_dual_negotiator_get_peer_state() degrades to SAPI_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 sapi_dual_negotiator_execute()'s own doc).

Definition at line 123 of file sapi_dual_negotiator.h.

◆ state_change_callback

sapi_dual_negotiator_state_change_callback_t sapi_dual_negotiator_config_t::state_change_callback

Optional; NULL = no callback.

Definition at line 125 of file sapi_dual_negotiator.h.

◆ state_change_callback_ctx

void* sapi_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 sapi_dual_negotiator.h.


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