9.0 KiB
source_files, generated_at, model, schema_version, sha256
| source_files | generated_at | model | schema_version | sha256 | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
2026-04-16T11:38:00.583082+00:00 | zai-org/GLM-5-FP8 | 1 | f6582d95b5debe26 |
Documentation: DTS.DAS.Concepts.Test Module Hierarchy
1. Purpose
This module provides a hierarchical container structure for Data Acquisition System (DAS) test-related concepts, specifically defining configuration enums and types for hardware modules, channels, and sensors. It serves as a static type definitions library for sensor configurations (bridge types, coupling modes, excitation voltages, sensitivity units, zero methods) and recording modes. The architecture uses nested partial classes (Test.Module.Channel.Sensor) as organizational containers—none of which are instantiable—to group related enums and their associated helper methods within the DTS.DAS.Concepts namespace.
2. Public Interface
Container Classes (Non-instantiable)
| Class | Location | Description |
|---|---|---|
Test |
DTS.DAS.Concepts |
Outer partial class container |
Test.Module |
DTS.DAS.Concepts |
Container for DTS generic module concepts; private constructor |
Test.Module.Channel |
DTS.DAS.Concepts |
Container for DTS generic channel concepts; private constructor |
Test.Module.Channel.Sensor |
DTS.DAS.Concepts |
Container for DTS generic sensor concepts; private constructor |
Enums
Test.Module.Channel.Sensor.CouplingModes
IEPE coupling modes.
AC— Description: "AC"DC— Description: "AC/DC"
Test.Module.Channel.Sensor.BridgeType
Sensor bridge configuration types. Values are bitwise flags.
IEPE=1 << 0(1) — Sensor uses IEPE setupQuarterBridge=1 << 1(2) — Quarter bridge setupHalfBridge=1 << 2(4) — Half bridge setupFullBridge=1 << 3(8) — Full bridge setupDigitalInput=1 << 4(16)SQUIB=1 << 5(32)TOMDigital=1 << 6(64)
Test.Module.Channel.Sensor.SensUnits
Sensitivity unit types.
NONE= 0 — No sensitivity units (Polynomial Sensor)mV= 1 — Sensitivity in mV with output at Capacity EUmVperV= 2 — Excitation proportional sensitivity in mV/V at Capacity EUmVperVperEU= 3 — Excitation proportional sensitivity in mV/V/EUmVperEU= 4 — Sensitivity in mV/EU
Test.Module.Channel.Sensor.ZeroMethodType
Zero calculation methods. Explicit values are critical for legacy compatibility.
AverageOverTime= 0 — Calculate electrical zero using average over timeUsePreEventDiagnosticsZero= 1 — Calculate zero using time in pre-eventNone= 2 — Calculate zero using injected value (Absolute Zero)
Test.Module.Channel.Sensor.OriginalZeroMethodType
Legacy version of zero method types (for compatibility, e.g., importing GM ISF).
AverageOverTime— (implicit 0)UsePreCalZero— (implicit 1)None— (implicit 2)
Test.Module.RecordingMode
Recording mode options for modules.
InvalidArmMode= 0 — Invalid modeCircularBuffer= 1 — Circular buffer mode (constant recording, trigger)RecorderMode= 2 — Recorder mode (start, trigger)AutoCircularBufferMode= 4 — Circular buffer with auto-rearmAutoRecorderMode= 5 — Recorder mode with auto-rearmImmediateMode=0x06HighPowerRecorderMode=0x07LowPowerRecorderMode=0x08ContinuousRecorderMode=0x09HybridRecorderMode=0x0AMultiHybridRecorderMode=0x0B
Test.Module.Channel.Sensor.ExcitationVoltageOption
Excitation voltage options with associated magnitude attributes.
Undefined= 1 —[VoltageMagnitude(0.0)]Volt2= 2 —[VoltageMagnitude(2.0)]Volt2_5= 4 —[VoltageMagnitude(2.5)]Volt3= 8 —[VoltageMagnitude(3.0)]Volt5= 16 —[VoltageMagnitude(5.0)]Volt10= 32 —[VoltageMagnitude(10.0)]Volt1= 64 —[VoltageMagnitude(1.0)]
Static Methods
Test.Module.GetRecordingModeFromString(string recordingMode) → RecordingMode
Converts a string representation to its corresponding RecordingMode enum value. Throws Exception if parsing fails or input is invalid.
Test.Module.Channel.Sensor.GetExcitationVoltageMagnitudeFromEnum(ExcitationVoltageOption target) → double
Extracts the numeric voltage magnitude from an ExcitationVoltageOption enum value by decoding the VoltageMagnitudeAttribute. Throws Exception on failure.
Test.Module.Channel.Sensor.GetExcitationVoltageEnumFromMagnitude(double magnitude) → ExcitationVoltageOption
Converts a voltage magnitude to the corresponding ExcitationVoltageOption enum. Throws NotSupportedException if no matching enum exists.
Nested Types
Test.Module.Channel.Sensor.VoltageMagnitudeAttribute
Custom attribute for associating a numeric voltage magnitude with enum fields.
- Property:
Value(double) — Returns the voltage magnitude. - Constructor:
VoltageMagnitudeAttribute(double value)
Test.Module.Channel.Sensor.VoltageMagnitudeAttributeCoder
Inherits from AttributeCoder<ExcitationVoltageOption, VoltageMagnitudeAttribute, double>. Used to encode/decode voltage magnitudes to/from ExcitationVoltageOption enum values.
- Constructor:
VoltageMagnitudeAttributeCoder()— Initializes with extractorattribute => attribute.Value.
3. Invariants
-
Non-instantiability:
Test,Test.Module,Test.Module.Channel, andTest.Module.Channel.Sensorare container classes with private constructors and cannot be instantiated. -
BridgeType bitwise flags:
BridgeTypeenum values are designed as bitwise flags (powers of 2), allowing combination via bitwise OR operations. -
ExcitationVoltageOption enum values are NOT bitwise flags: Despite using powers of 2, these values represent mutually exclusive voltage options; the numeric values appear to be legacy bit positions rather than combinable flags.
-
ZeroMethodType value stability: The explicit integer values (0, 1, 2) for
ZeroMethodTypemust remain unchanged for legacy compatibility with GM ISF imports. -
RecordingMode value gaps:
RecordingModeenum has non-contiguous values (e.g., 3 is missing between 2 and 4); code should not assume sequential ordering.
4. Dependencies
This module depends on:
System— ForException,NotSupportedException,Attributebase class,Enum.ParseSystem.ComponentModel— ForDescriptionAttributeused on enum membersDTS.Utilities— ForAttributeCoder<TEnum, TAttribute, TValue>base class (used byVoltageMagnitudeAttributeCoder)
What depends on this module:
- Unclear from source alone — The source files contain no references to external consumers. The comment referencing "GM ISF" suggests integration with General Motors Import/Export functionality, but this is not visible in the provided sources.
5. Gotchas
-
Legacy ZeroMethodType enum values are critical: The comment in
Test.Module.Channel.Sensor.ZeroMethod.csexplicitly warns: "Lots of legacy compatibility (e.g. importing GM ISF) depends on the order/value of this enum." Modifying these values will break backward compatibility. -
Duplicate zero method enums exist: Both
ZeroMethodTypeandOriginalZeroMethodTypeexist with slightly different member names (UsePreEventDiagnosticsZerovsUsePreCalZero). The relationship between them and which to use for new code is unclear from source alone. -
ExcitationVoltageOption enum values are non-sequential and start at 1: The values (1, 2, 4, 8, 16, 32, 64) appear to be legacy bit positions but are not combinable flags. Code should not cast arbitrary integers to this enum.
-
RecordingMode documentation gaps: Several enum members (
ImmediateMode,HighPowerRecorderMode,LowPowerRecorderMode,ContinuousRecorderMode,HybridRecorderMode,MultiHybridRecorderMode) have XML comments containing only"???", indicating incomplete documentation. -
File header comment mismatch:
Test.Module.Channel.Sensor.SensorUnits.cshas a file header comment referencing"Test.Module.Channel.Sensor.ExcitationVoltage.cs"— appears to be a copy-paste error. -
Sensor class visibility inconsistency: In
Test.Module.Channel.Sensor.cs, theSensorclass is declared assealed partial class Sensor(no explicit accessibility, defaulting toprivate), whereas inTest.Module.Channel.Sensor.Bridge.csit ispublic partial class Sensor. This may cause compilation issues or indicate partial class visibility conflicts.