rtlabs-com / c-open

CANopen stack for embedded devices
http://www.rt-labs.com
Other
79 stars 40 forks source link

Fix SDO time-out on large segmented transfers #42

Closed nattgris closed 3 years ago

nattgris commented 3 years ago

Any sufficiently large SDO transfer will time-out, because the time is counted from the start of the transfer. Restart the timeout as long as progress is made, for each transferred segment.

Also fill in the index and sub-index of the object in the abort frame if the transfer times out locally, as per CiA 301.

Additionally, fix a flaw in the SegmentedTimeout test which used synthetic timestamps but did not mock the system time, possibly causing sporadic failure (or pass) if run at the wrong time.

Signed-off-by: Andreas Fritiofson andreas.fritiofson@unjo.com Change-Id: Ic527f80cca1c3f72e26bebb0acd6d3b06800d546

hefloryd commented 3 years ago

Thanks, looks good. We are in holiday mode now and will merge this in August.

Den fre 9 juli 2021 17:54Andreas Fritiofson @.***> skrev:

Any sufficiently large SDO transfer will time-out, because the time is counted from the start of the transfer. Restart the timeout as long as progress is made, for each transferred segment.

Also fill in the index and sub-index of the object in the abort frame if the transfer times out locally, as per CiA 301.

Additionally, fix a flaw in the SegmentedTimeout test which used synthetic timestamps but did not mock the system time, possibly causing sporadic failure (or pass) if run at the wrong time.

Signed-off-by: Andreas Fritiofson @.*** Change-Id: Ic527f80cca1c3f72e26bebb0acd6d3b06800d546

You can view, comment on, or merge this pull request online at:

https://github.com/rtlabs-com/c-open/pull/42 Commit Summary

  • Fix SDO time-out on large segmented transfers

File Changes

Patch Links:

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/rtlabs-com/c-open/pull/42, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACCXVIU7VIM3TPIWUUSHV6TTW4LUFANCNFSM5ADATKWQ .

hefloryd commented 3 years ago

Merged, thanks!