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
4 changes: 2 additions & 2 deletions .fusa-evidence.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,9 @@
{
"id": "EV-011",
"type": "relay_conformance",
"description": "RELAY v1.10 conformance — all sub-tests PASS, LIN golden vectors EQUIVALENT",
"description": "RELAY v1.11 conformance — all sub-tests PASS, LIN golden vectors EQUIVALENT",
"artefact": "CI console output, conformance job",
"standard_ref": "RELAY spec v1.10 §20.1",
"standard_ref": "RELAY spec v1.11 §20.1",
"status": "current",
"generated_by": "relay conform ./target/release/rust-lin --strict"
},
Expand Down
18 changes: 9 additions & 9 deletions .fusa-reqs.json
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@
"title": "NoResponse returned when no slave response registered",
"description": "send_header returns Error::NoResponse when no response is registered for the requested id",
"asil": "ASIL-B",
"rationale": "RELAY spec v1.10 \u00a75.1: send_header returns Error::NoResponse when no response is re",
"rationale": "RELAY spec v1.11 \u00a75.1: send_header returns Error::NoResponse when no response is re",
"tags": [
"lin"
]
Expand Down Expand Up @@ -186,7 +186,7 @@
"title": "to_message sets protocol = 3",
"description": "RELAY adapter to_message must set Message::protocol = Protocol::Lin (3)",
"asil": "ASIL-B",
"rationale": "RELAY spec v1.10 \u00a73.2: RELAY adapter to_message must set Message::protocol = Protoc",
"rationale": "RELAY spec v1.11 \u00a73.2: RELAY adapter to_message must set Message::protocol = Protoc",
"tags": [
"lin"
]
Expand All @@ -196,7 +196,7 @@
"title": "from_message rejects wrong protocol",
"description": "RELAY adapter from_message returns Err(InvalidFrame) when Message::protocol != Lin",
"asil": "ASIL-B",
"rationale": "RELAY spec v1.10 \u00a73.2: RELAY adapter from_message returns Err(InvalidFrame) when Me",
"rationale": "RELAY spec v1.11 \u00a73.2: RELAY adapter from_message returns Err(InvalidFrame) when Me",
"tags": [
"lin"
]
Expand All @@ -206,7 +206,7 @@
"title": "NoResponse kind maps to Timeout",
"description": "Error::NoResponse::kind() must return relay::Error::Timeout (ErrNoResponse IS Timeout)",
"asil": "ASIL-B",
"rationale": "RELAY spec v1.10 \u00a75.1: Error::NoResponse::kind() must return relay::Error::Timeout ",
"rationale": "RELAY spec v1.11 \u00a75.1: Error::NoResponse::kind() must return relay::Error::Timeout ",
"tags": [
"lin"
]
Expand Down Expand Up @@ -936,7 +936,7 @@
"title": "Adapt returns a LIN relay::Node",
"description": "adapt() wraps a Bus and returns a Box<dyn relay::Node> with Protocol::Lin",
"asil": "QM",
"rationale": "RELAY spec v1.10 \u00a710.3: adapt() wraps a Bus and returns a Box<dyn relay::Node> with ",
"rationale": "RELAY spec v1.11 \u00a710.3: adapt() wraps a Bus and returns a Box<dyn relay::Node> with ",
"tags": [
"adapt"
]
Expand All @@ -946,7 +946,7 @@
"title": "LinAdapter::send publishes payload for a valid frame ID",
"description": "relay::Node::send calls Bus::publish with the parsed frame ID and payload",
"asil": "QM",
"rationale": "RELAY spec v1.10 \u00a710.3: relay::Node::send calls Bus::publish with the parsed frame I",
"rationale": "RELAY spec v1.11 \u00a710.3: relay::Node::send calls Bus::publish with the parsed frame I",
"tags": [
"adapt"
]
Expand All @@ -956,7 +956,7 @@
"title": "LinAdapter::send rejects an out-of-range frame ID",
"description": "relay::Node::send returns relay::Error on non-numeric or out-of-range Message::id",
"asil": "QM",
"rationale": "RELAY spec v1.10 \u00a710.3: relay::Node::send returns relay::Error on non-numeric or out",
"rationale": "RELAY spec v1.11 \u00a710.3: relay::Node::send returns relay::Error on non-numeric or out",
"tags": [
"adapt"
]
Expand All @@ -966,7 +966,7 @@
"title": "LinAdapter::subscribe converts frames to relay::Message",
"description": "relay::Node::subscribe returns a channel of relay::Message envelopes with Protocol::Lin and correct meta fields",
"asil": "QM",
"rationale": "RELAY spec v1.10 \u00a710.3: relay::Node::subscribe returns a channel of relay::Message e",
"rationale": "RELAY spec v1.11 \u00a710.3: relay::Node::subscribe returns a channel of relay::Message e",
"tags": [
"adapt"
]
Expand All @@ -976,7 +976,7 @@
"title": "LinAdapter::close closes the underlying bus",
"description": "relay::Node::close delegates to Bus::close",
"asil": "QM",
"rationale": "RELAY spec v1.10 \u00a710.3: relay::Node::close delegates to Bus::close",
"rationale": "RELAY spec v1.11 \u00a710.3: relay::Node::close delegates to Bus::close",
"tags": [
"adapt"
]
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ jobs:
d = json.load(sys.stdin)
assert d['tool'] == 'rust-lin', f'bad tool: {d}'
assert d['protocol'] == 'LIN', f'bad protocol: {d}'
assert d['spec_version'] == '1.10', f'bad spec_version: {d}'
assert d['spec_version'] == '1.11', f'bad spec_version: {d}'
print('version JSON OK')
"
./target/release/rust-lin capabilities | python3 -c "
Expand Down Expand Up @@ -251,7 +251,7 @@ jobs:
run: cargo build --release --bin rust-lin --locked

- name: Install relay
run: go install github.com/SoundMatt/RELAY/cmd/relay@v1.10.0
run: go install github.com/SoundMatt/RELAY/cmd/relay@v1.11.0

- name: RELAY conformance (strict)
run: relay conform ./target/release/rust-lin --strict
Expand Down
4 changes: 2 additions & 2 deletions ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## Overview

rust-LIN is an ASIL-B Rust library for LIN bus communication. It implements
the RELAY v1.10 protocol adapter contract for LIN (Protocol::Lin = 3).
the RELAY v1.11 protocol adapter contract for LIN (Protocol::Lin = 3).
The library is a Safety Element Out Of Context (SEOOC) per ISO 26262-10:2018 §9.

```
Expand Down Expand Up @@ -48,7 +48,7 @@ Public surface. Re-exports all stable types and the `RELAY_SPEC_VERSION`
constant. Declares module tree.

### `src/relay.rs`
RELAY v1.10 primitives: `Protocol`, `Version`, `Message`, `Context`,
RELAY v1.11 primitives: `Protocol`, `Version`, `Message`, `Context`,
`BackPressurePolicy`, `SubscriberOptions`, `Health`, `Metrics`, `Node`,
`Caller`. Protocol::Lin = 3.

Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ Pull requests are reviewed against:

- CODING_STANDARD.md
- SAFETY_PLAN.md §4
- RELAY spec v1.10 §5 (protocol adapter contract)
- RELAY spec v1.11 §5 (protocol adapter contract)
- ISO 26262 Part 6 §8 (coding guidelines)

---
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ The `Bus` and `MasterBus` traits are stable. Implementations are swappable witho

[![CI](https://github.com/SoundMatt/rust-LIN/actions/workflows/ci.yml/badge.svg)](https://github.com/SoundMatt/rust-LIN/actions/workflows/ci.yml)

**RELAY spec:** v1.10 · **Safety:** ASIL-B (ISO 26262) · **Language:** Rust 2021
**RELAY spec:** v1.11 · **Safety:** ASIL-B (ISO 26262) · **Language:** Rust 2021

---

Expand All @@ -19,7 +19,7 @@ The `Bus` and `MasterBus` traits are stable. Implementations are swappable witho
| `virtual_bus` | In-process bus — zero OS dependencies, master+slave | All |
| `mock` | Mock bus for unit testing with frame injection | All |
| `master` | `MasterNode` — schedule table execution, callbacks | All |
| `adapt` | RELAY v1.10 adapter — `adapt()`, `to_message()`, `from_message()` | All |
| `adapt` | RELAY v1.11 adapter — `adapt()`, `to_message()`, `from_message()` | All |

---

Expand Down
2 changes: 1 addition & 1 deletion ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
- `VirtualBus` in-process implementation.
- `MockBus` test double with frame injection.
- `MasterNode` schedule table executor.
- RELAY v1.10 adapter (`adapt`, `to_message`, `from_message`).
- RELAY v1.11 adapter (`adapt`, `to_message`, `from_message`).
- LIN 2.x PID computation and checksum (classic and enhanced).
- Frame validation (ID, length, diagnostic checksum enforcement).
- ASIL-B FuSa annotations on all exported functions and tests.
Expand Down
2 changes: 1 addition & 1 deletion SAFETY_MANUAL.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ rust-LIN makes the following ASIL-B claims:
| SC-12 | LDF parse() does not panic on any input | Unit test with empty/malformed LDF |
| SC-13 | No unsafe code in library or binary | rsfusa lint CI gate |
| SC-14 | Cyclomatic complexity V(G) ≤ 10 for all functions | rsfusa comp CI gate |
| SC-15 | RELAY v1.10 adapter contract is satisfied | relay conform --strict CI gate |
| SC-15 | RELAY v1.11 adapter contract is satisfied | relay conform --strict CI gate |

---

Expand Down
2 changes: 1 addition & 1 deletion SAFETY_PLAN.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ version 0.2.0) and its CLI binary (`rust-lin`). The library implements:
- LIN Description File 2.x parser (`ldf::parse`) — `src/ldf/`
- End-to-end safety protection (`safety::Protector`/`Receiver`) — `src/safety/`
- ISO 26262 SEOOC declarations — `src/seooc.rs`
- RELAY v1.10 protocol adapter — `src/adapt.rs`
- RELAY v1.11 protocol adapter — `src/adapt.rs`

**Target ASIL:** ASIL-B (ISO 26262-1:2018 §3.6).
**SEOOC boundary:** rust-LIN is a Safety Element Out Of Context (ISO 26262-10:2018 §9).
Expand Down
18 changes: 9 additions & 9 deletions requirements.json
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@
"id": "REQ-LIN-014",
"title": "NoResponse returned when no slave response registered",
"description": "send_header returns Error::NoResponse when no response is registered for the requested id",
"source": "RELAY spec v1.10 §5.1",
"source": "RELAY spec v1.11 §5.1",
"asil": "ASIL-B",
"verification": "test",
"status": "implemented"
Expand Down Expand Up @@ -170,7 +170,7 @@
"id": "REQ-LIN-019",
"title": "to_message sets protocol = 3",
"description": "RELAY adapter to_message must set Message::protocol = Protocol::Lin (3)",
"source": "RELAY spec v1.10 §3.2",
"source": "RELAY spec v1.11 §3.2",
"asil": "ASIL-B",
"verification": "test",
"status": "implemented"
Expand All @@ -179,7 +179,7 @@
"id": "REQ-LIN-020",
"title": "from_message rejects wrong protocol",
"description": "RELAY adapter from_message returns Err(InvalidFrame) when Message::protocol != Lin",
"source": "RELAY spec v1.10 §3.2",
"source": "RELAY spec v1.11 §3.2",
"asil": "ASIL-B",
"verification": "test",
"status": "implemented"
Expand All @@ -188,7 +188,7 @@
"id": "REQ-LIN-021",
"title": "NoResponse kind maps to Timeout",
"description": "Error::NoResponse::kind() must return relay::Error::Timeout (ErrNoResponse IS Timeout)",
"source": "RELAY spec v1.10 §5.1",
"source": "RELAY spec v1.11 §5.1",
"asil": "ASIL-B",
"verification": "test",
"status": "implemented"
Expand Down Expand Up @@ -845,7 +845,7 @@
"id": "REQ-ADAPT-001",
"title": "Adapt returns a LIN relay::Node",
"description": "adapt() wraps a Bus and returns a Box<dyn relay::Node> with Protocol::Lin",
"source": "RELAY spec v1.10 §10.3",
"source": "RELAY spec v1.11 §10.3",
"asil": "QM",
"verification": "test",
"status": "implemented"
Expand All @@ -854,7 +854,7 @@
"id": "REQ-ADAPT-002",
"title": "LinAdapter::send publishes payload for a valid frame ID",
"description": "relay::Node::send calls Bus::publish with the parsed frame ID and payload",
"source": "RELAY spec v1.10 §10.3",
"source": "RELAY spec v1.11 §10.3",
"asil": "QM",
"verification": "test",
"status": "implemented"
Expand All @@ -863,7 +863,7 @@
"id": "REQ-ADAPT-003",
"title": "LinAdapter::send rejects an out-of-range frame ID",
"description": "relay::Node::send returns relay::Error on non-numeric or out-of-range Message::id",
"source": "RELAY spec v1.10 §10.3",
"source": "RELAY spec v1.11 §10.3",
"asil": "QM",
"verification": "test",
"status": "implemented"
Expand All @@ -872,7 +872,7 @@
"id": "REQ-ADAPT-004",
"title": "LinAdapter::subscribe converts frames to relay::Message",
"description": "relay::Node::subscribe returns a channel of relay::Message envelopes with Protocol::Lin and correct meta fields",
"source": "RELAY spec v1.10 §10.3",
"source": "RELAY spec v1.11 §10.3",
"asil": "QM",
"verification": "test",
"status": "implemented"
Expand All @@ -881,7 +881,7 @@
"id": "REQ-ADAPT-005",
"title": "LinAdapter::close closes the underlying bus",
"description": "relay::Node::close delegates to Bus::close",
"source": "RELAY spec v1.10 §10.3",
"source": "RELAY spec v1.11 §10.3",
"asil": "QM",
"verification": "test",
"status": "implemented"
Expand Down
2 changes: 1 addition & 1 deletion safety-case.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
},
{
"id": "SC-07",
"claim": "RELAY v1.10 conformance is demonstrated.",
"claim": "RELAY v1.11 conformance is demonstrated.",
"evidence": [
{"type": "conformance", "ref": "relay conform --strict (CI conformance job)"},
{"type": "golden_vectors", "ref": "testdata/relay-vectors/"}
Expand Down
6 changes: 3 additions & 3 deletions safety-case.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,15 +88,15 @@ ISO 26262-8 §11 / IEC 61508-3 §7.4.4 Method 3.

---

## Sub-claim SC-07 — RELAY v1.10 conformance
## Sub-claim SC-07 — RELAY v1.11 conformance

**Claim:** rust-LIN correctly implements the RELAY v1.10 protocol adapter
**Claim:** rust-LIN correctly implements the RELAY v1.11 protocol adapter
contract for Protocol::Lin (3).

**Evidence:**
- `relay conform --strict` passes in CI (conformance job).
- Golden vector tests in `testdata/relay-vectors/` pass in integration suite.
- `RELAY_SPEC_VERSION = "1.10"` constant exported from library.
- `RELAY_SPEC_VERSION = "1.11"` constant exported from library.

---

Expand Down
6 changes: 3 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
//! rust-LIN — LIN bus library for Rust.
//!
//! Provides a virtual bus, master/slave node support, LDF parser, and safety
//! E2E protection. Conforms to RELAY spec v1.10.
//! E2E protection. Conforms to RELAY spec v1.11.
//!
//! # Quick start
//!
Expand Down Expand Up @@ -61,7 +61,7 @@ pub use frame::{
};

/// The RELAY spec version this implementation targets.
pub const SPEC_VERSION: &str = "1.10";
pub const SPEC_VERSION: &str = "1.11";

/// Alias for `SPEC_VERSION` for explicitness in CLI contexts.
pub const RELAY_SPEC_VERSION: &str = "1.10";
pub const RELAY_SPEC_VERSION: &str = "1.11";
2 changes: 1 addition & 1 deletion src/relay.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

//! RELAY protocol types bundled locally until a relay-rs crate is published.
//!
//! These types mirror the RELAY spec v1.10 definitions for Rust (§18.3).
//! These types mirror the RELAY spec v1.11 definitions for Rust (§18.3).

use std::collections::BTreeMap;
use std::time::{Duration, Instant};
Expand Down
4 changes: 2 additions & 2 deletions tests/integration_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -480,8 +480,8 @@ async fn back_pressure_drop_newest() {
//fusa:test REQ-LIN-001
#[test]
fn spec_version_constant() {
assert_eq!(rust_lin::SPEC_VERSION, "1.10");
assert_eq!(rust_lin::RELAY_SPEC_VERSION, "1.10");
assert_eq!(rust_lin::SPEC_VERSION, "1.11");
assert_eq!(rust_lin::RELAY_SPEC_VERSION, "1.11");
}

// ---------------------------------------------------------------------------
Expand Down
Loading