15 KiB
15 KiB
source_files, generated_at, model, schema_version, sha256
| source_files | generated_at | model | schema_version | sha256 | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
2026-04-16T02:34:18.141479+00:00 | Qwen/Qwen3-Coder-Next-FP8 | 1 | 2ef74d227b33f018 |
Documentation: Test Definition Interfaces
1. Purpose
This module defines a set of interfaces that collectively model metadata and structural information for test data in the DTS (Data Transfer System) viewer. These interfaces (ITestMetadata, ITestRunMetadata, ITestSetupMetadata, ITestSummary, ITestModule, ITestChannel, ITestCalculatedChannel, ITestGraphs) provide a standardized contract for representing hierarchical test metadata—including run-level, setup-level, module-level, and channel-level details—enabling consistent data binding, serialization, and UI rendering across the viewer application. The interfaces are designed to support both raw and derived (calculated) channels, with rich metadata for calibration, configuration, and signal processing.
2. Public Interface
ITestMetadata
- Namespace:
DTS.Common.Interface.TestDefinition - Properties:
ITestRunMetadata TestRun { get; set; }– Top-level metadata for a single test run.ITestSetupMetadata TestSetup { get; set; }– Metadata describing the physical test setup (e.g., hardware configuration, timestamps).
ITestGraphs
- Namespace:
DTS.Common.Interface - Properties:
string Name { get; set; }– Graph name.string HardwareChannelName { get; set; }– Hardware channel name associated with the graph.List<string> ChannelIds { get; set; }– List of channel IDs included in the graph.List<ITestChannel> Channels { get; set; }– List ofITestChannelinstances associated with the graph.
ITestSetupMetadata
- Namespace:
DTS.Common.Interface - Properties:
string SetupName { get; set; }– Human-readable name of the setup.DateTime TimeStamp { get; set; }– Timestamp when the setup was created/configured.List<ITestGraphs> TestGraphs { get; set; }– Collection of graphs defined for this setup.CalibrationBehaviors CalibrationBehavior { get; set; }– Enumerated calibration behavior settings (type defined inDTS.Common.Enums.Sensors).
ITestSummary
- Namespace:
DTS.Common.Interface.TestDefinition - Inherits:
IBaseClass - Properties:
string Id { get; set; },string Name { get; set; },string Description { get; set; }– Identifying and descriptive metadata.int ChannelCount { get; set; }– Total number of channels.DateTime TestDate { get; set; }– Date/time of the test.string DataType { get; set; }– Type of data (e.g., “Raw”, “Processed”).bool IsSelected { get; set; }– UI selection state.List<ITestGraphs> Graphs { get; set; },List<ITestChannel> Channels { get; set; },List<ITestChannel> CalculatedChannels { get; set; }– Collections of graphs, raw channels, and calculated channels.IBaseViewModel Parent { get; set; }– Parent view model for UI binding.
ITestRunMetadata
- Namespace:
DTS.Common.Interface - Inherits:
INotifyPropertyChanged - Properties:
string Name,string Id,string Description– Run-level identifiers and description.bool InlineSerializedData { get; set; }– Indicates whether binary data is embedded inline.string TestGuid { get; set; }– Unique GUID for the test.int FaultFlags { get; set; }– Bitmask of fault conditions.string Software,string SoftwareVersion– Software and version used during test.string DataType { get; set; }– Data type (e.g., “Raw”, “Processed”).DateTime FileDate { get; set; },string FilePath { get; set; }– File timestamp and path.List<ITestModule> Modules { get; set; },List<ITestChannel> Channels { get; set; },List<ITestChannel> CalculatedChannels { get; set; }– Collections of modules, raw channels, and calculated channels.
ITestModule
- Namespace:
DTS.Common.Interface - Inherits:
INotifyPropertyChanged - Properties:
string SerialNumber,string BaseSerialNumber– Module serial identifiers.int AaFilterRateHz { get; set; }– Anti-aliasing filter rate.int Number { get; set; },int NumberOfChannels { get; set; }– Module number and channel count.int NumberOfSamples,int UnsubsampledNumberOfSamples– Sample counts (subsampled/unsubsampled).double RequestedPostTriggerSeconds,double RequestedPreTriggerSeconds,double PostTriggerSeconds,double PreTriggerSeconds– Trigger timing parameters.string RecordingMode { get; set; }– e.g., “Continuous”, “Triggered”.int SampleRateHz { get; set; }– Actual sample rate.int StartRecordSampleNumber { get; set; }– Sample index where recording started.int StartRecordTimestampSec,int StartRecordTimestampNanoSec– Start timestamp (seconds + nanoseconds).int TriggerTimestampSec,int TriggerTimestampNanoSec– Trigger timestamp.List<ulong> TriggerSampleNumbers { get; set; }– Sample numbers where triggers occurred.bool PTPMasterSync { get; set; }– Precision Time Protocol master sync status.- Tilt sensor angles (pre/post) for X/Y/Z axes (e.g.,
TiltSensorAxisXDegreesPre,TiltSensorAxisZDegreesPost). - Temperature readings (pre/post) for 4 locations (e.g.,
TemperatureLocation1Pre,TemperatureLocation4Post). List<ITestChannel> Channels { get; set; },List<ITestChannel> CalculatedChannels { get; set; }– Channels associated with this module.
ITestCalculatedChannel
- Namespace:
DTS.Common.Interface - Inherits:
INotifyPropertyChanged - Properties: (All properties are read-write unless otherwise noted)
string SerialNumber,string ChannelId,string Description,string ChannelGroupName,string ChannelType,int Number,string DigitalMultiplier,string DigitalMode,DateTime Start,string Bridge,int BridgeResistanceOhms,double ZeroPoint,string ChannelDescriptionString,string ChannelName2,string HardwareChannelName,double DesiredRange,double Sensitivity,string SoftwareFilter,bool ProportionalToExcitation,bool IsInverted,string LinearizationFormula,bool IsSubsampled,int AbsoluteDisplayOrder,DateTime LastCalibrationDate,string SensorId,int OffsetToleranceLowMv,int OffsetToleranceHighMv,int DataFlag,int ExcitationVoltage,string Eu,bool CalSignalEnabled,bool ShuntEnabled,bool VoltageInsertionCheckEnabled,bool RemoveOffset,string ZeroMethod,double ZeroAverageWindowBegin,double ZeroAverageWindowEnd,int InitialEu,string InitialOffset,int UnsubsampledSampleRateHz,double MeasuredShuntDeflectionMv,double TargetShuntDeflectionMv,double MeasuredExcitationVoltage,double FactoryExcitationVoltage,double TimeOfFirstSample,int Multiplier,int UserOffsetEu,int UnitConversion,bool AtCapacity,int CapacityOutputIsBasedOn,string SourceChannelNumber,string SourceModuleNumber,string SourceModuleSerialNumber,string Calculation,int SampleRateHz,string SensitivityUnits,int SensorCapacity.
ITestChannel
- Namespace:
DTS.Common.Interface - Inherits:
INotifyPropertyChanged - Properties:
- Identification & Context:
string Group,string SubGroup,string TestId,string TestSetupName,string ModuleSerialNumber,string SerialNumber,string ChannelId,string ChannelDisplayName,string Description,string IsoCode,string IsoChannelName,string UserCode,string UserChannelName,string ChannelGroupName,string ChannelType,bool IsCalculatedChannel,int Number,string DigitalMultiplier,string DigitalMode,DateTime Start,string Bridge,double BridgeResistanceOhms,double ZeroPoint,string ChannelDescriptionString,string ChannelName2,string HardwareChannelName,string ExcitationVoltage,string Eu,string SensitivityUnits,int SensorCapacity,string SensorPolarity,int ChannelNumber,string BinaryFileName,string BinaryFilePath.
- Calibration & Configuration:
double DesiredRange,double ActualMaxRangeEu,double ActualMinRangeEu,double ActualMaxRangeAdc { get; },double ActualMinRangeAdc { get; },double ActualMaxRangeMv,double ActualMinRangeMv,double Sensitivity,string SoftwareFilter,bool ProportionalToExcitation,bool IsInverted,string LinearizationFormula,bool IsSubsampled,int AbsoluteDisplayOrder,DateTime LastCalibrationDate,string SensorId,int OffsetToleranceLowMv,int OffsetToleranceHighMv,int DataFlag,bool CalSignalEnabled,bool ShuntEnabled,bool VoltageInsertionCheckEnabled,bool RemoveOffset,string ZeroMethod,double ZeroAverageWindowBegin,double ZeroAverageWindowEnd,int InitialEu,string InitialOffset,int UnsubsampledSampleRateHz,double MeasuredShuntDeflectionMv,double TargetShuntDeflectionMv,double MeasuredExcitationVoltage,double FactoryExcitationVoltage,double TimeOfFirstSample,double Multiplier,double UserOffsetEu,int UnitConversion,bool AtCapacity,int CapacityOutputIsBasedOn,string SourceChannelNumber,string SourceModuleNumber,string SourceModuleSerialNumber,string Calculation,int SampleRateHz.
- Statistics & Display:
double MinADC,double MaxADC,double AveADC,double StdDevADC,double T0ADC,double MinMV,double MaxMV,double AveMV,double StdDevMV,double T0MV,double MinEU,double MaxEU,double AveEU,double StdDevEU,double T0EU,double MinY,double MaxY,double AveY,double StdDevY,double T0Value.
- UI & State:
string GraphName,bool IsGraphChannel,IBaseViewModel Parent,Color ChannelColor,string ErrorMessage,bool IsError,Color? ErrorColor,bool IsSelected,bool CanSelectChannel,bool IsLocked,bool CanLock.
- Parent References:
ITestSetupMetadata ParentTestSetup { get; set; },ITestModule ParentModule { get; set; }.
- Methods:
void SetChannelDescriptionAndDisplayName(string channelDescriptionString)– UpdatesChannelDescriptionStringandChannelDisplayName.ITestChannel Copy()– Returns a copy of the channel.
- Trigger/Timing:
ulong T1Sample { get; set; },ulong T2Sample { get; set; },double HIC { get; set; }.
- EU Scaling:
bool UseEUScaler { get; set; },double ScaleFactorEU { get; set; }.
- Identification & Context:
3. Invariants
- Hierarchical Consistency:
ITestRunMetadatacontainsModules,Channels, andCalculatedChannels. EachITestModulecontains its ownChannelsandCalculatedChannels. EachITestChannelhasParentModuleandParentTestSetupreferences, implying a tree structure:TestRun → Modules → Channels. - Channel Type Distinction:
ITestChannel.IsCalculatedChanneldistinguishes raw vs. derived channels.ITestSummaryandITestRunMetadatamaintain separate lists forChannels(raw) andCalculatedChannels. - Metadata Completeness:
ITestSetupMetadata.TestGraphsandITestSummary.GraphscontainITestGraphsinstances, each referencing a list ofChannelIdsandITestChannelinstances. This implies that graphs are derived views over channel collections. - Timestamps: All
DateTimefields (e.g.,TimeStamp,FileDate,Start,LastCalibrationDate) are expected to be non-null and represent UTC or local time consistently (source does not specify, so assume caller must enforce). - INotifyPropertyChanged: All interfaces (
ITestRunMetadata,ITestModule,ITestChannel,ITestCalculatedChannel) implementINotifyPropertyChanged, indicating they are intended for data binding and must raise change notifications on property updates. - Range Calculations:
ITestChannelexposes both raw (Adc,Mv) and engineering (EU,Y) unit ranges. TheActualMaxRangeAdc/ActualMinRangeAdcare read-only, suggesting they are computed from data, not user-configurable.
4. Dependencies
External Dependencies
System.Collections.Generic,System.ComponentModel,System– Core .NET namespaces.DTS.Common.Base– ProvidesIBaseClassandIBaseViewModel.DTS.Common.Enums.Sensors– DefinesCalibrationBehaviorsenum used inITestSetupMetadata.
Internal Dependencies
- Consumers: This module is consumed by UI/view layer components (e.g., viewers, exporters, analyzers) that rely on
ITestSummary,ITestRunMetadata,ITestChannel, etc., for binding and rendering test data. - Implementations: Concrete types implementing these interfaces are not included in the source, but are likely in data loading/serialization modules (e.g., binary file parsers, database mappers).
5. Gotchas
- Redundant Channel Lists:
ITestRunMetadata,ITestModule,ITestSummary, andITestGraphsall containChannelsandCalculatedChannels. These may be redundant or represent different subsets (e.g., flattened vs. module-scoped). No guarantee of consistency across lists is implied. ActualMaxRangeAdc/ActualMinRangeAdcare read-only: These properties areget;only inITestChannel, but all others areget; set;. This suggests they are computed post-data-load and should not be set directly.ExcitationVoltagevs.MeasuredExcitationVoltage/FactoryExcitationVoltage:ITestChannelhasstring ExcitationVoltage(likely a display string), whileITestCalculatedChannelandITestChannelalso havedouble MeasuredExcitationVoltageanddouble FactoryExcitationVoltage. Confusing naming may lead to misuse.ChannelColorandErrorMessage: UI-specific properties (ChannelColor,ErrorMessage,IsError,ErrorColor,IsSelected,CanSelectChannel, etc.) are included inITestChannel, implying tight coupling between data model and UI state—potentially violating separation of concerns.CalculatedChannelsvsITestCalculatedChannel:ITestChannelhasIsCalculatedChannelflag, butITestCalculatedChannelis a separate interface. Implementations must ensure that channels markedIsCalculatedChannel == trueare either castable toITestCalculatedChannelor contain equivalent data.ITestGraphs.ChannelIdsvsChannels:ITestGraphshas bothList<string> ChannelIdsandList<ITestChannel> Channels. The relationship between them (e.g., whetherChannelIdsis derived fromChannels) is not specified.- No Validation Rules: None of the interfaces enforce non-null constraints (e.g.,
Name,Id,SerialNumber), which may lead to runtime errors if consumers assume non-nullability.
None identified beyond the above.