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
gateway_c_config.h
Go to the documentation of this file.
1#ifndef GATEWAY_C_CONFIG_H
2#define GATEWAY_C_CONFIG_H
3
4
5#ifdef __cplusplus
6extern "C" {
7#endif
12
13#include <stdbool.h>
14#include <stdint.h>
15#include "rte/oal/netlink/rte_netlink.h"
16#include "rte/utils/status/rte_status.h"
17#include "common/site_config.h"
18
19#define GATEWAY_C_MAX_CHANNELS 32U
20
21typedef struct gateway_c_config_timers_s
22{
28
29typedef struct gateway_c_config_channel_s
30{
31 uint32_t id;
32 char name[32];
33 rte_netlink_role_t role;
34 char host[64];
35 uint16_t port;
36 uint32_t message_size;
40 uint32_t rcvbuf_bytes;
42 uint32_t sndbuf_bytes;
45
53
55rte_status_t gateway_c_config_load_file(const char *filepath, gateway_c_config_t *out_cfg);
56rte_status_t gateway_c_config_find_channel(const gateway_c_config_t *cfg, const char *channel_name,
57 rte_netlink_config_t *out_netlink_cfg);
58rte_status_t gateway_c_config_find_channel_by_id(const gateway_c_config_t *cfg, uint32_t channel_id,
59 rte_netlink_config_t *out_netlink_cfg);
60
61#ifdef __cplusplus
62} /* extern "C" */
63#endif
64
65#endif /* GATEWAY_C_CONFIG_H */
rte_status_t gateway_c_config_find_channel(const gateway_c_config_t *cfg, const char *channel_name, rte_netlink_config_t *out_netlink_cfg)
rte_status_t gateway_c_config_init_defaults(rte_example_site_t site, gateway_c_config_t *out_cfg)
rte_status_t gateway_c_config_find_channel_by_id(const gateway_c_config_t *cfg, uint32_t channel_id, rte_netlink_config_t *out_netlink_cfg)
rte_status_t gateway_c_config_load_file(const char *filepath, gateway_c_config_t *out_cfg)
#define GATEWAY_C_MAX_CHANNELS
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
gateway_c_config_timers_t timers
rte_example_site_t site
gateway_c_config_channel_t channels[GATEWAY_C_MAX_CHANNELS]