RTE RBC 2oo2 Generic Application 0.1.0 build 308eda7
IL/CTC route and train logic for the RBC_GP reference RBC
Loading...
Searching...
No Matches
gateway_c_il_handler.h
Go to the documentation of this file.
1#ifndef RTE_EXAMPLE_GATEWAY_C_IL_HANDLER_H
2#define RTE_EXAMPLE_GATEWAY_C_IL_HANDLER_H
3
13
14#include "gateway_c_types.h"
15
16typedef struct
17{
18 /* --- ILSim-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];
23 uint8_t relay_consecutive_timeout;
24 rte_timestamp_ms_t relay_down_since_ms[GATEWAY_C_PEER_COUNT];
25 rte_timestamp_ms_t send_down_since_ms[GATEWAY_C_PEER_COUNT];
26 uint32_t a_seen_this_cycle;
27 unsigned int a_stale_cycles;
28 const char *last_known_tag;
29 gateway_c_dedup_t dedup;
31
32rte_status_t gateway_c_il_handler_init(gateway_c_context_t *ctx);
33void gateway_c_il_handler_execute(gateway_c_context_t *ctx, uint32_t cycle);
34void gateway_c_il_handler_shutdown(void);
35bool gateway_c_il_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
46void gateway_c_il_handler_broadcast_to_ab(const uint8_t bytes[RBC_ENVELOPE_WIRE_SIZE]);
47
48#endif /* RTE_EXAMPLE_GATEWAY_C_IL_HANDLER_H */
void gateway_c_il_handler_broadcast_to_ab(const uint8_t bytes[RBC_ENVELOPE_WIRE_SIZE])
Sends one RBC_ENVELOPE_WIRE_SIZE frame to BOTH A and B on the IL relay link. Used by gateway_c_logctl...
rte_timestamp_ms_t send_down_since_ms[GATEWAY_C_PEER_COUNT]