Skip to content

Commit

Permalink
Merge branch 'develop' into staging
Browse files Browse the repository at this point in the history
  • Loading branch information
jfitie committed Dec 4, 2023
2 parents 195bdbd + e12babf commit ecd84fc
Showing 1 changed file with 0 additions and 45 deletions.
45 changes: 0 additions & 45 deletions src/DBMDataRef/DBMDataRef.vb
Original file line number Diff line number Diff line change
Expand Up @@ -1016,51 +1016,6 @@ Namespace Vitens.DynamicBandwidthMonitor
End Function


Public Overrides Function InterpolatedValuesByCount(
timeRange As AFTimeRange, numberOfValues As Integer,
filterExpression As String, includeFilteredValues As Boolean,
inputAttributes As AFAttributeList, inputValues As AFValues()) As AFValues

' https://docs.osisoft.com/bundle/af-sdk/page/html/M_OSIsoft_AF_Asset_AFDa
' taReference_InterpolatedValuesByCount.htm
' Retrieves interpolated values over the specified time range evenly
' spaced using the numberOfValues.

Dim interval As AFTimeSpan

DBM.Logger.LogDebug(
"timeRange.StartTime " &
timeRange.StartTime.LocalTime.ToString("s") & "; " &
"timeRange.EndTime " &
timeRange.EndTime.LocalTime.ToString("s") & "; " &
"numberOfValues " & numberOfValues.ToString, Attribute.GetPath)

InterpolatedValuesByCount = New AFValues
If timeRange.StartTime = timeRange.EndTime Or numberOfValues = 1 Then
' Return a single value.
InterpolatedValuesByCount.Add(
GetValue(Nothing, timeRange.StartTime, Nothing, Nothing))
Else
' Return multiple values.
interval = New AFTimeSpan(0, 0, 0, 0, 0,
(timeRange.EndTime.UtcSeconds-timeRange.StartTime.UtcSeconds)/
(numberOfValues-1), 0)
InterpolatedValuesByCount = Summaries(
New AFTimeRange(timeRange.StartTime, timeRange.EndTime+interval),
interval,
AFSummaryTypes.Average,
AFCalculationBasis.TimeWeighted,
AFTimestampCalculation.EarliestTime)(AFSummaryTypes.Average)
End If

DBM.Logger.LogTrace(
"Return " & InterpolatedValuesByCount.Count.ToString & " values",
Attribute.GetPath)
Return InterpolatedValuesByCount

End Function


End Class


Expand Down

0 comments on commit ecd84fc

Please # to comment.