E1.20 RDM (Remote Device Management) Protocol Forums

E1.20 RDM (Remote Device Management) Protocol Forums (http://www.rdmprotocol.org/forums/index.php)
-   RDM General Implementation Discussion (http://www.rdmprotocol.org/forums/forumdisplay.php?f=4)
-   -   Checksum curiosa (http://www.rdmprotocol.org/forums/showthread.php?t=44)

sjackman September 19th, 2006 10:29 AM

Checksum curiosa
The spec states that...

The Checksum field is the unsigned, modulo 0x10000, 16-bit additive checksum of the entire packet’s slot data, including START Code.
However, the checksum covers a maximum of 255 bytes, each with a maximum value of 255, so the maximum possible checksum is 65025, or 0xfe01. So the checksum is in fact not modulo at all.


sblair September 19th, 2006 11:42 AM


If I recall correctly the Message Length max is 255. That field points to the Slot # of Checksum High. So I believe the max packet is 257 bytes.

If each of those bytes was 255, then the Checksum would be 65535. So in that case it wouldn't roll over.

It would be best for everyone to implement it as a modulo anyway as there will be less problems when/if there is any expansion to it in the future.

sjackman September 19th, 2006 01:36 PM

The 257 byte maximum includes the two bytes of the checksum, which clearly aren't covered by the checksum. The checksum only covers 255 bytes.

Brian Sidebotham October 3rd, 2006 06:24 AM

Just because you can't get to the roll over point doesn't mean you can't say it's modulo. By it's very definition of being a 16-bit number it has to be modulo 0x10000

All times are GMT -6. The time now is 06:41 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2021, vBulletin Solutions, Inc.