Stream Processor
The Stream Processor allows incoming messages to be processed by connecting various processing blocks ("Processing Blocks") and then passing them back to the Edge Broker of the RoboGate Edge. Functions include, for example, data aggregation and mathematical calculations based on incoming messages. Multiple independent data streams can be processed independently and uniformly, as illustrated in the sketch below.

Configuration Schema
The configuration of the Stream Processor includes the definition of the following elements:
Input into the Stream Processor,
Processing of the input, and
Output from the Stream Processor to the Edge Broker.
For configuration in the RoboGate Edge UI and connecting these elements, the Stream Processor provides a flow editor (Figure 2) with the following components:
Editor menu bar:
Zoom,
automatic block arrangement on the canvas,
clear the canvas,
delete a block
Panel "Settings": configure input edge topics and default output topic
Panel "Blocks": collection of available input, processing, and output blocks
Canvas: configuration, connection, and arrangement of blocks
Save: save the configuration
Reset configuration

To create a new block, click the corresponding element in the "Blocks" panel. The block will then appear on the canvas. You can freely move the block within the canvas using drag & drop.
To remove a block, either click the delete button in the block on the canvas, or select the block and click
"Delete Selected" in the editor menu bar.
To remove all blocks, click
"Clear" in the editor menu bar.
Each block has input and/or output nodes through which it can be connected. Messages are forwarded through these connections. To connect blocks, click on an output node and drag a line to an input node of another block. To remove a connection, click on the node at the end of the connection and detach it from the input node of the following block. If no new connection is created, the connection is automatically removed. Each node can have multiple connections.
Connecting the input, processing, and output blocks is a prerequisite for message processing in the Stream Processor!
Input
By specifying Input Edge Topics, you define which topics available in the RoboGate Edge or Edge Broker are processed in the Stream Processor. This selection serves as an input filter for the Stream Processor. Multiple entries can be added.
An Input Block allows the configured Input Edge Topics to be filtered by Source and Scope and forwarded to a Processing Block. This filtering is implemented using regular expressions (RegEx). If the header fields "Source" and "Scope" of the incoming messages match the configuration of the Input Block, the message is passed to the subsequent blocks. Multiple Input Blocks can be created.
| Parameter | Description |
|---|---|
Name | Name of the Input Block |
Source (Filter) | RegEx filter for the header field "Source" |
Scope (Filter) | RegEx filter for the header field "Scope" |
After configuring the input to the Stream Processor (Input Edge Topics and Input Block(s)), the necessary Processing Blocks must be configured and connected according to the processing flow.
Configuration in the UI
In the "Settings" panel, the Input Edge Topics can be configured. An Input Edge Topic is added by entering the name of the topic to be processed in the "New Topic" field. Topics can be removed by clicking the cross .
Example: The data input to be processed is obtained from the "PollGroup a" of the OPC UA module. Figure 3 shows the configuration in the OPC UA module described below:
Poll Groups: "PollGroup a" with interval 1000ms, Name: "a", Output Topic: "PollGroup a"
Field Name: a and b

The created "PollGroup a" must now be added as an Input Edge Topic in the Stream Processor. This is done by entering the name under New Topic and clicking the add icon "+" (Figure 4).

Next, an Input Block with the filter must be created. To do this, click the element Input in the selection list of the "Blocks" panel and the block will appear on the canvas of the Stream Processor (Figure 5).
Clicking the pencil icon
in the Input Block on the canvas opens the dialog for configuring the Input Block. In the example, the Input Block is named "OPCUA" and further filters messages by Source ("OPCUA") and Scope ("^a$") (Figure 6).


To process the input, Processing Blocks must now be created according to the requirements.
Processing
The Processing Blocks process incoming messages and can then pass them back to the Edge Broker of the RoboGate Edge via Output Blocks.
The following types of Processing Blocks are available:
The individual Processing Blocks and their configuration are described separately in the StreamProcessor section.
To process messages with different Source and Scope values (i.e., from different data sources) independently and in parallel, the Processing Blocks typically maintain independent states for each combination of Source and Scope (e.g., a timer instance at the dotnet level or a buffer).
The available types of Processing Blocks with their specific configuration parameters are described in the following sections.
Configuration in the UI
To create a Processing Block, select the corresponding element in the "Blocks" panel under the "Processing" area. The block will then appear on the canvas of the Stream Processor. In this example, the Aggregator Block is selected (Figure 7).
Clicking the pencil icon opens the dialog for configuring the block. You can now set the name of the block — in the example "agg1" — and configure the further parameters.


To forward and process the messages of the Input Edge Topic, a connection must be established between the input and the processing (Input Block and Processing Block). To do this, click on the outgoing node "Messages" of the Input Block and drag a connection to an input node of the Processing Block (Figure 9). Via this connection, messages matching the Source and Scope as configured in the Input Block flow into the Aggregator Block.
Processing Blocks can also be connected to each other via input and output nodes.

Output
To process the messages processed in the Stream Processor further in other modules of the RoboGate Edge, they must be passed back to the Edge Broker.
For this purpose, a Default Output Topic and/or additional Output Topics can be defined using an Output Block. The Default Output Topic is optional. Incoming messages that do not match any filter configuration (in the Input Blocks) are routed to this Edge Broker topic, if configured. To pass a message from the Stream Processor back to the Edge Broker, an Output Topic must be configured via an Output Block. This topic can be used for evaluation in a data output module.
Multiple Output Blocks can be created.
| Parameter | Description |
|---|---|
Name | Name of the configured Output Block |
Edge Topic | Name of the Output Topic to map output messages to the Edge Broker topic(s) |
Source | If specified, Source in the message is overwritten |
Scope | If specified, Scope in the message is overwritten |
Configuration in the UI
To create an Output Block, click — analogously to creating an Input Block — the element Output in the selection list of the "Blocks" panel under "Output". The created Output Block then appears on the canvas (Figure 10).
Clicking the pencil icon
opens the dialog for configuring the Output Block (Figure 11). In the example, the Output Block is named "out" and the further parameters are specified.
The previously created Aggregator Block can then be connected to the Output Block. To do this, click on the outgoing node "Result" of the Aggregator Block and drag the resulting connection line to the "Out" node of the Output Block (Figure 12).



Reset Configuration
The button in the horizontal menu bar allows the complete configuration of the module to be reset to factory settings.
After clicking the button, a confirmation dialog with "Yes" and "No" appears, asking whether the operation should actually be carried out.
This will also delete the entire history at the RoboGate Edge level!