All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Signals overlapping error message now includes relevant information
- scientific/engineeering notation values can now have upper case E
- Padding in a frame can now be changed from zeros to padding with ones
- Support for J2602 slave node attributes:
wakeup_time
,poweron_time
- Add support for encode/decode frame with byte array signals
- Support for SAE J2602 legacy version
- Grammar support for the following J2602 fields:
max_header_length
,response_tolerance
for the master noderesponse_tolerance
for slave node attributes
- ISO17987 version support
- Grammar support for the following ISO17987 fields:
LDF_file_revision
- Endianness
LDF::get_frame
can now return diagnostic frames
LinSlave
protocol version property is now the correct typeLinUnconditionalFrame::decode
no longer calls the deprecatedparse_raw
function
- Remove
tests
folder from python package - Close all files which are opened by the ldfparser
- Diagnostic addresses section in LIN 1.3 description files are now parsed correctly,
the
initial_nad
andconfigured_nad
attributes will be set according to the address
- Sporadic frames are parsed into Python objects
- Path to the grammar and LDF template are now resolved absolute to allow using them in
pyinstaller
LDF::get_frame
can also return sporadic frames
- The loaded diagnostic frames' lengths are now correctly set
- BCD values are now checked when decoding physical values
- 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.
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 typesLinSignal
now reference theLinUnconditionalFrame
they're in
- Bumped
lark-parser
dependency to first major version, see Lark release notes LdfTransformer
has been moved to a separate module
- The breaking change in
lark
that impactsldfparser
is the change in the dependency's name. Since the module name is stilllark
it causes two dependencies to refer to the same package files. If you now installlark
orldfparser==0.14.0
and then you uninstalllark-parser
you will have to reinstall thelark
dependency.
P2_min
,ST_min
andN_As
andN_Cr
timeout default values are now set correctly
- Schedule tables are now parsed into Python objects
- The delay of schedule entries in the dictionary now have a floating point type and their unit has been normalized to seconds
- Added missing
UnassignFrameId
command to JSON schema
- 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 by1000
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 examplekbps
is converted intobps
. The schedule entry delay was one case where it wasn't handled accordingly.
- Diagnostic frames and signals are now parsed
- Standard diagnostic commands can be encoded and decoded
LinUnconditionalFrame
can be encoded using aList
of signal values- Comment capturing has been reworked to use the Lexer callback feature of the Lark parser
- Scientific notation is now allowed when providing floating point values
- 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.
- The new encoding allows frames to be encoded/decoded even when encoding types are missing (issue #72 )
LinUnconditionalFrame
'sparse
,parse_raw
,data
andraw
functions were deprecated in favor of the new encoding functions
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
- 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 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 configurable frames being resolved with
None
when event triggered frames were referenced
-
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.
-
A few modules were reorganized, this might cause certain
import
statements to be broken, imports that only use theldfparser
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 intoLinUnconditionalFrame
andLinEventTriggeredFrame
. This change should only affect scripts that directly reference theLinFrame
class, when using queries through theLDF
objects the behavior is identical.
protocol_version
andlanguage_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
- 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 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 returning
None
the 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
- 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)
- Missing node attributes: Response Error, Fault State Signals and Configurable frames are now
linked to the
LinSlave
object ( #66 )
- Fixed ASCII and BCD encoding types missing from the syntax ( #56 )
- Fixed
subscribed_to
variable onLinSlave
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 )
- Standard JSON schema for parsed LDFs
- Missing encoders causing
KeyError
instead ofValueError
- Frame encoder incorrectly encoding zero valued signals into their initial values ( #40 )
- CLI interface for basic LDF tasks (#33), entrypoint is added, documentation available in the docs folder
- Frames are now linked to the publishing node
- Variant value now defaults to 0 instead of None
- Signals incorrectly being appended to the published frame list
- Signal and LIN node objects are now linked when subscribers and publishers are specified
- The following node attributes are now parsed into the LDF objects
- P2_min
- ST_min
- N_As_timeout
- N_Cr_timeout
- UnassignFrameId command which is in LIN 2.0 spec
- Schedule table commands are now parsed
- Signals with no subscribers are now allowed, while this is not to spec. OEMs use it ( @kayoub5 )
- Node attributes section can now be empty ( @kayoub5 )
- AssignFrameIdRange now accepts either 0 or 4 PID values
- Allows specifying the file encoding when parsing LDF files ( #19 )
- AssignFrameIdRange command syntax in schedule tables ( #18 )
- Updated comment syntax to the one used in lark commons ( #17 ) this requires lark-parser >= 0.10.0
- Support for parsing comments in LDF
- Empty block comments not being allowed
- Support for reading node attributes
- Support for array type signals
- Support for BCD and ASCII values
- Factory method for parsing LDF files, this breaks scripts still using 0.4.1 and below
- Method for converting LDF into dictionary
- Reworked Lark parser to better support different LDF versions, 1.3 to 2.2 should be supported
- Multiple slaves not being allowed in the LDF, specified in the LIN standard
- Support for different comment syntaxes
- Signal encoding/decoding using MSB instead of LSB order specified in the LIN 2.1 standard
- Negative values are now supported in physical value's scale and offset fields
- Support for reading LDF metainformation (version, baudrate)
- Signal encoding support
- Initial LDF Parser package
- Frame encoding and decoding support