7.1 KiB
7.1 KiB
source_files, generated_at, model, schema_version, sha256
| source_files | generated_at | model | schema_version | sha256 | ||||
|---|---|---|---|---|---|---|---|---|
|
2026-04-16T03:21:12.809680+00:00 | Qwen/Qwen3-Coder-Next-FP8 | 1 | c58d9167734fa176 |
DASFactory
Documentation: DASFactory Enumerations Module
1. Purpose
This module defines core enumerations used throughout the DAS (Data Acquisition System) factory configuration and diagnostics subsystem. It centralizes type-safe representations of device types, wakeup triggers, use cases, and diagnostic channel identifiers for the DAS family (e.g., TSR, G5, SLICE variants), enabling consistent interpretation of device capabilities, operational modes, and health monitoring across the codebase. The enums are designed for serialization, localization (via EnumDescriptionTypeConverter), and tight coupling to hardware-specific channel mappings.
2. Public Interface
enum WakeupTriggers
- Namespace:
DTS.Common.Enums.DASFactory - Underlying type:
int(default) - Members:
MotionDetect: Represents a motion-detection-based wakeup trigger.
- Attributes:
[TypeConverter(typeof(EnumDescriptionTypeConverter))]enables localized description extraction viaDescriptionAttribute.MotionDetecthas[Description("WakeupTriggers_MotionDetect")].
enum UseCasesTSRAIR : byte
- Namespace:
DTS.Common.Enums.DASFactory - Underlying type:
byte - Members:
AEROSPACE: Standard aerospace use case.AEROSPACE_with_motion: Aerospace use case with motion-triggered acquisition.VIBRATION: Vibration monitoring use case.SCHEDULED: Scheduled periodic acquisition.INTERVAL: Interval-based acquisition.STREAMING: Continuous streaming mode.PRETRIGGER_TEST: Pretrigger diagnostic/test mode.
- Attributes:
[TypeConverter(typeof(EnumDescriptionTypeConverter))]- Each member has a
[Description(...)]attribute with a string key (e.g.,"Aerospace","Aerospace with motion").
enum S6DBDiagnosticChannelList
- Namespace:
DTS.Common.Enums.DASFactory - Underlying type:
int(default) - Members:
- Base channels (matching legacy "Base" channels):
InputVoltage = 0BackupVoltage = 1TemperatureC = 2BatterySoc = 3
- Extended diagnostic channels:
DiagInputVoltage = 100DiagMcuTemperature = 101DiagChargerPower = 102DiagChargerInputCurrent = 103DiagEnv_1_Temperature = 104DiagEnv_1_Humidity = 105DiagEnv_2_Temperature = 106DiagEnv_2_Humidity = 107DiagEnv_3_Temperature = 108DiagEnv_3_Humidity = 109DiagEnv_4_Temperature = 110DiagEnv_4_Humidity = 111DiagEnv_5_Temperature = 112DiagEnv_5_Humidity = 113DiagBatterySoc = 114DiagBatteryPackVoltage = 115DiagBatteryPackCurrent = 116DiagBatteryFgTemperature = 117DiagBatteryThermistor1Temperature = 118DiagBatteryThermistor2Temperature = 119
- Base channels (matching legacy "Base" channels):
- Notes:
- Commented-out
DiagChargerDischargeCurrent = 104is superseded byDiagEnv_1_Temperature = 104. DiagEnv_X_Temperature/DiagEnv_X_Humiditymap to 5 environmental sensor zones.
- Commented-out
enum ConstantsAndEnums.DASType
- Namespace:
DTS.Common.Enums.DASFactory.ConstantsAndEnums - Underlying type:
int(default) - Members:
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
- Purpose: Identifies the physical/logical device type in the system.
enum ConstantsAndEnums.VoltageStatusColor
- Namespace:
DTS.Common.Enums.DASFactory.ConstantsAndEnums - Underlying type:
int(default) - Members:
Green,Red,Yellow,Off
- Purpose: Represents voltage status indicator colors (likely for UI or status reporting).
Constants (in ConstantsAndEnums)
EVENT_NUMBER_PRETEST_DIAG = -1: Identifier for pre-test diagnostic events.EVENT_NUMBER_POSTTEST_DIAG = -2: Identifier for post-test diagnostic events.EVENT_NUMBER_MEASURE_BRIDGE = -3: Identifier for bridge measurement events.
3. Invariants
- Channel numbering:
S6DBDiagnosticChannelListuses disjoint ranges:- Base channels:
[0, 3] - Extended diagnostic channels:
[100, 119] - No overlap between ranges.
- Base channels:
- Use case enum:
UseCasesTSRAIRis explicitly typed asbyte, implying storage/serialization efficiency (e.g., for protocol payloads). - Event number constants: Negative values (
-1,-2,-3) are reserved for special diagnostic events, implying positive values are used for standard measurement events. - Localization contract: All enums use
EnumDescriptionTypeConverter, requiringDescriptionAttributeon all members for correct behavior. Missing attributes may cause runtime errors during localization/description resolution.
4. Dependencies
- Imports/uses:
DTS.Common.Base.Classes(only referenced inWakeupTriggers.cs; purpose unclear from source).DTS.Common.Converters.EnumDescriptionTypeConverter(used byWakeupTriggersandUseCasesTSRAIR).System.ComponentModel(forDescriptionAttributeandTypeConverter).
- Depended on by:
- Other modules in the
DTS.Commonlibrary (e.g., device configuration, diagnostics, and protocol layers) likely consume these enums. DASTypeis used to distinguish device-specific behavior (e.g., in device drivers or factory test logic).S6DBDiagnosticChannelListis likely used in data logging, telemetry, and health-monitoring components.
- Other modules in the
5. Gotchas
- Channel ID conflict:
DiagChargerDischargeCurrent = 104is commented out butDiagEnv_1_Temperature = 104is active. If legacy code referencesDiagChargerDischargeCurrent, it will silently resolve toDiagEnv_1_Temperature. - Missing descriptions:
ConstantsAndEnums.DASTypeandConstantsAndEnums.VoltageStatusColorlack[Description]attributes. UsingEnumDescriptionTypeConverteron these enums may produce empty/incorrect descriptions. - Ambiguous
WakeupTriggers: OnlyMotionDetectis defined. Future triggers may require enum extension, but the current design does not support multiple triggers simultaneously (no[Flags]attribute). - No validation: No runtime checks enforce valid ranges (e.g., casting arbitrary
inttoS6DBDiagnosticChannelListis allowed). - No documentation for
DASTypemembers: Meanings of device types (e.g.,TOM,DIM,TSR2) are not explained in source.