TypeDefinitions
JSON key: <type name>
key | Required? | Type | Value description |
---|---|---|---|
This is a user-defined name that can be used in "Messages". | Yes | String | This a JSON object containing additional key/values. See Additional key/values below. |
TypeDefinition Example:
"example_type"
: {
"type"
:
"uint"
,
"size"
:
2
,
"endian"
:
"big"
,
"flags"
:[
"some_flag"
] }
Additional key/values
These are:
type
size
endian
flags
JSON key: "type"
JSON value: <acd field type>. See table:
Acd field type | Tipoff datafield type | Notes |
---|---|---|
int | Int | "size" can only be 1, 2, 4 or 8. If "endian" is not specified it defaults to "big". |
uint | Uint | "size" can only be 1, 2, 4 or 8. If "endian" is not specified it defaults to "big". |
string | String | fixed size strings: variable size strings: If "var_size" is set, then the source data is expected to be of the form "<size><string data of size bytes>". If both "size" and "var_size" is set then the behaviour is that the decoder will decode var_size data into the field AND skip "size" bytes to the next field. e.g. "OrderIDType" : { "type":"string", "size": 18, "var_size":2} |
binary | Binary | fixed size binary data: variable size binary data: If "var_size" is set then the source data is expected to be of the form "<size><data of size bytes>". If both "size" and "var_size" is set then the behaviour is that the decoder will decode "var_size" data into the field AND skip "size" bytes to the next field. Primarily for MEMX fixed size fields with variable sized data. e.g. "orderType" : { "type":"binary", "size": 18, "var_size":2} |
timestamp | Timestamp | |
char | Char | <not implemented yet> |
price | Float | <not implemented yet> |
JSON key: "size"
key | Required? | Type | Value description |
---|---|---|---|
size | Yes | Integer | See the table above for the appropriate values. See also flag: “var_size” below. |
JSON key: "endian"
key | Required? | Type | Value description |
---|---|---|---|
endian | No | String | Set to "big" or "little". Defaults to "big" if this setting is left out. See also flag: “var_size” below. |
JSON key: "flags"
key | Required? | Type | Value description |
---|---|---|---|
flags | No | Array | A JSON array of strings. See section Flags and the list of flags below. |
The currently supported flags are:
flag: "var_size"
key | Required? | Type | Value description |
---|---|---|---|
var_size | No | Integer | Makes a "string" or "binary" type of variable length. “size” and “endian” are used to describe the format of the size field to decode the size from. The decoded size is used to set the string or binary datafield. |