Repository navigation
Honor multiplex switches in C++ PGN decoding - #15
Merged
Merged
Conversation
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.
Carry multiplexor, multiplexed, and mux-value metadata through SPN conversion and generated C++ PGN initializers. Retain all alternatives in C++ PGN output, including signals sharing a start bit, while preserving the legacy packed union’s first-signal layout.
Decode alternatives only when the pure multiplexor’s raw value matches. Name lookup, value reads, iteration, and formatted output hide inactive alternatives. Named writes still write the requested signal without changing the switch. Missing, truncated, and nested-only switches do not activate alternatives; SG_MUL_VAL_ and nested-switch selection remain unsupported.
Regression tests cover switch values 0 and 1, shared start bits, always-visible signals, Motorola switches, duplicate names, inactive writes, generated C++ compilation, and C/C++ activity parity in the database round-trip tests. Update the existing test that expected two alternatives to be dropped.
Validation: 354 tests passed in Linux Docker, including full-log replays. Coverage gate passed: 98.2% lines, 94.2% branches. Seven existing tests remain disabled. Based directly on main; independent of #13 and #14, and all three branches merge cleanly in pairwise checks.
Closes #12.