This commit is contained in:
2026-04-17 14:55:32 -04:00
commit bc3ac1d4c9
18017 changed files with 4371742 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
/*
* DTS.Common.DAS.Concepts.DAS.Channel.cs
*
* Copyright © 2009
* Diversified Technical Systems, Inc.
* All Rights Reserved
*/
using DTS.Common.Utilities;
namespace DTS.Common.DAS.Concepts.DAS
{
/// <summary>
/// Slice control app's internal abstract representation of a DAS channel.
/// </summary>
///
/// <typeparam name="TDataType">
/// The "type" of the data contained by channels of this DAS.
/// </typeparam>
///
public abstract class Channel<TDataType> : Exceptional
{
}
}

View File

@@ -0,0 +1,52 @@
/*
* DTS.Common.DAS.Concepts.DAS.Channel.Data.cs
*
* Copyright © 2009
* Diversified Technical Systems, Inc.
* All Rights Reserved
*/
using System.Collections.Generic;
using DTS.Common.Utilities;
namespace DTS.Common.DAS.Concepts.DAS.Channel
{
/// <summary>
/// Representation of a list of channel data.
/// </summary>
public abstract class Data<TDatumType> : ExceptionalList<TDatumType>
{
/// <summary>
/// Initialize an instance of the DTS.Common.DAS.Concepts.DAS.Channel.Data class.
/// </summary>
protected Data()
{
}
/// <summary>
/// Initialize an instance of the DTS.Common.DAS.Concepts.DAS.Channel.Data class.
/// </summary>
///
/// <param name="capacity">
/// The number of elements that the list can initially store.
/// </param>
///
protected Data(int capacity)
: base(capacity)
{
}
/// <summary>
/// Initialize an instance of the DTS.Common.DAS.Concepts.DAS.Channel.Data class.
/// </summary>
///
/// <param name="collection">
/// The collection whose elements are copied to the new list.
/// </param>
///
protected Data(IEnumerable<TDatumType> collection)
: base(collection)
{
}
}
}

View File

@@ -0,0 +1,14 @@
using System;
namespace DTS.Common.DAS.Concepts.DAS.Channel
{
[Flags]
public enum LevelTriggerTypes
{
NONE = 0x00,
OutsideWindow = 0x01,
InsideWindow = 0x02,
LessThan = 0x04,
GreaterThan = 0x08
}
}

View File

@@ -0,0 +1,24 @@
using DTS.Common.Converters;
using System;
using System.ComponentModel;
namespace DTS.Common.DAS.Concepts.DAS.Channel
{
[TypeConverter(typeof(EnumDescriptionTypeConverter))]
[Flags]
public enum TimestampPartTypes
{
[Description("Marker")]
Marker = 1 <<0 ,
[Description("Seconds")]
Seconds_High = 1 << 1,
[Description("Seconds")]
Seconds_Low = 1 << 2,
[Description("Nanoseconds")]
Nanoseconds_High = 1 << 3,
[Description("Nanoseconds")]
Nanoseconds_Low = 1 << 4,
[Description("Reserved")]
Reserved = 1 << 5
}
}

View File

@@ -0,0 +1,52 @@
/*
* DAS.Channel.Data.cs
*
* Copyright © 2009
* Diversified Technical Systems, Inc.
* All Rights Reserved
*/
using System.Collections.Generic;
using DTS.Utilities;
namespace DTS.DAS.Concepts.DAS.Channel
{
/// <summary>
/// Representation of a list of channel data.
/// </summary>
public abstract class Data<DatumType> : ExceptionalList<DatumType>
{
/// <summary>
/// Initialize an instance of the DTS.DAS.Concepts.DAS.Channel.Data class.
/// </summary>
protected Data( )
{
}
/// <summary>
/// Initialize an instance of the DTS.DAS.Concepts.DAS.Channel.Data class.
/// </summary>
///
/// <param name="capacity">
/// The number of elements that the list can initially store.
/// </param>
///
protected Data( int capacity )
: base( capacity )
{
}
/// <summary>
/// Initialize an instance of the DTS.DAS.Concepts.DAS.Channel.Data class.
/// </summary>
///
/// <param name="collection">
/// The collection whose elements are copied to the new list.
/// </param>
///
protected Data( IEnumerable<DatumType> collection )
: base( collection )
{
}
}
}

View File

@@ -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,
}
}

View File

@@ -0,0 +1,25 @@
/*
* DAS.Channel.IEngineeringUnitAware.cs
*
* Copyright © 2009
* Diversified Technical Systems, Inc.
* All Rights Reserved
*/
namespace DTS.DAS.Concepts.DAS.Channel
{
/// <summary>
/// Definition of the concept of engineering unit awareness.
/// </summary>
public interface IEngineeringUnitAware
{
/// <summary>
/// Get/set this object's engineering unit description <see cref="string"/>.
/// </summary>
string EngineeringUnits
{
get;
set;
}
}
}

View File

@@ -0,0 +1,34 @@
/*
* DAS.Channel.IInversionAware.cs
*
* Copyright © 2009
* Diversified Technical Systems, Inc.
* All Rights Reserved
*/
namespace DTS.DAS.Concepts.DAS.Channel
{
/// <summary>
/// Definition of the concept of inversion awareness.
/// </summary>
public interface IInversionAware
{ ///
/// <summary>
/// Get/set this object's inversion state <see cref="bool"/>.
/// </summary>
///
bool IsInverted
{
get;
set;
}
}
public interface ILinearized
{
LinearizationFormula LinearizationFormula
{
get;
set;
}
}
}

View File

@@ -0,0 +1,25 @@
/*
* DAS.Channel.IIsoCodeAware.cs
*
* Copyright © 2009
* Diversified Technical Systems, Inc.
* All Rights Reserved
*/
namespace DTS.DAS.Concepts.DAS.Channel
{
/// <summary>
/// Definition of the concept of ISO code awareness.
/// </summary>
public interface IIsoCodeAware
{
/// <summary>
/// Get/set this object's IsoCode <see cref="string"/>.
/// </summary>
string IsoCode
{
get;
set;
}
}
}

View File

@@ -0,0 +1,41 @@
/*
* DAS.Channel.ILevelTriggerable.cs
*
* Copyright © 2009
* Diversified Technical Systems, Inc.
* All Rights Reserved
*/
using System;
namespace DTS.DAS.Concepts.DAS.Channel
{
///
/// <summary>
/// Definition of the concept of level triggerability.
/// </summary>
///
public interface ILevelTriggerable
{
/// <summary>
/// Get/set the "trigger below" threshold. Set to "null" to deactivate.
/// </summary>
double? TriggerBelowThresholdEu { get; set; }
/// <summary>
/// Get/set the "trigger above" threshold. Set to "null" to deactivate.
/// </summary>
double? TriggerAboveThresholdEu { get; set; }
LevelTriggerTypes LevelTriggerType { get; set; }
}
[Flags]
public enum LevelTriggerTypes
{
NONE = 0x00,
OutsideWindow = 0x01,
InsideWindow = 0x02,
LessThan = 0x04,
GreaterThan = 0x08
}
}

View File

@@ -0,0 +1,25 @@
/*
* DAS.Channel.ISerialNumberAware.cs
*
* Copyright © 2009
* Diversified Technical Systems, Inc.
* All Rights Reserved
*/
namespace DTS.DAS.Concepts.DAS.Channel
{
/// <summary>
/// Definition of the concept of serial number awareness.
/// </summary>
public interface ISerialNumberAware
{
/// <summary>
/// Get/set this object's serial number <see cref="string"/>.
/// </summary>
string SerialNumber
{
get;
set;
}
}
}

View File

@@ -0,0 +1,24 @@
/*
* DAS.Channel.cs
*
* Copyright © 2009
* Diversified Technical Systems, Inc.
* All Rights Reserved
*/
using DTS.Utilities;
namespace DTS.DAS.Concepts.DAS
{
/// <summary>
/// Slice control app's internal abstract representation of a DAS channel.
/// </summary>
///
/// <typeparam name="DataType">
/// The "type" of the data contained by channels of this DAS.
/// </typeparam>
///
public abstract class Channel<DataType> : Exceptional
{
}
}

View File

@@ -0,0 +1,57 @@
/*
* DAS.Channel.IShuntAware.cs
*
* Copyright © 2009
* Diversified Technical Systems, Inc.
* All Rights Reserved
*/
namespace DTS.DAS.Concepts.DAS.Channel
{
/// <summary>
/// Definition of the concept of shunt-check awareness.
/// </summary>
public interface IShuntAware
{
/// <summary>
/// Get/set this object's <see cref="double"/> measured shunt deflection value.
/// </summary>
double MeasuredShuntDeflectionMv
{
get;
set;
}
/// <summary>
/// Get/set this object's <see cref="double"/> target shunt deflection value.
/// </summary>
double TargetShuntDeflectionMv
{
get;
set;
}
}
/// <summary>
/// Definition of the concept of calsignal-check awareness.
/// </summary>
public interface ICalSignalAware
{
/// <summary>
/// Get/set this object's <see cref="double"/> measured shunt deflection value.
/// </summary>
double MeasuredCalSignalMv
{
get;
set;
}
/// <summary>
/// Get/set this object's <see cref="double"/> target shunt deflection value.
/// </summary>
double TargetCalSignalMv
{
get;
set;
}
}
}

View File

@@ -0,0 +1,171 @@
/*
* DAS.Id.cs
* DTM - why does this class exist? it's only encapsulating a string
* Copyright © 2009
* Diversified Technical Systems, Inc.
* All Rights Reserved
*/
using System;
using DTS.Common.Utilities;
namespace DTS.Common.DAS.Concepts.DAS
{
/// <summary>
/// Representation of the DTS.Common.DAS.Concepts.DAS.Id type.
/// why does this class even exist?
/// </summary>
public sealed class Id : Exceptional, IComparable<Id>, IEquatable<Id>
{
/// <summary>
/// The Thing In Itself.
/// </summary>
private readonly string value;
/// <summary>
/// Initialize an instance of the DTS.Common.DAS.Concepts.DAS.Id class.
/// </summary>
public Id(string value)
{
this.value = value;
}
/// <summary>
/// Allow DTS.Common.DAS.Concepts.DAS.Ids to be implicitly converted to strings.
/// </summary>
///
/// <param name="id">
/// The <see cref="Id"/> id to be stringified.
/// </param>
///
/// <returns>
/// The <see cref="string"/> value of this DTS.Common.DAS.Concepts.DAS.Id.
/// </returns>
///
public static implicit operator string(Id id)
{
return id.ToString();
}
/// <summary>
/// Allow strings to be implicitly converted to DTS.Slice.Control.DAS.Ids.
/// </summary>
///
/// <param name="id">
/// The <see cref="string"/> value to be DTS.Slice.Control.DAS.Id-ified.
/// </param>
///
/// <returns>
/// The <see cref="Id"/> equivalent to the specified string.
/// </returns>
///
public static implicit operator Id(string id)
{
return new Id(id);
}
public override bool Equals(object obj)
{
if (obj is Id that) { return Equals(that); }
return string.Compare(ToString(), obj.ToString(), StringComparison.OrdinalIgnoreCase) == 0;
}
/// <summary>
/// Determine whether this object instance and the specified object instance are equal.
/// </summary>
///
/// <param name="that">
/// The <see cref="Id"/> to be compared to this object instance.
/// </param>
///
/// <returns>
/// <see cref="bool"/> true if this object is equal to the specified object; false otherwise.
/// </returns>
///
public bool Equals(Id that)
{
if (value == that.value) { return true; }
if (null == value) { return false; }
if (null == that.value) { return false; }
return value.Equals(that.value, StringComparison.OrdinalIgnoreCase);
}
/// <summary>
/// Generate a comparison value between this object and another of it's type.
/// </summary>
///
/// <param name="that">
/// The <see cref="Id"/> to which this one is to be compared.
/// </param>
///
/// <returns>
/// An <see cref="int"/> value expressing the "similarity" between this object
/// and the one specified.
/// </returns>
///
public int CompareTo(Id that)
{
return Compare(this, that);
}
/// <summary>
/// Generate a string representation of this class.
/// </summary>
///
/// <returns>
/// The <see cref="string"/> representation of this object.
/// </returns>
///
public override string ToString()
{
return value;
}
/// <summary>
/// Generate a hash code for this instance.
/// </summary>
///
/// <returns>
/// The <see cref="int"/> hash code for this instance.
/// </returns>
///
public override int GetHashCode()
{
return value?.GetHashCode() ?? 0;
}
public static bool operator ==(Id left, Id right)
{
if (ReferenceEquals(left, null))
{
return ReferenceEquals(right, null);
}
return left.Equals(right);
}
public static int Compare(Id left, Id right)
{
if (left == right) { return 0; }
if (null == right) { return 1; }
if (null == left) { return -1; }
return string.Compare(left.ToString(), right.ToString(), StringComparison.OrdinalIgnoreCase);
}
public static bool operator >= (Id left, Id right)
{
return Compare(left, right) >= 0;
}
public static bool operator >(Id left, Id right)
{
return Compare(left, right) > 0;
}
public static bool operator <= (Id left, Id right)
{
return Compare(left, right) <= 0;
}
public static bool operator <(Id left, Id right)
{
return Compare(left, right) < 0;
}
public static bool operator !=(Id left, Id right)
{
return !(left == right);
}
}
}

View File

@@ -0,0 +1,35 @@
/*
* DAS.Channel.IVoltageInsertionAware.cs
*
* Copyright © 2012
* Diversified Technical Systems, Inc.
* All Rights Reserved
*/
namespace DTS.DAS.Concepts.DAS.Channel
{
/// <summary>
/// Definition of the concept of shunt-check awareness.
/// </summary>
public interface IVoltageInsertionAware
{
/// <summary>
/// Get/set this object's <see cref="double"/> measured shunt deflection value.
/// </summary>
double ExpectedGain
{
get;
set;
}
/// <summary>
/// Get/set this object's <see cref="double"/> target shunt deflection value.
/// </summary>
double MeasuredGain
{
get;
set;
}
}
}

View File

@@ -0,0 +1,23 @@
namespace DTS.Common.DAS.Concepts.DAS
{
/// <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,
}
}