16 KiB
source_files, generated_at, model, schema_version, sha256
| source_files | generated_at | model | schema_version | sha256 | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
2026-04-16T03:11:30.898849+00:00 | Qwen/Qwen3-Coder-Next-FP8 | 1 | fef2c76ac2e14d1b |
Diagnostic Interfaces Module Documentation
1. Purpose
This module defines a set of interfaces that collectively support diagnostics for the DAS (Data Acquisition System) factory environment. It provides structured contracts for capturing, storing, and managing diagnostic results across multiple subsystems—including analog channels, CAN bus, trigger logic, arm checks, and module-level diagnostics—while also supporting configuration of diagnostic actions and optimization parameters. The interfaces serve as a contract layer between diagnostic execution logic (likely in DTS.DASLib.Service.DiagnosticsService) and higher-level UI or orchestration components, enabling consistent data exchange for health monitoring, validation, and reporting.
2. Public Interface
Interfaces
-
ITriggerCheckITriggerCheckResult TriggerResult { get; set; }
Gets or sets the result of the trigger check, encapsulating trigger and start-record line status.
-
IOptimizationValuesfloat TransferSpeed { get; set; }
Stores the current data transfer speed used for real-time optimization.
-
ITCDiagnosticResultsITCDiagnosticResult[] TCDiagnosticResults { get; }
Gets the array of thermocouple diagnostic results.void ClearTCDiagnosticResults()
Clears the stored thermocouple diagnostic results.void SetTCDiagnosticResults(ITCDiagnosticResult[] results)
Sets the thermocouple diagnostic results.
-
ICanDiagnosticResultsICanDiagnosticResult[] CanDiagnosticResults { get; }
Gets the array of CAN bus diagnostic results.void ClearCanDiagnosticResults()
Clears the stored CAN diagnostic results.void SetDiagnosticResults(ICanDiagnosticResult[] results)
Sets the CAN diagnostic results (note: method name mismatch with property name—usesSetDiagnosticResultsinstead ofSetCanDiagnosticResults).
-
IDiagnosticMessagesDevicestring[] GetFatalErrorFields()
Returns an array of field names associated with fatal errors.DiagnosticMessageRow[] GetCurrentDiagnosticMessages(string[] fields, bool failingOnly)
Retrieves current diagnostic messages for specified fields;failingOnlyfilters to only failing messages.
-
ICanDiagnosticResultstring ChannelName { get; set; },int ChannelIndex { get; set; },int Data { get; set; },int ErrorFrame { get; set; },double Load { get; set; },int Overruns { get; set; },DateTime LastUpdate { get; set; },bool Active { get; set; }
Properties describing CAN channel diagnostic state.void Copy(ICanDiagnosticResult source)
Copies diagnostic data from anotherICanDiagnosticResult.
-
IArmCheckActions- Boolean properties indicating which arm checks should be performed:
PerformBatteryVoltageCheck,PerformInputVoltageCheck,PerformSensorIdCheck,PerformEventLineCheck,PerformSquibResistanceCheck,PerformTiltSensorCheck,PerformTemperatureCheck,PerformClockSyncCheck.
- Boolean properties indicating which arm checks should be performed:
-
IModuleDiagnosticsResult- Properties for pre- and post-temperature readings at four locations (
TemperatureLocation{1–4}{Pre,Post}), allfloat.
- Properties for pre- and post-temperature readings at four locations (
-
ITriggerCheckResultbool IsStatusGood { get; set; }
Overall DAS status.bool IsStartRecordActive { get; set; }
Whether the start record line is currently active.bool HasStartRecordBeenActive { get; set; }
Whether the start record line was active after arming.bool IsTriggered { get; set; }
Whether the trigger line is currently active.bool HasTriggered { get; set; }
Whether the trigger line was active after arming.
-
ITCDiagnosticResultstring ChannelName { get; set; },int ChannelIndex { get; set; },double? CurrentReading { get; set; }
Thermocouple channel identification and current reading.DiagnosticStatus Status { get; set; }
Diagnostic status (type not defined in this file; assumed external).ConnectionStatuses ConnectionStatus { get; set; }
Connection status (enum defined in this file).void Copy(ITCDiagnosticResult source)
Copies data from anotherITCDiagnosticResult.
-
IArmCheckResultsDictionary<int, string[]> SensorIds { get; set; }
Maps module/channel IDs to sensor ID strings.Dictionary<int, double> SquibResistances { get; set; }
Squib resistance values per module/channel.double?[] BatteryVoltage { get; set; }
Battery voltage per module (nullable, supports multi-battery systems like TDAS Pro rack).double? InputVoltage { get; set; },bool? StartLineShorted { get; set; },bool? EventLineShorted { get; set; }
Input voltage and line short status.short[] TiltSensorDataPre { get; set; },double[] TiltDegrees { get; set; }
Pre-processed tilt sensor data and converted degrees.Dictionary<byte, short[]> IndexedTiltSensorDataPre { get; set; },Dictionary<byte, double[]> IndexedTiltDegrees { get; set; }
Indexed tilt data (by module ID?).float[] TemperaturesPre { get; set; }
Pre-processed temperature readings.double[] Gains { get; set; },double[] ZeroData { get; set; }
Gain and zero calibration data.IDictionary<InputClockSource, bool> InputClockLocks { get; set; }
Clock lock status per input clock source.
-
IDiagnosIDiagnosticActions[] ChannelDiagnostics { get; set; }
Diagnostic action configurations per channel.void SetChannelDiagnosticActions(IDiagnosticActions[] actions, bool setInDb = true)
Sets diagnostic actions, optionally persisting to DB.IDiagnosticResult[] ChannelDiagnosticsResults { get; set; }
Diagnostic results per channel.void ClearChannelDiagnosticsResults(bool bClearDb = true)
Clears diagnostic results, optionally from DB.void SetChannelDiagnosticsResults(IDiagnosticResult[] results, bool setInDb)
Sets diagnostic results, optionally persisting to DB.IModuleDiagnosticsResult[] ModuleDiagnosticsResults { get; set; }
Per-module diagnostic results.IBaseInputValues BaseInput { get; set; }
Base input power and voltage diagnostics.IDictionary<InputClockSource, bool> DASClockSyncStatus { get; set; }
Clock sync status per source.bool ClockSyncInUTC { get; set; },byte PTPDomainID { get; set; }
Clock sync mode and PTP domain ID.IArmCheckActions ArmCheckActions { get; set; },IArmCheckResults ArmCheckResults { get; set; }
Arm check configuration and results.IOptimizationValues OptimizationValues { get; set; }
Optimization settings (e.g., transfer speed).
-
IDiagnosticActionsint DASChannelNumber { get; set; }
Target DAS channel number.- Boolean flags indicating which diagnostic actions to perform:
MeasureExcitation,MeasureOffset,CheckDigitalState,MeasureInternalOffset,RemoveOffset,MeasureNoise,PerformShuntCheck,SquibFireCheck,PerformVoltageInsertCheck,PerformCalSignalCheck,MeasureBridgeResistance. bool AllActionsDisabled()
Returnstrueif all diagnostic actions are disabled.
-
IBaseInputValuesdouble InputMilliVolts { get; set; },bool InputMilliVoltsValid { get; }
Current input voltage in mV and validity flag.double InputVoltage { get; set; },double MinimumValidInputVoltage { get; set; },double MaximumValidInputVoltage { get; set; }
Input voltage and valid range.double BatteryMilliVolts { get; set; },bool BatteryMilliVoltsValid { get; },double BatteryVoltage { get; set; }
Battery voltage metrics.double? BatterySoC { get; set; }
Battery state of charge (percentage;nullif not queried,0if unavailable).double MinimumValidBatteryVoltage { get; set; },double MaximumValidBatteryVoltage { get; set; }
Valid battery voltage range.bool BatteryIsCharging { get; set; }
Charging status.double TemperatureC { get; set; }
Hardware-logged temperature in °C.- Status strings:
BatteryVoltageStatus,InputVoltageStatus,StatusDisplayBattery,StatusDisplayInput. - Status colors:
BatteryVoltageStatusColor,InputVoltageStatusColor(enum fromDFConstantsAndEnums). double ChargeCapacity { get; set; },bool ChargeCapacityValid { get; }
Battery charge capacity and validity.
-
IDiagnosticResultint DASChannelNumber { get; set; },int EventNumber { get; set; }
Channel and event context.- Scaling factors:
double ScalefactorMilliVoltsPerADC { get; set; },double ScalefactorEngineeringUnitsPerADC { get; set; }. double ExpectedExcitationMilliVolts { get; set; }
Factory excitation value.short GetExpectedDataZeroLevelADC(ZeroMethodType zeroMethod)
Returns expected zero-level ADC for a given zeroing method.- Measured values (nullable):
MeasuredExcitationMilliVolts,NegativeExcitation,MeasuredOffsetMilliVolts,MeasuredInternalOffsetMilliVolts,MeasuredOffsetEngineeringUnits,AutoZeroPercentDeviation,FinalOffsetADC,RemovedOffsetADC,RemovedInternalOffsetADC,NoisePercentFullScale,MeasuredShuntDeflectionMv,MeasuredCalSignalMv,TargetCalSignalMv,MeasuredDurationMS,MeasuredDelayMS,TargetGain,MeasuredGain,QueriedGain,TargetShuntDeflectionMv,BridgeResistance. bool ShuntDeflectionFailed { get; set; },bool CalSignalCheckFailed { get; set; }
Boolean flags for test outcomes.bool? SquibFirePassed,bool? SquibDurationPassed,bool? SquibDelayPassed
Squib fire test results.double[] SquibFireCurrentData,double[] SquibFireVoltageData,double[] SquibFireTimeAxis
Raw squib fire test waveforms.double SquibThreshold { get; set; },double SquibVoltageScaler { get; set; },double SquibCurrentScaler { get; set; }
Squib test configuration and scaling.short ZeroMVInADC { get; set; },short WindowAverageADC { get; set; }
Zero-level and window-averaged ADC values.bool DigitalInputActiveState { get; set; }
Digital input active state.
Enumerations
ConnectionStatuses(inITCDiagnosticResult.cs)NotTested,Connected,NotConnected,ModuleNotConnected
Status values for sensor/module connection state.- Annoted with
[Description(...)]attributes for localization.
3. Invariants
-
ITriggerCheckResult:HasStartRecordBeenActiveandHasTriggeredare cumulative since arming (not just current state).IsStatusGoodreflects overall DAS health; its relationship to other flags is not defined but likely implies all checks passed.
-
IDiagnosticResult:ScalefactorMilliVoltsPerADCandScalefactorEngineeringUnitsPerADCare mandatory for scaling downloaded samples; must not be ignored.WindowAverageADC == short.MinValueindicates uninitialized/invalid data.- Measured values (
Measured*) may benull(or0.0interpreted asnull) if not measured—consumers must check nullability.
-
IBaseInputValues:BatterySoC == 0is valid (unavailable), butnullmeans not queried.- Voltage status strings and colors are derived from voltage values and ranges.
-
IArmCheckResults:BatteryVoltageis an array to support multi-battery modules (e.g., TDAS Pro rack).- Tilt sensor data is provided both as flat arrays and indexed dictionaries (likely per module).
-
IDiagnos:ChannelDiagnosticsandChannelDiagnosticsResultsmust be aligned by index (i.e.,ChannelDiagnostics[i]corresponds toChannelDiagnosticsResults[i]).OptimizationValues.TransferSpeedis used for real-time optimization (per comment inIDiagnos).
4. Dependencies
In this module:
-
DTS.Common.Classes.DASFactory(viaIDiagnosticMessagesDevice.cs)
ProvidesDiagnosticMessageRowtype. -
DTS.Common.Converters(viaITCDiagnosticResult.cs)
ProvidesEnumDescriptionTypeConverterforConnectionStatuses. -
DTS.Common.Enums.Sensors(viaIDiagnosticResult.cs)
ProvidesZeroMethodType(used inGetExpectedDataZeroLevelADC). -
DTS.Common.Enums.DASFactory(viaIBaseInputValues.cs)
ProvidesInputClockSourceandDFConstantsAndEnums.VoltageStatusColor.
Inferred external dependencies:
-
DTS.DASLib.Service.DiagnosticsService
Referenced inIDiagnosticResultXML comments forCalibratemethod andDiagnosticsActionsclass. -
AnalogInputDasChannel
Referenced inIDiagnosticResultXML comments for offset limits. -
DiagnosticsActions
Referenced inIDiagnosticResultXML comments forPerformShuntCheck.
5. Gotchas
-
Method name mismatch in
ICanDiagnosticResults:
The interface definesSetDiagnosticResults(ICanDiagnosticResult[] results)instead ofSetCanDiagnosticResults, which is inconsistent with the naming pattern ofClearCanDiagnosticResults()and the propertyCanDiagnosticResults. -
Ambiguous null semantics:
Multipledouble?andshort?properties inIDiagnosticResultandIBaseInputValuesuse0.0or0as a sentinel for "not measured" (e.g.,MeasuredExcitationMilliVolts,MeasuredOffsetMilliVolts). Consumers must distinguish between actual zero values and null via explicit null checks or validity flags (e.g.,InputMilliVoltsValid,BatteryMilliVoltsValid). -
NegativeExcitationflag:
Added to preserve legacy behavior for negative excitation reporting (see comment referencing issue #14233). This is a workaround for hardware quirks and should be preserved for backward compatibility. -
WindowAverageADCsentinel value:
short.MinValueindicates uninitialized/invalid data—consumers must check for this explicitly. -
IArmCheckResults.BatteryVoltageis nullable array:
double?[]implies per-module voltages, but null entries may occur if a module is absent or unmeasured. -
IDiagnos.SetChannelDiagnosticActionsandSetChannelDiagnosticsResults:
DefaultsetInDb/bClearDbparameters suggest optional persistence, but behavior whenfalseis not specified (e.g., in-memory only?). -
ITCDiagnosticResult.ConnectionStatusenum uses[Description]attributes:
Consumers expecting localized strings must use theEnumDescriptionTypeConverteror equivalent to resolve descriptions. -
No validation rules defined:
Interfaces do not enforce constraints (e.g.,DASChannelNumberrange,TransferSpeedbounds). Validation is likely handled elsewhere. -
Missing type definitions:
Types likeDiagnosticStatus,DiagnosticMessageRow,ZeroMethodType,InputClockSource, andDFConstantsAndEnums.VoltageStatusColorare referenced but not defined in this module—consumers must locate them in referenced assemblies. -
IDiagnosticResulthas many squib-related fields:
Includes waveform arrays (SquibFireCurrentData, etc.) and flags—suggests a complex squib test implementation. Ensure consumers handle potentially large arrays appropriately.
None identified beyond the above.