Binary Encode / Decode Processors

The “Binary Encode” and “Binary Decode” processors are installed with the Dataristix Application. The processors take one or more values as inputs and either encode the input values into a byte array or decode a byte array into individual values for further processing in the task pipeline. Individual values must be of a primitive type (numerical values or boolean).

Add to Task

Add the respective processor to a task by dragging it from the “Build” panel onto the task’s “Task Builder” panel.

../../_images/processor-binaryencodedecode.png

Binary Encoder Configuration

Select the “Binary Encoder Processor” item in the “Task Builder” panel to view its properties.

../../_images/processor-binaryencode-edit.png

You can change the following properties.

  • Name

    The title of the processor topic as it appears within the task builder.

  • Byte Order

    Determines whether values are encoded in little endian or big endian format.

  • Values

    For each value within the byte array, enter a name, value offset and data type. When values are received by the Binary Encoder processor then these values are encoded into a byte array containing the defined fields.

Binary Decoder Configuration

Select the “Binary Decoder Processor” item in the “Task Builder” panel to view its properties.

../../_images/processor-binarydecode-edit.png

You can change the following properties.

  • Processor Topic Name

    The title of the processor topic as it appears within the task builder.

  • Byte Order

    Determines whether values are encoded in little endian or big endian format.

  • Values

    For each value within the byte array, enter a name, value offset and data type. When a byte array is received by the Binary Decoder processor then these values are read from the byte array and made available as individual output tags.

Examples

Encode Binary Data

In the following example, Sine signal floating point values are processed by the Binary Encoder and each value is forwarded as a binary 4-byte value to the MQTT connector.

../../_images/processor-binaryencode-example.png

Decode Binary Data

In the following example, Sine signal floating point values are processed by the Binary Decoder. The incoming byte array is split into individual values and forwarded to the ODBC connector.

../../_images/processor-binarydecode-example.png