Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const name = dataType + "ArrayAnalogDataItem";
const nodeId = "s=" + name;
// UAAnalogItem
const { engineeringUnitsRange, instrumentRange } = makeRange(dataType);
// add a UAAnalogItem
namespace.addAnalogDataItem({
componentOf: localParentFolder,
nodeId: nodeId,
browseName: name,
definition: "(tempA -25) + tempB",
valuePrecision: 0.5,
engineeringUnitsRange,
instrumentRange,
engineeringUnits: standardUnits.degree_celsius,
dataType: dataType,
value: new Variant({
arrayType: VariantArrayType.Array,
dataType: DataType[dataType],
value: [initialValue, initialValue, initialValue, initialValue, initialValue ]
})
});
}