Skip to content

v0.22.0 — TSN (IEEE 802.1) QoS integration (dds::tsn)

Choose a tag to compare

@SoundMatt SoundMatt released this 28 Jul 07:32
· 10 commits to main since this release
642334b

Added

  • dds::tsn::Stream/StreamConfig (include/dds/tsn/tsn.hpp, src/tsn/tsn.cpp) — a C++ port of go-DDS's tsn/tsn.go, the fourth and last item of ROADMAP.md's "Tier 3 — xtypes, tsn, idl, cdr" (now fully complete). load_config()/parse_config() parse the identical JSON tsn_streams shape via a small internal recursive-descent JSON reader scoped to exactly this config shape, matching this repo's established small-purpose-built-parser convention rather than a general-purpose dependency.
  • include/dds/rtps/tsn.hpp mirrors go-DDS's rtps/tsn.go split exactly: TSNParams/TSNStreamConfig live inside dds::rtps itself so dds::rtps never depends on dds::tsn. dds::tsn::StreamConfigAdapter/with_stream_config() is the adapter, assigned to a new ParticipantOptions::tsn_config field.
  • include/dds/tsn/taprio.hpp + src/tsn/taprio.cpp — TAPRIOEntry/TAPRIOConfig (gate control list, cycle_duration()/validate()/tc_command()) plus taprio_from_streams(), all portable. src/tsn/taprio_linux.cpp (compiled only when CMAKE_SYSTEM_NAME is "Linux", mirroring Tier-1 phase 3's traffic_linux.cpp/traffic_other.cpp split) programs and verifies the real Linux taprio qdisc via hand-built RTM_NEWQDISC/RTM_GETQDISC netlink messages over NETLINK_ROUTE — a byte-for-byte port of go-DDS's tsn/taprio_linux.go attribute layout, cross-checked field-by-field against a fresh go-DDS clone. src/tsn/taprio_other.cpp returns a documented "requires Linux" diagnostic everywhere else. Neither apply() nor any TSN code is called automatically by dds::rtps::Participant, matching go-DDS's own participant.go.
  • Real Participant/Writer wiring, not just types: ParticipantOptions::tsn_config set → new_publisher resolves each writer's topic against it (config match takes priority, QoS::transport_priority — a field that already existed — is the fallback PCP selector) and lazily creates/reuses one dedicated UdpSocket per distinct PCP value, configured via the already-existing (Tier-1 phase 3) dds::rtps::traffic.hpp hooks that had no caller anywhere in the codebase before this item. Writer::write()/send_heartbeat() route through that dedicated socket, computing a SO_TXTIME launch time for streams with a nonzero tx_offset. A TSN stream's max_frag_payload() overrides fragment.hpp's default fragmentation threshold end-to-end.
  • 4 new cross-participant, real-loopback-UDP end-to-end tests plus 45 unit tests mirroring go-DDS's tsn_test.go/taprio_test.go matrices — 540/540 tests total. REQ-TSN-001 through REQ-TSN-007 added, traced and tested.

Verified locally: Release C++17/C++20 builds clean, ctest 540/540, Debug ASan+UBSan pass on both macOS and a real Ubuntu-22.04/gcc-12 Docker container (exercising the actual Linux netlink code path). CI: all 13 checks green (Linux/macOS/Windows matrix, gcc-12 ASan+UBSan, cpp-FuSa full lifecycle).

Full changelog: https://github.com/SoundMatt/cpp-DDS/blob/main/CHANGELOG.md#0220--2026-07-28