Files
2026-04-17 14:55:32 -04:00

5.8 KiB

source_files, generated_at, model, schema_version, sha256
source_files generated_at model schema_version sha256
Common/DTS.Common.DAS.Concepts/DAS/Channel/LevelTriggerTypes.cs
Common/DTS.Common.DAS.Concepts/DAS/Channel/Channel.cs
Common/DTS.Common.DAS.Concepts/DAS/Channel/TimestampPartTypes.cs
Common/DTS.Common.DAS.Concepts/DAS/Channel/Data.cs
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

  • LevelTriggerTypes is a flags enum; values are designed to be combined via bitwise OR operations. The NONE member has value 0x00 and represents the absence of any trigger condition.
  • TimestampPartTypes is a flags enum using bit-shift notation (1 << n); each value occupies a distinct bit position enabling arbitrary combinations.
  • Channel<TDataType> and Data<TDatumType> are both abstract classes; they cannot be instantiated directly and must be subclassed.
  • Data<TDatumType> constructors are protected, restricting instantiation to derived classes.
  • The OutsideWindow and InsideWindow flags in LevelTriggerTypes are mutually exclusive conceptually (values 0x01 and 0x02), but this is not enforced at the type level.
  • Similarly, LessThan and GreaterThan in LevelTriggerTypes are conceptually mutually exclusive but can technically be combined.

4. Dependencies

This module depends on:

  • DTS.Common.Utilities — Provides base classes Exceptional and ExceptionalList<T> used by Channel<TDataType> and Data<TDatumType> respectively.
  • DTS.Common.Converters — Provides EnumDescriptionTypeConverter used by TimestampPartTypes.
  • System — For FlagsAttribute.
  • System.Collections.Generic — For IEnumerable<T> used in Data<TDatumType> constructor.
  • System.ComponentModel — For TypeConverterAttribute used by TimestampPartTypes.

What depends on this module:

  • Unknown from source alone. The abstract nature of Channel<TDataType> and Data<TDatumType> indicates they are intended to be subclassed by other modules in the DAS system.

5. Gotchas

  • TimestampPartTypes has duplicate Description attributes: Both Seconds_High and Seconds_Low have the description "Seconds", and both Nanoseconds_High and Nanoseconds_Low have the description "Nanoseconds". When displayed via EnumDescriptionTypeConverter, these will appear identically, potentially causing UI confusion.
  • LevelTriggerTypes.NONE vs. no value set: The NONE member is explicitly defined as 0x00. Code checking for "no triggers" should compare against NONE or 0 consistently.
  • Abstract classes with no visible members: Both Channel<TDataType> and Data<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 | InsideWindow or LessThan | GreaterThan). Validation logic, if any, is not present in these source files.