Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

diaglayer: refactor the communication parameter handling #142

Merged
merged 3 commits into from
Jun 15, 2023

Conversation

andlaus
Copy link
Collaborator

@andlaus andlaus commented Jun 12, 2023

This continues the long quest to clean up DiagLayer:

it turns out that the names of the communication parameters are not unambiguous: e.g., "CP_UniqueRespIdTable" parameter is not so unique in the sense that it exists for CAN (comparam subset "ISO_15765_2") as well as for DoIP (CP subset "ISO_13400_2_DIS_2015") and both parameters have a completely different definition. (The same issue applies to e.g., "CP_TesterPresentTime", but this being a simple integer parameter, at least the returned value is of the same type.)

To get out of that pickle, the full parameter ID now has to be specified for DiagLayer.get_communication_parameter() (e.g., "ISO_15765_2.CP_UniqueRespIdTable").

Andreas Lauser <andreas.lauser@mercedes-benz.com>, on behalf of MBition GmbH.
Provider Information

it turns out that the names of the communication parameters are not
unambiguous: e.g., "CP_UniqueRespIdTable" parameter is not so unique
in the sense that it exists for CAN (comparam subset "ISO_15765_2") as
well as for DoIP (CP subset "ISO_13400_2_DIS_2015") and both
parameters have a completely different definition. (The same issue
applies to e.g., "CP_TesterPresentTime", but this being a simple
integer parameter, at least the returned value is of the same type.)

To get out of that pickle, the full parameter ID now has to be
specified for `DiagLayer.get_communication_parameter()` (e.g.,
"ISO_15765_2.CP_UniqueRespIdTable").

Signed-off-by: Andreas Lauser <andreas.lauser@mbition.io>
Signed-off-by: Gerrit Ecke <gerrit.ecke@mbition.io>
odxtools/diaglayer.py Outdated Show resolved Hide resolved
@andlaus
Copy link
Collaborator Author

andlaus commented Jun 13, 2023

@kayoub5: do you see any problems with this?

…he comparams

this is rather unfortunate because we have to rely on the stars to
align correctly (only a single comparam of a given name must be
defined for an individual (protocol, is_functional) combination) to
retrieve the correct comparam. Unfortunately the IDs of comparams (and
the comparam subsets?) do not seem to be sufficiently standardized
accross the vendors to rely on them (CANdela and the comparams that
are shipped with the standard us the convention
<COMPARAM_SUBSET>.<COMPARAM_NAME> as their convention for IDs, other
editors seem to use random strings)...

thanks to [at]kayoub5 for pointing this out.

Signed-off-by: Andreas Lauser <andreas.lauser@mbition.io>
Signed-off-by: Gerrit Ecke <gerrit.ecke@mbition.io>
odxtools/diaglayer.py Outdated Show resolved Hide resolved
we reverted back to short names...

thanks to [at]kayoub5 for the catch.

Signed-off-by: Andreas Lauser <andreas.lauser@mbition.io>
Signed-off-by: Gerrit Ecke <gerrit.ecke@mbition.io>
@andlaus andlaus merged commit 75b604a into mercedes-benz:main Jun 15, 2023
@andlaus andlaus deleted the untangle_diaglayer_4 branch December 7, 2023 13:30
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.

2 participants