14 KiB
14 KiB
source_files, generated_at, model, schema_version, sha256
| source_files | generated_at | model | schema_version | sha256 | |||||
|---|---|---|---|---|---|---|---|---|---|
|
2026-04-16T02:44:53.233679+00:00 | Qwen/Qwen3-Coder-Next-FP8 | 1 | 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
EnumDescriptionTypeConverterfor localized descriptions.
UseCasesTSRAIR
- Definition:
public enum UseCasesTSRAIR : byte - Values:
AEROSPACEAEROSPACE_with_motionVIBRATIONSCHEDULEDINTERVALSTREAMINGPRETRIGGER_TEST
- Attributes: Uses
EnumDescriptionTypeConverter.
S6DBDiagnosticChannelList
- Definition:
public enum S6DBDiagnosticChannelList - Values:
InputVoltage = 0BackupVoltage = 1TemperatureC = 2BatterySoc = 3DiagInputVoltage = 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
- Note: Values 0–3 are legacy base channels; 100+ are additional diagnostic channels.
ConstantsAndEnums.DASType
- Definition:
public enum DASType(nested inConstantsAndEnums) - 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 = -1EVENT_NUMBER_POSTTEST_DIAG = -2EVENT_NUMBER_MEASURE_BRIDGE = -3
DFConstantsAndEnums Static Properties & Methods
AlwaysShowUnsignedADC:bool(defaultfalse)OneShotWaitTimeMs:int(default3000)TemperatureLogTimeFormat:string(default"MM-dd-yyyy HH:mm:ss")TemperatureLogValueFormat:string(default"N2")TSR_AIR_HIGH_G_CUTOFF_RATE_SPS:int(value500)TSRAIR_ValidSampleRates:int[](values:[100, 500, 1000, 5000, 10000, 15000, 20000])UseDropDownForTestObjectAndPosition:bool(defaultfalse)AllowEnableFaultCheckingOnS6DB:bool(defaulttrue)TDASRemoveOffsetWeighting:double(default1.0)TDASShuntEmulationWeighting:double(default0.5)ExpectedMaxTDASDiagnosticRunTimePerChannelMS:int(default8000)IsSLICE6ERFirmware(string firmwareVersion):bool— Returnstrueif firmware version ends with"G1"or"G3"(indicating EDR firmware).UseUDPForAutoArmATDMonitor:bool(defaultfalse)ArmStateIdle = 0:byteMADEUPEVENT_TESTID = "__MadeUp__":stringNO_CONFIGURATION = "NO_CONFIGURATION":stringTOMSWITCH_ARMED = "TOMSAFETY_ARMED":stringSAFETYSWITCH_EXCEPTION = "SAFETYSWITCH_EXCEPTION":stringCHANNEL_SEPARATOR = "_":stringSERIAL_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(defaultfalse)ReceiveBufferSizeBytes:int(default65536)SendBufferSizeBytes:int(default65536)RemoteKeepAliveSeconds:uint(default60)RemoteKeepAliveRetryIntervalSeconds:uint(default5)LocalKeepAliveTimeOutMS:uint(default5000)LocalKeepAliveRetryIntervalMS:uint(default1000)HeartbeatAsyncConnectTimeoutMS:int(default10000)WaitTimeBetweenUnitConnects:int(default100)DontDoSDL:bool(defaultfalse)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,UnknownT0CorrectionStatus:ScanningForPowerLoss,ScanningForPeaksAndTroughs,SettingAttributesModuleType: 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): Returnstrueif mode uses test length (e.g.,Recorder,Scheduled,Interval)IsTSRAIROnlyRecordingMode(RecordingModes mode): ReturnstrueforActive,MultipleEventActive,Scheduled,IntervalIsTSRAirRecordingMode(RecordingModes mode): ReturnstrueforActive,MultipleEventActive,Scheduled,Interval,StreamingSupportsT0Correction(DFConstantsAndEnums.RecordingMode mode): Returnstruefor circular buffer or hybrid recorder modesToRecordingModesAlt(DFConstantsAndEnums.RecordingMode mode): Maps toRecordingModesvia alternate lookupToRecordingModes(DFConstantsAndEnums.RecordingMode mode): Maps toRecordingModes(fallback:CircularBuffer)FromRecordingModes(this RecordingModes mode): MapsRecordingModes→DFConstantsAndEnums.RecordingModeIsACircularBufferMode(RecordingModes/DFConstantsAndEnums.RecordingMode mode): Returnstruefor circular buffer variantsDoesModeSupportAutoArm(RecordingModes mode): ReturnsfalseforActive,MultipleEventActive,Scheduled,Interval,StreamingIsARecorderMode(RecordingModes/DFConstantsAndEnums.RecordingMode mode): Returnstruefor recorder variantsIsAHybridRecorderMode(RecordingModes/DFConstantsAndEnums.RecordingMode mode): Returnstruefor hybrid recorder variantsIsAMultipleEvent(RecordingModes mode): Returnstruefor multiple-event modesCanBeAMultipleEvent(RecordingModes mode): Returnstrueif mode supports multiple-event capabilityIsAStreamMode(RecordingModes/DFConstantsAndEnums.RecordingMode mode): Returnstruefor streaming modesTestWillBeStreaming(RecordingModes recordingMode, bool streaming): Returnstrueif mode is streaming orstreamingflag is setIsAUartMode(RecordingModes/DFConstantsAndEnums.RecordingMode mode): Returnstruefor UART-enabled modesIsAnOpenEndedRecordingMode(RecordingModes/DFConstantsAndEnums.RecordingMode mode): Returnstruefor 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.
DASTypeDuplication:DASTypeis defined in bothConstantsAndEnumsandDFConstantsAndEnums. The latter is the canonical version (includes more entries likeETHERNET_TSR_AIR,WINUSB_TSR_AIR, etc.).RecordingModeValue Mapping: The mapping betweenDFConstantsAndEnums.RecordingModeandRecordingModesis bi-directional and must be kept consistent. Extension methods (ToRecordingModes,FromRecordingModes) enforce this.RecordingModesValues Are Not Reused: EachRecordingModesvalue maps to exactly oneDFConstantsAndEnums.RecordingModeand vice versa.WakeupTriggersHas One Value: OnlyMotionDetectis defined; no other triggers are supported.S6DBDiagnosticChannelListChannel Ranges: Base diagnostic channels (0–3) and extended channels (100+) are disjoint and non-overlapping.FaultFlagsIs 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 forEnumDescriptionTypeConverter(used inWakeupTriggersandUseCasesTSRAIR).System.ComponentModel: Required for[Description]attribute.System: Core types (bool,int,string,DateTime,HashSet,Dictionary, etc.)
Dependencies on this module:
DASFactorymodules: 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)
- Device type identification (
5. Gotchas
DASTypeDuplication:DASTypeis defined in bothConstantsAndEnumsandDFConstantsAndEnums. The latter is the extended version and should be preferred.RecordingModeValue Conflicts: SomeDFConstantsAndEnums.RecordingModevalues map to the sameRecordingModesvalue (e.g.,AutoActiveModeandAerospaceboth map toRecordingModes.Active). This is intentional per comments.IntervalvsScheduled:RecordingModes.Intervalmaps toDFConstantsAndEnums.RecordingMode.Scheduled, butDFConstantsAndEnums.RecordingMode.Intervalmaps toRecordingModes.Interval. This asymmetry may cause confusion.T0CorrectionSupport: Only circular buffer and hybrid recorder modes support T0 correction. Other modes (e.g.,RecorderMode) do not.IsTSRAIROnlyRecordingModeExcludesStreaming: WhileStreamingis a TSR AIR mode, it is not considered "TSR AIR only" per this method.NO_CONFIGURATIONvsNO_DATA:NO_CONFIGURATION("NO_CONFIGURATION") indicates missing config on device;NO_DATA(1 << 13inFaultFlags) is a runtime fault flag.FIRST_USE_DATE_NOT_SET: UsesSqlDateTime.MinValue, notDateTime.MinValue, to represent unset date.IsSLICE6ERFirmwareLogic: Relies on firmware version string ending with 4-character token starting with"G1"or"G3". May break if version format changes.S6DBDiagnosticChannelList.DiagEnv_X_TemperatureOff-by-One:DiagEnv_1_Temperature = 104, butDiagChargerDischargeCurrent = 104is commented out. Ensure no active code uses the old value.RecordingModeExtensionsUsesRecordingModes: The extension methods operate onRecordingModes, notDFConstantsAndEnums.RecordingMode, requiring conversion viaToRecordingModes/FromRecordingModes.AlwaysShowUnsignedADCIs a Static Property: Its value is not persisted; must be set per-session.