Instantiation of Schema
Instantiation of Processing Networks
Following initial steps are common in processing network:
- Registration of a network schema
- Definition of an instantiation rule
It describes in which situations the network is instantiated and where is it attached to. - The group, where the network is placed, needs a PortMatchingRule. This allows the dynamic and autonomous wiring.
Once the network is instantiated and attached to control level (or subgroup of nodes), it processes data automatically.
If the major situation changes (e. g. the device X is plugged out), the network is removed automatically.
Port Matching Rule
Ports are matched and coupled dynamically through PortMatchingRules. Such rules govern the matching and coupling process within a certain group of nodes, e. g. a group of device data nodes.
The matching succeeds only if the following conditions are all true:
- One port must be an output port, the other an input port.
- The data type must be the same (Int32 to Int16 will not match)
- The communication protocol must be the same (Streaming ports will not match event based ports)
- The PortMatchId of the ports must be the same.
This id helps designer to limit the matching possibilities through a semantic setting, e.g. the PortMatchId "RunStateType" specifies the information exchanged.
The Port Matching Rule only matches ports and data nodes within the group who owns the rule (D3) or one of the owned sub groups (D1, D2). Data nodes outside are ignored (D4, D5).
Hint: When working with device information files (UHAL Plugins), the PortMatchId must be set as an additional property:
{
"Id": "0f0bc479-cd0c-45ef-9001-d36ac165c4e0",
"Name": "OperationMode",
"DataType": "System.Int32",
"Address": "Nc1.Automatic.Int32:0",
"Access": {
"Read": true,
"Receive": true
},
"Properties": [
{
"Name": "PortMatchId",
"Value": "OperationModeType"
}
]
}
The port matching rule can be placed in the same schema as the processing network.
Example of the port matching rule:
{
//RULE TO MATCH THE PORTS
"Rules": [
{
"Id": "13E8EBE5-71D9-4D54-9EA2-FFB29641FFBD",
"Name": "MyRule",
"Type": "PortMatchingRule"
}
],
//CORRELATION NETWORK
"ProcessingNetworks": []
}