10 KiB
source_files, generated_at, model, schema_version, sha256
| source_files | generated_at | model | schema_version | sha256 | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
2026-04-16T11:38:29.974640+00:00 | zai-org/GLM-5-FP8 | 1 | f40aa120b967ad3e |
DAS Concepts Module Documentation
1. Purpose
This module defines the core domain abstractions for a Data Acquisition System (DAS). It provides the foundational type hierarchy for representing DAS channels, their data containers, and various optional capabilities (metadata, calibration, triggering, decimation) that can be attached to channels via interfaces. The module serves as the conceptual model layer, establishing contracts and base types that concrete DAS implementations would extend.
2. Public Interface
Classes
Channel<DataType> (Abstract)
Namespace: DTS.DAS.Concepts.DAS
File: DAS.Channel.cs
public abstract class Channel<DataType> : Exceptional
- Abstract generic base class representing a DAS channel.
- Generic type parameter
DataTypedefines the data type contained by channels of this DAS. - Extends
ExceptionalfromDTS.Utilities.
Data<DatumType> (Abstract)
Namespace: DTS.DAS.Concepts.DAS.Channel
File: DAS.Channel.Data.cs
public abstract class Data<DatumType> : ExceptionalList<DatumType>
- Abstract generic base class representing a list of channel data.
- Extends
ExceptionalList<DatumType>fromDTS.Utilities. - Constructors:
protected Data()— Default constructor.protected Data(int capacity)— Initializes with specified capacity.protected Data(IEnumerable<DatumType> collection)— Initializes from an existing collection.
Id (Sealed)
Namespace: DTS.Common.DAS.Concepts.DAS
File: DAS.Id.cs
public sealed class Id : Exceptional, IComparable<Id>, IEquatable<Id>
- Represents a DAS identifier, encapsulating a string value.
- Constructor:
public Id(string value) - Properties/Methods:
public static implicit operator string(Id id)— Implicit conversion to string.public static implicit operator Id(string id)— Implicit conversion from string.public override bool Equals(object obj)— Equality check; compares strings ordinally case-insensitive.public bool Equals(Id that)— Typed equality check.public int CompareTo(Id that)— IComparable implementation.public override string ToString()— Returns the underlying string value.public override int GetHashCode()— Returns hash of the string value.
- Operators:
==,!=,<,>,<=,>=— All use case-insensitive string comparison.
Interfaces
IIsoCodeAware
Namespace: DTS.DAS.Concepts.DAS.Channel
File: DAS.Channel.IIsoCodeAware.cs
public interface IIsoCodeAware
{
string IsoCode { get; set; }
}
- Defines ISO code awareness with a string property.
ISerialNumberAware
Namespace: DTS.DAS.Concepts.DAS.Channel
File: DAS.Channel.ISerialNumberAware.cs
public interface ISerialNumberAware
{
string SerialNumber { get; set; }
}
- Defines serial number awareness with a string property.
IEngineeringUnitAware
Namespace: DTS.DAS.Concepts.DAS.Channel
File: DAS.Channel.IEngineeringUnitAware.cs
public interface IEngineeringUnitAware
{
string EngineeringUnits { get; set; }
}
- Defines engineering unit awareness with a string property.
IInversionAware
Namespace: DTS.DAS.Concepts.DAS.Channel
File: DAS.Channel.IInversionAware.cs
public interface IInversionAware
{
bool IsInverted { get; set; }
}
- Defines inversion state awareness with a boolean property.
ILinearized
Namespace: DTS.DAS.Concepts.DAS.Channel
File: DAS.Channel.IInversionAware.cs
public interface ILinearized
{
LinearizationFormula LinearizationFormula { get; set; }
}
- Defines linearization formula awareness. (Note:
LinearizationFormulatype is not defined in provided sources.)
IVoltageInsertionAware
Namespace: DTS.DAS.Concepts.DAS.Channel
File: DTS.DAS.Concepts.IVoltageInsertAware.cs
public interface IVoltageInsertionAware
{
double ExpectedGain { get; set; }
double MeasuredGain { get; set; }
}
- Defines shunt-check/voltage insertion awareness with gain properties.
ILevelTriggerable
Namespace: DTS.DAS.Concepts.DAS.Channel
File: DAS.Channel.ILevelTriggerable.cs
public interface ILevelTriggerable
{
double? TriggerBelowThresholdEu { get; set; } // Set to null to deactivate
double? TriggerAboveThresholdEu { get; set; } // Set to null to deactivate
LevelTriggerTypes LevelTriggerType { get; set; }
}
- Defines level trigger capability with nullable threshold properties.
IShuntAware
Namespace: DTS.DAS.Concepts.DAS.Channel
File: DAS.DAS.Concepts.IShuntAware.cs
public interface IShuntAware
{
double MeasuredShuntDeflectionMv { get; set; }
double TargetShuntDeflectionMv { get; set; }
}
- Defines shunt-check awareness with deflection values in millivolts.
ICalSignalAware
Namespace: DTS.DAS.Concepts.DAS.Channel
File: DAS.DAS.Concepts.IShuntAware.cs
public interface ICalSignalAware
{
double MeasuredCalSignalMv { get; set; }
double TargetCalSignalMv { get; set; }
}
- Defines cal-signal awareness with values in millivolts.
IDecimatable<out T>
Namespace: DTS.DAS.Concepts.DAS.Channel
File: DAS.Channel.IDecimatable.cs
public interface IDecimatable<out T>
{
uint PointsPerPoint { get; set; }
DecimationMethod DecimationType { get; set; }
T[] ToDecimatedArray();
T this[long i] { get; } // Returns decimated value at index
}
- Defines decimation capability for DAS channels.
- The indexer returns values from the decimated set based on
PointsPerPointandDecimationType.
Enumerations
DecimationMethod
Namespace: DTS.DAS.Concepts.DAS (in DecimationMethod.cs)
Namespace: DTS.DAS.Concepts.DAS.Channel (in DAS.Channel.IDecimatable.cs)
public enum DecimationMethod
{
Point, // Use PointsPerPoint-th point as representative
Average, // Use average of PointsPerPoint values
PeakMagnitude // Use peak magnitude of PointsPerPoint values
}
- Note: This enum is defined in two files with different namespaces. See Gotchas.
LevelTriggerTypes (Flags)
Namespace: DTS.DAS.Concepts.DAS.Channel
File: DAS.Channel.ILevelTriggerable.cs
[Flags]
public enum LevelTriggerTypes
{
NONE = 0x00,
OutsideWindow = 0x01,
InsideWindow = 0x02,
LessThan = 0x04,
GreaterThan = 0x08
}
- Bitwise combinable flags for level trigger types.
3. Invariants
-
Idimmutability: Thevaluefield inIdisreadonly; once constructed, the underlying string cannot be changed. -
Case-insensitive comparison: All
Idequality and comparison operations useStringComparison.OrdinalIgnoreCase. -
Null handling in
Id: TheIdclass handles null values gracefully inGetHashCode()(returns 0) and comparison operators. -
Abstract instantiation prevention: Both
Channel<DataType>andData<DatumType>are abstract and cannot be instantiated directly. -
Decimation indexer contract: Implementing
IDecimatable<T>implies the indexer returns decimated values, not raw values. -
Trigger deactivation: Setting
TriggerBelowThresholdEuorTriggerAboveThresholdEutonulldeactivates that trigger threshold.
4. Dependencies
This Module Depends On:
| Dependency | Usage |
|---|---|
DTS.Utilities.Exceptional |
Base class for Channel<DataType> and Id |
DTS.Utilities.ExceptionalList<T> |
Base class for Data<DatumType> |
DTS.Common.Utilities |
Referenced in DAS.Id.cs (specific type usage unclear from source) |
System.Collections.Generic.IEnumerable<T> |
Used in Data<DatumType> constructor |
System.IComparable<T> |
Implemented by Id |
System.IEquatable<T> |
Implemented by Id |
System.FlagsAttribute |
Applied to LevelTriggerTypes |
What Depends On This Module:
Cannot be determined from the provided source files alone.
5. Gotchas
-
Duplicate
DecimationMethodenum definition: This enum is defined in two separate files:DecimationMethod.csin namespaceDTS.Common.DAS.Concepts.DASDAS.Channel.IDecimatable.csin namespaceDTS.DAS.Concepts.DAS.Channel
This may cause ambiguity or require explicit namespace qualification.
-
Namespace inconsistency across files:
DAS.Channel.csusesDTS.DAS.Concepts.DASDAS.Id.csandDecimationMethod.csuseDTS.Common.DAS.Concepts.DAS- Interface files use
DTS.DAS.Concepts.DAS.Channel
This suggests possible refactoring history or assembly boundary issues.
-
ILinearizedplacement: TheILinearizedinterface is defined inDAS.Channel.IInversionAware.csrather than its own file, breaking the one-type-per-file pattern used elsewhere. The referencedLinearizationFormulatype is not defined in any provided source. -
Developer comments questioning design: The
Idclass contains comments: "DTM - why does this class exist? it's only encapsulating a string" and "why does this class even exist?" — indicating possible tech debt or design uncertainty. -
XML comment mismatch in
IVoltageInsertionAware: The interface summary mentions "shunt-check awareness" but the properties are namedExpectedGainandMeasuredGain, which may be confusing. -
File naming inconsistency:
DTS.DAS.Concepts.IVoltageInsertAware.csuses a different naming pattern than other interface files (missing theDAS.Channel.prefix and has a typo: "Insert" vs "Insertion" in the interface name).