How to use the node-opcua-nodesets.nodesets.standard_nodeset_file function in node-opcua-nodesets

To help you get started, we’ve selected a few node-opcua-nodesets examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github node-opcua / node-opcua / packages / node-opcua-server / source / server_engine.ts View on Github external
public initialize(
    options: any,
    callback: any
  ) {

    const engine = this;
    assert(!engine.addressSpace); // check that 'initialize' has not been already called

    engine.status = "initializing";

    options = options || {};
    assert(_.isFunction(callback));

    options.nodeset_filename = options.nodeset_filename || nodesets.standard_nodeset_file;

    const startTime = new Date();

    debugLog("Loading ", options.nodeset_filename, "...");

    engine.addressSpace = AddressSpace.create();

    // register namespace 1 (our namespace);
    const serverNamespace = engine.addressSpace.registerNamespace(engine.serverNamespaceUrn);
    assert(serverNamespace.index === 1);

    generateAddressSpace(engine.addressSpace, options.nodeset_filename, () => {

      if (!engine.addressSpace) {
        throw new Error("Internal error");
      }

node-opcua-nodesets

pure nodejs OPCUA SDK - module nodesets

MIT
Latest version published 3 months ago

Package Health Score

86 / 100
Full package analysis