208 lines
12 KiB
Markdown
208 lines
12 KiB
Markdown
|
|
---
|
||
|
|
source_files:
|
||
|
|
- Common/DTS.CommonCore/Interface/DataRecorders/IHardwareChannel.cs
|
||
|
|
- Common/DTS.CommonCore/Interface/DataRecorders/IDASDBRecord.cs
|
||
|
|
- Common/DTS.CommonCore/Interface/DataRecorders/IDASHardware.cs
|
||
|
|
- Common/DTS.CommonCore/Interface/DataRecorders/IDASChannelDBRecord.cs
|
||
|
|
generated_at: "2026-04-16T12:21:21.272442+00:00"
|
||
|
|
model: "zai-org/GLM-5-FP8"
|
||
|
|
schema_version: 1
|
||
|
|
sha256: "bca3af738f7131f7"
|
||
|
|
---
|
||
|
|
|
||
|
|
# Documentation: DTS.Common.Interface.DataRecorders
|
||
|
|
|
||
|
|
## 1. Purpose
|
||
|
|
|
||
|
|
This module defines the core interfaces for Data Acquisition System (DAS) hardware abstraction within the DTS system. It provides contracts for representing hardware channels (`IHardwareChannel`), DAS devices (`IDASHardware`), and their corresponding database persistence records (`IDASDBRecord`, `IDASChannelDBRecord`). These interfaces enable the system to interact with various types of data recording hardware—ranging from individual channels to complete rack systems—in a uniform, decoupled manner, supporting capabilities queries, hardware identification, and configuration persistence.
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
## 2. Public Interface
|
||
|
|
|
||
|
|
### IHardwareChannel
|
||
|
|
|
||
|
|
Represents an individual hardware channel on a DAS device.
|
||
|
|
|
||
|
|
| Member | Signature | Description |
|
||
|
|
|--------|-----------|-------------|
|
||
|
|
| `Diagnostics` | `IDiagnosticResult { get; }` | Diagnostic results for this channel; returns `null` if unavailable. |
|
||
|
|
| `IsSupportedBridgeType` | `bool IsSupportedBridgeType(SensorConstants.BridgeType bridgeType)` | Returns whether the channel supports the specified bridge type. |
|
||
|
|
| `ChannelNumber` | `int { get; }` | The channel number. |
|
||
|
|
| `GetId` | `string GetId()` | Returns the channel identifier. |
|
||
|
|
| `IsAnalog` | `bool { get; }` | Returns `true` if the channel supports analog sensors. |
|
||
|
|
| `IsSquib` | `bool { get; }` | Returns `true` if the channel supports squibs. |
|
||
|
|
| `IsDigitalOut` | `bool { get; }` | Returns `true` if the channel supports digital outputs. |
|
||
|
|
| `IsDigitalIn` | `bool { get; }` | Returns `true` if the channel supports digital inputs. |
|
||
|
|
| `IsUart` | `bool { get; }` | Returns `true` if the channel supports UART I/O. |
|
||
|
|
| `IsStreamIn` | `bool { get; }` | Returns `true` if the channel supports stream input. |
|
||
|
|
| `IsStreamOut` | `bool { get; }` | Returns `true` if the channel supports stream output. |
|
||
|
|
| `IsClock` | `bool { get; }` | Returns `true` if the channel supports clocks. |
|
||
|
|
| `IsTSRAIR` | `bool { get; }` | (Undocumented in XML comments.) |
|
||
|
|
| `IsTSRAIRModule` | `bool { get; }` | (Undocumented in XML comments.) |
|
||
|
|
| `GetParentDAS` | `IDASHardware GetParentDAS()` | Returns the DAS this channel belongs to. |
|
||
|
|
| `ModuleSerialNumber` | `string { get; set; }` | The module serial number this channel belongs to. |
|
||
|
|
| `IsSupportedExcitation` | `bool IsSupportedExcitation(ExcitationVoltageOptions.ExcitationVoltageOption excitation)` | Returns whether a given excitation voltage is supported. |
|
||
|
|
| `IsG5` | `bool IsG5()` | Returns `true` if the serial number starts with `"5M"`. |
|
||
|
|
| `ToString` | `string ToString(IDASHardware[] hardwares)` | Returns a string representation given an array of hardware. |
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
### IDASHardware
|
||
|
|
|
||
|
|
Represents a DAS hardware device (e.g., a rack, module, or standalone unit).
|
||
|
|
|
||
|
|
| Member | Signature | Description |
|
||
|
|
|--------|-----------|-------------|
|
||
|
|
| `IsStandIn` | `bool IsStandIn()` | Returns `true` if this is a stand-in for real hardware, not physical hardware itself. |
|
||
|
|
| `IsFirstUseValid` | `bool { get; }` | Whether hardware supports and is using first use date (ref: 15524). |
|
||
|
|
| `FirstUseDate` | `DateTime? { get; }` | First date of use after calibration; only valid if `IsFirstUseValid` is `true`. `null` indicates not used since calibration. |
|
||
|
|
| `IsPseudoRack` | `bool IsPseudoRack()` | (Undocumented in XML comments.) |
|
||
|
|
| `DASId` | `int { get; }` | The DAS identifier. |
|
||
|
|
| `SerialNumber` | `string { get; set; }` | Serial number of the hardware. |
|
||
|
|
| `SerialNumberFamily` | `string { get; set; }` | Serial number family. |
|
||
|
|
| `EIDFound` | `string { get; set; }` | (Undocumented in XML comments.) |
|
||
|
|
| `BatteryVoltageStatus` | `string { get; set; }` | Battery voltage status string. |
|
||
|
|
| `BatteryVoltageColor` | `System.Windows.Media.SolidColorBrush { get; set; }` | Color for battery voltage display. |
|
||
|
|
| `InputVoltageStatus` | `string { get; set; }` | Input voltage status string. |
|
||
|
|
| `InputVoltageColor` | `System.Windows.Media.SolidColorBrush { get; set; }` | Color for input voltage display. |
|
||
|
|
| `ParentDAS` | `string { get; set; }` | Used to display DAS connectivity in Hardware Scan. |
|
||
|
|
| `Connection` | `string { get; set; }` | Used to determine DAS connectivity for Hardware Scan. |
|
||
|
|
| `GetIHardwareChannels` | `IHardwareChannel[] GetIHardwareChannels()` | Returns all hardware channels on this DAS. |
|
||
|
|
| `IsSLICEEthernetController` | `bool { get; }` | Returns whether DAS is a SLICE Ethernet Controller. |
|
||
|
|
| `IsTDASRack` | `bool IsTDASRack()` | Returns `true` if the DAS is a TDAS rack. |
|
||
|
|
| `IsG5` | `bool IsG5()` | (Undocumented in XML comments.) |
|
||
|
|
| `IsTSRAIR` | `bool IsTSRAIR()` | (Undocumented in XML comments.) |
|
||
|
|
| `IsTSRAIRModule` | `bool IsTSRAIRModule()` | (Undocumented in XML comments.) |
|
||
|
|
| `GetMinSampleRateDouble` | `double GetMinSampleRateDouble()` | Returns the minimum sample rate allowed on this DAS. |
|
||
|
|
| `GetMaxSampleRateDouble` | `double GetMaxSampleRateDouble()` | Returns the maximum sample rate allowed on this DAS. |
|
||
|
|
| `IsModule` | `bool IsModule()` | Returns `true` for modules which should not be displayed in Hardware Scan (SLICE bridges); `false` for modules which should be displayed (TDAS rack modules). |
|
||
|
|
| `LastModifiedBy` | `string { get; set; }` | User who last modified this record. |
|
||
|
|
| `LastModified` | `DateTime { get; set; }` | Timestamp of last modification. |
|
||
|
|
| `DASTypeEnum` | `HardwareTypes { get; set; }` | The hardware type enumeration value. |
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
### IDASDBRecord
|
||
|
|
|
||
|
|
Encapsulates a DAS record for database persistence.
|
||
|
|
|
||
|
|
| Member | Signature | Description |
|
||
|
|
|--------|-----------|-------------|
|
||
|
|
| `DASId` | `int { get; set; }` | Database ID of the DAS record. |
|
||
|
|
| `SerialNumber` | `string { get; set; }` | Serial number. |
|
||
|
|
| `DASType` | `int { get; set; }` | DAS type as integer. |
|
||
|
|
| `MaxModules` | `int { get; set; }` | Maximum number of modules supported. |
|
||
|
|
| `MaxMemory` | `long { get; set; }` | Maximum memory in bytes. |
|
||
|
|
| `MaxSampleRate` | `double { get; set; }` | Maximum sample rate. |
|
||
|
|
| `MinSampleRate` | `double { get; set; }` | Minimum sample rate. |
|
||
|
|
| `FirmwareVersion` | `string { get; set; }` | Firmware version string. |
|
||
|
|
| `CalDate` | `DateTime { get; set; }` | Calibration date. |
|
||
|
|
| `ProtocolVersion` | `int { get; set; }` | Protocol version. |
|
||
|
|
| `LastModified` | `DateTime { get; set; }` | Last modification timestamp. |
|
||
|
|
| `LastModifiedBy` | `string { get; set; }` | User who last modified. |
|
||
|
|
| `Version` | `int { get; set; }` | Record version. |
|
||
|
|
| `LocalOnly` | `bool { get; set; }` | Whether record is local-only. |
|
||
|
|
| `LastUsed` | `DateTime { get; set; }` | Last used timestamp. |
|
||
|
|
| `LastUsedBy` | `string { get; set; }` | User who last used. |
|
||
|
|
| `Connection` | `string { get; set; }` | Used to determine DAS connectivity for Hardware Scan. |
|
||
|
|
| `Channels` | `int { get; set; }` | Number of channels. |
|
||
|
|
| `Position` | `string { get; set; }` | Position identifier. |
|
||
|
|
| `ChannelTypes` | `int[] { get; set; }` | Array of channel types. |
|
||
|
|
| `IsProgrammable` | `bool { get; set; }` | Whether hardware is programmable. |
|
||
|
|
| `IsReconfigurable` | `bool { get; set; }` | Whether hardware is reconfigurable. |
|
||
|
|
| `IsModule` | `bool { get; set; }` | Whether hardware operates as a rack module (`true`) or standalone (`false`). |
|
||
|
|
| `PositionOnDistributor` | `int { get; set; }` | Position on distributor. |
|
||
|
|
| `PositionOnChain` | `int { get; set; }` | Position on chain. |
|
||
|
|
| `Port` | `int { get; set; }` | Port number. |
|
||
|
|
| `ParentDAS` | `string { get; set; }` | Parent DAS identifier. |
|
||
|
|
| `FirstUseDate` | `DateTime? { get; set; }` | First use date after calibration; only valid if `IsFirstUseValid` is `true`. `null` indicates not used since calibration. (Ref: 15524) |
|
||
|
|
| `TestId` | `int? { get; set; }` | Test ID for stand-in hardware existing in a test only. (Ref: 15727) |
|
||
|
|
| `GroupId` | `int? { get; set; }` | Group ID for stand-in hardware existing in a group only. |
|
||
|
|
| `StandIn` | `bool { get; set; }` | Whether this is stand-in/dummy hardware, not physical hardware. |
|
||
|
|
| `MaxAAFRate` | `double { get; set; }` | Maximum AAF rate. |
|
||
|
|
| `IsFirstUseValid` | `bool { get; set; }` | Whether hardware supports and is using first use date. (Ref: 15524) |
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
### IDASChannelDBRecord
|
||
|
|
|
||
|
|
Describes a DAS channel database record with detailed bitmask configuration.
|
||
|
|
|
||
|
|
| Member | Signature | Description |
|
||
|
|
|--------|-----------|-------------|
|
||
|
|
| `HardwareId` | `string { get; set; }` | String ID for the hardware (format: `serialnumber_dastype`). |
|
||
|
|
| `DaschannelId` | `int { get; set; }` | Primary key of the DAS channel record. Annotated with `[Key]` and `[Column("DASChannelId")]`. |
|
||
|
|
| `Dasid` | `int? { get; set; }` | DAS database ID of the parent hardware. Annotated with `[Column("DASId")]`. |
|
||
|
|
| `ChannelIdx` | `int { get; set; }` | Physical channel index among channels on the DAS. |
|
||
|
|
| `SupportedBridges` | `int { get; set; }` | Bitmask for supported bridges (see Invariants for bit meanings). |
|
||
|
|
| `SupportedExcitations` | `int { get; set; }` | Bitmask for supported excitation options (see Invariants for bit meanings). |
|
||
|
|
| `DASDisplayOrder` | `int { get; set; }` | Display order among channels; may differ from physical order. Annotated with `[Column("DASDisplayOrder")]`. |
|
||
|
|
| `LocalOnly` | `bool { get; set; }` | Indicates local-only storage (deprecated per XML comment). |
|
||
|
|
| `SupportedDigitalInputModes` | `int { get; set; }` | Bitmask for digital input modes (see Invariants for bit meanings). |
|
||
|
|
| `SupportedSquibFireModes` | `int { get; set; }` | Bitmask for squib fire modes (see Invariants for bit meanings). |
|
||
|
|
| `SupportedDigitalOutputModes` | `int { get; set; }` | Bitmask for digital output modes (see Invariants for bit meanings). |
|
||
|
|
| `ModuleSerialNumber` | `string { get; set; }` | Module serial number. |
|
||
|
|
| `SettingId` | `int { get; set; }` | Setting ID. |
|
||
|
|
| `ModuleArrayIndex` | `int { get; set; }` | Array index of the module among modules on the DAS. |
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
## 3. Invariants
|
||
|
|
|
||
|
|
### First Use Date Validity
|
||
|
|
- `FirstUseDate` (on both `IDASHardware` and `IDASDBRecord`) is **only valid** when `IsFirstUseValid` is `true`.
|
||
|
|
- A `null` value for `FirstUseDate` indicates the hardware has not been used since calibration (only meaningful when `IsFirstUseValid` is `true`).
|
||
|
|
|
||
|
|
### Hardware ID Format
|
||
|
|
- `IDASChannelDBRecord.HardwareId` follows the format: `"serialnumber_dastype"`.
|
||
|
|
|
||
|
|
### Channel Ordering
|
||
|
|
- Physical channel order (`ChannelIdx`) and display order (`DASDisplayOrder`) **may not match** for some hardware types.
|
||
|
|
|
||
|
|
### SupportedBridges Bitmask (IDASChannelDBRecord)
|
||
|
|
| Bit | Meaning |
|
||
|
|
|-----|---------|
|
||
|
|
| 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 (G5 signal plus) |
|
||
|
|
| 8 | RealTime Clock |
|
||
|
|
| 9 | UART |
|
||
|
|
|
||
|
|
### SupportedExcitations Bitmask (IDASChannelDBRecord)
|
||
|
|
| Bit | Meaning |
|
||
|
|
|-----|---------|
|
||
|
|
| 0 | Invalid excitation (undefined) |
|
||
|
|
| 1 | 2V |
|
||
|
|
| 2 | 2.5V |
|
||
|
|
| 3 | 3V |
|
||
|
|
| 4 | 5V |
|
||
|
|
| 5 | 10V |
|
||
|
|
| 6 | 1V |
|
||
|
|
|
||
|
|
### SupportedDigitalInputModes Bitmask (IDASChannelDBRecord)
|
||
|
|
| Bit | Meaning |
|
||
|
|
|-----|---------|
|
||
|
|
| 0 | Invalid mode |
|
||
|
|
| 1 | Transition low to high (TLH) |
|
||
|
|
| 2 | Transition high to low (THL) |
|
||
|
|
| 3 | Contact closure normally open (CCNO) |
|
||
|
|
| 4 | Contact closure normally closed (CCNC) |
|
||
|
|
|
||
|
|
### SupportedSquibFireModes Bitmask (IDASChannelDBRecord)
|
||
|
|
| Bit | Meaning |
|
||
|
|
|-----|---------|
|
||
|
|
| 0 | Invalid mode (fire mode not set) |
|
||
|
|
| 1 | Capacitor discharge |
|
||
|
|
| 2 | Constant current |
|
||
|
|
| 3 | AC discharge |
|
||
|
|
|
||
|
|
### SupportedDigitalOutputModes Bitmask (IDASChannelDBRecord)
|
||
|
|
| Bit | Meaning |
|
||
|
|
|-----|---------|
|
||
|
|
| 0 |
|