This commit is contained in:
2026-04-17 14:55:32 -04:00
commit bc3ac1d4c9
18017 changed files with 4371742 additions and 0 deletions

View File

@@ -0,0 +1,66 @@
---
source_files:
- Common/DTS.CommonCore/Enums/Channels/ChannelCodeType.cs
generated_at: "2026-04-16T02:44:43.138694+00:00"
model: "Qwen/Qwen3-Coder-Next-FP8"
schema_version: 1
sha256: "de8650eabd4f19a6"
---
# Channels
### **Purpose**
This module defines shared enumerations and constants related to channel code types within the DTS system. It standardizes the representation and validation of channel codes—specifically distinguishing between standardized ISO 13499-compliant codes and custom user-defined codes—ensuring consistency across modules that handle channel identification and data exchange.
---
### **Public Interface**
All members are defined in the nested `ChannelCodeType` enum and constant fields inside the `ChannelEnumsAndConstants` class:
- **`ChannelEnumsAndConstants.ChannelCodeType`**
*Type:* `enum`
*Values:*
- `ISO` — Represents an ISO 13499-compliant channel code.
- `User` — Represents a user-defined channel code.
- **`ChannelEnumsAndConstants.IsoCodeTypeString`**
*Type:* `const string`
*Value:* `"ISO 13499"`
*Purpose:* Human-readable identifier for the ISO channel code type; likely used for serialization, logging, or UI display.
- **`ChannelEnumsAndConstants.UserCodeTypeString`**
*Type:* `const string`
*Value:* `"User"`
*Purpose:* Human-readable identifier for the user-defined channel code type.
- **`ChannelEnumsAndConstants.ISO_CODE_LENGTH`**
*Type:* `const int`
*Value:* `16`
*Purpose:* Expected fixed length (in characters) of an ISO-compliant channel code string.
- **`ChannelEnumsAndConstants.USER_CODE_LENGTH`**
*Type:* `const int`
*Value:* `50`
*Purpose:* Maximum allowed length (in characters) of a user-defined channel code string.
---
### **Invariants**
- A channel code string of type `ISO` **must** be exactly `16` characters long (`ISO_CODE_LENGTH`).
- A channel code string of type `User` **must not exceed** `50` characters (`USER_CODE_LENGTH`).
- The enum `ChannelCodeType` has only two valid values: `ISO` and `User`. No other states are defined.
- The string constants `IsoCodeTypeString` and `UserCodeTypeString` are fixed and must not be modified at runtime.
---
### **Dependencies**
- **Internal:** Depends only on core .NET types (`string`, `int`, `enum`). No external NuGet or third-party dependencies.
- **Consumers:** Likely referenced by modules handling channel configuration, message parsing, or data validation (e.g., serialization/deserialization logic, UI components, or database mapping layers). The namespace `DTS.Common.Enums.Channels` suggests it is part of a shared `DTS.CommonCore` library used across multiple components.
---
### **Gotchas**
- The `ChannelCodeType` enum is defined *inside* a class (`ChannelEnumsAndConstants`) rather than as a top-level type—this is unconventional for enums and may cause confusion (e.g., `ChannelEnumsAndConstants.ChannelCodeType` vs. `ChannelCodeType`).
- No validation logic is provided in this module; consumers must enforce length constraints (`ISO_CODE_LENGTH`, `USER_CODE_LENGTH`) themselves.
- The `IsoCodeTypeString` and `UserCodeTypeString` values are hardcoded strings; mismatched usage (e.g., `"ISO"` instead of `"ISO 13499"`) could cause interoperability issues if external systems expect exact string matches.
- No documentation is provided on how `ChannelCodeType` maps to actual channel code strings (e.g., encoding scheme for ISO codes).

View File

@@ -0,0 +1,47 @@
---
source_files:
- Common/DTS.CommonCore/Enums/Communication/CommunicationConstantsAndEnums.cs
generated_at: "2026-04-16T02:44:19.261971+00:00"
model: "Qwen/Qwen3-Coder-Next-FP8"
schema_version: 1
sha256: "fb3a2f656d5788aa"
---
# Communication
## 1. Purpose
This module defines core enumerations and delegates used for representing the outcomes and callback mechanisms of communication operations within the DTS system. It serves as a shared contract between communication implementations (e.g., network, serial, or custom transport layers) and higher-level consumers, enabling consistent reporting of connection, disconnection, send, receive, and cancellation states. The `CommunicationResult` enum standardizes status reporting, while the `CommunicationCallback` delegate provides a standardized way to handle asynchronous or event-driven communication reports.
## 2. Public Interface
### `CommunicationResult` enum
A set of named constants representing the possible outcomes of communication operations:
- `ConnectOK`, `ConnectFailed`, `ConnectTimeout` — outcomes for connection attempts
- `DisconnectOK`, `DisconnectFailed`, `DisconnectTimeout` — outcomes for disconnection attempts
- `SendOK`, `SendFailed`, `SendTimeout` — outcomes for send operations
- `ReceiveOK`, `ReceiveFailed`, `ReceiveTimeout` — outcomes for receive operations
- `Canceled` — indicates an operation was canceled (e.g., via cancellation token)
### `CommunicationCallback` delegate
```csharp
public delegate bool CommunicationCallback(ICommunicationReport report);
```
A callback function type used to process `ICommunicationReport` instances. It returns `true` to indicate the callback handled the report successfully or wishes to continue processing, and `false` to signal termination or failure. The actual behavior of the callback (e.g., logging, UI update, state transition) is implementation-defined, but the delegate contract requires a boolean return value.
## 3. Invariants
- The `CommunicationResult` enum values are exhaustive for the categories of operations: connect, disconnect, send, receive, and cancellation. No other result codes are defined in this module.
- The `CommunicationCallback` delegate must accept an `ICommunicationReport` parameter (from `DTS.Common.Interface.Communication`) and return a `bool`. The semantics of the return value are *not* defined in this file and must be inferred from usage or documentation of the calling code.
- No runtime validation or enforcement is performed on the enum values or callback invocations within this module — it is purely a definition layer.
## 4. Dependencies
- **Depends on**:
- `DTS.Common.Interface.Communication` namespace (specifically for `ICommunicationReport` used in `CommunicationCallback`).
- **Used by**:
- Any module implementing or consuming communication operations (e.g., transport layer implementations, communication managers, UI components).
- The `ICommunicationReport` interface (from the `DTS.Common.Interface.Communication` namespace) must be defined elsewhere; this module assumes its existence and contract.
## 5. Gotchas
- The `CommunicationCallback` return value semantics (`true`/`false`) are not specified in this file — callers and implementers must coordinate on interpretation (e.g., `false` may mean “stop processing” or “retry failed” depending on context).
- The `Canceled` result is distinct from timeout/failure modes but does not imply *why* it was canceled (e.g., user action, timeout, resource exhaustion).
- No constants (e.g., timeout durations, buffer sizes) are defined in this file despite the class name `CommunicationConstantsAndEnums` — only the `CommunicationResult` enum and `CommunicationCallback` delegate are present.
- None identified from source alone.

View File

@@ -0,0 +1,196 @@
---
source_files:
- Common/DTS.CommonCore/Enums/DASFactory/WakeupTriggers.cs
- Common/DTS.CommonCore/Enums/DASFactory/UseCasesTSRAIR.cs
- Common/DTS.CommonCore/Enums/DASFactory/S6DBDiagnosticChannelList.cs
- Common/DTS.CommonCore/Enums/DASFactory/ConstantsAndEnums.cs
- Common/DTS.CommonCore/Enums/DASFactory/DFConstantsAndEnums.cs
generated_at: "2026-04-16T02:44:53.233679+00:00"
model: "Qwen/Qwen3-Coder-Next-FP8"
schema_version: 1
sha256: "79cc4aa25a4a023c"
---
# DASFactory Enums Module Documentation
## 1. Purpose
This module (`DTS.Common.Enums.DASFactory`) defines core enumerations, constants, and extension methods used across the DAS (Data Acquisition System) Factory product line. It serves as a centralized source of truth for device type identifiers, recording modes, channel configurations, diagnostic channels, and protocol-related flags. These definitions enable consistent behavior across modules handling device communication, configuration, diagnostics, and data acquisition workflows. The module supports legacy and modern device families (e.g., SLICE, TSR, TSR AIR, S6DB, TDAS) and includes mappings between internal and external enum representations.
## 2. Public Interface
### Enumerations
#### `WakeupTriggers`
- **Definition**: `public enum WakeupTriggers`
- **Values**:
- `MotionDetect`: Triggered by motion detection.
- **Attributes**: Uses `EnumDescriptionTypeConverter` for localized descriptions.
#### `UseCasesTSRAIR`
- **Definition**: `public enum UseCasesTSRAIR : byte`
- **Values**:
- `AEROSPACE`
- `AEROSPACE_with_motion`
- `VIBRATION`
- `SCHEDULED`
- `INTERVAL`
- `STREAMING`
- `PRETRIGGER_TEST`
- **Attributes**: Uses `EnumDescriptionTypeConverter`.
#### `S6DBDiagnosticChannelList`
- **Definition**: `public enum S6DBDiagnosticChannelList`
- **Values**:
- `InputVoltage = 0`
- `BackupVoltage = 1`
- `TemperatureC = 2`
- `BatterySoc = 3`
- `DiagInputVoltage = 100`
- `DiagMcuTemperature = 101`
- `DiagChargerPower = 102`
- `DiagChargerInputCurrent = 103`
- `DiagEnv_1_Temperature = 104`
- `DiagEnv_1_Humidity = 105`
- `DiagEnv_2_Temperature = 106`
- `DiagEnv_2_Humidity = 107`
- `DiagEnv_3_Temperature = 108`
- `DiagEnv_3_Humidity = 109`
- `DiagEnv_4_Temperature = 110`
- `DiagEnv_4_Humidity = 111`
- `DiagEnv_5_Temperature = 112`
- `DiagEnv_5_Humidity = 113`
- `DiagBatterySoc = 114`
- `DiagBatteryPackVoltage = 115`
- `DiagBatteryPackCurrent = 116`
- `DiagBatteryFgTemperature = 117`
- `DiagBatteryThermistor1Temperature = 118`
- `DiagBatteryThermistor2Temperature = 119`
- **Note**: Values 03 are legacy base channels; 100+ are additional diagnostic channels.
#### `ConstantsAndEnums.DASType`
- **Definition**: `public enum DASType` (nested in `ConstantsAndEnums`)
- **Values**: Includes `NONE`, `HID_SLICE`, `WINUSB_SLICE`, `G5`, `SIM`, `TOM`, `DIM`, `TSR`, `HEADS`, `MINIDAU`, `ETHERNET_SLICE`, `ETHERNET_RIBEYE`, `SLICE_DB`, `TSR2`, `ETHERNET_TDAS`, `CDCUSB_SLICE`, `ETHERNET_SLICE2`, `WINUSB_SLICE1_5`, `ETHERNET_SLICE1_5`, `ETHERNET_SLICE6`, `ETHERNET_SLICE6AIR`, `WINUSB_SLICE6`, `WINUSB_SLICE6AIR`, `ETHERNET_SLICE6DB`, `SERIAL_TDAS`, and others.
- **Purpose**: Identifies device hardware type.
#### `ConstantsAndEnums.VoltageStatusColor`
- **Definition**: `public enum VoltageStatusColor`
- **Values**: `Green`, `Red`, `Yellow`, `Off`
#### Constants in `ConstantsAndEnums`
- `EVENT_NUMBER_PRETEST_DIAG = -1`
- `EVENT_NUMBER_POSTTEST_DIAG = -2`
- `EVENT_NUMBER_MEASURE_BRIDGE = -3`
#### `DFConstantsAndEnums` Static Properties & Methods
- `AlwaysShowUnsignedADC`: `bool` (default `false`)
- `OneShotWaitTimeMs`: `int` (default `3000`)
- `TemperatureLogTimeFormat`: `string` (default `"MM-dd-yyyy HH:mm:ss"`)
- `TemperatureLogValueFormat`: `string` (default `"N2"`)
- `TSR_AIR_HIGH_G_CUTOFF_RATE_SPS`: `int` (value `500`)
- `TSRAIR_ValidSampleRates`: `int[]` (values: `[100, 500, 1000, 5000, 10000, 15000, 20000]`)
- `UseDropDownForTestObjectAndPosition`: `bool` (default `false`)
- `AllowEnableFaultCheckingOnS6DB`: `bool` (default `true`)
- `TDASRemoveOffsetWeighting`: `double` (default `1.0`)
- `TDASShuntEmulationWeighting`: `double` (default `0.5`)
- `ExpectedMaxTDASDiagnosticRunTimePerChannelMS`: `int` (default `8000`)
- `IsSLICE6ERFirmware(string firmwareVersion)`: `bool` — Returns `true` if firmware version ends with `"G1"` or `"G3"` (indicating EDR firmware).
- `UseUDPForAutoArmATDMonitor`: `bool` (default `false`)
- `ArmStateIdle = 0`: `byte`
- `MADEUPEVENT_TESTID = "__MadeUp__"`: `string`
- `NO_CONFIGURATION = "NO_CONFIGURATION"`: `string`
- `TOMSWITCH_ARMED = "TOMSAFETY_ARMED"`: `string`
- `SAFETYSWITCH_EXCEPTION = "SAFETYSWITCH_EXCEPTION"`: `string`
- `CHANNEL_SEPARATOR = "_"`: `string`
- `SERIAL_SEPARATOR = "-"`: `string`
- Serial append strings (e.g., `LOWG_SERIAL_APPEND = "Low g"`, `HIGHG_SERIAL_APPEND = "High g"`, etc.)
- Channel index constants: `CHANNEL_X = 0`, `CHANNEL_Y = 1`, `CHANNEL_Z = 2`, `CHANNEL_TEMPERATURE = 0`, `CHANNEL_HUMIDITY = 1`, `CHANNEL_PRESSURE = 2`
- User channel names: `USER_CHANNEL_NAME_LOWG`, `USER_CHANNEL_NAME_HIGHG`, etc.
- `ExtraCommunicationLogging`: `bool` (default `false`)
- `ReceiveBufferSizeBytes`: `int` (default `65536`)
- `SendBufferSizeBytes`: `int` (default `65536`)
- `RemoteKeepAliveSeconds`: `uint` (default `60`)
- `RemoteKeepAliveRetryIntervalSeconds`: `uint` (default `5`)
- `LocalKeepAliveTimeOutMS`: `uint` (default `5000`)
- `LocalKeepAliveRetryIntervalMS`: `uint` (default `1000`)
- `HeartbeatAsyncConnectTimeoutMS`: `int` (default `10000`)
- `WaitTimeBetweenUnitConnects`: `int` (default `100`)
- `DontDoSDL`: `bool` (default `false`)
- `SCHEDULE_AHEAD_IN_MINUTES = 2`: `int`
- High-g sensor indices: `High_g_Linear_1_Index = 3`, `High_g_Linear_2_Index = 4`, `High_g_Linear_3_Index = 5`
- `RealtimeUDPAddress`: `string` (default `"UDP://239.1.2.10:8400"`)
- `FIRST_USE_DATE_NOT_SET`: `DateTime` (value: `SqlDateTime.MinValue`)
#### `DFConstantsAndEnums` Enumerations
- `FaultFlags` ([Flags] enum): Bitwise flags for legacy SLICE 1 ARM status faults (e.g., `IncomingStatusLineDropped = 1 << 0`, `ADCBufferOverrun = 1 << 1`, ..., `NO_DATA = 1 << 13`)
- `ExcitationStatus`: `Off`, `On`, `Unknown`
- `T0CorrectionStatus`: `ScanningForPowerLoss`, `ScanningForPeaksAndTroughs`, `SettingAttributes`
- `ModuleType`: Lists module types (e.g., `SliceBridge`, `G5Analog`, `EmbeddedLinearAccelHighG`, `UART`, `StreamOut`, etc.)
- `RecordingMode`: Full list of recording modes (e.g., `CircularBuffer`, `RecorderMode`, `AutoActiveMode`, `Aerospace`, `Scheduled`, `Streaming`, `RAMActive`, `a14_NormalRecorderAndStreamSubSampleMode`, etc.) with descriptions and hex values.
- `TiltAxes`: 48-axis orientation configurations for Slice 6 Bubble level tilt feature (e.g., `XYZ = 0`, `XYIZ = 6`, `IXYIZ = 30`, etc.)
- `ConfigMode`: Channel configuration modes (`Disabled`, `Normal`, `DummyArm`, `Clock`, `UART`, `StreamOut`, `StreamIn`)
- `MultiCastDeviceClasses`: [Flags] enum for device classes in UDP broadcast (e.g., `Slice6 = 1 << 0`, `SDB = 1 << 1`, ..., `NextOne = 1 << 10`, `Any = 0xFFFF`)
- `ProtocolLimitedCommands`: List of commands limited by protocol version (e.g., `DiangosShuntDAC`, `Arm`, `Diagnostics`, `SetUARTSettings`, etc.)
- `CommandStatus`: Comprehensive set of command status codes (e.g., `StatusNoError = 0x00`, `StatusInvalidParameter`, ..., `StatusNoResponse`)
- `QATSExtendedFault`: [Flags] enum for extended fault reporting (e.g., `EXT_FAULT_TYPE_STATUSLINE_PORT_1_DROPPED`, `FAULT_FLAG__DEVICE__KX134`, `EXT_FAULT_TYPE_STATUSLINE_SUPER_CAP`, etc.)
- `TMAT_TEMPLATES`: TMAT template identifiers (e.g., `S6Air_PCM`, `TSRAIR_ANALOG`)
#### Extension Methods in `RecordingModeExtensions`
- `UsesTestLength(RecordingModes mode)`: Returns `true` if mode uses test length (e.g., `Recorder`, `Scheduled`, `Interval`)
- `IsTSRAIROnlyRecordingMode(RecordingModes mode)`: Returns `true` for `Active`, `MultipleEventActive`, `Scheduled`, `Interval`
- `IsTSRAirRecordingMode(RecordingModes mode)`: Returns `true` for `Active`, `MultipleEventActive`, `Scheduled`, `Interval`, `Streaming`
- `SupportsT0Correction(DFConstantsAndEnums.RecordingMode mode)`: Returns `true` for circular buffer or hybrid recorder modes
- `ToRecordingModesAlt(DFConstantsAndEnums.RecordingMode mode)`: Maps to `RecordingModes` via alternate lookup
- `ToRecordingModes(DFConstantsAndEnums.RecordingMode mode)`: Maps to `RecordingModes` (fallback: `CircularBuffer`)
- `FromRecordingModes(this RecordingModes mode)`: Maps `RecordingModes``DFConstantsAndEnums.RecordingMode`
- `IsACircularBufferMode(RecordingModes/DFConstantsAndEnums.RecordingMode mode)`: Returns `true` for circular buffer variants
- `DoesModeSupportAutoArm(RecordingModes mode)`: Returns `false` for `Active`, `MultipleEventActive`, `Scheduled`, `Interval`, `Streaming`
- `IsARecorderMode(RecordingModes/DFConstantsAndEnums.RecordingMode mode)`: Returns `true` for recorder variants
- `IsAHybridRecorderMode(RecordingModes/DFConstantsAndEnums.RecordingMode mode)`: Returns `true` for hybrid recorder variants
- `IsAMultipleEvent(RecordingModes mode)`: Returns `true` for multiple-event modes
- `CanBeAMultipleEvent(RecordingModes mode)`: Returns `true` if mode supports multiple-event capability
- `IsAStreamMode(RecordingModes/DFConstantsAndEnums.RecordingMode mode)`: Returns `true` for streaming modes
- `TestWillBeStreaming(RecordingModes recordingMode, bool streaming)`: Returns `true` if mode is streaming or `streaming` flag is set
- `IsAUartMode(RecordingModes/DFConstantsAndEnums.RecordingMode mode)`: Returns `true` for UART-enabled modes
- `IsAnOpenEndedRecordingMode(RecordingModes/DFConstantsAndEnums.RecordingMode mode)`: Returns `true` for open-ended modes (e.g., `ContinuousRecorder`, `RecordOnBoot`)
## 3. Invariants
- **Enum Values Are Fixed**: All enum values are explicitly assigned and must not be changed without coordination across firmware and host software.
- **`DASType` Duplication**: `DASType` is defined in both `ConstantsAndEnums` and `DFConstantsAndEnums`. The latter is the canonical version (includes more entries like `ETHERNET_TSR_AIR`, `WINUSB_TSR_AIR`, etc.).
- **`RecordingMode` Value Mapping**: The mapping between `DFConstantsAndEnums.RecordingMode` and `RecordingModes` is bi-directional and must be kept consistent. Extension methods (`ToRecordingModes`, `FromRecordingModes`) enforce this.
- **`RecordingModes` Values Are Not Reused**: Each `RecordingModes` value maps to exactly one `DFConstantsAndEnums.RecordingMode` and vice versa.
- **`WakeupTriggers` Has One Value**: Only `MotionDetect` is defined; no other triggers are supported.
- **`S6DBDiagnosticChannelList` Channel Ranges**: Base diagnostic channels (03) and extended channels (100+) are disjoint and non-overlapping.
- **`FaultFlags` Is a Flags Enum**: Values are powers of two and combinable via bitwise OR.
## 4. Dependencies
### Dependencies *of* this module:
- **`DTS.Common.Base.Classes`**: Used for base classes (imported but not directly used in provided enums).
- **`DTS.Common.Converters`**: Required for `EnumDescriptionTypeConverter` (used in `WakeupTriggers` and `UseCasesTSRAIR`).
- **`System.ComponentModel`**: Required for `[Description]` attribute.
- **`System`**: Core types (`bool`, `int`, `string`, `DateTime`, `HashSet`, `Dictionary`, etc.)
### Dependencies *on* this module:
- **`DASFactory` modules**: All modules that handle device configuration, diagnostics, or communication rely on these enums for:
- Device type identification (`DASType`)
- Recording mode selection (`RecordingMode`)
- Channel configuration (`ConfigMode`)
- Diagnostic channel addressing (`S6DBDiagnosticChannelList`)
- Protocol command/status handling (`CommandStatus`, `ProtocolLimitedCommands`)
- TSR AIR-specific behavior (`UseCasesTSRAIR`, `TSR_AIR_HIGH_G_CUTOFF_RATE_SPS`, `TSRAIR_ValidSampleRates`)
## 5. Gotchas
- **`DASType` Duplication**: `DASType` is defined in both `ConstantsAndEnums` and `DFConstantsAndEnums`. The latter is the extended version and should be preferred.
- **`RecordingMode` Value Conflicts**: Some `DFConstantsAndEnums.RecordingMode` values map to the same `RecordingModes` value (e.g., `AutoActiveMode` and `Aerospace` both map to `RecordingModes.Active`). This is intentional per comments.
- **`Interval` vs `Scheduled`**: `RecordingModes.Interval` maps to `DFConstantsAndEnums.RecordingMode.Scheduled`, but `DFConstantsAndEnums.RecordingMode.Interval` maps to `RecordingModes.Interval`. This asymmetry may cause confusion.
- **`T0Correction` Support**: Only circular buffer and hybrid recorder modes support T0 correction. Other modes (e.g., `RecorderMode`) do not.
- **`IsTSRAIROnlyRecordingMode` Excludes `Streaming`**: While `Streaming` is a TSR AIR mode, it is not considered "TSR AIR only" per this method.
- **`NO_CONFIGURATION` vs `NO_DATA`**: `NO_CONFIGURATION` (`"NO_CONFIGURATION"`) indicates missing config on device; `NO_DATA` (`1 << 13` in `FaultFlags`) is a runtime fault flag.
- **`FIRST_USE_DATE_NOT_SET`**: Uses `SqlDateTime.MinValue`, not `DateTime.MinValue`, to represent unset date.
- **`IsSLICE6ERFirmware` Logic**: Relies on firmware version string ending with 4-character token starting with `"G1"` or `"G3"`. May break if version format changes.
- **`S6DBDiagnosticChannelList.DiagEnv_X_Temperature` Off-by-One**: `DiagEnv_1_Temperature = 104`, but `DiagChargerDischargeCurrent = 104` is commented out. Ensure no active code uses the old value.
- **`RecordingModeExtensions` Uses `RecordingModes`**: The extension methods operate on `RecordingModes`, not `DFConstantsAndEnums.RecordingMode`, requiring conversion via `ToRecordingModes`/`FromRecordingModes`.
- **`AlwaysShowUnsignedADC` Is a Static Property**: Its value is not persisted; must be set per-session.

View File

@@ -0,0 +1,99 @@
---
source_files:
- Common/DTS.CommonCore/Enums/DBExport/TestObjectFields.cs
- Common/DTS.CommonCore/Enums/DBExport/CustomDirectionFields.cs
- Common/DTS.CommonCore/Enums/DBExport/CustomFinLoc2Fields.cs
- Common/DTS.CommonCore/Enums/DBExport/CustomFinLoc1Fields.cs
- Common/DTS.CommonCore/Enums/DBExport/CustomFinLoc3Fields.cs
- Common/DTS.CommonCore/Enums/DBExport/CustomFilterFields.cs
- Common/DTS.CommonCore/Enums/DBExport/PositionFields.cs
- Common/DTS.CommonCore/Enums/DBExport/MainLocationFields.cs
- Common/DTS.CommonCore/Enums/DBExport/PhysicalDimensionFields.cs
- Common/DTS.CommonCore/Enums/DBExport/TopLevelFields.cs
generated_at: "2026-04-16T02:43:28.798360+00:00"
model: "Qwen/Qwen3-Coder-Next-FP8"
schema_version: 1
sha256: "fd04c3848328d69e"
---
# Documentation: DBExport Enumerations
## 1. Purpose
This module defines a set of strongly-typed enumerations used to represent field names (tags) for various database-exported objects in XML or structured data formats. These enums serve as canonical identifiers for fields associated with core domain entities—such as test objects, locations (fine and main), filters, positions, physical dimensions, and directions—within the DTS (Data Transfer System) ecosystem. They ensure consistency across serialization/deserialization logic, mapping XML element names or database column aliases to compile-time-safe identifiers, and are likely consumed by data export/import modules (e.g., XML exporters, database mappers, or UI binding layers).
## 2. Public Interface
All public members are `public enum` types in the `DTS.Common.Enums.DBExport` namespace.
### `TestObjectFields`
- **Members**: `s_GUID`, `TEST_OBJECT`, `TEXT_L1`, `TEXT_L2`, `VERSION`, `DATE`, `REMARKS`, `EXPIRED`, `SORTKEY`, `LAST_CHANGE`, `LAST_CHANGE_TEXT`, `HISTORY`
- **Purpose**: Represents field names for `ISODll.TestObject` entities.
### `CustomDirectionFields`
- **Members**: `Direction`, `Expired`, `History`, `Last_Change`, `Last_Change_Text`, `Remarks`, `GUID`, `SortKey`, `Text_L1`, `Text_L2`, `Version`
- **Purpose**: Represents field names for `ISODll.MMEDirection` entities.
### `CustomFinLoc1Fields`
- **Members**: `Date`, `Expired`, `Fine_Loc_1`, `History`, `Last_Change`, `Last_Change_Text`, `Remarks`, `S_GUID`, `SortKey`, `Text_L1`, `Text_L2`, `Version`
- **Purpose**: Represents field names for `ISODll.FineLocation1` entities.
### `CustomFinLoc2Fields`
- **Members**: `Date`, `Expired`, `Fine_Loc_2`, `History`, `Last_Change`, `Last_Change_Text`, `Remarks`, `S_GUID`, `SortKey`, `Text_L1`, `Text_L2`, `Version`
- **Purpose**: Represents field names for `ISODll.FineLocation2` entities.
### `CustomFinLoc3Fields`
- **Members**: `Date`, `Expired`, `Fine_Loc_3`, `History`, `Last_Change`, `Last_Change_Text`, `Remarks`, `S_GUID`, `SortKey`, `Text_L1`, `Text_L2`, `Version`
- **Purpose**: Represents field names for `ISODll.MMEFineLocation3` entities.
### `CustomFilterFields`
- **Members**: `Date`, `Expired`, `Filter_Class`, `History`, `Last_Change`, `Last_Change_Text`, `Remarks`, `S_GUID`, `SortKey`, `Text_L1`, `Text_L2`, `Version`
- **Purpose**: Represents field names for `ISODll.MME_FilterClass` entities.
### `PositionFields`
- **Members**: `Date`, `Expired`, `History`, `Last_Change`, `Last_Change_Text`, `Position`, `RecordType`, `Remarks`, `S_GUID`, `SortKey`, `Text_L1`, `Text_L2`, `Version`
- **Purpose**: Represents field names for `ISODll.MMEPositions` entities.
### `MainLocationFields`
- **Members**: `Date`, `Expired`, `History`, `Last_Change`, `Last_Change_Text`, `Picture_ShortName`, `Remarks`, `S_GUID`, `SortKey`, `Text_L1`, `Text_L2`, `Trans_Main_Loc`, `Type`, `Version`
- **Purpose**: Represents field names for `ISODll.MMETransducerMainLocation` entities.
### `PhysicalDimensionFields`
- **Members**: `Amount_Of_Substance_EXP`, `Date`, `Default_Unit`, `Electric_Current_EXP`, `Expired`, `History`, `Last_Change`, `Last_Change_Text`, `Length_EXP`, `Luminous_Intensity_Exp`, `Mass_EXP`, `Physical_Dimension`, `RecordType`, `Remarks`, `S_GUID`, `SortKey`, `Temperature_EXP`, `Text_L1`, `Text_L2`, `Time_EXP`, `Version`
- **Purpose**: Represents field names for `ISODll.MMEPhysicalDimension` entities.
### `TopLevelFields`
- **Members**: `CustomerDetails`, `TestEngineerDetails`, `LabDetails`, `DASList`, `SensorModels`, `Sensors`, `Calibrations`, `CustomDirections`, `CustomFilterClasses`, `CustomTestObjects`, `CustomFinLoc1s`, `CustomFinLoc2s`, `CustomFinLoc3s`, `CustomMainLocs`, `CustomPhysicalDimensions`, `CustomPositions`, `CustomChannels`, `GroupTemplates`, `Groups`, `TestSetups`, `Users`, `GlobalSettings`, `SensorChangeHistory`
- **Purpose**: Represents top-level XML element names (root tags) in exported data structures. Includes a comment indicating `SensorChangeHistory` was introduced in version 7.
## 3. Invariants
- **Consistent casing and naming**: All enum members use `PascalCase` for multi-word identifiers (e.g., `Last_Change`, `Fine_Loc_1`, `Amount_Of_Substance_EXP`). Underscores are used to separate words or components (e.g., `Last_Change_Text`, `Electric_Current_EXP`).
- **Field name alignment**: For most entity-specific enums, the following fields appear consistently: `S_GUID`/`GUID`, `DATE`, `VERSION`, `EXPIRED`, `HISTORY`, `LAST_CHANGE`, `LAST_CHANGE_TEXT`, `REMARKS`, `SORTKEY`, `TEXT_L1`, `TEXT_L2`. Notable exceptions:
- `TestObjectFields` uses `s_GUID` (lowercase `s`) instead of `S_GUID`.
- `MainLocationFields` includes `Picture_ShortName`, `Trans_Main_Loc`, and `Type` instead of `Fine_Loc_*` fields.
- `PhysicalDimensionFields` includes SI base unit exponent fields (`Length_EXP`, `Mass_EXP`, etc.) and `Default_Unit`, `RecordType`.
- `PositionFields` includes `RecordType` and `Position`.
- **Top-level enum scope**: `TopLevelFields` enumerates *only* root-level XML elements, not nested fields. Its values map to container elements in the XML schema.
## 4. Dependencies
- **Namespace usage**: All enums reside in `DTS.Common.Enums.DBExport`, implying they are part of a shared `DTS.CommonCore` library.
- **External references (inferred)**: Each enum is explicitly documented as mapping to an `ISODll.*` type (e.g., `ISODll.FineLocation1`, `ISODll.MME_FilterClass`). This suggests a dependency on the `ISODll` native or interop library (likely containing COM or P/Invoke definitions).
- **Consumers (inferred)**: These enums are likely used by:
- XML serialization/deserialization logic (e.g., custom `XmlSerializer`-based exporters/importers).
- Database export modules (e.g., `DTS.Export` or `DTS.DataExport`).
- UI components that bind to field names (e.g., grid column headers, filter builders).
- Code generators or template engines that produce XML schemas or data contracts.
## 5. Gotchas
- **Inconsistent GUID field naming**: `TestObjectFields` uses `s_GUID`, while all other location/filter enums use `S_GUID` or `GUID`. This may cause mismatches if logic assumes uniformity (e.g., case-insensitive matching or pattern-based field resolution).
- **Mixed underscore usage**: Some fields use underscores in the middle (`Last_Change`, `Fine_Loc_1`), while others do not (`Date`, `Version`). This is likely intentional but may confuse developers expecting consistent naming.
- **`S_GUID` vs `GUID`**: `CustomDirectionFields` uses `GUID`, while others use `S_GUID`. This inconsistency could lead to bugs if field resolution is case- or prefix-sensitive.
- **`PhysicalDimensionFields` exponent naming**: Exponent fields use inconsistent casing (`Length_EXP`, `Luminous_Intensity_Exp`, `Electric_Current_EXP`). The last two differ in suffix casing (`_Exp` vs `_EXP`). This may reflect legacy naming or external schema requirements but is error-prone.
- **`TopLevelFields` includes `CustomTestObjects` but no corresponding `TestObjectFields` enum member is named `CustomTestObjects`**: This enum is for *root tags*, not field names, but the naming similarity could cause confusion.
- **No documentation for field semantics**: The enums define *names*, not meanings. For example, `Expired` likely indicates soft-deletion status, but this is not stated. Consumers must infer or reference external documentation.
- **`SensorChangeHistory` comment**: The inline comment `//introduce in V7,` and `//15390 Store the ZMO in EU in the DataPRO DB` suggest a version-specific addition. Developers working with older versions may encounter missing support or unexpected behavior if this enum value is used unconditionally.
None identified beyond the above.

View File

@@ -0,0 +1,78 @@
---
source_files:
- Common/DTS.CommonCore/Enums/DTS.Viewer/ChartOptions/TimeUnitType.cs
- Common/DTS.CommonCore/Enums/DTS.Viewer/ChartOptions/FilterOption.cs
- Common/DTS.CommonCore/Enums/DTS.Viewer/ChartOptions/YRangeScale.cs
- Common/DTS.CommonCore/Enums/DTS.Viewer/ChartOptions/WakeMethodType.cs
- Common/DTS.CommonCore/Enums/DTS.Viewer/ChartOptions/ChartUnitType.cs
generated_at: "2026-04-16T02:45:21.946060+00:00"
model: "Qwen/Qwen3-Coder-Next-FP8"
schema_version: 1
sha256: "50e4739cba57afa5"
---
# Chart Options Enumerations Documentation
## 1. Purpose
This module defines a set of strongly-typed enumerations used to configure chart display and behavior in the DTS Viewer application. Each enumeration represents a distinct chart configuration option—such as time unit, filtering strategy, Y-axis scaling, wake-up method, and unit type—and provides associated metadata (e.g., user-facing descriptions) and item source implementations for UI binding (e.g., property grid dropdowns). These enums are part of the `DTS.Common.Enums.Viewer` namespace and serve as foundational configuration primitives for chart rendering and user interaction.
## 2. Public Interface
All public types reside in the `DTS.Common.Enums.Viewer` namespace.
### Enumerations
| Name | Values | Description |
|------|--------|-------------|
| `TimeUnitTypeEnum` | `MS = 0` (displayed as `"ms"`), `Seconds = 1` (displayed as `"Seconds"`) | Specifies the time axis unit for chart display. |
| `FilterOptionEnum` | `Unfiltered = 0` (`"Unfiltered"`), `TestSetupDefault = 1` (`"Test Setup Default"`), `Custom = 2` (`"Custom"`) | Defines the filtering strategy applied to chart data. |
| `YRangeScaleEnum` | `AutoRange = 0` (`"Auto Range"`), `FullScale = 1` (`"% Full Scale"`), `Fixed = 2` (`"Fixed"`), `Manual = 3` (`"Manual"`) | Controls how the Y-axis range is determined for a chart. |
| `WakeMethodTypeEnum` | `None = 0` (`"None"`), `MotionDetect = 1` (`"Motion detect"`), `TimeSession = 2` (`"Time session"`), `Magnet = 3` (`"Magnet"`) | Specifies the method used to trigger or wake a data acquisition session. |
| `ChartUnitTypeEnum` | `EU = 0` (`"EU"`), `mV = 1` (`"mV"`), `ADC = 2` (`"ADC"`), `FFT = 3` (`"FFT"`), `PSD = 4` (`"PSD"`) | Defines the unit type displayed on the Y-axis of a chart. Includes support for FFT and PSD (Power Spectral Density) as noted in inline comments. |
### Item Source Classes
Each enum has a corresponding `IItemsSource` implementation for populating UI controls (e.g., property grid dropdowns). All use `EnumUtil.GetValuesList<T>()` internally.
| Name | Returns | Purpose |
|------|---------|---------|
| `TimeUnitTypeItemSource` | `ItemCollection` of `TimeUnitTypeEnum` values | Provides list of time unit options for UI binding. |
| `FilterOptionEnumItemSource` | `ItemCollection` of `FilterOptionEnum` values | Provides list of filter options for UI binding. |
| `YRangeScaleItemSource` | `ItemCollection` of `YRangeScaleEnum` values | Provides list of Y-axis scaling modes for UI binding. |
| `WakeMethodTypeItemSource` | `ItemCollection` of `WakeMethodTypeEnum` values | Provides list of wake-up methods for UI binding. |
| `ChartUnitTypeItemSource` | `ItemCollection` of `ChartUnitTypeEnum` values | Provides list of chart unit types for UI binding. |
All enums are decorated with `[TypeConverter(typeof(EnumDescriptionTypeConverter))]`, indicating they support localized or descriptive string conversion (e.g., for display in UI).
## 3. Invariants
- **Enum values are stable**: The underlying integer values (`0`, `1`, `2`, etc.) are fixed and must not be changed without backward-compatibility review.
- **Descriptions are non-empty**: Each enum member has a `[Description(...)]` attribute with a non-null, non-empty string; this is required for correct UI rendering via `EnumDescriptionTypeConverter`.
- **Item sources are exhaustive**: Each `IItemsSource.GetValues()` implementation returns *all* defined enum values via `EnumUtil.GetValuesList<T>()`, ensuring UI controls show all available options.
- **Namespace consistency**: All types reside in `DTS.Common.Enums.Viewer`; no cross-namespace inheritance or extension is present.
## 4. Dependencies
### Internal Dependencies
- `DTS.Common.Converters.EnumDescriptionTypeConverter`: Used for type conversion (e.g., enum → display string).
- `DTS.Common.Utils.EnumUtil`: Provides `GetValuesList<T>()` for populating `ItemCollection`s.
- `Xceed.Wpf.Toolkit.PropertyGrid.Attributes.IItemsSource`: Interface implemented by item source classes for WPF property grid integration.
### External Dependencies
- `System.ComponentModel`: For `DescriptionAttribute` and `TypeConverterAttribute`.
- `Xceed.Wpf.Toolkit`: For `IItemsSource` and `ItemCollection` types.
### Consumers (Inferred)
- UI components using property grids (e.g., chart configuration panels) likely consume these item sources to populate dropdowns.
- Chart rendering logic likely consumes these enums to configure axis units, scaling, filtering, and time base.
## 5. Gotchas
- **`ChartUnitTypeEnum.FFT` and `PSD` are marked with issue references** (`//6402` and `//25554`), indicating incomplete or future implementation. These values may be present in the enum but lack full runtime support.
- **No validation logic is present in the enums themselves**: The enums are pure data definitions; validation (e.g., ensuring `Custom` filter option has associated parameters) must be handled elsewhere.
- **Descriptions are hard-coded strings**: Changes to `[Description(...)]` values may affect localization or UI consistency if not coordinated across resources.
- **No deprecation markers**: Older enum values (e.g., `TimeUnitTypeEnum.MS`) are not marked obsolete, even if deprecated in practice.
- **No documentation for `EnumDescriptionTypeConverter` behavior**: It is unclear whether descriptions are localized or culture-sensitive—this is implementation-specific to `DTS.Common.Converters`.
None identified beyond the above.

View File

@@ -0,0 +1,37 @@
---
source_files:
- Common/DTS.CommonCore/Enums/DTS.Viewer/Filter/SearchEnum.cs
generated_at: "2026-04-16T02:45:06.628654+00:00"
model: "Qwen/Qwen3-Coder-Next-FP8"
schema_version: 1
sha256: "4c091220b50d19ae"
---
# Filter
1. **Purpose**
This module defines a simple enumeration (`FilterEnum`) used to represent the two supported filter types within the DTS Viewer subsystem: `Test` and `Graph`. It serves as a type-safe mechanism to distinguish between filter categories, likely used in UI components, filtering logic, or configuration handling related to data visualization or test result presentation.
2. **Public Interface**
- **`enum FilterEnum`**
A two-valued enumeration defined in namespace `DTS.Common.Enums.Viewer` with the following members:
- `Test`: Represents a filter type for test-related data or views.
- `Graph`: Represents a filter type for graph-based data or visualizations.
No methods, properties, or additional members are defined on the enum.
3. **Invariants**
- The enum contains exactly two members: `Test` and `Graph`.
- No other values are permitted by the type definition.
- The underlying type is the default `int` (not explicitly specified).
- No runtime validation or additional constraints are enforced by this enum itself.
4. **Dependencies**
- **Depends on**: None (no external imports or references in the source file).
- **Depended on by**: Not visible in this file; likely referenced in other modules (e.g., UI components, filtering services, configuration parsers) within the `DTS.CommonCore` or related assemblies. Based on the namespace (`DTS.Common.Enums.Viewer`), it is part of a shared/common library used across the DTS system.
5. **Gotchas**
- The enum name `FilterEnum` is generic and may be ambiguous without context; consumers must rely on documentation or usage sites to interpret `Test` vs `Graph`.
- No XML documentation comments are present in the source, reducing discoverability of intended semantics.
- The `// ReSharper disable CheckNamespace` directive suggests this file may reside in a non-default folder structure that intentionally overrides the default namespace inference—developers should verify the actual compiled namespace matches expectations.
- None identified from source alone.

View File

@@ -0,0 +1,87 @@
---
source_files:
- Common/DTS.CommonCore/Enums/DTS.Viewer/Reports/PowerSpectralDensity/WindowAveragingType.cs
- Common/DTS.CommonCore/Enums/DTS.Viewer/Reports/PowerSpectralDensity/PassFilterType.cs
- Common/DTS.CommonCore/Enums/DTS.Viewer/Reports/PowerSpectralDensity/WindowWidth.cs
- Common/DTS.CommonCore/Enums/DTS.Viewer/Reports/PowerSpectralDensity/WindowType.cs
generated_at: "2026-04-16T02:45:34.185690+00:00"
model: "Qwen/Qwen3-Coder-Next-FP8"
schema_version: 1
sha256: "4301849ff5429f6c"
---
# PowerSpectralDensity
## Documentation: Power Spectral Density Configuration Enums
### 1. Purpose
This module defines a set of strongly-typed enumerations used to configure parameters for Power Spectral Density (PSD) analysis in the DTS Viewer reporting system. These enums standardize user-facing display labels and internal representation for key signal processing choices—namely, how frequency-domain data is averaged (`WindowAveragingType`), which analog filter type is applied (`PassFilterType`), the FFT window size (`WindowWidth`), and the time-domain windowing function (`WindowType`). They serve as the canonical source of valid options for PSD configuration UIs and serialization layers, ensuring consistency across client and server components.
### 2. Public Interface
All types are `public enum`s in the `DTS.Common.Enums.Viewer.Reports` namespace. Each enum value is annotated with a `[Description]` attribute (via `System.ComponentModel`) that provides a human-readable label.
- **`WindowAveragingType`**
```csharp
public enum WindowAveragingType
```
Specifies the method used to average spectral estimates across multiple frames/windows.
- `Averaging`: Linear (mean) averaging of spectral magnitudes.
- `PeakHoldMax`: For each frequency bin, retain the maximum magnitude observed across frames.
- `PeakHoldMin`: For each frequency bin, retain the minimum magnitude observed across frames.
- **`PassFilterType`**
```csharp
public enum PassFilterType
```
Specifies the analog filter type used for anti-aliasing or pre-filtering before digitization/FFT.
- `Bessel`: Maximally flat group delay (linear phase).
- `Butterworth`: Maximally flat magnitude response.
- `Chebyshev`: Equiripple behavior in passband (type I).
*Note:* `CriticalDamping` is commented out and not available for use.
- **`WindowWidth`**
```csharp
public enum WindowWidth
```
Specifies the number of samples in the analysis window (i.e., FFT length).
- `FiveTwelve` = 512
- `TenTwentyFour` = 1024
- `TwentyFortyEight` = 2048
- `FortyNinetySix` = 4096
- `EightyOneNinetyTwo` = 8192
- **`WindowType`**
```csharp
public enum WindowType
```
Specifies the time-domain window function applied to data prior to FFT.
- `Rectangle`: No windowing (rectangular window).
- `Hamming`: Minimizes nearest-neighbor sidelobes.
- `Hanning`: Also known as Hann; smooths edges.
- `Blackman`: Low sidelobes, wider main lobe.
- `BlackmanHarris`: Very low sidelobes (4-term).
- `FlatTop`: Minimizes amplitude error for frequency estimation.
### 3. Invariants
- All enum values are explicitly assigned underlying `int` values (via `= N` syntax) **only** for `WindowWidth`; all others use default sequential `int` values starting at 0.
- Each enum value *must* have a `[Description]` attribute; missing descriptions are not permitted in the current implementation.
- `PassFilterType` is *not* extensible at runtime—no mechanism for dynamic addition of filter types exists.
- `CriticalDamping` is commented out and *must not* be used; its presence is explicitly marked as a known technical debt ("REMOVE THIS HACK").
- Enum names use PascalCase, and `[Description]` strings use title case with spaces and hyphens as appropriate (e.g., `"Blackman-Harris"`).
### 4. Dependencies
- **Internal dependencies**:
- `DTS.Common.Converters.EnumDescriptionTypeConverter` (used via `[TypeConverter]` attribute for UI binding/deserialization).
- `System.ComponentModel` (for `[Description]` and `TypeConverter`).
- **Consumers (inferred)**:
- Likely consumed by UI layers (e.g., WPF/WinForms controls) via the `EnumDescriptionTypeConverter` to render user-friendly labels.
- Likely used in serialization (e.g., JSON, XML) where the `[Description]` value is mapped to/from the enum name.
- Part of a larger `DTS.Common.Enums.Viewer.Reports` hierarchy (suggesting related enums exist for other report types).
### 5. Gotchas
- **`PassFilterType` has a disabled value**: `CriticalDamping` is commented out but not removed. Do *not* assume it is available—attempting to use it will result in invalid state or runtime errors.
- **`WindowWidth` values are powers of two**: All valid values are `2^9` through `2^13`. No validation is enforced at the enum level; callers must ensure input aligns with FFT constraints elsewhere in the system.
- **`Hanning` vs. `Hann`**: The enum uses `Hanning` (a common misspelling), not `Hann`. This may cause confusion if consumers expect standard naming.
- **No `None` or `Auto` option**: All enums require an explicit selection; there is no fallback or default value defined in the enum itself.
- **Description strings are fixed**: Changing `[Description]` values will affect UI text and potentially serialized data contracts.
- **No XML documentation comments**: The source provides no `<summary>` or `<remarks>`—all documentation must be inferred from enum names and `[Description]` attributes.

View File

@@ -0,0 +1,79 @@
---
source_files:
- Common/DTS.CommonCore/Enums/DTS.Viewer/TestMetadata/ChannelGroups.cs
- Common/DTS.CommonCore/Enums/DTS.Viewer/TestMetadata/TestGraphsFields.cs
- Common/DTS.CommonCore/Enums/DTS.Viewer/TestMetadata/TestSetupFields.cs
- Common/DTS.CommonCore/Enums/DTS.Viewer/TestMetadata/TestRunMetadataFields.cs
- Common/DTS.CommonCore/Enums/DTS.Viewer/TestMetadata/TestModuleFields.cs
- Common/DTS.CommonCore/Enums/DTS.Viewer/TestMetadata/TestChannelFields.cs
generated_at: "2026-04-16T02:45:19.428554+00:00"
model: "Qwen/Qwen3-Coder-Next-FP8"
schema_version: 1
sha256: "5089f69caf0a7cb3"
---
# Documentation: Test Metadata Enumerations
## 1. Purpose
This module defines a set of strongly-typed enumerations that represent field names and groupings used for test metadata in the DTS Viewer system. These enums serve as standardized keys for accessing, serializing, deserializing, and querying structured metadata associated with test runs, modules, channels, graphs, and setup information. They enable type-safe handling of metadata schemas across the application—particularly in UI components, data serialization layers, and metadata validation logic—by providing a fixed set of valid field identifiers and channel group categories.
## 2. Public Interface
All types are `public enum`s in the `DTS.Common.Enums.Viewer` namespace. No classes, methods, or properties are exposed.
### `ChannelGroups`
- **Members**:
- `Channel`: Represents raw or physical channels.
- `Graph`: Represents graph-based visualizations (likely aggregations or derived views).
- `CalculatedChannel`: Represents channels whose values are computed from other channels (e.g., via formulas).
- **Purpose**: Categorizes channels into logical groups for filtering or UI rendering.
### `TestGraphsFields`
- **Members**:
- `Name`, `HardwareChannelName`, `Channels`, `Channel`, `ChannelId`
- **Purpose**: Defines valid field names for objects representing test graphs (e.g., in JSON schemas or metadata structures).
### `TestSetupMetadataFields`
- **Members**:
- `Name`, `DateOfTheTest`, `Graphs`, `Timestamp`, `CalibrationBehavior`
- **Purpose**: Specifies fields applicable to top-level test setup metadata (e.g., configuration or session-level data).
### `TestRunMetadataFields`
- **Members**:
- `Id`, `Description`, `InlineSerializedData`, `Guid`, `FaultFlags`, `Software`, `SoftwareVersion`, `DataType`, `FileDate`, `FilePath`, `Modules`, `Module`, `Channels`, `CalculatedChannels`, `CalculatedChannel`
- **Purpose**: Defines top-level fields for a test runs metadata, including references to nested entities (modules, channels, etc.) and runtime context.
### `TestModuleFields`
- **Members**:
- Includes identifiers (`SerialNumber`, `BaseSerialNumber`, `Number`), timing (`StartRecordTimestampSec`, `TriggerTimestampSec`, etc.), sampling (`NumberOfSamples`, `UnsubsampledNumberOfSamples`, `SampleRateHz`, `StartRecordSampleNumber`), configuration (`RecordingMode`, `RequestedPreTriggerSeconds`, `AaFilterRateHz`), sensor data (`TiltSensorAxisXDegreesPre`, `TemperatureLocation1Pre`, etc.), and metadata (`InlineSerializedData`, `PTPMasterSync`).
- **Purpose**: Represents all known fields for a test modules metadata, including pre/post-trigger conditions, sensor readings, and acquisition parameters.
### `TestChannelFields`
- **Members**:
- Includes identifiers (`SerialNumber`, `ChannelId`, `HardwareChannelName`, `SensorId`), configuration (`Description`, `ChannelDescriptionString`, `ChannelName2`, `UnitConversion`, `LinearizationFormula`, `ZeroMethod`, `ZeroAverageWindowBegin`, `ZeroAverageWindowEnd`), calibration (`LastCalibrationDate`, `Sensitivity`, `SensitivityUnits`, `CalSignalEnabled`, `ShuntEnabled`, `MeasuredShuntDeflectionMv`, `TargetShuntDeflectionMv`), acquisition (`Start`, `IsSubsampled`, `AbsoluteDisplayOrder`, `SampleRateHz`, `UnsubsampledSampleRateHz`, `TimeOfFirstSample`), electrical properties (`ExcitationVoltage`, `MeasuredExcitationVoltage`, `FactoryExcitationVoltage`, `BridgeResistanceOhms`, `OffsetToleranceLowMv`, `OffsetToleranceHighMv`), derived values (`InitialEu`, `InitialOffset`, `UserOffsetEU`, `ScaleFactorEU`), and metadata (`IsoCode`, `UserCode`, `HIC`, `SourceModuleSerialNumber`, `Calculation`, `DataFlag`, `AtCapacity`, `SensorPolarity`, `UseEUScaler`, `T1`, `T2`).
- **Purpose**: Provides exhaustive field coverage for channel-level metadata, supporting both raw and calculated channels.
## 3. Invariants
- **No overlap across enums**: Each enum defines a distinct set of field names for a specific metadata entity (e.g., `TestChannelFields` vs. `TestModuleFields`). There is no guarantee of uniqueness across enums (e.g., `Name`, `Channels`, `Module` appear in multiple enums), but within each enum, all members are unique.
- **Field names are string-literal keys**: These enums are intended to map to string-based keys (e.g., in JSON or dictionaries). Their values are implicitly `int`-backed, but the *semantic meaning* comes from their *names*, not their numeric values.
- **No ordering guarantees**: The enums are not ordered by importance, hierarchy, or sequence. `AbsoluteDisplayOrder` in `TestChannelFields` is a *field name*, not an ordering directive for the enum itself.
- **No validation logic**: These are *pure data definitions*; no runtime validation or constraints are enforced by the enums themselves.
## 4. Dependencies
- **Internal usage**: These enums are defined in `DTS.CommonCore`, indicating they are part of a shared common library. They are likely consumed by:
- UI components (e.g., metadata viewers, configuration panels)
- Serialization/deserialization logic (e.g., JSON converters, DTOs)
- Metadata querying or filtering systems
- **No external dependencies**: The source files contain no `using` statements, implying no dependencies on other project types or external libraries. They rely solely on the base .NET runtime.
## 5. Gotchas
- **Ambiguity in field semantics**: While enum names are precise, their *intended usage* (e.g., whether `Channels` in `TestGraphsFields` refers to a list or a single channel) is not clarified by the enum alone. Context (e.g., JSON schema or usage site) is required.
- **Redundant field names across enums**: Fields like `Module`, `Channels`, `CalculatedChannel`, `Name`, and `ChannelId` appear in multiple enums (`TestRunMetadataFields`, `TestSetupMetadataFields`, `TestGraphsFields`, `TestChannelFields`). This may indicate shared schema concepts but risks misuse if enums are used interchangeably.
- **No deprecation markers**: The enums do not indicate obsolete or legacy fields (e.g., `ChannelName2`, `UserChannelName`, `UserCode`), which may complicate maintenance or migration.
- **Tilt/temperature fields assume pre/post sensor states**: `TestModuleFields` includes many `Pre`/`Post`-suffixed fields (e.g., `TiltSensorAxisXDegreesPre`, `TemperatureLocation4Post`). This implies a rigid assumption about test procedures involving pre/post events; deviations may cause misinterpretation.
- **No documentation on `InlineSerializedData`**: Its purpose (e.g., binary vs. JSON, encoding) is not evident from the enum alone.
None identified beyond the above ambiguities and design assumptions.

View File

@@ -0,0 +1,36 @@
---
source_files:
- Common/DTS.CommonCore/Enums/Database/DbType.cs
generated_at: "2026-04-16T02:42:49.967232+00:00"
model: "Qwen/Qwen3-Coder-Next-FP8"
schema_version: 1
sha256: "c0a6812741ff89b5"
---
# Database
### 1. Purpose
This module defines the `DbType` enumeration, which categorizes database instances according to their deployment and access pattern—specifically distinguishing between databases that are exclusively remote, exclusively local, or a hybrid of both. It serves as a foundational type for configuring or routing data access logic within the DTS system, enabling consistent semantic interpretation of database type across the codebase.
### 2. Public Interface
The module exposes a single public type:
- **`DbType`** (`enum`)
- `RemoteOnly = 0`: Indicates the database is accessible only via a remote connection (e.g., cloud or remote server).
- `LocalOnly = 1`: Indicates the database is accessible only locally (e.g., embedded or on-disk instance on the same machine).
- `RemoteLocalHybrid = 2`: Indicates the database supports both remote and local access modes, likely with logic to switch or synchronize between them.
### 3. Invariants
- The enum values are explicitly assigned integer constants (`0`, `1`, `2`) and must not be changed without considering serialization or persistence compatibility.
- Only the three defined values are valid; no other values are permitted by the type definition itself (though runtime casting from `int` could bypass this at compile time).
- No additional validation or runtime checks are present in this file to enforce usage constraints.
### 4. Dependencies
- **No external dependencies**: This file contains only a self-contained `enum` definition with no `using` statements or references to other types.
- **Consumers**: Based on namespace (`DTS.Common.Enums.Database`) and naming conventions, this type is likely referenced by higher-level configuration, data access, or connection management modules (e.g., `DTS.CommonCore.Data`, `DTS.Server.Database`, or similar), though such consumers are not visible in this source file.
### 5. Gotchas
- **No validation or parsing logic**: The enum does not include helper methods (e.g., `TryParse`, `IsValid`) or attributes (e.g., `[Flags]`), so callers must manually handle invalid values or parsing if needed.
- **No documentation comments**: The source lacks XML doc comments (e.g., `/// <summary>`), so semantic intent beyond the field names is not explicitly stated—e.g., it is unclear whether `RemoteLocalHybrid` implies active synchronization, fallback behavior, or dual-mode selection.
- **Potential for misuse via casting**: Since enums in C# allow casting from any `int`, invalid values (e.g., `(DbType)99`) are possible at runtime unless guarded elsewhere.
- **None identified from source alone.**

View File

@@ -0,0 +1,68 @@
---
source_files:
- Common/DTS.CommonCore/Enums/GroupTemplates/GroupTemplateChannelFields.cs
- Common/DTS.CommonCore/Enums/GroupTemplates/GroupTemplateFields.cs
generated_at: "2026-04-16T02:44:06.705516+00:00"
model: "Qwen/Qwen3-Coder-Next-FP8"
schema_version: 1
sha256: "e8a5b65535302547"
---
# GroupTemplates
## Documentation: Group Template Field Enumerations
### 1. Purpose
This module defines two strongly-typed enumerations—`GroupTemplateFields` and `GroupTemplateChannelFields`—that represent the set of valid field names used when referencing or manipulating group template data structures within the system. These enums serve as standardized identifiers for field-level operations (e.g., filtering, sorting, mapping, or validation) related to group templates and their associated channels, ensuring consistency across layers that consume or produce group template metadata.
### 2. Public Interface
No classes, methods, or properties are exposed. Only two `public enum` types are defined:
- **`GroupTemplateFields`**
```csharp
public enum GroupTemplateFields
{
Name,
Description,
Channels,
LastModifiedBy,
LastModified,
AssociatedGroups
}
```
Represents top-level fields of a group template entity. Values correspond to core properties of a group template (e.g., `Name`, `Description`) or nested collections (`Channels`, `AssociatedGroups`), as well as audit metadata (`LastModifiedBy`, `LastModified`).
- **`GroupTemplateChannelFields`**
```csharp
public enum GroupTemplateChannelFields
{
Required,
Name,
ISOCode,
Custom,
DisplayOrder
}
```
Represents fields of individual channel objects *within* a group templates `Channels` collection. Includes both required metadata (`Name`, `ISOCode`), configuration flags (`Required`, `Custom`), and ordering (`DisplayOrder`).
### 3. Invariants
- All enum values are *exhaustive* for their respective domains (i.e., no additional fields are defined beyond those listed).
- `GroupTemplateFields.Channels` is the only field in `GroupTemplateFields` that contains *nested* data; its value is expected to be a collection of objects, each describable via `GroupTemplateChannelFields`.
- `GroupTemplateChannelFields.Required` and `GroupTemplateChannelFields.Custom` are boolean-like flags (though represented as enum values, not booleans), implying they are used as discrete states rather than numeric values.
- No ordering guarantees are implied by the enum definitions themselves (i.e., `DisplayOrder` is a *field name*, not an ordering of the enum values).
### 4. Dependencies
- **Internal dependencies**:
- `DTS.Common.Enums.GroupTemplates` namespace (inferred from `namespace` declaration).
- Likely consumed by modules handling group template serialization/deserialization, UI form generation, or data mapping (e.g., ORM or DTO layers), though no direct imports are visible in the provided source.
- **External dependencies**: None (no `using` statements present in the source).
- **Depended upon**: Other modules in the `DTS.CommonCore` assembly (or downstream projects) that require field-level metadata for group templates or channels.
### 5. Gotchas
- **No semantic validation**: The enums themselves do not enforce constraints (e.g., `Required` is not validated against `Custom` or `ISOCode` behavior). Consumers must implement business logic around field relationships.
- **Ambiguity in `Custom`**: The meaning of `GroupTemplateChannelFields.Custom` is unclear without additional context—it may indicate user-defined fields, non-standard channel types, or a flag for dynamic extensibility.
- **No versioning**: The enums are static; adding new fields requires a breaking change.
- **Case sensitivity**: As with all C# enums, string comparisons (e.g., in JSON or database mappings) must preserve exact casing (`"Name"` ≠ `"name"`).
- **`LastModified` type ambiguity**: While `GroupTemplateFields.LastModified` is listed, the underlying type (e.g., `DateTime`, `string`, `long`) is not defined here and must be inferred from consuming code.
None identified beyond the above.

View File

@@ -0,0 +1,40 @@
---
source_files:
- Common/DTS.CommonCore/Enums/Groups/GroupImport.cs
generated_at: "2026-04-16T02:44:10.436858+00:00"
model: "Qwen/Qwen3-Coder-Next-FP8"
schema_version: 1
sha256: "035d6557ffbc8e0b"
---
# Groups
## 1. Purpose
This module defines a strongly-typed enumeration for the sequential steps involved in a group import workflow. It resides in the `DTS.Common.Enums.Groups` namespace and serves as a centralized, type-safe reference for the distinct phases—`Options`, `Preview`, and `Import`—that constitute the group import process. Its role is to ensure consistency across the codebase when referencing or routing through these steps, particularly in UI navigation, state management, or workflow orchestration logic.
## 2. Public Interface
The module exposes a single nested `enum` type:
- **`GroupImportEnums.Steps`**
An `enum` with three named constants:
- `Options`: Represents the initial step where user-provided configuration or selection options are collected.
- `Preview`: Represents the step where imported data is displayed for review before final commitment.
- `Import`: Represents the final step where the data is committed or persisted.
All values are implicitly of type `int`, with default underlying values (`Options = 0`, `Preview = 1`, `Import = 2`), though the source does not explicitly declare numeric values.
## 3. Invariants
- The sequence of steps is strictly ordered: `Options``Preview``Import`.
- No other steps are defined beyond these three; any extension requires modifying this enum.
- The enum is declared as `public abstract class GroupImportEnums` containing the nested `enum Steps`, but since `GroupImportEnums` is abstract and contains no instance members, it serves solely as a namespace-like container for `Steps`. (Note: This is a common C# pattern for grouping enums, though the class itself is never instantiated.)
## 4. Dependencies
- **Internal**: Depends on the .NET runtime (`System` namespace implicitly, via `enum`).
- **External usage**: Inferred to be consumed by modules handling group import workflows (e.g., UI layers, import services), though no direct dependencies are visible in this file.
- **No external dependencies** are declared in this source file (no `using` directives present).
## 5. Gotchas
- The outer class `GroupImportEnums` is `abstract` but serves no functional purpose beyond namespacing the `Steps` enum; it cannot be instantiated and contains no static members. This may confuse developers expecting utility methods or constants.
- The enum values are not explicitly assigned numeric values, relying on default sequential ordering. While stable in practice, this could break if reordering or inserting intermediate steps without updating consumers that assume specific numeric values.
- No validation or conversion helpers (e.g., `TryParse`, `GetDescription`) are provided in this file—any such functionality must exist elsewhere.
- None identified from source alone.

View File

@@ -0,0 +1,47 @@
---
source_files:
- Common/DTS.CommonCore/Enums/Groups/GroupList/GroupFields.cs
generated_at: "2026-04-16T02:45:01.417346+00:00"
model: "Qwen/Qwen3-Coder-Next-FP8"
schema_version: 1
sha256: "2f4786cffbcd013b"
---
# GroupList
## 1. Purpose
This module defines a strongly-typed enumeration `GroupFields` used to represent standardized field names for group entities within the DTS system. It serves as a canonical source of field identifiers—particularly for UI labeling, data binding, serialization, or query construction—where consistent field naming and localized description strings are required. The use of `Description` attributes and a custom `TypeConverter` indicates this enum is intended for scenarios requiring human-readable display text (e.g., column headers, form labels) while maintaining type safety and compile-time correctness.
## 2. Public Interface
The module exposes a single public type:
- **`DTS.Common.Enums.Groups.GroupList.GroupFields`**
An enum with the following members (all marked with `[Description]` attributes):
- `Name` → Description: `"GroupField_Name"`
- `DisplayName` → Description: `"GroupField_DisplayName"`
- `Description` → Description: `"GroupField_Description"`
- `ChannelCount` → Description: `"GroupField_ChannelCount"`
- `LastModified` → Description: `"GroupField_LastModified"`
- `LastModifiedBy` → Description: `"GroupField_LastModifiedBy"`
- `AssociatedTestSetups` → Description: `"GroupField_AssociatedTestSetups"`
Each members description string is retrieved via the `EnumDescriptionTypeConverter` (from `DTS.Common.Converters`), enabling automatic conversion to localized or display-friendly strings.
## 3. Invariants
- All enum values are explicitly annotated with `[Description]` attributes; no member lacks a description.
- The enum is sealed (implicit, as enums are sealed in C#) and non-extensible at runtime.
- The `Description` attribute values are string literals (no dynamic resolution), implying the descriptions are fixed at compile time.
- The enum is intended for use *only* with the `EnumDescriptionTypeConverter`; behavior with other converters is unspecified.
## 4. Dependencies
- **Depends on**:
- `System.ComponentModel` (for `DescriptionAttribute` and `TypeConverter`)
- `DTS.Common.Converters.EnumDescriptionTypeConverter` (custom type converter implementation)
- **Used by**:
- Unknown from source alone. Likely consumed by UI layers (e.g., data grid column definitions), serialization logic, or data mapping components that require consistent field identification and display text.
## 5. Gotchas
- The `Description` attribute values (e.g., `"GroupField_Name"`) appear to be *keys* rather than human-readable strings themselves, suggesting they are intended for localization via resource lookup (e.g., `ResourceManager.GetString("GroupField_Name")`). This is not explicit in the source, so consumers must verify how `EnumDescriptionTypeConverter` resolves these keys.
- No validation or runtime checks ensure enum values are only used in contexts expecting *group-related* fields; misuse in non-group contexts is possible.
- The enum name `GroupFields` (plural) may be misleading since it represents *singular* field identifiers (e.g., `GroupFields.Name` refers to the *Name* field, not multiple fields).
- None identified from source alone.

View File

@@ -0,0 +1,169 @@
---
source_files:
- Common/DTS.CommonCore/Enums/Hardware/HardwareListTags.cs
- Common/DTS.CommonCore/Enums/Hardware/SLICEConfigurations.cs
- Common/DTS.CommonCore/Enums/Hardware/HardwareTypes.cs
generated_at: "2026-04-16T02:44:03.050936+00:00"
model: "Qwen/Qwen3-Coder-Next-FP8"
schema_version: 1
sha256: "3948c1a76438f900"
---
# Hardware Enums and Constants Documentation
## 1. Purpose
This module defines core enumerations and static utility methods for hardware type identification, configuration, and capability querying within the DTS system. It serves as a foundational layer for hardware abstraction—enabling consistent representation of device types (`HardwareTypes`), SLICE configurations (`SLICEConfigurations`), and metadata tags (`HardwareListTags`) across the codebase. The `HardwareConstants` class centralizes hardware-specific logic, such as feature support checks (e.g., trigger inversion, recording modes), embedded sensor detection, and sample rate constraints, ensuring consistent behavior across modules that interact with diverse data acquisition systems (DAS).
---
## 2. Public Interface
### Enumerations
#### `HardwareListTags`
- **Namespace**: `DTS.Common.Enums.Hardware`
- **Purpose**: Defines metadata tags used to identify or display hardware attributes in UI or data structures.
- **Values**:
- `Included`, `SerialNumber`, `HardwareType`, `ChannelCount`, `Firmware`, `MaxSampleRate`, `TestSampleRate`, `CalDate`, `CalDueDate`, `IPAddress`, `FirstUseDate`
#### `SLICEConfigurations`
- **Namespace**: `DTS.Common.Enums.Hardware`
- **Purpose**: Represents SLICE hardware configuration variants. Uses `EnumDescriptionTypeConverter` for localized descriptions.
- **Values**:
- `MEGA` → Description: `"SLICE_CONFIGURATION_MEGA"`
- `EIGHT_HUNDRED` → Description: `"SLICE_CONFIGURATION_800K"`
- `SEVEN_HUNDRED` → Description: `"SLICE_CONFIGURATION_700K"`
- `SIX_HUNDRED` → Description: `"SLICE_CONFIGURATION_600K"`
#### `HardwareTypes`
- **Namespace**: `DTS.Common.Enums.Hardware`
- **Purpose**: Enumerates all supported hardware device types in the system. Uses `EnumDescriptionTypeConverter`. Includes legacy, embedded, and infrastructure devices.
- **Key Values**:
- `SLICE_Base` (0), `SLICE_Bridge` (1), `SLICE_Distributor` (2), `TDAS_Pro_Rack` (3)
- `SLICE2_IEPE_Hi` (4) through `SLICE2_SLD` (30)
- Embedded modules: `EMB_LIN_ACC_LO` (44) to `EMB_RTC_NS_PAD` (54)
- Infrastructure: `TSR_AIR` (40), `TSR_AIR_RevB` (41), `DKR` (42), `DIR` (43)
- `UNDEFINED` (38) for uninitialized/unknown devices
#### `SLICEBridgeTypes`
- **Namespace**: `DTS.Common.Enums.Hardware`
- **Purpose**: Specifies bridge module types for SLICE devices.
- **Values**:
- `Bridge`, `IEPE`, `ARS`, `ACC`, `RTC`, `UART`, `StreamOut`
- All use `EnumDescriptionTypeConverter` with descriptive strings (e.g., `"BRIDGETYPE_BRIDGE_DESCRIPTION"`).
#### `RackSizes`
- **Namespace**: `DTS.Common.Enums.Hardware`
- **Purpose**: Defines rack size configurations.
- **Values**:
- `FOUR` → Description: `"RACK_SIZE_4M"`
- `EIGHT` → Description: `"RACK_SIZE_8M"`
### Static Methods in `HardwareConstants`
#### `GetBrushForVoltageStatus(VoltageStatusColor status)`
- **Return Type**: `SolidColorBrush`
- **Behavior**: Maps a `VoltageStatusColor` enum value to a WPF `SolidColorBrush` for UI rendering.
- `Green``BrushesAndColors.BrushApplicationStatusPowerGreen`
- `Red``BrushesAndColors.BrushApplicationStatusPowerRed`
- `Yellow``BrushesAndColors.BrushApplicationStatusPowerYellow`
- `Off` or default → `BrushesAndColors.BrushApplicationStatusPowerClear`
#### `SupportsTriggerInversion(HardwareTypes type, int protocolVersion)`
- **Return Type**: `bool`
- **Behavior**: Returns `true` if the device supports trigger inversion. Currently supported devices include:
- `SLICE1_5_Micro_Base`, `SLICE_Base`, `SLICE2_Base`, `SLICE_IEPE`, `SLICE1_5_Nano_Base`, `SLICE_Micro_Base`, `SLICE_NANO_Base`, `SLICE2_SIM`, `SLICE2_DIM`, `SLICE2_TOM`, `SLICE2_SLS`, `SLICE1_G5Stack`, `SLICE2_SLT`, `SLICE2_SLD`
- **Note**: `protocolVersion` parameter is unused in current implementation.
#### `SupportsStartInversion(HardwareTypes type, int protocolVersion)`
- **Return Type**: `bool`
- **Behavior**: Returns `true` if the device supports start inversion. Includes all devices from `SupportsTriggerInversion`, plus `SLICE6_AIR`.
- **Note**: `protocolVersion` parameter is unused.
#### `IsEthernetRecorder(HardwareTypes type)`
- **Return Type**: `bool`
- **Behavior**: Returns `true` only for `HardwareTypes.S6A_EthernetRecorder`.
#### `HasEmbeddedSensors(HardwareTypes hardware)`
- **Return Type**: `bool`
- **Behavior**: Returns `true` for embedded sensor modules:
- `EMB_ANG_ACC`, `EMB_ANG_ARS`, `EMB_ATM`, `EMB_LIN_ACC_HI`, `EMB_LIN_ACC_LO`, `EMB_MAG`, `EMB_MAG_SWITCH`, `EMB_MIC`, `EMB_OPT`, `EMB_RTC_NS_PAD`, `EMB_RTC_S_MARK`, `TSR_AIR`, `TSR_AIR_RevB`, `DIR`, `DKR`
#### `HasEmbeddedChannelType(HardwareTypes hardware, string channelType)`
- **Return Type**: `bool`
- **Behavior**: Determines if a given `channelType` (e.g., `"LOWG_SERIAL_APPEND"`) is supported on the device.
- `TSR_AIR`/`TSR_AIR_RevB`: All channel types return `true`.
- `DIR`: Supports `HIGHG_SERIAL_APPEND`.
- `DKR`: Only supports embedded channels (per `HasEmbeddedSensors`).
- Other devices: Strict per-channel-type logic (e.g., `MICROPHONE_SERIAL_APPEND` supported on all except `DKR`).
#### `IsRecordingModeSupported(RecordingModes mode, HardwareTypes dasType, int protocolVersion, bool includeNativeSupportOnly = false)`
- **Return Type**: `bool`
- **Behavior**: Checks if a `RecordingModes` value is supported by the hardware.
- Non-`TSR_AIR` devices: Support `CircularBuffer` and `Recorder` (and optionally their UART variants).
- `SLICE6DB_InDummy`, `SLICE6DB3`, `SLICE6DB`: Support `RAMActive` and `MultipleEventRAMActive`.
- Specific devices delegate to dedicated static classes (e.g., `SLICE6AIR.IsRecordingModeSupported`).
- Unsupported devices (`DIM`, `G5INDUMMY`, `Ribeye`, `TDAS_Pro_Rack`, etc.) return `false`.
#### `MaxSampleRateForRecordingMode(IDASHardware h, RecordingModes mode, int protocolVersion = 1, uint baudRate = 9600)`
- **Return Type**: `double`
- **Behavior**: Returns the maximum sample rate for a given recording mode.
- For `SLICE6_AIR`: Delegates to `SLICE6AIR.MaxSampleRateHzForRecordingMode`.
- For `S6A_EthernetRecorder`: Returns `SLICE6AIR.MaxSampleRateHz_OBRDDR`.
- Otherwise: Calls `h.GetMaxSampleRateDouble()`.
#### `IsStreamingProfileSupported(UDPStreamProfile profile, HardwareTypes dasType, int protocolVersion, bool includeNativeSupportOnly = false)`
- **Return Type**: `bool`
- **Behavior**: Checks streaming support. Only `SLICE6_Base`, `SLICE6_AIR`, `SLICE6_AIR_BR`, `TSR_AIR`, and `TSR_AIR_RevB` support streaming. Others return `false`.
#### `IsClockSyncProfileSupported(ClockSyncProfile profile, HardwareTypes dasType, int protocolVersion, bool includeNativeSupportOnly, bool master)`
- **Return Type**: `bool`
- **Behavior**: Checks clock sync support. Delegates to device-specific classes (`SLICE6`, `SLICE6AIR`, `TSRAIR`, `SLICE6DB`). Unsupported devices return `false`.
---
## 3. Invariants
- **HardwareType Values**:
- `UNDEFINED` (38) is reserved for uninitialized/unknown devices.
- Values 058 are explicitly defined; gaps (e.g., 22, 35) indicate deprecated/unused entries.
- **Embedded Sensors**:
- Devices with `HasEmbeddedSensors(hardware) == true` must only expose channels defined in `HasEmbeddedChannelType`.
- **Recording Modes**:
- `TSR_AIR`/`TSR_AIR_RevB` devices have restricted recording mode support (handled by `TSRAIR.IsRecordingModeSupported`).
- `SLICE6DB_InDummy`, `SLICE6DB3`, `SLICE6DB` have unique support for `RAMActive` modes.
- **Trigger/Start Inversion**:
- Supported only for SLICE-family devices (SLICE1, SLICE1.5, SLICE2) and embedded modules (`TSR_AIR`, `DIR`, `DKR`).
- USB connectivity is implied as a prerequisite (per comments), though not enforced in code.
- **Ethernet Recorders**:
- Only `S6A_EthernetRecorder` is recognized as an Ethernet recorder.
---
## 4. Dependencies
### Imports/References
- **`DTS.Common.Converters`**: `EnumDescriptionTypeConverter` for UI localization.
- **`System.ComponentModel`**: `DescriptionAttribute` for enum descriptions.
- **`System.Windows.Media`**: `SolidColorBrush` and `BrushesAndColors` for UI rendering.
- **`DTS.Common.Constant.DASSpecific`**: Constants like `LOWG_SERIAL_APPEND` used in `HasEmbeddedChannelType`.
- **`DTS.Common.Interface.DataRecorders`**: `IDASHardware` interface for `MaxSampleRateForRecordingMode`.
- **`DFConstantsAndEnums`**: `VoltageStatusColor` and serial append constants (e.g., `LOWG_SERIAL_APPEND`).
### Used By
- UI layers (via `HardwareListTags` and `GetBrushForVoltageStatus`).
- Device configuration and discovery modules (via `HardwareTypes`, `SLICEConfigurations`).
- Recording/streaming logic (via `IsRecordingModeSupported`, `IsStreamingProfileSupported`).
- Embedded sensor validation (via `HasEmbeddedSensors`, `HasEmbeddedChannelType`).
---
## 5. Gotchas
- **`protocolVersion` Unused**: Parameters in `SupportsTriggerInversion`, `SupportsStartInversion`, and `IsRecordingModeSupported` are declared but not used in current implementation.
- **`AllowSoftDisconnects` Global State**: A mutable static property (`HardwareConstants.AllowSoftDisconnects`) must be set by the application; its default (`false`) may cause unexpected behavior if not explicitly configured.
- **Embedded Channel Logic**: `HasEmbeddedChannelType` returns `true` for all channel types on `TSR_AIR`/`TSR_AIR_RevB`, but `false` for others—even if embedded sensors exist (e.g., `EMB_ATM` has no channel type mapping).
- **`IsRecordingModeSupported` "HACK"**: Non-`TSR_AIR` devices unconditionally support UART variants (`CircularBufferPlusUART`, `RecorderPlusUART`) unless `includeNativeSupportOnly=true`, which may mislead callers expecting strict mode validation.
- **`SLICE6DB_AIR` Commented Out**: The enum value `SLICE6DB_AIR = 35` is commented as "doesn't exist", but the infrastructure comment suggests future use.
- **`SLICE6AIRBR` vs `SLICE6_AIR_BR`**: The enum uses `SLICE6_AIR_BR` (with underscore), but the code references `SLICE6AIRBR` (no underscore) in `IsRecordingModeSupported`—indicating a potential naming inconsistency.
- **`MaxSampleRateForRecordingMode` Signature**: Uses `IDASHardware` interface, but `SLICE6AIR.MaxSampleRateHz_OBRDDR` is a static property—suggesting tight coupling to specific implementations.

View File

@@ -0,0 +1,30 @@
---
source_files:
- Common/DTS.CommonCore/Enums/Reports/ReportConstantsAndEnums.cs
generated_at: "2026-04-16T02:44:33.797924+00:00"
model: "Qwen/Qwen3-Coder-Next-FP8"
schema_version: 1
sha256: "2ac723ba5793b971"
---
# Reports
1. **Purpose**
This file is a placeholder or stub for a C# namespace `DTS.Common.Enums.Reports` intended to house constants and enumerations related to reporting functionality within the DTS codebase. As written, it contains no actual declarations—no enums, constants, or types—so it currently serves no functional purpose beyond establishing the namespace structure. Its existence suggests future extensibility for report-related enums (e.g., report types, statuses, output formats), but no such functionality is implemented here.
2. **Public Interface**
No public types, functions, properties, or constants are defined in this file. The namespace `DTS.Common.Enums.Reports` is declared but empty.
3. **Invariants**
No invariants apply, as the file contains no logic or state. The only implicit invariant is that the namespace remains valid and empty.
4. **Dependencies**
The file imports standard .NET namespaces (`System`, `System.Collections.Generic`, `System.Linq`, `System.Text`, `System.Threading.Tasks`), but does not reference any project-internal or third-party dependencies. No other modules depend on this file, as it exposes nothing.
5. **Gotchas**
- **Empty file**: Developers may assume this file contains report-related enums or constants (e.g., `ReportType`, `ReportStatus`, `OutputFormat`) based on its name and location, but none are present.
- **Namespace mismatch risk**: If other code references types in `DTS.Common.Enums.Reports`, those types must be defined elsewhere—this file alone will not compile such references.
- **Potential tech debt**: The presence of unused `using` directives (e.g., `System.Threading.Tasks`) suggests this file may have been auto-generated or copied from a template and never populated.
- **No documentation**: The file provides zero insight into intended report-related enumerations, making it difficult to design or migrate to a future implementation without additional context.
None identified beyond the above.

View File

@@ -0,0 +1,251 @@
---
source_files:
- Common/DTS.CommonCore/Enums/Sensors/SensorChangeTypes.cs
- Common/DTS.CommonCore/Enums/Sensors/SensorStatus.cs
- Common/DTS.CommonCore/Enums/Sensors/PossibleFilters.cs
- Common/DTS.CommonCore/Enums/Sensors/LinearizationFormula.cs
- Common/DTS.CommonCore/Enums/Sensors/CalibrationEnforcement.cs
- Common/DTS.CommonCore/Enums/Sensors/CalibrationBehaviors.cs
- Common/DTS.CommonCore/Enums/Sensors/InitialOffsetTypes.cs
- Common/DTS.CommonCore/Enums/Sensors/FilterClassType.cs
- Common/DTS.CommonCore/Enums/Sensors/ZeroMethodType.cs
- Common/DTS.CommonCore/Enums/Sensors/CSVImportTags.cs
- Common/DTS.CommonCore/Enums/Sensors/SensorConstants.cs
generated_at: "2026-04-16T02:43:43.565732+00:00"
model: "Qwen/Qwen3-Coder-Next-FP8"
schema_version: 1
sha256: "5790c6a0caacf995"
---
# Sensor Enums and Constants Module Documentation
## 1. Purpose
This module defines a comprehensive set of enumerations and constants used throughout the DTS system to represent sensor metadata, configuration, calibration behavior, and I/O channel types. It serves as the canonical source of truth for sensor-related semantic values—enabling consistent interpretation of sensor data, configuration, and import/export formats across the application. The module supports legacy compatibility (e.g., CSV import versions, zero method ordering), provides unit and range defaults for specific sensor families (e.g., TSR AIR), and includes helper methods for serial number classification and sensitivity unit parsing.
## 2. Public Interface
### Enums
#### `SensorChangeTypes`
- **Members**: `OffsetTolerance`
- **Purpose**: Represents types of changes that can be tracked for sensors. Currently only supports `OffsetTolerance`.
#### `SensorStatus`
- **Members**: `Available`, `InUse`, `OutForService`, `OutForCalibration`, `Retired`
- **Purpose**: Represents the current lifecycle status of a physical sensor.
#### `PossibleFilters`
- **Members**: `All`, `Analog`, `Squib`, `DigitalIn`, `DigitalOut`, `UART`, `StreamOut`, `StreamIn`
- **Purpose**: Specifies filter categories for channel/sensor selection (e.g., in UI or channel grouping).
#### `NonLinearStyles`
- **Members**: `IRTraccManual`, `IRTraccDiagnosticsZero`, `IRTraccZeroMMmV`, `IRTraccAverageOverTime`, `Polynomial`, `IRTraccCalFactor`
- **Purpose**: Defines nonlinear calibration styles for sensors (primarily IR-TRACC).
#### `NonLinearSLICEWareStyles`
- **Members**: `Manual`, `DiagnosticZeroMMmV`, `ZeroMMmV`, `AverageOverTime`, `Polynomial`
- **Purpose**: Defines nonlinear calibration styles specific to SLICEWare devices.
#### `CalibrationEnforcement`
- **Members**: `None`, `NonLinear`, `Linear`
- **Purpose**: Indicates whether calibration enforcement is applied and which type (linear/nonlinear). Uses `EnumDescriptionTypeConverter` and `[Description]` attributes.
#### `CalibrationBehaviors`
- **Members**: `LinearIfAvailable`, `NonLinearIfAvailable`, `UseBothIfAvailable`
- **Purpose**: Specifies preference for calibration style when both linear and nonlinear calibrations are available. Uses `EnumDescriptionTypeConverter` and `[Description]` attributes.
#### `InitialOffsetTypes`
- **Members**: `None = 0`, `EU = 1`, `EUAtMV = 2`, `LHS = 3`, `RHS = 4`, `FRONTAL = 5`
- **Purpose**: Indicates the format and meaning of the initial offset value. Uses `EnumDescriptionTypeConverter` and `[Description]` attributes.
#### `FilterClassType`
- **Members**: `None = 0`, `AdHoc = -1`, `Unfiltered = -2`, `CFC10 = 17`, `CFC60 = 100`, `CFC180 = 300`, `CFC600 = 1000`, `CFC1000 = 1650`
- **Purpose**: Represents SAE filter class definitions (e.g., CFC 100 = 100 Hz cutoff). Uses `EnumDescriptionResource` attributes for localization.
#### `ZeroMethodType`
- **Members**: `AverageOverTime = 0`, `UsePreEventDiagnosticsZero = 1`, `None = 2`
- **Purpose**: Specifies the method used to compute the software zero reference. Legacy ordering is preserved for CSV import compatibility. Uses `EnumDescriptionTypeConverter`.
#### `OriginalZeroMethodType`
- **Members**: `AverageOverTime`, `UsePreCalZero`, `None`
- **Purpose**: Original version of zero method types; likely retained for backward compatibility or migration.
#### `SensorConstants.SensorType`
- **Members**: `Analog`, `DigitalIn`, `DigitalOut`, `Squib`, `Clock`, `UART`, `StreamOut`, `StreamIn`
- **Purpose**: High-level classification of sensor/channel types.
#### `SensorConstants.BridgeType`
- **Members**: `IEPE`, `QuarterBridge`, `HalfBridge`, `FullBridge`, `DigitalInput`, `SQUIB`, `TOMDigital`, `HalfBridge_SigPlus`, `RTC`, `UART`, `StreamOut`, `StreamIn`
- **Purpose**: Bitmask-style enumeration representing bridge configuration and channel type. Includes helper methods `ConvertIntToBridgeType` and `ConvertBridgeToInt`.
#### `SensorConstants.SensUnits`
- **Members**: `NONE`, `mV`, `mVperV`, `mVperVperEU`, `mVperEU`
- **Purpose**: Sensitivity unit types. Includes `SensUnitStringConverter.ConvertFromString` for parsing.
#### `SensorConstants.SensorCalPolicy`
- **Members**: `AllowAlways`, `DONT_ALLOW`
- **Purpose**: Policy for handling out-of-calibration sensors.
#### `SensorConstants.CouplingModes`
- **Members**: `AC = 0`, `DC`
- **Purpose**: IEPE/analog coupling mode.
#### `SensorConstants.AvailableRangesLowG`
- **Members**: `LowG64D`, `LowG32D`, `LowG16D`, `LowG8D`
- **Purpose**: Valid low-g ranges for TSR AIR sensors.
#### `SensorConstants.AvailableRangesARS`
- **Members**: `ARS2000D`, `ARS250D`
- **Purpose**: Valid angular rate sensor (ARS) ranges.
### Constants & Static Properties (in `SensorConstants`)
#### Unit Strings
- `VOLTAGE_INSERTION_UNIT = "mV"`
- `TSRAIR_ACCEL_UNIT = "g"`
- `TSRAIR_ARS_UNIT = "deg/sec"`
- `TSRAIR_TEMPERATURE_UNIT = "C"`
- `TSRAIR_HUMIDITY_UNIT = "%"`
- `TSRAIR_PRESSURE_UNIT = "PSI"`
- `DEGREES = "deg"`
- `DEGREE_ANGLE = "deg-ang"`
- `LinearValuesSeparator = "||"`
#### Bridge Resistance Limits
- `MIN_BRIDGE_RESISTANCE_OHMS = 1`
- `MAX_BRIDGE_RESISTANCE_OHMS = 32000`
#### Calibration Defaults
- `SENSOR_FIRST_USE_DEFAULT = false`
- `UseSensorFirstUseDate = false` *(cached, mutable)*
- `UseISOCodeFilterMapping = true` *(cached, mutable)*
- `DefaultZeroMethodType = ZeroMethodType.AverageOverTime` *(cached, mutable)*
- `DefaultZeroMethodStart = -0.05D`
- `DefaultZeroMethodEnd = -0.02D`
- `CAL_SENSOR_POLICY_DEFAULT = DONT_ALLOW`
- `CAL_SENSOR_POLICY_WARNING_DAYS_DEFAULT = 14`
- `SensorCalOutOfDateWarningPeriodDays = 14` *(mutable)*
- `SensorCalPolicyCurrent = DONT_ALLOW` *(mutable)*
#### TSR AIR Default Ranges
- `DefaultRangeHiG = 400D`
- `DefaultRangeLowG = 64D`
- `DefaultRangeLowGDisplay = 50D`
- `DefaultRangeARS = 2000D`
- `DefaultRangeTemperature = 85D`
- `DefaultRangeHumidity = 100D`
- `DefaultRangePressure = 16D`
#### Squib & Digital Output Defaults (for "Restore Defaults")
- `SQUIB_DELAY_CONSTANT = 0D`
- `SQUIB_LIMIT_DURATION_CONSTANT = true`
- `SQUIB_DURATION_CONSTANT = 10D`
- `SQUIB_LOW_TOLERANCE_CONSTANT = 1D`
- `SQUIB_HIGH_TOLERANCE_CONSTANT = 10D`
- `SQUIB_CURRENT_CONSTANT = 1.5D`
- `DIGITALOUT_DELAY_CONSTANT = 0D`
- `DIGITALOUT_LIMITDURATION_CONSTANT = true`
- `DIGITALOUT_DURATION_CONSTANT = 10D`
#### UART Defaults
- `UART_BAUDRATE_CONSTANT = 57600`
- `UART_DATABITS_CONSTANT = 8`
- `UART_STOPBITS_CONSTANT = StopBits.One`
- `UART_PARITY_CONSTANT = Parity.None`
- `UART_FLOWCONTROL_CONSTANT = Handshake.None`
- `UART_DATAFORMAT_CONSTANT = UartDataFormat.Binary`
#### Stream I/O Defaults
- `STREAMIN_ADDRESS_CONSTANT = "UDP://239.1.2.10:8400"`
- `STREAMOUT_PROFILE_CONSTANT = UDPStreamProfile.CH10_PCM_128BIT_2HDR`
- `STREAMOUT_ADDRESS_CONSTANT = "UDP://239.1.2.10:8400"`
- `STREAMOUT_TIME_CHID_CONSTANT = 1`
- `STREAMOUT_DATA_CHID_CONSTANT = 3`
- `STREAMOUT_TMNS_CONFIG_CONSTANT = "(1,6,60,0,0,0,0,0)"`
- `STREAMOUT_IRIG_TDP_INTERVAL_CONSTANT = 500`
#### Test-Specific Serial Number Prefixes
- `TEST_SPECIFIC_DOUT = "TSD_"`
- `TEST_SPECIFIC_SQUIB = "TSQ_"`
- `TEST_SPECIFIC_DIN = "TSI_"`
- `TEST_SPECIFIC_EMB = "TSA_"`
- `TEST_SPECIFIC_EMB_CLK = "TSC_"`
- `TEST_SPECIFIC_UART = "TSU_"`
- `TEST_SPECIFIC_STREAM_OUT = "TSS_"`
- `TEST_SPECIFIC_STREAM_IN = "TSN_"`
#### Helper Methods
- `IsTestSpecificDigitalOut(string sn)`
- `IsTestSpecificSquib(string sn)`
- `IsTestSpecificDigitalIn(string sn)`
- `IsTestSpecificEmbedded(string sn)`
- `IsTestSpecificEmbeddedClock(string sn)`
- `IsTestSpecificStreamOut(string sn)`
- `IsTestSpecificStreamIn(string sn)`
- `IsTestSpecificUart(string sn)`
- `IsTSRAirHighGChannel(string moduleSerialNumber)`
- `IsTSRAirLowGChannel(string moduleSerialNumber)`
- `IsTSRAirARSChannel(string moduleSerialNumber)`
- `IsTSRAirAtmChannel(string moduleSerialNumber)`
- `IsTSRAirHumidityChannel(string moduleSerialNumber, int channelNumber)`
### `CSVImportTags` (abstract class)
#### Constants
- `MIN_VALID_VERSION = 0`
- `MAX_VALID_VERSION = 6`
- `IsSensorTag(int version)``bool` (returns `true` for versions `{0, 2, 3, 4}`)
#### Static Methods
- `GetVersionTags(int version)``Tags[]`
- `GetStringForTag(Tags tag)``string`
- `GetTagForString(string s)``Tags` (returns `Tags.Unknown` if not found)
- `GetVersionForTag(Tags t)``int` (returns `int.MaxValue` if not found)
#### `CSVImportTags.Tags` Enum (partial list)
- **Version 0**: `DatabaseReferenceNumber`, `SensorSN`, `ChannelName`, `Location`, `SensorType`, `EU`, `FullScale`, `Exc`, `OutputAtEXCFSmV`, `Sensitivity`, `FilterClass`, `SoftwareZeroReference`, `SoftwareZeroEquivalentEU`, `OffsetToleranceLow`, `OffsetToleranceHigh`, `BridgeResistance`, `ShuntResistorValue`, `CalInterval`, `ZeroMethod`, `ZeroMethodStart`, `ZeroMethodEnd`, `InitialOffset`, `NonLinear`, `NonLinearCalibration`, `DisplayUnits`, `UserCode`, `UserChannelName`, `ISOChannelName`, `UserChannelName`, `AdditionalLinearSensitivity`, `AdditionalLinearZeroMethod`, `AdditionalInitialOffsets`, `GroupName`, `GroupType`, `DASSerialNumber`, `DASChannelIndex`, `StreamProfile`, `UDPAddress`, `TimeChannelId`, `DataChannelId`, `TmNSConfig`, `IRIGTimeDataPacketIntervalMS`, `TMATSIntervalMS`, `BaudRate`, `DataBits`, `StopBits`, `Parity`, `DataFormat`, `TestUserCode`, `TestUserChannelName`, `TestIsoCode`, `TestIsoChannelName`, `ClockMasterInputType`, `ClockMasterOutputType`, `ManageClocksOutsideDPMaster`, `ManageClocksOutsideDPSlave`, `ClockSlaveInputType`, `ClockSlaveOutputType`, `DASSerial`, `DASSampleRate`, `PTPDomainId`, `ClockMaster`, `Version`, `TestSetupName`, `TestSetupDescription`, `RecordingMode`, `SampleRate`, `PreTriggerSec`, `PostTriggerSec`, `Tags`, `TwoVoltExcSensitivity`, `FiveVoltExcSensitivity`, `TenVoltExcSensitivity`, `RangeLow`, `RangeMedium`, `RangeHigh`, `SupportedExcitation`, `BridgeType`, `Unipolar`, `AxisNumber`, `NumberOfAxes`, `Polarity`, `PhysicalDimension`, `Direction`, `CheckOffset`, `Broken`, `DoNotUse`, `AtCapacity`, `CapacityOutputIsBasedOn`, `SensitivityUnits`, `CouplingMode`, `DelayMS`, `DigitalOutputDelayMS`, `DurationMS`, `DigitalOutputDurationMS`, `DigitalOutputMode`, `LimitDuration`, `SquibFireMode`, `SquibMeasurementType`, `SquibOutputCurrent`, `DigitalScaleMultiplier`, `DigitalInputMode`, `ZeroMethod`, `ZeroMethodStart`, `ZeroMethodEnd`, `BridgeLegMode`, `Created`, `TimesUsed`, `IRTRACCExponent`, `Unknown`
- **Version 1**: Adds `Version`, `TestSetupName`, `TestSetupDescription`, `RecordingMode`, `SampleRate`, `PreTriggerSec`, `PostTriggerSec`, `Tags`
- **Version 2**: Adds many fields (e.g., `TwoVoltExcSensitivity`, `ZeroMethod`, `InitialOffset`, `NonLinear`, `DigitalOutputMode`, `SquibFireMode`, `CouplingMode`, `DelayMS`, `DigitalOutputDelayMS`, `DurationMS`, `DigitalOutputDurationMS`, `DigitalOutputMode`, `LimitDuration`, `SquibFireMode`, `SquibMeasurementType`, `SquibOutputCurrent`, `DigitalScaleMultiplier`, `DigitalInputMode`, `NonLinearCalibration`, `DisplayUnits`, `AtCapacity`, `CapacityOutputIsBasedOn`, `SensitivityUnits`, `CheckOffset`, `Broken`, `DoNotUse`, `ISOChannelName`, `UserCode`, `UserChannelName`, `AdditionalLinearSensitivity`, `AdditionalLinearZeroMethod`, `AdditionalInitialOffsets`, `GroupName`, `GroupType`, `DASSerialNumber`, `DASChannelIndex`, `StreamProfile`, `UDPAddress`, `TimeChannelId`, `DataChannelId`, `TmNSConfig`, `IRIGTimeDataPacketIntervalMS`, `TMATSIntervalMS`, `BaudRate`, `DataBits`, `StopBits`, `Parity`, `DataFormat`, `TestUserCode`, `TestUserChannelName`, `TestIsoCode`, `TestIsoChannelName`, `ClockMasterInputType`, `ClockMasterOutputType`, `ManageClocksOutsideDPMaster`, `ManageClocksOutsideDPSlave`, `ClockSlaveInputType`, `ClockSlaveOutputType`, `DASSerial`, `DASSampleRate`, `PTPDomainId`, `ClockMaster`)
- **Version 3**: Adds `GroupName`, `GroupType`
- **Version 4**: Adds `DASSerialNumber`, `DASChannelIndex`, `StreamProfile`, `UDPAddress`, `TimeChannelId`, `DataChannelId`, `TmNSConfig`, `IRIGTimeDataPacketIntervalMS`, `TMATSIntervalMS`, `BaudRate`, `DataBits`, `StopBits`, `Parity`, `DataFormat`, `TestUserCode`, `TestUserChannelName`, `TestIsoCode`, `TestIsoChannelName`
- **Version 5**: Adds `ClockMasterInputType`, `ClockMasterOutputType`, `ManageClocksOutsideDPMaster`, `ManageClocksOutsideDPSlave`, `ClockSlaveInputType`, `ClockSlaveOutputType`
- **Version 6**: Adds `DASSerial`, `DASSampleRate`, `PTPDomainId`, `ClockMaster`
> Note: `Tags.Unknown` is returned for unrecognized strings in `GetTagForString`.
## 3. Invariants
- **CSV Import Versions**: Valid import versions are `0`, `2`, `3`, `4` (per `_SensorTagsVersions`). Versions `1`, `5`, and `6` are *not* included in `IsSensorTag`, but are still valid for general import (as `GetVersionTags` supports them).
- **Zero Method Ordering**: `ZeroMethodType` enum values are ordered to preserve legacy compatibility (e.g., `AverageOverTime = 0`, `UsePreEventDiagnosticsZero = 1`, `None = 2`). Changing order may break CSV import/export.
- **Bridge Type Conversion**: `ConvertBridgeToInt` and `ConvertIntToBridgeType` use non-bitmask integer mappings (e.g., `FullBridge → 3`, `QuarterBridge → 1`). Do not assume bitmask semantics for storage.
- **Sensitivity Unit Parsing**: `SensUnitStringConverter.ConvertFromString` is case-insensitive and accepts multiple aliases (e.g., `"mvperv"``mVperV`). Throws `InvalidCastException` for unrecognized strings.
- **TSR AIR Channel Detection**: Channel type detection is based on serial number suffixes (`"-High g"`, `"-Low g"`, `"-ARS"`, `"-Atm"`). Case-sensitive.
- **Test-Specific Serial Number Prefixes**: Prefixes are exact string matches (e.g., `"TSQ_"`). No wildcard or partial matching.
- **Calibration Policy Defaults**: `CAL_SENSOR_POLICY_DEFAULT = DONT_ALLOW`, `CAL_SENSOR_POLICY_WARNING_DAYS_DEFAULT = 14`. Mutable statics (`SensorCalPolicyCurrent`, `SensorCalOutOfDateWarningPeriodDays`) may be updated at runtime.
## 4. Dependencies
### Internal Dependencies
- `DTS.Common.Converters.EnumDescriptionTypeConverter`
- `DTS.Common.Attributes.VersionAttribute`, `System.ComponentModel.DataAnnotations.DisplayAttribute`
- `System.IO.Ports` (for `StopBits`, `Parity`, `Handshake`)
- `System.IO` (for `InvalidCastException` in `SensUnitStringConverter`)
### External Dependencies
- `System` (core types: `string`, `int`, `double`, `bool`, `Enum`, `Dictionary`, `HashSet`, `Exception`)
- `System.ComponentModel.DataAnnotations` (for `DisplayAttribute`)
- `System.IO.Ports` (for `StopBits`, `Parity`, `Handshake`)
### Usage
- This module is referenced by modules handling sensor configuration, CSV import/export, channel filtering, diagnostics, and calibration enforcement.
## 5. Gotchas
- **`ZeroMethodType` vs `OriginalZeroMethodType`**:

View File

@@ -0,0 +1,80 @@
---
source_files:
- Common/DTS.CommonCore/Enums/Sensors/SensorsList/DigitalInputFields.cs
- Common/DTS.CommonCore/Enums/Sensors/SensorsList/DigitalOutFields.cs
- Common/DTS.CommonCore/Enums/Sensors/SensorsList/SensorListTabs.cs
- Common/DTS.CommonCore/Enums/Sensors/SensorsList/UartSettingFields.cs
- Common/DTS.CommonCore/Enums/Sensors/SensorsList/SquibFields.cs
- Common/DTS.CommonCore/Enums/Sensors/SensorsList/StreamInSettingFields.cs
- Common/DTS.CommonCore/Enums/Sensors/SensorsList/StreamOutSettingFields.cs
- Common/DTS.CommonCore/Enums/Sensors/SensorsList/CACOption.cs
- Common/DTS.CommonCore/Enums/Sensors/SensorsList/AnalogSensorFields.cs
generated_at: "2026-04-16T02:45:01.449243+00:00"
model: "Qwen/Qwen3-Coder-Next-FP8"
schema_version: 1
sha256: "ee886777e1e8fa53"
---
# SensorsList
## Documentation: Sensor Field Enumerations
---
### 1. Purpose
This module defines a set of strongly-typed enumerations that specify the *editable or displayable fields* for various sensor configuration types within the system (e.g., analog sensors, digital inputs/outputs, squibs, UART, stream in/out). Each enum lists the valid field identifiers that can be used for operations such as UI binding, data serialization/deserialization, or field-level validation—ensuring consistency across components that interact with sensor metadata. These enums do not contain logic or behavior themselves; they serve as *metadata contracts* for structured sensor data.
---
### 2. Public Interface
All types are `public enum`s under the namespace `DTS.Common.Enums.Sensors.SensorsList`. No classes, methods, or properties are exposed.
| Enum Name | Fields (in order declared) | Notes |
|-----------|----------------------------|-------|
| `DigitalInputFields` | `Included`, `SerialNumber`, `Description`, `Mode`, `ModifiedBy`, `LastModified` | Represents fields for digital input sensors. |
| `DigitalOutFields` | `Included`, `SerialNumber`, `Description`, `Delay`, `Duration`, `ModifiedBy`, `LastModified` | Represents fields for digital output sensors. |
| `SensorListTabs` | `ANALOG = 0`, `SQUIB = 1`, `DIGITAL_IN = 2`, `DIGITAL_OUT = 3`, `UART = 4`, `STREAM_IN = 5`, `STREAM_OUT = 6` | Defines tab identifiers for UI navigation; values are explicit integers. |
| `UartSettingFields` | `Included`, `SerialNumber`, `BaudRate`, `DataBits`, `StopBits`, `Parity`, `FlowControl`, `DataFormat`, `LastModifiedBy`, `LastModified` | Represents UART configuration fields. |
| `SquibFields` | `Included`, `SerialNumber`, `Description`, `ResistanceLow`, `ResistanceHigh`, `Id`, `Mode`, `Delay`, `Current`, `Duration`, `ModifiedBy`, `LastModified` | Represents squib (explosive device) sensor fields. |
| `StreamInSettingFields` | `Included`, `SerialNumber`, `Description`, `LastModifiedBy`, `LastModified`, `UDPAddress` | Represents stream input (e.g., UDP) configuration fields. |
| `StreamOutSettingFields` | `Included`, `SerialNumber`, `Description`, `LastModifiedBy`, `LastModified`, `UDPProfile`, `UDPAddress`, `UDPTimeChannelId`, `UDPDataChannelId`, `UDPTmNSConfig`, `IRIGTimeDataPacketIntervalMs`, `TMATSIntervalMs` | Represents stream output configuration fields. |
| `AnalogSensorFields` | `Included`, `SerialNumber`, `Description`, `Manufacturer`, `Model`, `Capacity`, `CalInterval`, `Sensitivity`, `LinearSensitivity`, `Resistance`, `Excitation`, `Units`, `Id`, `CalDate`, `CalDueDate`, `ModifiedBy`, `LastModified`, `IEPE`, `OutOfDate`, `InWarningPeriod`, `NonLinearCalucationType`, `ZeroMethod`, `ZeroMethodStart`, `ZeroMethodEnd`, `FirstUseDate`, `UserValue1`, `UserValue2`, `UserValue3` | Represents comprehensive analog sensor fields. **Note**: `NonLinearCalucationType` appears to be a typo for *CalculationType* (see *Gotchas*). |
| `CACOption` | `Manual`, `Capacity`, `RangeHigh`, `RangeMedium`, `RangeLow` | Represents calibration/characterization options. Each value is decorated with `[DescriptionResourceAttribute]` referencing external resource keys (e.g., `"CAC_Manual"`). |
---
### 3. Invariants
- **Field naming consistency**: All enums (except `CACOption` and `SensorListTabs`) begin with `Included`, `SerialNumber`, and `Description`. This suggests a common baseline for sensor metadata.
- **Audit fields**: All sensor-related enums (except `SensorListTabs` and `CACOption`) include `ModifiedBy` and `LastModified` (or `LastModifiedBy` in some cases). `StreamInSettingFields` and `StreamOutSettingFields` use `LastModifiedBy`, while others use `ModifiedBy`—this is inconsistent but intentional per source.
- **`SensorListTabs` is exhaustive**: The enum values cover all known sensor tab types (`ANALOG`, `SQUIB`, `DIGITAL_IN`, `DIGITAL_OUT`, `UART`, `STREAM_IN`, `STREAM_OUT`), with no gaps or extras.
- **`CACOption` values are fixed**: Only five options exist, each annotated with `[DescriptionResourceAttribute]`. The enum itself does not define behavior—only labels.
- **No overlap between enums**: Each enum represents a distinct sensor *type* or *category*; no field name appears in multiple enums with conflicting semantics (e.g., `Delay` exists in `DigitalOutFields` and `SquibFields`, but contextually appropriate).
---
### 4. Dependencies
- **Internal dependencies**:
- `DTS.Common.Base.Classes` (for `DescriptionResourceAttribute` used in `CACOption.cs`).
- `System.*` namespaces (`System`, `System.Collections.Generic`, etc.) are imported in `StreamInSettingFields.cs` but unused—likely legacy or auto-generated.
- **Consumers (inferred)**:
- UI layers (e.g., tab management via `SensorListTabs`, field binding via other enums).
- Data persistence or serialization modules (e.g., mapping JSON/XML fields to enum values).
- Validation or configuration editors that operate on sensor metadata.
- **No external (non-.NET) dependencies** are evident.
---
### 5. Gotchas
- **Typo in `AnalogSensorFields`**: The field `NonLinearCalucationType` is misspelled (`Calucation` instead of `Calculation`). This is likely a historical bug that must be preserved for backward compatibility.
- **Inconsistent audit field naming**: Most enums use `ModifiedBy` and `LastModified`, but `UartSettingFields`, `StreamInSettingFields`, and `StreamOutSettingFields` use `LastModifiedBy` instead of `ModifiedBy`. This may cause mismatches in generic processing logic if field names are assumed uniform.
- **`CACOption` requires resource resolution**: The enum values have no intrinsic string representation—`DescriptionResourceAttribute` implies runtime lookup via a resource manager (e.g., `ResourceManager`). Consumers must handle localization or fallback.
- **`StreamInSettingFields` has unused imports**: The file imports `System.*` namespaces but does not use them. May indicate incomplete cleanup or future expansion.
- **No `Included` semantics defined**: While all sensor enums include `Included`, its meaning (e.g., `true`/`false`, `0`/`1`, or presence/absence flag) is not specified here—it is context-dependent and must be inferred from usage.
- **`FirstUseDate` comment**: The comment `//13065 Sensor "First Use" Date` suggests a legacy ticket/issue ID; its relevance or validation rules are not documented here.
None identified beyond the above.

View File

@@ -0,0 +1,50 @@
---
source_files:
- Common/DTS.CommonCore/Enums/SettingsExport/TopLevelFields.cs
generated_at: "2026-04-16T02:43:04.993021+00:00"
model: "Qwen/Qwen3-Coder-Next-FP8"
schema_version: 1
sha256: "d94295ae09d6b074"
---
# SettingsExport
### **1. Purpose**
This module defines a strongly-typed enumeration (`TopLevelFields`) representing the allowed top-level XML element names used in settings export/serialization contexts within the DTS system. It serves as a canonical source of truth for the root tags that may appear in XML configuration files, ensuring consistency across serialization, deserialization, and validation logic throughout the codebase.
---
### **2. Public Interface**
The module exposes only one public type:
- **`TopLevelFields`** (`enum`)
Represents the set of valid top-level XML element names.
Members:
- `GlobalSettings`
- `TestSetupDefaultSettings`
- `SensorSettings`
- `TestHistorySettings`
Each member corresponds to a specific configuration section in exported XML. No methods, properties, or constructors are defined on the enum.
---
### **3. Invariants**
- The set of enum values is **fixed** and exhaustive for top-level XML tags used in settings export.
- No additional values may be added without updating all consumers that rely on this enum for validation or routing logic.
- The underlying type is the default `int` (not explicitly specified, but standard for C# enums without a base type).
- Enum values are **case-sensitive** and must match the exact string names used in XML (e.g., `<GlobalSettings>` not `<globalsettings>`), though case handling in XML parsing is typically managed elsewhere.
---
### **4. Dependencies**
- **Depends on**: None (self-contained enum in `DTS.Common.Enums.SettingsExport` namespace).
- **Used by**: Implicitly, any module responsible for XML settings export/import (e.g., serializers, configuration loaders, validators). While not visible in this source file, typical consumers would include classes handling XML serialization (e.g., `XmlSerializer`-based exporters) or schema validation logic that routes based on the root element.
---
### **5. Gotchas**
- **No documentation on XML schema mapping**: The enum names are used as-is in XML, but the source provides no indication of whether XML element names are case-sensitive, whether aliases exist, or how namespace prefixes are handled.
- **No extensibility mechanism**: Adding a new top-level field requires recompilation and careful coordination across all consumers, as there is no fallback or dynamic registration pattern evident here.
- **No versioning guidance**: The enum does not indicate whether older XML formats with different root tags are supported or deprecated.
- **None identified from source alone** — further context from serialization/deserialization logic would be needed to confirm behavior (e.g., how unknown root tags are handled).

View File

@@ -0,0 +1,63 @@
---
source_files:
- Common/DTS.CommonCore/Enums/SliceSimpleArm/SSACommands.cs
generated_at: "2026-04-16T02:43:56.731605+00:00"
model: "Qwen/Qwen3-Coder-Next-FP8"
schema_version: 1
sha256: "50cc5ab91bad7384"
---
# SliceSimpleArm
### 1. Purpose
This module defines the command and response enumerations used for communication with a SliceSimpleArm (SSA) subsystem—likely a hardware control or embedded device interface. `SSACommand` enumerates the set of high-level operations that can be issued to the device (e.g., arming, starting recording, diagnostics), while `SSAResponse` enumerates the possible structured responses the system may return, including success/failure states and specific error conditions (e.g., `NoSensorsFound`, `DiagnosticsFailedOffsetTolerance`). These enums serve as the contract for commandresponse semantics between the host software and the SSA hardware or its simulator.
### 2. Public Interface
The module exposes two public enums:
- **`SSACommand`**
*Type:* `enum`
*Values:*
- `ConfigureDevice` Likely used to initialize or reconfigure device parameters.
- `Diagnostics` Triggers a self-test or health check.
- `Arm` Arms the device for operation (e.g., enables data acquisition or triggering).
- `StartRecord` Begins data recording.
- `CheckForArmed` Polls the device to verify if it is armed.
- `Disarm` Disarms the device, halting active operations.
- `Download` Requests data or logs from the device.
- `SetLowPowerMode` Puts the device into a low-power state.
- `Trigger` Sends an external trigger command (e.g., manual or timed trigger).
- **`SSAResponse`**
*Type:* `enum`
*Values:*
- `Unknown` Default/unrecognized response.
- `Status` Generic status update (possibly informational).
- `Pass` Operation completed successfully.
- `Fail` Operation failed for unspecified reason.
- `SystemNotArmed` Requested operation requires the system to be armed first.
- `NoSensorsFound` No sensors detected during diagnostics or configuration.
- `NoEIDsFound` No EIDs (Event Identifiers?) found—likely during configuration or diagnostics.
- `UnknownEIDFound` An unexpected or invalid EID was encountered.
- `NoDASConnected` Data Acquisition System (DAS) is not connected or detected.
- `ExceptionThrown` An exception occurred during command processing.
- `DiagnosticsFailedOffsetTolerance` Diagnostics failed due to sensor offset exceeding tolerance.
- `DiagnosticsFailedShuntCheck` Diagnostics failed during shunt verification (e.g., electrical integrity test).
### 3. Invariants
- The `SSACommand` and `SSAResponse` enums are strictly *declarative*—they define symbolic names only; no validation, serialization, or parsing logic resides in this file.
- Each `SSACommand` value corresponds to a well-defined operation in the SSA protocol; similarly, each `SSAResponse` value represents a distinct outcome or error condition.
- No ordering guarantees are implied by the enum values (i.e., they are not ordered by priority, frequency, or sequence).
- The `Unknown` value in both enums likely serves as a sentinel for uninitialized or unhandled cases.
### 4. Dependencies
- **Internal dependencies:** This module resides in `DTS.Common.Enums.SliceSimpleArm`, suggesting it is part of a shared/common library (`DTS.CommonCore`). It has no external dependencies beyond the base .NET runtime (no `using` directives beyond `namespace`).
- **Consumers:** Other modules in the codebase (e.g., communication layers, device drivers, UI logic) likely reference this enum to construct commands and interpret responses. The presence of `DTS.Common` in the namespace implies this is a cross-cutting contract used by higher-level components (e.g., `DTS.CommonCore`, `DTS.SliceSimpleArm`, or test harnesses).
- **No external libraries or hardware-specific dependencies** are declared in this file.
### 5. Gotchas
- **Ambiguity in EID/DAS terminology:** The meaning of “EID” (Event Identifier?) and “DAS” (Data Acquisition System?) is not defined in this file. Their usage in `NoEIDsFound`, `UnknownEIDFound`, and `NoDASConnected` suggests domain-specific concepts that require external documentation.
- **No explicit mapping to command/response payloads:** This file defines *what* commands/responses exist, but not *how* they are serialized, transmitted, or deserialized (e.g., via serial, TCP, or binary protocol). That logic resides elsewhere.
- **`Status` vs. `Pass`:** The distinction between `Status` (generic update) and `Pass` (explicit success) is unclear—`Status` may be used for intermediate or polling responses, but this is not specified.
- **No versioning or extensibility guidance:** Adding new commands/responses may break backward compatibility if consumers switch on all values; no attributes or patterns (e.g., `[Flags]`) suggest safe extension strategies.
- **None identified from source alone.**

View File

@@ -0,0 +1,43 @@
---
source_files:
- Common/DTS.CommonCore/Enums/TSRAIRGo/NavigationButtonId.cs
generated_at: "2026-04-16T02:42:58.260456+00:00"
model: "Qwen/Qwen3-Coder-Next-FP8"
schema_version: 1
sha256: "1fad088aa5051ccc"
---
# TSRAIRGo
### 1. Purpose
This module defines a strongly-typed enumeration of navigation button identifiers used within the TSRAIRGo application context. It serves as a centralized, type-safe contract for referencing specific UI navigation actions—such as arming/disarming a system, triggering events, downloading data, or accessing help—across the codebase, ensuring consistency between UI components, routing logic, and business logic layers.
### 2. Public Interface
The module exposes a single public type:
- **`NavigationButtonId`** (`enum`)
A set of named constants representing distinct navigation button roles in the TSRAIRGo UI. Each member corresponds to a specific user-facing action:
- `TestId`: Reserved for internal testing purposes.
- `ArmDisarm`: Toggles system arming/disarming state.
- `Trigger`: Initiates an immediate action or event (e.g., manual trigger).
- `Download`: Initiates data download functionality.
- `ViewData`: Opens a view for inspecting current or historical data.
- `ExportData`: Exports data to an external format (e.g., CSV, JSON).
- `Help`: Opens help documentation or support resources.
- `Dashboard`: Navigates to the main dashboard view.
### 3. Invariants
- All values are compile-time constants; no runtime mutation is possible.
- The enum is strictly additive: new members may be added, but existing members must not be renamed or removed without coordinated updates across consumers.
- No implicit ordering or numeric semantics are assumed by the enum definition itself (though underlying `int` values default to 0, 1, 2, … in declaration order).
- `TestId` is intended solely for testing; its use in production code is discouraged but not enforced by the type system.
### 4. Dependencies
- **Depends on**: None (standalone `enum` with no external references).
- **Depended on by**: Likely consumed by UI frameworks (e.g., Blazor, WPF, or MAUI), navigation routers, command handlers, or analytics modules that map button clicks to actions. Specific consumers cannot be inferred from this file alone.
### 5. Gotchas
- The enum does not define any validation logic or metadata (e.g., labels, icons, or permissions); such data must be maintained separately (e.g., via attributes, switch statements, or configuration).
- `TestId` has no documented runtime behavior—its purpose is ambiguous without context from other modules.
- No `Flags` attribute is applied, so bitwise combinations are not semantically supported (though technically possible in C#).
- None identified from source alone.

View File

@@ -0,0 +1,94 @@
---
source_files:
- Common/DTS.CommonCore/Enums/TTS/TTSEnums.cs
generated_at: "2026-04-16T02:43:11.533810+00:00"
model: "Qwen/Qwen3-Coder-Next-FP8"
schema_version: 1
sha256: "f097505e03f0c09d"
---
# TTS
## Documentation: `DTS.Common.Enums.TTS.TTSEnums`
### 1. Purpose
This module defines enumerations and supporting attributes used to manage field-level metadata for TTS (likely *Test & Test System* or *Transducer Test System*) import configurations, specifically addressing legacy column mapping issues (e.g., issue #18396). It provides a structured way to classify fields by their current relevance (`RequiredParameter`, `RemainedButNotUsed`, `RemovedParameter`) and supports parsing and validation of TTS import data through the `FieldSupportAttribute`. The enums `ToyotaFieldOrder`, `ToyotaBridgeType`, and `ToyotaZeroMethods` model domain-specific configuration options for sensor/channel setup.
---
### 2. Public Interface
#### `FieldSupportLevel` enum
- **Values**:
- `RequiredParameter`: Field is actively used and required.
- `RemainedButNotUsed`: Field exists in legacy data but is ignored in processing.
- `RemovedParameter`: Field is obsolete and no longer present in current data formats.
#### `FieldSupportAttribute` class
- **Inherits**: `Attribute`
- **Usage**: Applied to enum fields to declare their support status.
- **Properties**:
- `SupportLevel`: Gets or sets the `FieldSupportLevel` value assigned to the attributed enum member.
- **Methods**:
- `FieldSupportAttribute(FieldSupportLevel value)`: Constructor setting `SupportLevel`.
- `static FieldSupportLevel GetSupportLevel(Enum genericEnum)`:
- Returns the `FieldSupportLevel` associated with the given enum value via its `FieldSupportAttribute`.
- If no attribute is present, returns `FieldSupportLevel.RemovedParameter` as default.
#### `ToyotaFieldOrder` enum
- **Purpose**: Represents ordered column indices for TTS import (e.g., CSV/Excel), with each member annotated with `FieldSupportAttribute`.
- **Key Members**:
- `ChannelNumber`, `ChannelCode`, `JCodeOrDescription`, `ChannelRange`, `ChannelFilterHz`, `SensorSerialNumber`, `SensorExcitationVolts`, `SensorPolarity`: Marked `RequiredParameter`.
- `SensorID`, `SensorSensitivity`, `SensorCapacity`, `SensorEU`, `ChannelType`, `Description`, `ProportionalToExcitation`, `BridgeResistance`, `InitialOffsetVoltage`, `RemoveOffset`, `ZeroMethod`: Marked `RemainedButNotUsed`.
- `InitialOffsetVoltageTolerance`, `CableCompensationMultiplier`, `InitialEUInMV`, `InitialEUInEU`, `IRTRACCExponent`, `PolynomialConstant`, `PolynomialCoefficentC/B/A/Alpha`, `ISOCode`, `ISODescription`, `ISOPolarity`, `KyowaSpecificField_1`: Marked `RemovedParameter`.
#### `ToyotaBridgeType` enum
- **Purpose**: Defines supported bridge configurations for sensors.
- **Values**:
- `FullBridge`, `HalfBridge`, `Voltage`, `PotentionmeterFullBridge`, `PotentionmeterHalfBridge`, `IRTRACC`, `LinearChestPot`.
- **Notes**: Each value has a `[Description]` attribute (from `System.ComponentModel`), but no custom attribute or behavior is defined for it in this file.
#### `ToyotaZeroMethods` enum
- **Purpose**: Specifies zeroing methods for sensor calibration.
- **Values**:
- `None = 0` (Description: `"0"`),
- `AverageOverTime = 1` (Description: `"1"`),
- `UsePreEventDiagnosticsZero = 2` (Description: `"2"`).
- **Notes**: Only `[Description]` attributes are present; no custom support-level metadata.
---
### 3. Invariants
- **`FieldSupportAttribute.GetSupportLevel` behavior**:
- For any `Enum` value, if the field lacks a `FieldSupportAttribute`, the method **always returns `FieldSupportLevel.RemovedParameter`**.
- The method relies on reflection (`GetMember`, `GetCustomAttributes`) and is not optimized; performance may degrade with frequent use.
- **`ToyotaFieldOrder` ordering**:
- Values are explicitly assigned sequential integer indices starting at `0`, implying strict positional semantics (e.g., column order in an import file).
- The `FieldSupportLevel` annotations are *static metadata* and do not affect runtime behavior unless explicitly consumed elsewhere.
- **No validation logic is defined in this module**: The enums and attribute serve as *declarative metadata*; enforcement of support levels occurs in dependent code.
---
### 4. Dependencies
- **Dependencies on other modules**:
- `System` (core runtime types), `System.ComponentModel` (for `DescriptionAttribute`), `System.Linq` (for `Any()`, `ElementAt()` in `GetSupportLevel`).
- **Used by**:
- *Not specified in this file*, but `FieldSupportAttribute.GetSupportLevel` is clearly designed for use in TTS import/parsing logic (e.g., to filter columns during data loading).
- `ToyotaFieldOrder` is likely referenced by import handlers to map columns to properties.
- `ToyotaBridgeType` and `ToyotaZeroMethods` are likely used in sensor configuration classes or UI components.
---
### 5. Gotchas
- **`GetSupportLevel` default behavior**:
- Missing `FieldSupportAttribute` on an enum field silently defaults to `RemovedParameter`, which may mask omissions during refactoring.
- **Typos in `ToyotaBridgeType`**:
- `PotentionmeterFullBridge` and `PotentionmeterHalfBridge` are misspelled (should be *Potentiometer*). This is preserved in the source.
- **`ToyotaZeroMethods` descriptions are numeric strings**:
- Descriptions (`"0"`, `"1"`, `"2"`) match the underlying values but provide no semantic clarity. This may cause confusion if used in UI or logs.
- **No runtime enforcement of `FieldSupportLevel`**:
- The enum and attribute are *metadata-only*; consumers must explicitly check `GetSupportLevel` to act on support status.
- **Historical context**:
- The `KyowaSpecificField_1` comment references an internal Fogbugz link (`http://fogbugz/fogbugz/default.asp?5433`), suggesting legacy vendor-specific handling that may be obsolete or poorly documented.
- **Reflection overhead**:
- `GetSupportLevel` uses reflection on every call; caching is not implemented. Repeated use in hot paths may impact performance.

View File

@@ -0,0 +1,40 @@
---
source_files:
- Common/DTS.CommonCore/Enums/TestSetups/RealtimeGraphsEnum.cs
generated_at: "2026-04-16T02:44:28.591642+00:00"
model: "Qwen/Qwen3-Coder-Next-FP8"
schema_version: 1
sha256: "5da219cbdf4b218e"
---
# TestSetups
## 1. Purpose
This module defines a strongly-typed enumeration `RealtimeGraphsEnum` used to represent configurable numbers of real-time graphs in the system—specifically, one, three, or six graphs. It is part of the `DTS.Common.Enums.TestSetups` namespace and is intended for use in test setup configurations where the UI or backend logic must select or validate the number of concurrent real-time data visualizations. The enum is annotated with `[Description]` attributes and leverages a custom `EnumDescriptionTypeConverter` to support localization or display-name resolution (e.g., for UI binding or serialization).
## 2. Public Interface
- **`RealtimeGraphsEnum`**
- `One = 1` — Represents a configuration with **one** real-time graph.
- `Three = 3` — Represents a configuration with **three** real-time graphs.
- `Six = 6` — Represents a configuration with **six** real-time graphs.
All members are explicitly assigned integer values (1, 3, 6), and each has a `[Description]` attribute containing a string key (e.g., `"RealtimeGraphs_One"`) rather than a human-readable label—suggesting the actual display text is resolved externally (e.g., via resource files using the description string as a key).
## 3. Invariants
- Only the values `1`, `3`, and `6` are valid for this enum; no other numeric values are defined.
- The enum is **not** marked as `[Flags]`, so bitwise combinations are not intended or supported.
- The `[Description]` attribute values are *keys*, not display strings—consumers must resolve them via the `EnumDescriptionTypeConverter` or external localization mechanism.
- The enum relies on `DTS.Common.Converters.EnumDescriptionTypeConverter`; invalid usage without this converter may result in raw numeric values or unlocalized strings.
## 4. Dependencies
- **Depends on**:
- `System.ComponentModel` (for `DescriptionAttribute` and `TypeConverter`)
- `DTS.Common.Converters.EnumDescriptionTypeConverter` (custom type converter for resolving descriptions)
- **Used by**:
- Likely consumed by UI layers (e.g., dropdowns, configuration editors) and test setup logic in `DTS.CommonCore` or downstream modules (e.g., `DTS.TestRunner`, `DTS.UI`).
- Not directly inferable from this file, but any code that serializes/deserializes or binds to `RealtimeGraphsEnum` will depend on this type.
## 5. Gotchas
- **Non-sequential values**: The enum uses `1`, `3`, `6`—not contiguous integers. Code assuming sequential or incremental values (e.g., `for (int i = 1; i <= 6; i++)`) may fail or misbehave.
- **Description strings are keys, not labels**: The `[Description]` values (e.g., `"RealtimeGraphs_One"`) are *not* user-facing text; they are resource keys. Relying on `ToString()` or direct `DescriptionAttribute` access without the converter will yield these keys—not localized text.
- **TypeConverter dependency**: If `EnumDescriptionTypeConverter` is missing or misconfigured (e.g., in serialization contexts like JSON.NET without custom converters), deserialization or display may fall back to numeric values or fail.
- **No `Default` or `None` member**: There is no `0` or `Unspecified` value; uninitialized or invalid enum values will default to `0`, which is *not* a defined member—this may cause `InvalidCastException` or unexpected behavior if cast from an arbitrary `int`.

View File

@@ -0,0 +1,52 @@
---
source_files:
- Common/DTS.CommonCore/Enums/TestSetups/TestSetupsList/TestSetupFields.cs
generated_at: "2026-04-16T02:45:32.341303+00:00"
model: "Qwen/Qwen3-Coder-Next-FP8"
schema_version: 1
sha256: "d4958540c1aaf26d"
---
# TestSetupsList
### 1. **Purpose**
This module defines a strongly-typed enumeration (`TestSetupFields`) that specifies the set of fields available for representing or querying test setup metadata in the DTS (Data Test System) platform. It serves as a canonical list of field identifiers used throughout the system—likely in data access layers, UI binding contexts, or query builders—to ensure consistent referencing of test setup attributes (e.g., for filtering, sorting, or displaying test setup records in a list or grid).
### 2. **Public Interface**
The module exposes a single public type:
- **`TestSetupFields`** (`enum`)
- **Members**:
- `Name` (`string`-like identifier for the test setup)
- `Description` (`string`-like human-readable description)
- `RecordingMode` (`string` or enum value indicating how data is captured, e.g., continuous vs. event-triggered)
- `PreTriggerSeconds` (`double` or `int`—duration of data to capture *before* a trigger event)
- `PostTriggerSeconds` (`double` or `int`—duration of data to capture *after* a trigger event)
- `LastModified` (`DateTime`—timestamp of last modification)
- `LastModifiedBy` (`string`—identifier of the user/system that last modified the setup)
- `IsComplete` (`bool`—flag indicating whether the test setup is fully configured and ready for use)
*Note:* The enum values themselves are strongly typed symbols; their semantic usage (e.g., mapping to database columns, UI labels, or DTO properties) is determined by consumers of this enum.
### 3. **Invariants**
- The set of fields is **fixed and exhaustive** for the current version of the system: no fields are omitted or optional in the definition.
- Each enum member corresponds to a *single, well-defined* logical attribute of a test setup; no member represents multiple concepts.
- The enum is **not extensible at runtime**—new fields require source code modification and recompilation.
- The ordering of members in the enum is *not* semantically significant (i.e., `Name` is not “primary” over `Description`); however, their declaration order may be used for UI rendering or serialization in downstream code.
### 4. **Dependencies**
- **Internal dependencies**:
- `DTS.Common.Enums.TestSetups.TestSetupList` namespace (same assembly/module).
- Likely consumed by other modules in `DTS.CommonCore` (e.g., data models, query builders, UI components) that operate on test setup metadata.
- **External dependencies**: None inferred—this is a pure enum definition with no external references.
- **Consumers**: Not explicitly stated in this file, but based on naming conventions, this enum is likely used by:
- Data access layers (e.g., for column selection in SQL queries or ORM mappings)
- UI components (e.g., grid column definitions, filter/sort controls)
- API contracts (e.g., DTOs for test setup listing endpoints)
### 5. **Gotchas**
- **No validation or semantics encoded**: The enum itself does not enforce data types, nullability, or business rules (e.g., `PreTriggerSeconds` must be non-negative). Such constraints are expected to be handled elsewhere.
- **String-based usage risk**: If consumers convert enum values to strings (e.g., for dynamic queries), mismatches may occur if field names change (e.g., `LastModified` vs. `LastModifiedAt`).
- **No versioning mechanism**: Adding/removing fields requires manual coordination across all consumers; no migration or deprecation strategy is evident from this file.
- **Ambiguous types**: The enum does not specify the underlying data types for each field (e.g., `RecordingMode` could be a string, enum, or numeric code), so consumers must infer or reference external contracts.
- **None identified from source alone.** *(Note: While the above points are reasonable engineering concerns, they are not directly observable in this file.)*