UA Server SDK C++ Bundle  1.4.1.271
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
AggregateCalculatorStdDev Class Reference

Calculates the value of an aggregate. More...

#include <aggregatecalculatorstddev.h>

Inherits AggregateCalculator.

Public Member Functions

 AggregateCalculatorStdDev (UaNodeId aggregateId, UaDateTime startTime, UaDateTime endTime, double processingInterval, bool stepped, OpcUa_AggregateConfiguration &configuration)
 Initializes the aggregate calculator. More...
 

Static Public Member Functions

static
AggregateCalculatorInterface
CreateCalculator (UaNodeId aggregateId, UaDateTime startTime, UaDateTime endTime, double processingInterval, bool stepped, OpcUa_AggregateConfiguration &configuration)
 Used by the Aggregators factory to create a new instance of the aggregate calculator. More...
 

Protected Member Functions

UaDataValue ComputeValue (TimeSlice &slice)
 Computes the value for the timeslice. More...
 
UaDataValue ComputeRegression (TimeSlice &slice, int valueType)
 Calculates the RegSlope, RegConst and RegStdDev aggregates for the timeslice. More...
 
UaDataValue ComputeStdDev (TimeSlice &slice, bool includeBounds, int valueType)
 Calculates the StdDev, Variance, StdDev2 and Variance2 aggregates for the timeslice. More...
 

Additional Inherited Members

- Private Member Functions inherited from AggregateCalculator
 AggregateCalculator (UaNodeId aggregateId, UaDateTime startTime, UaDateTime endTime, double processingInterval, bool stepped, OpcUa_AggregateConfiguration &configuration)
 Creates an aggregator with the passed AggregateId and configuration settings. More...
 
UaNodeId GetAggregateId ()
 The aggregate function applied by the calculator. More...
 
bool QueueRawValue (UaDataValue value)
 Queues a raw value for processing. More...
 
UaDataValue GetProcessedValue (bool returnPartial)
 Returns the next processed value. More...
 
bool HasEndTimePassed (UaDateTime currentTime)
 Indicates whether the specified time is later than the end time of the current interval. More...
 
bool UsesInterpolatedBounds ()
 Indicates whether this aggregate uses Interpolated Bounding Values. More...
 
 AggregateCalculator (UaNodeId aggregateId)
 Creates an aggregator with the passed AggregateId and default configuration settings. More...
 
void Initialize (UaNodeId aggregateId, UaDateTime startTime, UaDateTime endTime, double processingInterval, bool stepped, OpcUa_AggregateConfiguration &configuration)
 Initializes the calculation stream. More...
 
UaDateTime GetStartTime ()
 The start time for the request. More...
 
UaDateTime GetEndTime ()
 The end time for the request. More...
 
double GetProcessingInterval ()
 The processing interval for the request. More...
 
bool GetStepped ()
 True if the data series requires stepped interpolation. More...
 
void GetConfiguration (OpcUa_AggregateConfiguration &returnValue)
 The configuration to use when processing. More...
 
bool GetUseServerTimestamp ()
 Whether to use the server timestamp for all processing. More...
 
bool GetTimeFlowsBackward ()
 True if data is being processed in reverse order. More...
 
bool GetComplete ()
 True if all values required for the request have been received and processed.
 
bool GetUsingExtrapolation ()
 True if data is extrapolated after the end of data. More...
 
bool GetSetPartialBit ()
 True if the GetProcessedValue method should set the Partial bit when appropriate. More...
 
int CompareTimestamps (const UaDataValue value1, const UaDataValue value2)
 Compares timestamps stored as UaDataValues according to the current UseServerTimestamp setting. More...
 
int CompareTimestamps (UaDateTime value1, UaDataValue value2)
 Compares a timestamps stored as UaDateTime to a timestamp stored as DataValue according to the current UseServerTimestamp setting. More...
 
bool IsGood (UaDataValue value)
 Checks if the value is good according to the configuration rules. More...
 
OpcUa_StatusCode SetCodeBits (OpcUa_StatusCode statusCode, unsigned int bits)
 Returns a status code with the bits pertaining to the code set. More...
 
OpcUa_StatusCode GetCodeBits (OpcUa_StatusCode statusCode)
 Returns the code bits of the specified status code. More...
 
OpcUa_StatusCode SetAggregateBits (OpcUa_StatusCode statusCode, unsigned int bits)
 Returns a status code with the bits pertaining to aggregates set. More...
 
OpcUa_StatusCode GetAggregateBits (OpcUa_StatusCode statusCode)
 Returns the aggregate bits of the specified status code. More...
 
void CreateSlice (TimeSlice &newSlice, UaDateTime previousStart, UaDateTime previousEnd)
 Creates a new timeslice to process. More...
 
bool UpdateSlice (TimeSlice &slice)
 Creates a new timeslice to process. More...
 
UaDataValue GetNoDataValue (TimeSlice slice)
 Returns a value indicating that there is no data in the timeslice. More...
 
UaDateTime GetTimestamp (TimeSlice slice)
 Returns the timestamp to use for the slice value. More...
 
UaDataValue GetNoDataValue (UaDateTime timestamp)
 Returns a value indicating that there is no data in the timeslice. More...
 
UaDataValue Interpolate (UaDateTime timestamp)
 Interpolates a value at the timestamp. More...
 
UaDataValue SteppedInterpolate (UaDateTime timestamp, UaDataValue earlyBound)
 Calculates the value at the timestamp using stepped interpolation. More...
 
UaDataValue SlopedInterpolate (UaDateTime timestamp, UaDataValue earlyBound, UaDataValue lateBound)
 Calculates the value at the timestamp using sloped interpolation. More...
 
double CastToDouble (UaDataValue value)
 Converts the value to a double for use in calculations (throws exceptions if conversion fails). More...
 
UaDataValue GetSimpleBound (UaDateTime timestamp, TimeSlice &slice)
 Returns the simple bound for the timestamp. More...
 
void GetValuesWithSimpleBounds (TimeSlice &slice, std::list< UaDataValue > &returnList)
 Returns the values in the list with simple bounds. More...
 
bool GetValues (TimeSlice &slice, std::list< UaDataValue > &returnList)
 Returns the values between the start time and the end time for the slice. More...
 
void GetValuesWithInterpolatedBounds (TimeSlice &slice, std::list< UaDataValue > &returnList)
 Returns the values in the list with interpolated bounds. More...
 
void GetRegionsInValueSet (std::list< UaDataValue > &values, bool ignoreBadData, bool useSteppedCalculations, std::list< SubRegion > &returnList)
 Returns the values in the list with simple bounds. More...
 
UaStatusCode GetValueBasedStatusCode (TimeSlice &slice, std::list< UaDataValue > &values, UaStatusCode statusCode)
 Calculates the value based status code for the slice.
 
UaStatusCode GetTimeBasedStatusCode (TimeSlice &slice, std::list< UaDataValue > &values, UaStatusCode defaultCode)
 Calculates the status code for the slice.
 
UaStatusCode GetTimeBasedStatusCode (std::list< SubRegion > &regions, UaStatusCode statusCode)
 Calculates the status code for the slice.
 
- Static Private Member Functions inherited from AggregateCalculator
static
AggregateCalculatorInterface
CreateCalculator (UaNodeId aggregateId, UaDateTime startTime, UaDateTime endTime, double processingInterval, bool stepped, OpcUa_AggregateConfiguration &configuration)
 Used by the Aggregators factory to create a new instance of the aggregate calculator. More...
 

Detailed Description

Calculates the value of an aggregate.

Constructor & Destructor Documentation

AggregateCalculatorStdDev::AggregateCalculatorStdDev ( UaNodeId  aggregateId,
UaDateTime  startTime,
UaDateTime  endTime,
double  processingInterval,
bool  stepped,
OpcUa_AggregateConfiguration &  configuration 
)

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

UaDataValue AggregateCalculatorStdDev::ComputeRegression ( TimeSlice slice,
int  valueType 
)
protected

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

UaDataValue AggregateCalculatorStdDev::ComputeStdDev ( TimeSlice slice,
bool  includeBounds,
int  valueType 
)
protected

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

UaDataValue AggregateCalculatorStdDev::ComputeValue ( TimeSlice slice)
protectedvirtual

Computes the value for the timeslice.

Reimplemented from AggregateCalculator.

AggregateCalculatorInterface * AggregateCalculatorStdDev::CreateCalculator ( UaNodeId  aggregateId,
UaDateTime  startTime,
UaDateTime  endTime,
double  processingInterval,
bool  stepped,
OpcUa_AggregateConfiguration &  configuration 
)
static

Used by the Aggregators factory to create a new instance of 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.

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