Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .fusa-reqs.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down Expand Up @@ -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"]
Expand Down
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down
2 changes: 1 addition & 1 deletion HARA.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion INCIDENT-RESPONSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).

Expand Down Expand Up @@ -49,7 +49,7 @@ ctest --test-dir build --output-on-failure
```
include/lin/
channel.hpp — Chan<T>: 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
Expand Down Expand Up @@ -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 <lin/lin.hpp>
Expand Down
2 changes: 1 addition & 1 deletion ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions SAFETY_MANUAL.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

---

Expand Down Expand Up @@ -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
4 changes: 2 additions & 2 deletions SAFETY_PLAN.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
2 changes: 1 addition & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions cli/json.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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\""
"}";
Expand All @@ -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\"],"
Expand Down
2 changes: 1 addition & 1 deletion include/lin/lin.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ namespace lin {

// ── Spec version ─────────────────────────────────────────────────────────────

inline constexpr const char* kSpecVersion = "1.10";
inline constexpr const char* kSpecVersion = "1.11";

// ── Constants ─────────────────────────────────────────────────────────────────

Expand Down
4 changes: 2 additions & 2 deletions include/lin/relay.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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 ─────────────────────────────────────────────────────────────────

Expand Down
2 changes: 1 addition & 1 deletion requirements/requirements.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"]},
Expand Down
2 changes: 1 addition & 1 deletion sas.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)"
}
2 changes: 1 addition & 1 deletion testdata/relay-vectors/errors/lin-id-overflow.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
2 changes: 1 addition & 1 deletion testdata/relay-vectors/lin-frame.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
"lin.checksum": "73",
"lin.checksum_type": "1"
},
"spec_version": "1.10"
"spec_version": "1.11"
}
Loading