diff --git a/.fusa-reqs.json b/.fusa-reqs.json index 970cb4c..533cf5a 100644 --- a/.fusa-reqs.json +++ b/.fusa-reqs.json @@ -852,7 +852,7 @@ { "id": "REQ-RELAY-001", "title": "Protocol enum values are defined and stable", - "description": "relay::Protocol shall define CAN=1, DDS=2, LIN=3, MQTT=4, RCP=5, SOMEIP=6 as stable integer values matching RELAY spec v1.10 §3.", + "description": "relay::Protocol shall define CAN=1, DDS=2, LIN=3, MQTT=4, RCP=5, SOMEIP=6 as stable integer values matching RELAY spec v1.11 §3.", "asil": "ASIL-B", "rationale": "Protocol values are wire-format identifiers; changing them breaks cross-language interop.", "tags": ["relay", "protocol"] @@ -1003,8 +1003,8 @@ }, { "id": "REQ-RELAY-020", - "title": "kSpecVersion constant equals '1.10'", - "description": "relay::kSpecVersion shall be a constexpr const char* equal to '1.10'.", + "title": "kSpecVersion constant equals '1.11'", + "description": "relay::kSpecVersion shall be a constexpr const char* equal to '1.11'.", "asil": "ASIL-B", "rationale": "RELAY §2: spec version constant enables runtime conformance checking.", "tags": ["relay", "version"] diff --git a/CMakeLists.txt b/CMakeLists.txt index 1e6aa4e..e69f502 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -65,7 +65,9 @@ endif() # ── CLI binary ──────────────────────────────────────────────────────────────── option(CPPLIN_BUILD_CLI "Build RELAY convert CLI" ON) -if(CPPLIN_BUILD_CLI) +# RELAY spec v1.11 §17.7: C++ implementations must be buildable via -DRELAY_BUILD_CLI=ON +option(RELAY_BUILD_CLI "Alias for CPPLIN_BUILD_CLI (RELAY spec §17.7)" OFF) +if(CPPLIN_BUILD_CLI OR RELAY_BUILD_CLI) add_subdirectory(cli) endif() diff --git a/HARA.md b/HARA.md index b690af0..05ee1da 100644 --- a/HARA.md +++ b/HARA.md @@ -131,6 +131,6 @@ ASIL-D at system level if required. - ISO 26262:2018 Part 3 — Concept phase - LIN Specification Package Rev 2.2A — Section 2 (Frame structure) -- RELAY Specification v1.10 — §15 (Error handling) +- RELAY Specification v1.11 — §15 (Error handling) - `SEOOC.md` — Assumptions on use - `SAFETY_PLAN.md` — Development process diff --git a/INCIDENT-RESPONSE.md b/INCIDENT-RESPONSE.md index 2218f0b..a0a6367 100644 --- a/INCIDENT-RESPONSE.md +++ b/INCIDENT-RESPONSE.md @@ -125,6 +125,6 @@ For safety-critical (ASIL-B) vulnerabilities, the following additional steps app - **ISO/SAE 21434:2021** §7.4 — Vulnerability management and disclosure - **IEC 62443-4-1:2018** SM-2 — Security management (vulnerability response) - **IEC/TR 62443-2-3:2015** — Patch management for IACS -- **RELAY Spec v1.10** §22 — Security considerations +- **RELAY Spec v1.11** §22 — Security considerations - `SECURITY.md` — Public-facing vulnerability disclosure policy - `SEOOC.md` — Safety Element out of Context assumptions (integrator scope) diff --git a/README.md b/README.md index 845a2e6..f952427 100644 --- a/README.md +++ b/README.md @@ -3,14 +3,14 @@ C++ LIN bus library — RELAY-conformant, ISO 26262 ASIL-B. [![CI](https://github.com/SoundMatt/cpp-LIN/actions/workflows/ci.yml/badge.svg)](https://github.com/SoundMatt/cpp-LIN/actions/workflows/ci.yml) -[![RELAY Conformant](https://img.shields.io/badge/RELAY-v1.10%20conformant-blue)](https://github.com/SoundMatt/RELAY) +[![RELAY Conformant](https://img.shields.io/badge/RELAY-v1.11%20conformant-blue)](https://github.com/SoundMatt/RELAY) [![ASIL-B](https://img.shields.io/badge/ISO%2026262-ASIL--B-orange)](SAFETY_PLAN.md) [![License: MPL 2.0](https://img.shields.io/badge/License-MPL%202.0-brightgreen.svg)](LICENSE) ## Overview cpp-LIN is a production-quality C++ implementation of the LIN (Local Interconnect -Network) protocol, following the RELAY specification v1.10. It is the C++ sibling +Network) protocol, following the RELAY specification v1.11. It is the C++ sibling of [go-LIN](https://github.com/SoundMatt/go-LIN) and is patterned after [cpp-CAN](https://github.com/SoundMatt/cpp-CAN). @@ -49,7 +49,7 @@ ctest --test-dir build --output-on-failure ``` include/lin/ channel.hpp — Chan: bounded, thread-safe FIFO - relay.hpp — RELAY v1.10 types (Protocol, Message, INode, …) + relay.hpp — RELAY v1.11 types (Protocol, Message, INode, …) lin.hpp — IBus, IMasterBus, Frame, Filter, free functions virtual/bus.hpp — In-process virtual LIN bus safety/e2e.hpp — E2E Protector / Receiver @@ -95,7 +95,7 @@ P1 = NOT(ID1 ^ ID3 ^ ID4 ^ ID5) (bit 7) ## RELAY Integration -cpp-LIN exposes a RELAY v1.10 `INode` adapter: +cpp-LIN exposes a RELAY v1.11 `INode` adapter: ```cpp #include diff --git a/ROADMAP.md b/ROADMAP.md index e0787ff..2782728 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -8,7 +8,7 @@ - [x] Master node with schedule table runner (`std::stop_token`) - [x] Slave node with per-ID response registration - [x] E2E safety: Protector and Receiver (CRC-16/CCITT-FALSE, 10-byte header) -- [x] RELAY v1.10 adapter (`relay::INode`) +- [x] RELAY v1.11 adapter (`relay::INode`) - [x] CLI binary (`cpp-lin-cli`) for relay conform/interop - [x] ISO 26262 ASIL-B requirements traceability - [x] CI pipeline: build, test, coverage, sanitizers, RELAY conform, cpfusa diff --git a/SAFETY_MANUAL.md b/SAFETY_MANUAL.md index 11a2031..b1159fb 100644 --- a/SAFETY_MANUAL.md +++ b/SAFETY_MANUAL.md @@ -245,7 +245,7 @@ must ensure: 4. The `id` field in `relay::Message` carries the decimal string representation of the LIN frame ID (e.g., `"16"` for frame 0x10). -See `RELAY Spec v1.10 §8.3` for the complete LIN-over-RELAY envelope specification. +See `RELAY Spec v1.11 §8.3` for the complete LIN-over-RELAY envelope specification. --- @@ -290,4 +290,4 @@ Reproducing from `SEOOC.md` for convenience: - `sas.md` — Software Architecture Specification - ISO 26262:2018 Part 6 §7 — Software integration and verification - ISO 26262:2018 Part 10 §9 — Safety element out of context -- RELAY Specification v1.10 §8.3 — LIN bus binding +- RELAY Specification v1.11 §8.3 — LIN bus binding diff --git a/SAFETY_PLAN.md b/SAFETY_PLAN.md index f8e2b15..c5278b9 100644 --- a/SAFETY_PLAN.md +++ b/SAFETY_PLAN.md @@ -13,7 +13,7 @@ This Safety Plan governs the development of **cpp-LIN**, a C++ software component implementing the LIN (Local Interconnect Network) bus protocol, -conformant to the RELAY specification v1.10. +conformant to the RELAY specification v1.11. cpp-LIN is classified as a **Safety Element out of Context (SEooC)** per ISO 26262-10 §9. It is intended for integration into automotive ECUs and @@ -131,7 +131,7 @@ See [HARA.md](HARA.md). - IEC 61508:2010 — Functional safety of E/E/PE safety-related systems - ISO/SAE 21434:2021 — Road vehicles — Cybersecurity engineering - LIN Specification Package, Revision 2.2A (LIN Consortium) -- RELAY Specification v1.10 (SoundMatt) +- RELAY Specification v1.11 (SoundMatt) - `.fusa-reqs.json` — Machine-readable requirements - `HARA.md` — Hazard Analysis and Risk Assessment - `SEOOC.md` — Safety Element out of Context document diff --git a/SECURITY.md b/SECURITY.md index 51093df..0dfd0d0 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -67,4 +67,4 @@ escalation contacts. - ISO/SAE 21434:2021 §7.4 — Vulnerability management - IEC 62443-4-1:2018 SM-2 — Security management -- RELAY Spec v1.10 §22 — Security considerations +- RELAY Spec v1.11 §22 — Security considerations diff --git a/cli/json.hpp b/cli/json.hpp index ad18916..727b9a5 100644 --- a/cli/json.hpp +++ b/cli/json.hpp @@ -177,7 +177,7 @@ inline std::string version_json() { "\"protocol\":\"LIN\"," "\"protocol_int\":3," "\"version\":\"0.1.0\"," - "\"spec_version\":\"1.10\"," + "\"spec_version\":\"1.11\"," "\"language\":\"cpp\"," "\"runtime\":\"c++17\"" "}"; @@ -191,7 +191,7 @@ inline std::string capabilities_json() { "\"protocol\":\"LIN\"," "\"protocol_int\":3," "\"version\":\"0.1.0\"," - "\"spec_version\":\"1.10\"," + "\"spec_version\":\"1.11\"," "\"commands\":[\"version\",\"capabilities\",\"status\",\"convert\"]," "\"transports\":[\"LIN\"]," "\"features\":[\"ldf\",\"e2e\",\"master\",\"slave\",\"virtual\"]," diff --git a/include/lin/lin.hpp b/include/lin/lin.hpp index 3bea917..1610b1e 100644 --- a/include/lin/lin.hpp +++ b/include/lin/lin.hpp @@ -28,7 +28,7 @@ namespace lin { // ── Spec version ───────────────────────────────────────────────────────────── -inline constexpr const char* kSpecVersion = "1.10"; +inline constexpr const char* kSpecVersion = "1.11"; // ── Constants ───────────────────────────────────────────────────────────────── diff --git a/include/lin/relay.hpp b/include/lin/relay.hpp index 782538a..1b061d0 100644 --- a/include/lin/relay.hpp +++ b/include/lin/relay.hpp @@ -4,7 +4,7 @@ // file, You can obtain one at http://mozilla.org/MPL/2.0/. // relay.hpp — RELAY spec types shared across all protocol implementations. -// Mirrors the RELAY Go package spec v1.10. +// Mirrors the RELAY Go package spec v1.11. #pragma once @@ -24,7 +24,7 @@ namespace relay { // ── Spec version ───────────────────────────────────────────────────────────── // fusa:req REQ-RELAY-020 -inline constexpr const char* kSpecVersion = "1.10"; +inline constexpr const char* kSpecVersion = "1.11"; // ── Protocol ───────────────────────────────────────────────────────────────── diff --git a/requirements/requirements.json b/requirements/requirements.json index 1bd7d8e..03121d6 100644 --- a/requirements/requirements.json +++ b/requirements/requirements.json @@ -5,7 +5,7 @@ "language": "cpp", "standard": "iso26262", "asil": "ASIL-B", - "spec": "RELAY v1.10" + "spec": "RELAY v1.11" }, "requirements": [ {"id": "REQ-LIN-001", "title": "ValidateFrame rejects ID > 0x3F", "asil": "ASIL-B", "tags": ["core", "validation"]}, diff --git a/sas.md b/sas.md index 03459b4..b196940 100644 --- a/sas.md +++ b/sas.md @@ -272,7 +272,7 @@ class Node { - `SubscriberOption` / `SubscriberConfig` / `apply_options()` - `INode`, `ICaller` abstract interfaces - Optional capability interfaces: `IHealthProvider`, `IMetricsProvider`, `IDrainer` -- kSpecVersion constant "1.10" +- kSpecVersion constant "1.11" **Requirements:** REQ-RELAY-001..029, REQ-RELAY-051, REQ-RELAY-056, REQ-RELAY-059 diff --git a/testdata/relay-vectors/errors/lin-diagnostic-wrong-checksum.json b/testdata/relay-vectors/errors/lin-diagnostic-wrong-checksum.json index f85eb51..5895c60 100644 --- a/testdata/relay-vectors/errors/lin-diagnostic-wrong-checksum.json +++ b/testdata/relay-vectors/errors/lin-diagnostic-wrong-checksum.json @@ -7,7 +7,7 @@ "lin.checksum": "99", "lin.checksum_type": "1" }, - "spec_version": "1.10", + "spec_version": "1.11", "expected_error": "ErrInvalidFrame", "error_reason": "diagnostic frames (0x3C/0x3D) must use Classic checksum (type 0)" } diff --git a/testdata/relay-vectors/errors/lin-id-overflow.json b/testdata/relay-vectors/errors/lin-id-overflow.json index b3c75aa..b5e6096 100644 --- a/testdata/relay-vectors/errors/lin-id-overflow.json +++ b/testdata/relay-vectors/errors/lin-id-overflow.json @@ -7,7 +7,7 @@ "lin.checksum": "0", "lin.checksum_type": "1" }, - "spec_version": "1.10", + "spec_version": "1.11", "expected_error": "ErrInvalidFrame", "error_reason": "LIN frame ID must be in range 0x00–0x3F (max 63); 64 overflows the 6-bit field" } diff --git a/testdata/relay-vectors/lin-frame.json b/testdata/relay-vectors/lin-frame.json index b97580b..da4aefd 100644 --- a/testdata/relay-vectors/lin-frame.json +++ b/testdata/relay-vectors/lin-frame.json @@ -7,5 +7,5 @@ "lin.checksum": "73", "lin.checksum_type": "1" }, - "spec_version": "1.10" + "spec_version": "1.11" }