Skip to content

feat: v2.13.0 — Native Transport Rebuild: UDP/IP (Annex J) (§Phase 15 milestone 57) - #52

Merged
SoundMatt merged 3 commits into
mainfrom
feat/v2.13.0-udp-annex-j-transport
Jul 29, 2026
Merged

SoundMatt merged 3 commits into
mainfrom
feat/v2.13.0-udp-annex-j-transport

Conversation

@SoundMatt

Copy link
Copy Markdown
Owner

Summary

  • Rebuilds rcp/udp.hpp to carry real IEEE 1722 AVTPDU frames over UDP/IP, per ROADMAP.md milestone 57 ("Native Transport Rebuild — UDP/IP (Annex J)", v2.13.0) and the Satellite Package Disposition table's entry for this file.
  • The bespoke R/C-magic 16-byte Zone/Command/Response/Status frame this file used to carry (rcp/legacy_wire.hpp) is discarded outright, not adapted — matching the roadmap's own call that this transport "is the old wire format this whole roadmap replaces." rcp/legacy_wire.hpp and its test are deleted in the same change; grepping the tree found no other consumer of the old udp::ZoneServer/udp::Controller/udp::Registry API (rcp/tsn.hpp only ever depended on the generic rcp::Controller interface plus a raw socket fd), so no legacy-shim split file was needed here.
  • udp::Frame/encode_frame/decode_frame compose rcp/avtp.hpp's NTSCF/TSCF header codec with rcp/acf.hpp's ACF_ABB/ACF_GBB message codec into one AVTPDU, carried as the UDP payload unmodified — this implementation's own reading of IEEE 1722 Annex J's UDP/IP encapsulation.
  • udp::Server binds a UDP socket, decodes inbound datagrams, dispatches to a caller-supplied Handler shaped to match rcp::mock::Server::dispatch's signature (v2.12.0), and answers under the same NTSCF/TSCF header kind the request arrived under, with stable per-sender client ids.
  • udp::Client connects to one server address and correlates responses by the (byte_bus_id, transaction_num) echo rule rcp/acf.hpp's make_response documents.
  • ROADMAP.md milestone 57 gets a "Done (v2.13.0)" note; README.md's header index and rcp/avtp.hpp's own header comment are updated to reflect the completed rebind.
  • version.hpp/CMakeLists.txt bumped to 2.13.0.

Test plan

  • tests/test_udp.cpp — 12 new tests (REQ-UDP-001..012, entirely rewritten under the same file/prefix identity as the discarded pre-replacement coverage, matching the tests/test_sim.cpp precedent at v2.12.0): pure Frame codec round-trips (NTSCF/TSCF/ACF_GBB) and malformed-input rejection, plus real-socket Server/Client round trips over loopback (dispatch, default-Acknowledge, per-sender client ids, timeout, concurrent request correlation, idempotent close).
  • .fusa-reqs.json updated with the 12 rewritten REQ-UDP-* requirement texts.
  • Full local build (cmake --build build) and ctest --test-dir build --output-on-failure -j1 — 60/60 tests pass.
  • CI (cross-platform build/test matrix, RELAY conformance gate, clang-tidy, cpp-FuSa checks) — pending, see PR checks.

… milestone 57)

Rebuilds rcp/udp.hpp to carry real IEEE 1722 AVTPDU frames over UDP/IP,
per ROADMAP.md milestone 57 and the Satellite Package Disposition
table's entry for this file. The bespoke R/C-magic 16-byte
Zone/Command/Response/Status frame this file used to carry
(rcp/legacy_wire.hpp) is discarded outright, not adapted, matching the
roadmap's own call that this transport "is the old wire format this
whole roadmap replaces."

udp::Frame/encode_frame/decode_frame compose rcp/avtp.hpp's NTSCF/TSCF
header codec with rcp/acf.hpp's ACF_ABB/ACF_GBB message codec into one
AVTPDU, carried as the UDP datagram payload unmodified — this
implementation's own reading of IEEE 1722 Annex J's UDP/IP
encapsulation, consistent with rcp/avtp.hpp's own note that its framing
is transport-agnostic by design. udp::Server binds a UDP socket,
decodes each inbound datagram, dispatches the carried ACF request to a
caller-supplied Handler shaped to match rcp::mock::Server::dispatch's
signature (v2.12.0), and answers the sender under the same NTSCF/TSCF
header kind the request arrived under, assigning stable per-sender
client ids. udp::Client connects to one server address and correlates
each response by the (byte_bus_id, transaction_num) echo rule
rcp/acf.hpp's make_response documents, rather than a locally invented
request id.

Neither class builds on rcp.hpp's Zone/Command/Controller/Registry
model, per that file's own header comment that nothing new should.
Grepping the tree for consumers of the old udp::ZoneServer/
udp::Controller/udp::Registry API found none beyond this file's own
(now-deleted) test and rcp/tsn.hpp's doc comment — rcp/tsn.hpp itself
only ever depended on the generic rcp::Controller interface plus a raw
socket fd, never on udp:: types directly — so no legacy-shim split file
was needed here, unlike rcp/mock.hpp's at v2.12.0; rcp/legacy_wire.hpp
is deleted outright in the same change.

New coverage lives in tests/test_udp.cpp (REQ-UDP-001..012, entirely
rewritten under the same file/prefix identity as the discarded
pre-replacement coverage, the same convention tests/test_sim.cpp's
REQ-SIM-001..007 rewrite followed at v2.12.0), traced in
.fusa-reqs.json. Full bit-for-bit conformance against other TC18/
Annex-J implementations is not claimed, same as the equivalent
disclaimers in rcp/avtp.hpp, rcp/acf.hpp, and rcp/discovery.hpp.

Signed-off-by: Matt <47545907+SoundMatt@users.noreply.github.com>
Server/Client-based tests (REQ-UDP-007..012), including the BlackHole
helper, only make sense on the POSIX build — on Windows both classes
are the function_not_supported stub rcp/udp.hpp's own header comment
documents. BlackHole was referenced outside its RCP_UDP_POSIX guard,
breaking the Windows/MSVC build.

Signed-off-by: Matt <47545907+SoundMatt@users.noreply.github.com>
encode_frame/decode_frame are also the Windows stub (return {} / always
fail) per rcp/udp.hpp's own header comment, not just Server/Client — the
first Frame round-trip test indexed into the stub's empty return vector
and segfaulted under MSVC. Move the RCP_UDP_POSIX guard to wrap the
entire test body, and add a small Windows-only placeholder TEST_CASE
that exercises the function_not_supported stub surface directly, so the
binary registers at least one real assertion there instead of Catch2
reporting "No tests ran" (a ctest failure) when the guard elides every
other TEST_CASE.

Signed-off-by: Matt <47545907+SoundMatt@users.noreply.github.com>
@SoundMatt
SoundMatt merged commit 265aff7 into main Jul 29, 2026
20 checks passed
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