.NET Based OPC UA Client/Server SDK  2.6.0.418
UnifiedAutomation.UaServer.AverageAggregateCalculator Class Reference

Calculates the value of an aggregate. More...

Inherits UnifiedAutomation.UaServer.AggregateCalculator.

Public Member Functions

 AverageAggregateCalculator (NodeId aggregateId, DateTime startTime, DateTime endTime, double processingInterval, bool stepped, AggregateConfiguration configuration)
 Initializes the aggregate calculator. More...
 
- Public Member Functions inherited from UnifiedAutomation.UaServer.AggregateCalculator
 AggregateCalculator (NodeId aggregateId, DateTime startTime, DateTime endTime, double processingInterval, bool stepped, AggregateConfiguration configuration)
 Initializes the calculation stream. More...
 
bool QueueRawValue (DataValue value)
 Queues a raw value for processing. More...
 
DataValue GetProcessedValue (bool returnPartial)
 Returns the next processed value. More...
 
bool HasEndTimePassed (DateTime currentTime)
 Returns true if the specified time is later than the end of the current interval. More...
 

Protected Member Functions

override DataValue ComputeValue (TimeSlice slice)
 Computes the value for the timeslice. More...
 
DataValue ComputeAverage (TimeSlice slice)
 Calculates the RegSlope, RegConst and RegStdDev aggregates for the timeslice. More...
 
DataValue ComputeTimeAverage (TimeSlice slice, bool useSimpleBounds, int valueType)
 Calculates the StdDev, Variance, StdDev2 and Variance2 aggregates for the timeslice. More...
 
- Protected Member Functions inherited from UnifiedAutomation.UaServer.AggregateCalculator
 AggregateCalculator (NodeId aggregateId)
 Creates a default aggregator. More...
 
void Initialize (NodeId aggregateId, DateTime startTime, DateTime endTime, double processingInterval, bool stepped, AggregateConfiguration configuration)
 Initializes the calculation stream. More...
 
int CompareTimestamps (DataValue value1, DataValue value2)
 Compares timestamps for two DataValues according to the current UseServerTimestamp setting. More...
 
int CompareTimestamps (DataValue value1, LinkedListNode< DataValue > value2)
 Compares timestamps for two DataValues according to the current UseServerTimestamp setting. More...
 
int CompareTimestamps (LinkedListNode< DataValue > value1, LinkedListNode< DataValue > value2)
 Compares timestamps for two DataValues according to the current UseServerTimestamp setting. More...
 
int CompareTimestamps (DateTime value1, LinkedListNode< DataValue > value2)
 Compares timestamps for a timestamp to a DataValue according to the current UseServerTimestamp setting. More...
 
bool IsGood (DataValue value)
 Checks if the value is good according to the configuration rules. More...
 
TimeSlice CreateSlice (TimeSlice previousSlice)
 Creates a new time slice to process. More...
 
bool UpdateSlice (TimeSlice slice)
 Creates a new time slice to process. More...
 
DataValue Interpolate (TimeSlice slice)
 Calculate the interpolate aggregate for the timeslice. More...
 
DataValue GetNoDataValue (TimeSlice slice)
 Return a value indicating there is no data in the time slice. More...
 
DateTime GetTimestamp (TimeSlice slice)
 Returns the timestamp to use for the slice value. More...
 
DataValue GetNoDataValue (DateTime timestamp)
 Return a value indicating there is no data in the time slice. More...
 
DataValue Interpolate (DateTime timestamp, TimeSlice reference)
 Interpolates a value at the timestamp. More...
 
DataValue GetSimpleBound (DateTime timestamp, TimeSlice slice)
 Returns the simple bound for the timestamp. More...
 
List< DataValueGetValuesWithSimpleBounds (TimeSlice slice)
 Returns the values in the list with simple bounds. More...
 
List< DataValueGetValues (TimeSlice slice)
 Returns the values between the start time and the end time for the slice. More...
 
List< DataValueGetValuesWithInterpolatedBounds (TimeSlice slice)
 Returns the values in the list with interpolated bounds. More...
 
List< SubRegionGetRegionsInValueSet (List< DataValue > values, bool ignoreBadData, bool useSteppedCalculations)
 Returns the values in the list with simple bounds. More...
 
StatusCode GetValueBasedStatusCode (TimeSlice slice, List< DataValue > values, StatusCode statusCode)
 Calculates the value based status code for the slice More...
 
StatusCode GetTimeBasedStatusCode (TimeSlice slice, List< DataValue > values, StatusCode defaultCode)
 Calculates the status code for the slice More...
 
StatusCode GetTimeBasedStatusCode (List< SubRegion > regions, StatusCode statusCode)
 Calculates the status code for the slice More...
 

Additional Inherited Members

- Static Public Member Functions inherited from UnifiedAutomation.UaServer.AggregateCalculator
static DataValue SteppedInterpolate (DateTime timestamp, DataValue earlyBound)
 Calculate the value at the timestamp using slopped interpolation. More...
 
static DataValue SlopedInterpolate (DateTime timestamp, DataValue earlyBound, DataValue lateBound)
 Calculate the value at the timestamp using slopped interpolation. More...
 
- Static Protected Member Functions inherited from UnifiedAutomation.UaServer.AggregateCalculator
static double CastToDouble (DataValue value)
 Converts the value to a double for use in calculations (throws exceptions if conversion fails). More...
 
static Variant CastToOriginalType (double value, DataValue original)
 Converts the value back to its original type (throws exceptions if conversion fails). More...
 
- Properties inherited from UnifiedAutomation.UaServer.AggregateCalculator
NodeId AggregateId [get]
 The aggregate function applied by the calculator. More...
 
DateTime StartTime [get]
 The start time for the request. More...
 
DateTime EndTime [get]
 The end time for the request. More...
 
double ProcessingInterval [get]
 The processing interval for the request. More...
 
bool Stepped [get]
 True if the data series requires stepped interpolation. More...
 
AggregateConfiguration Configuration [get]
 The configuration to use when processing. More...
 
bool UseServerTimestamp [get]
 Whether to use the server timestamp for all processing. More...
 
bool TimeFlowsBackward [get]
 True if data is being processed in reverse order. More...
 
TimeSlice CurrentSlice [get]
 Whether to use the server timestamp for all processing. More...
 
bool Complete [get]
 True if all values required for the request have been received and processed More...
 
bool SetPartialBit [get, set]
 True if the GetProcessedValue method should set the Partial bit when appropriate. More...
 
bool UsingExtrapolation [get, set]
 True if data is extrapolated after the end of data. More...
 
- Properties inherited from UnifiedAutomation.UaServer.IAggregateCalculator
NodeId AggregateId [get]
 The aggregate function applied by the calculator. More...
 

Detailed Description

Calculates the value of an aggregate.

Constructor & Destructor Documentation

UnifiedAutomation.UaServer.AverageAggregateCalculator.AverageAggregateCalculator ( NodeId  aggregateId,
DateTime  startTime,
DateTime  endTime,
double  processingInterval,
bool  stepped,
AggregateConfiguration  configuration 
)
inline

Initializes the aggregate calculator.

Parameters
aggregateIdThe aggregate function to apply.
startTimeThe start time.
endTimeThe end time.
processingIntervalThe processing interval.
steppedWhether to use stepped interpolation.
configurationThe aggregate configuration.

Member Function Documentation

DataValue UnifiedAutomation.UaServer.AverageAggregateCalculator.ComputeAverage ( TimeSlice  slice)
inlineprotected

Calculates the RegSlope, RegConst and RegStdDev aggregates for the timeslice.

DataValue UnifiedAutomation.UaServer.AverageAggregateCalculator.ComputeTimeAverage ( TimeSlice  slice,
bool  useSimpleBounds,
int  valueType 
)
inlineprotected

Calculates the StdDev, Variance, StdDev2 and Variance2 aggregates for the timeslice.

override DataValue UnifiedAutomation.UaServer.AverageAggregateCalculator.ComputeValue ( TimeSlice  slice)
inlineprotectedvirtual

Computes the value for the timeslice.

Reimplemented from UnifiedAutomation.UaServer.AggregateCalculator.


The documentation for this class was generated from the following file: