|
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
|
How the RBC_Template workspace approaches safety and quality. It defines the approach, the rules per tier and where the evidence lives. It does not repeat product internals (see each product's docs) or the assessment roadmap (see CERTIFICATION_PLAN.dox).
Status: working plan for one development team. Where a rule is a target rather than something already achieved, this document says so.
| Standard | Used for |
|---|---|
| CENELEC EN 50126 | RAMS life cycle and the structure of the safety case |
| CENELEC EN 50128 | Software (SIL 4 target for vital C code) |
| CENELEC EN 50129 | Safety-related electronic systems; generic product, generic application, specific application |
| CENELEC EN 50159 | Safety-related communication over open transmission systems (safeComm) |
| TSI CCS (2023/1695), UNISIG Subsets 026, 037, 039, 094, 098 | Interoperability requirements the RBC is assessed against |
| MISRA C:2023, MISRA Compliance:2020 | Coding standard for vital C code; deviations recorded per MISRA Compliance |
Out of scope for this plan: hardware safety (the hardware platform), operations and maintenance processes, and safety authority authorisation. They feed the project safety case as inputs.
The safety argument is built in the same tiers as the products (see CERTIFICATION_PLAN.dox section 2.1):
A lower tier never assumes something a higher tier has not stated as an application condition.
| Principle | How it shows up | Where |
|---|---|---|
| The Platform decides, the application declares | Voting, cross-compare and the safe-state transition live in the RTE; applications register a cleanup handler | Platform_RTE ADR-004, ADR-025 |
| Fail safe on disagreement | 2oo2 cross-compare enters the safe state on any mismatch | Platform_RTE, RBC_GP |
| Only one path can grant authority | Movement Authority is granted only through the route-to-train gate | RBC_GP ma_logic |
| Vital and non-vital separation | The vital side verifies everything it receives; gateway and ALE cannot forge a decision | Platform_Protocol_SafeComm ADR-002 |
| Transmission integrity | MAC, sequence numbers and supervision timers (EN 50159) | Platform_Protocol_SafeComm |
| No dynamic memory, static allocation | Enforced by review and by the coding rules | Platform_RTE CLAUDE.md |
| Defined setup phase | Registration is locked after setup | Platform_RTE ADR-026, ADR-032 |
| Redundancy stays a configuration | Topology, replicas, quorum, standby mode are read from a file; the application only declares support | Platform_RTE rte_redundancy_config |
Channels A and B may run on identical CPUs (2oo2 with redundancy on one hardware platform). Mitigations, in decreasing order of what the software can influence:
Compiler diversity mitigates systematic software faults only. It does not replace hardware diversity.
Each generic product publishes its SRAC. The framework's draft is platform/Platform_RTE/docs/SAFETY_APPLICATION_CONDITIONS.dox.
Status today.** That document states the framework is a reference implementation aligned with EN 50128, not a pre-assessed library, and that a project using it must treat it as new software. CERTIFICATION_PLAN.dox describes the target (an assessed generic platform). Both are correct at their own date: until an independent assessment is completed the framework must be treated as unassessed. Keep the two documents in step when the status changes.
| Tier | Products | Language rules | Verification | Review |
|---|---|---|---|---|
| Vital, SIL 4 | Platform_RTE, Platform_OS_POSIX, RBC_GP (A/B), RBC_GA, RBC_SA libraries, safecomm::safety, ::cfm | C99, MISRA C:2023 (mandatory and required), fixed-width types, checked casts, no dynamic memory, -Wall -Wextra -Wpedantic -Wconversion -Wshadow clean | Unit tests in ctest, cppcheck MISRA addon, coverage (gcovr), ASan/UBSan, Valgrind on Linux | Peer review, documented deviations |
| Non-vital C | RBC_GP role C, safecomm::ale, ::config, RBC_Test_CommServer | C99, same conventions, not SIL-rated | Unit tests, warnings as errors | Peer review |
| Tooling | Simulators, test environment, toolchain wiring | Python with pyproject.toml packaging; light conventions | Own tests | Peer review |
Where each rule is enforced today (2026-09-21).** -Wall -Wextra -Wpedantic -Wconversion -Wshadow -Werror: Platform_RTE, Platform_OS_POSIX, Platform_Protocol_SafeComm, RBC_GP and RBC_GA (set -DRTE_WARNINGS_AS_ERRORS=OFF to bring up a new compiler; the local test environment build does this on purpose). A MISRA report exists for Platform_RTE and Platform_Protocol_SafeComm only; RBC_GP, RBC_GA and Platform_OS_POSIX have none yet. CI is .github/workflows/build-test.yml at the workspace root (needs the SUBMODULES_TOKEN secret). Open items: ../../safety_quality/REVIEW_2026-09-21.dox.
MISRA findings that are real defects (uninitialised variables, scope) are fixed. Rules accepted as deviations are recorded per product in its MISRA report with a justification. They are never silenced without an entry.
| Level | What | Where |
|---|---|---|
| Unit | Per-module tests, mocks one layer down | each product's tests/, run by ctest |
| Integration | Multi-process reference RBC, live WEST/EAST failover and cross-compare fault injection | application/RBC_GP smoke script |
| System | 11-container Docker stack driven by Robot Framework, plus fault injection | test/RBC_Test_Env |
| Static | cppcheck with the MISRA addon, compiler warnings as errors | each C product |
| Coverage | Line, function and branch coverage; the framework requirement is 100%, target MC/DC for safeComm | platform/Platform_RTE/docs/COVERAGE_REPORT.dox |
| Cross-toolchain | Native macOS, Linux glibc and musl on several architectures, Docker multi-platform | test/RBC_Test_Env build scripts, platform/toolchains/ |
A change is complete only when the affected product builds warnings-clean, its ctest passes, static analysis shows no new findings and, for the RBC, the smoke scenarios pass (core and failover).
Evidence is reused only if the boundaries between products are stable. The safety-relevant interfaces are the entries of the catalog in ../architecture/ARCHITECTURE.md section 4. Rules:
| Evidence | Location |
|---|---|
| Framework SRS | platform/Platform_RTE/docs/requirements/SRS.dox |
| EN 50128 alignment | platform/Platform_RTE/docs/EN_50128_ALIGNMENT.dox |
| Application conditions (draft) | platform/Platform_RTE/docs/SAFETY_APPLICATION_CONDITIONS.dox |
| CCF analysis | platform/Platform_RTE/docs/safety/CCF_ANALYSIS.dox |
| MISRA report, coverage report | platform/Platform_RTE/docs/ |
| Safety plan, CM plan, HARA, review and safety-case templates | platform/Platform_RTE/docs/templates/ |
| Safe communication SRS, subset mapping, ADRs | platform/protocol_adapters/Platform_Protocol_SafeComm/docs/ |
| Interface control documents (train, IL, CTC) | application/RBC_GP/interfaces/ |
| Assessment roadmap | CERTIFICATION_PLAN.dox |
| Open defects and planned work | ../../ISSUES.dox, ../../TODO.dox |