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

c-open: Fix cached status. Fix SDO 7B last packet. Add cb_notify event. #56

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

Conversation

d-udd
Copy link

@d-udd d-udd commented Mar 6, 2023

Tested-by: Daniel Udd [email protected]
Reviewed-by: Daniel Udd [email protected]

Daniel Udd added 5 commits March 6, 2023 18:27
Make cb_notify event a public function and add parameters event and
value to callback function.
The cached field of the SDO job was never cleared which would cause downloads
of large objects to always fail once a small object had been downloaded.
These defines are in co_sdo.h.
The notification callback was not being triggered for downloads of
objects larger than 64 bits. Changed default timeout to 200ms for
ongoing SDO transfers.
@@ -106,7 +106,7 @@ set(MAX_RX_PDO "4"
set(MAX_ERRORS "4"
CACHE STRING "max size of error list")

set(SDO_TIMEOUT "100"
set(SDO_TIMEOUT "200"
Copy link
Collaborator

Choose a reason for hiding this comment

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

This changes the default timeout for every user of c-open. Note that this is an option that can be adjusted locally if a particular application has different requirements.

{
OD_NOTIFY_ACCESSED,
OD_NOTIFY_VALUE_SET,
OD_NOTIFY_SDO_RECEIVED,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Are both ACCESSED and VALUE_SET required? They are both called from co_od_set_value and it seems that the only difference is whether the user has specified that the object has an accessor function or not.

SDO_RECEIVED seems to be used when an object larger than 64 bits is being downloaded and will be called for every partial update with the size received so far. So the value in this case is a size. This should be documented. There should also be a test that verifies the functionality.

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