From 0460c7d0c43508ec18928787d3348ad39b9c44b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johan=20Fiti=C3=A9?= Date: Mon, 4 Dec 2023 09:50:24 +0100 Subject: [PATCH] Use base again MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Johan FitiƩ --- src/DBMDataRef/DBMDataRef.vb | 45 ------------------------------------ 1 file changed, 45 deletions(-) diff --git a/src/DBMDataRef/DBMDataRef.vb b/src/DBMDataRef/DBMDataRef.vb index 1879f53b..557fdb3b 100644 --- a/src/DBMDataRef/DBMDataRef.vb +++ b/src/DBMDataRef/DBMDataRef.vb @@ -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) - ' Use a shrinking window so that cached data can be used optimally. - Do While timeRange.StartTime <= timeRange.EndTime - InterpolatedValuesByCount.Add( - GetValues(Nothing, timeRange, 0, Nothing, Nothing)(0)) - timeRange.StartTime += interval - Loop - End If - - DBM.Logger.LogTrace( - "Return " & InterpolatedValuesByCount.Count.ToString & " values", - Attribute.GetPath) - Return InterpolatedValuesByCount - - End Function - - End Class