-
Notifications
You must be signed in to change notification settings - Fork 76
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
Refactor table classes #164
Conversation
Signed-off-by: Andreas Lauser <[email protected]> Signed-off-by: Gerrit Ecke <[email protected]>
- all sub-tags mentioned in the XSD for TABLE and TABLE-ROW should now be internalized. - table rows are now handled like the diagnostic communications in the diag layer: they are specified using a mixed list of table rows and links to table rows. The latter are resolved in the `._resolve_odxlinks()` method, and the `.table_rows` property provides a "resolved" view uppon these objects. As a consequence, instead of specifying table rows and references separately, a single parameter (`table_rows_raw`) is now used. - The `TableBase` class has been removed since the only class which derived from it was `Table` and the XSD also does not specify an anologous element... Signed-off-by: Andreas Lauser <[email protected]> Signed-off-by: Gerrit Ecke <[email protected]>
that's where they are defined in the XML... Signed-off-by: Andreas Lauser <[email protected]> Signed-off-by: Gerrit Ecke <[email protected]>
@@ -313,11 +311,6 @@ def global_negative_responses(self) -> NamedItemList[Response]: | |||
"""All global negative responses applicable to this DiagLayer""" | |||
return self._global_negative_responses | |||
|
|||
@property | |||
def tables(self) -> NamedItemList[Table]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The diaglayer.tables
property is gone, how is the user supposed to access tables now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
via diag_layer.diag_data_dictionary_spec.tables
. You have a point though, I should add a deprecated method which does that. (fixed: bdc56ee )
I tried to test this PR with the PDX files I have, found out that #163 caused breaking changes |
thanks! Signed-off-by: Andreas Lauser <[email protected]> Signed-off-by: Gerrit Ecke <[email protected]>
@kayoub5: Do you any showstoppers with this or can it be merged? |
No show stoppers, just make a release once merged |
cool, thanks. Since the latest release did not come with the EndOfPduField regression, I don't think that this is critical and I would like to wait for my next PR (for en- and decoding TableStruct parameters) is merged... |
this PR refactors the table classes once more:
table.table_rows
provides a fully resolved view, whiletable.table_rows_raw
is the table row specification as it is found in the XML)TableRow
class is put to a separate file andTableBase
is subsumed into its only user,Table
.DiagLayer
class does not hold the table objects directly anymore. instead, they are moved to theDiagDataDictionarySpec
like in the XML.Andreas Lauser <[email protected]>, on behalf of MBition GmbH.
Provider Information