Skip to content

fix: encode sACN discovery universes in network order - #152

Open
iibaranov-IG wants to merge 1 commit into
cbdevnet:masterfrom
iibaranov-IG:fix/142-sacn-discovery-byte-order
Open

fix: encode sACN discovery universes in network order#152
iibaranov-IG wants to merge 1 commit into
cbdevnet:masterfrom
iibaranov-IG:fix/142-sacn-discovery-byte-order

Conversation

@iibaranov-IG

Copy link
Copy Markdown

Fixes #142.

The discovery PDU copied uint16_t bytes directly from an array of sacn_output_universe structures. Besides retaining host byte order, this reads later values with the wrong stride because each source entry contains timestamp and mark fields.

This serializes each universe field individually with htobe16. The new native regression uses universes 1, 256, and 0x1234 and checks the exact payload bytes 00 01 01 00 12 34, covering both byte order and structure stride.

Validation:

  • make test passes on macOS;
  • the focused test and sACN shared backend compile and run on Ubuntu 24.04;
  • BCL reproduces the baseline failure and verifies the candidate repair;
  • all 81 BCL infrastructure tests pass.

The complete optional-backend build was not run because the local host lacks Lua development headers; the sACN backend itself builds successfully.

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.

sACN universe list in discovery messages uses incorrect byte ordering

1 participant