AFValues.Summary Method
- Last UpdatedNov 18, 2025
- 3 minute read
- PI System
- AF SDK 2024 R2
- Developer
Namespace: OSIsoft.AF.Asset
Assembly: OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182
Syntax
public IDictionary<AFSummaryTypes, AFValue> Summary( AFTimeRange timeRange, AFSummaryTypes summaryType, AFCalculationBasis calcBasis, AFTimestampCalculation timeType )
Public Function Summary ( timeRange As AFTimeRange, summaryType As AFSummaryTypes, calcBasis As AFCalculationBasis, timeType As AFTimestampCalculation ) As IDictionary(Of AFSummaryTypes, AFValue) Dim instance As AFValues Dim timeRange As AFTimeRange Dim summaryType As AFSummaryTypes Dim calcBasis As AFCalculationBasis Dim timeType As AFTimestampCalculation Dim returnValue As IDictionary(Of AFSummaryTypes, AFValue) returnValue = instance.Summary(timeRange, summaryType, calcBasis, timeType)
public: IDictionary<AFSummaryTypes, AFValue^>^ Summary( AFTimeRange timeRange, AFSummaryTypes summaryType, AFCalculationBasis calcBasis, AFTimestampCalculation timeType )
member Summary : timeRange : AFTimeRange * summaryType : AFSummaryTypes * calcBasis : AFCalculationBasis * timeType : AFTimestampCalculation -> IDictionary<AFSummaryTypes, AFValue>
Parameters
- timeRange
- Type: OSIsoft.AF.TimeAFTimeRange
The time range over which to compute the summary. - summaryType
- Type: OSIsoft.AF.DataAFSummaryTypes
A flag which specifies one or more summaries to compute over the time range. - calcBasis
- 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 calculates a timestamp for each interval.
Return Value
Type: IDictionaryAFSummaryTypes, AFValueA dictionary of AFValue, indexed by the specific AFSummaryTypes.
Remarks
The Summary method is used to retrieve several summaries over a single time range. This method performs the calculations over the local data in this AFValues collection. Thus, the method requires the time range specified falls within the range of timestamps in this AFValues collection. 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. Floating point values with a value of "NaN" are treated as bad data in the calculation.
For time-weight totals, if the time unit rate of the values cannot be determined, then the value will be totaled assuming a unit of "per day" and no unit of measure will be assigned to the value. If the measured time component of the tag is not based on a day, the user of the data must convert the totalized value to the correct units. For example, if the rate tag was gallons/minute, the conversion can be accomplished using UOMDatabase.UOMs["minute"].Convert(value, UOMDatabase.UOMs["day"].
| This method, property, or class is not available in the legacy .NET 3.5 version of the SDK. |