Skip to main content

the `namespaces` and `imports` sections

The information model the server exposes is built from OPC UA nodesets (NodeSet2.xml files): companion specifications such as Device Integration (DI), and your own models. They are declared in two sections:

  • namespaces:: well-known companion specifications, by alias;
  • imports:: any other NodeSet2.xml, typically your own model.
namespaces:
- di
- machinery

imports:
- alias: t
uri: http://sterfive.com/UA/MyAnalyserDevice/
filename: ./model/MyAnalyserDevice.Nodeset2.xml

The types they define (ObjectTypes, VariableTypes, DataTypes) can then be instantiated in the instances section, and their nodes are referenced as alias:Name, e.g. di:DeviceSet or t:AnalyserDeviceType.

namespaces: well-known companion specifications​

Each entry is an alias from the list of nodesets aliases. The server ships these nodesets, and adds and orders their dependencies itself: listing adi loads di first.

The standard OPC UA nodeset (alias ua) is always loaded; do not list it.

imports: your own nodesets​

Key
aliasthe short name the model's nodes are referenced by (required)
urithe namespace URI the nodeset declares
filenamethe NodeSet2.xml, relative to the directory of config.yaml

Give uri, filename, or both. With both, the file actually loaded is checked against the uri.

  • A modelling tool such as the OPC UA Modeler creates, documents and versions such nodesets.
  • Nodesets are loaded when the address space is built: adding or removing one takes effect when the gateway reloads the configuration or restarts.
  • The server's own instances live in namespace 1, alias own (own:DistanceSensor).

Coming from a version 3 configuration​

Version 3 used a single nodesets: key, with nodeset2: for the file:

# version 3 - refused by the current gateway
nodesets:
- di
- alias: t
nodeset2: ./model/MyAnalyserDevice.Nodeset2.xml

The current gateway refuses it with a message saying so. Convert the file in place with the command below; --dry-run prints the result instead of writing it.

opcua-omni-edge migrate-config config.yaml