Skip to content

Add per-address priority support (E1.31 START code 0xDD)#3

Open
taylorcjensen wants to merge 5 commits intodnadoba:masterfrom
taylorcjensen:master
Open

Add per-address priority support (E1.31 START code 0xDD)#3
taylorcjensen wants to merge 5 commits intodnadoba:masterfrom
taylorcjensen:master

Conversation

@taylorcjensen
Copy link
Copy Markdown

Summary

  • Add configurable startCode property to DMPLayer (defaults to 0x00 for full backwards compatibility)
  • Write startCode at byte 125 instead of relying on the template's hardcoded 0x00
  • Add sendPerAddressPriority(_:priority:) to Connection with an independent sequence number counter, per E1.31 spec requirement that each START code maintains its own sequence
  • Add 6 tests covering start code defaults, byte-level packet correctness, and sequence number independence

Context

E1.31 per-address priority (START code 0xDD) allows a source to specify priority per DMX address rather than per universe. This is useful when a source only cares about a subset of addresses -- addresses with priority 0 are ignored by receivers, preventing the source from unnecessarily overriding other sources on the same universe.

The implementation is minimal and non-breaking: existing callers of sendDMXData are unaffected since DMPLayer.startCode defaults to 0x00.

Test plan

  • Existing tests pass unchanged
  • DMPLayer defaults startCode to 0x00
  • DMPLayer accepts startCode: 0xDD for priority packets
  • write() places the start code at the correct byte position (125)
  • DMX data bytes follow the start code in the packet
  • sendPerAddressPriority uses an independent sequence counter from sendDMXData

Taylor Jensen and others added 5 commits February 16, 2026 13:21
- Add startCode property to DMPLayer (defaults to 0x00 for backwards compat)
- Write startCode at byte 125 instead of relying on template's hardcoded 0x00
- Add sendPerAddressPriority() to Connection with independent sequence counter
- Per E1.31 spec: each START code gets its own sequence number tracking

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- DMPLayer startCode defaults to 0x00 and can be set to 0xDD
- write() places startCode at correct byte position (125)
- DMX data bytes follow start code correctly
- Priority sequence number is independent from DMX sequence

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
sACNView (Tom Steer) confuses DATA and PAP packets when they share
the same sequence number. Starting the priority counter at 128
ensures they never collide during normal operation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add usage examples for sendPerAddressPriority and list the feature
in the features section.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
sACNView (and likely other receivers) tracks one sequence counter per
source, not per start code. Sending DATA at seq=0 then PAP at seq=128
caused every packet to be flagged as a sequence jump.

ETC Eos uses a single monotonic sequence across both DATA (0x00) and
per-address priority (0xDD) packets. Match that behavior by removing
the separate priority sequence counter.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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