Files
DP44/docs/ai/Common/DTS.Common/Interface/Sensors.md

612 lines
18 KiB
Markdown
Raw Normal View History

2026-04-17 14:55:32 -04:00
---
source_files:
- Common/DTS.Common/Interface/Sensors/IZeroMethods.cs
- Common/DTS.Common/Interface/Sensors/IInitialOffsets.cs
- Common/DTS.Common/Interface/Sensors/ISensorDbRecord.cs
- Common/DTS.Common/Interface/Sensors/IStreamInputSettingDefaults.cs
- Common/DTS.Common/Interface/Sensors/ISoftwareFilter.cs
- Common/DTS.Common/Interface/Sensors/ICanSettingDefaults.cs
- Common/DTS.Common/Interface/Sensors/IDigitalOutDbRecord.cs
- Common/DTS.Common/Interface/Sensors/IThermocouplerRecord.cs
- Common/DTS.Common/Interface/Sensors/IStreamInputRecord.cs
- Common/DTS.Common/Interface/Sensors/IDigitalOutDefaults.cs
- Common/DTS.Common/Interface/Sensors/IDigitalInputDefaults.cs
- Common/DTS.Common/Interface/Sensors/IDigitalInputScaleMultiplier.cs
- Common/DTS.Common/Interface/Sensors/ICANRecord.cs
- Common/DTS.Common/Interface/Sensors/IUartSettingDefaults.cs
- Common/DTS.Common/Interface/Sensors/ISensorChange.cs
- Common/DTS.Common/Interface/Sensors/IUARTRecord.cs
- Common/DTS.Common/Interface/Sensors/IStreamOutputSettingDefaults.cs
- Common/DTS.Common/Interface/Sensors/ISensorCalDbRecord.cs
- Common/DTS.Common/Interface/Sensors/IAnalogDefaults.cs
- Common/DTS.Common/Interface/Sensors/ISensorCalibration.cs
- Common/DTS.Common/Interface/Sensors/IStreamOutputRecord.cs
- Common/DTS.Common/Interface/Sensors/ICalibrationRecord.cs
- Common/DTS.Common/Interface/Sensors/IIEPESensorDefaults.cs
- Common/DTS.Common/Interface/Sensors/ISquibDbRecord.cs
- Common/DTS.Common/Interface/Sensors/ISensorAggregate.cs
- Common/DTS.Common/Interface/Sensors/ISensorBase.cs
- Common/DTS.Common/Interface/Sensors/ISquibSettingDefaults.cs
- Common/DTS.Common/Interface/Sensors/IDigitalInDbRecord.cs
- Common/DTS.Common/Interface/Sensors/ISensorData.cs
- Common/DTS.Common/Interface/Sensors/IAnalogDbRecord.cs
generated_at: "2026-04-17T15:26:58.423059+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "97f3b5be0c6d6a50"
---
# DTS.Common.Interface.Sensors Module Documentation
## 1. Purpose
This module defines the core abstraction layer for the DTS sensor management system. It provides interfaces for various sensor types (analog, digital input/output, thermocoupler, UART, CAN, stream input/output, squib), their database records, calibration data, and configuration defaults. The interfaces enable loose coupling between sensor implementations and the broader system, supporting data collection hardware configuration, calibration tracking, and ISO 13499 compliance for telemetry data.
---
## 2. Public Interface
### Base Sensor Interfaces
#### `ISensorDbRecord`
Base interface for sensor database records.
```csharp
int id { get; set; } // Primary key
short SensorType { get; set; } // Sensor type identifier
string SerialNumber { get; set; } // Required, max 50 chars
```
#### `ISensorBase`
Core sensor properties and methods for configured sensors.
```csharp
// Type identification
bool IsDigitalInput();
bool IsDigitalOutput();
bool IsSquib();
bool IsUart();
bool IsStreamOutput();
// Configuration properties
bool CheckOffset { get; set; }
bool MeasureNoise { get; set; }
bool MeasureExcitation { get; set; }
bool Invert { get; set; }
string Model { get; set; }
string Manufacturer { get; set; }
string UserPartNumber { get; set; }
double Capacity { get; set; }
double FullScaleCapacity { get; }
SensorConstants.CouplingModes CouplingMode { get; set; }
double OffsetToleranceLow { get; set; }
double OffsetToleranceHigh { get; set; }
string DisplayUnit { get; set; }
void SetDisplayUnitNoNotify(string unit);
double RangeLow { get; set; }
double RangeMedium { get; set; }
double RangeHigh { get; set; }
ExcitationVoltageOptions.ExcitationVoltageOption[] SupportedExcitation { get; set; }
void SetExcitationsNoNotify(ExcitationVoltageOptions.ExcitationVoltageOption[] excitations);
ISensorCalibration Calibration { get; set; }
SensorConstants.BridgeType Bridge { get; set; }
double BridgeResistance { get; set; }
string FilterClassIso { get; set; }
bool UniPolar { get; set; }
bool IgnoreRange { get; set; }
string LastUpdatedBy { get; set; }
int Version { get; set; }
bool LocalOnly { get; }
void SetLocalOnly(bool bLocalOnly);
short AxisNumber { get; set; }
short NumberOfAxes { get; set; }
int CalInterval { get; set; }
string Polarity { get; set; }
DateTime LastModified { get; set; }
string UserChannelName { get; set; }
string UserCode { get; set; }
string ISOChannelName { get; set; }
string ISOCode { get; set; }
string PhysicalDimension { get; set; }
string Direction { get; set; }
bool DoNotUse { get; set; }
bool Broken { get; set; }
bool OutOfDate { get; set; }
bool InWarningPeriod { get; set; }
bool InspectBeforeUse { get; set; }
void CopyValues(ISensorBase copy, bool copyCalibration = true);
```
#### `ISensorAggregate`
Nullable variant of sensor properties for aggregate views.
```csharp
bool? IsDigitalInput();
bool? IsDigitalOutput();
bool? IsSquib();
bool? IsUart();
bool? IsStreamOutput();
bool? IsAnalog();
bool? IsStreamInput();
// All properties from ISensorBase as nullable versions
IFilterClass Filter { get; set; }
```
#### `ISensorData`
Comprehensive sensor data interface combining all sensor type capabilities.
```csharp
// Identification
int DatabaseId { get; set; }
string SerialNumber { get; set; }
string UserSerialNumber { get; set; }
string UUID { get; set; }
string EID { get; set; }
string SettingName { get; set; }
string Comment { get; set; }
// Calibration
ISensorCalibration GetLatestCalibration();
ISensorCalibration NewEmbeddedSC(string units);
DateTime GetDueDate(ISensorCalibration sc);
InitialOffset InitialOffset { get; set; }
DateTime? FirstUseDate { get; set; }
int? LatestCalibrationId { get; set; }
// Type checks
bool IsDigitalInput();
bool IsDigitalOutput();
bool IsSquib();
bool IsUart();
bool IsCan();
bool IsStreamInput();
bool IsStreamOutput();
bool IsThermocoupler();
// Test-specific flags
bool IsTestSpecificDigitalOutput { get; set; }
bool IsTestSpecificSquib { get; set; }
bool IsTestSpecificDigitalIn { get; set; }
bool IsTestSpecificEmbedded { get; set; }
bool IsTestSpecificThermo { get; }
bool IsTestSpecificEmbeddedClock { get; set; }
bool IsTestSpecificStreamInput { get; set; }
bool IsTestSpecificStreamOutput { get; set; }
bool IsTestSpecificUart { get; set; }
bool IsTestSpecificCan { get; set; }
// Digital Output properties
double DigitalOutputDelayMS { get; set; }
double DigitalOutputDurationMS { get; set; }
DigitalOutputModes DigitalOutputMode { get; set; }
bool DigitalOutputLimitDuration { get; set; }
// Squib properties
double SquibFireDelayMS { get; set; }
double SquibFireDurationMS { get; set; }
bool LimitSquibFireDuration { get; set; }
double SquibToleranceLow { get; set; }
double SquibToleranceHigh { get; set; }
SquibMeasurementType SquibMeasurementType { get; set; }
double SquibOutputCurrent { get; set; }
SquibFireMode SquibFireMode { get; set; }
bool BypassCurrentFilter { get; }
bool BypassVoltageFilter { get; }
// Digital Input properties
DigitalInputModes InputMode { get; set; }
double InputActiveValue { get; set; }
double InputDefaultValue { get; set; }
// UART properties
uint UartBaudRate { get; set; }
uint UartDataBits { get; set; }
StopBits UartStopBits { get; set; }
Parity UartParity { get; set; }
Handshake UartFlowControl { get; } // Getter only
UartDataFormat UartDataFormat { get; set; }
// CAN properties
bool CanIsFD { get; set; }
int CanArbBaseBitrate { get; set; }
int CanArbBaseSJW { get; set; }
int CanDataBitrate { get; set; }
int CanDataSJW { get; set; }
string CanFileType { get; set; }
// Stream Input/Output properties
string StreamInUDPAddress { get; set; }
UDPStreamProfile StreamOutUDPProfile { get; set; }
string StreamOutUDPAddress { get; set; }
ushort StreamOutUDPTimeChannelId { get; set; }
ushort StreamOutUDPDataChannelId { get; set; }
string StreamOutUDPTmNSConfig { get; set; }
ushort StreamOutIRIGTimeDataPacketIntervalMs { get; set; }
ushort StreamOutTMATSIntervalMs { get; set; }
// Serialization
void ReadXML(System.Xml.XmlElement root);
void WriteXML(ref System.Xml.XmlWriter writer, bool exportFirstUseDate = true);
string ToDisplayString();
string GetSerialNumberWithAxis(string format);
```
---
### Analog Sensor Interfaces
#### `IAnalogDbRecord`
Database record for analog sensors.
```csharp
int Id { get; set; }
string SerialNumber { get; set; }
short AxisNumber { get; set; } // Deprecated
short BridgeLegMode { get; set; } // Deprecated
double BridgeResistance { get; set; }
SensorConstants.BridgeType Bridge { get; set; }
bool Broken { get; set; }
bool BypassFilter { get; set; }
bool CalibrationSignal { get; set; }
int CalInterval { get; set; }
double Capacity { get; set; }
bool CheckOffset { get; set; }
string Comment { get; set; }
SensorConstants.CouplingModes CouplingMode { get; set; }
DateTime Created { get; set; }
bool DiagnosticsMode { get; set; }
string DisplayUnit { get; set; }
bool DoNotUse { get; set; }
double SensitivityTolerancePercent { get; set; }
bool InspectBeforeUseCleared { get; set; }
string EId { get; set; }
double ExternalShuntResistance { get; set; }
IFilterClass Filter { get; set; }
double? InitialEu { get; set; }
double InternalShuntResistance { get; set; }
bool Invert { get; set; }
string ISOChannelName { get; set; }
string ISOCode { get; set; }
DateTime LastModified { get; set; }
bool LocalOnly { get; set; }
string Manufacturer { get; set; }
string Model { get; set; }
string ModifiedBy { get; set; }
short NumberOfAxes { get; set; }
double OffsetToleranceHigh { get; set; }
double OffsetToleranceLow { get; set; }
double RangeMedium { get; set; }
double RangeHigh { get; set; }
double RangeLow { get; set; }
int SensorCategory { get; set; }
int SensorModelId { get; set; }
short Shunt { get; set; }
SensorStatus Status { get; set; }
ExcitationVoltageOptions.ExcitationVoltageOption[] SupportedExcitation { get; set; }
byte[] TagsBlobBytes { get; set; }
long TimesUsed { get; set; }
bool UniPolar { get; set; }
string UserChannelName { get; set; }
string UserCode { get; set; }
string UserSerialNumber { get; set; }
string UserValue1 { get; set; }
string UserValue2 { get; set; }
string UserValue3 { get; set; }
int Version { get; set; }
DateTime? FirstUseDate { get; set; }
int? LatestCalibrationId { get; set; }
bool ACCouplingModeEnabled { get; set; }
string AssemblyName { get; set; }
int UsageCount { get; set; }
int MaximumUsage { get; set; }
```
#### `IAnalogDefaults`
Default settings for analog sensors.
```csharp
IFilterClass SelectedFilterOption { get; set; }
List<IFilterClass> FilterOptions { get; }
bool UseMeasuredExcitation { get; set; }
bool Validate();
void Save();
void ReadXML(System.Xml.XmlElement root);
void WriteXML(ref System.Xml.XmlWriter writer);
bool TrackAnalogDiagnosticsEnabled { get; }
bool TrackAnalogDiagnostics { get; set; }
```
---
### Digital Input/Output Interfaces
#### `IDigitalInDbRecord`
Database record for digital input settings.
```csharp
int Id { get; set; }
string SerialNumber { get; set; }
DigitalInputModes Mode { get; set; }
IDigitalInputScaleMultiplier ScaleMultiplier { get; set; }
DateTime LastModified { get; set; }
string LastModifiedBy { get; set; }
string EID { get; set; }
string ISOCode { get; set; }
string ISOChannelName { get; set; }
string UserCode { get; set; }
string UserChannelName { get; set; }
string UserValue1 { get; set; }
string UserValue2 { get; set; }
string UserValue3 { get; set; }
byte[] UserTags { get; set; }
string MeasurementUnit { get; set; }
IFilterClass FilterClass { get; set; }
bool DoNotUse { get; set; }
bool Broken { get; set; }
```
#### `IDigitalInputScaleMultiplier`
Scale multiplier for digital input interpretation.
```csharp
Forms Form { get; set; } // Enum: ArbitraryLowAndHigh
double DefaultValue { get; set; } // Value for OFF state
double ActiveValue { get; set; } // Value for ON state
bool SimpleEquals(IDigitalInputScaleMultiplier rhs);
string ToSerializeDbString();
void FromDbSerializeString(string s);
```
#### `IDigitalInputDefaults`
Default settings for digital inputs.
```csharp
double ConstantCurrentBreakpointADC { get; set; }
double VoltageBreakpointADC { get; set; }
bool DisplaySPDADC { get; set; }
bool Validate();
```
#### `IDigitalOutDbRecord`
Database record for digital output settings.
```csharp
int DatabaseId { get; set; }
string SerialNumber { get; set; }
double DODelay { get; set; }
double DODuration { get; set; }
string ModifiedBy { get; set; }
DateTime LastModified { get; set; }
string ISOCode { get; set; }
string ISOChannelName { get; set; }
string UserCode { get; set; }
string UserChannelName { get; set; }
bool Broken { get; set; }
bool DoNotUse { get; set; }
DigitalOutputModes DOMode { get; set; }
bool LimitDuration { get; set; }
int Version { get; set; }
byte[] TagsBlobBytes { get; set; }
```
#### `IDigitalOutDefaults`
Default settings for digital outputs.
```csharp
DigitalOutputModes OutputMode { get; set; }
double DelayMS { get; set; }
bool LimitDuration { get; set; }
double DurationMS { get; set; }
```
---
### Squib Interfaces
#### `ISquibDbRecord`
Database record for squib (explosive initiator) settings.
```csharp
string SerialNumber { get; set; }
int Id { get; set; }
bool BypassCurrentFilter { get; set; }
bool BypassVoltageFilter { get; set; }
double DelayMs { get; set; }
double DurationMs { get; set; }
SquibFireMode FireMode { get; set; }
string IsoCode { get; set; }
string IsoChannelName { get; set; }
string UserCode { get; set; }
string UserChannelName { get; set; }
SquibMeasurementType MeasurementType { get; set; }
double SquibOutputCurrent { get; set; }
double SquibToleranceLow { get; set; }
double SquibToleranceHigh { get; set; }
bool LimitDuration { get; set; }
string ArticleId { get; set; }
int Version { get; set; }
DateTime LastModified { get; set; }
string LastModifiedBy { get; set; }
string UserValue1 { get; set; }
string UserValue2 { get; set; }
string UserValue3 { get; set; }
byte[] UserTags { get; set; }
bool DoNotUse { get; set; }
bool Broken { get; set; }
bool DefineDelayInTest { get; set; }
```
#### `ISquibSettingDefaults`
Default settings for squib outputs.
```csharp
double ToleranceLowDefault { get; set; }
double ToleranceHighDefault { get; set; }
double OutputCurrentDefault { get; set; }
SquibMeasurementType MeasurementTypeDefault { get; set; }
SquibFireMode FireModeDefault { get; set; }
bool LimitDurationDefault { get; set; }
double FireDurationMS { get; set; }
double FireDelayMS { get; set; }
bool Validate();
bool ToleranceValid { get; }
```
---
### UART Interfaces
#### `IUARTRecord`
Database record for UART sensors.
```csharp
int Id { get; set; }
string SerialNumber { get; set; }
uint UartBaudRate { get; set; }
uint UartDataBits { get; set; }
StopBits UartStopBits { get; set; }
Handshake UartFlowControl { get; } // Getter only
UartDataFormat UartDataFormat { get; set; }
Parity UartParity { get; set; }
DateTime LastModified { get; set; }
string LastUpdatedBy { get; set; }
byte[] TagsBlobBytes { get; set; }
bool DoNotUse { get; set; }
bool Broken { get; set; }
```
#### `IUartSettingDefaults`
Default settings for UART configuration.
```csharp
uint BaudRate { get; set; }
uint DataBits { get; set; }
StopBits StopBits { get; set; }
Parity Parity { get; set; }
Handshake FlowControl { get; } // Getter only
UartDataFormat DataFormat { get; set; }
bool Validate();
```
---
### CAN Interfaces
#### `ICANRecord`
Database record for CAN bus sensors.
```csharp
int Id { get; set; }
string SerialNumber { get; set; }
DateTime LastModified { get; set; }
string LastUpdatedBy { get; set; }
byte[] TagsBlobBytes { get; set; }
bool DoNotUse { get; set; }
bool Broken { get; set; }
bool CanIsFD { get; set; }
int CanArbBaseBitrate { get; set; }
int CanArbBaseSJW { get; set; }
int CanDataBitrate { get; set; }
int CanDataSJW { get; set; }
string CanFileType { get; set; }
```
#### `ICanSettingDefaults`
Default settings for CAN configuration.
```csharp
bool IsFD { get; set; }
int ArbBaseBitrate { get; set; }
int ArbBaseSJW { get; set; }
int DataBitrate { get; set; }
int DataSJW { get; set; }
string FileType { get; set; }
bool Validate();
```
---
### Stream Input/Output Interfaces
#### `IStreamInputRecord`
Database record for stream input sensors.
```csharp
int Id { get; set; }
string SerialNumber { get; set; }
DateTime LastModified { get; set; }
string LastUpdatedBy { get; set; }
byte[] TagsBlobBytes { get; set; }
bool DoNotUse { get; set; }
bool Broken { get; set; }
string StreamInUDPAddress { get; set; }
```
#### `IStreamInputSettingDefaults`
Default settings for stream input.
```csharp
string UDPAddress { get; set; }
bool Validate();
```
#### `IStreamOutputRecord`
Database record for stream output sensors.
```csharp
int Id { get; set; }
string SerialNumber { get; set; }
DateTime LastModified { get; set; }
string LastUpdatedBy { get; set; }
byte[] TagsBlobBytes { get; set; }
bool DoNotUse { get; set; }
bool Broken { get; set; }
UDPStreamProfile StreamOutUDPProfile { get; set; }
string StreamOutUDPAddress { get; set; }
ushort StreamOutUDPTimeChannelId { get; set; }
ushort StreamOutUDPDataChannelId { get; set; }
string StreamOutUDPTmNSConfig { get; set; }
ushort StreamOutIRIGTimeDataPacketIntervalMs { get; set; }
ushort StreamOutTMATSIntervalMs { get; set; }
```
#### `IStreamOutputSettingDefaults`
Default settings for stream output.
```csharp
UDPStreamProfile Profile { get; set; }
string UDPAddress { get; set; }
ushort TimeChannelId { get; set; }
ushort DataChannelId { get; set; }
string TmNSConfig { get; set; }
ushort IRIGTimeDataPacketIntervalMs { get; set; }
bool UseAdvancedUDPStreamProfiles { get; set; }
bool Validate();
```
---
### Thermocoupler Interface
#### `IThermocouplerRecord`
Database record for thermocoupler sensors.
```csharp
int Id { get; set; }
string SerialNumber { get; set; }
DateTime LastModified { get; set; }
string LastUpdatedBy { get; set; }
byte[] TagsBlobBytes { get; set; }
bool DoNotUse { get; set; }
bool Broken { get; set; }
```
---
### Calibration Interfaces
#### `ISensorCalDbRecord`
Database record for sensor calibration.
```csharp
int? CalibrationId { get; set; }
string SerialNumber { get; set; }
DateTime CalibrationDate { get; set; }
string Username { get; set; }
bool LocalOnly { get; set; }
bool NonLinear { get; set; }
ICalibrationRecords Records { get; set; }
DateTime ModifyDate { get; set; }
bool IsProportional { get; set; }
bool RemoveOffset { get; set; }
ZeroMethods ZeroMethods { get; set; }
string[] CertificationDocuments { get; set; }
InitialOffsets InitialOffsets { get; set; }
bool LinearAdded { get; }
SensitivityInspectionType SensitivityInspection { get; set; }
string CalibrationNote { get; set; }
int UsageCount { get; set; }
```
#### `ISensorCalibration`
Extended calibration interface with serialization.
```csharp
string EngineeringUnits { get; }