-
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
TableStructParameter: allow the table key to be specified via SNREF #288
Conversation
this requires to use a custom `_resolve_snrefs()` function because the parameter object itself cannot know the context from where it is called... Signed-off-by: Andreas Lauser <andreas.lauser@mbition.io> Signed-off-by: Gerrit Ecke <gerrit.ecke@mbition.io>
issue not solved, specific information: |
okay, it seems like at least you now get a different exception: instead of complaining that table-keys cannot be referenced via SNREF in table-struct parameters, it cannot resolve the DOP associated with the parameter in can you find out what the type of the referenced DOP is? (change line 69 of ´parameterwithdop.py` to if ddds.all_data_object_properties.get(self.dop_snref) is None:
print(f"Cannot resolve SNREF to DOP '{self.dop_snref}'")
self._dop = odxrequire(ddds.all_data_object_properties.get(self.dop_snref)) after you know the short name of the DOP that cannot be resolved, you can hunt it down in your PDX file:
I suspect that it is a DYNAMIC-ENMARKER-FIELD, which -- as far as I know -- is currently the only type of DOP which is not yet implemented... |
@@ -61,15 +60,31 @@ def _resolve_odxlinks(self, odxlinks: OdxLinkDatabase) -> None: | |||
self._table_key = odxlinks.resolve(self.table_key_ref, TableKeyParameter) | |||
|
|||
@override | |||
@final | |||
def _resolve_snrefs(self, diag_layer: "DiagLayer") -> None: |
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.
We should consider in the future making _resolve_snrefs
take a "context" or "lookup" object, where diag_layer is a property.
We are getting too many "_resolve_snrefs" special cases
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.
agreed. this is a major refactoring, though. I'll open an issue...
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.
ok, done: #290
This requires to use a custom
_resolve_snrefs()
function because the parameter object itself cannot know the context from where it is called...Andreas Lauser <andreas.lauser@mercedes-benz.com>, on behalf of MBition GmbH.
Provider Information