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

Configuration specific to SAPI_SAFECHANNEL_TYPE_VITAL_VOTED. More...

#include <sapi_safechannel.h>

Collaboration diagram for sapi_safechannel_vital_config_t:
[legend]

Data Fields

sapi_safechannel_endpoint_t endpoints [SAPI_SAFECHANNEL_MAX_LINKS]
uint32_t link_count
size_t message_size
sapi_voting_strategy_t voting_strategy
uint32_t quorum_size
sapi_duration_ms_t connect_timeout_ms
sapi_duration_ms_t channel_timeout_ms
bool log_disagreements
void(*) on_disagreement (void *context, sapi_voting_result_t result)
void * context

Detailed Description

Configuration specific to SAPI_SAFECHANNEL_TYPE_VITAL_VOTED.

Definition at line 115 of file sapi_safechannel.h.

Field Documentation

◆ endpoints

sapi_safechannel_endpoint_t sapi_safechannel_vital_config_t::endpoints[SAPI_SAFECHANNEL_MAX_LINKS]

Endpoints to open, one per redundant voted channel.

Definition at line 118 of file sapi_safechannel.h.

◆ link_count

uint32_t sapi_safechannel_vital_config_t::link_count

Number of entries populated in endpoints[].

Definition at line 120 of file sapi_safechannel.h.

◆ message_size

size_t sapi_safechannel_vital_config_t::message_size

Fixed size in bytes of every message exchanged - every endpoint is opened with this as its sapi_netlink_config_t::message_size.

Definition at line 123 of file sapi_safechannel.h.

◆ voting_strategy

sapi_voting_strategy_t sapi_safechannel_vital_config_t::voting_strategy

Voting strategy (2oo2, 2oo3, NMR).

Definition at line 125 of file sapi_safechannel.h.

◆ quorum_size

uint32_t sapi_safechannel_vital_config_t::quorum_size

Quorum size for NMR voting (ignored for 2oo2/2oo3).

Definition at line 127 of file sapi_safechannel.h.

◆ connect_timeout_ms

sapi_duration_ms_t sapi_safechannel_vital_config_t::connect_timeout_ms

Max time sapi_safechannel_open() may block per endpoint establishing it.

Definition at line 129 of file sapi_safechannel.h.

◆ channel_timeout_ms

sapi_duration_ms_t sapi_safechannel_vital_config_t::channel_timeout_ms

Timeout for each channel operation (milliseconds), forwarded to sapi_voter_config_t::channel_timeout_ms.

Definition at line 132 of file sapi_safechannel.h.

◆ log_disagreements

bool sapi_safechannel_vital_config_t::log_disagreements

Enable automatic disagreement logging (forwarded as-is).

Definition at line 134 of file sapi_safechannel.h.

◆ on_disagreement

void(*) sapi_safechannel_vital_config_t::on_disagreement(void *context, sapi_voting_result_t result)

Optional; NULL = no callback. Forwarded to sapi_voter_config_t::on_disagreement.

Definition at line 136 of file sapi_safechannel.h.

◆ context

void* sapi_safechannel_vital_config_t::context

Opaque context passed back to on_disagreement. Ignored if NULL.

Definition at line 138 of file sapi_safechannel.h.


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