M2000-00
T2000-A70 Data Modem Kit
8.15.7
Copyright TEL 31/12/97
Message Format
All message packets take the general form:
[IDENT][SIZE][PARAMETERS][CHECKSUM]<CR>
The following table explains each component of the message packet.
Table 8.15.1 Message Format
General message format characteristics:
• All fields in a message are encoded in ASCII, except for the [PARAMETERS] field of
the transmit and receive commands, which is encoded in Binary.
• Where numeric values are represented in ASCII-hex notation (two characters per
byte), digits A to F are upper case.
• The minimum length of a command packet is 5 characters (i.e. this is when [SIZE] =
00).
• The maximum length of the [PARAMETERS] field is 111 characters. The maximum
length of the command packet is therefore 116 characters ([SIZE] = 0x6F).
Message Component Description
[IDENT]
The message identifier. Identifiers are single ASCII characters (lower-case
alphabetical) which categorise the message type.
[SIZE]
The number of characters which make up the
[PARAMETERS
] field.
[SIZE]
is an 8-bit number expressed in ASCII-hex notation (two characters).
[PARAMETERS]
An optional field, depending upon the command. Parameter values are
generally character strings, unless explicitly stated otherwise. Parameter
type is dependent upon the command - there is no explicit type definition.
[CHECKSUM]
An 8 bit checksum of fields
[IDENT]
,
[SIZE]
and
[PARAMETERS]
. It is
expressed in ASCII-hex notation (two characters).
Calculating
[CHECKSUM]
:
[CHECKSUM]
is calculated by applying the following algorithm:
1
Take the modulo-2 sum of all message bytes preceding
[CHECKSUM].
2
Retain bits 0 to 7, discarding any higher order bits resulting from the
summation.
3
Form the two’s complement of the remainder.
4
Convert the binary number into two ASCII-hex digits, MSD first.
<CR>
The packet terminator. It is the ASCII “carriage return” character ($0D).