Release Notes¶
This is the release notes for the pycanlib module.
Contents
New Features and Fixed Problems in V1.30.851 (21-MAY-2025)¶
Minor changes.
New Features and Fixed Problems in V1.29.758 (17-FEB-2025)¶
Minor changes.
New Features and Fixed Problems in V1.28.675 (26-NOV-2024)¶
Minor changes.
New Features and Fixed Problems in V1.27.606 (18-SEP-2024)¶
Minor changes.
New Features and Fixed Problems in V1.26.487 (22-MAY-2024)¶
Added new enums to canlib.
New Features and Fixed Problems in V1.25.393 (18-FEB-2024)¶
Minor changes.
New Features and Fixed Problems in V1.24.935 (13-SEP-2023)¶
Minor changes.
New Features and Fixed Problems in V1.23.804 (05-MAY-2023)¶
canlib:Added support for time domains
TimeDomain.
New Features and Fixed Problems in V1.22.565 (08-SEP-2022)¶
canlib:Added support for object buffers
canlib.objbuf.
New Features and Fixed Problems in V1.21.463 (29-MAY-2022)¶
General:
Added CAN FD versions of examples:
canlib:Added exceptions
canlib.CanTimeoutandcanlib.CanOverflowError.Added new bitrate constant
BITRATE_2M_60P.Added support for
canlib.MessageFlag.LOCAL_TXACK. This requires CANlib SDK v5.39 or newer.Checking for
canlib.MessageFlag.OVERRUNusinginwill now returnTrueif eitherSW_OVERRUNorHW_OVERRUNis set.
kvadblib:Added read only property
kvadblib.Message.canflagswhich returns relevantVFrameFormatattributes converted intocanlib.MessageFlag(e.g. the J1939VFrameFormatattribute does not have a corresponding flag and is excluded).kvadblib.Message.asframe()now include CAN FD flags on the returnedFrame. Note that this requires CANlib SDK v5.39 or newer.
New Features and Fixed Problems in V1.20.360 (15-FEB-2022)¶
General:
Python 3.10 is now officially supported.
Fixed
canlib.connected_devices()to ignore removed devices, instead of raising an exception.Added
canlib.exceptions.CanGeneralErrorto documentation, noting that this should not be caught explicitly.Extracted tutorial sample code into standalone files, updated bus parameters in CAN FD code to work with U100.
canlib:Removed internal attribute
Channel.flags, usecanlib.ChannelData.channel_flagsinstead.Corrected return value of
is_can_fdwhen channel was opened explicitly usingNO_INIT_ACCESS. Now also always returns abool.Added
ChannelData.bus_param_limits(wraps canCHANNELDATA_BUS_PARAM_LIMITS)Added t Programming chapter to documentation.
Corrected name of bitrate constant inside table in “Set CAN Bitrate” chapter.
linlib:Deprecated
getCanHandle, useget_can_channelinstead.
kvlclib:kvlclib.WriterFormat.getPropertyDefaultandkvlclib.ReaderFormat.getPropertyDefaultnow returnsNoneif property do not support get/set, as e.g.SIGNAL_BASED.Added support for experimental format KME60
Clarified usage of
kvlclib.Converter.addDatabaseFile().
kvadblib:Added support for Attribute Definition of type HEX,
kvadblib.AttributeType.HEX.Comment and Unit on a signal now converts cp1252 coding to utf-8.
Added support for experimental format KME60
New Features and Fixed Problems in V1.19.205 (13-SEP-2021)¶
General:
Updated docstrings, mainly of lower level classes.
Modernized code, mainly conversions to f-strings.
canlib.dllLoader:Setting the environment variable
READTHEDOCS==Trueinhibits loading of shared libraries. Used e.g. when building documentation on ReadTheDocs.
canlib.kvamemolibxml:The functions
xmlGetLastError,xmlGetValidationWarningandxmlGetValidationErrornow returns enum classes when possible.
canlib.kvrlib:Minor readability updates for
kvrDeviceInfo.__str__
New Features and Fixed Problems in V1.18.846 (25-MAY-2021)¶
canlib.canlib:Added LEDs 4 through 11 to
canlib.canlib.LEDAction(needs CANlib v5.19+).
canlib.kvadblib:Default value of EnumAttribute is now returned as
intAdded wrapper for kvaDbGetMsgByPGNEx
canlib.kvlclib:Added wrapper for kvlcFeedLogEvent
Added
canlib.j1939module for some j1939 helpers.
New Features and Fixed Problems in V1.17.748 (16-FEB-2021)¶
canlib.canlib:Corrected
set_bus_params_tqregarding type of flag attribute.Added support for using
setBusParamsandgetBusParamsfor channels that were opened usingBusParamsTq.Added
BitrateandBitrateFDenums for use withsetBusParamsandopenChannel.canlib.canBITRATE_xxxandcanlib.canFD_BITRATE_xxxconstants are still supported but deprecated.Added enum member BITRATE_8M_80P to
BitrateFDand constant canlib.canFD_BITRATE_8M_80P.
canlib.kvlclibAdded exception
KvlcFileExists.
New Features and Fixed Problems in V1.16.588 (09-SEP-2020)¶
canlib.canlib:Added support for new bus parameter API in CANlib v.5.34. See section Set CAN Bitrate for more information.
Added attributes to
canlib.IOControl.__dir__andcanlib.ChannelData.__dir__in order to better support auto completion in IDEs.Deprecated
canlib.Device.channel, usecanlib.Device.open_channelinstead, which correctly handles keyword argumentsAdded new Open flag
canlib.canlib.Open.NOFLAGfor parameterflags.
canlib.kvadblib:Corrected
interpretwhen looking for CAN messages with extended id.Updated
get_messageso that it requiresEXT(bit 31) to be set onidif using extended id:s.Added a new argument
flagstoget_message_by_id. If using messages with extended id:s,EXTshould be set onflags.
canlib.kvlclib:The
file_formatparameter incanlib.kvlclib.Converter.setInputFilenow acceptsReaderFormatas well.Added a newer version of the BLF format, now also with CAN FD support ‘canlib.kvlclib.FileFormat.VECTOR_BLF_FD’. The format has both read and write capabilities.
New Features and Fixed Problems in V1.15.483 (27-MAY-2020)¶
Dropped support for v2.7, v3.4 and v3.5, added v3.7 and v3.8.
New Features and Fixed Problems in V1.14.428 (02-APR-2020)¶
Minor changes.
New Features and Fixed Problems in V1.13.390 (24-FEB-2020)¶
canlib.canlib:Added
HandleDatato wrap canGetHandleData. Also addedchannel_dataas a helper function.IOControl now returns utf-8 decoded strings instead of “bytes in string”.
Fixed a bug where
isconnectedwould returnFalseif thechannel_numberattribute was larger than the total number of available CANlib channels, regardles of if the device was connected or not.
canlib:Corrected
Framecomparison (!=) with other types, e.g. None
New Features and Fixed Problems in V1.12.251 (08-OCT-2019)¶
Minor changes.
New Features and Fixed Problems in V1.11.226 (13-SEP-2019)¶
canlib.canlib:Added a slight delay in get_bus_statistics because the underlying functions in CANlib are asynchronous.
Added
read_error_countersandiocontrolclear_error_counters.Added
getBusOutputControl.Added
fileDiskFormatthat formats the disk in a remote device, i.e Kvaser DIN Rail.
canlib.BoundSignal.value:If the signal is an enum-signal, and the signal’s value is not found in the enum definition, the raw value is now returned.
canlib.kvmlib:Marked using kvmlib class as deprecated (was deprecated in v1.6)
Replaced
estimate_eventswithKme.event_count_estimationin order to have same name asLogFile.event_count_estimation. Old function name is now deprecated.When found, new 64 bit version of the dll call,
kvmLogFileMountEx,kvlcEventCountEx, andkvmKmeCountEventsEx(added in CANlib v5.29), is now used.Added
log_typefor supporting the different log types generated by Kvaser Memorator Light HS v2.
canlib.kvadblib:DbcraisesKvdDbFileParseif the dbc file loaded contains syntax errors.
New Features and Fixed Problems in V1.10.102 (12-MAY-2019)¶
Reference documentation has been restructured.
-
Added support for slicing environment variables declared as char. Replaced low level function
scriptEnvvarSetDatawithscript_envvar_set_dataand addedDataEnvVarwhich is now returned when a char envvar is returned.
canlib.kvadblib:Error messages from the CAN database parser in
Dbccan be retrieved usingget_last_parse_error().
New Features and Fixed Problems in V1.9.909 (03-MAR-2019)¶
canlib.kvadblib:Error texts are now fetched from the dll using kvaDbGetErrorText().
canlib.kvlclib:Added support for DLC mismatch handling included in CANlib v5.27
canlib.kvDevice:The
canlib.kvDevice.kvDeviceclass is now deprecated, usecanlib.Deviceinstead
-
Added method
Device.issubsetas a helper to find loosely specified devices.
-
Added attributes
fw_versionandserialtoIoPin. To read these attributes, CANlib v5.27 is needed.AddonModuleis a new class, holding attributes of one add-on module.Config.modulesis now an attribute, calculated at creation time and containing an ordered list ofAddonModuleobjects. The old functionality has been moved toConfig._modulesConfig.issubsetis a new method to identify if a configuration contains the expected add-on modules.
New Features and Fixed Problems in V1.8.812 (26-NOV-2018)¶
canlib.canlib:Fixed issue were Channel.handle attribute would not be initialized when opening of the channel failed.
Added experimental support for accessing IO-pins on sub modules of the Kvaser DIN Rail SE 400S that was added to CANlib v5.26. This includes a new module
canlib.canlib.iopin.
canlib.kvadblib:Fixed issue with signals were multiplexing mode, and scaling (factor and offset) returned wrong values from a loaded .dbc file.
Added show_all argument to Dbc.messages. Dbc.__iter__ now set show_all to False in order to skip VECTOR__INDEPENDENT_SIG_MSG messages.
New Features and Fixed Problems in V1.7.741 (16-SEP-2018)¶
canlib.kvmlib:Added
canlib.kvmlib.event_count_estimationAdded
canlib.kvmlib.kmePrevious kvmlib.kmeXXX functions are now deprecated.
canlib.canlib:Added enums to
canlib.canlib.ChannelCapFixed
canlib.canlib.canWriteSync
canlib.kvlclib:Added API to access information about reader formats.
Added kvlclib.Property to replace old PROPERTY_XXX constants which are now deprecated.
Added kvlclib.reader_formats and kvlclib.writer_formats to replace now deprecated kvlclib.WriterFormat.getFirstWriterFormat and kvlclib.WriterFormat.getNextWriterFormat.
New Features and Fixed Problems in V1.6.615 (13-MAY-2018)¶
Updated for CANlib SDK v5.23.
Getting version numbers should now be done with
dllversion(), which will returncanlib.BetaVersionNumberif the dll is marked as Beta. Also addedcanlib.prodversion()to return the CANlib product version number.canlib.device:New
canlib.device.Deviceclass (available ascanlib.Device) that is a simpler version of kvDevice.canlib.device.Deviceobjects can be defined using an EAN and serial number, or a connected device can be searched for usingcanlib.device.Device.find. These objects do not require the device to stay connected, and can be used to later create most othercanlibobjects, e.g.canlib.canlib.Channel,canlib.kvmlib.Memorator, etc.New
canlib.device.connected_deviceswhich returns an iterator ofcanlib.device.Deviceobjects, one for each device currently connected.
canlib.ean:canlib.ean.EANobjects can be tested for equality, both with othercanlib.ean.EANobjects and with strings.Added
CanNotFoundexception.canlib.ean.EANobjects can now be directly instantiated from string, i.e.ean = canlib.EAN(ean_string)instead ofean = canlib.EAN.from_string(ean_string).canlib.ean.EANobjects can be converted back into any of the representations that can be used to create them. See the documentation ofcanlib.ean.EANfor more info.canlib.ean.EANobjects can be indexed and iterated upon, yielding the digits asints.
canlib.canlib:canlib.canlib.EnvVarobject raisesEnvvarNameErrorwhen given an illegal name, instead ofAssertionError.canlib.canlib.openChannelcan now set the bitrate of the channel opened.canlib.canlib.Channelobjects automatically close their handles when garbage collectedcanlib.canlib.Channelhas new methodscanlib.canlib.Channel.scriptRequestTextandcanlib.canlib.Channel.scriptGetTextto get text printed withprintf()by a script. This text is returned as acanlib.canlib.ScriptTextobject.
canlib.kvamemolibxml:A new, object oriented way of dealing with kvamemolibxml using
canlib.kvamemolibxml.Configurationobjects.
canlib.kvmlib:Improved object model
New
canlib.kvmlib.openDevicefunction that returns acanlib.kvmlib.Memoratorobject representing a connected Memorator device. See the documentation ofcanlib.kvmlib.Memoratorfor instructions on how to use this new class to more easily interface with your Memorators.New
canlib.kvmlib.openKmffunction for opening .KMF files that returns acanlib.kvmlib.Kmfobject that is similar tocanlib.kvmlib.Memorator. See the docstring ofcanlib.kvmlib.Kmffor more information.
canlib.linlib:Getting version number with
canlib.linlib.dllversion(requires CANlib SDK v5.23 or newer).Explicit
canlib.linlib.Channel.closefunction for forcing a linlib channel’s internal handle to be closed.
canlib.canlib:Added support for accessing information within compiled t program (.txe) files.
Added wrapper function for
kvScriptTxeGetData.Added compiled t program (.txe) interface class
canlib.canlib.Txe.
canlib.kvadblib:enums now returns non-empty dictionary in attribute definition returned from
EnumDefinition.definition
New Features and Fixed Problems in V1.5.525 (12-FEB-2018)¶
Updated for CANlib SDK v5.22.
Added support for LIN bus API (LINlib)
Added support for Database API (kvaDbLib) Needs version v5.22 of CANlib SDK to get supported dll.
Restructuring of code in order to make the API simpler and the code base more maintainable have resulted in the following changes (old style is deprecated, shown in details while running Python with the -Wd argument):
canlib.kvMessagehas been renamedcanlib.Framecanlib.Frameobjects are now accepted and returned when writing and reading channels.The new
canlib.kvadblibmodule uses thesecanlib.Frameobjects heavily.
canlib.canlib:Added wrapper functions for
canReadStatusandcanRequestChipStatusDeprecated use of
canlib.canlib.canlib()objects; all methods have been moved to the module.See the docstring of
canlib.canlib.CANLibfor more information
Simplified the names of the channel-classes (old names are deprecated):
The channel class is now
canlib.canlib.Channel, instead ofcanlib.canChannel.canlib.canlib.ChannelData_Channel_Flagsis nowcanlib.canlib.ChannelFlagscanlib.canlib.ChannelData_Channel_Flags_bitsis nowcanlib.canlib.ChannelFlagBits
canlib.canlib.Channelnow usescanlib.Frameobjects for reading and writing.canlib.Channel.readnow returns acanlib.Frameobject instead of a tuple. However,canlib.Frameobjects are largely compatible with tuples.canlib.Channel.writetakes a single argument, acanlib.Frameobject. The previous call signature has been taken over bycanlib.Channel.write_raw.Likewise for
canlib.Channel.writeWaitand its new friendcanlib.Channel.writeWait_raw.
The class
canlib.canlib.canVersionhas been removed, andcanlib.canlib.getVersionnow returns acanlib.VersionNumber. The new class still supports conversion to string and accessing.majorand.minorattributes.
canlib.kvmlib:Added wrapper functions for kvmKmeReadEvent.
Corrected encoding for Python 3 in kmeOpenFile().
Deprecated names for several classes to make them more logical and more pythonic:
canlib.kvmlib.memoMsgis nowcanlib.kvmlib.LogEventcanlib.kvmlib.logMsgis nowcanlib.kvmlib.MessageEventcanlib.kvmlib.rtcMsgis nowcanlib.kvmlib.RTCEventcanlib.kvmlib.trigMsgis nowcanlib.kvmlib.TriggerEventcanlib.kvmlib.verMsgis nowcanlib.kvmlib.VersionEvent
The class
canlib.kvmlib.kvmVersionhas been removed, andcanlib.kvmlib.KvmLib.getVersionnow returns acanlib.VersionNumber. The new class still supports conversion to string and accessing.major,.minor, and.buildattributes.
canlib.kvlclib:Added method
canlib.kvlclib.addDatabaseFileand helper objectcanlib.kvlclib.ChannelMask.The
canlib.kvlclib.KvlcLibobject has been deprecated.All functions that relate to converters have been moved to the more appropriately named
canlib.kvlclib.Converter.Some of these functions have been renamed:
IsOutputFilenameNew,IsOverrunActive, andIsDataTruncatedhave all had their initial “i” lower-cased, as the upper case “I” was an error.getPropertyDefaultandisPropertySupportedare no longer available on theConverterobject, they must be accessed via theformatattribute:converter.format.getPropertyDefault(...)
canlib.kvlclib.WriterFormat.getFirstWriterFormatandcanlib.kvlclib.WriterFormat.getNextWriterFormatnow returns akvlclib.FileFormatobject (which is based on theIntEnumclass).Other functions have been moved to the
canlib.kvlclibmodule.deleteConverteris no longer supported. Instead, converters are automatically deleted when garbage collected. If their contents must be flushed to file, see the newcanlib.kvlclib.Converter.flushmethod.
The class
canlib.kvlclib.KvlcVersionhas been removed, andcanlib.kvmlib.kvlclib.getVersionnow returns acanlib.VersionNumber. The new class still supports conversion to string and accessing.major,.minor, and.buildattributes.
canlib.kvrlib:The
canlib.kvrlib.KvrLibobject has been deprecated; all methods have been moved to the module.canlib.kvrlib.getVersionno longer returns acanlib.kvrlib.kvrVersionbut acanlib.VersionNumber. The return value still supports conversion to string and accessing.majorand.minorattributes.
canlib.kvamemolibxml:Renamed from
canlib.KvaMemoLibXml, however trying to import the old name will just import the new one instead.Deprecated the use of
canlib.kvamemolibxml.KvaMemoLibobjects, all methods have been moved to thecanlib.kvamemolibxmlmodule itself.Breaking change: Moved values that were incorrectly defined as constants into enums. In most cases this should not have any impact, as all the values are internal error codes and are turned into Python exceptions. But if you nonetheless use the kvamemolibxml status values directly, you’ll need to change your code as follows:
KvaXmlStatusERR_XXX_XXXis nowError.XXX_XXX.KvaXmlValidationStatusERR_XXX_XXXis nowValidationError.XXX_XXXKvaXmlValidationStatusWARNis nowValidationWarning.XXX_XXX.KvaXmlStatusFailis nowError.FAIL(Changed to be consistent with other KvaXmlStatus errors). The same is true forValidationError.FAIL.KvaXmlStatusOKandKvaXmlValidationStatusOKare still treated as if they are constants, as they are not error statuses.
canlib.kvamemolibxml.getVersionno longer returns a string but acanlib.VersionNumber. The return value still supports conversion to string.
Exceptions:
Exceptions throughout the package have been standardised, and now all inherit from
canlib.exceptions.CanlibException.The
canERRattribute that some exceptions had has been deprecated in favour of astatusattribute. Furthermore, allcanlibexceptions now have this attribute; the status code that was returned from a C call that triggered the specific exception.
New Features and Fixed Problems in V1.4.373 (13-SEP-2017)¶
Minor changes.
New Features and Fixed Problems in V1.3.242 (05-MAY-2017)¶
Added missing unicode conversions for Python3.
Linux
Added support for new libraries (kvadblib, kvmlib, kvamemolibxml, kvlclib).
Added wrappers KvFileGetCount, kvFileGetName, kvFileCopyXxxx, kvDeviceSetMode, kvDeviceGetMode
canlib:
Added wrapper for kvFileDelete
Enhanced printout from canScriptFail errors.
Second file argument in fileCopyFromDevice and fileCopyToDevice is now optional.
OS now loads all dependency dll (also adding KVDLLPATH to PATH in Windows).
New Features and Fixed Problems in V1.2.163 (15-FEB-2017)¶
Added wrapper function canlib.getChannelData_Cust_Name()
Added module canlib.kvlclib which is a wrapper for the Converter Library kvlclib in CANlib SDK.
Added wrapper function canChannel.flashLeds().
Added missing unicode conversions for Python3.
Fixed bug where CANlib SDK install directory was not always correctly detected in Windows 10.
New Features and Fixed Problems in V1.1.23 (28-SEP-2016)¶
canSetAcceptanceFilter and kvReadTimer was not implemented in Linux
New Features and Fixed Problems in V1.0.10 (15-SEP-2016)¶
Initial module release.
Added kvmlib.kmeSCanFileType()
Added canChannel.canAccept() and canChannel.canSetAcceptanceFilter()