-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement TimeAverage data function (#375)
* Add default function definition for TimeAverage * Create separate pre-/post-boundary classes Removes `BoundaryInfo` and replaces it with separate `PreBoundaryInfo` and `PostBoundaryInfo` classes. This is technically a **breaking change**, as `BoundaryInfo` and the associated properties on `TagValueBucket` are public. The reason for this change is to allow time buckets to accurately describe the values immediately before and immediately after their start and end times. For a TimeAverage aggregation, this allows a value to be interpolated exactly at the bucket end time so that the area under the line between the last sample and the boundary sample can be calculated. This also improves interpolation calculations, as it allows the final bucket in an interpolation query to interpolate a bucket at the query end time if end boundary information is available, instead of extrapolating forwards. * Add common tag value property for a partial value This property allows an aggregated sample to indicate that it was computed from a partial data set (e.g. if the end time for the data query is earlier than the end time for the time bucket). * Add TimeAverage implementation + other changes Adds the implementation for TimeAverage to AggregationHelper. Refactors the Interpolated implementation to use the new TimeValueBucket boundary properties. Refactors the private GetAggregatedValues implementation to simplify the way that boundary samples are added to new buckets. * Add interpolated query start/end values Updates PlotHelper so that values are interpolated exactly at the query start and end time. Also modifies default behaviour for non-numeric tags so that a maximum of 6 samples per bucket are returned. In the previous implementation, every change in value or quality for a non-numeric tag was returned, meaning that it was possible to return every sample in the bucket no matter how many there were. * Update aggregation tests * Fix sample selection when bucket end > query end * Clean-up after merging develop/4.0.0 changes * Update release notes
- Loading branch information
1 parent
fa47bb8
commit 8b593d7
Showing
11 changed files
with
781 additions
and
150 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
using System.Linq; | ||
|
||
using DataCore.Adapter.Common; | ||
|
||
namespace DataCore.Adapter.RealTimeData { | ||
|
Oops, something went wrong.