You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Separate subscription from the PDO's read() and save() methods.
Normally one needs to call read() or save() on a single pdo (or the
node's whole PDO collection) in order to receive any such objects from
the network. That however requires quite a few SDO exchanges to make
sure the node's PDO configuration matches the parameters configured in
the object.
For applications where the PDO configuration is stored persistently in
the node (e.g. device EEPROM), doing this SDO exchange can be skipped
entirely if the application programmer takes care to mirror the same
configuration in the python-canopen objects. Another use case is
reconnecting to a node for which the same python-canopen script
previously ran and the PDO configuration is still known to be valid.
Factor out a new method subscribe() from read() and save() to offer
doing only that last part via the public API. Adapt the log message
and make sure it is logged in read() as well.
0 commit comments