Hierarchical OPC Namespace
The Apis Hive OPC server can expose a flat or hierarchical OPC namespace to third party OPC DA clients connecting to Apis Hive.
By default, a flat namespace is exposed. A hierarchical namespace can be configured using the registry settings for your Apis Hive configuration. The following is an example of such a configuration, with the registry keys inside the brackets and their values below:
[HKEY_LOCAL_MACHINE\SOFTWARE\Prediktor\Apis\ApisHive\Namespace]
"EnableHierarchicalNS"=dword:00000001
[HKEY_LOCAL_MACHINE\SOFTWARE\Prediktor\Apis\ApisHive\Namespace\OPC]
"Filter1"="5003==OPC.*"
"ShowItems"=dword:00000000
[HKEY_LOCAL_MACHINE\SOFTWARE\Prediktor\Apis\ApisHive\Namespace\OPC\Random]
"Filter1"="5003==OPC.Random.*"
[HKEY_LOCAL_MACHINE\SOFTWARE\Prediktor\Apis\ApisHive\Namespace\Worker]
"Filter1"="5003==Worker.*"
"ShowItems"=dword:00000000
[HKEY_LOCAL_MACHINE\SOFTWARE\Prediktor\Apis\ApisHive\Namespace\Worker\Simulation Signals]
"Filter1"="5003==Worker.Signal*"
[HKEY_LOCAL_MACHINE\SOFTWARE\Prediktor\Apis\ApisHive\Namespace\Worker\Various Signals]
"Filter1"="5003==Worker.Variable*"
[HKEY_LOCAL_MACHINE\SOFTWARE\Prediktor\Apis\ApisHive\Namespace\Worker\Timestamp]
"Filter1"="5003==Worker.Time*"
[HKEY_LOCAL_MACHINE\SOFTWARE\Prediktor\Apis\ApisHive\Namespace\Alltimestamps]
"Filter1"="1==7"
Concept
To enable/disable a hierarchical namespace, set the registry value EnableHierarchicalNS to 0 or 1.
Each registry key, represents a branch or tree node. Underneath each key, you can specify zero or more filters that apply to the items at this level in the namespace. All filters are inherited from the parent keys/branches as well. A filter value has an arbitrary name, but the value is <AttributeID><Operator><FilterValue>:
- AttributeID - The correct attribute ID specified in "Predefined Apis Hive attributes" or OPC DA Item attributes,
- Operator - One of: ==, <>, <, <=, >, >= (equal, not equal, less, less or equal, bigger, bigger or equal).
- FilterValue - The filter value the specified attribute must match. For proper types, wildcards are accepted. (See "Using wildcards")
Additionally, we can specify a value named "ShowItems" underneath any key in the namespace hierarchy, that specifies whether or not the items at this level should be visible or not. If this value is missing, the items are always shown by default.