Repository navigation
Derive a parsed header's variation from its payload - #628
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.