5.8 KiB
source_files, generated_at, model, schema_version, sha256
| source_files | generated_at | model | schema_version | sha256 | ||||
|---|---|---|---|---|---|---|---|---|
|
2026-04-16T11:40:17.653590+00:00 | zai-org/GLM-5-FP8 | 1 | 0f3b00d01b342d9f |
Documentation: DTS.Common.DAS.Concepts.DAS.Channel
1. Purpose
This module provides core domain abstractions for a Data Acquisition System (DAS). It defines the foundational types for representing DAS channels, their data payloads, and associated metadata enums for trigger conditions and timestamp parsing. The module serves as the conceptual layer for the "Slice control app's internal abstract representation" of DAS hardware channels, enabling type-safe channel definitions via generics and supporting bitwise flag operations for trigger and timestamp configurations.
2. Public Interface
Channel<TDataType> (abstract class)
Namespace: DTS.Common.DAS.Concepts.DAS
Signature: public abstract class Channel<TDataType> : Exceptional
Abstract base class representing a DAS channel. Generic parameter TDataType defines the data type contained by channels of this DAS. Inherits from Exceptional (from DTS.Common.Utilities). No public members are defined in this source file.
Data<TDatumType> (abstract class)
Namespace: DTS.Common.DAS.Concepts.DAS.Channel
Signature: public abstract class Data<TDatumType> : ExceptionalList<TDatumType>
Abstract base class representing a list of channel data. Inherits from ExceptionalList<TDatumType> (from DTS.Common.Utilities).
Constructors:
| Signature | Description |
|---|---|
protected Data() |
Default constructor. |
protected Data(int capacity) |
Initializes with specified initial capacity. |
protected Data(IEnumerable<TDatumType> collection) |
Initializes with elements copied from the provided collection. |
LevelTriggerTypes (flags enum)
Namespace: DTS.Common.DAS.Concepts.DAS.Channel
Signature: [Flags] public enum LevelTriggerTypes
Bitwise flags enum defining trigger conditions for level monitoring.
| Member | Value | Hex |
|---|---|---|
NONE |
0 | 0x00 |
OutsideWindow |
1 | 0x01 |
InsideWindow |
2 | 0x02 |
LessThan |
4 | 0x04 |
GreaterThan |
8 | 0x08 |
TimestampPartTypes (flags enum)
Namespace: DTS.Common.DAS.Concepts.DAS.Channel
Signature: [Flags] [TypeConverter(typeof(EnumDescriptionTypeConverter))] public enum TimestampPartTypes
Bitwise flags enum defining components of a timestamp structure. Decorated with EnumDescriptionTypeConverter for UI/data-binding scenarios.
| Member | Value | Description Attribute |
|---|---|---|
Marker |
1 << 0 (1) |
"Marker" |
Seconds_High |
1 << 1 (2) |
"Seconds" |
Seconds_Low |
1 << 2 (4) |
"Seconds" |
Nanoseconds_High |
1 << 3 (8) |
"Nanoseconds" |
Nanoseconds_Low |
1 << 4 (16) |
"Nanoseconds" |
Reserved |
1 << 5 (32) |
"Reserved" |
3. Invariants
LevelTriggerTypesis a flags enum; values are designed to be combined via bitwise OR operations. TheNONEmember has value0x00and represents the absence of any trigger condition.TimestampPartTypesis a flags enum using bit-shift notation (1 << n); each value occupies a distinct bit position enabling arbitrary combinations.Channel<TDataType>andData<TDatumType>are both abstract classes; they cannot be instantiated directly and must be subclassed.Data<TDatumType>constructors areprotected, restricting instantiation to derived classes.- The
OutsideWindowandInsideWindowflags inLevelTriggerTypesare mutually exclusive conceptually (values0x01and0x02), but this is not enforced at the type level. - Similarly,
LessThanandGreaterThaninLevelTriggerTypesare conceptually mutually exclusive but can technically be combined.
4. Dependencies
This module depends on:
DTS.Common.Utilities— Provides base classesExceptionalandExceptionalList<T>used byChannel<TDataType>andData<TDatumType>respectively.DTS.Common.Converters— ProvidesEnumDescriptionTypeConverterused byTimestampPartTypes.System— ForFlagsAttribute.System.Collections.Generic— ForIEnumerable<T>used inData<TDatumType>constructor.System.ComponentModel— ForTypeConverterAttributeused byTimestampPartTypes.
What depends on this module:
- Unknown from source alone. The abstract nature of
Channel<TDataType>andData<TDatumType>indicates they are intended to be subclassed by other modules in the DAS system.
5. Gotchas
TimestampPartTypeshas duplicate Description attributes: BothSeconds_HighandSeconds_Lowhave the description "Seconds", and bothNanoseconds_HighandNanoseconds_Lowhave the description "Nanoseconds". When displayed viaEnumDescriptionTypeConverter, these will appear identically, potentially causing UI confusion.LevelTriggerTypes.NONEvs. no value set: TheNONEmember is explicitly defined as0x00. Code checking for "no triggers" should compare againstNONEor0consistently.- Abstract classes with no visible members: Both
Channel<TDataType>andData<TDatumType>appear to be empty shells in this source, suggesting their behavior is defined entirely in derived classes or partial definitions not shown here. - Bitwise flag combinations: The flags design allows semantically invalid combinations (e.g.,
OutsideWindow | InsideWindoworLessThan | GreaterThan). Validation logic, if any, is not present in these source files.