6.9 KiB
source_files, generated_at, model, schema_version, sha256
| source_files | generated_at | model | schema_version | sha256 | ||||
|---|---|---|---|---|---|---|---|---|
|
2026-04-16T02:05:03.519331+00:00 | Qwen/Qwen3-Coder-Next-FP8 | 1 | 0f3b00d01b342d9f |
Channel
Documentation: DAS Channel Concepts Module
1. Purpose
This module defines core conceptual types used to represent data acquisition system (DAS) channel behavior and data structures within the DTS Common library. It provides foundational enums (LevelTriggerTypes, TimestampPartTypes) for configuring trigger conditions and interpreting timestamp components, and abstract base classes (Channel<TDataType>, Data<TDatumType>) that serve as the basis for concrete channel and data implementations in the DAS subsystem. The module exists to standardize how channel-level logic (e.g., threshold triggers) and data containers are modeled internally, decoupling high-level application logic (e.g., slice control app) from hardware-specific implementations.
2. Public Interface
Enums
-
LevelTriggerTypes([Flags]enum)
Represents configurable trigger conditions for a channel. Values are bit flags:NONE = 0x00: No trigger condition.OutsideWindow = 0x01: Trigger when value is outside a specified window.InsideWindow = 0x02: Trigger when value is inside a specified window.LessThan = 0x04: Trigger when value is less than a threshold.GreaterThan = 0x08: Trigger when value is greater than a threshold.
Note: Combinations (e.g.,LessThan | GreaterThan) are valid per[Flags]semantics, though semantic validity (e.g.,OutsideWindow+InsideWindow) is not enforced here.
-
TimestampPartTypes([Flags]enum with[Description]attributes)
Represents components of a timestamp, typically used for parsing or reconstructing high-precision timestamps. Values are bit flags:Marker = 1 << 0(value1): A marker bit (description:"Marker").Seconds_High = 1 << 1(value2): High-order bits of seconds (description:"Seconds").Seconds_Low = 1 << 2(value4): Low-order bits of seconds (description:"Seconds").Nanoseconds_High = 1 << 3(value8): High-order bits of nanoseconds (description:"Nanoseconds").Nanoseconds_Low = 1 << 4(value16): Low-order bits of nanoseconds (description:"Nanoseconds").Reserved = 1 << 5(value32): Reserved bit (description:"Reserved").
Note:Seconds_HighandSeconds_Lowshare the same description"Seconds"; similarly for nanosecond components.
Abstract Classes
-
Channel<TDataType>
Abstract base class representing a DAS channel in the slice control app. Inherits fromExceptional(fromDTS.Common.Utilities).- Generic parameter:
TDataTypespecifies the type of data the channel carries (e.g.,double,int, custom struct). - Behavior: No public methods or properties defined in this source; intended as a base for concrete channel implementations (e.g.,
AnalogChannel,DigitalChannel).
- Generic parameter:
-
Data<TDatumType>
Abstract base class representing a list of channel data samples. Inherits fromExceptionalList<TDatumType>(fromDTS.Common.Utilities).- Generic parameter:
TDatumTypespecifies the type of individual data samples (e.g.,double,SampleRecord). - Constructors:
protected Data(): Default constructor.protected Data(int capacity): Constructor with initial list capacity.protected Data(IEnumerable<TDatumType> collection): Constructor that copies elements from a collection.
- Behavior: Provides no additional functionality beyond its base list class; intended as a base for concrete data container implementations (e.g.,
SampleData,EventList).
- Generic parameter:
3. Invariants
-
LevelTriggerTypes:- Values are strictly bit flags (
0x00,0x01,0x02,0x04,0x08). - Valid combinations must be powers-of-two or bitwise ORs thereof.
- No validation is performed on combinations (e.g.,
OutsideWindow | InsideWindowis syntactically valid but semantically ambiguous).
- Values are strictly bit flags (
-
TimestampPartTypes:- Values are strictly bit flags with explicit bit positions (bits 0–5).
Seconds_HighandSeconds_Loware distinct flags despite sharing a description; similarly forNanoseconds_High/Low.- The
Reservedflag is defined but its usage is unspecified.
-
Channel<TDataType>andData<TDatumType>:- Both are abstract; direct instantiation is impossible.
- No invariants are enforced in the provided source (e.g., no validation of
TDatumTypeconstraints).
4. Dependencies
This module depends on:
DTS.Common.Utilities:- Provides
Exceptional(base class forChannel<TDataType>). - Provides
ExceptionalList<T>(base class forData<TDatumType>).
- Provides
System:- Core types (
System.FlagsAttribute,System.ComponentModel.DescriptionAttribute,System.ComponentModel.TypeConverterAttribute).
- Core types (
DTS.Common.Converters:- Provides
EnumDescriptionTypeConverterforTimestampPartTypes.
- Provides
This module is depended on by:
- Inferred consumers:
- Any code referencing
DTS.Common.DAS.Concepts.DAS.Channelnamespace (e.g., concrete channel implementations, trigger logic, timestamp parsers). - The
slice control app(explicitly mentioned inChannel<TDataType>summary) is a direct consumer. - Serialization/deserialization logic likely uses
TimestampPartTypes(givenTypeConverterattribute).
- Any code referencing
5. Gotchas
-
LevelTriggerTypescombinations:OutsideWindowandInsideWindoware mutually exclusive in practice but not enforced. Combining them (OutsideWindow | InsideWindow = 0x03) may lead to undefined behavior in downstream logic.LessThanandGreaterThancan be combined (e.g., for hysteresis), but this is not documented.
-
TimestampPartTypesdescriptions:Seconds_HighandSeconds_Lowshare the same[Description("Seconds")]; UI/tooling relying solely onDescriptionAttributemay not distinguish them.Reservedflag is defined but its purpose is unspecified—avoid using it unless documented elsewhere.
-
Abstract base classes:
Channel<TDataType>andData<TDatumType>provide no implementation details beyond inheritance. Behavior (e.g., thread safety, sample ordering) must be inferred from concrete subclasses.Data<TDatumType>inherits fromExceptionalList<T>, but no information aboutExceptionalList<T>’s behavior (e.g., exception handling semantics) is provided here.
-
No versioning or deprecation markers:
- No attributes (e.g.,
[Obsolete]) or version comments indicate deprecated/legacy usage patterns.
- No attributes (e.g.,
None identified from source alone.