GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - HamiedNabizada/NodeSet.js: A graphical modeller for OPC UA information models: NodeSet2 in and out without loss, types in the notation of OPC 10000-3, finite state machines, and a set of rules that checks a model before a server sees it.

BranchesTags
Open more actions menu

Latest commit

 

History

126 Commits
126 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
app
app
 
 
assets/nodesets
assets/nodesets
 
 
docs
docs
 
 
scripts
scripts
 
 
src
src
 
 
tests
tests
 
 
types
types
 
 
.gitignore
.gitignore
 
 
CHANGELOG.md
CHANGELOG.md
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
babel.config.json
babel.config.json
 
 
eslint.config.mjs
eslint.config.mjs
 
 
package-lock.json
package-lock.json
 
 
package.json
package.json
 
 
playwright.config.ts
playwright.config.ts
 
 
playwright.manual.config.ts
playwright.manual.config.ts
 
 
tsconfig.json
tsconfig.json
 
 
tsconfig.lib.json
tsconfig.lib.json
 
 
vitest.config.ts
vitest.config.ts
 
 
webpack.config.js
webpack.config.js
 
 
webpack.lib.config.js
webpack.lib.config.js
 
 

Repository files navigation

NodeSet.js

A graphical modeler for OPC UA information models. Types and instances are drawn in the notation of OPC 10000-3 Annex C and stored as NodeSet2 files, with nothing in between: the file it opens and the file it writes are the NodeSets every other OPC UA tool reads. It runs in the browser on its own, and it embeds: the AutomationML Editor plugin AMLOpcUa hosts it and connects the models to AutomationML (OPC 10000-83 Annex A, AML-UA-XSLT rules) and to VDI 3682 process descriptions.

NodeSet.js on its own in the browser: the MPS 500 NodeSet opened, StationType and DriveType drawn in the notation of OPC 10000-3, the state machine StationStateMachineType with its states, transitions and state chart, the checks and Save NodeSet

What it does: types (ObjectTypes, VariableTypes, DataTypes with fields, encodings, enumeration values, OptionSets and unions, ReferenceTypes), instance declarations with ModellingRules, values (built-in types and simple structures), method arguments, references, instances by ModellingRule, models built on DI or other loaded models with their RequiredModels kept, checks against OPC 10000-3, undo, editing from the canvas's context pad, and diagram positions kept in the NodeSet. Inside the AutomationML Editor it runs in the Modeler tab of AMLOpcUa, which opens a namespace of the document and imports the result back (AMLOpcUa docs/modeler.md).

Status: in development. How to model with it: docs/manual.md.

npm install
npm run dev        # http://localhost:3002
npm test
npm run typecheck
npm run lint       # the order of React hooks
npm run test:e2e   # the web build in Chromium (npx playwright install chromium once)

npm run test:e2e also opens twelve released companion specifications when UA_NODESET names a clone of OPCFoundation/UA-Nodeset with the folders in tests/e2e/corpus-folders.txt; CI checks them out at the commit named in .github/workflows/ci.yml.

On a page of its own the modeler keeps unsaved work in the browser (IndexedDB) and offers it at the next start; embedded in a host it does not.

The interface is English or German, as the browser's language says; texts are keyed by their English in src/ui/de.ts.

Third-party content

assets/nodesets/ holds the OPC UA base NodeSet (1.05.07) and the OPC UA for Devices NodeSet (1.05.0) from UA-Nodeset, OPC Foundation MIT License 1.00.

License

MIT

As a library

npm run build       # dist/web (the app) and dist/lib (the library)
import { readNodeSet, writeNodeSet, Workspace, NodeSetModeler, App } from 'nodeset-js';

const ws = new Workspace();
await ws.open(xml);                         // loads the required UA and DI models
const pump = ws.editor!.addType('ObjectType', 'PumpType');
ws.editor!.addDeclaration(pump, 'Variable', 'Speed');
const nodeSet = ws.save();                  // NodeSet2 XML

App is the complete modeler as a React component; NodeSetModeler is the canvas alone. React 18 is a peer dependency.

For a script, in a page or in Node, there is a second entry without the canvas and without React:

const { Workspace, check } = require('nodeset-js/core');

const ws = new Workspace();
await ws.create('http://example.org/Pump/');            // brings the base model with it
const type = ws.editor.addStateMachineType('PumpStateMachineType');
const idle = ws.editor.addState(type, 'Idle', 1);
const running = ws.editor.addState(type, 'Running', 2);
ws.editor.addTransition(type, 'IdleToRunning', 1, idle, running);
console.log(check(ws.space, ws.editable));              // the rules on the model
require('fs').writeFileSync('Pump.NodeSet2.xml', ws.save());

The base NodeSet and DI are inside that build, so a script needs nothing else. npm run verify:core checks that it still runs outside a browser.

About

A graphical modeller for OPC UA information models: NodeSet2 in and out without loss, types in the notation of OPC 10000-3, finite state machines, and a set of rules that checks a model before a server sees it.

Topics

diagram-jsinformation-modelmodellernodesetopc-ua

Resources

Readme
MIT license
Activity

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.