--- source_files: - Common/DTS.CommonCore/Classes/Hardware/ExternalTilt.cs - Common/DTS.CommonCore/Classes/Hardware/DragAndDropPayload.cs - Common/DTS.CommonCore/Classes/Hardware/SerializableAAF.cs - Common/DTS.CommonCore/Classes/Hardware/DASDBRecord.cs - Common/DTS.CommonCore/Classes/Hardware/DASChannelDBRecord.cs - Common/DTS.CommonCore/Classes/Hardware/DASMonitorInfo.cs generated_at: "2026-04-17T15:35:03.536570+00:00" model: "zai-org/GLM-5-FP8" schema_version: 1 sha256: "15f5b1bfa66254ec" --- # DTS.Common.Classes.Hardware Documentation ## Purpose This module provides data structures and persistence support for Data Acquisition System (DAS) hardware within the DTS system. It contains entity classes for database records (`DASDBRecord`, `DASChannelDBRecord`), hardware configuration containers (`DASMonitorInfo`, `ExternalTilt`), serialization utilities (`SerializableAAF`), and UI interaction constants (`DragAndDropPayload`). These classes serve as the data layer for hardware inventory, channel configuration, and tilt sensor calibration management. --- ## Public Interface ### ExternalTilt Simple POCO representing an external tilt sensor device. **Constructor:** - `ExternalTilt()` - Default parameterless constructor. **Properties:** - `string SerialNumber { get; set; }` - Serial number of the tilt device. - `byte TiltID { get; set; }` - Numeric identifier for the tilt sensor. - `string SystemID { get; set; }` - Identifier of the associated system. - `string SystemLocation { get; set; }` - Physical location within the system. --- ### DragAndDropPayload Container for drag-and-drop format string constants used in UI operations. **Constants:** - `const string FORMAT = "RESOLVECHANNELS_HARDWARETABLE"` - Primary drag-and-drop format. - `const string ALT_FORMAT = "ALT_RESOLVECHANNELS_HARDWARETABLE"` - Alternate format (Alt-modified drag). - `const string CTRL_FORMAT = "CTRL_RESOLVECHANNELS_HARDWARETABLE"` - Control-modified drag format. --- ### SerializableAAF Container for DAS type enumeration. Note: All serialization logic is commented out in the source. **Nested Enum:** - `enum DAS_TYPE { TDAS = 0, SLICE = 1 }` - Identifies DAS hardware types. --- ### DASDBRecord Entity class representing a DAS hardware record for database persistence. Implements `IDASDBRecord`. **Static Property:** - `static DateTime INVALID_DATE => new DateTime(1970, 1, 1)` - Sentinel value for unset date fields. **Constructors:** - `DASDBRecord()` - Default constructor. - `DASDBRecord(IDASDBRecord copy)` - Copy constructor; performs deep copy of `ChannelTypes` array. - `DASDBRecord(IDataReader reader)` - Constructs instance from database reader; parses comma-delimited `ChannelTypes` string. **Properties (Key Database Fields):** - `int DASId { get; set; }` - Primary key (`[Key]`). - `string SerialNumber { get; set; }` - Required, max length 50. - `int DASType { get; set; }` - DAS type identifier. - `int MaxModules { get; set; }` - Maximum module count. - `long MaxMemory { get; set; }` - Maximum memory in bytes. - `double MaxSampleRate { get; set; }` - Maximum sample rate (`decimal(18,0)`). - `double MinSampleRate { get; set; }` - Minimum sample rate (`decimal(18,0)`). - `string FirmwareVersion { get; set; }` - Firmware version string. - `DateTime CalDate { get; set; }` - Calibration date, defaults to `INVALID_DATE`. - `int ProtocolVersion { get; set; }` - Protocol version number. - `DateTime LastModified { get; set; }` - Last modification timestamp. - `string LastModifiedBy { get; set; }` - User who last modified. - `int Version { get; set; }` - Record version. - `bool LocalOnly { get; set; }` - Whether record is local-only. - `DateTime LastUsed { get; set; }` - Last usage timestamp. - `string LastUsedBy { get; set; }` - User who last used. - `string Connection { get; set; }` - Connection string/identifier. - `int Channels { get; set; }` - Channel count. - `string Position { get; set; }` - Physical position (required, max 50 chars). - `int[] ChannelTypes { get; set; }` - Array of channel type identifiers. - `bool IsProgrammable { get; set; }` - Reprogrammability flag. - `bool IsReconfigurable { get; set; }` - Reconfigurability flag. - `bool IsModule { get; set; }` - Whether this is a module. - `int PositionOnDistributor { get; set; }` - Position on distributor. - `int PositionOnChain { get; set; }` - Position on chain. - `int Port { get; set; }` - Port number. - `string ParentDAS { get; set; }` - Parent DAS serial number. - `DateTime? FirstUseDate { get; set; }` - Nullable first use date. - `int? TestId { get; set; }` - Nullable test ID. - `int? GroupId { get; set; }` - Nullable group ID. - `bool StandIn { get; set; }` - Stand-in flag. - `double MaxAAFRate { get; set; }` - Maximum anti-aliasing filter rate. - `bool IsFirstUseValid { get; set; }` - Whether first use date is valid. --- ### DASChannelDBRecord Entity class representing a DAS channel record. Implements `IDASChannelDBRecord`. **Constants:** - `const int DEFAULT_SUPPORTED_BRIDGES = 12` - Default bridge bitmask (half + full bridge). - `const int DEFAULT_SUPPORTED_EXCITATIONS = 16` - Default excitation bitmask (5V). - `const int DEFAULT_SUPPORTED_DI_MODES = 16` - Default digital input mode bitmask. - `const int DEFAULT_SQUIB_FIRE_MODES = 16` - Default squib fire mode bitmask. - `const int DEFAULT_SUPPORTED_DO_MODES = 16` - Default digital output mode bitmask. **Constructors:** - `DASChannelDBRecord()` - Default constructor. - `DASChannelDBRecord(IDataReader reader)` - Constructs from database reader. - `DASChannelDBRecord(IDASChannelDBRecord copy)` - Copy constructor. **Properties:** - `string HardwareId { get; set; }` - Composite ID (serialnumber_dastype). - `int DaschannelId { get; set; }` - Primary key. - `int? Dasid { get; set; }` - Foreign key to parent DAS. - `int ChannelIdx { get; set; }` - Physical channel index. - `int SupportedBridges { get; set; }` - Bitmask: Bit 0=IEPE, 1=quarter bridge, 2=half bridge, 3=full bridge, 4=digital input, 5=squib fire, 6=digital output, 7=half bridge signal plus, 8=RTC, 9=UART. - `int SupportedExcitations { get; set; }` - Bitmask: Bit 1=2V, 2=2.5V, 3=3V, 4=5V, 5=10V, 6=1V. - `int DASDisplayOrder { get; set; }` - Display order (may differ from physical order). - `bool LocalOnly { get; set; }` - Deprecated; local-only flag. - `int SupportedDigitalInputModes { get; set; }` - Bitmask: Bit 1=TLH, 2=THL, 3=CCNO, 4=CCNC. - `int SupportedSquibFireModes { get; set; }` - Bitmask: Bit 1=capacitor discharge, 2=constant current, 3=AC discharge. - `int SupportedDigitalOutputModes { get; set; }` - Bitmask: Bit 0=FVLH, 1=FVHL, 2=CCNO, 3=CCNC. - `string ModuleSerialNumber { get; set; }` - Parent module serial number. - `int SettingId { get; set; }` - Setting identifier. - `int ModuleArrayIndex { get; set; }` - Module array index. --- ### DASMonitorInfo Configuration container for DAS monitor information with file persistence. Implements `IDASMonitorInfo`. **Constructors:** - `DASMonitorInfo(IDASCommunication das, IsoViewMode mode)` - Constructs from DAS communication interface. - `DASMonitorInfo(string path)` - Constructs by reading from file. **Properties:** - `string SerialNumber { get; }` - DAS serial number. - `double[] TiltSensorCals { get; }` - 18-element tilt sensor calibration array. - `short[] TiltSensorDataPre { get; }` - 3-element pre-capture tilt data. - `DFConstantsAndEnums.TiltAxes TiltAxes { get; }` - Tilt axis configuration. - `int AxisIgnored { get; }` - Ignored axis flag. - `double MountOffsetAxisOne { get; }` - Axis one mount offset. - `double MountOffsetAxisTwo { get; }` - Axis two mount offset. **Methods:** - `string GetChannelName(int index)` - Returns channel name or default `"Ch#XX"` format if out of range. - `double GetOffsetTolerancemVHigh(int index)` - Returns high offset tolerance in mV; returns 0 if out of range. - `double GetOffsetTolerancemVLow(int index)` - Returns low offset tolerance in mV; returns 0 if out of range. - `void ReadFromFile(string path)` - Reads configuration from file; silently returns if file doesn't exist. - `void WriteToFile(string path)` - Writes configuration to file. --- ## Invariants 1. **DASDBRecord.INVALID_DATE** is always `1970-01-01` and serves as the sentinel for unset date fields. 2. **DASDBRecord.ChannelTypes** is parsed from comma-delimited string in `IDataReader` constructor; invalid tokens are silently skipped. 3. **