1.2.1 固定宽度数
固定宽度数所占有的长度的计算是通过固定宽度值标识的格式码的子类型确定的。
n OCTETs
+----------+
| data |
+----------+
Subcategory n
=================
0x4 0
0x5 1
0x6 2
0x7 4
0x8 8
0x9 16
Type: null
<type name="null" class="primitive"/>
Encoding Code Category Description
0x40 fixed-width, 0 byte value the null value
Type: boolean
<type name="boolean" class="primitive"/>
Encoding Code Category Description
0x56 fixed-width, 1 byte value boolean with the octet 0x00 being false and
octet 0x01 being true
true 0x41 fixed-width, 0 byte value the boolean value true
false 0x42 fixed-width, 0 byte value the boolean value false
Type: ubyte
<type name="ubyte" class="primitive"/>
Encoding Code Category Description
0x50 fixed-width, 1 byte value 8-bit unsigned integer
Type: ushort
<type name="ushort" class="primitive"/>
Encoding Code Category Description
0x60 fixed-width, 2 byte value 16-bit unsigned integer in network byte order
Type: uint
<type name="uint" class="primitive"/>
Encoding Code Category Description
0x70 fixed-width, 4 byte value 32-bit unsigned integer in network byte order
smalluint 0x52 fixed-width, 1 byte value unsigned integer value in the range 0 to 255
inclusive
uint0 0x43 fixed-width, 0 byte value the uint value 0
Type: ulong
<type name="ulong" class="primitive"/>
Encoding Code Category Description
0x80 fixed-width, 8 byte value 64-bit unsigned integer in network byte order
smallulong 0x53 fixed-width, 1 byte value unsigned long value in the range 0 to 255 inclusive
ulong0 0x44 fixed-width, 0 byte value the ulong value 0
Type: byte
<type name="byte" class="primitive"/>
Encoding Code Category Description
0x51 fixed-width, 1 byte value 8-bit two's-complement integer
Type: short
<type name="short" class="primitive"/>
Encoding Code Category Description
0x61 fixed-width, 2 byte value 16-bit two's-complement integer in network byte order
Type: int
<type name="int" class="primitive"/>
Encoding Code Category Description
0x71 fixed-width, 4 byte value 32-bit two's-complement integer in network byte order
smallint 0x54 fixed-width, 1 byte value signed integer value in the range -128 to 127 inclusive
Type: long
<type name="long" class="primitive"/>
Encoding Code Category Description
0x81 fixed-width, 8 byte value 64-bit two's-complement integer in network byte order
smalllong 0x55 fixed-width, 1 byte value signed long value in the range -128 to 127 inclusive
Type: float
<type name="float" class="primitive"/>
Encoding Code Category Description
ieee-754 0x72 fixed-width, 4 byte value IEEE 754-2008 binary32
Type: double
<type name="double" class="primitive"/>
Encoding Code Category Description
ieee-754 0x82 fixed-width, 8 byte value IEEE 754-2008 binary64
Type: decimal32
<type name="decimal32" class="primitive"/>
Encoding Code Category Description
ieee-754 0x74 fixed-width, 4 byte value IEEE 754-2008 decimal32 using the Binary
Integer Decimal encoding
Type: decimal64
<type name="decimal64" class="primitive"/>
Encoding Code Category Description
ieee-754 0x84 fixed-width, 8 byte value IEEE 754-2008 decimal64 using the Binary
Integer Decimal encoding
Type: decimal128
<type name="decimal128" class="primitive"/>
Encoding Code Category Description
ieee-754 0x94 fixed-width, 16 byte value IEEE 754-2008 decimal128 using the Binary
Integer Decimal encoding
Type: char
<type name="char" class="primitive"/>
Encoding Code Category Description
utf32 0x73 fixed-width, 4 byte value a UTF-32BE encoded unicode character
Type: timestamp
<type name="timestamp" class="primitive"/>
Encoding Code Category Description
ms64 0x83 fixed-width, 8 byte value 64-bit signed integer representing milliseconds
since the unix epoch
根据Unix时间中UTC的编码来描述时间上的一个相对值,精度是千分之一秒。举例来说,1311704463521代表的时间为2011-07-26T18:21:03.521Z.
Type: uuid
<type name="uuid" class="primitive"/>
Encoding Code Category Description
0x98 fixed-width, 16 byte value UUID as defined in section 4.1.2 of RFC-4122