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
com Directory Reference
Directory dependency graph for com:

Files

 
ab_gp_channel.c
 Channel A / channel B com layer using native RTE rte_channel_service.
 
ab_gp_channel.h
 
ab_gp_channel_checkpoint.c
 Checkpoint rte_channel OSAdapter adapter over the A<->B peer link.
 
ab_gp_channel_checkpoint.h
 rte_channel_t OSAdapter for the built-in AppManager checkpoint (ADR-019 addendum, rewired onto rte_voter_t by ADR-025), wrapping the same peer link ab_gp_channel_io.c already uses. A single rte_channel_t is registered into a 1-channel NMR voter (quorum_size == 1) - the "channel" handle rte_channel hands back to these callbacks is a ab_gp_channel_context_t itself (see ab_gp_channel_context_t::checkpoint_channel_handle).
 
ab_gp_channel_crosscompare.c
 A-vs-B cross-compare decision, routed through rte_cross_comparator (ADR-025) - see ab_gp_channel_crosscompare.h.
 
ab_gp_channel_crosscompare.h
 The actual A-vs-B cross-compare decision: does this cycle's own M24/M15 answer match what the peer independently decided? Reads this cycle's inputs from ctx->cyc_* (populated by ab_gp_channel.c's own ab_gp_channel_read_channels()/ ab_gp_channel_read_and_stash_peer_sample()); writes ctx->cyc_agree.
 
ab_gp_channel_dual.c
 This channel's own dual-transfer/role state - see ab_gp_channel_dual.h.
 
ab_gp_channel_dual.h
 Everything related to this channel's own "dual transfer" state: the single-mode degradation reaction when the A<->B peer stops answering at all, and this site's role-byte formatting helper. This site's live ONLINE/STANDBY/FAULTED role itself is now in-memory state (ctx->is_online/ctx->own_faulted), driven by the inter-site negotiate step in ab_gp_channel.c - see that file's own doc. Distinct from (and a legacy, hand-rolled precedent for) safeAPIFreamwork's own rte_dual framework module (ADR-020) - see that module's ADR for the reusable, generalized version of this same idea; this file is application-specific glue that predates it and is not retrofitted to use it in this pass (see ADR-020 section 4's own non-goals).
 
ab_gp_channel_negotiate.c
 This channel's Site Role Client (ADR-040 step 2): the inter-site link, the ONLINE/STANDBY negotiation, partner supervision, takeover handling and warm-standby sync are Platform_RTE's rte_site_role service; this file supplies what is application specific and keeps GP's own entry points (ab_gp_channel_negotiate.h):
 
ab_gp_channel_negotiate.h
 This channel's own West<->East inter-site negotiation link - see ab_gp_channel.c's file header for how this fits into the overall 6-container topology. Ported from the old standalone SITE role (SITE/site.c, now deleted): the same real rte_dual_channel_t + rte_dual_negotiator_t (ADR-020) startup tie-break and live promotion/demotion/deadlock rules, now driven once per A/B cycle (ab_gp_channel_read_channels()) instead of a standalone heartbeat timer, and mutating ctx->is_online/ctx->own_faulted directly instead of a shared NVM role region - see common_config.h's own doc on why no filesystem sharing is assumed between containers.
 
ab_gp_channel_payload.c
 Generic collector registry + AB_SAMPLE framing - see ab_gp_channel_payload.h.
 
ab_gp_channel_payload.h
 Generic, data-blind wire framing for the A<->B peer link's AB_SAMPLE frame (CRC-64-protected, ADR-029) and ab_gp_channel_negotiate.c's own state-transfer extra DATA payload. This file has no knowledge of what any collector's own data represents - each module that owns wire data (today: only AB/GP/train/ab_gp_train.c, via ab_gp_train_init()) registers its own whole-array encode/decode pair with ab_gp_channel_payload_register_collector() below, claiming a fixed byte range in registration order; this file only concatenates those ranges into one buffer and CRC-64-protects the result. Pure codec/framing functions - no ab_gp_channel_context_t, no I/O, no logging beyond the fail-safe cases documented below; see ab_gp_channel_io.c for the actual rte_netlink_send()/_receive() calls that move these bytes.
 
ab_gp_channel_stage.c
 Stage-then-commit output queue - see ab_gp_channel_stage.h.
 
ab_gp_channel_stage.h
 Stage-then-commit output queue for this cycle's own DECISION output (ADR-034): the peer AB_SAMPLE and the train/CTC/IL relay messages built from this cycle's own ma_logic result. Queued via ab_gp_channel_stage_peer()/_stage_relay() instead of sending immediately, then either transmitted (via the real ab_gp_channel_send_peer()/_send_relay()) or discarded once the cycle's own checkpoint rendezvous confirms - or fails to confirm.
 
ab_gp_channel_types.h
 Modular type definitions for AB channel components (Com, Train, DB, Redundancy).
 
ab_gp_channel_util.c
 ab_gp_channel_sleep_ms() - shared bounded-sleep helper used by ab_gp_channel.c (cycle-tick wait), ab_gp_channel_io.c (reconnect retry pacing), and ab_gp_channel_checkpoint.c (reply poll loop).
 
ab_gp_channel_util.h
 Declares ab_gp_channel_sleep_ms() - see ab_gp_channel_types.h's own doc on why this tiny helper gets a dedicated translation unit instead of living inline in the shared types header.
 
ab_gp_config.c
 Zero-dependency, statically-allocated configuration parser for Role A/B.
 
ab_gp_config.h
 Zero-dependency, statically-allocated configuration parser for Role A/B.
 
ab_gp_cycle_ticks.c
 See ab_gp_cycle_ticks.h.
 
ab_gp_cycle_ticks.h
 A/B cycle tick count shared by the cycle timer callback and the cycle thread (ISS-051).
 
ab_gp_jru_forward.c
 See ab_gp_jru_forward.h.
 
ab_gp_jru_forward.h
 A/B -> Gateway log-event forwarding (Platform_Protocol_JRU/CLAUDE.md's "Wiring" section). Installs an rte_osadapter_log_t that delegates every write() to the real local adapter (unchanged local stderr behaviour) and additionally, once a channel is attached, republishes INFO+ events to Gateway over RBC_UTIL_TOPIC_JRU_LOG - Gateway's status service forwards them on to Platform_Protocol_JRU.
 
ab_gp_km114_client.c
 See ab_gp_km114_client.h.
 
ab_gp_km114_client.h
 A/B-side Subset-114 KMC message decoder - step 2 of Platform_Protocol_KM114's "Consumption design" (see that product's own CLAUDE.md). Takes the raw bytes ab_gp_km114_relay.c reassembled from Gateway and does the actual decode/verify/decrypt this entity's own predefined key makes possible - Gateway never sees any of this, only opaque bytes.
 
ab_gp_km114_relay.c
 See ab_gp_km114_relay.h.
 
ab_gp_km114_relay.h
 A/B-side receiver for Gateway-relayed Subset-114 off-line KMC file bytes (RBC_UTIL_TOPIC_KM114_FILE, rbc_util_km114_relay.h). Reassembles the chunked transfer; does NOT decode it - see Platform_Protocol_KM114/CLAUDE.md's "Consumption design" note (actual km114_parse_*() decode/verify/decrypt and key installation is a separate, not-yet-implemented step - this module only gets the raw bytes back together and reports arrival).
 
ab_gp_saf_train.c
 Train link SaF termination in A/B - see ab_gp_saf_train.h.
 
ab_gp_saf_train.h
 Train link safe communication (Subset-037 SaF) terminated inside A and B - REQ-SC-001, REQ-SC-003/004 (root docs/architecture/SAFE_COMM_INTEGRATION.dox, plan step 3).
 
ab_gp_sibling_state.c
 See ab_gp_sibling_state.h.
 
ab_gp_sibling_state.h
 The A/B sibling's last site-state frame (PEER_MSG_KIND_SITE_STATE), kept raw and handed to Platform_RTE's rte_site_role through its sibling source (REQ-SITEROLE-016, ADR-040 step 5b). Pure, no I/O (the ab_gp_standby_policy pattern): the peer-link readers store the frame, the service takes it.
 
ab_gp_site_status.c
 See ab_gp_site_status.h.
 
ab_gp_site_status.h
 The site status monitor: collects, in one struct, the facts that decide and explain this channel's site role.
 
ab_gp_standby_policy.c
 See ab_gp_standby_policy.h.
 
ab_gp_standby_policy.h
 GP-specific standby and site-link constants, the session-adoption rule and the stall rule.
 
ab_gp_startup_timestamp.c
 See ab_gp_startup_timestamp.h.
 
ab_gp_startup_timestamp.h
 The site startup timestamp A and B agree over the A/B peer link (ADR-040 step 5a): the agreement rule and the codec of the PEER_MSG_KIND_STARTUP_TS payload. Pure, no I/O (the ab_gp_standby_policy pattern); the exchange itself is exchange_startup_timestamp() in ab_gp_channel_negotiate.c.
 
ab_gp_status.c
 See ab_gp_status.h.
 
ab_gp_status.h
 ADR-038: this A/B channel's periodic status - a self log line plus a PUBLISH(STATUS) rbc_util_frame_t out on the UTIL relay to the role-C status/broker service.
 
ab_gp_takeover_key.c
 See ab_gp_takeover_key.h.
 
ab_gp_takeover_key.h
 The site's takeover key and the token codec for the dispatcher takeover confirmation (ADR-040 step 4b).