|
SafeAPI RBC 2oo2 Generic Application
IL/CTC route and train logic for the safeAPIRBC2oo2 reference RBC
|
ILHandler - Role C Gateway's TCP/IP server for the ONE multiplexed IL sim connection and the ONE dedicated relay link to/from each of A and B (ADR-036). Every train's ROUTE_ADD / ROUTE_RELEASE rides these single links, demuxed by the envelope's train_id in A/B; this handler forwards frames verbatim. More...
#include "gateway_c_types.h"Go to the source code of this file.
Data Structures | |
| struct | gateway_c_il_handler_state_t |
Functions | |
| sapi_status_t | gateway_c_il_handler_init (gateway_c_context_t *ctx) |
| void | gateway_c_il_handler_execute (gateway_c_context_t *ctx, uint32_t cycle) |
| void | gateway_c_il_handler_shutdown (void) |
| bool | gateway_c_il_handler_check_link_down (sapi_timestamp_ms_t threshold_ms, sapi_timestamp_ms_t now_ms, char *out_which, size_t which_size) |
| 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.c to fan a diagnostic RBC_MSG_SET_LOG_LEVEL control frame out to the pair; the IL link is the one C<->AB link A/B always poll from C (Train is bidirectional, CTC is AB->C only). Best-effort: a send error is logged, not returned. | |
ILHandler - Role C Gateway's TCP/IP server for the ONE multiplexed IL sim connection and the ONE dedicated relay link to/from each of A and B (ADR-036). Every train's ROUTE_ADD / ROUTE_RELEASE rides these single links, demuxed by the envelope's train_id in A/B; this handler forwards frames verbatim.
Definition in file 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.c to fan a diagnostic RBC_MSG_SET_LOG_LEVEL control frame out to the pair; the IL link is the one C<->AB link A/B always poll from C (Train is bidirectional, CTC is AB->C only). Best-effort: a send error is logged, not returned.
Definition at line 34 of file gateway_c_il_handler.c.
| bool gateway_c_il_handler_check_link_down | ( | sapi_timestamp_ms_t | threshold_ms, |
| sapi_timestamp_ms_t | now_ms, | ||
| char * | out_which, | ||
| size_t | which_size ) |
Definition at line 215 of file gateway_c_il_handler.c.
| void gateway_c_il_handler_execute | ( | gateway_c_context_t * | ctx, |
| uint32_t | cycle ) |
Definition at line 102 of file gateway_c_il_handler.c.
| sapi_status_t gateway_c_il_handler_init | ( | gateway_c_context_t * | ctx | ) |
Definition at line 40 of file gateway_c_il_handler.c.
| void gateway_c_il_handler_shutdown | ( | void | ) |
Definition at line 208 of file gateway_c_il_handler.c.