How to use the node-opcua-service-translate-browse-path.RelativePathElement function in node-opcua-service-translate-browse-path

To help you get started, we’ve selected a few node-opcua-service-translate-browse-path 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-address-space / src / address_space_browse.js View on Github external
function explore_element(curNodeObject, elements, index) {

            const element = elements[index];
            assert(element instanceof translate_service.RelativePathElement);

            const is_last = ( (index + 1) === elements.length);

            const nodeIds = curNodeObject.browseNodeByTargetName(element,is_last);

            const targets = nodeIds.map(function (nodeId) {
                return {
                    targetId: nodeId,
                    remainingPathIndex: elements.length - index
                };
            });

            if (!is_last) {
                // explorer
                for(let target of targets) {
                    const node = self.findNode(target.targetId);