Skip to content

About

Write OPC UA information models in YAML, get standard NodeSet2.xml. Open specification, JSON Schema and examples for Sterfive's OPC UA Modeler.

Topics

Resources

Contributing

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

Repository files navigation

OPC UA Modeler

Write OPC UA information models in YAML. Get standard NodeSet2.xml.

OPC UA Modeler, by Sterfive — the maintainers of node-opcua — is a modelling toolchain for OPC UA information models and companion specifications. You describe your types and instances in a small, readable YAML language; the compiler checks the model against the companion specifications it builds on and generates the NodeSet2.xml that any OPC UA server loads.

namespaceUri: http://acme.example/UA/Pump/
version: 1.0.0
namespaces:
  - di
objectTypes:
  - browseName: PumpType
    subtypeOf: di:DeviceType
    components:
      - browseName: di:ParameterSet
        components:
          - browseName: FlowRate
            dataType: ua:Double
          - browseName: SetPoint
            dataType: ua:Double
            accessLevel: CurrentRead | CurrentWrite

That is a complete model: a pump derived from the Device Integration (DI) companion specification. The generated NodeSet2.xml carries the namespace table, the RequiredModel entries for OPC UA and DI, stable NodeIds, and every mandatory member the base types imply.

Where to use it

In your browser opcua-modeler.sterfive.io — editor with completion, live diagnostics, diagrams, and a button that starts a real OPC UA server on your model
In Visual Studio Code Marketplace extension
On the command line and in CI CLI quickstart
From an AI agent MCP server — npx -y node-opcua-modeler-mcp-server

Documentation: opcua-modeler.doc.sterfive.com. New to the file format? Start with How to create a NodeSet2.xml file.

What is in this repository

This repository holds the open parts of OPC UA Modeler. The compiler, the language server and the web application are commercial products and are not here.

Folder Content Licence
specification/ The OPC UA YAML DSL specification: the language, its semantics and its mapping to NodeSet2 XML. Written so that independent implementations are possible. CC BY 4.0
schema/ The JSON Schema of the language, for validation and editor completion MIT
examples/ Example models, the same ones the documentation uses and compiles on every build MIT

Completion in any editor

Any editor that speaks the YAML language server gets completion and validation from the schema alone. Put this on the first line of your model:

# yaml-language-server: $schema=https://opcua-modeler.doc.sterfive.com/nodeset2.schema.json

The schema checks the shape of the document. Resolving types across companion specifications, modelling rules and NodeId allocation is what the compiler adds.

Why model as code

An information model has versions, reviewers and a release date, like the software that serves it. As a text file it gets what that software already has: readable diffs, review on a merge request, merges between colleagues, and a pipeline that refuses a change breaking a modelling rule. Comparisons with the graphical tools: UaModeler, SiOME, UA-ModelCompiler and the OPC Foundation's UA NodeSet Editor.

Already have a NodeSet2.xml? opcua-modeler reverse turns it into YAML.

Questions, bugs, ideas

Open an issue. Questions about the language and the specification are as welcome as bug reports. For commercial support and licences, contact Sterfive.

How this repository is maintained

It is a mirror, generated from Sterfive's internal repository by a script. A pull request cannot be merged here as it is: open an issue, or a pull request as a way to show a proposed change, and it will be applied at the source and flow back on the next sync.

Licence

Specification: CC BY 4.0. Schema and examples: MIT. See LICENSE. "OPC UA" is a trademark of the OPC Foundation.

About

Write OPC UA information models in YAML, get standard NodeSet2.xml. Open specification, JSON Schema and examples for Sterfive's OPC UA Modeler.

Topics

Resources

Contributing

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors