2.2.3.14.1 adtgHeader
The adtgHeader sub-message specifies attributes global to the TableGram.
The syntax of an adtgHeader submessage is defined as follows.
-
adtgHeader = adtgTokenHeader adtgHeaderSize adtgSignature adtgVersion adtgByteOrder adtgUnicode adtgTokenHeader = %x01 adtgHeaderSize = BYTE adtgSignature = "TG!" adtgVersion = adtgMajorVersion adtgMinorVersion adtgMajorVersion = BYTE adtgMinorVersion = BYTE adtgByteOrder = adtgByteOrderLittleEndian / adtgByteOrderBigEndian adtgByteOrderLittleEndian = %x00 adtgByteOrderBigEndian = %x01 adtgUnicode = adtgNonUnicodeFormatForMBCS / adtgUnicodeFormatForMBCS adtgNonUnicodeFormatForMBCS = %x00 adtgUnicodeFormatForMBCS = %x01
The definition of a Unicode character is as specified in [UNICODE]. adtgTablegram uses a UTF-16LE encoding.
The fields of an adtgHeader sub-message have the following lengths, types, and meanings:
adtgTokenHeader
Length: 1 byte
Specifies the beginning of the adtgHeader submessage. The value MUST be set to %x01.
adtgHeaderSize
Length: 1 byte
The length of the rest of the adtgHeader submessage, in bytes; specifically, the collective length of the adtgSignature, adtgVersion, adtgByteOrder, and adtgUnicode fields, for a fixed value of 7 (%x07).
adtgSignature
Length: 3 bytes
Specifies the beginning of the adtgTablegram. The value in this field MUST be the 3-byte ASCII string constant "TG!".
adtgVersion
Length: 2 bytes
Specifies the current version of the protocol being used.<44>
adtgByteOrder
Length: 1 byte
Specifies the byte order of any multibyte integer values in the adtgTablegram. Applies to WORD, USHORT, LONG, ULONG, WCHAR, and equivalent types.
Value
Meaning
adtgByteOrderLittleEndian
0x00
adtgByteOrderBigEndian
0x01
Big-endian (MAY<45> be supported)
adtgUnicode
Length: 1 byte
Specifies how non-Unicode character data in the rows (found in ColumnData) is encoded for transmission over the wire.<46>
Value
Meaning
adtgNonUnicodeFormatForMBCS
0x00
Non-Unicode format
adtgUnicodeFormatForMBCS
0x01
Unicode format