init
This commit is contained in:
@@ -0,0 +1,86 @@
|
||||
/*
|
||||
* DTS.Channel.IDecimatable
|
||||
*
|
||||
* Copyright © 2009
|
||||
* Diversified Technical Systems, Inc.
|
||||
* All Rights Reserved
|
||||
*/
|
||||
|
||||
namespace DTS.DAS.Concepts.DAS.Channel
|
||||
{
|
||||
/// <summary>
|
||||
/// Definition of what it means for a DAS channel to be "decimatable".
|
||||
/// </summary>
|
||||
///
|
||||
/// <typeparam name="T">
|
||||
/// The type of data handled by this DAS channel.
|
||||
/// </typeparam>
|
||||
///
|
||||
public interface IDecimatable<out T>
|
||||
{
|
||||
/// <summary>
|
||||
/// The number of points to be squeezed into a single index point.
|
||||
/// </summary>
|
||||
uint PointsPerPoint
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get/set the decimation method to be applied.
|
||||
/// </summary>
|
||||
DecimationMethod DecimationType
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Generate a decimated array using the current <see cref="DTS.DAS.Concepts.DAS.Channel.DecimationMethod"/>.
|
||||
/// </summary>
|
||||
///
|
||||
/// <returns>
|
||||
/// A decimated array of type "T".
|
||||
/// </returns>
|
||||
///
|
||||
T[ ] ToDecimatedArray( );
|
||||
|
||||
/// <summary>
|
||||
/// Get the value at the specified post-decimation index.
|
||||
/// </summary>
|
||||
/// <param name="i"></param>
|
||||
/// <returns></returns>
|
||||
///
|
||||
/// <remarks>
|
||||
/// Note that implementing this interface implies that the indexing operator should return values from
|
||||
/// the set decimated according to the PointsPerPoint and Method properties.
|
||||
/// </remarks>
|
||||
///
|
||||
T this[ long i ]
|
||||
{
|
||||
get;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Methods for determining the value of the representative point for decimated sets.
|
||||
/// </summary>
|
||||
public enum DecimationMethod
|
||||
{
|
||||
/// <summary>
|
||||
/// Use that value of the PointsPerPoint-th point as the representative value.
|
||||
/// </summary>
|
||||
Point,
|
||||
|
||||
/// <summary>
|
||||
/// Use the average of the PointsPerPoint values as the representative value.
|
||||
/// </summary>
|
||||
Average,
|
||||
|
||||
/// <summary>
|
||||
/// Use the peak magnitude value of the PointsPerPoint values as the representative value.
|
||||
/// </summary>
|
||||
PeakMagnitude,
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user