13 KiB
source_files, generated_at, model, schema_version, sha256
| source_files | generated_at | model | schema_version | sha256 | |||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
2026-04-16T12:24:37.475119+00:00 | zai-org/GLM-5-FP8 | 1 | 99208da86b0faad5 |
Documentation: DTS.Common.Interface Graph Module
1. Purpose
This module defines the interface contracts for a graph visualization subsystem following the Model-View-ViewModel (MVVM) architectural pattern. It provides abstractions for rendering test data series, managing graph channels, editing graph properties, and coordinating channel selection/locking across the application. The interfaces serve as boundaries between UI components and business logic, enabling test-driven development and loose coupling between the graph visualization components and their consumers.
2. Public Interface
View Interfaces
IGraphMainView
- Signature:
public interface IGraphMainView : IBaseView - Behavior: Marker interface for the main graph view container. No members defined; extends
IBaseView.
IGraphChannelView
- Signature:
public interface IGraphChannelView : IBaseView - Behavior: Marker interface for the graph channel selection/configuration view. No members defined; extends
IBaseView.
IGraphPropertyView
- Signature:
public interface IGraphPropertyView : IBaseView - Behavior: Marker interface for the graph property editing view. No members defined; extends
IBaseView.
ITestDataView
- Signature:
public interface ITestDataView : IBaseView - Behavior: Marker interface for the test data view. No members defined; extends
IBaseView.
ITestDataSeriesView
- Signature:
public interface ITestDataSeriesView : IBaseView - Members:
bool SaveReportToPDF(string directory)— Exports the report to PDF format to the specified directory.bool SaveReportToCSV(string directory)— Exports the report to CSV format to the specified directory.
- Behavior: Provides export capabilities for test data series reports.
IGraphView
- Signature:
public interface IGraphView : IBaseView - Members:
//void SetGraphs(ObservableCollection<ITestDataSeries> graphs);(commented out)
- Behavior: Marker interface for the graph rendering view. Contains one commented-out method for setting graph collections.
ViewModel Interfaces
IGraphPropertyViewModel
- Signature:
public interface IGraphPropertyViewModel : IBaseViewModel - Members:
IGraphPropertyView View { get; }— Gets the associated property view.
- Behavior: ViewModel contract for managing graph property view state.
IGraphViewModel
- Signature:
public interface IGraphViewModel : IBaseViewModel - Members:
IGraphView View { get; }— Gets the associated graph view.ITestDataSeriesView DataSeriesView { get; set; }— Gets or sets the data series view.
- Behavior: ViewModel contract for the main graph view coordination.
ITestDataViewModel
- Signature:
public interface ITestDataViewModel : IBaseViewModel - Members:
ITestDataView View { get; set; }— Gets or sets the associated test data view.ITestDataSeries Model { get; set; }— Gets or sets the underlying test data series model.
- Behavior: ViewModel contract for test data display and editing.
ITestDataSeriesViewModel
- Signature:
public interface ITestDataSeriesViewModel : IBaseViewModel - Members:
ITestDataSeriesView View { get; set; }— Gets or sets the associated view.ITestDataSeries Model { get; set; }— Gets or sets the underlying test data series model.void MoveCursor(object sender, KeyEventArgs e)— Handles cursor movement events.string CurrentCursorValues { get; set; }— Gets or sets the current cursor position values for display.
- Behavior: ViewModel for test data series with interactive cursor functionality.
IGraphChannelViewModel
- Signature:
public interface IGraphChannelViewModel : IBaseViewModel - Members:
IGraphChannelView View { get; }— Gets the associated channel view.ObservableCollection<ITestChannel> GraphChannelList { get; set; }— Collection of all available graph channels.ObservableCollection<ITestChannel> SelectedGraphChannelList { get; set; }— Collection of currently selected graph channels.TestChannel SelectedGraphChannel { get; set; }— The currently single-selected graph channel.
- Behavior: ViewModel for managing graph channel selection and display.
IGraphMainViewModel
- Signature:
public interface IGraphMainViewModel : IBaseViewModel - Members:
IGraphMainView View { get; set; }— Gets or sets the main graph view.IBaseViewModel Parent { get; set; }— Gets or sets the parent ViewModel reference.List<ITestChannel> LockedChannelList { get; set; }— List of locked channels.List<ITestChannel> SelectedChannelList { get; set; }— List of selected channels.string LockedGroupName { get; set; }— Name of the locked group.void PublishSelectedChannels()— Publishes the current channel selection.void AddSelectedChannel(ITestChannel channel)— Adds a single channel to the selection.void AddSelectedGroupChannels(string groupName, List<ITestChannel> channels)— Adds multiple channels from a group to the selection.void AddLockedChannel(ITestChannel channel, bool isLocked)— Adds or updates a channel's locked state.void AddLockedGroupChannels(string testName, string groupName, List<ITestChannel> channels, bool isLocked)— Adds or updates multiple channels' locked state as a group.void GraphList_CollectionChanged(object sender, NotifyCollectionChangedEventArgs e)— Handler for graph list collection changes.
- Behavior: Primary ViewModel for graph coordination, managing channel selection and locking state.
Model Interface
ITestDataSeries
- Signature:
public interface ITestDataSeries : IBaseModel - Members (Identification):
string TestGroup { get; set; }string TestSetupName { get; set; }string TestId { get; set; }string ChannelId { get; set; }string HardwareChannel { get; set; }string Bridge { get; set; }string GroupName { get; set; }string ChannelName { get; set; }string Description { get; }
- Members (Data):
double[] Xvalue { get; set; }— X-axis data points.double[] Yvalue { get; set; }— Y-axis data points.Brush GraphColor { get; set; }— Visual color for the graph line.
- Members (Configuration):
string SWAAF { get; set; }string HWAAF { get; set; }string SampleRate { get; set; }string ISOCode { get; set; }string ISOChannelName { get; set; }string UserCode { get; set; }string UserChannelName { get; set; }string EngineeringUnits { get; set; }string Excitation { get; set; }string Polarity { get; set; }string RecordingMode { get; set; }
- Members (Sensor):
string SensorSN { get; }string SensorSNDisplay { get; }
- Members (Statistics - read-only):
string MinY { get; }string MaxY { get; }string AvgY { get; }string StdDevY { get; }string T0EUValue { get; }
- Members (FFT Analysis):
bool FFT { get; }— Indicates if this series is an FFT of signal data.double PeakFrequency { get; }— Peak frequency by magnitude (only populated whenFFTis true).double PeakMagnitude { get; }— Peak magnitude of frequencies (only populated whenFFTis true).double GRMS { get; set; }— Root-mean-squared acceleration (calculated in PSD results graphs).
- Members (HIC - Head Injury Criterion):
bool HIC { get; }— Indicates if HIC calculation applies.string HICValue { get; }string T1Time { get; }string T2Time { get; }
- Behavior: Data model representing a complete test data series with metadata, raw data, and computed statistics. Supports both time-domain and frequency-domain (FFT) data representations.
3. Invariants
-
Inheritance Hierarchy: All view interfaces (
IGraphMainView,IGraphChannelView,IGraphPropertyView,ITestDataView,ITestDataSeriesView,IGraphView) must extendIBaseView. -
Inheritance Hierarchy: All ViewModel interfaces (
IGraphPropertyViewModel,IGraphViewModel,ITestDataViewModel,ITestDataSeriesViewModel,IGraphChannelViewModel,IGraphMainViewModel) must extendIBaseViewModel. -
Inheritance Hierarchy:
ITestDataSeriesmust extendIBaseModel. -
FFT Data Population:
PeakFrequencyandPeakMagnitudeare only valid whenFFTistrue. Consumers must checkFFTbefore accessing these properties. -
GRMS Context:
GRMSis only calculated for PSD (Power Spectral Density) results graphs. -
Observable Collections:
IGraphChannelViewModelusesObservableCollection<ITestChannel>for bothGraphChannelListandSelectedGraphChannelList, implying UI binding expectations for collection change notifications. -
Read-Only Statistics: Statistical properties (
MinY,MaxY,AvgY,StdDevY,T0EUValue,PeakFrequency,PeakMagnitude) are read-only and presumably computed fromXvalueandYvaluearrays.
4. Dependencies
This Module Depends On:
| Dependency | Usage |
|---|---|
DTS.Common.Base |
IBaseView, IBaseViewModel, IBaseModel base interfaces |
DTS.Common.Classes.Viewer.TestMetadata |
TestChannel, ITestChannel types |
DTS.Common.Events |
Referenced in ITestDataSeriesView.cs (specific types not visible in source) |
System.Windows.Input |
KeyEventArgs in ITestDataSeriesViewModel |
System.Windows.Media |
Brush type in ITestDataSeries |
System.Collections.ObjectModel |
ObservableCollection<T> |
System.Collections.Specialized |
NotifyCollectionChangedEventArgs |
What Depends On This Module:
Cannot be determined from source alone. This module defines only interfaces; consumers would be concrete implementations and other modules that reference these contracts.
5. Gotchas
-
Namespace Inconsistency: Four files (
ITestDataView.cs,ITestDataSeriesView.cs,IGraphView.cs,ITestDataSeriesViewModel.cs,IGraphMainViewModel.cs,ITestDataSeries.cs) contain// ReSharper disable CheckNamespace, suggesting the declared namespaceDTS.Common.Interfacemay not match the file path structure. This could cause confusion when locating types. -
Commented-Out Code:
IGraphViewcontains a commented-out methodSetGraphs(ObservableCollection<ITestDataSeries> graphs). The reason for its removal and whether it should be restored or permanently deleted is unclear from source. -
Malformed XML Comment: In
ITestDataSeries.cs, the XML comment forPeakMagnitudehas a malformed closing tag (</summary<instead of</summary>), which may break documentation generation tools. -
Mixed Collection Types:
IGraphChannelViewModelusesObservableCollection<ITestChannel>whileIGraphMainViewModelusesList<ITestChannel>. This inconsistency in collection types across related ViewModels may indicate differing lifecycle or notification requirements, but could also be an oversight. -
Type Mismatch in
IGraphChannelViewModel: TheSelectedGraphChannelproperty is typed asTestChannel(concrete class), while the collections useITestChannel(interface). This breaks consistency with the interface-based design pattern used elsewhere. -
Setter Accessibility: Several read-only properties in
ITestDataSeries(e.g.,Description,SensorSN,MinY,MaxY, etc.) have only getters, but it's unclear whether these are computed properties or set via constructor/mutable backing field. The implementation strategy is not specified.