Message Checksum
  • Checksum is transmitted in ASCII-hex form (e.g. "12" or "4C")
  • See below for the algorithm.
  • Fits the regular expression (written in C#, .NET 4.0)
    • [0-9A-F]+
    • Even though the implementation is limited a single byte, the regular expression is not.

Checksum of message data is:
nTotal = 0;
foreach (char aChar in MessageData)
    nTotal += aChar;
checksum = nTotal % 256; // Number [0-255]


Message Module

Last edited Feb 2, 2011 at 4:05 AM by tugboat90, version 4

Comments

aarono Feb 2, 2011 at 4:21 AM 
What does the following mean?
Even though the implementation is limited a single byte, the regular expression is not.