V1.3 -- Atomic Objects
Atomic objects are identified by specific patterns in a type-byte. Receiving servers must be capable of recognizing and handling all atomic types, since the size of the object is not explicitly present in a uniform fashion.
Atomic Object: B-CHAR7
The b-CHAR7 (CHARacter 7 bit) object is introduced to handle transmission of characters, in 7-bit ASCII format. Since the vast majority of message-related data involves such objects, they are designed to be very efficient in transmission. Other formats, such as eight bit values, can be introduced as non-atomic objects. The format of a b-CHAR7 follows:
A=0 identifying the b-CHAR7 data type
BCDEFGH=tuvwxyz containing the character
code
The tuvwxyz objects contain the ASCII code of the character. For example, transmission of a "space' (ASCII code 32, 40 octal) would be accomplished by the following byte.
00100000
ABCDEFGH
A=0 to identify this byte as a b-CHAR7. The remaining bits contain the 7 bit code, octal 40, for space.
A b-CHAR7 standing alone is presented as a p-CHAR. Such occurrences will probably be rare if they are used at all. The most common use of b-CHAR7's is as elements of b-USTRUCs used to transmit p-STRINGS, as explained later.
Atomic Object: B-SINTEGER
The b-SINTEGER (Small INTEGER) object is used to transmit very small positive integers, of values up to 64. It always translates to an p-INT, and any p-INT between 0 and 63 may be encoded as a b-SINTEGER for transmission. The format of an b-SINTEGER follows.
AB=10 identifying the object as a b-SINTEGER
CDEFGH=uvwxyz containing the actual number
For example, to transmit the integer 10 (12 octal), the following byte would be transmitted:
10001010
ABCDEFGH
AB=10 to specify a b-SINTEGER. The remaining six bits contain the number 10 expressed in binary.
Atomic Object: B-SINTEGER
The b-SINTEGER (Large INTEGER) object is used to transmit p-INTs to any precision up to 64 bits. It is always translated as a p-INT. Sending servers are permitted to choose either b-SINTEGER or b-SINTEGER format for transmission of numbers, as appropriate. When possible, b-SINTEGERs can be used for better channel efficiency. The format of a b-SINTEGER follows:
ABCDE=11100 specifying that this is a b-SINTEGER.
FGH=xyz containing a count of number of bytes to follow.
The xyz bits are interpreted as a number of bytes to follow which contain the actual binary code of the the integer in 2's complement format. Since a zero-byte integer is disallowed, the pattern xyz=000 is interpreted as 1000, specifying that 8 bytes follow. The number is transmitted with high-order bits first. This format permits transmission of integers as large as 64 bits in magnitude.
For example, if the number 4096 (10000 octal) is to be transmitted, the following sequence of bytes would be sent:
11100010 00010000 00000000
ABCDEFGH ---actual data---
ABCDE=11100, identifying this as a b-LINTEGER, E=0, specifying a positive number, and FGH=010, specifying that 2 bytes follow, containing the actual binary number.
Atomic Object: B-SBITSTR
The b-SBITSTR (Short BIT STReam) object is used to transmit a p-BITS of length 63 or less. For longer bit streams, the non-atomic object b-LBITSTR may be used. The format of a b-SBITSTR follows.
ABCDE=11110 specifying the type as b-SBITSTR
FGH=xyz specifying the number of bytes
following.
The xyz value specifies the number of additional bytes to be read to obtain the bit stream values. As in the case of b-SINTEGER, the value xyz=000 is interpreted as 1000, specifying that 8 bytes follow.
To avoid requiring specification of exactly the number of bits contained, the following convention is used. The first data byte is scanned from left to right until the first 1 bit is encountered. The bit stream is defined to begin with the immediately following bit, and run through the last bit of the last byte read. In other words, the bit stream is 'right-adjusted' in the collected bytes, with its left end delimited by the first "on' bit.
For example, to send the bit stream *001010011* (9 bits), the following bytes are transmitted.
11110010 00000010 01010011
ABCDEhij klmnopqr stuvwxyz
The hij=010 value specifies that two bytes follow. The q bit, which is the first 1 bit encountered, identifies the start of the bit stream as being the r bit. The rstuvwxyz bits are the bit stream being handled.
Atomic Object: b-BOOL
The b-BOOL (BOOLean) object is used to transmit p-BOOLs. The format of b-BOOL objects follows.
ABCDEFG=1111110 specifying the type as
b-BOOL
H=z specifying the value
The two possible translations of a b-BOOL are *FALSE* and *TRUE*.
11111100 represents *FALSE*
11111101 represents *TRUE*
ABCDEFGz
if z=0, the value is FALSE, otherwise TRUE.
Atomic Object: B-EMPTY
The b-EMPTY object type is used to transmit a 'null' object, i.e. an *EMPTY*. The format of an b-EMPTY follows.
ABCDEFGH=11111110 specifying *EMPTY*
Atomic Object: B-XTRA
The b-XTRA objects are used to carry the four possible p-XTRA items, i.e., *XTRA0*, *XTRA1*, *XTRA2*, and *XTRA3*. These four items correspond to the binary coding of the remaining two bits after the b-XTRA type code bits. The format of a b-XTRA follows.
ABCDEF=111110 to specify the type b-XTRA
GH=yz to identify the particular p-XTRA item
carried
The GH bits of the byte are decoded to produce a particular p-XTRA item, as follows.
GH=00 -- *XTRA0*
GH=01 -- *XTRA1*
GH=10 -- *XTRA2*
GH=11 -- *XTRA3*
The b-XTRA object is included to provide the use of several single-byte data items to higher levels. These items may be assigned by individual applications to improve the efficiency of transmission of several very frequent data items. For example, the message services protocols will use these items to convey positive and negative acknowledgments, two very common items in every interaction.
Atomic Object: B-PADDING
This object is anomalous, since it represents really no data at all. Whenever it is encountered in a byte stream in a position where a type-byte is expected, it is completely ignored, and the succeeding byte examined instead. Its purpose is to serve as a filler in byte streams, providing servers with an aid in handling internal problems related to their specific word lengths, etc. The encoders may freely use this object to serve as padding when necessary.
All b-PADDING data objects exist only within an encoded byte stream. They never cause any data item whatsoever to be presented externally to the coder module. The format of a b-PADDING follows.
ABCDEFGH=11111111
Note that this does not imply that all such 'null' bytes in a stream are to be ignored, since they could be encountered as a byte within some other type, such as b-LINTEGER. Only bytes of this format which, by their position in the stream, appear as a 'type' byte are to be ignored.