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_common.h
Go to the documentation of this file.
1#ifndef RTE_EXAMPLE_GATEWAY_C_COMMON_H
2#define RTE_EXAMPLE_GATEWAY_C_COMMON_H
3
4
5#ifdef __cplusplus
6extern "C" {
7#endif
22
23#include "rte/app/appmanager/rte_appmanager.h"
24#include "rte/oal/timer/rte_timer.h"
25#include "rte/utils/status/rte_status.h"
26
27#include "common/site_config.h"
28#include "gateway_c_types.h"
29
35typedef struct gateway_c_service_def_s
36{
39 const char *app_name;
41 const char *log_tag;
42
45 rte_status_t (*handler_init)(gateway_c_context_t *ctx);
46 void (*handler_execute)(gateway_c_context_t *ctx, uint32_t cycle);
47 void (*handler_shutdown)(void);
48 bool (*handler_check_link_down)(rte_timestamp_ms_t threshold_ms, rte_timestamp_ms_t now_ms,
49 char *out_which, size_t which_size);
50
54
59 const char *broker_channel;
69
81int gateway_c_main(int argc, char **argv, const gateway_c_service_def_t *svc);
82
87
93bool gateway_c_dedup_check_and_record(gateway_c_dedup_t *dedup, const uint8_t *bytes, size_t size);
94
95#ifdef __cplusplus
96} /* extern "C" */
97#endif
98
99#endif /* RTE_EXAMPLE_GATEWAY_C_COMMON_H */
int gateway_c_main(int argc, char **argv, const gateway_c_service_def_t *svc)
Full process entry for a Role C gateway service: prints the version banner, parses argv[1] as {WEST|E...
void gateway_c_dedup_init(gateway_c_dedup_t *dedup)
Initialize a first-arrival deduplication tracker.
bool gateway_c_dedup_check_and_record(gateway_c_dedup_t *dedup, const uint8_t *bytes, size_t size)
Check if bytes was already forwarded within the expiry window. If not seen, records bytes with curren...
Shared wire-format constants and gateway_c_context_t.
West/East site identity and the per-site config derived from it (ports, container host lookup) - see ...
One gateway_c_context_t instance's state.
One gateway service's identity and its single handler's entry points - a pure-literal table each main...
bool(*) handler_check_link_down(rte_timestamp_ms_t threshold_ms, rte_timestamp_ms_t now_ms, char *out_which, size_t which_size)
void(*) handler_execute(gateway_c_context_t *ctx, uint32_t cycle)
void(*) pre_execute_hook(gateway_c_context_t *ctx)
rte_status_t(*) handler_init(gateway_c_context_t *ctx)
void(*) idle_hook(gateway_c_context_t *ctx)