|
RBC_Template 0.1.0 build 5fb9afb
Workspace master specification — safety-related railway software around an ERTMS Radio Block Centre (RBC), CENELEC EN 50128 / SIL 4
|
Companion to Capella-Setup-Guide.dox and model_spec.json. Lists what to model in each Capella project. Names of modules, stages and files come from the repository; missions and capabilities are modelling judgements (they cannot be extracted from code), so treat them as a draft to review.
Where each item lives in Arcadia:
| Item | Layer | Capella location |
|---|---|---|
| Mission | System Analysis | Missions & Capabilities > Missions |
| Capability | System Analysis | Missions & Capabilities > Capabilities |
| System function | System Analysis | System Functions (black box: what the system does for its actors) |
| Logical function | Logical Architecture | Logical Functions, allocated to a Logical Component |
Rule used below: a system function is stated from the actor's point of view. A logical function is one internal step, and it is allocated to exactly one logical component from model_spec.json.
Status legend: [code] exists and is tested; [stub] exists as a stub; [planned] skeleton or not started. Do not model planned items as if they were implemented.
System of interest: Safe Computing Platform. Actors: Functional Actor (the application), Integrator (supplies OSAdapters and capability/state declarations), Peer Channel (the other redundant channel), Operating System / Hardware.
| Id | Capability | Serves | Status |
|---|---|---|---|
| C1 | Run a cyclic application in ordered stages | M1 | [code] |
| C2 | Exchange data over named Flows | M1, M4 | [code] POSIX/netlink, [stub] DDS |
| C3 | Vote or cross-compare replica outputs | M2, M3 | [code] 2-way, N-way voter without mesh |
| C4 | Commit or discard staged output at a checkpoint | M2, M3 | [code] |
| C5 | Negotiate site role and transfer state on promotion | M2 | [code] |
| C6 | Load a redundancy topology and check the application supports it | M2 | [code] |
| C7 | Enter the safe state | M3 | [code] |
| C8 | Provide OS services through the OAL | M4 | [code] |
| C9 | Protect data and timing integrity (checksum, safe channel, watchdog, clock sync) | M3 | [code] |
| Logical component | Logical functions |
|---|---|
| App Manager | Run stage list in order; run on_checkpoint_result hook; schedule cycle period |
| Safe-state Manager | Register cleanup handler; latch transition request; execute SAFE/REBOOT |
| Channel Link | Track link health; count consecutive failures; expose up/down |
| Channel Service | Resolve channel name to OSAdapter; set up channel; read; send; close |
| Voter | Collect N inputs; compute majority; compare against quorum; report result |
| Cross-Comparator | Compare two channels or two buffers; return result and agreed output |
| Checkpoint | Exchange checkpoint request and reply; commit staged sends; discard staged sends |
| Dual Negotiator | Send negotiation frame; decide role; detect peer loss; promote on failure |
| Flow | Bind name to OSAdapter route; open endpoint by flags; move messages |
| Redundancy Config | Parse JSON; validate topology and quorum; call capability callback; apply to voter |
| State Transfer | Register field; compute encoded size; encode all fields; decode all fields |
| OAL Services | One function per service seam (timer, nvm, memory, task, netlink, ipc, reboot, platform, log, watchdog, mutex, clocksync) |
| POSIX OSAdapter | Implement each OAL vtable on POSIX |
| Flow DDS OSAdapter (stub) | Implement the Flow vtable over netlink; no DDS wire protocol |
Not yet real (do not model as capabilities): platform-controlled invocation cadence needed for true hot standby; N-way mesh channel registration; real DDS.
System of interest: Safe Communication stack (Subset-037 EuroRadio, Subset-098 RBC-RBC). Actors: Train EVC, Peer RBC, RBC application, Transport/Bearer, Key/Config provider. Status (2026-09): partly implemented. config, mac (3DES CBC-MAC with test vectors), saf (SaF handshake), ale and the protocol adapter binding exist and pass their tests (5/5 ctest); cfm, euroradio, rbc_rbc and transport are still skeletons returning SAFECOMM_STATUS_NOT_IMPLEMENTED. Tag modelled items status = implemented or status = planned accordingly.
| Id | Capability | Status |
|---|---|---|
| C1 | Establish an authenticated session (AU1/AU2/AU3) | [code] SaF handshake, tested |
| C2 | Protect each message (3DES CBC-MAC) and detect replay/loss by sequence number | [code] MAC vectors tested |
| C3 | Supervise the session | [planned] |
| C4 | Manage the bearer and present whole PDUs upward | [planned] |
| C5 | Relay raw traffic to both channels A and B | [code] ALE tested |
| C6 | Load per-node configuration and refuse to start on a bad value | [code] |
| Logical component | Logical functions |
|---|---|
| Safety Functional Module (SFM) | Run AU1/AU2/AU3 handshake; compute and verify MAC; number and check sequence; supervise timers |
| Communication Functional Module (CFM) | Manage bearer connection; frame and deframe PDUs; hide bearer jitter from the cross-compare |
| Application Layer Entity (ALE) | Listen externally; map peer to route; relay raw bytes to A and B |
| Config | Parse key = value; validate syntax; hand values to components |
System of interest: RBC Generic Platform (the executable that hosts the RBC logic). Actors: Train (through the role-C gateway), Interlocking (IL), CTC, GA (Generic Application), Peer channel and Peer site, Safe Computing Platform.
| Id | Capability | Serves | Status |
|---|---|---|---|
| C1 | Manage train sessions and train data | M1 | [code] |
| C2 | Grant, extend and shrink Movement Authority | M1, M3 | [code] |
| C3 | Track train position | M1 | [code] |
| C4 | Handle emergency stop, end of mission, TSR, shunting, handover, text message | M1 | [code] |
| C5 | Cross-compare channels A and B every online cycle | M1 | [code] |
| C6 | Commit or discard staged outputs at checkpoint (ADR-034) | M1 | [code] |
| C7 | Negotiate site role and transfer sessions and database on promotion | M2 | [code] |
| C8 | Relay to and from the gateway (train, IL, CTC, util) | M1 | [code] |
| C9 | Expose route and train context to GA and accept validated setters | M3 | [code] |
| Logical component | Logical functions |
|---|---|
| Communication Layer | Send and receive on ab-peer; run ab-negotiate; relay on ab-relay-train/il/ctc/util; demultiplex peer frames by kind (sample, site state, checkpoint request/reply); stage peer and relay sends |
| Cross-Compare Stage | Encode local and peer payload; run comparison; on disagreement run fault cleanup and enter safe state |
| Checkpoint Stage | Request and reply checkpoint; commit or discard staged sends; cache samples drained during the reply |
| ERTMS Procedures Engine | Dispatch message to procedure; run session FSM; train data; MA; position; shunting; emergency stop; end of mission; TSR; handover; text message |
| Route/Train Database | Store and look up routes; store and look up per-train sessions; snapshot for state transfer |
| MA Logic Gate | Match route to train by reported position; permit or refuse MA; notify GA of context change |
The GP-to-GA seam is the interface GA Interface (ga_interface.h), not a function: model it as an interface between two components, with the GP side providing and the GA side requiring.
Known limit: GP is still redundancy-aware in its cross-compare and staging (Phase 2b partial). Model the cross-compare and checkpoint stages as GP logical functions, not as Platform functions, so the model does not claim more than the code does.
System of interest: RBC Generic Application (IL and CTC adaptation logic). Actors: GP, Interlocking, CTC. Everything tagged project_specific is replaced in each project.
| Id | Capability | Serves | Status |
|---|---|---|---|
| C1 | Track route add and release from the interlocking | M1 | [code] |
| C2 | Grant or shrink MA when GP connects or disconnects a train to a route | M1 | [code] |
| C3 | Report train connected, MA granted/extended, and train info to CTC | M2 | [code] |
| C4 | Register callbacks with GP through one init call | M3 | [code] |
| C5 | Provide a route-only projection of the site data | M1, M3 | [code], project-specific |
| Logical component | Logical functions |
|---|---|
| IL Adapter | Track route set/release; on GP context change compute MA; request grant or shrink |
| CTC Adapter | Build train-connected, MA-granted, MA-extended and CTC_TRAIN_INFO indications |
| MA Logic Adaptation | Provide ab_ga_ma_adaptation_init; store the GP interface pointer; register GA callbacks with GP |
| Site Projection | Answer route queries from the route-only projection (project_specific) |
Note: the source tree also has src/C/il and src/C/ctc; these are the role-C stand-ins for the rest of the ERTMS system, not part of the vital GA. Keep them out of the template model or model them as a separate "test environment" component.
System of interest: RBC for the Polish market, one system built from the library products. This project owns almost no functions of its own. It references the four libraries and allocates their functions to project components.
Reference, do not copy, the capabilities of the four libraries. Add only project capabilities:
| From | To |
|---|---|
| PKP mission M2 | Framework C3, C4, C5, C6 and GP C5, C6, C7 |
| PKP mission M1 | GP C1..C4 and GA C1..C3 |
| PKP mission M3 | Compatibility table in compatibility.md and CCF notes in Setup Guide §6 |
p4c_build_model.py creates only Logical Components and Interfaces. It does not create missions, capabilities, functions, exchanges or diagrams. I have not verified that the simplified Python4Capella API exposes creation of those elements; if you want them scripted, add them to model_spec.json first and I will check the API against upstream before writing code.