Repository navigation
cdd: accept spec=did as a data identifier - #109
Merged
Merged
Conversation
Vector UDS templates mark the 16-bit Read/WriteDataByIdentifier parameter spec="id" or spec="did". Index both, and keep the literal spec on the parameter. Other spec values still do not identify a DID. Co-authored-by: Tom Ford <t@tomrford.com>
tomrford
marked this pull request as ready for review
October 20, 2026 14:31
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
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
Vector CANdela marks the 16-bit ReadDataByIdentifier (0x22) / WriteDataByIdentifier (0x2E) parameter
spec="id"in some UDS templates andspec="did"in others. gocan only indexedspec="id", so a document that usesspec="did"kept the service but omitted the DID (read/write-by-identifier service has no 16-bit identifier).DID lookup now treats
spec="did"as that same identifier slot.Parameter.Specstays the literal attribute. Other values (lid,pid,info,sub, …) still do not identify a DID. SID 0x24 ReadScalingDataByIdentifier, which also usesspec="did"in the larger Vector template, is still outside this DID view.Evidence
dtdvers8.2.2102,SPECOWNERVector):STATICCOMP spec='did'on both 0x22 and 0x2E, andSHSTATIC spec='did'binding them. Routine identifiers in the same file stayspec='id'. https://github.com/kim2030-png/alv_pp4g_95/blob/main/Tools/BootLoader_Vector/Workspace/UserCode/vFlash/xMa/VolvoCar_SLP2.cddexample-diddatarefs.cdd(dtdvers10.0.108): 0x22/0x2E usespec='id';spec='did'is the 0x24 identifier, and oneSHSTATIC spec='id'references both. https://github.com/cantools/cantools/blob/master/tests/files/cdd/example-diddatarefs.cddTest
TestDataIdentifierSpecDidResolvesDIDrewrites the record fixture so the read/write identifier components usespec="did", resolves the read/write and legacy DIDs, and decodes a record. The same fixture withspec="lid"leaves the services in place and reports a DID diagnostic instead of inventing a DID.go test -race ./...,go vet ./..., andgofmt -l .are clean.