All Projects → OPCUAUniCT → node-opcua-coreaas

OPCUAUniCT / node-opcua-coreaas

Licence: Apache-2.0 license
An extension for node-opcua implementing CoreAAS Information Model

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to node-opcua-coreaas

opcua-esp32
Embedded OPC UA Server on ESP32 based on open62541 stack
Stars: ✭ 82 (+331.58%)
Mutual labels:  opc-ua, opcua
Open62541
Open source implementation of OPC UA (OPC Unified Architecture) aka IEC 62541 licensed under Mozilla Public License v2.0
Stars: ✭ 1,643 (+8547.37%)
Mutual labels:  opc-ua, opcua
awesome-opcua
No description or website provided.
Stars: ✭ 51 (+168.42%)
Mutual labels:  opc-ua, opcua
quasar
Quick opcUA Server generAtion fRamework
Stars: ✭ 31 (+63.16%)
Mutual labels:  opc-ua, opcua
TF6100 Samples
Contains product samples for TF6100 TC3 OPC UA
Stars: ✭ 15 (-21.05%)
Mutual labels:  opc-ua, opcua
OpcUaStack
Open Source OPC UA Application Server and OPC UA Client/Server C++ Libraries
Stars: ✭ 89 (+368.42%)
Mutual labels:  opc-ua, opcua
ASMD
OPC UA Address Space Model Designer
Stars: ✭ 47 (+147.37%)
Mutual labels:  opc-ua, opcua
Python Opcua
LGPL Pure Python OPC-UA Client and Server
Stars: ✭ 863 (+4442.11%)
Mutual labels:  opc-ua
Thingsboard Gateway
Open-source IoT Gateway - integrates devices connected to legacy and third-party systems with ThingsBoard IoT Platform using Modbus, CAN bus, BACnet, BLE, OPC-UA, MQTT, ODBC and REST protocols
Stars: ✭ 796 (+4089.47%)
Mutual labels:  opc-ua
Milo
Eclipse Milo™ - an open source implementation of OPC UA (IEC 62541).
Stars: ✭ 587 (+2989.47%)
Mutual labels:  opc-ua
Fuxa
Web-based Process Visualization (SCADA/HMI/Dashboard) software
Stars: ✭ 262 (+1278.95%)
Mutual labels:  opc-ua
Node Opcua
an implementation of a OPC UA stack fully written in javascript and nodejs - http://node-opcua.github.io/
Stars: ✭ 985 (+5084.21%)
Mutual labels:  opc-ua
Iot Technical Guide
🐝 IoT Technical Guide --- 从零搭建高性能物联网平台及物联网解决方案和Thingsboard源码分析 ✨ ✨ ✨ (IoT Platform, SaaS, MQTT, CoAP, HTTP, Modbus, OPC, WebSocket, 物模型,Protobuf, PostgreSQL, MongoDB, Spring Security, OAuth2, RuleEngine, Kafka, Docker)
Stars: ✭ 2,334 (+12184.21%)
Mutual labels:  opc-ua
Iot Dc3
IOT DC3 is an open source, distributed Internet of Things (IOT) platform based on Spring Cloud. It is used for rapid development of IOT projects and management of IOT devices. It is a set of solutions for IOT system.
Stars: ✭ 195 (+926.32%)
Mutual labels:  opc-ua
Opcua
A client and server implementation of the OPC UA specification written in Rust
Stars: ✭ 202 (+963.16%)
Mutual labels:  opc-ua
Oshmi
SCADA HMI for substations and automation applications.
Stars: ✭ 180 (+847.37%)
Mutual labels:  opc-ua
Opcua Commander
a opcua client with blessed (ncurses)
Stars: ✭ 99 (+421.05%)
Mutual labels:  opc-ua
Opcua
Native Go OPC-UA library
Stars: ✭ 382 (+1910.53%)
Mutual labels:  opc-ua
Mainflux
Industrial IoT Messaging and Device Management Platform
Stars: ✭ 1,341 (+6957.89%)
Mutual labels:  opc-ua
Iot Edge Opc Publisher
Microsoft OPC Publisher
Stars: ✭ 143 (+652.63%)
Mutual labels:  opc-ua

node-opcua-coreaas

GitHub package.json version npm

An extension for node-opcua implementing CoreAAS Information Model and providing new functions to easily implement your Asset Administration Shell using OPC UA and Node.js.

This new version has been completely rewritten in typescript to easily develop OPC UA Server supporting CoreAAS and take advantage of the type annotations and other amazing features that typescript introduce. It is worth noting that this new version is not compatible with the version 0.2.2. The API has been completely re-designed and now creating an OPC UA Server supporting CoreAAS Information Model is more linear and no strange workaround or fix is required.

Since Typescript is transpilled in Javascript, you are not forced to write your server in Typescript. Feel free to use node-opcua-coreaas in your Javascript code.

Overview

CoreAAS Information Model is an OPC UA implementation of the Asset Administration Shell (AAS) metamodel here provided by Platform Industrie 4.0.

node-opcua-coreaas is an extension for the Node.js stack node-opcua including new functions in order to easily populate your OPC UA Server with Objects related to AAS, Assets, Submodel, etc. without taking care about putting the Nodes and references in the right place.

Getting started

Installing node-opcua-coreaas

In order to start developing your own AAS using node-opcua-coreaas, just create a new folder and initialize an npm project:

$ mkdir my-project
$ cd my-project
$ npm init

After that, you can install node-opcua-coreaas as dependency using the following command:

$ npm install node-opcua-coreaas --save

You don't need to install node-opcua as dependency for your project since node-opcua-coreaas already depends on it and re-export all its API. Be careful if you decide to use node-opcua as dependancy, because the version you install may be different from the one node-opcua-core aas depends on.

Creating an OPC UA Server suporting CoreAAS is very simple. The following example shows how to create a sample Server exposing an Asset Administration Shell with a Submodel and the physical Asset the AAS is representing:

import path from "path";
import { coreaasXmlFile, nodesets, localizedText, CoreServer, IdentifierType, Kind, KeyType, KeyElements } from ".";

let xmlFiles = [nodesets.standard, coreaasXmlFile]

let server = new CoreServer({
    nodeset_filename: xmlFiles,
    port: 4848
})

function post_initialize() {

    const Identifier = server.coreaas.Identifier;
    const Key = server.coreaas.Key;

    let admin = server.coreaas.addAdministrativeInformation({
        version: "555",
        revision: "1825"
    });

    const aas_1 = server.coreaas.addAssetAdministrationShell({
        browseName: "SampleAAS",
        description: [  new LocalizedText({locale: "en", text: "Festo Controller"}),
                        new LocalizedText({locale: "de", text: "Festo Controller"}) ],
        identification: new Identifier({
            id: "www.admin-shell.io/aas-sample/1.0",
            idType: IdentifierType.URI
        }),
        assetRef: [new Key({
            idType: KeyType.URI,
            local: true,
            type: KeyElements.Asset,
            value: "http://pk.festo.com/3S7PLFDRS35"
        })],
        derivedFromRef: [ new Key({
            idType: KeyType.IRDI,
            local: false,
            type: KeyElements.AssetAdministrationShell,
            value: "AAA#1234-454#123456789"
        }) ],
        administration: admin
    }).addSubmodelRef([new Key({
        idType: KeyType.URI,
        local: true,
        type: KeyElements.Submodel,
        value: "http://www.zvei.de/demo/submodel/12345679"
    })]);;

    let asset = server.coreaas.addAsset({
        browseName: "3S7PLFDRS35",
        idShort: "3S7PLFDRS35",
        identification: new Identifier({
            id: "http://pk.festo.com/3S7PLFDRS35",
            idType: IdentifierType.URI
        }),
        kind: Kind.Instance,
        description: "Festo Controller Asset",
        //assetOf: aas_1,
        assetIdentificationModelRef: [ new Key({
            idType: KeyType.URI,
            local: false,
            type: KeyElements.Submodel,
            value: "//submodels/identification_3S7PLFDRS35"
        }) ]
    });

    aas_1.hasAsset(asset)
    .addSubmodelRef([new Key({
        idType: KeyType.URI,
        local: true,
        type: KeyElements.Submodel,
        value: "http://www.zvei.de/demo/submodel/12345679"
    })]);

    /**
     * Start The OPC UA Server
     */
    server.start(function () {
        console.log("Server is now listening ... ( press CTRL+C to stop)");
        console.log("port ", server.endpoints[0].port);
        var endpointUrl = server.endpoints[0].endpointDescriptions()[0].endpointUrl;
        console.log(" the primary server endpoint url is ", endpointUrl );
    });
}

server.initialize(post_initialize);

Of course this is a very simple example. More entities, like SubmodelElements and ConceptDescriptions, can be added in the AddressSpace.

Demos

You can found 2 demo files in the project. Just use it as a fully example about how to use node-opua-coreaas. Of course be sure to change the require statement putting the node-opcua-coreaas module.

  • "demo.js" is a single-file sample showing an AAS based on the example shown in this document.
  • "demo2.js" is the same as demo.js but with more elements and shows how to do the same things using different convenience methods.

Documentation

The main entities of node-opcua-coreaas are CoreServer and CoreAASExtension:

  • CoreServer is the main class you use to create an OPC UA Server supporting CoreAAS. It is a subclass of OPCUAServer of node-opcua.
  • CoreAASExtension is the extension part of the CoreServer exposing all the methods necessary to create CoreAAS ObjectTypes instances inside the AddressSpace. Users should not use this class directly, but the property coreaas of CoreServer will provide a CoreAASExtension instance bounded to the AddressSpace that users should use to create CoreAAS entities.

More details about the API can be found in the documentation.

References

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].