com.prosysopc.ua
Class AggregateCalculator
java.lang.Object
com.prosysopc.ua.AggregateCalculator
public class AggregateCalculator
- extends Object
A class for calculating the Aggregates defined in OPC Unified Architecture Specification Part 13.
For now, only some of the Aggregates are implemented. They can be found by looking at the names
of the methods that begin with the prefix "calculate".
This class can be called e.g. from MyHistorian.onReadProcessed().
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AggregateCalculator
public AggregateCalculator()
percentValuesAreValid
public static boolean percentValuesAreValid(org.opcfoundation.ua.core.AggregateConfiguration aggregateConfiguration)
calculateAggregates
public AggregateCalculator.AggregateCalculatorContinuationPoint calculateAggregates(org.opcfoundation.ua.builtintypes.DateTime startTime,
org.opcfoundation.ua.builtintypes.DateTime endTime,
double processingIntervalInMillis,
org.opcfoundation.ua.builtintypes.NodeId aggregateType,
org.opcfoundation.ua.core.AggregateConfiguration aggregateConfiguration,
boolean useSteppedInterpolation,
AggregateCalculator.HistoryDataProvider history,
AggregateCalculator.AggregateCalculatorContinuationPoint continuationPoint,
org.opcfoundation.ua.core.HistoryData aggregateData)
throws StatusException
- Function for calculating the aggregate specified by the aggregateType NodeId from the list of
DataValues provided in values.
- Parameters:
startTime - the time stamp at the beginning of the sequence of time intervalsendTime - the time stamp at the end of the sequence of time intervalsprocessingInterval - the time span for which aggregated DataValues are produced (values is
milliseconds)aggregateType - the identifier of the Aggregate to be usedaggregateConfiguration - information on how the Server treats Aggregate specific
functionalityuseSteppedInterpolation - whether to hold the last data point constant instead of fitting
a linehistory - class providing the raw DataValues used in calculating the aggregated through
the HistoryDataProvider interfacecontinuationPoint - returned by this function or null for first call of this functionaggregateData - will be filled with the aggregate values calculated by this function
- Returns:
- a continuationPoint that can be used in continuing the calculations in calling this
function again or null if the specified calculations are complete
- Throws:
StatusException - if reads from the HistoryDataProvider fails or the function is called
with invalid parameters
getMaxIntervalsPerHistoryRead
public int getMaxIntervalsPerHistoryRead()
getServerDefaults
public org.opcfoundation.ua.core.AggregateConfiguration getServerDefaults()
getSupportedFunctions
public Set<org.opcfoundation.ua.builtintypes.NodeId> getSupportedFunctions()
registerFunction
public void registerFunction(org.opcfoundation.ua.builtintypes.NodeId aggregateFunctionId,
AggregateFunction functionImpl)
setMaxIntervalsPerHistoryRead
public void setMaxIntervalsPerHistoryRead(int maxIntervalsPerHistoryRead)
setServerDefaults
public void setServerDefaults(org.opcfoundation.ua.core.AggregateConfiguration newServerDefaults)
Copyright © 2018. All rights reserved.