Skip to content

Derive a parsed header's variation from its payload - #628

Merged
jadamcrain merged 1 commit into
mainfrom
refactor/header-identity
Oct 22, 2026
Merged

jadamcrain merged 1 commit into
mainfrom
refactor/header-identity

Conversation

@jadamcrain

Copy link
Copy Markdown
Member

Derives a parsed header's variation from its payload instead of storing it separately: the generator emits variation() on each payload enum, ObjectHeader drops its variation field, all-objects headers become a validated wrapper, and ranged extraction no longer takes a separate variation. READ headers carry their variation explicitly. Behavior-neutral; passes the pins from the preceding PR, apart from removing their test-only stand-in accessor. Conformance passed on the branch.

ObjectHeader stored its variation beside payload enums that already
name it, so a header could be built with a variation that disagrees
with its objects. The generator now emits a variation() accessor on
each payload enum, ObjectHeader derives its variation from its details,
and a READ header, which has no payload, carries its variation in
HeaderDetails::Read. Ranged extraction takes the variation from the
payload as prefixed extraction already did, and a ranged attribute
keeps its variation only in the attribute. Generator change in
dnp3/codegen; regenerated output included. Behavior-neutral.
@jadamcrain
jadamcrain enabled auto-merge October 22, 2026 06:29
@jadamcrain
jadamcrain added this pull request to the merge queue Oct 22, 2026
Merged via the queue into main with commit e44e2ce Oct 22, 2026
36 checks passed
@jadamcrain
jadamcrain deleted the refactor/header-identity branch October 22, 2026 06:37
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