54#ifndef RTE_REDUNDANCY_CONFIG_H
55#define RTE_REDUNDANCY_CONFIG_H
67#define RTE_REDUNDANCY_CONFIG_MAX_ROLE_NAME_LEN 16U
70#define RTE_REDUNDANCY_CONFIG_MAX_REPLICAS 5U
74#define RTE_REDUNDANCY_CONFIG_MAX_FILE_SIZE 8192U
77#define RTE_CHANNEL_CONFIG_MAX_CHANNELS 32U
80#define RTE_CHANNEL_CONFIG_MAX_NAME_LEN 32U
83#define RTE_CHANNEL_CONFIG_MAX_HOST_LEN 64U
87 RTE_CHANNEL_TRANSPORT_FLOW = 0,
88 RTE_CHANNEL_TRANSPORT_POSIX_NETLINK = 1,
89 RTE_CHANNEL_TRANSPORT_DDS = 2
94 RTE_CHANNEL_ROLE_LISTEN = 0,
95 RTE_CHANNEL_ROLE_CONNECT = 1
106 uint32_t message_size;
107 uint32_t connect_timeout_ms;
rte_status_t
Common result/status codes.
void rte_redundancy_config_set_active(const rte_redundancy_config_t *config)
Set the active configuration explicitly (or automatically by rte_redundancy_config_load).
#define RTE_CHANNEL_CONFIG_MAX_NAME_LEN
const rte_redundancy_config_t * rte_redundancy_config_get_active(void)
Get the currently active loaded redundancy/channel configuration (if any).
rte_status_t rte_redundancy_config_standby_mode_from_string(const char *name, rte_standby_mode_t *out_mode)
Parse a standby-mode name string ("hot", "warm", "cold") into its enum value.
rte_status_t rte_redundancy_config_find_channel_by_id(const rte_redundancy_config_t *config, uint32_t id, rte_channel_def_t *out_channel)
Find channel definition by ID in the given configuration.
rte_status_t rte_redundancy_config_topology_from_string(const char *name, rte_redundancy_topology_t *out_topology)
Parse a topology name string ("2oo2", "2oo2_redundant", "2oo3", "nmr") into its enum value.
rte_status_t rte_redundancy_config_register_capability(rte_redundancy_capability_fn fn, void *context)
Registers the capability callback rte_redundancy_config_load() consults after successfully parsing a ...
const char * rte_redundancy_config_standby_mode_to_string(rte_standby_mode_t mode)
Inverse of rte_redundancy_config_standby_mode_from_string() - for logging/diagnostics.
#define RTE_CHANNEL_CONFIG_MAX_HOST_LEN
#define RTE_CHANNEL_CONFIG_MAX_CHANNELS
const char * rte_redundancy_config_topology_to_string(rte_redundancy_topology_t topology)
Inverse of rte_redundancy_config_topology_from_string() - for logging/diagnostics.
#define RTE_REDUNDANCY_CONFIG_MAX_REPLICAS
rte_status_t rte_channel_config_transport_from_string(const char *name, rte_channel_transport_t *out_transport)
Parse transport name string ("flow", "netlink", "posix", "dds") into enum.
rte_status_t rte_redundancy_config_find_channel_by_name(const rte_redundancy_config_t *config, const char *name, rte_channel_def_t *out_channel)
Find channel definition by name in the given configuration.
rte_status_t rte_channel_config_role_from_string(const char *name, rte_channel_role_t *out_role)
Parse channel role name string ("listen", "connect", "publisher", "subscriber") into enum.
rte_standby_mode_t
How a non-active replica ("standby") keeps itself ready to take over, and how rte_state_transfer (red...
#define RTE_REDUNDANCY_CONFIG_MAX_ROLE_NAME_LEN
rte_status_t rte_redundancy_config_load(const char *path, rte_redundancy_config_t *out_config)
Load a redundancy topology config from a JSON file.
bool(*) rte_redundancy_capability_fn(rte_redundancy_topology_t topology, uint32_t replica_count, void *context)
Integrator-supplied capability query: can THIS application actually run the given topology/replica_co...
rte_redundancy_topology_t
rte_status_t rte_redundancy_config_apply_to_voter(const rte_redundancy_config_t *config, rte_voter_config_t *voter_cfg)
Copy the resolved quorum from a loaded redundancy config into a rte_voter_config_t,...
@ RTE_REDUNDANCY_TOPOLOGY_2OO2_REDUNDANT
@ RTE_REDUNDANCY_TOPOLOGY_2OO3
@ RTE_REDUNDANCY_TOPOLOGY_NMR
@ RTE_REDUNDANCY_TOPOLOGY_2OO2
Common status/error codes returned by every Safe API Framework function. Shared across all OS Abstrac...
N-way voting across registered rte_channel_t links (2oo2/2oo3/NMR).
rte_standby_mode_t standby_mode
rte_channel_def_t channels[RTE_CHANNEL_CONFIG_MAX_CHANNELS]
rte_redundancy_topology_t topology
char roles[RTE_REDUNDANCY_CONFIG_MAX_REPLICAS][RTE_REDUNDANCY_CONFIG_MAX_ROLE_NAME_LEN]
Configuration for rte_voter_init().