How to use the node-opcua.BrowseDirection function in node-opcua

To help you get started, we’ve selected a few node-opcua 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 frangoteam / FUXA / server / runtime / devices / opcua / index.js View on Github external
return new Promise(function (resolve, reject) {
            // "RootFolder"
            if (the_session) {
                const b = [{
                    nodeId: nodeId,
                    referenceTypeId: 'Organizes',
                    includeSubtypes: true,
                    browseDirection: opcua.BrowseDirection.Forward,
                    resultMask: 0x3f

                },
                {
                    nodeId: nodeId,
                    referenceTypeId: 'Aggregates',
                    includeSubtypes: true,
                    browseDirection: opcua.BrowseDirection.Forward,
                    resultMask: 0x3f

                },
                {
                    nodeId: nodeId,
                    referenceTypeId: 'HasSubtype',
                    includeSubtypes: true,
                    browseDirection: opcua.BrowseDirection.Forward,
                    resultMask: 0x3f
                }];

                the_session.browse(nodeId, function (err, browseResult) {
                    if (!err) {
                        let opcNodes = [];
                        browseResult.references.forEach(function (reference) {
                            console.log(reference.browseName.toString());
github frangoteam / FUXA / server / runtime / devices / opcua / index.js View on Github external
return new Promise(function (resolve, reject) {
            // "RootFolder"
            if (the_session) {
                const b = [{
                    nodeId: nodeId,
                    referenceTypeId: 'Organizes',
                    includeSubtypes: true,
                    browseDirection: opcua.BrowseDirection.Forward,
                    resultMask: 0x3f

                },
                {
                    nodeId: nodeId,
                    referenceTypeId: 'Aggregates',
                    includeSubtypes: true,
                    browseDirection: opcua.BrowseDirection.Forward,
                    resultMask: 0x3f

                },
                {
                    nodeId: nodeId,
                    referenceTypeId: 'HasSubtype',
                    includeSubtypes: true,
                    browseDirection: opcua.BrowseDirection.Forward,
github node-opcua / node-opcua / packages / node-opcua-samples / bin / simple_client.js View on Github external
#!/usr/bin/env node
"use strict";

const fs = require("fs");
const treeify = require("treeify");
const _ = require("underscore");
const colors = require("colors");
const Table = require("easy-table");
const async = require("async");
const assert = require("node-opcua-assert").assert;
const path = require("path");

const opcua = require("node-opcua");
const VariableIds = opcua.VariableIds;
const BrowseDirection = opcua.BrowseDirection;
const crypto_utils = opcua.crypto_utils;


//node bin/simple_client.js --endpoint  opc.tcp://localhost:53530/OPCUA/SimulationServer --node "ns=5;s=Sinusoid1"
const yargs = require("yargs/yargs");

const argv = yargs(process.argv)
    .wrap(132)
    //.usage("Usage: $0 -d --endpoint  [--securityMode (NONE|SIGNANDENCRYPT|SIGN)] [--securityPolicy (None|Basic256|Basic128Rsa15)] --node  --crawl")

    .demand("endpoint")
    .string("endpoint")
    .describe("endpoint", "the end point to connect to ")

    .string("securityMode")
    .describe("securityMode", "the security mode")
github node-opcua / node-opcua / packages / node-opcua-samples / bin / simple_client.js View on Github external
#!/usr/bin/env node
"use strict";

const fs = require("fs");
const treeify = require("treeify");
const _ = require("underscore");
const chalk = require("chalk");
const Table = require("easy-table");
const async = require("async");
const assert = require("node-opcua-assert").assert;
const opcua = require("node-opcua");
const VariableIds = opcua.VariableIds;
const BrowseDirection = opcua.BrowseDirection;


//node bin/simple_client.js --endpoint  opc.tcp://localhost:53530/OPCUA/SimulationServer --node "ns=5;s=Sinusoid1"
const yargs = require("yargs/yargs");

const argv = yargs(process.argv)
    .wrap(132)
    //.usage("Usage: $0 -d --endpoint  [--securityMode (None|SignAndEncrypt|Sign)] [--securityPolicy (None|Basic256|Basic128Rsa15)] --node  --crawl")

    .demand("endpoint")
    .string("endpoint")
    .describe("endpoint", "the end point to connect to ")

    .string("securityMode")
    .describe("securityMode", "the security mode")