15 KiB
source_files, generated_at, model, schema_version, sha256
| source_files | generated_at | model | schema_version | sha256 | ||||
|---|---|---|---|---|---|---|---|---|
|
2026-04-16T02:27:19.835700+00:00 | Qwen/Qwen3-Coder-Next-FP8 | 1 | bca3af738f7131f7 |
Documentation: Data Recorder Interfaces Module
1. Purpose
This module defines core interfaces for representing hardware data acquisition systems (DAS), their channels, and their database-backed metadata in the TTS (Test Tracking System) ecosystem. It serves as the foundational abstraction layer between the application logic and physical hardware or database records, enabling consistent handling of diverse hardware types (e.g., TDAS racks, G5 modules, TSRAIR devices, SLICE controllers) and their capabilities (e.g., analog sensing, squib firing, digital I/O, UART, clocks). The interfaces decouple hardware discovery, configuration, and diagnostics from implementation details, supporting both runtime hardware interaction (IDASHardware, IHardwareChannel) and persistent storage (IDASDBRecord, IDASChannelDBRecord).
2. Public Interface
IHardwareChannel
Represents a single physical channel on a DAS device.
-
IDiagnosticResult Diagnostics { get; }
Returns diagnostic results for this channel if available;nullotherwise. -
bool IsSupportedBridgeType(SensorConstants.BridgeType bridgeType)
Returnstrueif the channel supports the specified bridge type (e.g., IEPE, quarter, half, full bridge). -
int ChannelNumber { get; }
Gets the physical channel index (0-based or 1-based depending on hardware). -
string GetId()
Returns a unique identifier string for this channel (implementation-specific format). -
bool IsAnalog { get; }
Returnstrueif the channel supports analog sensors. -
bool IsSquib { get; }
Returnstrueif the channel supports squib firing. -
bool IsDigitalOut { get; }
Returnstrueif the channel supports digital outputs. -
bool IsDigitalIn { get; }
Returnstrueif the channel supports digital inputs. -
bool IsUart { get; }
Returnstrueif the channel supports UART I/O. -
bool IsStreamIn { get; }
Returnstrueif the channel supports stream input. -
bool IsStreamOut { get; }
Returnstrueif the channel supports stream output. -
bool IsClock { get; }
Returnstrueif the channel supports real-time clock functionality. -
bool IsTSRAIR { get; }
Returnstrueif this channel belongs to a TSRAIR device. -
bool IsTSRAIRModule { get; }
Returnstrueif this channel belongs to a TSRAIR module. -
IDASHardware GetParentDAS()
Returns the parent DAS device (IDASHardware) this channel is part of. -
string ModuleSerialNumber { get; set; }
Gets or sets the serial number of the module this channel resides on. -
bool IsSupportedExcitation(ExcitationVoltageOptions.ExcitationVoltageOption excitation)
Returnstrueif the specified excitation voltage (e.g., 2V, 5V, 10V) is supported. -
bool IsG5()
Returnstrueif the channel’s module serial number starts with"5M". -
string ToString(IDASHardware[] hardwares)
Returns a human-readable string representation of the channel, potentially using the providedhardwaresarray for context.
IDASDBRecord
Represents a DAS device record in the database.
-
int DASId { get; set; }
Primary key ID of the DAS record. -
string SerialNumber { get; set; }
Hardware serial number. -
int DASType { get; set; }
Numeric type identifier for the DAS (e.g., 1 = TDAS, 2 = G5). -
int MaxModules { get; set; }
Maximum number of modules supported by this DAS. -
long MaxMemory { get; set; }
Maximum storage capacity in bytes. -
double MaxSampleRate { get; set; }
Maximum supported sample rate (Hz). -
double MinSampleRate { get; set; }
Minimum supported sample rate (Hz). -
string FirmwareVersion { get; set; }
Firmware version string. -
DateTime CalDate { get; set; }
Calibration date. -
int ProtocolVersion { get; set; }
Protocol version used by the hardware. -
DateTime LastModified { get; set; }
Timestamp of last database modification. -
string LastModifiedBy { get; set; }
User who last modified the record. -
int Version { get; set; }
Record version number (for concurrency control). -
bool LocalOnly { get; set; }
Deprecated; indicates if record should remain local only. -
DateTime LastUsed { get; set; }
Timestamp of last use. -
string LastUsedBy { get; set; }
User who last used the hardware. -
string Connection { get; set; }
Connectivity status for Hardware Scan (e.g.,"Ethernet","Serial"). -
int Channels { get; set; }
Total number of channels on this DAS. -
string Position { get; set; }
Physical location string (e.g.,"Rack A, Slot 3"). -
int[] ChannelTypes { get; set; }
Array of channel type identifiers (e.g.,0= analog,1= digital). -
bool IsProgrammable { get; set; }
Indicates if the DAS is programmable. -
bool IsReconfigurable { get; set; }
Indicates if the DAS can be reconfigured. -
bool IsModule { get; set; }
Indicates if this hardware is a standalone unit (false) or a rack/module (true). -
int PositionOnDistributor { get; set; }
Position index on a distributor bus. -
int PositionOnChain { get; set; }
Position index in a daisy-chain. -
int Port { get; set; }
Communication port number. -
string ParentDAS { get; set; }
Serial number of parent DAS (for modules). -
DateTime? FirstUseDate { get; set; }
First use date after calibration;nullif unused since calibration orIsFirstUseValid == false. -
int? TestId { get; set; }
Test ID if this is stand-in hardware used only in a test. -
int? GroupId { get; set; }
Group ID if this is stand-in hardware used only in a group. -
bool StandIn { get; set; }
trueif this is dummy/stand-in hardware (no real data collection). -
double MaxAAFRate { get; set; }
Maximum anti-aliasing filter rate (Hz). -
bool IsFirstUseValid { get; set; }
trueifFirstUseDateis tracked and valid for this hardware.
IDASHardware
Represents a live DAS hardware instance in the application (e.g., during Hardware Scan).
-
bool IsStandIn()
Returnstrueif this is a stand-in (dummy) DAS. -
bool IsFirstUseValid { get; }
ReturnstrueifFirstUseDateis tracked. -
DateTime? FirstUseDate { get; }
First use date after calibration;nullif unused orIsFirstUseValid == false. -
bool IsPseudoRack()
Returnstrueif this DAS is a pseudo-rack (likely a logical grouping). -
int DASId { get; }
Database ID of the DAS. -
string SerialNumber { get; set; }
Hardware serial number. -
string SerialNumberFamily { get; set; }
Family name or prefix of the serial number. -
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 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 parent DAS (for modules). -
string Connection { get; set; }
Connectivity status for Hardware Scan. -
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 this DAS is a G5 device (serial starts with"5M"). -
bool IsTSRAIR()
Returnstrueif this DAS is a TSRAIR device. -
bool IsTSRAIRModule()
Returnstrueif this 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 standalone). Used to control visibility in Hardware Scan. -
string LastModifiedBy { get; set; }
User who 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).
IDASChannelDBRecord
Represents a channel record in the database.
-
string HardwareId { get; set; }
Composite ID for the parent hardware (serialnumber_dastype). -
int DaschannelId { get; set; }
Primary key of the channel record. -
int? Dasid { get; set; }
Foreign key toIDASDBRecord.DASId. -
int ChannelIdx { get; set; }
Physical channel index 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; }
Logical display order (may differ fromChannelIdx). -
bool LocalOnly { get; set; }
Deprecated; indicates if record should remain local. -
int SupportedDigitalInputModes { get; set; }
Bitmask for digital input modes (ifSupportedBridgesincludes digital input):- Bit 0: Invalid
- Bit 1: TLH (Transition low-to-high)
- Bit 2: THL (Transition high-to-low)
- Bit 3: CCNO (Contact closure, normally open)
- Bit 4: CCNC (Contact closure, normally closed)
-
int SupportedSquibFireModes { get; set; }
Bitmask for squib fire modes (ifSupportedBridgesincludes squib fire):- Bit 0: Invalid
- Bit 1: Capacitor discharge
- Bit 2: Constant current
- Bit 3: AC discharge
-
int SupportedDigitalOutputModes { get; set; }
Bitmask for digital output modes (ifSupportedBridgesincludes digital output):- 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. -
int SettingId { get; set; }
ID of the channel configuration setting. -
int ModuleArrayIndex { get; set; }
Index of the module among modules on the DAS.
3. Invariants
-
Channel Type Consistency:
ForIHardwareChannel, the boolean flags (IsAnalog,IsSquib, etc.) must be mutually consistent withIsSupportedBridgeType()results. For example, ifIsSquib == true, thenIsSupportedBridgeType(SensorConstants.BridgeType.Squib)must returntrue. -
Excitation Support Consistency:
IsSupportedExcitation()must align with theSupportedExcitationsbitmask inIDASChannelDBRecord. For instance, ifSupportedExcitationshas bit 4 (5V) set, thenIsSupportedExcitation(ExcitationVoltageOptions.ExcitationVoltageOption.V5)must returntrue. -
Bridge Type Bitmask Semantics:
SupportedBridgesinIDASChannelDBRecordandIsSupportedBridgeType()inIHardwareChannelmust use the same bridge type definitions (SensorConstants.BridgeTypeenum). -
G5 Detection Consistency:
IsG5()inIHardwareChannelandIDASHardwareboth check for serial number prefix"5M"; this behavior must be consistent across implementations. -
First Use Date Validity:
FirstUseDateis only meaningful ifIsFirstUseValid == true. IfIsFirstUseValid == false,FirstUseDatemust benull. -
Module Hierarchy:
IDASHardware.IsModule()andIDASDBRecord.IsModulemust agree on whether the hardware is a module.IDASHardware.ParentDASandIDASDBRecord.ParentDASmust refer to the same parent. -
Channel Indexing:
ChannelIdxinIDASChannelDBRecordandChannelNumberinIHardwareChannelrefer to the same physical channel index on the hardware.
4. Dependencies
This Module Depends On:
-
DTS.Common.EnumsSensorConstants.BridgeType(forIsSupportedBridgeType)ExcitationVoltageOptions.ExcitationVoltageOption(forIsSupportedExcitation)HardwareTypes(forIDASHardware.DASTypeEnum)
-
DTS.Common.Interface.DASFactory.DiagnosticsIDiagnosticResult(forIHardwareChannel.Diagnostics)
-
SystemDateTime,Array,Attributeclasses ([Key],[Column])
-
System.ComponentModel.DataAnnotations[Key],[Column]attributes forIDASChannelDBRecord
-
System.Windows.MediaSolidColorBrush(forIDASHardwarebattery/input voltage colors)
This Module Is Used By:
- Hardware discovery/scanning logic (e.g.,
IDASHardware,IHardwareChannel) - Database persistence layers (e.g.,
IDASDBRecord,IDASChannelDBRecord) - Configuration and setup UIs (e.g.,
DASDisplayOrder,Connection,Position) - Diagnostics and validation tools (e.g.,
Diagnostics,IsFirstUseValid,FirstUseDate) - Test setup and channel mapping logic (e.g.,
ChannelIdx,ModuleArrayIndex,SettingId)
5. Gotchas
-
LocalOnlyis deprecated:
BothIDASDBRecordandIDASChannelDBRecordincludeLocalOnly, but the documentation explicitly states it is deprecated. Do not rely on this property for new logic. -
DASDisplayOrdermay differ fromChannelIdx:
The documentation warns that display order and physical channel order may not match for some hardware (e.g., channel interleaving). Always useDASDisplayOrderfor UI ordering. -
IsModule()semantics differ betweenIDASHardwareandIDASDBRecord:
InIDASHardware,IsModule()controls visibility in Hardware Scan (e.g., hides Slice bridges). InIDASDBRecord,IsModuleindicates whether the hardware is a module vs