Skip to content

Honor multiplex switches in C++ PGN decoding - #15

Merged
ip332 merged 1 commit into
mainfrom
fix/cpp-multiplex-decoding
Nov 23, 2026
Merged

ip332 merged 1 commit into
mainfrom
fix/cpp-multiplex-decoding

Conversation

@ip332

@ip332 ip332 commented Nov 23, 2026 •

Copy link
Copy Markdown
Owner

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.

@ip332
ip332 merged commit ad9450d into main Nov 23, 2026
3 checks passed
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.

C++ PGN runtime ignores the multiplex switch

1 participant