Skip to main content

templates

Use templates: when many instances look the same: the doors of a platform, the machines of a line. You write the entries one time, as a template. An - expand: entry of instances: uses the template. The gateway replaces each use by the real entries before it loads the configuration. To see the result, run opcua-omni-edge dump-config.

Example​

templates:
Pump:
params: { id: { type: string } }
instances:
- { browseName: "${id}", typeDefinition: ua:BaseObjectType, componentOf: "${parent}" }
instances:
- { browseName: Plant, typeDefinition: ua:BaseObjectType, organizedBy: /ua:Objects }
- expand: { parent: /ua:Objects/own:Plant, over: [{ id: P1 }, { id: P2 }], use: Pump }

The value​

templates: is a map.