本文整理汇总了TypeScript中node-opcua-address-space.AddressSpace.installHistoricalDataNode方法的典型用法代码示例。如果您正苦于以下问题:TypeScript AddressSpace.installHistoricalDataNode方法的具体用法?TypeScript AddressSpace.installHistoricalDataNode怎么用?TypeScript AddressSpace.installHistoricalDataNode使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类node-opcua-address-space.AddressSpace
的用法示例。
在下文中一共展示了AddressSpace.installHistoricalDataNode方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: createHistorian1
export function createHistorian1(addressSpace: AddressSpace): UAVariable {
const node = addressSpace.getOwnNamespace().addVariable({
browseName: "History1",
dataType: "Float"
});
const options = {
historian: undefined,
percentDataBad: 100,
percentDataGood: 100, // Therefore if all values are Good then the
// quality will be Good, or if all values are Bad then the quality will be Bad, but if there is
// some Good and some Bad then the quality will be Uncertain
stepped: false, // Therefore SlopedInterpolation is used between data points.
treatUncertainAsBad: false, // Therefore Uncertain values are included in Aggregate calls.
useSlopedExtrapolation: false, // Therefore SteppedExtrapolation is used at end boundary conditions.
};
addressSpace.installHistoricalDataNode(node, options);
installAggregateConfigurationOptions(node, options);
// 12:00:00 - BadNoData First archive entry, Point created
addHistory(node, "12:00:00", null, StatusCodes.BadNoData);
// 12:00:10 10 Raw, Good
addHistory(node, "12:00:10", 10, StatusCodes.Good);
// 12:00:20 20 Raw, Good
addHistory(node, "12:00:20", 20, StatusCodes.Good);
// 12:00:30 30 Raw, Good
addHistory(node, "12:00:30", 30, StatusCodes.Good);
// 12:00:40 40 Raw, Bad ANNOTATION: Operator 1
// Jan-02-2012 8:00:00 Scan failed, Bad data entered
// ANNOTATION:
// Jan-04-2012 7:10:00 Value cannot be verified
addHistory(node, "12:00:40", 40, StatusCodes.Bad);
// 12:00:50 50 Raw, Good ANNOTATION: Engineer1
// Jan-04-2012 7:00:00 Scanner fixed
addHistory(node, "12:00:50", 50, StatusCodes.Good);
// 12:01:00 60 Raw, Good
addHistory(node, "12:01:00", 60, StatusCodes.Good);
// 12:01:10 70 Raw, Uncertain ANNOTATION: Technician_1
// Jan-02-2012 8:00:00 Value flagged as questionable
addHistory(node, "12:01:10", 70, StatusCodes.Uncertain);
// 12:01:20 80 Raw, Good
addHistory(node, "12:01:20", 80, StatusCodes.Good);
// 12:01:30 90 Raw, Good
addHistory(node, "12:01:30", 90, StatusCodes.Good);
return node;
}