Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve the RemoteNode.load_configuration() docs #477

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions canopen/node/remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,16 @@ def __load_configuration_helper(self, index, subindex, name, value):
index, subindex, e)
raise

def load_configuration(self):
''' Load the configuration of the node from the object dictionary.'''
def load_configuration(self) -> None:
"""Load the configuration of the node from the Object Dictionary.

Iterate through all objects in the Object Dictionary and download the
values to the remote node via SDO.
Then, to avoid PDO mapping conflicts, read back (upload) the PDO
configuration via SDO.

:see-also: :meth:`canopen.pdo.PdoBase.read`
"""
for obj in self.object_dictionary.values():
if isinstance(obj, ODRecord) or isinstance(obj, ODArray):
for subobj in obj.values():
Expand Down
Loading