Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AF SDK Reference

PIPointList.Summary Method

  • Last UpdatedNov 18, 2025
  • 6 minute read
PIPointList.Summary Method
Returns several summaries over a single time range for each PIPoint in the list.

Namespace:  OSIsoft.AF.PI
Assembly:  OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182

Syntax

public IEnumerable<IDictionary<AFSummaryTypes, AFValue>> Summary(
	AFTimeRange timeRange,
	AFSummaryTypes summaryTypes,
	AFCalculationBasis calculationBasis,
	AFTimestampCalculation timeType,
	PIPagingConfiguration pagingConfig
)
Public Function Summary ( 
	timeRange As AFTimeRange,
	summaryTypes As AFSummaryTypes,
	calculationBasis As AFCalculationBasis,
	timeType As AFTimestampCalculation,
	pagingConfig As PIPagingConfiguration
) As IEnumerable(Of IDictionary(Of AFSummaryTypes, AFValue))

Dim instance As PIPointList
Dim timeRange As AFTimeRange
Dim summaryTypes As AFSummaryTypes
Dim calculationBasis As AFCalculationBasis
Dim timeType As AFTimestampCalculation
Dim pagingConfig As PIPagingConfiguration
Dim returnValue As IEnumerable(Of IDictionary(Of AFSummaryTypes, AFValue))

returnValue = instance.Summary(timeRange, 
	summaryTypes, calculationBasis, 
	timeType, pagingConfig)
public:
IEnumerable<IDictionary<AFSummaryTypes, AFValue^>^>^ Summary(
	AFTimeRange timeRange, 
	AFSummaryTypes summaryTypes, 
	AFCalculationBasis calculationBasis, 
	AFTimestampCalculation timeType, 
	PIPagingConfiguration^ pagingConfig
)
member Summary : 
        timeRange : AFTimeRange * 
        summaryTypes : AFSummaryTypes * 
        calculationBasis : AFCalculationBasis * 
        timeType : AFTimestampCalculation * 
        pagingConfig : PIPagingConfiguration -> IEnumerable<IDictionary<AFSummaryTypes, AFValue>> 

Parameters

timeRange
Type: OSIsoft.AF.TimeAFTimeRange
The time range over which to compute the summary.
summaryTypes
Type: OSIsoft.AF.DataAFSummaryTypes
A flag which specifies one or more summaries to compute over the time range.
calculationBasis
Type: OSIsoft.AF.DataAFCalculationBasis
Specifies the method of evaluating the data over the time range.
timeType
Type: OSIsoft.AF.DataAFTimestampCalculation
A flag indicating what how to calculate a timestamp for each interval.
pagingConfig
Type: OSIsoft.AF.PIPIPagingConfiguration
Contains the paging configuration parameters for the request.

Return Value

Type: IEnumerableIDictionaryAFSummaryTypes, AFValue

An enumerable of summary results for each PIPoint in the list. The results are not guaranteed to match the order of the PIPointList, and duplicate points in the list will not produce a duplicate result. The results can be mapped back to the corresponding PI Point using the PIPoint property on each result.

The order of the results are predictable; however, if you need the results in the same order as the attribute list, then consider using a dictionary keyed by PI Point to construct a list in the same order.

The points in the list are broken up by their corresponding PI Data Archive. A bulk call is made against each PI Data Archive in parallel. The results are made available as they are returned from the PI Data Archive in the order that the bulk calls were made.

The following example shows a list of points including duplicates from three different PI Data Archives:

PI PointPI Data Archive
Lobby_Room_TemperatureContoso
Lobby_Room_TemperatureNorthwind
Lobby_Room_TemperatureContoso
Lobby_Room_TemperatureAdventureWorks
Kitchen_Room_TemperatureContoso

This table shows the order that the results would be returned:

PI PointPI Data Archive
Lobby_Room_TemperatureContoso
Kitchen_Room_TemperatureContoso
Lobby_Room_TemperatureNorthwind
Lobby_Room_TemperatureAdventureWorks

Since the first point is on the Contoso PI Data Archive, it is the first PI Data Archive to receive a bulk call; therefore, all Contoso point results will be returned first. Duplicate points do not produce a duplicate result, so the duplicate Contoso Lobby_Room_Temperature does not produce a second return value. After the Contoso results have been returned, the Northwind results are returned followed by the AdventureWorks results.

Exceptions

ExceptionCondition
ArgumentOutOfRangeException The summaryTypes cannot be None.
OperationCanceledExceptionWhen an error occurs that prevents the operation from proceeding. Check the Error property on the pagingConfig object for more specific error information.
ArgumentNullExceptionWhen pagingConfig is .

Remarks

Count is the only summary type supported on non-numeric attributes. Requesting a summary for any other type will generate an error.

Time-weighted totals are computed by integrating the rate tag values over the requested time range. If some of the data are bad in the time range, the calculated total is divided by the fraction of the time period for which there are good values. Mathematically, this approach is equivalent to assuming that during the period of bad data, the tag takes on the average values for the entire calculation time range. The use can use the PercentGood summary to determine if the calculation results are suitable for the application's purposes.

Note Notes to Callers
This method, property, or class is not available in the legacy .NET 3.5 version of the SDK.

Important note Important
This method will use a single bulk Remote Procedure Call if the PI Data Archive supports it, otherwise it will issue individual RPCs in parallel. Results are available for enumeration as they returned from the PI Data Archive.

Important note Important
When individual RPCs are issued in parallel, each RPC is made using the caller's security context. When making these calls while impersonating, the thread or runtime must be configured to propagate the impersonation across these asynchronous points (see the SecurityContext documentation for details).

Important note Important
The returned enumerable collection can be enumerated one time. As the collection is enumerated, the internal data structures are disposed. Any attempt to reset or enumerate a second time will result in an exception.

Note Notes to Callers
This call might use a background task to complete some of its work. See the Threading Overview for some matters to consider when execution transitions to another thread.

Examples

// Holds the results keyed on the associated point
var resultsMap = new Dictionary<PIPoint, AFValue>();

// Results should be sent back for 100 tags in each page.
PIPagingConfiguration config = new PIPagingConfiguration(PIPageType.TagCount, 100);

try
{
    var listResults = pointList.Summary(timeRange, AFSummaryTypes.Average,
        AFCalculationBasis.TimeWeighted, AFTimestampCalculation.Auto, config);

    foreach (IDictionary<AFSummaryTypes, AFValue> pointResults in listResults)
    {
        // Get average values from the result dictionary
        AFValue pointValue = pointResults[AFSummaryTypes.Average];
        PIPoint point = pointValue.PIPoint;

        // Map the results back to the point
        resultsMap[point] = pointValue;
    }
}
catch (OperationCanceledException)
{
    // Errors that occur during bulk calls get trapped here
    // The actual error is stored on the PIPagingConfiguration object
    Console.WriteLine(config.Error.Message);
}
catch (Exception otherEx)
{
    // Errors that occur in an iterative fallback method get trapped here
    Console.WriteLine(otherEx.Message);
}
' Holds the results keyed on the associated point
Dim resultsMap As New Dictionary(Of PIPoint, AFValue)

' Results should be sent back for 100 tags in each page.
Dim config As New PIPagingConfiguration(PIPageType.TagCount, 100)

Try

    Dim listResults As IEnumerable(Of IDictionary(Of AFSummaryTypes, AFValue)) =
        pointList.Summary(timeRange, AFSummaryTypes.Average,
        AFCalculationBasis.TimeWeighted, AFTimestampCalculation.Auto, config)

    For Each pointResults As IDictionary(Of AFSummaryTypes, AFValue) In listResults

        ' Get average values from result dictionary
        Dim pointValue As AFValue = pointResults(AFSummaryTypes.Average)
        Dim point As PIPoint = pointValue.PIPoint

        ' Map the results back to the point
        resultsMap(point) = pointValue
    Next

Catch canceledEx As OperationCanceledException

    ' Errors that occur during bulk calls get trapped here
    ' The actual error is stored on the PIPagingConfiguration object
    Console.WriteLine(config.Error.Message)

Catch otherEx As Exception

    ' Errors that occur in an iterative fallback method get trapped here
    Console.WriteLine(otherEx.Message)
End Try

No code example is currently available or this language may not be supported.

No code example is currently available or this language may not be supported.

Version Information

AFSDK

Supported in: 3.1.1, 3.1.0, 3.0.2, 3.0.1, 3.0.0, 2.10.11, 2.10.5, 2.10.0, 2.10, 2.9.5, 2.9, 2.8.5, 2.8, 2.7.5, 2.7, 2.6

See Also

In This Topic
Related Links
TitleResults for “How to create a CRG?”Also Available in