Package org.djutils.serialization
Class FieldTypes
- java.lang.Object
-
- org.djutils.serialization.FieldTypes
-
public final class FieldTypes extends Object
Type numbers to encode different data types within djutils-serialization.Copyright (c) 2016-2017 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See Sim0MQ License.- Author:
- Alexander Verbraeck
-
-
Field Summary
Fields Modifier and Type Field Description static byte
BOOLEAN_8
boolean, sent / received as a byte; 0 = false, 1 = true.static byte
BOOLEAN_8_ARRAY
Number-preceded boolean array.static byte
BOOLEAN_8_ARRAY_LE
145 (-111) Boolean array, preceded by a 32-bit little-endian number indicating the number of booleans.static byte
BOOLEAN_8_LE
134 (-122) Boolean, sent / received as a byte; 0 = false, 1 = true; equal to code 6.static byte
BOOLEAN_8_MATRIX
Number of rows and number of columns preceded boolean matrix.static byte
BOOLEAN_8_MATRIX_LE
152 (-104) Boolean matrix, preceded by a 32-bit little-endian number row count and a 32-bit little-endian number column count.static byte
BYTE_8
byte, 8 bit signed two's complement integer.static byte
BYTE_8_ARRAY
Number-preceded byte array.static byte
BYTE_8_ARRAY_LE
139 (-117) Byte array, preceded by a 32-bit little-endian number indicating the number of bytes.static byte
BYTE_8_LE
128 (-128) Byte, 8 bit signed two's complement integer; equal to code 0.static byte
BYTE_8_MATRIX
Number of rows and number of columns preceded byte matrix.static byte
BYTE_8_MATRIX_LE
146 (-110) Byte matrix, preceded by a 32-bit little-endian number row count and a 32-bit little-endian number column count.static byte
CHAR_16
char, 16-bit Unicode character, big endian order.static byte
CHAR_16_LE
136 (-120) Char, 16-bit Unicode character, little-endian order for the 2 part.static byte
CHAR_8
char, 8-bit ASCII character.static byte
CHAR_8_LE
135 (-121) Char, 8-bit ASCII character; equal to code 7.static byte
DOUBLE_64
float, double-precision 64-bit IEEE 754 floating point.static byte
DOUBLE_64_ARRAY
Number-preceded double array.static byte
DOUBLE_64_ARRAY_LE
144 (-112) Double array, preceded by a 32-bit little-endian number indicating the number of doubles, little-endian coded doubles.static byte
DOUBLE_64_LE
133 (-123) Float, double-precision 64-bit IEEE 754 floating point, little endian order.static byte
DOUBLE_64_MATRIX
Number of rows and number of columns preceded double matrix.static byte
DOUBLE_64_MATRIX_LE
151 (-105) Double matrix, preceded by a 32-bit little-endian number row count and a 32-bit little-endian number column count, little-endian doubles.static byte
DOUBLE_64_UNIT
Double, stored internally in the SI unit, with a unit type and display type attached.static byte
DOUBLE_64_UNIT_ARRAY
Number-preceded dense double array, stored internally in the SI unit, with a unit type and display type.static byte
DOUBLE_64_UNIT_ARRAY_LE
156 (-100) Dense double array, preceded by a little-endian 32-bit number indicating the number of doubles, little-endian order, with unit type and display unit attached to the entire double array.static byte
DOUBLE_64_UNIT_COLUMN_ARRAY
Number-preceded dense double array, stored internally in the SI unit, with a unique unit type and display type per row.static byte
DOUBLE_64_UNIT_LE
154 (-102) Double stored internally as a little-endian double in the corresponding SI unit, with unit type and display unit attached.static byte
DOUBLE_64_UNIT_MATRIX
Rows/Cols-preceded dense double array, stored internally in the SI unit, with a unit type and display type.static byte
DOUBLE_64_UNIT_MATRIX_LE
158 (-98) Dense double matrix, preceded by a 32-bit little-endian row count int and a 32-bit little-endian column count int, with unit type and display unit attached to the entire double matrix.static byte
DOUBLE_64_UNIT2_MATRIX_LE
160 (-96) Dense little-endian double matrix, preceded by a 32-bit little-endian row count int and a 32-bit little-endian column count int, with a unique unit type and display unit per row of the double matrix.static byte
FLOAT_32
float, single-precision 32-bit IEEE 754 floating point.static byte
FLOAT_32_ARRAY
Number-preceded float array.static byte
FLOAT_32_ARRAY_LE
143 (-113) Float array, preceded by a 32-bit little-endian number indicating the number of floats, little-endian coded floats.static byte
FLOAT_32_LE
132 (-124) Float, single-precision 32-bit IEEE 754 floating point, little endian order.static byte
FLOAT_32_MATRIX
Number of rows and number of columns preceded float matrix.static byte
FLOAT_32_MATRIX_LE
150 (-106) Float matrix, preceded by a 32-bit little-endian number row count and a 32-bit little-endian number column count, little-endian coded floats.static byte
FLOAT_32_UNIT
Float, stored internally in the SI unit, with a unit type and display type attached.static byte
FLOAT_32_UNIT_ARRAY
Number-preceded dense float array, stored internally in the SI unit, with a unit type and display type.static byte
FLOAT_32_UNIT_ARRAY_LE
155 (-101) Dense float array, preceded by a little-endian 32-bit number indicating the number of floats, with unit type and display unit attached to the entire float array.static byte
FLOAT_32_UNIT_COLUMN_ARRAY
Number-preceded dense float array, stored internally in the SI unit, with a unique unit type and display type per row.static byte
FLOAT_32_UNIT_LE
153 (-103) Float stored internally as a little-endian float in the corresponding SI unit, with unit type and display unit attached.static byte
FLOAT_32_UNIT_MATRIX
Rows/Cols-preceded dense float array, stored internally in the SI unit, with a unit type and display type.static byte
FLOAT_32_UNIT_MATRIX_LE
157 (-99) Dense float matrix, preceded by a 32-bit little-endian row count int and a 32-bit little-endian column count int, with unit type and display unit attached to the entire float matrix.static byte
FLOAT_32_UNIT2_MATRIX_LE
159 (-97) Dense little-endian float matrix, preceded by a 32-bit little-endian row count int and a 32-bit little-endian column count int, with a unique unit type and display unit per row of the float matrix.static byte
INT_32
int, 32 bit signed two's complement integer.static byte
INT_32_ARRAY
Number-preceded int array.static byte
INT_32_ARRAY_LE
141 (-115) Integer array, preceded by a 32-bit little-endian number indicating the number of integers, little-endian coded ints.static byte
INT_32_LE
130 (-126) Integer, 32 bit signed two's complement integer, little endian order.static byte
INT_32_MATRIX
Number of rows and number of columns preceded int matrix.static byte
INT_32_MATRIX_LE
148 (-108) Integer matrix, preceded by a 32-bit little-endian number row count and a 32-bit little-endian number column count, little-endian coded ints.static byte
LONG_64
long, 64 bit signed two's complement integer.static byte
LONG_64_ARRAY
Number-preceded long array.static byte
LONG_64_ARRAY_LE
142 (-114) Long array, preceded by a 32-bit little-endian number indicating the number of longs, little-endian coded longs.static byte
LONG_64_LE
131 (-125) Long, 64 bit signed two's complement integer, little endian order.static byte
LONG_64_MATRIX
Number of rows and number of columns preceded long matrix.static byte
LONG_64_MATRIX_LE
149 (-107) Long matrix, preceded by a 32-bit little-endian number row count and a 32-bit little-endian number column count, little-endian coded longs.static byte
SHORT_16
short, 16 bit signed two's complement integer.static byte
SHORT_16_ARRAY
Number-preceded short array.static byte
SHORT_16_ARRAY_LE
140 (-116) Short array, preceded by a 32-bit little-endian number indicating the number of shorts, little-endian coded shorts.static byte
SHORT_16_LE
129 (-127) Short, 16 bit signed two's complement integer, little endian order.static byte
SHORT_16_MATRIX
Number of rows and number of columns preceded short matrix.static byte
SHORT_16_MATRIX_LE
147 (-109) Short matrix, preceded by a 32-bit little-endian number row count and a 32-bit little-endian number column count, little-endian coded shorts.static byte
STRING_16
String, number-preceded char array of 16-bits characters, big-endian order.static byte
STRING_16_LE
138 (-118) String, 32-bit little-endian number-preceded char array of 16-bits characters, each 2-byte character in little-endian order.static byte
STRING_8
String, number-preceded byte array of 8-bits characters.static byte
STRING_8_LE
s 137 (-119) String, 32-bit little-endian number-preceded byte array of 8-bits characters.
-
-
-
Field Detail
-
BYTE_8
public static final byte BYTE_8
byte, 8 bit signed two's complement integer.- See Also:
- Constant Field Values
-
SHORT_16
public static final byte SHORT_16
short, 16 bit signed two's complement integer.- See Also:
- Constant Field Values
-
INT_32
public static final byte INT_32
int, 32 bit signed two's complement integer.- See Also:
- Constant Field Values
-
LONG_64
public static final byte LONG_64
long, 64 bit signed two's complement integer.- See Also:
- Constant Field Values
-
FLOAT_32
public static final byte FLOAT_32
float, single-precision 32-bit IEEE 754 floating point.- See Also:
- Constant Field Values
-
DOUBLE_64
public static final byte DOUBLE_64
float, double-precision 64-bit IEEE 754 floating point.- See Also:
- Constant Field Values
-
BOOLEAN_8
public static final byte BOOLEAN_8
boolean, sent / received as a byte; 0 = false, 1 = true.- See Also:
- Constant Field Values
-
CHAR_8
public static final byte CHAR_8
char, 8-bit ASCII character.- See Also:
- Constant Field Values
-
CHAR_16
public static final byte CHAR_16
char, 16-bit Unicode character, big endian order.- See Also:
- Constant Field Values
-
STRING_8
public static final byte STRING_8
String, number-preceded byte array of 8-bits characters. The string types are preceded by a 32-bit int indicating the number of characters in the array that follows. This int is itself not preceded by a byte indicating it is an int. An ASCII string "Hello" is therefore coded as follows: |9|0|0|0|5|H|e|l|l|o|- See Also:
- Constant Field Values
-
STRING_16
public static final byte STRING_16
String, number-preceded char array of 16-bits characters, big-endian order. The string types are preceded by a 32-bit int indicating the number of characters in the array that follows. This int is itself not preceded by a byte indicating it is an int.- See Also:
- Constant Field Values
-
BYTE_8_ARRAY
public static final byte BYTE_8_ARRAY
Number-preceded byte array. The array types are preceded by a 32-bit int indicating the number of values in the array that follows. This int is itself not preceded by a byte indicating it is an int. An array of 8 bytes with numbers 1 through 8 is therefore coded as follows: |11|0|0|0|8|1|2|3|4|5|6|7|8|- See Also:
- Constant Field Values
-
SHORT_16_ARRAY
public static final byte SHORT_16_ARRAY
Number-preceded short array. The array types are preceded by a 32-bit int indicating the number of values in the array that follows. This int is itself not preceded by a byte indicating it is an int. An array of 8 shorts with numbers 100 through 107 is therefore coded as follows: |12|0|0|0|8|0|100|0|101|0|102|0|103|0|104|0|105|0|106|0|107|- See Also:
- Constant Field Values
-
INT_32_ARRAY
public static final byte INT_32_ARRAY
Number-preceded int array. The array types are preceded by a 32-bit int indicating the number of values in the array that follows. This int is itself not preceded by a byte indicating it is an int. An array of 4 ints with numbers 100 through 103 is therefore coded as follows: |13|0|0|0|4|0|0|0|100|0|0|0|101|0|0|0|102|0|0|0|103|- See Also:
- Constant Field Values
-
LONG_64_ARRAY
public static final byte LONG_64_ARRAY
Number-preceded long array. The array types are preceded by a 32-bit int indicating the number of values in the array that follows. This int is itself not preceded by a byte indicating it is an int. An array of 3 longs with numbers 100 through 102 is therefore coded as follows: |14|0|0|0|3|0|0|0|0|0|0|0|100|0|0|0|0|0|0|0|101|0|0|0|0|0|0|0|102|- See Also:
- Constant Field Values
-
FLOAT_32_ARRAY
public static final byte FLOAT_32_ARRAY
Number-preceded float array. The array types are preceded by a 32-bit int indicating the number of values in the array that follows. This int is itself not preceded by a byte indicating it is an int.- See Also:
- Constant Field Values
-
DOUBLE_64_ARRAY
public static final byte DOUBLE_64_ARRAY
Number-preceded double array. The array types are preceded by a 32-bit int indicating the number of values in the array that follows. This int is itself not preceded by a byte indicating it is an int.- See Also:
- Constant Field Values
-
BOOLEAN_8_ARRAY
public static final byte BOOLEAN_8_ARRAY
Number-preceded boolean array. The array types are preceded by a 32-bit int indicating the number of values in the array that follows. This int is itself not preceded by a byte indicating it is an int.- See Also:
- Constant Field Values
-
BYTE_8_MATRIX
public static final byte BYTE_8_MATRIX
Number of rows and number of columns preceded byte matrix. The matrix types are preceded by a 32-bit int indicating the number of rows, followed by a 32-bit int indicating the number of columns. These integers are not preceded by a byte indicating it is an int. The number of values in the matrix that follows is rows * columns. The data is stored row by row, without a separator between the rows. A matrix with 2 rows and 3 columns of bytes 1-2-4 6-7-8 is therefore coded as follows: |18|0|0|0|2|0|0|0|3|0|1|0|2|0|4|0|6|0|7|0|8|
In the language sending or receiving a matrix, the rows are denoted by the outer index, and the columns by the inner index: matrix[row][col].- See Also:
- Constant Field Values
-
SHORT_16_MATRIX
public static final byte SHORT_16_MATRIX
Number of rows and number of columns preceded short matrix. The matrix types are preceded by a 32-bit int indicating the number of rows, followed by a 32-bit int indicating the number of columns. These integers are not preceded by a byte indicating it is an int. The number of values in the matrix that follows is rows * columns. The data is stored row by row, without a separator between the rows. A matrix with 2 rows and 3 columns of shorts 1-2-4 6-7-8 is therefore coded as follows: |19|0|0|0|2|0|0|0|3|1|2|4|6|7|8|
In the language sending or receiving a matrix, the rows are denoted by the outer index, and the columns by the inner index: matrix[row][col].- See Also:
- Constant Field Values
-
INT_32_MATRIX
public static final byte INT_32_MATRIX
Number of rows and number of columns preceded int matrix. The matrix types are preceded by a 32-bit int indicating the number of rows, followed by a 32-bit int indicating the number of columns. These integers are not preceded by a byte indicating it is an int. The number of values in the matrix that follows is rows * columns. The data is stored row by row, without a separator between the rows. A matrix with 2 rows and 3 columns of integers 1-2-4 6-7-8 is therefore coded as follows: |20|0|0|0|2|0|0|0|3|0|0|0|1|0|0|0|2|0|0|0|4|0|0|0|6|0|0|0|7|0|0|0|8|
In the language sending or receiving a matrix, the rows are denoted by the outer index, and the columns by the inner index: matrix[row][col].- See Also:
- Constant Field Values
-
LONG_64_MATRIX
public static final byte LONG_64_MATRIX
Number of rows and number of columns preceded long matrix. The matrix types are preceded by a 32-bit int indicating the number of rows, followed by a 32-bit int indicating the number of columns. These integers are not preceded by a byte indicating it is an int. The number of values in the matrix that follows is rows * columns. The data is stored row by row, without a separator between the rows. A matrix with 2 rows and 3 columns of long vales 1-2-4 6-7-8 is therefore coded as follows: |21|0|0|0|2|0|0|0|3|0|0|0|0|0|0|0|1|0|0|0|0|0|0|0|2|0|0|0|0|0|0|0|4|0|0|0|0|0|0|0|6|0|0|0|0|0|0|0|7|0|0|0|0|0|0|0|8|
In the language sending or receiving a matrix, the rows are denoted by the outer index, and the columns by the inner index: matrix[row][col].- See Also:
- Constant Field Values
-
FLOAT_32_MATRIX
public static final byte FLOAT_32_MATRIX
Number of rows and number of columns preceded float matrix. The matrix types are preceded by a 32-bit int indicating the number of rows, followed by a 32-bit int indicating the number of columns. These integers are not preceded by a byte indicating it is an int. The number of values in the matrix that follows is rows * columns. The data is stored row by row, without a separator between the rows.
In the language sending or receiving a matrix, the rows are denoted by the outer index, and the columns by the inner index: matrix[row][col].- See Also:
- Constant Field Values
-
DOUBLE_64_MATRIX
public static final byte DOUBLE_64_MATRIX
Number of rows and number of columns preceded double matrix. The matrix types are preceded by a 32-bit int indicating the number of rows, followed by a 32-bit int indicating the number of columns. These integers are not preceded by a byte indicating it is an int. The number of values in the matrix that follows is rows * columns. The data is stored row by row, without a separator between the rows.
In the language sending or receiving a matrix, the rows are denoted by the outer index, and the columns by the inner index: matrix[row][col].- See Also:
- Constant Field Values
-
BOOLEAN_8_MATRIX
public static final byte BOOLEAN_8_MATRIX
Number of rows and number of columns preceded boolean matrix. The matrix types are preceded by a 32-bit int indicating the number of rows, followed by a 32-bit int indicating the number of columns. These integers are not preceded by a byte indicating it is an int. The number of values in the matrix that follows is rows * columns. The data is stored row by row, without a separator between the rows.
In the language sending or receiving a matrix, the rows are denoted by the outer index, and the columns by the inner index: matrix[row][col].- See Also:
- Constant Field Values
-
FLOAT_32_UNIT
public static final byte FLOAT_32_UNIT
Float, stored internally in the SI unit, with a unit type and display type attached. The internal storage of the value that is transmitted is always in the SI (or standard) unit, except for money where the display unit is used. The value is preceded by a one-byte unit type, and a one-byte display type (or two-byte in case of the MoneyPerUnit). As an example: suppose the unit indicates that the type is a length, whereas the display type indicates that the internally stored value 60000.0 should be displayed as 60.0 km, this is coded as follows: |25|16|11|0x47|0x6A|0x60|0x00|- See Also:
- Constant Field Values
-
DOUBLE_64_UNIT
public static final byte DOUBLE_64_UNIT
Double, stored internally in the SI unit, with a unit type and display type attached. The internal storage of the value that is transmitted is always in the SI (or standard) unit, except for money where the display unit is used. The value is preceded by a one-byte unit type and a one-byte display type (or two-byte in case of the MoneyPerUnit). As an example: suppose the unit indicates that the type is a length, whereas the display type indicates that the internally stored value 60000.0 should be displayed as 60.0 km, this is coded as follows: |26|16|11|0x47|0x6A|0x60|0x00|0x00|0x00|0x00|0x00|- See Also:
- Constant Field Values
-
FLOAT_32_UNIT_ARRAY
public static final byte FLOAT_32_UNIT_ARRAY
Number-preceded dense float array, stored internally in the SI unit, with a unit type and display type. After the byte with value 27, the array types have a 32-bit int indicating the number of values in the array that follows. This int is itself not preceded by a byte indicating it is an int. Then a one-byte unit type follows and a one-byte display type (or two-byte in case of the MoneyPerUnit). The internal storage of the values that are transmitted after that always use the SI (or standard) unit, except for money where the display unit is used. As an example: when we send an array of two durations, 2.0 minutes and 2.5 minutes, this is coded as follows: |27|0|0|0|2|25|7|0x40|0x00|0x00|0x00|0x40|0x20|0x00|0x00|- See Also:
- Constant Field Values
-
DOUBLE_64_UNIT_ARRAY
public static final byte DOUBLE_64_UNIT_ARRAY
Number-preceded dense double array, stored internally in the SI unit, with a unit type and display type. After the byte with value 28, the array types have a 32-bit int indicating the number of values in the array that follows. This int is itself not preceded by a byte indicating it is an int. Then a one-byte unit type follows and a one-byte display type (or two-byte in case of the MoneyPerUnit). The internal storage of the values that are transmitted after that always use the SI (or standard) unit, except for money where the display unit is used. As an example: when we send an array of two durations, 21.2 minutes and 21.5 minutes, this is coded as follows: |28|0|0|0|2|25|7|0x40|0x35|0x33|0x33|0x3|0x33|0x33|0x33|0x40|0x35|0x80|0x00|0x00|0x00|0x00|0x00|- See Also:
- Constant Field Values
-
FLOAT_32_UNIT_MATRIX
public static final byte FLOAT_32_UNIT_MATRIX
Rows/Cols-preceded dense float array, stored internally in the SI unit, with a unit type and display type. After the byte with value 29, the matrix types have a 32-bit int indicating the number of rows in the array that follows, followed by a 32-bit int indicating the number of columns. These integers are not preceded by a byte indicating it is an int. Then a one-byte unit type follows and a one-byte (or two-byte in case of the MoneyPerUnit) display type The internal storage of the values that are transmitted after that always use the SI (or standard) unit, except for money where the display unit is used. Summarized, the coding is as follows:|29| |R|O|W|S| |C|O|L|S| |UT| |DT| |R|1|C|1| |R|1|C|2| ... |R|1|C|n| |R|2|C|1| |R|2|C|2| ... |R|2|C|n| ... |R|m|C|1| |R|m|C|2| ... |R|m|C|n|
In the language sending ore receiving a matrix, the rows are denoted by the outer index, and the columns by the inner index: matrix[row][col].- See Also:
- Constant Field Values
-
DOUBLE_64_UNIT_MATRIX
public static final byte DOUBLE_64_UNIT_MATRIX
Rows/Cols-preceded dense double array, stored internally in the SI unit, with a unit type and display type. After the byte with value 30, the matrix types have a 32-bit int indicating the number of rows in the array that follows, followed by a 32-bit int indicating the number of columns. These integers are not preceded by a byte indicating it is an int. Then a one-byte unit type follows and a one-byte (or two-byte in case of the MoneyPerUnit) display type The internal storage of the values that are transmitted after that always use the SI (or standard) unit, except for money where the display unit is used. Summarized, the coding is as follows:|30| |R|O|W|S| |C|O|L|S| |UT| |DT| |R|1|C|1|.|.|.|.| |R|1|C|2|.|.|.|.| ... |R|1|C|n|.|.|.|.| |R|2|C|1|.|.|.|.| |R|2|C|2|.|.|.|.| ... |R|2|C|n|.|.|.|.| ... |R|m|C|1|.|.|.|.| |R|m|C|2|.|.|.|.| ... |R|m|C|n|.|.|.|.|
In the language sending ore receiving a matrix, the rows are denoted by the outer index, and the columns by the inner index: matrix[row][col].- See Also:
- Constant Field Values
-
FLOAT_32_UNIT_COLUMN_ARRAY
public static final byte FLOAT_32_UNIT_COLUMN_ARRAY
Number-preceded dense float array, stored internally in the SI unit, with a unique unit type and display type per row. After the byte with value 31, the matrix types have a 32-bit int indicating the number of rows in the array that follows, followed by a 32-bit int indicating the number of columns. These integers are not preceded by a byte indicating it is an int. Then a one-byte unit type for column 1 follows and a one-byte (or two-byte in case of the MoneyPerUnit) display type for column 1. Then the unit type and display type for column 2, etc. The internal storage of the values that are transmitted after that always use the SI (or standard) unit, except for money where the display unit is used. Summarized, the coding is as follows:|31| |R|O|W|S| |C|O|L|S| |UT1|DT1| |UT2|DT2| ... |UTn|DTn| |R|1|C|1| |R|1|C|2| ... |R|1|C|n| |R|2|C|1| |R|2|C|2| ... |R|2|C|n| ... |R|m|C|1| |R|m|C|2| ... |R|m|C|n|
In the language sending or receiving a matrix, the rows are denoted by the outer index, and the columns by the inner index: matrix[row][col]. This data type is ideal for, for instance, sending a time series of values, where column 1 indicates the time, and column 2 the value. Suppose that we have a time series of 4 values at t = {1, 2, 3, 4} hours and dimensionless values v = {20.0, 40.0, 50.0, 60.0}, then the coding is as follows:|31| |0|0|0|4| |0|0|0|2| |26|8| |0|0| |0x3F|0x80|0x00|0x00| |0x41|0xA0|0x00|0x00| |0x40|0x00|0x00|0x00| |0x42|0x20|0x00|0x00| |0x40|0x00|0x40|0x00| |0x42|0x48|0x00|0x00| |0x40|0x80|0x00|0x00| |0x42|0x70|0x00|0x00|
- See Also:
- Constant Field Values
-
DOUBLE_64_UNIT_COLUMN_ARRAY
public static final byte DOUBLE_64_UNIT_COLUMN_ARRAY
Number-preceded dense double array, stored internally in the SI unit, with a unique unit type and display type per row. After the byte with value 32, the matrix types have a 32-bit int indicating the number of rows in the array that follows, followed by a 32-bit int indicating the number of columns. These integers are not preceded by a byte indicating it is an int. Then a one-byte unit type for column 1 follows (see the table above) and a one-byte (or two-byte in case of the MoneyPerUnit) display type for column 1 (see Appendix A). Then the unit type and display type for column 2, etc. The internal storage of the values that are transmitted after that always use the SI (or standard) unit, except for money where the display unit is used. Summarized, the coding is as follows:|32| |R|O|W|S| |C|O|L|S| |UT1|DT1| |UT2|DT2| ... |UTn|DTn| |R|1|C|1|.|.|.|.| |R|1|C|2|.|.|.|.| ... |R|1|C|n|.|.|.|.| |R|2|C|1|.|.|.|.| |R|2|C|2|.|.|.|.| ... |R|2|C|n|.|.|.|.| ... |R|m|C|1|.|.|.|.| |R|m|C|2|.|.|.|.| ... |R|m|C|n|.|.|.|.|
In the language sending or receiving a matrix, the rows are denoted by the outer index, and the columns by the inner index: matrix[row][col]. This data type is ideal for, for instance, sending a time series of values, where column 1 indicates the time, and column 2 the value. Suppose that we have a time series of 4 values at dimensionless years {2010, 2011, 2012, 2013} and costs of dollars per acre of {415.7, 423.4, 428.0, 435.1}, then the coding is as follows:|32| |0|0|0|4| |0|0|0|2| |0|0| |101|150|18| |0x40|0x9F|0x68|0x00|0x00|0x00|0x00|0x00| |0x40|0x79|0xFB|0x33|0x33|0x33|0x33|0x33| |0x40|0x9F|0x6C|0x00|0x00|0x00|0x00|0x00| |0x40|0x7A|0x76|0x66|0x66|0x66|0x66|0x66| |0x40|0x9F|0x70|0x00|0x00|0x00|0x00|0x00| |0x40|0x7A|0xC0|0x00|0x00|0x00|0x00|0x00| |0x40|0x9F|0x74|0x00|0x00|0x00|0x00|0x00| |0x40|0x7A|0x91|0x99|0x99|0x99|0x99|0x9A|
- See Also:
- Constant Field Values
-
BYTE_8_LE
public static final byte BYTE_8_LE
128 (-128) Byte, 8 bit signed two's complement integer; equal to code 0.- See Also:
- Constant Field Values
-
SHORT_16_LE
public static final byte SHORT_16_LE
129 (-127) Short, 16 bit signed two's complement integer, little endian order.- See Also:
- Constant Field Values
-
INT_32_LE
public static final byte INT_32_LE
130 (-126) Integer, 32 bit signed two's complement integer, little endian order.- See Also:
- Constant Field Values
-
LONG_64_LE
public static final byte LONG_64_LE
131 (-125) Long, 64 bit signed two's complement integer, little endian order.- See Also:
- Constant Field Values
-
FLOAT_32_LE
public static final byte FLOAT_32_LE
132 (-124) Float, single-precision 32-bit IEEE 754 floating point, little endian order.- See Also:
- Constant Field Values
-
DOUBLE_64_LE
public static final byte DOUBLE_64_LE
133 (-123) Float, double-precision 64-bit IEEE 754 floating point, little endian order.- See Also:
- Constant Field Values
-
BOOLEAN_8_LE
public static final byte BOOLEAN_8_LE
134 (-122) Boolean, sent / received as a byte; 0 = false, 1 = true; equal to code 6.- See Also:
- Constant Field Values
-
CHAR_8_LE
public static final byte CHAR_8_LE
135 (-121) Char, 8-bit ASCII character; equal to code 7.- See Also:
- Constant Field Values
-
CHAR_16_LE
public static final byte CHAR_16_LE
136 (-120) Char, 16-bit Unicode character, little-endian order for the 2 part.- See Also:
- Constant Field Values
-
STRING_8_LE
public static final byte STRING_8_LE
s 137 (-119) String, 32-bit little-endian number-preceded byte array of 8-bits characters.- See Also:
- Constant Field Values
-
STRING_16_LE
public static final byte STRING_16_LE
138 (-118) String, 32-bit little-endian number-preceded char array of 16-bits characters, each 2-byte character in little-endian order.- See Also:
- Constant Field Values
-
BYTE_8_ARRAY_LE
public static final byte BYTE_8_ARRAY_LE
139 (-117) Byte array, preceded by a 32-bit little-endian number indicating the number of bytes.- See Also:
- Constant Field Values
-
SHORT_16_ARRAY_LE
public static final byte SHORT_16_ARRAY_LE
140 (-116) Short array, preceded by a 32-bit little-endian number indicating the number of shorts, little-endian coded shorts.- See Also:
- Constant Field Values
-
INT_32_ARRAY_LE
public static final byte INT_32_ARRAY_LE
141 (-115) Integer array, preceded by a 32-bit little-endian number indicating the number of integers, little-endian coded ints.- See Also:
- Constant Field Values
-
LONG_64_ARRAY_LE
public static final byte LONG_64_ARRAY_LE
142 (-114) Long array, preceded by a 32-bit little-endian number indicating the number of longs, little-endian coded longs.- See Also:
- Constant Field Values
-
FLOAT_32_ARRAY_LE
public static final byte FLOAT_32_ARRAY_LE
143 (-113) Float array, preceded by a 32-bit little-endian number indicating the number of floats, little-endian coded floats.- See Also:
- Constant Field Values
-
DOUBLE_64_ARRAY_LE
public static final byte DOUBLE_64_ARRAY_LE
144 (-112) Double array, preceded by a 32-bit little-endian number indicating the number of doubles, little-endian coded doubles.- See Also:
- Constant Field Values
-
BOOLEAN_8_ARRAY_LE
public static final byte BOOLEAN_8_ARRAY_LE
145 (-111) Boolean array, preceded by a 32-bit little-endian number indicating the number of booleans.- See Also:
- Constant Field Values
-
BYTE_8_MATRIX_LE
public static final byte BYTE_8_MATRIX_LE
146 (-110) Byte matrix, preceded by a 32-bit little-endian number row count and a 32-bit little-endian number column count.- See Also:
- Constant Field Values
-
SHORT_16_MATRIX_LE
public static final byte SHORT_16_MATRIX_LE
147 (-109) Short matrix, preceded by a 32-bit little-endian number row count and a 32-bit little-endian number column count, little-endian coded shorts.- See Also:
- Constant Field Values
-
INT_32_MATRIX_LE
public static final byte INT_32_MATRIX_LE
148 (-108) Integer matrix, preceded by a 32-bit little-endian number row count and a 32-bit little-endian number column count, little-endian coded ints.- See Also:
- Constant Field Values
-
LONG_64_MATRIX_LE
public static final byte LONG_64_MATRIX_LE
149 (-107) Long matrix, preceded by a 32-bit little-endian number row count and a 32-bit little-endian number column count, little-endian coded longs.- See Also:
- Constant Field Values
-
FLOAT_32_MATRIX_LE
public static final byte FLOAT_32_MATRIX_LE
150 (-106) Float matrix, preceded by a 32-bit little-endian number row count and a 32-bit little-endian number column count, little-endian coded floats.- See Also:
- Constant Field Values
-
DOUBLE_64_MATRIX_LE
public static final byte DOUBLE_64_MATRIX_LE
151 (-105) Double matrix, preceded by a 32-bit little-endian number row count and a 32-bit little-endian number column count, little-endian doubles.- See Also:
- Constant Field Values
-
BOOLEAN_8_MATRIX_LE
public static final byte BOOLEAN_8_MATRIX_LE
152 (-104) Boolean matrix, preceded by a 32-bit little-endian number row count and a 32-bit little-endian number column count.- See Also:
- Constant Field Values
-
FLOAT_32_UNIT_LE
public static final byte FLOAT_32_UNIT_LE
153 (-103) Float stored internally as a little-endian float in the corresponding SI unit, with unit type and display unit attached. The total size of the object is 7 bytes plus 1 or 2 extra bytes when a money unit is involved.- See Also:
- Constant Field Values
-
DOUBLE_64_UNIT_LE
public static final byte DOUBLE_64_UNIT_LE
154 (-102) Double stored internally as a little-endian double in the corresponding SI unit, with unit type and display unit attached. The total size of the object is 11 bytes plus 1 or 2 extra bytes when a money unit is involved.- See Also:
- Constant Field Values
-
FLOAT_32_UNIT_ARRAY_LE
public static final byte FLOAT_32_UNIT_ARRAY_LE
155 (-101) Dense float array, preceded by a little-endian 32-bit number indicating the number of floats, with unit type and display unit attached to the entire float array. Each float is stored in little-endian order.- See Also:
- Constant Field Values
-
DOUBLE_64_UNIT_ARRAY_LE
public static final byte DOUBLE_64_UNIT_ARRAY_LE
156 (-100) Dense double array, preceded by a little-endian 32-bit number indicating the number of doubles, little-endian order, with unit type and display unit attached to the entire double array. Each double is stored in little-endian order.- See Also:
- Constant Field Values
-
FLOAT_32_UNIT_MATRIX_LE
public static final byte FLOAT_32_UNIT_MATRIX_LE
157 (-99) Dense float matrix, preceded by a 32-bit little-endian row count int and a 32-bit little-endian column count int, with unit type and display unit attached to the entire float matrix. Each float is stored in little-endian order.- See Also:
- Constant Field Values
-
DOUBLE_64_UNIT_MATRIX_LE
public static final byte DOUBLE_64_UNIT_MATRIX_LE
158 (-98) Dense double matrix, preceded by a 32-bit little-endian row count int and a 32-bit little-endian column count int, with unit type and display unit attached to the entire double matrix. Each double is stored in little-endian order.- See Also:
- Constant Field Values
-
FLOAT_32_UNIT2_MATRIX_LE
public static final byte FLOAT_32_UNIT2_MATRIX_LE
159 (-97) Dense little-endian float matrix, preceded by a 32-bit little-endian row count int and a 32-bit little-endian column count int, with a unique unit type and display unit per row of the float matrix.- See Also:
- Constant Field Values
-
DOUBLE_64_UNIT2_MATRIX_LE
public static final byte DOUBLE_64_UNIT2_MATRIX_LE
160 (-96) Dense little-endian double matrix, preceded by a 32-bit little-endian row count int and a 32-bit little-endian column count int, with a unique unit type and display unit per row of the double matrix.- See Also:
- Constant Field Values
-
-