8. Transaction Block Format
8. Transaction Block Format
All textual messages exchanged between user and logger are to consist of one or more "transaction blocks". Each transaction block is a sequence of 8-bit elements in the following format:
<code> <count> <char1> ... <charn>
<code> is an 8-bit element that is not interpreted in this protocol. In the proposed general console communications protocol, this field specifies communication modes or special characteristics of this transaction block. Here <code> is to be zero.
<count> is an 8-bit element that specifies the number of character elements that follow in this transaction block. It is interpreted as a binary integer which has a permissible range between 0 and 127. The most significant bit is zero.
<chari> is an 8-bit element containing a standard 7-bit ASCII character right-adjusted. The most significant bit is zero. The number of <chari> in the transaction block is governed by the <count> field. A maximum of 127 and minimum of zero characters are permitted in a single transaction block.
The most significant bit of each of these elements is zero, effectively limiting each of these elements to seven bits of significance. The reason for doing this is twofold: the eighth bit of the <chari> elements is specifically reserved for future expansion, and it was desired to limit all the elements so as to permit certain implementations to convert the incoming stream from 8-bit elements to 7-bit elements prior to decoding.
With one exception, there is to be no semantic connotation attached with the division of a logger-user message into one or more transaction blocks. The character string comprising the message to be transmitted may be divided and apportioned among multiple transaction blocks according to the whim of the sending host. If less than 128 characters in length, the message may be sent as a single transaction block. The exception is that separate messages may not appear in the same transaction block. That is, a message must start at the beginning of a transaction block and finish at the end of one. Note also that there is no syntactic device for specifying the last transaction block of a message. It is presumed that the logger end user both have sufficient knowledge of the format to know when all of a message has arrived.
Note that the first 8-bits of data transmitted through a newly established connection must be a type code as specified in Protocol Document 1. This type code must be sent prior to the first transaction block and should be discarded by the receiving host.