Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
dataType: "Range",
minimumSamplingInterval: 0,
accessLevel: "CurrentRead | CurrentWrite",
value: new Variant({
dataType: DataType.ExtensionObject, value: new Range(options.instrumentRange)
}),
modellingRule: options.modellingRule ? "Mandatory" : undefined
});
instrumentRange.on("value_changed",handler);
}
if (options.hasOwnProperty("engineeringUnits")) {
const engineeringUnits = new EUInformation(options.engineeringUnits);
assert(engineeringUnits instanceof EUInformation, "expecting engineering units");
// EngineeringUnits specifies the units for the DataItem‟s value (e.g., DEGC, hertz, seconds). The
// EUInformation type is specified in 5.6.3.
const eu = namespace.addVariable({
propertyOf: variable,
typeDefinition: "PropertyType",
browseName: {name:"EngineeringUnits",namespaceIndex:0},
dataType: "EUInformation",
minimumSamplingInterval: 0,
accessLevel: "CurrentRead",
value: new Variant({
dataType: DataType.ExtensionObject, value: engineeringUnits
}),
modellingRule: options.modellingRule ? "Mandatory" : undefined
init(this: any) {
this.euInformation = new EUInformation({});
},
parser: {
finish(this: any) {
this.euInformation = new EUInformation(this.euInformation);
}
}
finish: function () {
this.euInformation = new EUInformation(this.euInformation);
}
}