attributeKeys.map((attr) => ({ nodeId: node.id, attributeId: opcua.AttributeIds[attr] }))
/** * Start the monitor by subsribe the Tags to check if value change * samplingInterval = 1000 msec. * @param {*} callback */ var _startMonitor = function (callback) { if (the_session && the_subscription) { for (var id in data.tags) { var nodeId = id; var monitoredItem = the_subscription.monitor( { nodeId: nodeId, attributeId: opcua.AttributeIds.Value }, { samplingInterval: 1000, discardOldest: true, queueSize: 1 }, opcua.read_service.TimestampsToReturn.Both, ); monitoredItem.on('changed', _monitorcallback(nodeId)); } callback(true); } else { callback(false); } }
Object.keys(opcua.AttributeIds).filter((x) => x === 'DataType' || x === 'AccessLevel' || x === 'UserAccessLevel')
case opcua.AttributeIds.DataType: let dtype = opcua.DataType[dataValue.value.value.value]; return { attribute: dtype }; case opcua.AttributeIds.UserAccessLevel: case opcua.AttributeIds.AccessLevel: if (!dataValue.value.value) { return null;