Delphi Gateway Systems Analysis INterface Tool (SAINT) Message Format, Page 6 of, 4.1Data Stream

Models: Gateway Systems Analysis INterface Tool (SAINT) RS-232

1 20
Download 20 pages 57.39 Kb
Page 7
Image 7
Page 6 of 20

SAINT

Keyword 2000 to RS-232 Gateway

01/20/04

Page 6 of 20

4 Message Format

To minimize latency with the RS-232 link, all data is sent in binary form. The same data format is used to send and receive messages. The gateway supports bi-directional asynchronous communications.

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.

Page 7
Image 7
Delphi Gateway Systems Analysis INterface Tool (SAINT), RS-232 Message Format, Page 6 of, 4.1Data Stream, Saint, 01/20/04