15 KiB
source_files, generated_at, model, schema_version, sha256
| source_files | generated_at | model | schema_version | sha256 | ||||
|---|---|---|---|---|---|---|---|---|
|
2026-04-16T03:04:17.315073+00:00 | Qwen/Qwen3-Coder-Next-FP8 | 1 | e272a7c3fc6f00d6 |
Documentation: Data Recorder Interfaces
1. Purpose
This module defines core interfaces for representing hardware data acquisition systems (DAS) and their channels in the TTS (Test Tracking System) ecosystem. It provides a structured abstraction layer between the database layer and the application logic, enabling consistent handling of DAS hardware metadata, channel capabilities, and connectivity information. The interfaces IDASDBRecord, IDASHardware, IHardwareChannel, and IDASChannelDBRecord collectively model physical and logical hardware entities—including standalone DAS units, rack modules, and individual channels—with support for calibration tracking, first-use date management, diagnostic reporting, and bridge/excitation type capabilities. This abstraction facilitates hardware scanning, configuration, and data collection workflows across the test system.
2. Public Interface
IDASDBRecord
Encapsulates a DAS record as stored in the database.
-
int DASId { get; set; }
Unique identifier for the DAS in the database. -
string SerialNumber { get; set; }
Hardware serial number. -
int DASType { get; set; }
Numeric type identifier for the DAS (e.g., TDAS, G5, TSRAIR). -
int MaxModules { get; set; }
Maximum number of modules supported by this DAS. -
long MaxMemory { get; set; }
Maximum memory capacity (in bytes) of the DAS. -
double MaxSampleRate { get; set; }
Maximum sample rate (Hz) supported by the DAS. -
double MinSampleRate { get; set; }
Minimum sample rate (Hz) supported by the DAS. -
string FirmwareVersion { get; set; }
Current firmware version string. -
DateTime CalDate { get; set; }
Last calibration date. -
int ProtocolVersion { get; set; }
Protocol version used by the DAS. -
DateTime LastModified { get; set; }
Timestamp of last database record modification. -
string LastModifiedBy { get; set; }
User or system that last modified the record. -
int Version { get; set; }
Record version for concurrency control. -
bool LocalOnly { get; set; }
Indicates if the record is local-only (deprecated perIDASChannelDBRecord). -
DateTime LastUsed { get; set; }
Timestamp of last known usage. -
string LastUsedBy { get; set; }
User or system that last used the hardware. -
string Connection { get; set; }
Connectivity information (e.g., IP, serial port) used for hardware scanning. -
int Channels { get; set; }
Total number of channels on the DAS. -
string Position { get; set; }
Physical or logical position of the DAS (e.g., rack location). -
int[] ChannelTypes { get; set; }
Array of channel type codes (interpretation is hardware-specific). -
bool IsProgrammable { get; set; }
Indicates if the DAS supports programmable configurations. -
bool IsReconfigurable { get; set; }
Indicates if the DAS can be reconfigured at runtime. -
bool IsModule { get; set; }
Indicates if this hardware is a module (e.g., rack-mounted) vs. standalone. -
int PositionOnDistributor { get; set; }
Position index on the distributor (e.g., bus segment). -
int PositionOnChain { get; set; }
Position index on the communication chain. -
int Port { get; set; }
Communication port number (e.g., TCP port, serial port). -
string ParentDAS { get; set; }
Serial number of the parent DAS (for modules). -
DateTime? FirstUseDate { get; set; }
First date of use after calibration;nullif unused since calibration. Valid only ifIsFirstUseValidistrue. -
int? TestId { get; set; }
Test ID for stand-in hardware used only in a specific test. -
int? GroupId { get; set; }
Group ID for stand-in hardware used only in a specific group. -
bool StandIn { get; set; }
Indicates if this is dummy/stand-in hardware (no real data collection). -
double MaxAAFRate { get; set; }
Maximum anti-aliasing filter rate (Hz). -
bool IsFirstUseValid { get; set; }
Indicates ifFirstUseDateis applicable and valid.
IHardwareChannel
Represents a single channel on a DAS, exposing its capabilities and diagnostics.
-
IDiagnosticResult Diagnostics { get; }
Diagnostic results for this channel;nullif unavailable. -
bool IsSupportedBridgeType(SensorConstants.BridgeType bridgeType)
Returnstrueif the channel supports the specified bridge type. -
int ChannelNumber { get; }
Logical channel number (1-based or 0-based depending on hardware). -
string GetId()
Returns a unique identifier string for the channel. -
bool IsAnalog { get; }
Indicates if the channel supports analog sensors. -
bool IsSquib { get; }
Indicates if the channel supports squib fire. -
bool IsDigitalOut { get; }
Indicates if the channel supports digital outputs. -
bool IsDigitalIn { get; }
Indicates if the channel supports digital inputs. -
bool IsUart { get; }
Indicates if the channel supports UART I/O. -
bool IsStreamIn { get; }
Indicates if the channel supports stream input. -
bool IsStreamOut { get; }
Indicates if the channel supports stream output. -
bool IsThermocoupler { get; }
Indicates if the channel supports thermocouple sensors. -
bool IsCan { get; }
Indicates if the channel supports CAN bus. -
bool IsClock { get; }
Indicates if the channel supports clock functionality. -
bool IsTSRAIR { get; }
Indicates if the channel belongs to a TSRAIR DAS. -
bool IsSLICETC { get; }
Indicates if the channel belongs to a SLICE thermocouple module. -
bool IsTSRAIRModule { get; }
Indicates if the channel belongs to a TSRAIR module. -
IDASHardware GetParentDAS()
Returns the parent DAS hardware object. -
string ModuleSerialNumber { get; set; }
Serial number of the module this channel belongs to (if applicable). -
bool IsSupportedExcitation(ExcitationVoltageOptions.ExcitationVoltageOption excitation)
Returnstrueif the specified excitation voltage is supported. -
bool IsG5()
Returnstrueif the channel’s parent DAS serial number starts with"5M". -
string ToString(IDASHardware[] hardwares)
Returns a human-readable string representation, using the provided hardware array for context.
IDASHardware
Represents a DAS hardware unit (standalone or rack module) in the TTS import context.
-
int ProtocolVersion { get; }
Protocol version supported by the hardware. -
bool IsStandIn()
Returnstrueif this is a stand-in (dummy) DAS. -
bool IsFirstUseValid { get; }
Indicates ifFirstUseDateis valid and applicable. -
DateTime? FirstUseDate { get; }
First use date after calibration;nullif unused. -
bool IsPseudoRack()
Returnstrueif this is a pseudo-rack (virtual or simulated rack). -
int DASId { get; }
Database ID of the DAS. -
string SerialNumber { get; set; }
Hardware serial number. -
string SerialNumberFamily { get; set; }
Family identifier derived from serial number (e.g.,"G5"). -
string EIDFound { get; set; }
EID (Electronic ID) status or value. -
string BatteryVoltageStatus { get; set; }
Battery voltage status string (e.g.,"OK","LOW"). -
System.Windows.Media.SolidColorBrush BatteryVoltageColor { get; set; }
UI color for battery voltage status. -
string InputVoltageStatus { get; set; }
Input voltage status string. -
System.Windows.Media.SolidColorBrush InputVoltageColor { get; set; }
UI color for input voltage status. -
string ParentDAS { get; set; }
Serial number of the parent DAS (for modules). -
string Connection { get; set; }
Connectivity information for hardware scanning. -
IHardwareChannel[] GetIHardwareChannels()
Returns all channels on this DAS. -
bool IsSLICEEthernetController { get; }
Returnstrueif this DAS is a SLICE Ethernet Controller. -
bool IsTDASRack()
Returnstrueif this DAS is a TDAS rack. -
bool IsG5()
Returnstrueif the DAS is a G5 model. -
bool IsTSRAIR()
Returnstrueif the DAS is a TSRAIR model. -
bool IsTSRAIRModule()
Returnstrueif the DAS is a TSRAIR module. -
double GetMinSampleRateDouble()
Returns the minimum sample rate supported by this DAS. -
double GetMaxSampleRateDouble()
Returns the maximum sample rate supported by this DAS. -
bool IsModule()
Returnstrueif this hardware is a module (not displayed in Hardware Scan for Slice bridges; displayed for TDAS racks). -
string LastModifiedBy { get; set; }
User/system that last modified the hardware record. -
DateTime LastModified { get; set; }
Timestamp of last modification. -
HardwareTypes DASTypeEnum { get; set; }
Enumerated type of the DAS (e.g.,HardwareTypes.TDAS,HardwareTypes.G5). -
int[] ChannelTypes { get; }
Array of channel type codes for all channels on this DAS.
IDASChannelDBRecord
Represents a channel record in the database.
-
string HardwareId { get; set; }
Hardware identifier string:"<SerialNumber>_<DASType>". -
int DaschannelId { get; set; }
Primary key of the channel record in the database. -
int? Dasid { get; set; }
Foreign key to the parent DAS record (DASId). -
int ChannelIdx { get; set; }
Physical channel index (0-based) on the DAS. -
int SupportedBridges { get; set; }
Bitmask of supported bridge types:- Bit 0: IEPE
- Bit 1: Quarter bridge
- Bit 2: Half bridge
- Bit 3: Full bridge
- Bit 4: Digital input
- Bit 5: Squib fire
- Bit 6: Digital output
- Bit 7: Half bridge signal plus (G5)
- Bit 8: Real-Time Clock
- Bit 9: UART
-
int SupportedExcitations { get; set; }
Bitmask of supported excitation voltages:- Bit 0: Invalid/undefined
- Bit 1: 2V
- Bit 2: 2.5V
- Bit 3: 3V
- Bit 4: 5V
- Bit 5: 10V
- Bit 6: 1V
-
int DASDisplayOrder { get; set; }
Display order among channels on the DAS (may differ from physical order). -
bool LocalOnly { get; set; }
Deprecated. Previously indicated local-only storage. -
int SupportedDigitalInputModes { get; set; }
Bitmask of supported digital input modes (if digital input supported):- Bit 0: Invalid
- Bit 1: Transition low-to-high (TLH)
- Bit 2: Transition high-to-low (THL)
- Bit 3: Contact closure normally open (CCNO)
- Bit 4: Contact closure normally closed (CCNC)
-
int SupportedSquibFireModes { get; set; }
Bitmask of supported squib fire modes (if squib fire supported):- Bit 0: Invalid
- Bit 1: Capacitor discharge
- Bit 2: Constant current
- Bit 3: AC discharge
-
int SupportedDigitalOutputModes { get; set; }
Bitmask of supported digital output modes (if digital output supported):- Bit 0: 5V low-to-high (FVLH)
- Bit 1: 5V high-to-low (FVHL)
- Bit 2: CCNO
- Bit 3: CCNC
-
string ModuleSerialNumber { get; set; }
Serial number of the module this channel belongs to (if applicable). -
int SettingId { get; set; }
ID of the channel configuration setting. -
int ModuleArrayIndex { get; set; }
Array index of the module among modules on the DAS.
3. Invariants
IDASDBRecord.StandInandIDASHardware.IsStandIn()must be consistent: IfStandInistrue, thenIsStandIn()should returntrue.IDASDBRecord.IsFirstUseValidgoverns validity ofFirstUseDate:FirstUseDateis only meaningful whenIsFirstUseValidistrue; otherwise, it should be ignored.IDASDBRecord.IsModuleandIDASHardware.IsModule()must align: A module in the DB record should correspond toIsModule()returningtruein the hardware interface.IDASChannelDBRecord.HardwareIdformat: Must be"<SerialNumber>_<DASType>"(e.g.,"ABC123_5").- Bitmask semantics are fixed: All bitmasks (
SupportedBridges,SupportedExcitations, etc.) use the documented bit positions; no dynamic reassignment is allowed. ChannelIdxis zero-based: Represents physical channel index on the DAS.DASDisplayOrdermay differ fromChannelIdx: Display order is a logical ordering, not necessarily physical.
4. Dependencies
Imports/Usings:
System(core types,DateTime,Nullable<T>)System.ComponentModel.DataAnnotationsandSystem.ComponentModel.DataAnnotations.Schema(IDASChannelDBRecordonly)DTS.Common.Enums(specificallySensorConstants.BridgeType,ExcitationVoltageOptions.ExcitationVoltageOption)DTS.Common.Interface.DASFactory.Diagnostics(IDiagnosticResultinterface)
Inferred Dependencies:
IDiagnosticResult(fromDTS.Common.Interface.DASFactory.Diagnostics) is used byIHardwareChannel.Diagnostics.HardwareTypesenum (fromDTS.Common.Enums.Hardware) is used inIDASHardware.DASTypeEnum.SensorConstants.BridgeTypeandExcitationVoltageOptions.ExcitationVoltageOptionenums are used inIHardwareChannelmethods.
Likely Consumers:
- Hardware scanning and discovery modules (uses
Connection,ParentDAS,IsModule,IsStandIn) - Calibration and compliance tracking (uses
CalDate,FirstUseDate,IsFirstUseValid) - Channel configuration and mapping (uses
ChannelIdx,DASDisplayOrder,SupportedBridges,SupportedExcitations) - UI rendering (uses
BatteryVoltageColor,InputVoltageColor,Connection,Position)
5. Gotchas
LocalOnlyis deprecated: BothIDASDBRecord.LocalOnlyandIDASChannelDBRecord.LocalOnlyare marked as deprecated; do not rely on them for new logic.FirstUseDateis nullable and conditional: Its value is only valid whenIsFirstUseValidistrue; otherwise, it should be ignored.ChannelIdxvs.DASDisplayOrder: Physical channel index (ChannelIdx) and display order (DASDisplayOrder) may differ for some hardware; do not assume they are equal.IsG5()implementation is serial-number-based:IHardwareChannel.IsG5()checks if the serial number starts with"5M", not the DAS type enum.IsModule()semantics differ between interfaces:- In
IDASDBRecord,IsModuleindicates if the record represents a module. - In
IDASHardware,IsModule()controls visibility in Hardware Scan (e.g.,falsefor TDAS rack modules,truefor Slice bridges).
- In
- Bitmask values are hardcoded: The bit positions for
SupportedBridges,SupportedExcitations, etc., are fixed and must not be changed without updating all consumers. - **`