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

Add custom eds storage format & block transfer mechanism #343

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

samsamfire
Copy link
Contributor

Hi,

CiA defines objects 0x1021 for storing EDS and object 0x1022 for storing the format used (which suppose to be mandatory according to spec btw).
I've added two optional parameters to add_node :

  • block_transfer to enable or disable block transfer
  • eds_format_handler, callable that takes sdo io and returns an eds file handle. The point of this is so that anyone with a specific format can handle their own logic.
    I've also added some documentation , an example and description for parameters.

Also synchronous RPDOs should now be transmitted on sync reception
Need to add more tests for this last part
…not stored as pure ascii

- Added block_transfer bool to use block transfer when reading 0x1021
- Added some documentation example of using upload_eds
- Added storage_format to handler function & added some logging info
@af-silva
Copy link
Collaborator

During the weekend will try to give it a look.

@samsamfire
Copy link
Contributor Author

Bump have you had a chance to look at it ?

Copy link
Collaborator

@af-silva af-silva left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the late late response, real live took the best of me. Just some small comments.
The remaining added functionality seems ok. In terms of use I can't test it, so I can't validate. Have you test it using real hardware and everything behaves as it should?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't spot anything wrong with the code,
It is just a small request, please pay some attention to the format of the code, like spaces between parameters when calling functions line 170:
object_dictionary = import_from_node(node, self, block_transfer, eds_format_handler)
remove unnecessary spaces:
eds_format_handler: Callable = None

It's just this small things.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't spot anything wrong with the code, just some small formatting problems, can you please arrange this.

except Exception as e:
print(e)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove the print

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants