This is the first PR of a mini series to refactor the decoding code of odxtools. In this PR, we refactor the DecodeState class with the aim of not having to create copies during the decoding process:
the attributes cursor_position and origin_position are introduced. The former points to the first undecoded byte whilst the latter points to the byte to which relative positions given by the BYTE-POSITION tag refer to.
the parameter_values property is removed. Instead, the parameter values are kept as local variables in the respective decoding functions.
length_keys and table_keys attributes are introduced, to keep track of inter-parameter dependencies
note that the "do not create copies" aim is not yet fully reached after this PR, but it will be at the end of this PR series...
This is the first PR of a mini series to refactor the decoding code of odxtools. In this PR, we refactor the
DecodeState
class with the aim of not having to create copies during the decoding process:cursor_position
andorigin_position
are introduced. The former points to the first undecoded byte whilst the latter points to the byte to which relative positions given by the BYTE-POSITION tag refer to.parameter_values
property is removed. Instead, the parameter values are kept as local variables in the respective decoding functions.length_keys
andtable_keys
attributes are introduced, to keep track of inter-parameter dependenciesnote that the "do not create copies" aim is not yet fully reached after this PR, but it will be at the end of this PR series...
Andreas Lauser <andreas.lauser@mercedes-benz.com>, on behalf of MBition GmbH. Provider Information