Files
DP44/Common/DTS.Common.DAS.Concepts/.svn/pristine/fc/fc85c22d5f28e3ef48c4dd23b7717d2b8913cbec.svn-base
2026-04-17 14:55:32 -04:00

87 lines
2.3 KiB
Plaintext

/*
* 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,
}
}