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 builds arrays from the received elements. Each element is placed at the position given by the current “Index” input tag value; index numbering starts at zero. Elements may arrive in any order — the index value determines the position in the output array, not the arrival sequence. Once the “Index” input tag value equals the given “Size” input tag value minus one, the array is constructed from the accumulated elements and 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 incoming 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.
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 Fahrenheit by applying scale and offset calculations, and finally the “Array Builder” reconstructs an array of numerical temperature values in Fahrenheit. The result is shown in the “Terminator” output node.