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_types.h
Go to the documentation of this file.
1#ifndef RTE_EXAMPLE_GATEWAY_C_TYPES_H
2#define RTE_EXAMPLE_GATEWAY_C_TYPES_H
3
4
5#ifdef __cplusplus
6extern "C" {
7#endif
12
13#include <stdbool.h>
14#include <stdint.h>
15
16#include "rte/redundancy/channel_service/rte_channel_service.h"
17#include "rte/utils/status/rte_status.h"
18#include "rte/oal/timer/rte_timer.h"
19
21#include "common/site_config.h"
22#include "gateway_c_config.h"
23
30#define GATEWAY_C_PEER_COUNT 2
31
32#define GATEWAY_C_DEDUP_WINDOW_SIZE 32U
33#define GATEWAY_C_DEDUP_EXPIRY_MS 450U
40#define GATEWAY_C_DEDUP_SAF_EXPIRY_MS 3000U
41
42typedef struct
43{
44 uint64_t hash;
45 rte_timestamp_ms_t timestamp_ms;
47
53
57typedef struct gateway_c_context_s
58{
61
62 volatile bool stop_requested;
63
64 rte_timer_storage_t cycle_timer_storage;
65 rte_timer_handle_t cycle_timer_handle;
66 volatile uint32_t cycle_ticks;
67
68 uint32_t cycle;
70
72void gateway_c_sleep_ms(unsigned int ms);
73
74#ifdef __cplusplus
75} /* extern "C" */
76#endif
77
78#endif /* RTE_EXAMPLE_GATEWAY_C_TYPES_H */
Configuration data structures and parser for Role C Gateway (JSON-based).
#define GATEWAY_C_DEDUP_WINDOW_SIZE
void gateway_c_sleep_ms(unsigned int ms)
gateway_c_peer_t
@ GATEWAY_C_PEER_A
@ GATEWAY_C_PEER_B
The RBC Train/IL/CTC scenario's shared wire envelope (ADR-029) - one fixed-size struct/frame reused f...
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
One gateway_c_context_t instance's state.
volatile bool stop_requested
rte_example_site_t site
gateway_c_config_t config
rte_timer_storage_t cycle_timer_storage
rte_timer_handle_t cycle_timer_handle
volatile uint32_t cycle_ticks
uint64_t hash
rte_timestamp_ms_t timestamp_ms
gateway_c_dedup_entry_t entries[GATEWAY_C_DEDUP_WINDOW_SIZE]