RTE RBC 2oo2 Reference Application 0.1.0 build 0006685
SIL 4 2oo2 Dual-Site Fault-Tolerant ERTMS Radio Block Centre Reference Architecture
Loading...
Searching...
No Matches
ab_gp_config.h
Go to the documentation of this file.
1
8
9#ifndef AB_GP_CONFIG_H
10#define AB_GP_CONFIG_H
11
12#include <stdbool.h>
13#include <stdint.h>
14
15#include "rte/oal/netlink/rte_netlink.h"
16#include "rte/utils/types/rte_types.h"
18
19#define AB_GP_CONFIG_MAX_CHANNELS 16U
20#define AB_GP_CONFIG_NAME_MAX_LEN 32U
21#define AB_GP_CONFIG_HOST_MAX_LEN 64U
22
23typedef struct ab_gp_config_channel_s
24{
25 uint32_t id;
27 rte_netlink_role_t role;
29 uint16_t port;
30 uint32_t message_size;
34
50
59
63rte_status_t ab_gp_config_init_defaults(rte_example_site_t site, bool is_role_a, ab_gp_config_t *out_cfg);
64
71rte_status_t ab_gp_config_load_file(const char *filepath, ab_gp_config_t *out_cfg);
72
80rte_status_t ab_gp_config_find_channel(const ab_gp_config_t *cfg, const char *channel_name,
81 rte_netlink_config_t *out_netlink_cfg);
82
90rte_status_t ab_gp_config_find_channel_by_id(const ab_gp_config_t *cfg, uint32_t channel_id,
91 rte_netlink_config_t *out_netlink_cfg);
92
93#endif /* AB_GP_CONFIG_H */
94
rte_status_t ab_gp_config_find_channel_by_id(const ab_gp_config_t *cfg, uint32_t channel_id, rte_netlink_config_t *out_netlink_cfg)
Resolves netlink configuration for a channel by numeric ID from the parsed config.
rte_status_t ab_gp_config_load_file(const char *filepath, ab_gp_config_t *out_cfg)
Parses an INI-style configuration file into the static ab_gp_config_t structure.
rte_status_t ab_gp_config_init_defaults(rte_example_site_t site, bool is_role_a, ab_gp_config_t *out_cfg)
Initializes default configuration in memory based on site and role.
rte_status_t ab_gp_config_find_channel(const ab_gp_config_t *cfg, const char *channel_name, rte_netlink_config_t *out_netlink_cfg)
Resolves netlink configuration for a named channel from the parsed config.
#define AB_GP_CONFIG_MAX_CHANNELS
#define AB_GP_CONFIG_HOST_MAX_LEN
#define AB_GP_CONFIG_NAME_MAX_LEN
West/East site identity and the per-site config derived from it (ports, container host lookup) - see ...
rte_example_site_t
Definition site_config.h:20
char host[AB_GP_CONFIG_HOST_MAX_LEN]
rte_netlink_role_t role
char name[AB_GP_CONFIG_NAME_MAX_LEN]
uint8_t channel_count
ab_gp_config_channel_t channels[AB_GP_CONFIG_MAX_CHANNELS]
ab_gp_config_timers_t timers
rte_example_site_t site
uint32_t checkpoint_relaxed_max_delay_ms
uint32_t dual_transfer_timeout_ms
uint32_t checkpoint_max_delay_ms
uint32_t channel_down_reboot_ms
uint32_t checkpoint_relax_duration_ms
uint32_t reconnect_attempt_timeout_ms
uint32_t checkpoint_reenable_grace_ms