How to use the node-opcua-service-browse.ReferenceDescription function in node-opcua-service-browse

To help you get started, we’ve selected a few node-opcua-service-browse 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 / base_node.js View on Github external
} else {
        assert(reference.nodeId, obj.nodeId);
        data = {
            referenceTypeId: (resultMask & ResultMask.ReferenceType) ? referenceTypeId : null,
            isForward: (resultMask &ResultMask.IsForward) ? isForward : false,
            nodeId: obj.nodeId,
            browseName: (resultMask & ResultMask.BrowseName) ? coerceQualifiedName(obj.browseName) : null,
            displayName: (resultMask & ResultMask.DisplayName) ? coerceLocalizedText(obj.displayName[0]) : null,
            nodeClass: (resultMask & ResultMask.NodeClass) ? obj.nodeClass : NodeClass.Unspecified,
            typeDefinition: (resultMask & ResultMask.TypeDefinition) ? obj.typeDefinition : null
        };
    }
    if (data.typeDefinition === null) {
        data.typeDefinition = NodeId.nullNodeId;
    }
    const referenceDescription = new ReferenceDescription(data);
    return referenceDescription;
}