TypeDefinitions
JSON key: <type name> - this is a user-defined name that can be used in "Messages".
JSON value: <type options> - this a JSON object containing additional key/values.
TypeDefinition example
"example_type"
: {
"type"
:
"uint"
,
"size"
:
2
,
"endian"
:
"big"
,
"flags"
:[
"some_flag"
] }
"TypeDefinition" settings
JSON key: "type"
JSON value: <acd field type>
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"
JSON value: <integer> - varies depending on type
JSON key: "endian"
JSON value: "big" or "little". Defaults to "big" if this setting is left out.
JSON key: "flags"
JSON value: A JSON array of strings - e.g. [ "var_size"]
The current supported flags are:
flag: "var_size"
JSON value: <integer> - Makes a "string" or "binary" type of variable length. size and endian is 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