|
SafeAPI RBC 2oo2 Generic Application
IL/CTC route and train logic for the safeAPIRBC2oo2 reference RBC
|
| include | |
| ab_siteGA.h | GA's own site data: route composition, built from GP's raw physical elements (railML interlocking <route>) |
| src | |
| AB | |
| ctc | |
| ab_ga_ctc.c | Builds outbound CTC_CONNECTED/CTC_MA_GRANTED/CTC_MA_EXTENDED envelopes, AND the CTC-domain wire codec (ctc_wire_encode() below) - see ab_ga_ctc.h |
| ab_ga_ctc.h | A/B's own outbound messages to CtcRBCSim. Two layers, same split as AB/GP/train/ab_gp_train.h's own "Outbound envelope building" doc: |
| ab_ga_ertms_ctc_codec.h | |
| ab_ga_ertms_ctc_interface.h | |
| ab_ga_ertms_ctc_types.h | |
| il | |
| ab_ga_ertms_il_codec.h | |
| ab_ga_ertms_il_interface.h | |
| ab_ga_ertms_il_types.h | |
| ab_ga_il.c | Interlocking (IL) Generic Application adapter and wire codec |
| ab_ga_il.h | A/B's own route handling against GP's own runtime table (via AB/GP/ga_interface/ga_interface.h - see that file's own doc: this module never #includes any GP submodule header directly) and site/'s static track layout - today's slice: verify a route reported by ILSim against the layout, and add/remove/set-status/assign-train/unassign-train against GP's own route table |
| ab_ga_il_wire.c | See ab_ga_il_wire.h - dedicated IL <-> RBC message codec + validation |
| ab_ga_il_wire.h | Dedicated IL <-> RBC message payloads and codec (wire kinds RBC_MSG_IL_ROUTE_CMD / RBC_MSG_IL_STATUS / RBC_MSG_IL_ROUTE_INDICATION - see rbc_wire_types.h) |
| ab_ga_route_fsm.c | See ab_ga_route_fsm.h |
| ab_ga_route_fsm.h | Per-route state machine, driven by IL route commands (RBC_MSG_IL_ROUTE_CMD / ab_ga_il_route_cmd_t) |
| ma_logic_adaptation | |
| ab_ga_ertms_types.h | |
| ab_ga_ma_logic_adaptation.c | GA's own single entry point (ab_ga_ma_adaptation_init(), declared in ga_interface.h) - see ab_ga_ma_logic_adaptation.h |
| ab_ga_ma_logic_adaptation.h | GA's own single entry point, IMPLEMENTED here - ab_ga_ma_adaptation_init() is DECLARED in AB/GP/ga_interface/ga_interface.h instead (later session, on direct request: every function GP calls into GA with by bare name is declared in GP's own facade header, not GA's - see that header's own "functions GP calls into GA with" section), so this header does not redeclare it - #include "ga_interface.h" below already brings the declaration in, and this .c file's own definition is checked against that one declaration |
| main | |
| ab_ga_dispatch.c | GA's single GP-notification subscriber AND registration point for everything GP calls into GA with - see ab_ga_dispatch.h |
| ab_ga_dispatch.h | GA's single GP-notification subscriber AND registration point for everything GP calls into GA with - interface-simplification pass, on direct instruction: GP used to know about six separate notify types, each with its own registration call site scattered across il.c/ctc.c/ma_logic_adaptation.c; a later pass converted every remaining bare GP->GA call (IL envelope apply, IL/CTC output draining) to a registration too, for the same reason. This module is now the ONLY thing in GA that ever calls ab_gp_db_register_route_context_notify()/ _register_train_context_notify()/_register_il_envelope_handler()/ _register_il_output_producer()/_register_ctc_output_producer() (ga_interface.h) - it registers ONCE, at ab_ga_dispatch_init(), and fans every notification/dispatch out to whichever of GA's own sibling modules (il/ctc) care, via plain internal function calls. GP has zero knowledge that those are separate GA modules |
| C | |
| ctc | |
| gateway_c_ctc_handler.c | See gateway_c_ctc_handler.h |
| gateway_c_ctc_handler.h | CTCHandler - Role C Gateway's TCP/IP server for the single CTC sim instance and its dedicated relay to/from A/B |
| main_c_ctc.c | SafeAPIRBC2oo2: Role C Gateway - CTC service binary (safeapi_gateway_c_ctc). One-way relay of A/B's CTC_CONNECTED/MA_GRANTED/MA_EXTENDED/ALARM indications out to the single CTC observer - see ADR-037 and gateway_c_ctc_handler.c |
| il | |
| gateway_c_il_handler.c | See gateway_c_il_handler.h. ADR-036: one multiplexed IL sim connection + one relay link per peer; frames forwarded verbatim |
| gateway_c_il_handler.h | 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 |
| gateway_c_logctl.c | See gateway_c_logctl.h |
| gateway_c_logctl.h | Role C's runtime log-level control "service": one place from which the whole RBC (A, B and C) can be re-levelled |
| main_c_il.c | SafeAPIRBC2oo2: Role C Gateway - IL service binary (safeapi_gateway_c_il). Relays IL ROUTE_ADD/ROUTE_RELEASE to A/B and TrainPositionInRoute back, and hosts gateway_c_logctl (the runtime log-level fan-out to A/B rides the IL relay) - see ADR-037 and gateway_c_il_handler.c |