![]() |
![]() ![]()
Experimental Physics and
| ||||||||||||||
|
I realize that to represent all possible 16-bit checksums as a
decimal number one would need 5 characters, but my device only uses 4. None of the strings are longer than 78 characters so it won’t overflow, but there doesn’t seem to be a way to specify the field width for a checksum (the width and precision specifiers
are used for other purposes).
From: Tech-talk <tech-talk-bounces at aps.anl.gov> on behalf of Baily, Scott A via Tech-talk <tech-talk at aps.anl.gov>
Sent: Friday, February 14, 2025 11:10:08 AM To: tech-talk at aps.anl.gov <tech-talk at aps.anl.gov> Subject: [EXTERNAL] StreamDevice Checksum formatting bug I seem to be having a problem with the formatting of 16-bit checksums from StreamDevice 2.8.25. When I use a string that ends with “%+<sum16>” in the protocol file, I get the correct checksum in ascii characters as expected, but I have an extra leading 0 (5 characters instead of 4). A checksum that should be “0389” is written as “00389” A similar problem seems to be happening when reading (seems to be expecting an extra leading zero). I can work around this because I know what will be sent and can ignore the checksum on reads,. Has anyone else had this problem? If this is working correctly for you, what version of StreamDevice are you using?
| ||||||||||||||
ANJ, 17 Feb 2025 |
![]() · Download · Search · IRMIS · Talk · Documents · Links · Licensing · |