|
RTE RBC 2oo2 Reference Application 0.1.0 build 0006685
SIL 4 2oo2 Dual-Site Fault-Tolerant ERTMS Radio Block Centre Reference Architecture
|
RCA/OCORA Concept: Dedicated Cross-Compare Channel
Status:** Implemented (checked 2026-10-07): ab-crosscompare is opened in ab_gp_channel_open_link(), AB_SAMPLE is staged with ab_gp_channel_stage_crosscompare() (AB_GP_STAGE_DEST_CROSSCOMPARE), committed at the checkpoint and read only by ab_gp_channel_poll_crosscompare(). This page is the design record of that change; what is compared, when, and how the result gates outputs is described in the site redundancy and A/B agreement page, section 6.
Scope:** Phase 2b transport isolation
Application:** RBC_GP
Isolate PEER_MSG_KIND_AB_SAMPLE traffic from the multiplexed ab-peer channel without making GP aware of the platform, transport OSAdapter, or Gateway topology.
The application shall use only SCP/Platform_RTE logical channel APIs. Platform and deployment binding shall remain outside GP.
+----------------------------------------------------------—+ | Generic Platform (GP) | | Requests Channel to RTE per RCA Concept | +----------------------------------------------------------—+ | +----------------------------------------------------------—+ | RTE Framework / RTE (Channel Service) | | Selects ProtocolAdapter per channel/flow from config | +----------------------------------------------------------—+ | | v v +----------------------------—+ +------------------------—+ | ProtocolAdapters: | | OSAdapter: | | - ProtocolAdapter UDP | | - OSAdapter POSIX / Linux | | - ProtocolAdapter TCP | | - OSAdapter QNX |
| - ProtocolAdapter DDS | - OSAdapter FreeRTOS | |
|---|---|---|
| Uses OS sockets provided by | Provides OS primitives: | |
| the active OSAdapter to | - Memory & Clocks/Timers | |
| transfer data. | - Threading / Mutexes | |
| - Logging & OS Sockets |
+----------------------------—+ +------------------------—+
flowchart LR
subgraph SCP["SCP logical channels"]
A(("A")) ---|ab-crosscompare| B(("B"))
A ---|ab-peer| B
end
A -.->|inter-site link to the same role on the other site| OTHER["A or B of the other site"]
A -->|ab-relay-*| GW["Gateway"]
B -->|ab-relay-*| GW
ab-crosscompare is an A↔B channel. It is not a Gateway channel.
Existing A/B↔Gateway relay channels remain unchanged:
GP shall not:
GP shall:
The SCP/platform layer shall own:
A POSIX/DDS implementation may provide the binding, but that implementation must remain outside GP.
AB_SAMPLE transmission remains governed by ADR-034.
Required flow:
flowchart TD
PE["post_execute"] --> STAGE["stage AB_SAMPLE in SCP-independent pending-send queue"]
STAGE --> CP{"checkpoint result confirms matching program path"}
CP -->|success| COMMIT["commit through ab-crosscompare"]
CP -->|failure| DISCARD["discard pending cross-compare sample"]
The redesign shall reuse the existing generic staging mechanism:
No second staging queue or duplicate checkpoint discipline shall be created.
AB_SAMPLE shall be received only from ab-crosscompare.
Required changes:
ctx->cyc_peer_sessions population and comparator behavior shall remain unchanged.
The dedicated logical channel shall be:
Failure policy shall match the existing A/B peer-link safety policy. The exact mapping requires confirmation against the current SCP channel-service contract before implementation.
The preferred application-facing interface is logical and osadapter-neutral:
The implementation shall use:
No GP API shall expose hostnames, ports, DDS routes, sockets, or OSAdapter objects.
If the current SCP API cannot bind this logical channel without GP registering OSAdapter routes, the SCP API/osadapter integration must be extended first. GP must not compensate by calling an OSAdapter directly.
SIL/THR claims, channel openness classification, and required EN 50159 measures must be confirmed from the project safety requirements and licensed standard editions before approval.
Before implementation:
After implementation:
This change does not:
Full application transparency remains a separate architectural activity: the SCP would need to own comparison invocation and disagreement handling, with requirements and safety justification established independently.
Implementation may start only after confirming: