Ldfparser

Latest version: v0.25.0

Safety actively analyzes 629855 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 3 of 6

0.13.1

Fixed

- `P2_min`, `ST_min` and `N_As` and `N_Cr` timeout default values are now set correctly

0.13.0

- Any reference to `ldf['schedule_tables'][id]['schedule'][entry]['delay']` that assumes that
milliseconds are used as the unit has to be updated to either multiply the current value by `1000`
or somehow change the assumption about the unit to seconds.
All numeric values that have an associated unit have their SI prefix removed during parsing, for
example `kbps` is converted into `bps`. The schedule entry delay was one case where it wasn't
handled accordingly.

0.12.0

Added

- Diagnostic frames and signals are now parsed
- Standard diagnostic commands can be encoded and decoded

Changed

- `LinUnconditionalFrame` can be encoded using a `List` of signal values
- Comment capturing has been reworked to use the Lexer callback feature of the Lark parser

0.11.1

Added

- Scientific notation is now allowed when providing floating point values

0.11.0

Added

- Units of Physical values can now be preserved when decoding frames
- `LinSignal` now has a reference to it's signal representation
- New encoding and decoding functions have been added, these allow conversions without passing
`ldf.converters`, instead it will try to use the default encoders but still allow users to override
the encoding type locally.

Fixed

- The new encoding allows frames to be encoded/decoded even when encoding types are missing (issue 72 )

Deprecated

- `LinUnconditionalFrame`'s `parse`, `parse_raw`, `data` and `raw` functions were deprecated in
favor of the new encoding functions

0.10.0

Imports and classes

- A few modules were reorganized, this might cause certain `import` statements to be broken, imports
that only use the `ldfparser` package are backwards compatible

- Previously `LinFrame` represented unconditional frames and was used to encode and decode frames,
this was changed in order to support the other frame types later. `LinFrame` now only contains
the most basic properties, name and identifier, while the rest has been transferred out into
`LinUnconditionalFrame` and `LinEventTriggeredFrame`. This change should only affect scripts that
directly reference the `LinFrame` class, when using queries through the `LDF` objects the behavior
is identical.

Dictionary object

- `protocol_version` and `language_version` were 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 in `0.10.0` in
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 with `ldf.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 returning `None` the new methods will raise a `LookupError`
- 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

Parsing

- Replace `ldf.parseLDF(x)` with `ldf.parse_ldf(x)`, signatures are slightly different but functionally identical
- Replace `ldf.parseLDFtoDict(x)` with `ldf.parse_ldf_to_dict(x)`

Page 3 of 6

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.