- tools/flowgen.py: generates docs/workflows/<name>.md — one outcome-first mermaid flowchart per workflow the SDK tests (hpmcu watchdog, modbus read, cru ladder, rga offload, relay drive, freshness contract), each stamped with its benchmark ns/op or 100% MC/DC result. Deterministic; reads the cargo-bench trend json. - drivers/README.md: honest Tier-1 (relays + freshness, 100% MC/DC here now) vs Tier-2 (modbus/rga — serious testing + fault-injection + benchmarks via sim models; driver sources migrate in with the flare-edge unification) per ADR-0002/0005. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017wB8KB3MMQztRDXCMCkPrf
541 B
541 B
Modbus RTU: read-holding-registers round trip
Outcome tested: A well-formed request yields the right registers; a bad one a defined fault.
Benchmark (modbus_read_holding): 88.0 ns/op
flowchart TD
A[frame in] --> B{addr == mine\nor broadcast?}
B -- no --> Z[ignore]
B -- yes --> C{CRC ok?}
C -- no --> Z
C -- yes --> D{function code}
D -- 0x03 read-holding --> E{range in bounds?}
E -- no --> X[exception 0x02]
E -- yes --> R[registers response + CRC]
D -- unsupported --> X2[exception 0x01]