Files
DP44/enriched-qwen3-coder-next/Common/DTS.Common/Interface/Viewer/TestDefinition.md
2026-04-17 14:55:32 -04:00

16 KiB
Raw Blame History

source_files, generated_at, model, schema_version, sha256
source_files generated_at model schema_version sha256
Common/DTS.Common/Interface/Viewer/TestDefinition/ITestMetadata.cs
Common/DTS.Common/Interface/Viewer/TestDefinition/ITestGraphs.cs
Common/DTS.Common/Interface/Viewer/TestDefinition/ITestSetupMetadata.cs
Common/DTS.Common/Interface/Viewer/TestDefinition/ITestSummary.cs
Common/DTS.Common/Interface/Viewer/TestDefinition/ITestRunMetadata.cs
Common/DTS.Common/Interface/Viewer/TestDefinition/ITestModule.cs
Common/DTS.Common/Interface/Viewer/TestDefinition/ITestChannel.cs
Common/DTS.Common/Interface/Viewer/TestDefinition/ITestCalculatedChannel.cs
2026-04-16T03:10:18.283412+00:00 Qwen/Qwen3-Coder-Next-FP8 1 89d15132aeb4469a

Documentation: Test Definition Interfaces

1. Purpose

This module defines a set of interfaces that model metadata for test execution and data capture within the DTS (presumably Data Acquisition and Test System) viewer component. These interfaces provide a structured, strongly-typed representation of test metadata—including runs, setups, modules, channels (both physical and calculated), and graphs—enabling consistent data exchange and UI binding across the system. They serve as the foundational data contracts for test result visualization, reporting, and analysis workflows, decoupling the UI layer from concrete data implementations while preserving fidelity to the underlying acquisition schema.

2. Public Interface

ITestMetadata

  • Namespace: DTS.Common.Interface.TestDefinition
  • Properties:
    • ITestRunMetadata TestRun { get; set; } Metadata about the test run (e.g., identifiers, software, fault flags).
    • ITestSetupMetadata TestSetup { get; set; } Metadata about the test setup (e.g., date, name, associated graphs).

ITestGraphs

  • Namespace: DTS.Common.Interface
  • Properties:
    • string Name { get; set; } Graph name.
    • string HardwareChannelName { get; set; } Name of the hardware channel associated with the graph.
    • List<string> ChannelId { get; set; } Ordered list of channel IDs represented in the graph.

ITestSetupMetadata

  • Namespace: DTS.Common.Interface
  • Properties:
    • string Name { get; set; } Setup name.
    • DateTime TestDate { get; set; } Date of the test.
    • DateTime TimeStamp { get; set; } Timestamp of metadata creation/update.
    • List<ITestGraphs> TestGraphs { get; set; } List of graphs associated with this setup.

ITestSummary

  • Namespace: DTS.Common.Interface.TestDefinition
  • Inherits: IBaseClass (not defined in provided sources)
  • Properties:
    • string Id { get; set; } Unique identifier for the test.
    • string Name { get; set; } Human-readable test name.
    • string Description { get; set; } Test description.
    • int ChannelCount { get; set; } Total number of channels (physical + calculated).
    • DateTime TestDate { get; set; } Date of test execution.
    • string DataType { get; set; } Type of data collected (e.g., "raw", "processed").
    • bool IsSelected { get; set; } UI selection state.
    • List<ITestGraphs> Graphs { get; set; } Graphs associated with the test.
    • List<ITestChannel> Channels { get; set; } Physical channels used in the test.
    • List<ITestChannel> CalculatedChannels { get; set; } Channels derived via calculation.
    • IBaseViewModel Parent { get; set; } Parent view model (type IBaseViewModel not defined in sources).

ITestRunMetadata

  • Namespace: DTS.Common.Interface
  • Inherits: INotifyPropertyChanged
  • Properties:
    • string Id { get; set; } Unique run identifier.
    • string Description { get; set; } Run description.
    • bool InlineSerializedData { get; set; } Indicates if raw data is embedded inline.
    • string TestGuid { get; set; } Globally unique test identifier.
    • int FaultFlags { get; set; } Bitmask of fault conditions during the test.
    • string Software { get; set; } Software name used for acquisition.
    • string SoftwareVersion { get; set; } Version of acquisition software.
    • string DataType { get; set; } Data type (e.g., "raw", "calibrated").
    • List<ITestModule> Modules { get; set; } List of acquisition modules used.
    • List<ITestChannel> Channels { get; set; } Physical channels in the run.
    • List<ITestChannel> CalculatedChannels { get; set; } Calculated channels in the run.

ITestModule

  • Namespace: DTS.Common.Interface
  • Inherits: INotifyPropertyChanged
  • Properties:
    • string SerialNumber { get; set; } Module serial number.
    • string BaseSerialNumber { get; set; } Base/parent module serial number (for daisy chains).
    • int AaFilterRateHz { get; set; } Anti-aliasing filter rate in Hz.
    • int Number { get; set; } Module number/index.
    • int NumberOfSamples { get; set; } Number of samples after subsampling.
    • int UnsubsampledNumberOfSamples { get; set; } Number of samples before subsampling.
    • double RequestedPostTriggerSeconds { get; set; } Requested post-trigger time (s).
    • double RequestedPreTriggerSeconds { get; set; } Requested pre-trigger time (s).
    • double PostTriggerSeconds { get; set; } Actual post-trigger time (s).
    • double PreTriggerSeconds { get; set; } Actual pre-trigger time (s).
    • string RecordingMode { get; set; } e.g., "continuous", "triggered".
    • int SampleRateHz { get; set; } Effective sample rate (Hz) after subsampling.
    • int StartRecordSampleNumber { get; set; } Sample index where recording started.
    • int NumberOfChannels { get; set; } Number of active channels on this module.
    • bool InlineSerializedData { get; set; } Indicates if raw data is embedded inline.
    • int StartRecordTimestampSec { get; set; } Start record timestamp (seconds).
    • int StartRecordTimestampNanoSec { get; set; } Start record timestamp (nanoseconds).
    • int TriggerTimestampSec { get; set; } Trigger timestamp (seconds).
    • int TriggerTimestampNanoSec { get; set; } Trigger timestamp (nanoseconds).
    • bool PTPMasterSync { get; set; } Indicates PTP (Precision Time Protocol) master sync status.
    • int TiltSensorAxisX/Y/ZDegreesPre/Post { get; set; } Tilt sensor readings (pre/post test).
    • int TemperatureLocation1/2/3/4Pre/Post { get; set; } Temperature readings (pre/post test).
    • List<ITestChannel> TestChannels { get; set; } Channels assigned to this module.

ITestChannel

  • Namespace: DTS.Common.Interface
  • Inherits: INotifyPropertyChanged
  • Properties:
    • string SerialNumber { get; set; } Channel/sensor serial number.
    • string ChannelId { get; set; } Unique channel identifier.
    • string Description { get; set; } Human-readable description.
    • string ChannelGroupName { get; set; } Logical group name (e.g., "Strain", "Temperature").
    • string ChannelType { get; set; } e.g., "analog", "digital", "calculated".
    • int Number { get; set; } Channel index within module.
    • string DigitalMultiplier { get; set; } Digital scaling multiplier.
    • string DigitalMode { get; set; } Digital input mode (e.g., "counter", "encoder").
    • DateTime Start { get; set; } Channel start time.
    • string Bridge { get; set; } Bridge configuration (e.g., "quarter", "full").
    • double BridgeResistanceOhms { get; set; } Bridge resistance (Ω).
    • double ZeroPoint { get; set; } Zero-point offset (e.g., mV).
    • string ChannelDescriptionString { get; set; } Raw description string.
    • string ChannelName2 { get; set; } Alternate channel name.
    • string HardwareChannelName { get; set; } Hardware-level channel name.
    • double DesiredRange { get; set; } Desired measurement range.
    • double Sensitivity { get; set; } Sensor sensitivity (e.g., mV/V).
    • string SoftwareFilter { get; set; } Applied software filter (e.g., "moving average").
    • bool ProportionalToExcitation { get; set; } Whether output is proportional to excitation.
    • bool IsInverted { get; set; } Inversion flag.
    • string LinearizationFormula { get; set; } Formula used for linearization.
    • bool IsSubsampled { get; set; } Whether data was subsampled.
    • int AbsoluteDisplayOrder { get; set; } Display order across all channels.
    • DateTime LastCalibrationDate { get; set; } Last calibration date.
    • string SensorId { get; set; } Sensor ID.
    • int OffsetToleranceLowMv { get; set; } Low tolerance for offset check (mV).
    • int OffsetToleranceHighMv { get; set; } High tolerance for offset check (mV).
    • int DataFlag { get; set; } Data quality flag.
    • string ExcitationVoltage { get; set; } Excitation voltage setting (e.g., "2.5V").
    • string Eu { get; set; } Engineering units (e.g., "psi", "°C").
    • bool CalSignalEnabled { get; set; } Calibration signal enabled.
    • bool ShuntEnabled { get; set; } Shunt calibration enabled.
    • bool VoltageInsertionCheckEnabled { get; set; } Voltage insertion check enabled.
    • bool RemoveOffset { get; set; } Whether to remove offset.
    • string ZeroMethod { get; set; } Zeroing method (e.g., "manual", "auto").
    • double ZeroAverageWindowBegin { get; set; } Start of zeroing window (s).
    • double ZeroAverageWindowEnd { get; set; } End of zeroing window (s).
    • int InitialEu { get; set; } Initial engineering unit value.
    • string InitialOffset { get; set; } Initial offset value.
    • int UnsubsampledSampleRateHz { get; set; } Sample rate before subsampling (Hz).
    • double MeasuredShuntDeflectionMv { get; set; } Measured shunt deflection (mV).
    • double TargetShuntDeflectionMv { get; set; } Target shunt deflection (mV).
    • double MeasuredExcitationVoltage { get; set; } Actual measured excitation voltage.
    • double FactoryExcitationVoltage { get; set; } Factory-set excitation voltage.
    • double TimeOfFirstSample { get; set; } Time of first sample (seconds).
    • int Multiplier { get; set; } Scaling multiplier.
    • int UserOffsetEu { get; set; } User-defined offset in engineering units.
    • int UnitConversion { get; set; } Unit conversion type/index.
    • bool AtCapacity { get; set; } Whether channel is at full-scale capacity.
    • int CapacityOutputIsBasedOn { get; set; } Reference for capacity calculation.
    • string SourceChannelNumber { get; set; } Source channel index (for calculated channels).
    • string SourceModuleNumber { get; set; } Source module index (for calculated channels).
    • string SourceModuleSerialNumber { get; set; } Source module serial (for calculated channels).
    • string Calculation { get; set; } Calculation expression (for calculated channels).
    • int SampleRateHz { get; set; } Effective sample rate (Hz).
    • string SensitivityUnits { get; set; } Units for sensitivity (e.g., "mV/V/lb").
    • int SensorCapacity { get; set; } Sensor full-scale capacity.

ITestCalculatedChannel

  • Namespace: DTS.Common.Interface
  • Inherits: INotifyPropertyChanged
  • Properties:
    • Identical to ITestChannel except for the following type differences:
      • BridgeResistanceOhms is int (vs. double in ITestChannel).
      • ExcitationVoltage is int (vs. string in ITestChannel).
    • All other properties match ITestChannel in name, type, and semantics.

Note

: ITestCalculatedChannel appears to be a duplicate of ITestChannel with minor type inconsistencies (likely legacy or oversight). Use with caution—prefer ITestChannel unless specifically required.

3. Invariants

  • ITestRunMetadata and ITestSetupMetadata: Both implement INotifyPropertyChanged, indicating they support data binding and must raise PropertyChanged events on property changes.
  • ITestModule and ITestChannel: Both implement INotifyPropertyChanged; changes to module/channel properties must notify listeners.
  • ITestSummary: Inherits IBaseClass, implying it participates in a base view model hierarchy (exact contract unknown from source).
  • Channel Lists:
    • ITestRunMetadata.Channels and ITestRunMetadata.CalculatedChannels are distinct lists; channels are not duplicated across them.
    • ITestSummary mirrors this separation (Channels vs. CalculatedChannels).
  • ITestGraphs.ChannelId: List order likely corresponds to display order or data series order.
  • ITestModule.Number and ITestChannel.Number: Both are 0-based indices within their parent context (module list or channel list).
  • Timestamps:
    • StartRecordTimestampSec/NanoSec and TriggerTimestampSec/NanoSec in ITestModule represent high-resolution timestamps.
    • TimeOfFirstSample in ITestChannel is in seconds (likely relative to test start).
  • IsSubsampled: When true, SampleRateHz < UnsubsampledSampleRateHz.

4. Dependencies

Dependencies of this module:

  • System.Collections.Generic Used for List<T> properties.
  • System.ComponentModel Used for INotifyPropertyChanged.
  • System Used for DateTime, List<T>, etc.
  • DTS.Common.Base Referenced by ITestSummary for IBaseClass.
  • DTS.Common.Interface Cross-referenced by ITestRunMetadata, ITestSetupMetadata, ITestModule, ITestChannel, ITestCalculatedChannel, and ITestGraphs.

Dependencies on this module:

  • UI/Viewer Layer: All interfaces are named with ITest* and reside in DTS.Common.Interface.TestDefinition, strongly suggesting usage in a viewer or analysis UI (e.g., WPF, WinForms).
  • Serialization Layer: Properties like InlineSerializedData imply integration with data serialization/deserialization logic (not visible here).
  • Data Acquisition Layer: Interfaces model raw acquisition metadata (e.g., SampleRateHz, TriggerTimestamp*, TiltSensor*), indicating use by acquisition or post-processing modules.

5. Gotchas

  • ITestCalculatedChannel vs. ITestChannel:
    • BridgeResistanceOhms is int in ITestCalculatedChannel but double in ITestChannel.
    • ExcitationVoltage is int in ITestCalculatedChannel but string in ITestChannel.
    • This inconsistency suggests a possible legacy design flaw or incomplete refactoring. Prefer ITestChannel unless legacy code requires ITestCalculatedChannel.
  • Missing ITestCalculatedChannel usage in ITestSummary:
    • ITestSummary uses List<ITestChannel> CalculatedChannels, not List<ITestCalculatedChannel>. This implies calculated channels are also represented via ITestChannel, despite having a separate interface.
  • ITestGraphs namespace:
    • ITestGraphs resides in DTS.Common.Interface (not DTS.Common.Interface.TestDefinition), unlike other test definition interfaces. This may indicate historical grouping or accidental misplacement.
  • ITestSummary.Parent:
    • Type IBaseViewModel is referenced but not defined in the provided sources—its contract is unknown.
  • ChannelId vs. HardwareChannelName:
    • Both ITestChannel and ITestGraphs expose ChannelId and HardwareChannelName. Ensure consistency in how these are populated (e.g., ChannelId may be logical, HardwareChannelName physical).
  • **`Data