Fix SDO writes of empty strings#551
Conversation
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## master #551 +/- ##
=======================================
Coverage 71.36% 71.36%
=======================================
Files 26 26
Lines 3129 3129
Branches 480 480
=======================================
Hits 2233 2233
Misses 765 765
Partials 131 131
|
acolomb
left a comment
There was a problem hiding this comment.
Nice find and good job in fixing it. Some nit-picks, but nothing serious that would keep this from being merged.
Thanks for the quick review! Got back around to this today and realized you were right about the command byte issue. I updated the code to force a segmented transfer instead since the 2-bit size field overflows when attempting to use a transfer size of 0. |
Previously, when attempting a write of
""to aVISIBLE_STRING, the expedited SDO request would not be sent and the transaction would timeout.I traced this down to the
BufferedWriternot issuing a write to the underlying stream when it has only been called withb"". Additionally, it turns out that it's not possible to correctly send an expedited SDO request with size == 0.To resolve this, if the transaction size is known to be
0, a segmented transfer is used.