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

Untangle diaglayer (Part 6) #145

Merged
merged 8 commits into from
Jun 20, 2023
Merged

Conversation

andlaus
Copy link
Collaborator

@andlaus andlaus commented Jun 19, 2023

This PR collects various smaller fixes for the diaglayer code (in that sense, it consists purely of "drive-by" fixes). The most notable of those changes is that the "logical" view now exposes all objects that are contained by the DIAG-DATA-DICTIONARY-SPEC tag using a separate .data_dictionary_spec attribute instead of providing e.g. the .data_object_properties directly. (This is not completely trivial because some of the sub-objects of the diag data dictionary spec are subject to value inheritance).

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

Signed-off-by: Andreas Lauser <andreas.lauser@mbition.io>
Signed-off-by: Gerrit Ecke <gerrit.ecke@mbition.io>
Signed-off-by: Andreas Lauser <andreas.lauser@mbition.io>
Signed-off-by: Gerrit Ecke <gerrit.ecke@mbition.io>
Signed-off-by: Andreas Lauser <andreas.lauser@mbition.io>
Signed-off-by: Gerrit Ecke <gerrit.ecke@mbition.io>
This puts the sub-objects of DATA-DICTIONARY-SPEC in the same place as
where they can be found in the XML and the raw diaglayer. e.g., the
data object properties are contained by `.data_dictionary_spec`
instead of being directly helt by the DiagLayer. (Whether using
DIAG-DATA-DICTIONARY-SPEC makes much sense in the first place is a
different matter IMO...)

Signed-off-by: Andreas Lauser <andreas.lauser@mbition.io>
Signed-off-by: Gerrit Ecke <gerrit.ecke@mbition.io>
`DopBase` is the base class for `DataObjectProperty` and `DtcDop`, but
usually only one of these can be specified.

Signed-off-by: Andreas Lauser <andreas.lauser@mbition.io>
Signed-off-by: Gerrit Ecke <gerrit.ecke@mbition.io>
this method behaves like any other comparam-wrapper function: it
returns None if the comparam has not been specified...

Signed-off-by: Andreas Lauser <andreas.lauser@mbition.io>
Signed-off-by: Gerrit Ecke <gerrit.ecke@mbition.io>
`repr()` was quite incorrect, as as this method is intended to return
a full representation of the object as a string (e.g. how an
equivalent object can be constructed), which is quite unpractical
because for `DiagLayer` this would often result in a string with a
length of several million of characters.

Signed-off-by: Andreas Lauser <andreas.lauser@mbition.io>
Signed-off-by: Gerrit Ecke <gerrit.ecke@mbition.io>
@andlaus andlaus requested a review from kayoub5 June 19, 2023 09:27
odxtools/endofpdufield.py Outdated Show resolved Hide resolved
this makes things easier to read and fixes the formatting which got
mangled due to now exposing DOPs via the `diag_data_dictionary_spec`
sub-object of diaglayers.

thanks to [at]kayoub5 for the proposal.

Signed-off-by: Andreas Lauser <andreas.lauser@mbition.io>
Signed-off-by: Gerrit Ecke <gerrit.ecke@mbition.io>
@andlaus andlaus merged commit bb358bb into mercedes-benz:main Jun 20, 2023
6 checks passed
@andlaus andlaus deleted the untangle_diaglayer_6 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.

None yet

2 participants