Skip to content

Releases: c4deszes/ldfparser

v0.15.0

20 Aug 20:48
1128168
Compare
Choose a tag to compare

Added

  • BCD values are now checked when decoding physical values

Changes

  • Master and slaves declarations are now optional
  • Channel name can now be any string, including an empty string instead of requiring a valid C
    identifier.

v0.14.0

26 Feb 11:33
06e9cd0
Compare
Choose a tag to compare

Added

  • LDF objects can now be saved as .ldf files (experimental)
  • Encoding types now have references to the Signals it represents
  • LDF object now has functions to lookup encoding types
  • LinSignal now reference the LinUnconditionalFrame they're in

Changed

  • Bumped lark-parser dependency to first major version, see Lark release notes
  • LdfTransformer has been moved to a separate module

Migration guide for 0.14.0

  • The breaking change in lark that impacts ldfparser is the change in the dependency's name.
    Since the module name is still lark it causes two dependencies to refer to the same package
    files. If you now install lark or ldfparser==0.14.0 and then you uninstall lark-parser
    you will have to reinstall the lark dependency.

v0.13.1

12 Feb 10:42
eb4901b
Compare
Choose a tag to compare

Fixed

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

v0.13.0

05 Feb 09:51
6d95fe1
Compare
Choose a tag to compare

Added

  • Schedule tables are now parsed into Python objects

Changed

  • The delay of schedule entries in the dictionary now have a floating point type and their unit
    has been normalized to seconds

Fixed

  • Added missing UnassignFrameId command to JSON schema

Migration guide for 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.

v0.12.0

21 Nov 11:19
91712f0
Compare
Choose a tag to compare

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

v0.11.1

02 Nov 19:03
6310985
Compare
Choose a tag to compare

Added

  • Scientific notation is now allowed when providing floating point values

v0.11.0

17 Oct 15:09
7225eac
Compare
Choose a tag to compare

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

v0.10.0

02 Oct 21:39
7ce0638
Compare
Choose a tag to compare

Added

  • LinVersion class was added that allows better version handling than the previous floating point
    values
  • Event Triggered Frames are now parsed correctly and stored in LinEventTriggeredFrame objects
  • 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 LinFrame class into LinUnconditionalFrame
  • 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 None when event triggered frames were referenced

Deprecated

  • parseLDF, parseLDFtoDict, parseComments were 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 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)

v0.9.1

11 Sep 07:36
bf81265
Compare
Choose a tag to compare

Added

  • Missing node attributes: Response Error, Fault State Signals and Configurable frames are now
    linked to the LinSlave object ( #66 )

v0.9.0

30 Jul 21:27
e1ad4a0
Compare
Choose a tag to compare

Fixed

  • Fixed ASCII and BCD encoding types missing from the syntax ( #56 ) by @Jules-L
  • Fixed subscribed_to variable on LinSlave containing the wrong objects ( #59 )
  • Fixed whitespace not being allowed in the Nodes section before the colons ( #61 )
  • Fixed parsing initial values of array type signals ( #62 ) credit to @Jules-L for drafting a PR