Device protocol V1.0

Protocol basics

This article provides an in-depth explanation of the communication protocol used between the Scrutiny server and a Scrutiny device. This protocol is not something a user needs to understand; instead, this information is intended to serve as developer documentation for those who wish to modify the software or debug their communication.

The communication between the server and the device is done through a custom binary protocol. The protocol is half-duplex and works in a request/response scheme. It draws inspiration from the UDS protocol used in the automotive industry defined by ISO-14229.

All fields are encoded in big-endian format and have a fixed size, with the exception of addresses, which depends on the device architecture. A CommControl-GetParams request is required to know the address size, but also the protocol version used and the rx/tx buffer sizes. If a timeout occurs during data reception, the internal state machine resets and waits for a new command ID. Requests that have an invalid CRC32 are silently ignored.

Before a server can send a request to a device, it must first establish a session with the device using a "Connect" request. If no connection is established, the device will only answer to these 2 requests CommControl-Discover and to CommControl-Connect. All other requests will be silently ignored.

Once a session is established, periodic CommControl-Heartbeat Requests must be sent to keep the session active. The server uses the heartbeat mechanism to detect if a device is disconnected and the device uses them to detect that a server is gone.

Request

  • Direction: Request or Response. 0 for request
  • Command ID: A 7 bit ID indicating the action that we want to perform
  • Subfunction: A subcommand ID that specify the command
  • Data Length: Number of bytes in the data field. Maximum value: 65520 bytes
  • CRC32: A CRC code that validates the frame integrity

Response

  • Direction: Request or Response. 1 for response
  • Command ID: An echo of the request Command ID
  • Subfunction: An echo of the request Subfunction
  • Code: A response code indicating the success or the reason of a failure
    • OK (0): Request completed successfully
    • InvalidRequest (1): Request was not properly crafted
    • UnsupportedFeature (2): Request ask for a feature that the device does not know of
    • Overflow (3): The response does not fit in the transmit buffer
    • Busy (4): Cannot process this request in the current state
    • FailureToProceed (5): Default failure message if anything prevents the device from completing the request
  • Data Length: Number of bytes in the data field. Maximum value: 65520 bytes
  • CRC32: A CRC code that validates the frame integrity

CRC

The CRC algorithm used is a standard CRC32. A C++ implementation would look like this

uint32_t crc32(const uint8_t *data, const uint32_t size, const uint32_t start_value){
    uint32_t crc = ~start_value;
    for (uint32_t i = 0; i < size; i++){
        uint8_t byte = data[i];
        for (unsigned int j = 0; j < 8; j++){
            const unsigned int lsb = (byte ^ crc) & 1;
            crc >>= 1;
            if (lsb){
                crc ^= 0xEDB88320;
            }
            byte >>= 1;
        }
    }
    return ~crc;
} 

Data types

On multiple occasion, data types are communicated. Each datatype has a 1 byte ID where the high part represent the type type (int, float, uint) and the low part represent the size

Type ID
sint80x00
sint160x01
sint320x02
sint640x03
uint80x10
uint160x11
uint320x12
uint640x13
float320x22
float640x23
boolean0x30

GetInfo [0x01]

GetProtocolVersion [0x1]

Request the device for its protocol version.

Request Data

- Empty

Response Data

Position Name Size (B) Description
0 <major> 1 Protocol major number
1 <minor> 1 Protocol minor number

Example

  • Request: 01010000983ad24e
    • Empty data
  • Response: 8101000002010062ce08b2
    • major: 1
    • minor: 0

GetSoftwareId [0x2]

Request the device for its firmware ID

Request Data

- Empty

Response Data

Position Name Size (B) Description
0 <software-id> 16 Software ID (hash)

Example

  • Request: 010200009a7c6c17
    • Empty data
  • Response: 8102000010deadbeefdeadbeefdeadbeefdeadbeefcdece33f
    • Software ID: deadbeefdeadbeefdeadbeefdeadbeef

GetSupportedFeatures [0x3]

Request the device for the list of supported features. Some features can be disabled to reduces the embedded library footprint

Request Data

- Empty

Response Data

Position Name Size (B) Description
0 <feature_byte_1> 1 Feature bitfields. Enabled when a bit value is 1
  • 0x80: Memory Write
  • 0x40: Datalogging
  • 0x20: User command
  • 0x10: 64 bits support

Example

  • Request: 010300009bbe0620
    • Empty data
  • Response: 810300000150e2980695
    • Memory Write: Disabled
    • Datalogging: Enabled
    • User command: Disabled
    • 64 bits support: Enabled

GetSpecialMemoryRegionCount [0x4]

Request the device with the number of readonly and forbidden memory region

Request Data

- Empty

Response Data

Position Name Size (B) Description
0 <nbr_readonly> 1 Number of read-only regions
1 <nbr_forbidden> 1 Number of forbidden regions

Example

  • Request: 010400009ef110a5
    • Empty data
  • Response: 8104000002030407583f9a
    • Readonly regions: 3
    • Forbidden regions: 4

GetSpecialMemoryRegionLocation [0x5]

Request the device with the number of readonly and forbidden memory region

Request Data

Position Name Size (B) Description
0 <region_type> 1 Type of the memory region. ReadOnly(0) or Forbidden(1)
1 <region_index> 1 Index of the region. Value should be between 0 and <nbr_<type>>-1

Response Data

Position Name Size (B) Description
0 <region_type> 1 Type of the memory region. ReadOnly(0) or Forbidden(1)
1 <region_index> 1 Index of the region. Value should be between 0 and <nbr_<type>>-1
2 <start> <addr_size> Start address of the region
2+<addr_size> <end> <addr_size> End address of the region (included)

Example

  • Request: 01050002010246ef7975
    • Region Type: Forbidden(1)
    • Region index: 2
  • Response: 810500000A0102800000008fffffff61285840
    • Region Type: Forbidden(1)
    • Region index: 2
    • Start address: 0x80000000
    • End address: 0x8FFFFFFF

GetRuntimePublishedValuesCount [0x6]

Request the device with the number of Runtime Published Values (RPV)

Request Data

- Empty

Response Data

Position Name Size (B) Description
0 <rpv_count> 2 Number of RPV

Example

  • Request: 010600009d75c4cb
    • Empty data
  • Response: 81060000020123ddac4978
    • Number of RPV: 291

GetRuntimePublishedValuesDefinition [0x7]

Request the device with the definition of multiple Runtime Published Values (RPV). A definition include ID and type (size implied by data type)

Request Data

Position Name Size (B) Description
0 <batch_start> 2 Start index of the this batch
2 <batch_size> 2 Number of RPV to include in this batch read

Response Data

Position Name Size (B) Description
0 <rpv_id_0> 2 ID of the RPV #0 in the batch
2 <rpv_type_0> 1 Data type of RPV #0 in the batch. See the data type table
3 <rpv_id_1> 2 ID of the RPV #1 in the batch
5 <rpv_type_1> 1 Data type of RPV #1 in the batch. See the data type table
3N <rpv_id_N> 2 Data type of RPV #N in the batch
3N+2 <rpv_type_N> 1 Data type of RPV #N in the batch. See the data type table

Example

  • Request: 010700040030000253cac305
    • Batch start index: 0x30
    • Batch size: 2
  • Response: 8107000006aabb01ccdd22428b8c8a
    • RPV ID #1: 0xAABB
    • RPV type #1: int16 (0x01)
    • RPV ID #2: 0xCCDD
    • RPV type #2: float32 (0x22)

GetLoopCount [0x8]

Request the device with the number of loops (execution unit with its own time domain) being run on the device

Request Data

- Empty

Response Data

Position Name Size (B) Description
0 <loop_count> 1 Number of loops (task)

Example

  • Request: 0108000097ebe9c1
    • Empty data
  • Response: 810800000103d44c4de4
    • Number of loops: 3

GetLoopDefinition [0x9]

Get the parameters of a loop (execution unit with its own time domain)

Request Data

Position Name Size (B) Description
0 <loop_id> 1 Index of the loop. Value must be between 0 and <loop_count>-1

Response Data

Position Name Size (B) Description
0 <loop_id> 1 Echo of the loop ID in the request
1 <loop_type> 1 Type of loop. FixedFrequency(0) or VariableFrequency(1)
2 <attribute_byte> 1 Bit field of attributes
  • 0x80: Supports datalogging
  • 3 (loop_type=0)
<timestep> 4 Timestep of the fixed frequency loop, in multiple of 100ns
  • 8 (loop_type=0)
  • 4 (loop_type=1)
<name_length> 1 Length of the loop name
  • 9 (loop_type=0)
  • 4 (loop_type=1)
<loop_name> <name_length> Name of the loop, encoded in ASCII

Example

  • Request: 0109000102715fc14a
    • Loop ID: 2
  • Response: 810900000D020080000003E80548656c6c6F382debc0
    • Loop ID: 2
    • Loop type: FixedFrequency (0)
    • Attribute: 0x80
        Support datalogging: Enabled
    • Timestep: 0x000003E8 → 1000*100ns=100us (10KHz)
    • Name length: 5
    • Name: "Hello"

CommControl [0x02]

Discover [0x1]

Request for a device to identify itself with his firmware ID and name

Request Data

Position Name Size (B) Description
0 <magic_number> 4 Constant number to include in each request. Value=0x7E18FC68

Response Data

Position Name Size (B) Description
0 <protocol_major> 1 Protocol version major number
1 <protocol_minor> 1 Protocol version minor number
2 <firmware_id> 16 Firmware ID unique to this firmware (hash)
18 <name_length> 1 Length of the firmware display name
19 <display_name> <name_length> Name of the firmware encoded in ASCII

Example

  • Request: 020100047E18FC68164517dc
    • Magic number: 0x7E18FC68
  • Response: 82010000180100deadbeef0123456789abcdefdeadbeef0548656c6c6fbb1cb6f5
    • Protocol major: 1
    • Protocol minor: 0
    • firmware ID: 0xdeadbeef0123456789abcdefdeadbeef
    • Name length: 5
    • Name: "Hello"

Heartbeat [0x2]

Keep a connection to a device alive. Meaning the device will refuse any other incoming Connect request as long heartbeat are being sent

Request Data

Position Name Size (B) Description
0 <session_id> 4 The session ID returned by the device on a Connect response
4 <challenge> 2 A 16 bits random number that the device must use in its response to prove that it is still alive. The challenge response is expected to be the binary complement of that value

Response Data

Position Name Size (B) Description
0 <session_id> 4 An echo of the <session_id> given in the request
4 <challenge_response> 2 The binary complement of the <challenge> field in the request

Example

  • Request: 0202000601020304AA554190d318
    • Session ID: 0x01020304
    • Challenge: 0xAA55
  • Response: 82020000060102030455AA76c0bca5
    • Session ID echo: 0x01020304
    • Challenge response: 0x55AA

GetParams [0x3]

Request for the device communication parameters

Request Data

- Empty

Response Data

Position Name Size (B) Description
0 <max_rx_data_size> 2 Maximum size that a request data payload can have. Tied to the internal communication buffer size.
2 <max_tx_data_size> 2 Maximum size that a response data payload can have. Tied to the internal communication buffer size.
4 <max_bitrate_bps> 4 Maximum bitrate to respect during communication. 0 means no limit
8 <heartbeat_timeout_us> 4 Amount of time that the device will wait for a heartbeat request before declaring that the server is gone. Value in microseconds
12 <rx_timeout_us> 4 Amount of time that the device will wait without receiving data before resetting its reception state machine
16 <addr_size> 1 Address size of the device. All addresses will be encoded according to that size

Example

  • Request: 02030000890ba9ce
    • Empty data
  • Response: 820300001100800100000186a002FAF0800000c350042f78619a
    • Max request data size: 128 bytes
    • Max response data size: 256 bytes
    • Max bitrate: 100kbps (0x000186a0)
    • Heartbeat timeout: 5s (0x02FAF080)
    • RX timeout: 50ms (0000c350)
    • Address size: 4 bytes

Connect [0x4]

Request the device to start a session

Request Data

Position Name Size (B) Description
0 <magic_number> 4 Constant number to include in each request. Value=0x82902266

Response Data

Position Name Size (B) Description
0 <magic_number> 4 Echo of the magic number. Value=0x82902266
4 <session_id> 4 Session ID to use in heartbeat requests

Example

  • Request: 02040004829022669fe81eca
    • Magic number: 0x82902266
  • Response: 820400000882902266aabbccdda1ac4349
    • Magic number: 0x82902266
    • Session ID: 0xAABBCCDD

Disconnect [0x5]

Inform the device that we want to disconnect and destroy the session

Request Data

Position Name Size (B) Description
0 <session_id> 4 The session ID gotten in the Connect request

Response Data

- Empty

Example

  • Request: 02050004aabbccddf44f8fc8
    • Session ID: 0xAABBCCDD
  • Response: 82050000003adae4dd
    • Empty data

MemoryControl [0x03]

Read [0x1]

Reads the device memory based on an address and a length. Can read multiple block in a single request

Request Data

Position Name Size (B) Description
0 <address_block_0> <addr_size> Start address of memory block #0
<addr_size> <size_block_0> 2 Size of memory block #0
<addr_size>+2 <address_block_1> <addr_size> Start address of memory block #1
<addr_size>+4 <size_block_1> 2 Size of memory block #1
(<addr_size>+2)*N <address_block_N> <addr_size> Start address of memory block #N
(<addr_size>+2)*N+2 <size_block_N> 2 Size of memory block #N

Response Data

Position Name Size (B) Description
0 <address_block_0> <addr_size> Start address of memory block #0
<addr_size> <size_block_0> 2 Size of memory block #0
<addr_size> + 2 <data_block_0> <size_block_0> Memory content of block #0
<addr_size> + <size_block_0> + 2 <address_block_1> <addr_size> Start address of memory block #1
2*<addr_size> + <size_block_0> + 2 <size_block_1> 2 Size of memory block #1
2*<addr_size> + <size_block_0> + 4 <data_block_1> <size_block_1> Memory content of block #1
etc etc etc etc

Example

  • Request: 0301000C800012340008A41256780004ced846ad
    • Address #0: 0x80001234
    • Size #0: 8
    • Address #1: 0xA4125678
    • Size #1: 4
  • Response: 8301000018800012340008DEADBEEFDEADBEEFA412567800041122334494e68a2c
    • Address #0: 0x80001234
    • Size #0: 8
    • Data #0: 0xDEADBEEFDEADBEEF
    • Address #1: 0xA4125678
    • Size #1: 4
    • Data #1: 0x11223344

Write [0x2]

Writes the device memory based on an address and a payload. Can write multiple blocks in a single request

Request Data

Position Name Size (B) Description
0 <address_block_0> <addr_size> Start address of memory block #0
<addr_size> <size_block_0> 2 Size of memory block #0
<addr_size> + 2 <data_0> <size_block_0> Data to be written block #0
<addr_size> + <size_block_0> + 2 <address_block_1> <addr_size> Start address of memory block #1
2 * <addr_size> + <size_block_0> + 2 <size_block_1> 2 Size of memory block #1
2 * <addr_size> + <size_block_0> + 4 <data_1> <size_block_1> Data to be written inside block #1
etc etc etc etc

Response Data

Position Name Size (B) Description
0 <address_block_0> <addr_size> Start address of memory block #0
<addr_size> <size_block_0> 2 Size of memory block #0
<addr_size> + 2 <address_block_1> <addr_size> Start address of memory block #1
2 * <addr_size> + 2 <size_block_1> 2 Size of memory block #1
(<addr_size>+2)*N <address_block_N> <addr_size> Start address of memory block #N
(<addr_size>+2)*N+2 <size_block_N> 2 Size of memory block #N

Example

  • Request: 030200188000123400081122334455667788A41256780004FFEEDDCC5541dd2e
    • Address #0: 0x80001234
    • Size #0: 8
    • Data #0: 0x1122334455667788
    • Address #1: 0xA4125678
    • Size #1: 4
    • Data #1: 0xFFEEDDCC
  • Response: 830200000C800012340008A4125678000415092650
    • Address #0: 0x80001234
    • Size #0: 8
    • Address #1: 0xA4125678
    • Size #1: 4

WriteMasked [0x3]

Writes the device memory with an address, a payload and a binary mask as long as the payload. Only the bits where the mask is set to 1 will be written. Can write multiple blocks in a single request

Request Data

Position Name Size (B) Description
0 <address_block_0> <addr_size> Start address of memory block #0
<addr_size> <size_block_0> 2 Size of memory block #0
<addr_size> + 2 <data_0> <size_block_0> Data to be written block #0
<addr_size> + <size_block_0> + 2 <mask_0> <size_block_0> Mask applied on <data_0>
<addr_size> + 2*<size_block_0> + 2 <address_block_1> <addr_size> Start address of memory block #1
2*<addr_size> + 2*<size_block_0> + 2 <size_block_1> 2 Size of memory block #1
2*<addr_size> + 2*<size_block_0> + 4 <data_1> <size_block_1> Data to be written block #1
2*<addr_size> + 2*<size_block_0> + <size_block_1> + 4 <mask_1> <size_block_1> Mask applied on <data_1>
etc etc etc etc

Response Data

Position Name Size (B) Description
0 <address_block_0> <addr_size> Start address of memory block #0
<addr_size> <size_block_0> 2 Size of memory block #0
<addr_size> + 2 <address_block_1> <addr_size> Start address of memory block #1
2 * <addr_size> + 2 <size_block_1> 2 Size of memory block #1
(<addr_size>+2)*N <address_block_N> <addr_size> Start address of memory block #N
(<addr_size>+2)*N+2 <size_block_N> 2 Size of memory block #N

Example

  • Request: 030300248000123400081122334455667788AAAAAAAAAAAAAAAAA41256780004FFEEDDCC555555553c06f655
    • Address #0: 0x80001234
    • Size #0: 8
    • Data #0: 0x1122334455667788
    • Mask #0: 0xAAAAAAAAAAAAAAAA
    • Address #1: 0xA4125678
    • Size #1: 4
    • Data #1: 0xFFEEDDCC
    • Mask #1: 0x55555555
  • Response: 830300000C800012340008A41256780004bb61b7c1
    • Address #0: 0x80001234
    • Size #0: 8
    • Address #1: 0xA4125678
    • Size #1: 4

ReadRPV [0x4]

Reads a Runtime Published Value by providing its 16bits ID only. The value type is expected to be known by both sides. The caller can inquire the device with the list of its RPV using the GetInfo commands

Request Data

Position Name Size (B) Description
0 <rpv_id_0> 2 ID of RPV #0
2 <rpv_id_1> 2 ID of RPV #1
2N <rpv_id_N> 2 ID of RPV #N

Response Data

Position Name Size (B) Description
0 <rpv_id_0> 2 ID of RPV #0
2 <rpv_data_0> <X0> Data of RPV #0. Size depends on user definition and can be obtained with a GetRuntimePublishedValuesDefinition request.
<X0>+2 <rpv_id_0> 2 ID of RPV #0
<X0>+4 <rpv_data_0> <X1> Data of RPV #1. Size depends on user definition and can be obtained with a GetRuntimePublishedValuesDefinition request.

Example

  • Request: 03040006112233445566b31a0536
    • RPV ID #0: 0x1122
    • RPV ID #1: 0x3344
    • RPV ID #2: 0x5566
  • Response: 830400000D1122013344aabb55669988776603a4190f
    • RPV ID #0: 0x1122
    • RPV #0 data: 0x01 (assuming 8 bits type)
    • RPV ID #1: 0x3344
    • RPV #1 data: 0xaabb (assuming 16 bits type)
    • RPV ID #2: 0x5566
    • RPV #2 data: 0x99887766 (assuming 32 bits type)

WriteRPV [0x5]

Writes a Runtime Published Value by providing its 16bits ID and the binary payload. The value type is expected to be known by both sides. The requestor can inquire the device with the list of its RPV using the GetRuntimePublishedValuesDefinition request

Request Data

Position Name Size (B) Description
0 <rpv_id_0> 2 ID of RPV #0
2 <rpv_data_0> <X0> Data to write. Size <X0> is know be querying the device for the RPV datatype beforehand with a GetRuntimePublishedValuesDefinition request.
<X0>+2 <rpv_id_1> 2 ID of RPV #1
<X0>+4 <rpv_data_1> <X1> Data to write. Size <X1> is know be querying the device for the RPV datatype beforehand with a GetRuntimePublishedValuesDefinition request.
etc etc etc etc

Response Data

Position Name Size (B) Description
0 <rpv_id_0> 2 ID of RPV #0
2 <size_written_0> 1 Number of bytes written for RPV #0
3 <rpv_id_1> 2 ID of RPV #1
5 <size_written_1> 1 Number of bytes written for RPV #1
3N <rpv_id_N> 2 Number of bytes written for RPV #N
3N+2 <size_written_N> 1 Number of bytes written for RPV #N

Example

  • Request: 03050007123455ABCDEEFF6f3237af
    • RPV ID #0: 0x1234
    • RPV #1 data: 0x55 (assuming 8 bits type)
    • RPV ID #1: 0xABCD
    • RPV #1 data: 0xEEFF (assuming 16 bits type)
  • Response: 8305000006123401abcd02e709bc11
    • RPV ID #0: 0x1234
    • RPV #0 length written: 1 byte
    • RPV ID #1: 0xABCD
    • RPV #1 length written: 2 bytes

UserCommand [0x04]

Any

Calls a user-defined callback in the device. A GetSupportedFeatures request can be used to know if the device supports this command. A device will support this command if the firmware developer defined a callback by setting config.user_command_callback

Request Data

- Implementation specific

Response Data

- Implementation specific

Example

  • Request: 04AA000511223344552e278261
    • Subfunction: 0xAA
    • Data: 0x1122334455
  • Response: 84AA000003aabbcc023156d9
    • Subfunction: 0xAA
    • Data: aabbcc

DatalogControl [0x05]

GetSetup [0x1]

Request the device for its datalogging setup. (word "configuration" is purposely avoided here to avoid confusion). Includes encoding, buffer size, etc

Request Data

- Empty

Response Data

Position Name Size (B) Description
0 <buffer_size> 4 Size of the buffer allocated for datalogging
4 <encoding> 1 Method used to encode the data in the buffer. Raw(0)
5 <max_signal> 1 Maximum number of signals that can be logged in an acquisition. Variable, RPV and time all count as a signal

Example

  • Request: 0501000017584519
    • Empty data
  • Response: 85010000060000100000208a540162
    • Buffer Size: 4096
    • Encoding: Raw(0)
    • Max signal: 32

ConfigureDatalog [0x2]

Configure the datalogger for an acquisition. Circular buffer will start to be filled after this command

Request Data

Position Name Size (B) Description
0 <loop_id> 1 Index of the loop to use for sampling. See GetLoopCount and GetLoopDefinition
1 <config_id> 2 Arbitrary value that will be attached to the acquisition once finished to ensure the link between the configuration and the data.
3 <decimation> 2 Decimation factor. Sampling will be done once every <decimation> samples
5 <trigger_location> 1 Position of the trigger event in the buffer. 0=0% 128=50.2% and 255=100%
6 <timeout> 4 Maximum amount of time to wait after the trigger event has been raised. Value in multiple of 100ns. (ex: 1000000 = 100ms)
10 <condition_id> 1 Type of condition to use for the trigger
  • AlwaysTrue(0): 0 Operands
  • Equal(1): 2 operands
  • NotEqual(2): 2 operands
  • LessThan(3): 2 operands
  • LessOrEqualThan(4): 2 operands
  • GreaterThan(5): 2 operands
  • GreaterOrEqualThan(6): 2 operands
  • ChangeMoreThan(7): 2 operands
  • IsWithin(8): 3 operands
11 <hold_time> 4 Amount of time to wait with the trigger condition true until the trigger event is raised. Value in multiple of 100ns. (ex: 1000000 = 100ms)
15 <nb_operands> 1 Number of operands encoded in the request. This number should be adequate for the selected trigger condition
- <operand_type_0> 1 Type of operand for operand #0.
  • Literal(0)
  • Variable(1)
  • Variable Bitfield(2)
  • RPV(3)
- <operand_definition_0> 1,2 or 4 Definition of the operand #0. See table Operands definition below
- <operand_type_N> 1 Type of operand for operand #N.
  • Literal(0)
  • Variable(1)
  • Variable Bitfield(2)
  • RPV(3)
- <operand_definition_N> 1,2 or 4 Definition of the operand #N. See table Operands definition below
- <nb_signal> 1 Number of signals encoded in the request.
- <signal_type_0> 1 Type of the signal #0.
  • Memory(0)
  • RPV(1)
  • Time(2)
- <signal_definition_0> variable Definition of the signal #0. See table Signals definition below
- <signal_type_N> 1 Type of the signal #N.
  • Memory(0)
  • RPV(1)
  • Time(2)
- <signal_definition_N> variable Definition of the signal #N. See table Signals definition below

Operands are element that have a value that can be compared. We have Literal, RPV, Variable or a bitfield.

Operands definition
Type Format Definition
Literal <literal>
  • <literal> (float32) - Value of the literal
Variable <type> <addr>
  • <type> (uint8) - Data type. Refer to the data type table
  • <addr> (<addr_size>) - Location of the variable
Bitfield <type> <addr> <offset> <size>
  • <type> (uint8) - Data type. Refer to the data type table
  • <addr> (<addr_size>) - Location of the variable
  • <offset> (uint8) - Bitfield start offset
  • <size> (uint8) - Bitfield size
RPV <rpv_id>
  • <rpv_id> (uint16) - ID of the RPV

Signals are elements that can be logged by the datalogger. A memory region, an RPV value or the time.

Signal definition
Type Format Definition
Memory <addr> <size>
  • <addr> (<addr_size>) - Address of the memory block to sample
  • <size> (uint8) - Size of the memory block
RPV <id>
  • <id> (uint16) : ID of the RPV
Time - N/A

Response Data

- Empty

Example

  • Request: 0502002601aabb00104023C3460003000186a0020113123456780040490fda030200123456780401ABCD810bf87e
    • Loop ID: 1
    • Config ID: 0xaabb
    • Decimation: 0x0010
    • Trigger location: 0x40 (25%)
    • Timeout: 0x23C34600 (60s)
    • Trigger condition: LessThan (3)
    • Hold time: 0x186A0 (10ms)
    • Operand Count: 2
    • Operand #0 Type: Variable (1)
    • Operand #0 data type: uint32 (0x13)
    • Operand #0 address: 0x12345678
    • Operand #1 Type: Literal (0)
    • Operand #1 value: 3.1415926 (0x40490fda)
    • Number of signals: 3
    • Signal #0 type: Time (2)
    • Signal #1 type: Memory (0)
    • Signal #1 memory address: 0x12345678
    • Signal #1 memory size: 4
    • Signal #2 type: RPV (1)
    • Signal #2 RPV ID: 0xABCD
  • Response: 8502000000152d0074
    • Empty data

ArmTrigger [0x3]

Make the datalogger wait for the trigger condition to finish its acquisition

Request Data

- Empty

Response Data

- Empty

Example

  • Request: 0503000014dc9177
    • Empty data
  • Response: 8503000000ad916711
    • Empty data

DisarmTrigger [0x4]

Stop the datalogger from waiting for the trigger condition

Request Data

- Empty

Response Data

- Empty

Example

  • Request: 05040000119387f2
    • Empty data
  • Response: 850400000030465fa8
    • Empty data

GetStatus [0x5]

Request the device for the state of the datalogger

Request Data

- Empty

Response Data

Position Name Size (B) Description
0 <state> 1 State of the datalogger
  • Idle(0): Doing nothing, waiting on a configuration
  • Configured(1): Configuration loaded, logging is happening, but trigger is not monitored
  • Armed(2): Logging in progress, waiting for a trigger condition
  • Triggered(3): Trigger event raised, circular logging will end as soon as the trigger is correctly positioned
  • Acquisition_completed(4): Acquisition is ready for download
  • Error(5): Internal error. Requires a reset using the ResetDatalogger command
1 <remaining_bytes> 4 Total number of bytes that needs to be acquired after the trigger event to end the acquisition. Value will be 0 if the state is not "Triggered".
5 <write_counter> 4 Number of bytes acquired since the trigger event was raised. Value will be 0 if the state is not "Triggered".

Example

  • Request: 050500001051edc5
    • Empty data
  • Response: 850500000903000003e8000002eee5680f19
    • State: Triggered (3)
    • remaining_bytes: 1000 (0x000003e8)
    • write_counter: 750 (0x000002ee)
  • Acquisition completion is 75% (750/1000)

GetAcquisitionMetadata [0x6]

Once an acquisition is ready, request the device for the acquisition metadata

Request Data

- Empty

Response Data

Position Name Size (B) Description
0 <acquisition_id> 2 An ID assigned to the acquisition by the device. Will also be given with each chunk of data for matching validation
2 <config_id> 2 An echo of the configuration ID given with the ConfigureDatalog
4 <nb_points> 4 Number of sample points in the acquisition
8 <datasize> 4 Size of the acquisition data in bytes
12 <points_after_trigger> 4 Number of samples located after the trigger event

Example

  • Request: 050600001217539c
    • Empty data
  • Response: 850600001011223344000003e800001B58000000FAf9aa9457
    • acquisition_id: 0x1122
    • config_id: 0x3344
    • nb_points: 1000 (0x000003e8)
    • datasize: 7000 (0x00001B58)
    • points_after_trigger: 250 (0x000000FA)

ReadAcquisition [0x7]

Once an acquisition is ready, request the device to return the acquisition data. This request must be sent multiple time until all the data chunk is read.

Request Data

- Empty

Response Data

Position Name Size (B) Description
0 <finished> 1 Boolean flag. Set to 1 if that chunk of data is the last one.
1 <rolling_counter> 1 8 bits rolling counter that will increase after each request. Used to make sure that the data received is changing and not a repetition of a previous reading.
2 <acquisition_id> 2 Same value gotten in the GetAcquisitionMetadata for validation
4 <data>
  • finished=0: <payload_length>-4
  • finished=1: <payload_length>-8
Partial chunk of data
4+<data_length> <crc> 4 CRC32 of the complete acquisition dataset. Only present if <finished>=1

Example

  • Request: 0507000013d539ab
    • Empty data
  • Response 1: 850700001000123456112233445566778899aabbcc55d2dcac
    • finished: 0
    • rolling_counter: 0x12
    • acquisition_id: 0x3456
    • data: 0x112233445566778899aabbcc
    • crc: N/A
  • Response 2: 8507000010011234561122334455667788ffeeddcca1c30cdf
    • finished: 1
    • rolling_counter: 0x12
    • acquisition_id: 0x3456
    • data: 0x1122334455667788
    • crc: 0xffeeddcc

ResetDatalogger [0x8]

Put back the datalogger in standby state where it'll wait for a new configuration through ConfigureDatalog

Request Data

- Empty

Response Data

- Empty

Example

  • Request: 0508000018897e96
    • Empty data
  • Response: 85080000007a90e010
    • Empty data