Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function _getAllEventTypes(baseNodeId, tree, callback) {
//xx console.log(" exploring elements,",element.nodeId.toString());
const browseDesc1 = {
nodeId: baseNodeId,
referenceTypeId: opcua.resolveNodeId("HasSubtype"),
browseDirection: BrowseDirection.Forward,
includeSubtypes: true,
nodeClassMask: opcua.NodeClassMask.ObjectType, // Objects
resultMask: 63
};
session.browse(browseDesc1, function (err, browseResult) {
if (err) {
console.log(" ERROR = ", err);
} else {
// to do continuation points
browseResult.references.forEach(function (reference) {
const subtree = { nodeId: reference.nodeId.toString() };
tree[reference.browseName.toString()] = subtree;
q.push({ nodeId: reference.nodeId, tree: subtree });
});
}
callback();
function _getAllEventTypes(baseNodeId,tree,callback) {
//xx console.log(" exploring elements,",element.nodeId.toString());
const browseDesc1 = {
nodeId: baseNodeId,
referenceTypeId: opcua.resolveNodeId("HasSubtype"),
browseDirection: BrowseDirection.Forward,
includeSubtypes: true,
nodeClassMask: opcua.NodeClassMask.ObjectType, // Objects
resultMask: 63
};
session.browse(browseDesc1, function(err,browseResult){
if (err) {
console.log(" ERROR = ", err);
} else {
// to do continuation points
browseResult.references.forEach(function (reference) {
const subtree = {nodeId: reference.nodeId.toString()};
tree[reference.browseName.toString()] = subtree;
q.push({nodeId: reference.nodeId, tree: subtree});
});
}
callback();