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
In step 2 of the scenario above the Initiate segmented SDO properly initializes session in COSdoCheck by setting srv[n].Idx and srv[n].Sub to Index1 and Subindex1
by setting srv[n].Idx and srv[n].Sub to Index1 and Subindex1 because there is no previous session present (srv[n].Obj == 0). However in step 5 srv[n].Idx and srv[n].Sub are not set to Index2 and Subindex2 because a previous session had not been closed (hence srv[n].Obj != 0). When subsequently COSdoResponse is called ( in 1st code snippet)
CO_ERR COSdoResponse(CO_SDO *srv)
...
} else if (cmd == 0x40) {
result = COSdoGetObject(srv, CO_SDO_RD);
if (result == 0) {
result = COSdoUploadExpedited(srv);
COSdoGetObject returns the same OD entry (at Index1, Subindex1) as in step 2 resulting in wrong data being sent by COSdoUploadExpedited.
Note that other combinations of segmented/expedited upload/download transfers trigger similar undesired behavior.
The text was updated successfully, but these errors were encountered:
I encountered the following situation:
expected behavior:
The problem can be spotted in following code snippets from canopen-stack source code.
In step 2 of the scenario above the Initiate segmented SDO properly initializes session in COSdoCheck by setting srv[n].Idx and srv[n].Sub to Index1 and Subindex1
by setting srv[n].Idx and srv[n].Sub to Index1 and Subindex1 because there is no previous session present (srv[n].Obj == 0). However in step 5 srv[n].Idx and srv[n].Sub are not set to Index2 and Subindex2 because a previous session had not been closed (hence srv[n].Obj != 0). When subsequently COSdoResponse is called ( in 1st code snippet)
COSdoGetObject returns the same OD entry (at Index1, Subindex1) as in step 2 resulting in wrong data being sent by COSdoUploadExpedited.
Note that other combinations of segmented/expedited upload/download transfers trigger similar undesired behavior.
The text was updated successfully, but these errors were encountered: