Array Builder Processor

The “Array Builder Processor” is installed with the Dataristix Application.

The processor takes one or more array element tags as inputs and accumulates array elements based on the given “Index” input tag. Index numbering starts at zero. Once the “Index” input tag value equals the given “Size” input tag value minus one, an array is constructed from the accumulated elements and the constructed arrays are forwarded for further processing in the task pipeline. Values received with a current “Index” value greater than or equal to the current “Size” value are discarded.

For each individual input tag, the incomming array element values must have the same data type or must be convertible to the data type of the first element. The “Size” input tag value should remain constant while array construction is in progress.

Add to Task

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

../../_images/processor-arraybuilder.png

Configuration

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

You can change the following properties:

  • Name

    The title of the “Array Builder Processor” as it appears within the task builder.

Example

The following example shows a task that receives a JSON object containing an array of temperature values in degrees Celsius. The JSON object is decoded into an array of numbers. Subsequently the “Array Sequencer” forwards each element individually to the “Scale and Offset” processor. Here the incoming value is converted from degrees Celsius to Fahrenheight by applying scale and offset calculations, and finally the “Array Builder” reconstructs an array of numerical temperature values in Fahrenheight. The result is shown in the “Terminator” output node.

../../_images/processor-arraybuilder-example.png