SAINT
Keyword 2000 to
01/20/04
Page 6 of 20
4 Message Format
To minimize latency with the
4.1Data Stream
The host data stream is broken into messages. A message consists of a Message ID and one or more data bytes.
The character FFh is used as an ESCAPE character to indicate the end of messages. There are three cases when an ESCAPE character is received.
If the ESCAPE character is followed immediately by a second ESCAPE character, the following are true:
∙The message is not yet complete.
∙The pair of ESCAPE characters represents a single byte of message data of value FFh.
If the ESCAPE character is followed immediately by a byte of value 00h, the following are true.
∙The message is complete.
∙Neither the FFh nor the 00h are part of the message.
∙No more messages are ready to be sent.
If the ESCAPE character is followed immediately by of any value other than FFh or 00h, the following are true:
∙The message is complete.
∙Neither the ESCAPE character nor the character following the ESCAPE character are part of the message.
∙The value following the ESCAPE character is the message ID for a new message.
This data stream format was chosen to allow arbitrary long messages (i.e. 4K Class 2 data blocks), to minimize the overhead to two bytes per message during peak traffic, and to immediately recognize the end of a message without having to wait for the next message to start.
After a gateway reset, the gateway will ignore all data until it sees an ESCAPE character. Once it has received a valid EOM, it will recognize the following message.