SafeAPI RBC 2oo2 Generic Application
IL/CTC route and train logic for the safeAPIRBC2oo2 reference RBC
Toggle main menu visibility
Loading...
Searching...
No Matches
gateway_c_ctc_handler.h
Go to the documentation of this file.
1
#ifndef SAFEAPI_EXAMPLE_GATEWAY_C_CTC_HANDLER_H
2
#define SAFEAPI_EXAMPLE_GATEWAY_C_CTC_HANDLER_H
3
9
10
#include "gateway_c_types.h"
11
12
typedef
struct
13
{
14
/* --- CTCSim-facing (one channel) --- */
15
sapi_channel_service_t sim_channel;
16
17
/* --- A/B-facing (one dedicated relay channel per peer) --- */
18
sapi_channel_service_t relay_channel[GATEWAY_C_PEER_COUNT];
19
uint8_t relay_consecutive_timeout;
/* peer A only */
20
sapi_timestamp_ms_t relay_down_since_ms[GATEWAY_C_PEER_COUNT];
21
uint32_t a_seen_this_cycle;
22
unsigned
int
a_stale_cycles;
23
const
char
*last_known_tag;
24
}
gateway_c_ctc_handler_state_t
;
25
26
sapi_status_t gateway_c_ctc_handler_init(gateway_c_context_t *ctx);
27
void
gateway_c_ctc_handler_execute(gateway_c_context_t *ctx, uint32_t cycle);
28
void
gateway_c_ctc_handler_shutdown(
void
);
29
bool
gateway_c_ctc_handler_check_link_down(sapi_timestamp_ms_t threshold_ms, sapi_timestamp_ms_t now_ms,
30
char
*out_which,
size_t
which_size);
31
32
#endif
/* SAFEAPI_EXAMPLE_GATEWAY_C_CTC_HANDLER_H */
gateway_c_ctc_handler_state_t
Definition
gateway_c_ctc_handler.h:13
src
C
ctc
gateway_c_ctc_handler.h
Generated by
1.18.0