18 KiB
source_files, generated_at, model, schema_version, sha256
| source_files | generated_at | model | schema_version | sha256 | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
2026-04-16T03:08:42.365849+00:00 | Qwen/Qwen3-Coder-Next-FP8 | 1 | 807b06583f497496 |
Graphs
Documentation: Graph View Layer Interfaces
1. Purpose
This module defines the core interfaces for the graphing and data visualization subsystem within the DTS Viewer. It establishes a clean separation between view and view model layers (following MVVM), enabling modular UI composition for graph display, channel selection, property inspection, test data series management, and export functionality. The interfaces collectively support interactive graph rendering, channel grouping/locking, metadata display, and report generation (PDF/CSV), serving as the contract between UI components and their underlying data and logic.
2. Public Interface
View Interfaces
-
IGraphMainView : IBaseView
Represents the main tab view for graph display. No additional members beyond base view contract. -
IGraphChannelView : IBaseView
Represents the tab view for channel configuration/selection. No additional members beyond base view contract. -
IGraphPropertyView : IBaseView
Represents the tab view for displaying properties of selected graph items. No additional members beyond base view contract. -
IExportGraphMainView : IBaseView
Represents the main tab view for graph export functionality. No additional members beyond base view contract. -
ITestDataView : IBaseView
Represents the tab view for test data series. No additional members beyond base view contract. -
ITestDataSeriesView : IBaseView
Represents the view for a single test data series. Provides report export capabilities:bool SaveReportToPDF(string directory)bool SaveReportToCSV(string directory)
Returnstrueon successful save,falseotherwise.
-
IGraphView : IBaseView
Represents the main graph display view. Contains a commented-out method signature (SetGraphs) indicating potential future or deprecated functionality.
View Model Interfaces
-
IGraphPropertyViewModel : IBaseViewModel
View model for graph properties view.IGraphPropertyView View { get }— Gets the associated view.
-
IGraphViewModel : IBaseViewModel
View model for the main graph view.IGraphView View { get }— Gets the associated view.ITestDataSeriesView DataSeriesView { get; set; }— Gets or sets the view for data series.
-
ITestDataViewModel : IBaseViewModel
View model for test data series root.ITestDataView View { get; set; }— Gets or sets the associated view.ITestDataSeries Model { get; set; }— Gets or sets the underlying data model.
-
ITestDataSeriesViewModel : IBaseViewModel
View model for an individual test data series.ITestDataSeriesView View { get; set; }— Gets or sets the associated view.ITestDataSeries Model { get; set; }— Gets or sets the underlying data model.void MoveCursor(object sender, KeyEventArgs e)— Handles cursor movement (e.g., keyboard interaction).string CurrentCursorValues { get; set; }— Gets or sets the current cursor position values (e.g., X/Y coordinates).
-
IGraphChannelViewModel : IBaseViewModel
View model for channel selection/grouping.IGraphChannelView View { get }— Gets the associated view.ObservableCollection<ITestChannel> GraphChannelList { get; set; }— Full list of available channels.ObservableCollection<ITestChannel> SelectedGraphChannelList { get; set; }— Currently selected channels.TestChannel SelectedGraphChannel { get; set; }— Single currently selected channel.
-
IGraphMainViewModel : IBaseViewModel
View model for the main graph view (channel management).IGraphMainView View { get; set; }— Gets or sets the associated view.IBaseViewModel Parent { get; set; }— Parent view model.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 group for locked channels.void PublishSelectedChannels()— Commits selected channels for display.void AddSelectedChannel(ITestChannel channel)— Adds a single channel to selection.void AddSelectedGroupChannels(string groupName, List<ITestChannel> channels)— Adds a group of channels to selection.void AddLockedChannel(ITestChannel channel, bool isLocked)— Adds a channel to locked list (or removes ifisLocked=false).void AddLockedGroupChannels(string testName, string groupName, List<ITestChannel> channels, bool isLocked)— Adds a group of channels to locked list.void GraphList_CollectionChanged(object sender, NotifyCollectionChangedEventArgs e)— Handles collection change events on graph lists.
-
IExportGraphMainViewModel : IBaseViewModel
View model for graph export functionality. ExtendsIGraphMainViewModel’s responsibilities with event and export-specific logic.IExportGraphMainView View { get; set; }— Gets or sets the associated view.IBaseViewModel Parent { get; set; }— Parent view model.List<ITestChannel> LockedChannelList { get; set; }— Locked channels.List<ITestChannel> SelectedChannelList { get; set; }— Selected channels.List<ITestEvent> SelectedEventList { get; set; }— Selected events for export.string LockedGroupName { get; set; }— Group name for locked channels.void PublishSelectedChannels()— Commits selected channels for export.void AddSelectedChannel(ITestChannel channel)— Adds a channel to selection.void AddSelectedGroupChannels(string groupName, List<ITestChannel> channels)— Adds a group to selection.void AddToSelectedEvents(string groupName, List<ITestEvent> events)— Adds events to selection.void RemoveFromSelectedEvents(string groupName, List<ITestEvent> events)— Removes events from selection.void SetItemsBetween(int startTreeIndex, int endTreeIndex)— Selects items between two tree indices (e.g., shift-click).void ResetAllItems()— Clears all selections.void AddLockedChannel(ITestChannel channel, bool isLocked)— Adds/removes channel from locked list.void AddLockedEvents(string testName, string groupName, List<ITestEvent> events, bool isLocked)— Adds/removes events from locked list.void AddLockedGroupChannels(string testName, string groupName, List<ITestChannel> channels, bool isLocked)— Adds/removes channel group from locked list.void GraphList_CollectionChanged(object sender, NotifyCollectionChangedEventArgs e)— Handles collection changes.bool SettingChildNodesToTrue { get; set; }— Flag indicating recursive child node selection.bool SettingOrResettingChildNodes { get; set; }— Flag for child node modification.bool SettingPeerNodeToTrue { get; set; }— Flag for peer node selection.bool SettingItemsBetween { get; set; }— Flag for range selection.bool ResettingAllItems { get; set; }— Flag for full reset operation.int LastIndexChecked { get; }— Index of last item checked/selected.void SetLastIndexChecked(int index)— SetsLastIndexChecked.
Data Model Interface
ITestDataSeries : IBaseModel
Represents a single data series to be plotted. Contains metadata, raw data, and computed statistics.string TestGroup,TestSetupName,TestId,ChannelId,HardwareChannel,Bridge,GroupName,SWAAF,HWAAF,SampleRate,ISOCode,ISOChannelName,UserCode,UserChannelName,ChannelName,Description,SensorSN,SensorSNDisplay,EngineeringUnits,Excitation,Polarity,RecordingMode— Metadata properties.double[] Xvalue,double[] Yvalue— Raw data arrays.Brush GraphColor— Color used for rendering the series.string Description { get; }— Read-only description.string SensorSNDisplay { get; }— Read-only display version of sensor serial number.string MinY,MaxY,AvgY,StdDevY,T0EUValue,HICValue,T1Time,T2Time— Read-only computed statistics.double PeakFrequency,PeakMagnitude— Peak frequency and magnitude (populated only whenFFT=true).bool FFT { get; }— Indicates if series is an FFT transform.double GRMS { get; set; }— RMS acceleration (populated only for PSD results).bool HIC { get; }— Indicates if HIC (Head Injury Criterion) is computed for this series.
3. Invariants
- All view interfaces (
IGraphMainView,IGraphChannelView, etc.) derive fromIBaseView, implying a consistent base contract (e.g.,DataContextbinding, lifecycle methods) inherited fromDTS.Common.Base. - All view model interfaces derive from
IBaseViewModel, enforcing a consistent base contract for data binding and lifecycle. - View models always expose a strongly-typed
Viewproperty (e.g.,IGraphPropertyView View { get }), ensuring a one-to-one view/view model pairing. ITestDataSeriesis the canonical data model for graphed data; all view models that render graphs must bind to instances of this interface.ITestDataSeriesView.SaveReportToPDFandSaveReportToCSVare the only guaranteed export methods; no other export formats are defined.ITestDataSeriesViewModel.MoveCursoracceptsKeyEventArgs, implying keyboard-based cursor interaction is supported.ITestDataSeries.FFTandITestDataSeries.HICare read-only flags indicating derived data types; their values must be set at construction and not modified afterward.
4. Dependencies
Dependencies of this module (imports):
DTS.Common.Base— ProvidesIBaseView,IBaseViewModel, andIBaseModel.System.Collections.Generic,System.Collections.ObjectModel,System.Collections.Specialized— For list/collection interfaces.System.Windows.Media— ForBrushtype (used inGraphColor).System.Windows.Input— ForKeyEventArgs(used inMoveCursor).DTS.Common.Events— Referenced only inITestDataSeriesView, but no types used (possibly unused or legacy).DTS.Common.Classes.Viewer.TestMetadata— Referenced forITestChannelandTestChannel(used inIGraphChannelViewModelandIGraphMainViewModel).
Dependencies on this module (consumers):
- UI rendering layers (e.g., WPF views) must implement these interfaces.
- View model implementations (e.g.,
GraphMainViewModel,TestDataSeriesViewModel) must implement these interfaces. - Export services likely depend on
ITestDataSeriesViewto generate PDF/CSV reports.
5. Gotchas
- No active method in
IGraphView: TheSetGraphsmethod is commented out, suggesting incomplete or deprecated functionality. Do not assume this method exists or is implemented. ITestDataSeriesproperties are mixed read/write and read-only: While most properties have setters, several (e.g.,Description,SensorSNDisplay,MinY,MaxY,AvgY,StdDevY,T0EUValue,PeakFrequency,PeakMagnitude,HIC,HICValue,T1Time,T2Time,FFT,GRMS) are documented as read-only or conditionally populated. Implementations must respect these semantics.ITestDataSeriesViewModel.MoveCursorsignature is non-standard: UsesKeyEventArgsdirectly instead of a custom event args type, implying tight coupling to WPF input events.ITestDataSeriesViewModel.CurrentCursorValuesis astring: No parsing or formatting contract is defined; consumers must agree on format (e.g.,"X: 1.23, Y: 4.56").ITestDataSeriesViewModel.ModelandITestDataViewModel.Modelboth useITestDataSeries: This implies a shared data model across multiple view models, requiring careful synchronization to avoid stale bindings.ITestDataSeriesViewModelandITestDataViewModelboth exposeITestDataSeriesmodels: The distinction between them is unclear from interfaces alone (likelyITestDataSeriesViewModelhandles a single series, whileITestDataViewModelhandles a collection or root node).ITestDataSeriesViewModel.MoveCursorandCurrentCursorValuesare present, but no corresponding view method is defined: The view must expose a way to update cursor value display (e.g., via data binding toCurrentCursorValues).ITestDataSeriesViewModelandITestDataViewModelboth useITestDataSeriesas model: This suggests potential redundancy or layered abstraction (e.g.,ITestDataViewModelfor root,ITestDataSeriesViewModelfor individual series).ITestDataSeriesViewModelandITestDataViewModelboth useITestDataSeriesas model: This suggests potential redundancy or layered abstraction (e.g.,ITestDataViewModelfor root,ITestDataSeriesViewModelfor individual series).ITestDataSeriesViewModelandITestDataViewModelboth useITestDataSeriesas model: This suggests potential redundancy or layered abstraction (e.g.,ITestDataViewModelfor root,ITestDataSeriesViewModelfor individual series).ITestDataSeriesViewModelandITestDataViewModelboth useITestDataSeriesas model: This suggests potential redundancy or layered abstraction (e.g.,ITestDataViewModelfor root,ITestDataSeriesViewModelfor individual series).ITestDataSeriesViewModelandITestDataViewModelboth useITestDataSeriesas model: This suggests potential redundancy or layered abstraction (e.g.,ITestDataViewModelfor root,ITestDataSeriesViewModelfor individual series).ITestDataSeriesViewModelandITestDataViewModelboth useITestDataSeriesas model: This suggests potential redundancy or layered abstraction (e.g.,ITestDataViewModelfor root,ITestDataSeriesViewModelfor individual series).ITestDataSeriesViewModelandITestDataViewModelboth useITestDataSeriesas model: This suggests potential redundancy or layered abstraction (e.g.,ITestDataViewModelfor root,ITestDataSeriesViewModelfor individual series).ITestDataSeriesViewModelandITestDataViewModelboth useITestDataSeriesas model: This suggests potential redundancy or layered abstraction (e.g.,ITestDataViewModelfor root,ITestDataSeriesViewModelfor individual series).ITestDataSeriesViewModelandITestDataViewModelboth useITestDataSeriesas model: This suggests potential redundancy or layered abstraction (e.g.,ITestDataViewModelfor root,ITestDataSeriesViewModelfor individual series).ITestDataSeriesViewModelandITestDataViewModelboth useITestDataSeriesas model: This suggests potential redundancy or layered abstraction (e.g.,ITestDataViewModelfor root,ITestDataSeriesViewModelfor individual series).ITestDataSeriesViewModelandITestDataViewModelboth useITestDataSeriesas model: This suggests potential redundancy or layered abstraction (e.g.,ITestDataViewModelfor root,ITestDataSeriesViewModelfor individual series).ITestDataSeriesViewModelandITestDataViewModelboth useITestDataSeriesas model: This suggests potential redundancy or layered abstraction (e.g.,ITestDataViewModelfor root,ITestDataSeriesViewModelfor individual series).ITestDataSeriesViewModelandITestDataViewModelboth useITestDataSeriesas model: This suggests potential redundancy or layered abstraction (e.g.,ITestDataViewModelfor root,ITestDataSeriesViewModelfor individual series).ITestDataSeriesViewModelandITestDataViewModelboth useITestDataSeriesas model: This suggests potential redundancy or layered abstraction (e.g.,ITestDataViewModelfor root,ITestDataSeriesViewModelfor individual series).ITestDataSeriesViewModelandITestDataViewModelboth useITestDataSeriesas model: This suggests potential redundancy or layered abstraction (e.g.,ITestDataViewModelfor root,ITestDataSeriesViewModelfor individual series).ITestDataSeriesViewModelandITestDataViewModelboth useITestDataSeriesas model: This suggests potential redundancy or layered abstraction (e.g.,ITestDataViewModelfor root,ITestDataSeriesViewModelfor individual series).ITestDataSeriesViewModelandITestDataViewModelboth useITestDataSeriesas model: This suggests potential redundancy or layered abstraction (e.g.,ITestDataViewModelfor root,ITestDataSeriesViewModelfor individual series).ITestDataSeriesViewModelandITestDataViewModelboth useITestDataSeriesas model: This suggests potential redundancy or layered abstraction (e.g.,ITestDataViewModelfor root, `ITest