Canopen

Latest version: v2.3.0

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

Scan your dependencies

Page 1 of 4

2.3.0

Compatibility Notes
This release requires Python 3.8 at the minimum. It is now using some language features introduced in 3.7 and a newer setuptools dependency that itself needs 3.8. A big benefit from this is better annotations for type checkers, now advertised through a py.typed marker. These are far from complete though and the library code itself still fails on many static typing checks.

The lower-level python-can library dependency (version 4.4.0) introduced an incompatible change, which is worked around in this release:
* Implement abstract method can.Listener.stop() in MessageListener by acolomb in https://github.com/christiansandberg/canopen/pull/422

Enhancements
* Support of custom can.Bus implementations to the Network class by vongostev in https://github.com/christiansandberg/canopen/pull/404
* 24 bit support by raffi-g in https://github.com/christiansandberg/canopen/pull/406
* Implement the remaining canopen datatypes by sveinse in https://github.com/christiansandberg/canopen/pull/440
* Mirror some OD access API to the SdoBase / SdoVariable classes by acolomb in https://github.com/christiansandberg/canopen/pull/423
* Implement equality operator for SdoAbortedError by acolomb in https://github.com/christiansandberg/canopen/pull/424
* Make pause after sending SDO request configurable by sveinse in https://github.com/christiansandberg/canopen/pull/429
* Fixup RETRY_DELAY on SDO send by sveinse in https://github.com/christiansandberg/canopen/pull/435
* Add support for using dot (.) to get subobjects from the OD by sveinse in https://github.com/christiansandberg/canopen/pull/426
* objectdictionary: Use node_id from DCF if not provided by thesummer in https://github.com/christiansandberg/canopen/pull/350
* Add codecov support (fixes 366) by sveinse in https://github.com/christiansandberg/canopen/pull/367

Bug Fixes
* objectdictionary: Fix incorrect ParameterValue when export_dcf by meifonglow in https://github.com/christiansandberg/canopen/pull/417
* SDO client fixes by samsamfire in https://github.com/christiansandberg/canopen/pull/408
* Ignore the most significant bit in PDO mapping lengths by acolomb in https://github.com/christiansandberg/canopen/pull/421
* Revert "change missing Baudrate to BaudRate" by hepr-skylotec in https://github.com/christiansandberg/canopen/pull/452
* pdo: Skip saving if no COB-ID was set (fixes 445) by friederschueler in https://github.com/christiansandberg/canopen/pull/446

Code Cleaning and Modernization
* Clean up imports of old modules by sveinse in https://github.com/christiansandberg/canopen/pull/433
* Rename Maps to PdoMaps and Map to PdoMap by sveinse in https://github.com/christiansandberg/canopen/pull/431
* Add meaningful "representation" formatter to object classes by sveinse in https://github.com/christiansandberg/canopen/pull/432
* Minor linting nitpicks and Python 2 removal by sveinse in https://github.com/christiansandberg/canopen/pull/441
* Fix "hearbeat" typos (fixes 389) by acolomb in https://github.com/christiansandberg/canopen/pull/453
* Cleanup f-strings, logging and formats by sveinse in https://github.com/christiansandberg/canopen/pull/443
* Modernize type annotations and fix some discrepancies by acolomb in https://github.com/christiansandberg/canopen/pull/451
* build: Modernize, use setuptools 69 by acolomb in https://github.com/christiansandberg/canopen/pull/428

New Contributors
* vongostev made their first contribution in https://github.com/christiansandberg/canopen/pull/404
* raffi-g made their first contribution in https://github.com/christiansandberg/canopen/pull/406
* meifonglow made their first contribution in https://github.com/christiansandberg/canopen/pull/417
* hepr-skylotec made their first contribution in https://github.com/christiansandberg/canopen/pull/452
* thesummer made their first contribution in https://github.com/christiansandberg/canopen/pull/350

A big Thank You goes out to sveinse and friederschueler for their very active participation in getting this release into shape.

**Full Changelog**: https://github.com/christiansandberg/canopen/compare/v2.2.0...v2.3.0

2.2.0

What's Changed
* Fixed HighLimit and LowLimit for SIGNED values in EDS by friederschueler in https://github.com/christiansandberg/canopen/pull/345
* Update profiles.rst by Alflanker94 in https://github.com/christiansandberg/canopen/pull/348
* Change type() into isinstance() by sveinse in https://github.com/christiansandberg/canopen/pull/357
* Remove use of object by sveinse in https://github.com/christiansandberg/canopen/pull/361
* Use with contexts for open by sveinse in https://github.com/christiansandberg/canopen/pull/356
* Remove old callbacks if re-adding a node with the same id by samsamfire in https://github.com/christiansandberg/canopen/pull/342
* Import cleanups by sveinse in https://github.com/christiansandberg/canopen/pull/362
* Fix pytest on windows (364) by sveinse in https://github.com/christiansandberg/canopen/pull/365
* Enable inline comments when reading files by XorJoep in https://github.com/christiansandberg/canopen/pull/380
* Feature/eds parse factor and description by marcovannoord in https://github.com/christiansandberg/canopen/pull/378
* Correct signed_int_from_hex implementation by friederschueler in https://github.com/christiansandberg/canopen/pull/394
* Rename Variable, Record and Array (363) by sveinse in https://github.com/christiansandberg/canopen/pull/368
* Implement reading PDO from OD defaults (273) by sveinse in https://github.com/christiansandberg/canopen/pull/370
* Use smaller of response size and size in OD by ljungholm in https://github.com/christiansandberg/canopen/pull/395

New Contributors
* friederschueler made their first contribution in https://github.com/christiansandberg/canopen/pull/345
* Alflanker94 made their first contribution in https://github.com/christiansandberg/canopen/pull/348
* sveinse made their first contribution in https://github.com/christiansandberg/canopen/pull/357
* XorJoep made their first contribution in https://github.com/christiansandberg/canopen/pull/380
* marcovannoord made their first contribution in https://github.com/christiansandberg/canopen/pull/378
* ljungholm made their first contribution in https://github.com/christiansandberg/canopen/pull/395

**Full Changelog**: https://github.com/christiansandberg/canopen/compare/v2.1.0...v2.2.0

2.1.0

What's Changed
* Adding retransmit functionality to SDO block download by samsamfire in https://github.com/christiansandberg/canopen/pull/324
* Check data length SDO server by samsamfire in https://github.com/christiansandberg/canopen/pull/338
* Corrected casing of BaudRate_xx keywords in DeviceInfo section of EDS… by Sudlav in https://github.com/christiansandberg/canopen/pull/303
* Making sure the FileInfo section is preserved in EDS export by Sudlav in https://github.com/christiansandberg/canopen/pull/304
* network: fix broken link to python-can readthedocs in docstring by clarkgwillison in https://github.com/christiansandberg/canopen/pull/319
* Fix Typo by mtru32 in https://github.com/christiansandberg/canopen/pull/332
* Fix typo by amaargiru in https://github.com/christiansandberg/canopen/pull/334

New Contributors
* Sudlav made their first contribution in https://github.com/christiansandberg/canopen/pull/303
* clarkgwillison made their first contribution in https://github.com/christiansandberg/canopen/pull/319
* samsamfire made their first contribution in https://github.com/christiansandberg/canopen/pull/324
* mtru32 made their first contribution in https://github.com/christiansandberg/canopen/pull/332
* amaargiru made their first contribution in https://github.com/christiansandberg/canopen/pull/334

**Full Changelog**: https://github.com/christiansandberg/canopen/compare/v2.0.0...v2.1.0

2.0.0

What's Changed
* Respect rtr_allowed in Pdo.Map.Save() by skalkoto in https://github.com/christiansandberg/canopen/pull/228
* Shutdown an already running periodic PDO before starting a new one by ventussolus in https://github.com/christiansandberg/canopen/pull/230
* added SDO Abort if a timeout occurs when sending a SDO request by jnu144 in https://github.com/christiansandberg/canopen/pull/239
* added argument for block transfer to enable/disable CRC Support by jnu144 in https://github.com/christiansandberg/canopen/pull/240
* Check writeability for SDO download on LocalNode by semiversus in https://github.com/christiansandberg/canopen/pull/241
* PDO: Allow subscription without calling read() or save() by acolomb in https://github.com/christiansandberg/canopen/pull/253
* Do not raise an exception in "_check_statusword_configured" just log … by Lauszus in https://github.com/christiansandberg/canopen/pull/268
* Export Eds or Dcf by unsanded in https://github.com/christiansandberg/canopen/pull/254
* eds: Fix exception in comment parsing with hexadecimal line count. by acolomb in https://github.com/christiansandberg/canopen/pull/279
* Document how to run the Python unit tests by henrikbrixandersen in https://github.com/christiansandberg/canopen/pull/280
* Fix canmatrix export by walmis in https://github.com/christiansandberg/canopen/pull/287
* Add 'relative' property for COB-ID vars relative to the node-ID by henrikbrixandersen in https://github.com/christiansandberg/canopen/pull/281

CiA 402

Thanks acolomb and af-silva.

Support for the CiA 402 device profile for "drives and motion control" was
overhauled in this release, bringing some backwards-incompatible changes.
The goal is to make the library more flexible and easier to use from an
application requiring DS402 functions, especially when controlling several
synchronized motors.

CAUTION: The following changes will likely require adaptation if you are
using the respective functions in your application code!

* The BaseNode402.homing() method no longer changs the DS402 power state
machine. A suitable state needs to be set by the application before using
it. (249)

* Remove the broken parameter set_new_home from the BaseNode402.homing()
implementation, which did not work as intended. (250)

* After homing, restore the previous operation mode only when explicitly
requested using the restore_op_mode parameter. (262)

* Minimize side-effects of operation mode switching. Do not clear the
target values and keep the power state unchanged. This must now be
handled in the application, but enables some use-cases where switching
modes on the fly is desirable. (251)

* Changes to the Controlword no longer trigger an immediate RPDO
transmission if already configured as periodic. That is the case when
.start() has been called or the .period property was set externally. For
an RPDO whose transmission type indicates that it needs a SYNC object to
apply, the immediate sending is also skipped. Check the .is_periodic
property to see whether this will change anything in your usage.

* The .op_mode property is now handled via PDO if possible, otherwise
setup_402_state_machine() logs a warning and falls back to SDO, just like
for the Statusword. Note that if the PDO is expected periodically, the
getter still blocks (up to 0.2 seconds) until a TPDO update was
received. (257)

* Reduce overhead in setup_402_state_machine() procedure by not switching
the NMT state or the power state automatically. The application should be
responsible for that. Only the NMT STOPPED state will now trigger an
error before trying to read SDOs. Reading the PDO configuration can even
be skipped altogether using the optional read_pdos parameter. (259)


Enhancements:

* The documentation page concerning device profiles was extended to include
the relevant API description for the BaseNode402 class.

* All timeout and waiting durations have been moved to constants in the
BaseNode402 class. They can thus now be overridden per instance.

* BaseNode402.is_homed() to check whether homing is necessary, switching the
operation mode automatically as required. (248)

* Make PDO subscription available without calling read() or save(). (253)

* The DS402 power state machine is now more flexible by trying to reach any
target state even if there is no direct transition. Some bugs were fixed
as well, such as not trying transitions which only the drive itself can
trigger. (264)


Run-time optimizations:

* Supported operation modes are now cached internally to avoid reading
object 0x6502 repeatedly as it should never change. (247)

* Several actions which depend on an updated Statusword value now wait for a
TPDO reception (up to 0.2 seconds), if the PDO is expected periodically.
This can reduce some delays previously caused by checking loops with fixed
delays. (263)

New Contributors
* skalkoto made their first contribution in https://github.com/christiansandberg/canopen/pull/228
* ventussolus made their first contribution in https://github.com/christiansandberg/canopen/pull/230
* jnu144 made their first contribution in https://github.com/christiansandberg/canopen/pull/239
* semiversus made their first contribution in https://github.com/christiansandberg/canopen/pull/241
* Lauszus made their first contribution in https://github.com/christiansandberg/canopen/pull/268
* walmis made their first contribution in https://github.com/christiansandberg/canopen/pull/287

**Full Changelog**: https://github.com/christiansandberg/canopen/compare/v1.2.1...v2.0.0

1.2.1

* Fix when calling `stop_node_guarding()` twice (224)
* Fix support for hexadecimal node ID in DCF (221)
* Fix DefaultValue in EDS for OCTET_STRING and DOMAIN (217)
* Fix examples and documentation (207)

1.2.0

* Drop Python 2.7 support (although it may still work)
* Avoid to raise an error if 'bus' or 'notifier' is None (191)
* Add Support for StorageLocation of EDS (206)
* Fix `import_from_node()` (192)
* Fix parsing of $NODEID to handle case differences and spaces (180)
* Add "NO MODE" as a valid mode for the 402 profile (184)
* Fix disabled RPDO usage in P402 (200)
* Use setuptools-scm for version

Page 1 of 4

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.