v0.10.0
Added
LinVersionclass was added that allows better version handling than the previous floating point
values- Event Triggered Frames are now parsed correctly and stored in
LinEventTriggeredFrameobjects - Pylint has been introduced into the CI pipeline
Changed
- Tabs have been replaced with spaces in order to conform with PEP8
- Frame, Signal and LDF classes were moved into their on modules
- Unconditional frame handling has been moved from
LinFrameclass intoLinUnconditionalFrame - Language and protocol version is now parsed as strings, see migration guide for more information
- LDF class has been completely replaced, see migration guide on how to update
Fixed
- Fixed configurable frames being resolved with
Nonewhen event triggered frames were referenced
Deprecated
-
parseLDF,parseLDFtoDict,parseCommentswere deprecated in favor of the same methods with a
snake case signature -
LDF::frame(x),LDF::signal(x),LDF::slave(x)were deprecated, they were replaced with proper
getters but those contracts are slightly different
It's recommended to replace the deprecated functions as they will be removed in 1.0.0, most of
them have drop in replacements.
Migration guide for 0.10.0
Imports and classes
-
A few modules were reorganized, this might cause certain
importstatements to be broken, imports
that only use theldfparserpackage are backwards compatible -
Previously
LinFramerepresented unconditional frames and was used to encode and decode frames,
this was changed in order to support the other frame types later.LinFramenow only contains
the most basic properties, name and identifier, while the rest has been transferred out into
LinUnconditionalFrameandLinEventTriggeredFrame. This change should only affect scripts that
directly reference theLinFrameclass, when using queries through theLDFobjects the behavior
is identical.
Dictionary object
protocol_versionandlanguage_versionwere changed to be of string type, the previous floating
point values were good for comparing versions but it's overall problematic due to precision issues,
if you still need floating point values then you must convert them in your scripts
LDF object
- Previously the LDF class contained only a few methods that allowed searching in the collections,
but everything else had to be accessed through the member fields. This is changed in0.10.0in
order to allow a better deprecation process in the future.- All fields have been prefixed with
_to mark them as internal, they should not be accessed
directly - Getters were added, they are direct replacements of the old member fields, e.g.:
ldf.signals
was replaced withldf.get_signals() - Lookup methods in the LDF are now more performant because they don't rely on linear search, however
the behavior was changed, instead of returningNonethe new methods will raise aLookupError - Properties are used to keep compatibility with older versions where these fields are referenced,
in the future there may be warnings enabled and possibly removed in later releases
- All fields have been prefixed with
Parsing
- Replace
ldf.parseLDF(x)withldf.parse_ldf(x), signatures are slightly different but functionally identical - Replace
ldf.parseLDFtoDict(x)withldf.parse_ldf_to_dict(x)