public IDictionary<AFSummaryTypes, AFValues> Summaries( AFTimeRange timeRange, AFTimeSpan summaryDuration, AFSummaryTypes summaryType, AFCalculationBasis calcBasis, AFTimestampCalculation timeType )
Public Function Summaries ( timeRange As AFTimeRange, summaryDuration As AFTimeSpan, summaryType As AFSummaryTypes, calcBasis As AFCalculationBasis, timeType As AFTimestampCalculation ) As IDictionary(Of AFSummaryTypes, AFValues) Dim instance As AFData Dim timeRange As AFTimeRange Dim summaryDuration As AFTimeSpan Dim summaryType As AFSummaryTypes Dim calcBasis As AFCalculationBasis Dim timeType As AFTimestampCalculation Dim returnValue As IDictionary(Of AFSummaryTypes, AFValues) returnValue = instance.Summaries(timeRange, summaryDuration, summaryType, calcBasis, timeType)
public: IDictionary<AFSummaryTypes, AFValues^>^ Summaries( AFTimeRange timeRange, AFTimeSpan summaryDuration, AFSummaryTypes summaryType, AFCalculationBasis calcBasis, AFTimestampCalculation timeType )
member Summaries : timeRange : AFTimeRange * summaryDuration : AFTimeSpan * summaryType : AFSummaryTypes * calcBasis : AFCalculationBasis * timeType : AFTimestampCalculation -> IDictionary<AFSummaryTypes, AFValues>
The duration of each summary interval. If specified in hours, minutes, seconds, or milliseconds, the summary durations will be evenly spaced UTC time intervals. Longer interval types are interpreted using wall clock rules and are time zone dependent. For example, an interval created with the string "24h" means using an evenly spaced 24 UTC hour interval between each event. On the other hand, an interval created with the string "1d" would return an interval shorter or longer than 24 hours if the interval encompasses a Daylight Savings Time change.
When a positive duration is specified, the summary calculation begins at the earliest bounding time in the timeRange and applies the duration repeatedly in time ascending direction to generate the summary intervals.
If a negative duration is specified, the summary calculation begins at the latest bounding time in the timeRange and applies the duration repeatedly in time descending direction to generate the summary intervals. Note that the order of values returned will still be reflected by the timeRange, regardless of the summary duration sign.
The following table illustrates the interaction between timeRange and summaryDuration with the timestamp summary calculations and order of returned values for each summary type.
|Time Range||Summary Duration||Summaries returned in AFValues|
|Ascending (Y to T)||Positive (5h)||Y to Y+5h, Y+5h to Y+10h, Y+10h to y+15h, Y+15h to Y+20h|
|Descending (T to Y)||Positive (5h)||Y+15h to Y+20h, Y+10h to Y+15h, Y+10h, Y+5h to Y+10h, Y to Y+5h|
|Ascending (Y to T)||Negative (-5h)||T-20h to T-15h, T-15h to T-10h, T-10h to T-5h, T-5h to T|
|Descending (T to Y)||Negative (-5h)||T-5h to T, T-10h to T-5h, T-15h to T-10h, T-20 to T-15h|
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.
For time-weight totals, if the time unit rate of the attribute 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"].
|Notes to Callers|
|This method, property, or class is only available in the .NET 4 version of the SDK.|
|You must have ReadData security rights to read a data value.|