
39
Parameters are all ASCII printable characters in the range of 20H to 7EH. Numeric
parameters are sent MSD first, LSD last. Values which do not adhere to the command
format, or are beyond the allowable range, will be rejected and cause the unit to respond
with an error code.
The Trailer byte is 125 decimal (7DH, ASCII character "}").
The checksum byte is the sum modulo 95 of all message characters beginning with the
header byte up to and including the trailer byte. The value 32 is subtracted from each
character value before taking the modulo 95 sum. The value 32 is added to the final
sum to obtain the checksum value. All values are in decimal.
Checksum = MOD [(character value - 32), 95] + 32
Below is a program, written in the ‘C’ programming language that illustrates the
checksum calculation.
/*
return the checksum character for the message in array
subtract 32 from each character before taking modulo 95 sum
add 32 to the final sum
mes_len = message length
*/
char check_sum(char *array, char mes_len)
{
char i,sum;
for (i = 0, sum = 0; i < mes_len; i++) {
sum += *array++ - 32;
sum %= 95;
}
return(sum + 32);
}
4.2 COMMAND CODE SUMMARY
The following paragraphs describe each of the command codes. The NSU will also
respond to the legacy command set used in the RSUN, 1-N Broadband Redundant
Switching Unit. Please refer to MITEQ Technical Note 25T030 for more information on
that command set.