mercedes-benz / odxtools

odxtools is a collection of utilities to interact with the diagnostic functionality of automotive electronic control units using python
MIT License
171 stars 70 forks source link

DiagLayer: remember the database #312

Closed andlaus closed 3 months ago

andlaus commented 3 months ago

this is a spin-off of #310: We provide a backlink from the diagnostic layer to the database which contains the layer in question (this is necessary to access the contents of auxiliary files from objects contained by the diag layer). Note that this seemingly trivial change is surprisingly difficult to implement, as it requires some custom __deepcopy__() methods, or else the whole database would be copied if some relatively trivial objects like ParentRef are copied...

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

andlaus commented 3 months ago

@kayoub5: do you see any further issues or do you consider this ready to be merged?

kayoub5 commented 3 months ago

@kayoub5: do you see any further issues or do you consider this ready to be merged?

main objection is https://github.com/mercedes-benz/odxtools/pull/310#discussion_r1628060365

kayoub5 commented 3 months ago

make the database property private, so you can remove it later once https://github.com/mercedes-benz/odxtools/pull/310#discussion_r1632861139 is done

and put a comment on it, that it is to be removed after _resolve_snrefs refactoring