Repository navigation
Conversation
An extended message is the PGN, plus the source address only when that PGN has two layouts. removeDuplicates stores one generic row when the layout is shared. BA_ "J1939Default" chooses the generic row when layouts differ. Priority is not part of the key, and DLC is not the tie-break. Signal equality includes byte order, so @0 and @1 stay apart. An 11-bit id is found with can_id & 0x7FF. J1939Parser still reads the std::map. A map that has not been deduplicated is still found by the DBC CAN id.
This was referenced Nov 19, 2026
Closed
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.
Summary
removeDuplicatesstores one generic row atj1939PgnKeywhen the layout is shared.BA_ "J1939Default"chooses the generic row when layouts differ. Other layouts stay underj1939SaKey.@0and@1no longer compare equal.J1939Parser::getPgnfinds an 11-bit id withcan_id & 0x7FF. A map that has not been deduplicated is still found by the DBC CAN id, so the plain-C round-trip and the existing standard-id tests keep working.Closes #4.
Test plan
j1939.dbcround-trip against the C databaseall_testsand coverage (needs Linux;linux/can.his not available on this Mac)