Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
assert(dataValue.statusCode instanceof StatusCode);
if (!dataValue.isValid()) {
console.log("Invalid value for node ", obj.nodeId.toString(), obj.browseName.toString());
}
} catch (err) {
console.log(" Internal error reading NodeId ", obj.nodeId.toString());
console.log(" AttributeId ", attributeId.toString());
console.log(" ", err.message);
console.log(" ", err.stack);
return new DataValue({ statusCode: StatusCodes.BadInternalError });
}
// Xx console.log(dataValue.toString());
dataValue = apply_timestamps(dataValue, timestampsToReturn, attributeId);
return dataValue;
}
}
if(!dataValue.isValid()) {
console.log("Invalid value for node ",obj.nodeId.toString(),obj.browseName.toString());
}
}
catch (err) {
console.log(" Internal error reading NodeId ", obj.nodeId.toString());
console.log(" AttributeId ", attributeId.toString());
console.log(" ", err.message);
console.log(" ", err.stack);
return new DataValue({statusCode: StatusCodes.BadInternalError});
}
//Xx console.log(dataValue.toString());
dataValue = apply_timestamps(dataValue, timestampsToReturn, attributeId);
return dataValue;
}
};
private _makeDataChangeNotification(dataValue: DataValue): MonitoredItemNotification {
const attributeId = this.itemToMonitor.attributeId;
dataValue = apply_timestamps(dataValue, this.timestampsToReturn, attributeId);
return new MonitoredItemNotification({
clientHandle: this.clientHandle,
value: dataValue
});
}
MonitoredItem.prototype._makeDataChangeNotification = function (dataValue) {
const self = this;
const attributeId = self.itemToMonitor.attributeId;
dataValue = apply_timestamps(dataValue, self.timestampsToReturn, attributeId);
return new subscription_service.MonitoredItemNotification({clientHandle: self.clientHandle, value: dataValue});
};