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_train_handler.h
Go to the documentation of this file.
1#ifndef RTE_EXAMPLE_GATEWAY_C_TRAIN_HANDLER_H
2#define RTE_EXAMPLE_GATEWAY_C_TRAIN_HANDLER_H
3
13
14#include "gateway_c_types.h"
15
16typedef struct
17{
18 /* --- TrainSim-facing (one multiplexed channel) --- */
19 rte_channel_service_t sim_channel;
20
21 /* --- A/B-facing (one dedicated relay channel per peer) --- */
22 rte_channel_service_t relay_channel[GATEWAY_C_PEER_COUNT];
27 unsigned int a_stale_cycles;
28 const char *last_known_tag;
31
35bool gateway_c_train_handler_check_link_down(rte_timestamp_ms_t threshold_ms, rte_timestamp_ms_t now_ms,
36 char *out_which, size_t which_size);
37
38#endif /* RTE_EXAMPLE_GATEWAY_C_TRAIN_HANDLER_H */
void gateway_c_train_handler_shutdown(void)
bool gateway_c_train_handler_check_link_down(rte_timestamp_ms_t threshold_ms, rte_timestamp_ms_t now_ms, char *out_which, size_t which_size)
rte_status_t gateway_c_train_handler_init(gateway_c_context_t *ctx)
void gateway_c_train_handler_execute(gateway_c_context_t *ctx, uint32_t cycle)
Shared wire-format constants and gateway_c_context_t.
#define GATEWAY_C_PEER_COUNT
One gateway_c_context_t instance's state.
rte_channel_service_t relay_channel[GATEWAY_C_PEER_COUNT]
rte_timestamp_ms_t relay_down_since_ms[GATEWAY_C_PEER_COUNT]
rte_timestamp_ms_t send_down_since_ms[GATEWAY_C_PEER_COUNT]