Skip to content

feat: v2.0.0 — TC18 wire format core (Phase 13 milestone 44) - #37

Merged
SoundMatt merged 1 commit into
mainfrom
feat/milestone-44-wire-format-core
Jul 28, 2026
Merged

SoundMatt merged 1 commit into
mainfrom
feat/milestone-44-wire-format-core

Conversation

@SoundMatt

Copy link
Copy Markdown
Owner

Summary

Implements ROADMAP.md milestone 44, "Wire Format Core (v2.0.0)" — the first milestone of Phase 13's full TC18 protocol replacement.

  • rcp/wire.hpp is entirely rebuilt as an IEEE 1722 AVTPDU/ACF codec:

    • NTSCF and TSCF AVTPDU headers (encode/decode, subtype validation)
    • ACF_ABB (0x0E, no timestamp) and ACF_GBB (0x0D, 64-bit message_timestamp) message framing
    • The shared byte_message_info fields: acf_msg_type, acf_msg_length, pad, mtv, byte_bus_id, evt (ack + 3-bit sub-opcode), hs, cs, transaction_num, op, rsp, err, ms, and the dual-purpose read_size/segment_num field
    • StreamId (MAC + locally-assigned suffix) and byte_bus_id addressing, with make_response() structurally enforcing the "echo byte_bus_id/transaction_num back unchanged" rule
    • The mandatory standard request kind and the four response semantic types (acknowledge / write / read / error)
    • avtp_timestamp/message_timestamp with an explicit fallback rule (effective_timestamp) that returns std::nullopt rather than defaulting to zero when neither timestamp source is valid
    • No dependency on rcp.hpp's Zone/Command/Controller/Registry model, and no transport assumption (works equally under Ethernet, IEEE1722-over-UDP/IP, or CAN)
  • The old 16-byte frame codec that used to live in wire.hpp is preserved byte-for-byte under a new rcp/legacy_wire.hpp (namespace rcp::legacy_wire), since rcp/udp.hpp still depends on it and isn't rebuilt against real AVTPDU framing until v2.13.0. rcp/udp.hpp now includes legacy_wire.hpp instead, with an explanatory header comment.

  • Test coverage: tests/test_wire.cpp is rewritten to cover the new codec (REQ-WIRE-001..014); the old 16-byte-frame tests move unchanged to tests/test_legacy_wire.cpp (REQ-UDP-001..012, still passing). .fusa-reqs.json gets the 14 new REQ-WIRE-* entries.

  • Version bumped to 2.0.0 (CMakeLists.txt, version.hpp), README header table updated, ROADMAP.md milestone 44 marked done.

Per the roadmap's own framing, this is a pure wire-codec milestone — no lifecycle, discovery, or endpoint behavior is included, and full bit-for-bit conformance against other TC18 implementations isn't claimed until v2.6.0.

Test plan

  • cmake --build clean on clang (macOS) and gcc — both Debug and Release
  • ctest full suite: 42/42 tests passing (100%), including new rcp_wire and rcp_legacy_wire
  • cpp-rcp version/capabilities CLI smoke check — reports 2.0.0 correctly
  • No new compiler warnings introduced (checked against this repo's -Wall -Wextra -Wpedantic -Wshadow -Wold-style-cast -Wcast-align flag set)
  • CI (clang-tidy/DCO/relay-conform/coverage matrix) — pending, see PR checks

Replace rcp/wire.hpp's bespoke 16-byte Zone/Command/Response/Status frame
with an IEEE 1722 AVTPDU/ACF codec: NTSCF and TSCF headers, ACF_ABB/ACF_GBB
messages, the shared byte_message_info fields, StreamId/byte_bus_id
addressing with an enforced echo-back rule, the mandatory standard request
kind, the four response semantic types, and avtp_timestamp/message_timestamp
fallback handling. The module has no dependency on rcp.hpp's legacy model
and makes no transport assumption, per ROADMAP.md milestone 44.

The old frame codec is preserved as-is under rcp/legacy_wire.hpp so
rcp/udp.hpp keeps building and working until it is rebuilt against real
AVTPDU framing at v2.13.0; its tests move to tests/test_legacy_wire.cpp
unchanged. New coverage for the AVTPDU/ACF codec lives in
tests/test_wire.cpp (REQ-WIRE-001..014, added to .fusa-reqs.json).

Signed-off-by: Matt Jones <47545907+SoundMatt@users.noreply.github.com>
@SoundMatt
SoundMatt merged commit aabdcb2 into main Jul 28, 2026
20 checks passed
@SoundMatt
SoundMatt deleted the feat/milestone-44-wire-format-core branch July 28, 2026 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant