.NET Based OPC UA Client/Server SDK
2.6.6.478
|
Calculates the value of an aggregate. More...
Inherits UnifiedAutomation.UaServer.IAggregateCalculator.
Inherited by UnifiedAutomation.UaServer.AverageAggregateCalculator, UnifiedAutomation.UaServer.CountAggregateCalculator, UnifiedAutomation.UaServer.MinMaxAggregateCalculator, UnifiedAutomation.UaServer.StartEndAggregateCalculator, UnifiedAutomation.UaServer.StatusAggregateCalculator, and UnifiedAutomation.UaServer.StdDevAggregateCalculator.
Classes | |
class | SubRegion |
A subset of a slice bounded by two raw data points. More... | |
class | TimeSlice |
Stores information about a slice of data to be processed. More... | |
Public Member Functions | |
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... | |
Static Public Member Functions | |
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... | |
Protected Member Functions | |
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... | |
virtual DataValue | ComputeValue (TimeSlice slice) |
Calculates the value for the timeslice. 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< DataValue > | GetValuesWithSimpleBounds (TimeSlice slice) |
Returns the values in the list with simple bounds. More... | |
List< DataValue > | GetValues (TimeSlice slice) |
Returns the values between the start time and the end time for the slice. More... | |
List< DataValue > | GetValuesWithInterpolatedBounds (TimeSlice slice) |
Returns the values in the list with interpolated bounds. More... | |
List< SubRegion > | GetRegionsInValueSet (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... | |
Static Protected Member Functions | |
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 | |
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... | |
Calculates the value of an aggregate.
|
inlineprotected |
Creates a default aggregator.
|
inline |
Initializes the calculation stream.
aggregateId | The aggregate function to apply. |
startTime | The start time. |
endTime | The end time. |
processingInterval | The processing interval. |
stepped | Whether to use stepped interpolation. |
configuration | The aggregate configuration. |
|
inlinestaticprotected |
Converts the value to a double for use in calculations (throws exceptions if conversion fails).
|
inlinestaticprotected |
Converts the value back to its original type (throws exceptions if conversion fails).
|
inlineprotected |
Compares timestamps for two DataValues according to the current UseServerTimestamp setting.
value1 | The first value to compare. |
value2 | The second value to compare. |
|
inlineprotected |
Compares timestamps for two DataValues according to the current UseServerTimestamp setting.
value1 | The first value to compare. |
value2 | The second value to compare. |
|
inlineprotected |
Compares timestamps for two DataValues according to the current UseServerTimestamp setting.
value1 | The first value to compare. |
value2 | The second value to compare. |
|
inlineprotected |
Compares timestamps for a timestamp to a DataValue according to the current UseServerTimestamp setting.
value1 | The timestamp to compare. |
value2 | The data value to compare. |
|
inlineprotectedvirtual |
Calculates the value for the timeslice.
slice | The slice to process. |
Reimplemented in UnifiedAutomation.UaServer.AverageAggregateCalculator, UnifiedAutomation.UaServer.CountAggregateCalculator, UnifiedAutomation.UaServer.MinMaxAggregateCalculator, UnifiedAutomation.UaServer.StartEndAggregateCalculator, UnifiedAutomation.UaServer.StatusAggregateCalculator, and UnifiedAutomation.UaServer.StdDevAggregateCalculator.
|
inlineprotected |
Creates a new time slice to process.
previousSlice | The previous processed slice. |
|
inlineprotected |
Return a value indicating there is no data in the time slice.
|
inlineprotected |
Return a value indicating there is no data in the time slice.
|
inline |
Returns the next processed value.
returnPartial | If true a partial interval should be processed. |
Implements UnifiedAutomation.UaServer.IAggregateCalculator.
|
inlineprotected |
Returns the values in the list with simple bounds.
|
inlineprotected |
Returns the simple bound for the timestamp.
|
inlineprotected |
Calculates the status code for the slice
|
inlineprotected |
Calculates the status code for the slice
|
inlineprotected |
Returns the timestamp to use for the slice value.
|
inlineprotected |
Calculates the value based status code for the slice
|
inlineprotected |
Returns the values between the start time and the end time for the slice.
|
inlineprotected |
Returns the values in the list with interpolated bounds.
|
inlineprotected |
Returns the values in the list with simple bounds.
|
inline |
Returns true if the specified time is later than the end of the current interval.
Return true if time flows forward and the time is later than the end time.
Implements UnifiedAutomation.UaServer.IAggregateCalculator.
|
inlineprotected |
Initializes the calculation stream.
aggregateId | The aggregate function to apply. |
startTime | The start time. |
endTime | The end time. |
processingInterval | The processing interval. |
stepped | Whether to use stepped interpolation. |
configuration | The aggregate configuration. |
|
inlineprotected |
Calculate the interpolate aggregate for the timeslice.
|
inlineprotected |
Interpolates a value at the timestamp.
timestamp | The timestamp. |
reference | The timeslice that contains the timestamp. |
|
inlineprotected |
Checks if the value is good according to the configuration rules.
value | The value to test. |
|
inline |
Queues a raw value for processing.
value | The data value to process. |
Implements UnifiedAutomation.UaServer.IAggregateCalculator.
|
inlinestatic |
Calculate the value at the timestamp using slopped interpolation.
|
inlinestatic |
Calculate the value at the timestamp using slopped interpolation.
|
inlineprotected |
Creates a new time slice to process.
slice | The slice to update. |
|
get |
The aggregate function applied by the calculator.
|
getprotected |
True if all values required for the request have been received and processed
|
getprotected |
The configuration to use when processing.
|
getprotected |
Whether to use the server timestamp for all processing.
|
getprotected |
The end time for the request.
|
getprotected |
The processing interval for the request.
|
getsetprotected |
True if the GetProcessedValue method should set the Partial bit when appropriate.
|
getprotected |
The start time for the request.
|
getprotected |
True if the data series requires stepped interpolation.
|
getprotected |
True if data is being processed in reverse order.
|
getprotected |
Whether to use the server timestamp for all processing.
|
getsetprotected |
True if data is extrapolated after the end of data.