Skip to content

v0.20.0 — general-purpose CDR/XCDR1 codec (dds::cdr)

Choose a tag to compare

@SoundMatt SoundMatt released this 28 Jul 05:38
· 12 commits to main since this release
2007841

Added

  • dds::cdr (include/dds/cdr/cdr.hpp, src/cdr/cdr.cpp) — general-purpose CDR/XCDR1 encode/decode per OMG DDS-XTypes 1.3, a faithful C++ port of go-DDS's top-level tools/cdr package, the second item of ROADMAP.md's "Tier 3 — xtypes, tsn, idl, cdr". Encoder/Decoder handle all CDR primitives with natural alignment, plus strings and byte sequences per the XCDR1 spec. Encoder prepends and Decoder::create() validates the 4-byte CDR_LE encapsulation header (accepting both CDR_LE and CDR_BE scheme values on decode, matching go-DDS's own quirk exactly).
  • Deliberately a SEPARATE library from Tier 1 phase 2's discovery-scoped dds::rtps::PLCDREncoder/PLCDRDecoder — not reused, not extended; mirrors go-DDS's own rtps/cdr.go vs. top-level tools/cdr/ package split.
  • Every method verified byte-exact against reference vectors independently derived from a fresh go-DDS clone.
  • 45 new tests (tests/test_cdr.cpp) — 443/443 tests total. Adds REQ-CDR-001 through REQ-CDR-005, traced and tested.

Verified locally: Release C++17 build clean, the new files additionally compiled warning-clean under a genuine -std=c++20 invocation directly, ctest 443/443, Debug ASan+UBSan pass on macOS/AppleClang. CI: all 13 checks green (Linux/macOS/Windows matrix, gcc-12 ASan+UBSan, cpfusa full lifecycle).

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