The AggregateFilter defines the Aggregate function that should be used to calculate the values to be returned. See OPC 10000-13 for details on possible Aggregate functions. It specifies a startTime of the first Aggregate to be calculated. The samplingInterval of the MonitoringParameters (see 7.21) defines how the Server should internally sample the underlying data source. The processingInterval specifies the size of a time-period where the Aggregate is calculated. The queueSize from the MonitoringAttributes specifies the number of processed values that should be kept.

The intention of the AggregateFilter is not to read historical data, the HistoryRead service should be used for this purpose. However, it is allowed that the startTime is set to a time that is in the past when received from the Server. The number of Aggregates to be calculated in the past should not exceed the queueSize defined in the MonitoringAttributes since the values exceeding the queueSize would directly be discharged and never returned to the Client.

The startTime and the processingInterval can be revised by the Server, but the startTime should remain in the same boundary (startTime + revisedProcessingInterval * n = revisedStartTime). That behaviour simplifies accessing historical values of the Aggregates using the same boundaries by calling the HistoryRead service. The extensible Parameter AggregateFilterResult is used to return the revised values for the AggregateFilter.

Some underlying systems may poll data and produce multiple samples with the same value. Other systems may only report changes to the values. The definition for each Aggregate type explains how to handle the two different scenarios.

The MonitoredItem only reports values for intervals that have completed when the publish timer expires. Unused data is carried over and used to calculate a value returned in the next publish.

The ServerTimestamp for each interval shall be the time of the end of the processing interval.

The AggregateFilter is defined in Table 150.

Table 150 – AggregateFilter structure

Name

Type

Description

AggregateFilter

structure

startTime

UtcTime

Beginning of period to calculate the Aggregate the first time. The size of each period used to calculate the Aggregate is defined by the samplingInterval of the MonitoringParameters (see 7.21).

aggregateType

NodeId

The NodeId of the AggregateFunctionType Object that indicates the Aggregate to be used when retrieving processed data. See OPC 10000-13 for details.

processingInterval

Duration

The period be used to compute the Aggregate.

aggregateConfiguration

Aggregate

Configuration

This parameter allows Clients to override the Aggregate configuration settings supplied by the AggregateConfiguration Object on a per monitored item basis. See OPC 10000-13 for more information on Aggregate configurations. If the Server does not support the ability to override the Aggregate configuration settings it shall return a StatusCode of Bad_AggregateListMismatch. This structure is defined in-line with the following indented items.

useServerCapabilities

Defaults

Boolean

If value = TRUE use Aggregate configuration settings as outlined by the AggregateConfiguration object.

If value=FALSE use configuration settings as outlined in the following aggregateConfiguration parameters.

Default is TRUE.

treatUncertainAsBad

Boolean

As described in OPC 10000-13.

percentDataBad

Byte

As described in OPC 10000-13.

percentDataGood

Byte

As described in OPC 10000-13.

useSloped

Extrapolation

Boolean

As described in OPC 10000-13.

The AggregateFilterResult defines the revised AggregateFilter the Server can return when an AggregateFilter is defined for a MonitoredItem in the CreateMonitoredItems or ModifyMonitoredItems Services. The AggregateFilterResult is defined in Table 151. This is the MonitoringFilterResult associated with the AggregateFilter MonitoringFilter.

Table 151 – AggregateFilterResult structure

Name

Type

Description

AggregateFilterResult

structure

revisedStartTime

UtcTime

The actual StartTime interval that the Server shall use.

This value is based on a number of factors, including capabilities of the Server to access historical data. The revisedStartTime should remain in the same boundary as the startTime (startTime + samplingInterval * n = revisedStartTime).

revisedProcessingInterval

Duration

The actual processingInterval that the Server shall use.

The revisedProcessingInterval shall be at least twice the revisedSamplingInterval for the MonitoredItem.

revisedAggregateConfiguration

Aggregate

Configuration

The actual aggregateConfiguration that the Server shall use.

The structure is defined in Table 150.