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

To help you get started, we’ve selected a few node-opcua-client 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 / opcua-commander / lib / model / model.ts View on Github external
public async expand_opcua_node(node: any): Promise {

        if (!this.session) {
            throw new Error("No Session yet");
        }
        if (this.session.isReconnecting) {
            throw new Error("Session is not available (reconnecting)");
        }

        const children: NodeChild[] = [];

        const nodesToBrowse = [{
            nodeId: node.nodeId,
            referenceTypeId: "Organizes",
            includeSubtypes: true,
            browseDirection: BrowseDirection.Forward,
            resultMask: 0x3f
        },
        {
            nodeId: node.nodeId,
            referenceTypeId: "Aggregates",
            includeSubtypes: true,
            browseDirection: BrowseDirection.Forward,
            resultMask: 0x3f

        },
        {
            nodeId: node.nodeId,
            referenceTypeId: "HasSubtype",
            includeSubtypes: true,
            browseDirection: BrowseDirection.Forward,
            resultMask: 0x3f
github node-opcua / opcua-commander / lib / model / model.ts View on Github external
}

        const children: NodeChild[] = [];

        const nodesToBrowse = [{
            nodeId: node.nodeId,
            referenceTypeId: "Organizes",
            includeSubtypes: true,
            browseDirection: BrowseDirection.Forward,
            resultMask: 0x3f
        },
        {
            nodeId: node.nodeId,
            referenceTypeId: "Aggregates",
            includeSubtypes: true,
            browseDirection: BrowseDirection.Forward,
            resultMask: 0x3f

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

        try {
            const results = await this.session.browse(nodesToBrowse);

            let result = results[0];