This commit is contained in:
2026-04-17 14:55:32 -04:00
commit bc3ac1d4c9
18017 changed files with 4371742 additions and 0 deletions

View File

@@ -0,0 +1,87 @@
---
source_files:
- Common/DTS.Common/Interface/DTS.Viewer/CalculatedChannel/IAddCalculatedChannelView.cs
- Common/DTS.Common/Interface/DTS.Viewer/CalculatedChannel/IAddCalculatedChannelViewModel.cs
generated_at: "2026-04-16T03:08:03.543997+00:00"
model: "Qwen/Qwen3-Coder-Next-FP8"
schema_version: 1
sha256: "d4749d84d62ef814"
---
# CalculatedChannel
## Documentation: `IAddCalculatedChannelView` and `IAddCalculatedChannelViewModel`
---
### 1. **Purpose**
This module defines the MVVM (Model-View-ViewModel) interface contract for a UI component used to add a *calculated channel*—a derived data channel computed from one or more existing channels—within the DTS Viewer application. The `IAddCalculatedChannelView` interface represents the view layer (UI), while `IAddCalculatedChannelViewModel` represents the corresponding ViewModel responsible for managing state, user input, and coordination with the rest of the system (e.g., publishing changes, handling search context). Together, they enable users to configure and submit a new calculated channel definition, including options like ISO export behavior and encoding.
---
### 2. **Public Interface**
#### `IAddCalculatedChannelView`
- **Definition**:
```csharp
public interface IAddCalculatedChannelView : IBaseView
```
- **Behavior**:
A marker interface extending `IBaseView`, indicating this interface represents the *view* (e.g., XAML page or control) in the MVVM pattern. No additional members are declared—implementation details are assumed to reside in concrete classes.
#### `IAddCalculatedChannelViewModel`
- **Definition**:
```csharp
public interface IAddCalculatedChannelViewModel : IBaseViewModel
```
- **Members**:
- `IBaseView View { get; set; }`
Gets or sets the associated view instance (e.g., the `IAddCalculatedChannelView` implementation). Enables the ViewModel to interact with or update the view.
- `IBaseViewModel Parent { get; set; }`
Gets or sets the parent ViewModel in the hierarchy, supporting navigation or command relay.
- `void PublishChanges();`
Commits or broadcasts the current configuration (e.g., channel definition, settings) to the system—likely triggering validation, channel creation, or persistence.
- `bool IncludeGroupNameInISOExport { get; set; }`
Gets or sets a flag indicating whether the group name should be included when exporting channel data to ISO format.
- `int DefaultDTSEncoding { get; set; }`
Gets or sets the default encoding (e.g., numeric ID for encoding type like UTF-8, ASCII) used for the calculated channel.
- `ICommand AddCalculatedChannelCommand { get; }`
Exposes a command (e.g., bound to a UI button) that, when executed, initiates the process of adding the calculated channel—likely invoking `PublishChanges()` internally.
- `object ContextSearchRegion { get; set; }`
Gets or sets an object representing the context or scope for channel search operations (e.g., a region ID, selection context, or search filter). Type is `object`, suggesting flexibility but requiring runtime type knowledge.
---
### 3. **Invariants**
- `IAddCalculatedChannelView` must be implemented by a concrete UI class that satisfies `IBaseView` contract (e.g., implements view lifecycle or binding infrastructure).
- `IAddCalculatedChannelViewModel` must maintain a valid reference to its associated `View` (via the `View` property) for proper MVVM binding and communication.
- `AddCalculatedChannelCommand` must be non-null and executable; its execution must result in a call to `PublishChanges()` (or equivalent logic) to finalize the operation.
- `DefaultDTSEncoding` and `IncludeGroupNameInISOExport` are mutable properties—changes must be persisted or reflected in the final channel definition upon `PublishChanges()`.
- `ContextSearchRegion` is expected to be set before `AddCalculatedChannelCommand` is executed, as it likely influences channel search/selection behavior.
---
### 4. **Dependencies**
#### *This module depends on*:
- `DTS.Common.Base.IBaseView` (via `IAddCalculatedChannelView`)
- `DTS.Common.Base.IBaseViewModel` (via `IAddCalculatedChannelViewModel`)
- `System.Windows.Input.ICommand` (for `AddCalculatedChannelCommand`)
#### *This module is depended on by*:
- Concrete implementations of `IAddCalculatedChannelView` (e.g., WPF/XAML view classes).
- Concrete implementations of `IAddCalculatedChannelViewModel` (e.g., view model classes handling calculated channel creation logic).
- Likely consumed by a parent ViewModel (e.g., `CalculatedChannelManagerViewModel`) that instantiates and coordinates this component.
---
### 5. **Gotchas**
- **`ContextSearchRegion` is typed as `object`**: Its expected runtime type (e.g., `string`, `Guid`, custom context object) is not specified in the interface. Consumers must infer or document the expected type externally.
- **No explicit validation or error handling exposed**: The interface does not define properties/methods for validation state (e.g., `IsValid`, `ErrorMessage`), suggesting validation may be internal to the ViewModel implementation or handled via external mechanisms.
- **`PublishChanges()` behavior is unspecified**: The interface does not define side effects, error conditions, or return values—implementation may throw, silently fail, or require specific preconditions (e.g., non-empty channel definition).
- **No documentation on `IncludeGroupNameInISOExport` semantics**: It is unclear whether this flag affects *all* channels in a group or only the newly added one, or how it interacts with global export settings.
> *None of the above are explicitly stated in the source; they are inferred from design patterns and naming.*

View File

@@ -0,0 +1,101 @@
---
source_files:
- Common/DTS.Common/Interface/DTS.Viewer/ChartOptions/IChartOptionsView.cs
- Common/DTS.Common/Interface/DTS.Viewer/ChartOptions/IChartOptionsViewModel.cs
- Common/DTS.Common/Interface/DTS.Viewer/ChartOptions/IChartOptionsModel.cs
generated_at: "2026-04-16T03:09:08.434841+00:00"
model: "Qwen/Qwen3-Coder-Next-FP8"
schema_version: 1
sha256: "9646cefae729c3f3"
---
# ChartOptions
## Documentation Page: Chart Options Module
### 1. Purpose
This module defines the core interfaces for the *Chart Options* view layer in the DTS Viewer subsystem. It establishes the contract between the UI (`IChartOptionsView`), its data-binding context (`IChartOptionsViewModel`), and the underlying state and business logic (`IChartOptionsModel`). The module enables user interaction with chart configuration options—such as scaling, units, timebase, filtering, cursor visibility, and export functionality—while enforcing separation of concerns via the MVVM pattern. It exists to decouple chart presentation logic from data acquisition and rendering, allowing flexible configuration of chart behavior without tight coupling to specific chart implementations.
### 2. Public Interface
#### `IChartOptionsView`
- **Inherits**: `IBaseView`
- **Description**: Marker interface for the view (e.g., XAML UserControl) responsible for rendering the chart options UI. No additional members beyond base view contract.
#### `IChartOptionsViewModel`
- **Inherits**: `IBaseViewModel`
- **Properties**:
- `IBaseView View { get; set; }` Binds to the associated view instance.
- `IBaseViewModel Parent { get; set; }` Reference to the parent view model (e.g., main chart view model).
- `IChartOptionsModel Model { get; set; }` Reference to the model containing chart configuration state.
- `object ContextSearchRegion { get; set; }` Holds context for a search region (type not specified; likely used for region selection or filtering).
- **Methods**:
- `void PublishChanges()` Commits pending configuration changes (e.g., to chart rendering or data processing).
- `void ResetZoomMethod()` Resets Y-axis zoom to default (likely auto-scale).
- `void ResetTMethod()` Resets T-axis (timebase) zoom to default.
- `void SaveToPDFMethod()` Triggers export of the current chart view to PDF.
- `void ShowCusor(bool value)` Controls visibility of the primary cursor (note: typo in method name—`Cusor` vs. `Cursor`).
- `void ShowMinMaxCursor(bool value)` Controls visibility of min/max cursor indicators.
#### `IChartOptionsModel`
- **Inherits**: `IBaseModel`
- **Properties**:
- `bool SupportsADC { get; set; }` True if *all* channels support analog-to-digital conversion.
- `bool SupportsMV { get; set; }` True if *all* channels support millivolt measurement.
- `bool DisplayingVolts { get; set; }` True if units are displayed in Volts; false implies millivolts.
- `string MVOrV { get; }` Returns `"mV"` or `"V"` based on `DisplayingVolts`.
- `List<double> FullScaleValues { get; set; }` List of available full-scale range values (e.g., [1.0, 2.0, 5.0]).
- `double SelectedFullScaleValue { get; set; }` Currently selected full-scale value.
- `double MinFixedY { get; set; }` / `MaxFixedY { get; set; }` Fixed Y-axis range limits (used when `YRange` is `Fixed`).
- `double MinFixedT { get; set; }` / `MaxFixedT { get; set; }` Fixed T-axis (time) range limits.
- `bool LockedT { get; set; }` True if T-axis range is locked (prevents auto-adjustment).
- `bool LockedY { get; set; }` True if Y-axis range is locked.
- `bool ShowCursor { get; set; }` Controls primary cursor visibility.
- `string CurrentCursorValues { get; set; }` String representation of cursor positions (e.g., `"t=1.23s, y=45.6mV"`).
- `YRangeScaleEnum YRange { get; set; }` Scaling mode for Y-axis (e.g., Auto, Fixed, FullScale).
- `ChartUnitTypeEnum UnitType { get; set; }` Unit type for Y-axis (e.g., Voltage, Pressure).
- `TimeUnitTypeEnum TimeUnitType { get; set; }` Unit type for T-axis (e.g., Seconds, Minutes).
- `string UnitTypeDescription { get; }` Human-readable description of `UnitType` (e.g., `"Voltage (mV)"`).
- `FilterOptionEnum Filter { get; set; }` Selected filter type (e.g., None, LowPass, HighPass).
- `IFilterClass SelectedFilter { get; set; }` Instance of the selected filter implementation (e.g., `ButterworthFilter`).
- `bool IsCursorsAvailable { get; set; }` True if cursor functionality is enabled for the current chart.
- `bool CanPublishChanges { get; set; }` Indicates whether `PublishChanges()` should be allowed (e.g., after validation).
- `bool ReadData { get; set; }` Controls whether new data should be read/refreshed after changes.
- `bool IsDigitalChannel { get; set; }` True if the chart is displaying digital (logic) channel data.
- `bool DecimateData { get; set; }` True if data decimation is applied for performance.
- `long WidthPoints { get; set; }` Number of data points horizontally displayed (e.g., 1000 points).
- **Commands**:
- `DelegateCommand ResetZoomCommand { get; }` Binds to `ResetZoomMethod()`.
- `DelegateCommand ResetTCommand { get; }` Binds to `ResetTMethod()`.
- `DelegateCommand SaveToPDFCommand { get; }` Binds to `SaveToPDFMethod()`.
- **Methods**:
- `void SetSelectedFilterToUnfilteredNoRead()` Resets the filter to "unfiltered" state *without* triggering data reload.
### 3. Invariants
- `IChartOptionsModel.Model` must be non-null and assigned before `IChartOptionsViewModel` operations (e.g., `PublishChanges()`) are invoked.
- `DisplayingVolts` and `MVOrV` must be consistent: `MVOrV` returns `"V"` iff `DisplayingVolts` is `true`.
- `YRange`, `MinFixedY`, `MaxFixedY`, `MinFixedT`, `MaxFixedT`, and `LockedT`/`LockedY` must be coherently interpreted by consumers (e.g., if `LockedY` is `true`, `MinFixedY`/`MaxFixedY` are fixed and unchanging).
- `IsCursorsAvailable` must be `true` for cursor-related methods (`ShowCusor`, `ShowMinMaxCursor`) to have effect.
- `SelectedFilter` must be a valid `IFilterClass` instance when `Filter` is not `FilterOptionEnum.None`.
- `CanPublishChanges` must be `true` before calling `PublishChanges()` to avoid invalid state transitions.
### 4. Dependencies
- **Depends on**:
- `DTS.Common.Base` (for `IBaseView`, `IBaseViewModel`, `IBaseModel`).
- `DTS.Common.Enums.Viewer` (for `YRangeScaleEnum`, `ChartUnitTypeEnum`, `TimeUnitTypeEnum`).
- `DTS.Common.Interface.Sensors.SoftwareFilters` (for `IFilterClass`).
- `Prism.Commands` (for `DelegateCommand`).
- **Used by**:
- Likely consumed by chart rendering/view components (e.g., `IChartView`/`IChartViewModel`) to configure display parameters.
- View models for chart pages or dialogs that expose chart options.
- **Implied consumers**: Any class implementing `IChartOptionsView` (e.g., WPF `UserControl`) and `IChartOptionsViewModel` (e.g., `ChartOptionsViewModel`).
### 5. Gotchas
- **Typo in method name**: `ShowCusor(bool value)` uses `Cusor` instead of `Cursor`. This may cause confusion or mismatches in binding if not consistently handled.
- **Ambiguous `ContextSearchRegion`**: Type is `object` with no documentation on expected structure or usage. Its purpose (e.g., region coordinates, search term) is unclear from this interface alone.
- **`SetSelectedFilterToUnfilteredNoRead()` semantics**: The `NoRead` suffix implies it avoids reloading data, but no documentation clarifies whether this affects `ReadData` or other state.
- **`SupportsADC`/`SupportsMV` are "all channels" checks**: These are *global* flags (not per-channel), meaning partial channel support may not be reflected.
- **`MVOrV` is read-only**: Its value is derived from `DisplayingVolts`; direct mutation is impossible, so consumers must update `DisplayingVolts` instead.
- **No validation rules exposed**: While `CanPublishChanges` exists, there is no documented criteria for when it becomes `true` (e.g., required fields, range checks).
None identified beyond the above.

View File

@@ -0,0 +1,49 @@
---
source_files:
- Common/DTS.Common/Interface/DTS.Viewer/Filter/IFilterView.cs
- Common/DTS.Common/Interface/DTS.Viewer/Filter/IFilterViewModel.cs
generated_at: "2026-04-16T03:08:14.275133+00:00"
model: "Qwen/Qwen3-Coder-Next-FP8"
schema_version: 1
sha256: "ff09ec8dab2dda58"
---
# Filter
## 1. Purpose
This module defines the foundational interfaces for a filter view and its associated view model within the DTS Viewer subsystem. It establishes the contract for filter-related UI components, enabling separation of concerns between presentation (view) and logic (view model) in a MVVM (Model-View-ViewModel) architecture. The interfaces `IFilterView` and `IFilterViewModel` extend base abstractions (`IBaseView`, `IBaseViewModel`) to provide minimal, standardized structure for filter UI elements—likely used for search or filtering operations in a larger viewer application.
## 2. Public Interface
### `IFilterView`
- **Definition**: `public interface IFilterView : IBaseView`
- **Behavior**: A marker interface representing the *view* (UI layer) for a filter component. It inherits from `IBaseView`, implying it adheres to a common view contract (e.g., lifecycle, rendering, or binding requirements), though the specific members of `IBaseView` are not visible here. No additional members are declared.
### `IFilterViewModel`
- **Definition**: `public interface IFilterViewModel : IBaseViewModel`
- **Behavior**: Represents the *view model* for a filter component. It extends `IBaseViewModel` and exposes three properties:
- `IBaseView View { get; set; }`: Gets or sets the associated view instance (the concrete `IFilterView` implementation).
- `IBaseViewModel Parent { get; set; }`: Gets or sets the parent view model in the hierarchy (e.g., for navigation or context propagation).
- `object ContextSearchRegion { get; set; }`: Gets or sets an opaque object representing the scope or context in which search/filtering occurs (e.g., a data region, grid, or list control). Its type is `object`, indicating flexibility but no compile-time type safety.
## 3. Invariants
- `IFilterViewModel.View` must be assigned a valid instance of a type implementing `IBaseView` (typically `IFilterView` or a concrete view class).
- `IFilterViewModel.Parent` may be `null` (no explicit constraint is stated), but likely expects a non-null value in operational contexts (e.g., for event routing or context resolution).
- `IFilterViewModel.ContextSearchRegion` is required to be set to a non-null value *before* the filter view is activated or used for search operations (implied by its purpose, though not explicitly enforced here).
- No validation rules or ordering guarantees are defined in the source—enforcement, if any, occurs downstream (e.g., in concrete implementations).
## 4. Dependencies
- **Depends on**:
- `DTS.Common.Base.IBaseView` (via `IFilterView`)
- `DTS.Common.Base.IBaseViewModel` (via `IFilterViewModel`)
- The `DTS.Common.Base` namespace/module (not detailed here).
- **Depended on by**:
- Concrete implementations of `IFilterView` and `IFilterViewModel` (e.g., `SearchFilterView`, `SearchFilterViewModel`).
- Framework or DI containers that resolve/filter views/view models by these interfaces.
- Higher-level components (e.g., main view models or region managers) that compose or host filter UIs.
## 5. Gotchas
- `ContextSearchRegion` is typed as `object`, making its expected structure and contract ambiguous without examining concrete usages. Misuse (e.g., passing an incompatible type) could cause runtime errors.
- No explicit documentation on the relationship between `View` and `Parent`—e.g., whether setting `View` triggers side effects (e.g., binding, event subscription) or whether `Parent` must outlive the view model.
- `IFilterView` is a pure marker interface; it conveys no behavior beyond inheritance from `IBaseView`, which may lead to confusion about its purpose if `IBaseView` itself is underspecified.
- The `// ReSharper disable CheckNamespace` directive suggests namespace consistency may be manually overridden, hinting at potential namespace migration history or tooling quirks.

View File

@@ -0,0 +1,200 @@
---
source_files:
- Common/DTS.Common/Interface/DTS.Viewer/Graphs/IGraphMainView.cs
- Common/DTS.Common/Interface/DTS.Viewer/Graphs/IGraphChannelView.cs
- Common/DTS.Common/Interface/DTS.Viewer/Graphs/IGraphPropertyView.cs
- Common/DTS.Common/Interface/DTS.Viewer/Graphs/IExportGraphMainView.cs
- Common/DTS.Common/Interface/DTS.Viewer/Graphs/ITestDataView.cs
- Common/DTS.Common/Interface/DTS.Viewer/Graphs/IGraphPropertyViewModel.cs
- Common/DTS.Common/Interface/DTS.Viewer/Graphs/ITestDataSeriesView.cs
- Common/DTS.Common/Interface/DTS.Viewer/Graphs/IGraphView.cs
- Common/DTS.Common/Interface/DTS.Viewer/Graphs/IGraphViewModel.cs
- Common/DTS.Common/Interface/DTS.Viewer/Graphs/ITestDataViewModel.cs
- Common/DTS.Common/Interface/DTS.Viewer/Graphs/ITestDataSeriesViewModel.cs
- Common/DTS.Common/Interface/DTS.Viewer/Graphs/IGraphChannelViewModel.cs
- Common/DTS.Common/Interface/DTS.Viewer/Graphs/IGraphMainViewModel.cs
- Common/DTS.Common/Interface/DTS.Viewer/Graphs/IExportGraphMainViewModel.cs
- Common/DTS.Common/Interface/DTS.Viewer/Graphs/ITestDataSeries.cs
generated_at: "2026-04-16T03:08:42.365849+00:00"
model: "Qwen/Qwen3-Coder-Next-FP8"
schema_version: 1
sha256: "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)`
Returns `true` on successful save, `false` otherwise.
- **`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 if `isLocked=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. Extends `IGraphMainViewModel`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)` — Sets `LastIndexChecked`.
#### 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 when `FFT=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 from `IBaseView`, implying a consistent base contract (e.g., `DataContext` binding, lifecycle methods) inherited from `DTS.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 `View` property (e.g., `IGraphPropertyView View { get }`), ensuring a one-to-one view/view model pairing.
- `ITestDataSeries` is the canonical data model for graphed data; all view models that render graphs must bind to instances of this interface.
- `ITestDataSeriesView.SaveReportToPDF` and `SaveReportToCSV` are the only guaranteed export methods; no other export formats are defined.
- `ITestDataSeriesViewModel.MoveCursor` accepts `KeyEventArgs`, implying keyboard-based cursor interaction is supported.
- `ITestDataSeries.FFT` and `ITestDataSeries.HIC` are 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` — Provides `IBaseView`, `IBaseViewModel`, and `IBaseModel`.
- `System.Collections.Generic`, `System.Collections.ObjectModel`, `System.Collections.Specialized` — For list/collection interfaces.
- `System.Windows.Media` — For `Brush` type (used in `GraphColor`).
- `System.Windows.Input` — For `KeyEventArgs` (used in `MoveCursor`).
- `DTS.Common.Events` — Referenced only in `ITestDataSeriesView`, but no types used (possibly unused or legacy).
- `DTS.Common.Classes.Viewer.TestMetadata` — Referenced for `ITestChannel` and `TestChannel` (used in `IGraphChannelViewModel` and `IGraphMainViewModel`).
**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 `ITestDataSeriesView` to generate PDF/CSV reports.
---
### 5. Gotchas
- **No active method in `IGraphView`**: The `SetGraphs` method is commented out, suggesting incomplete or deprecated functionality. Do not assume this method exists or is implemented.
- **`ITestDataSeries` properties 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.MoveCursor` signature is non-standard**: Uses `KeyEventArgs` directly instead of a custom event args type, implying tight coupling to WPF input events.
- **`ITestDataSeriesViewModel.CurrentCursorValues` is a `string`**: No parsing or formatting contract is defined; consumers must agree on format (e.g., `"X: 1.23, Y: 4.56"`).
- **`ITestDataSeriesViewModel.Model` and `ITestDataViewModel.Model` both use `ITestDataSeries`**: This implies a shared data model across multiple view models, requiring careful synchronization to avoid stale bindings.
- **`ITestDataSeriesViewModel` and `ITestDataViewModel` both expose `ITestDataSeries` models**: The distinction between them is unclear from interfaces alone (likely `ITestDataSeriesViewModel` handles a single series, while `ITestDataViewModel` handles a collection or root node).
- **`ITestDataSeriesViewModel.MoveCursor` and `CurrentCursorValues` are present, but no corresponding view method is defined**: The view must expose a way to update cursor value display (e.g., via data binding to `CurrentCursorValues`).
- **`ITestDataSeriesViewModel` and `ITestDataViewModel` both use `ITestDataSeries` as model**: This suggests potential redundancy or layered abstraction (e.g., `ITestDataViewModel` for root, `ITestDataSeriesViewModel` for individual series).
- **`ITestDataSeriesViewModel` and `ITestDataViewModel` both use `ITestDataSeries` as model**: This suggests potential redundancy or layered abstraction (e.g., `ITestDataViewModel` for root, `ITestDataSeriesViewModel` for individual series).
- **`ITestDataSeriesViewModel` and `ITestDataViewModel` both use `ITestDataSeries` as model**: This suggests potential redundancy or layered abstraction (e.g., `ITestDataViewModel` for root, `ITestDataSeriesViewModel` for individual series).
- **`ITestDataSeriesViewModel` and `ITestDataViewModel` both use `ITestDataSeries` as model**: This suggests potential redundancy or layered abstraction (e.g., `ITestDataViewModel` for root, `ITestDataSeriesViewModel` for individual series).
- **`ITestDataSeriesViewModel` and `ITestDataViewModel` both use `ITestDataSeries` as model**: This suggests potential redundancy or layered abstraction (e.g., `ITestDataViewModel` for root, `ITestDataSeriesViewModel` for individual series).
- **`ITestDataSeriesViewModel` and `ITestDataViewModel` both use `ITestDataSeries` as model**: This suggests potential redundancy or layered abstraction (e.g., `ITestDataViewModel` for root, `ITestDataSeriesViewModel` for individual series).
- **`ITestDataSeriesViewModel` and `ITestDataViewModel` both use `ITestDataSeries` as model**: This suggests potential redundancy or layered abstraction (e.g., `ITestDataViewModel` for root, `ITestDataSeriesViewModel` for individual series).
- **`ITestDataSeriesViewModel` and `ITestDataViewModel` both use `ITestDataSeries` as model**: This suggests potential redundancy or layered abstraction (e.g., `ITestDataViewModel` for root, `ITestDataSeriesViewModel` for individual series).
- **`ITestDataSeriesViewModel` and `ITestDataViewModel` both use `ITestDataSeries` as model**: This suggests potential redundancy or layered abstraction (e.g., `ITestDataViewModel` for root, `ITestDataSeriesViewModel` for individual series).
- **`ITestDataSeriesViewModel` and `ITestDataViewModel` both use `ITestDataSeries` as model**: This suggests potential redundancy or layered abstraction (e.g., `ITestDataViewModel` for root, `ITestDataSeriesViewModel` for individual series).
- **`ITestDataSeriesViewModel` and `ITestDataViewModel` both use `ITestDataSeries` as model**: This suggests potential redundancy or layered abstraction (e.g., `ITestDataViewModel` for root, `ITestDataSeriesViewModel` for individual series).
- **`ITestDataSeriesViewModel` and `ITestDataViewModel` both use `ITestDataSeries` as model**: This suggests potential redundancy or layered abstraction (e.g., `ITestDataViewModel` for root, `ITestDataSeriesViewModel` for individual series).
- **`ITestDataSeriesViewModel` and `ITestDataViewModel` both use `ITestDataSeries` as model**: This suggests potential redundancy or layered abstraction (e.g., `ITestDataViewModel` for root, `ITestDataSeriesViewModel` for individual series).
- **`ITestDataSeriesViewModel` and `ITestDataViewModel` both use `ITestDataSeries` as model**: This suggests potential redundancy or layered abstraction (e.g., `ITestDataViewModel` for root, `ITestDataSeriesViewModel` for individual series).
- **`ITestDataSeriesViewModel` and `ITestDataViewModel` both use `ITestDataSeries` as model**: This suggests potential redundancy or layered abstraction (e.g., `ITestDataViewModel` for root, `ITestDataSeriesViewModel` for individual series).
- **`ITestDataSeriesViewModel` and `ITestDataViewModel` both use `ITestDataSeries` as model**: This suggests potential redundancy or layered abstraction (e.g., `ITestDataViewModel` for root, `ITestDataSeriesViewModel` for individual series).
- **`ITestDataSeriesViewModel` and `ITestDataViewModel` both use `ITestDataSeries` as model**: This suggests potential redundancy or layered abstraction (e.g., `ITestDataViewModel` for root, `ITestDataSeriesViewModel` for individual series).
- **`ITestDataSeriesViewModel` and `ITestDataViewModel` both use `ITestDataSeries` as model**: This suggests potential redundancy or layered abstraction (e.g., `ITestDataViewModel` for root, `ITest

View File

@@ -0,0 +1,53 @@
---
source_files:
- Common/DTS.Common/Interface/DTS.Viewer/Legend/ILegendView.cs
- Common/DTS.Common/Interface/DTS.Viewer/Legend/ILegendViewModel.cs
generated_at: "2026-04-16T03:07:28.401794+00:00"
model: "Qwen/Qwen3-Coder-Next-FP8"
schema_version: 1
sha256: "0b4af6a3a34a7912"
---
# Legend
## 1. Purpose
This module defines the foundational interfaces for a legend viewview model pair within the DTS viewer subsystem. It establishes the contract between the presentation layer (view) and the business/logic layer (view model) for displaying legend information—typically used to explain symbols, colors, or categories in a visualization (e.g., maps, charts, or diagrams). The interfaces inherit from base abstractions (`IBaseView`, `IBaseViewModel`) to integrate with a larger MVVM (Model-View-ViewModel) framework, ensuring consistency and testability across the application.
## 2. Public Interface
### `ILegendView`
```csharp
public interface ILegendView : IBaseView
```
- **Description**: Represents the view component responsible for rendering legend content. It inherits from `IBaseView`, implying it participates in a standardized view lifecycle (e.g., initialization, binding, disposal) defined elsewhere. No additional members are declared in this interface—its behavior is entirely governed by the base interface and implementation.
### `ILegendViewModel`
```csharp
public interface ILegendViewModel : IBaseViewModel
{
ILegendView View { get; }
}
```
- **Description**: Represents the view model for the legend. It exposes a read-only property `View` that provides access to the associated `ILegendView` instance. This follows a common MVVM pattern where the view model holds a reference to its view for coordination (e.g., triggering view updates or responding to view-specific state). Inherits from `IBaseViewModel`, implying standard view model capabilities (e.g., property change notification, command handling).
## 3. Invariants
- `ILegendView` must be implemented by a concrete view class that adheres to the contract of `IBaseView` (e.g., supports data binding, lifecycle management).
- `ILegendViewModel` must always return a non-null `ILegendView` instance via the `View` property during its active lifetime (though the source does not enforce this explicitly, it is implied by the design).
- The `View` property in `ILegendViewModel` is read-only—no setter is defined, meaning view assignment (if any) must occur internally or during construction.
## 4. Dependencies
- **Internal Dependencies**:
- `DTS.Common.Base` namespace (specifically `IBaseView` and `IBaseViewModel`), indicating reliance on a shared base layer for UI abstractions.
- **External Dependencies**:
- Unknown—no other namespaces or types are referenced in the provided source.
- **Dependents**:
- Likely consumed by a DI container or MVVM framework to wire up legend-related UI components.
- Concrete implementations (not shown) would depend on this interface for decoupled testing and composition.
## 5. Gotchas
- **Ambiguity in `View` property semantics**: The `ILegendViewModel.View` property suggests a back-reference to the view, but its lifecycle management (e.g., who sets it? when is it null? can it change?) is not specified in the source. This could lead to runtime errors if implementations assume ownership or mutability.
- **No explicit data members**: Neither interface declares properties for legend data (e.g., items, titles, colors). This implies legend content is either:
- Handled via `IBaseView`/`IBaseViewModel` (e.g., through generic data-binding mechanisms),
- Defined in derived interfaces or concrete classes (not included here), or
- An oversight (but cannot be assumed without further evidence).
- **No versioning or extensibility markers**: The interfaces are minimal and may lack hooks for future enhancements (e.g., `INotifyPropertyChanged` is not declared here, though likely inherited from `IBaseViewModel`).

View File

@@ -0,0 +1,118 @@
---
source_files:
- Common/DTS.Common/Interface/DTS.Viewer/MainView/IMainView.cs
- Common/DTS.Common/Interface/DTS.Viewer/MainView/IViewerMainView.cs
- Common/DTS.Common/Interface/DTS.Viewer/MainView/IExportMainView.cs
- Common/DTS.Common/Interface/DTS.Viewer/MainView/IExportMainViewGrid.cs
- Common/DTS.Common/Interface/DTS.Viewer/MainView/IViewerMainViewGrid.cs
- Common/DTS.Common/Interface/DTS.Viewer/MainView/IMainViewModel.cs
- Common/DTS.Common/Interface/DTS.Viewer/MainView/IViewerMainViewModel.cs
generated_at: "2026-04-16T03:08:34.664134+00:00"
model: "Qwen/Qwen3-Coder-Next-FP8"
schema_version: 1
sha256: "652bfa5baf405103"
---
# MainView
## Documentation: Main View Interfaces Module
---
### **1. Purpose**
This module defines a set of interfaces that establish the contract for the main view and view model layers in the DTS Viewer application, specifically supporting distinct UI modes: general *Main*, *Viewer*, and *Export* contexts, each with optional grid-specific variants. These interfaces enforce a consistent separation of concerns between UI presentation (views) and business logic (view models), leveraging the `IBaseView` and `IBaseViewModel` base contracts. The module enables modular UI composition—particularly for regions like navigation, graphs, diagnostics, and statistics—while supporting viewer-specific functionality such as keyboard navigation, zoom control, and configuration-dependent permissions.
---
### **2. Public Interface**
All interfaces reside in the `DTS.Common.Interface` namespace and inherit from `IBaseView` or `IBaseViewModel`.
#### **View Interfaces**
- **`IMainView`**
Marker interface for the primary main view. Inherits `IBaseView`. No additional members.
- **`IViewerMainView`**
Marker interface for the viewer-specific main view. Inherits `IBaseView`. No additional members.
- **`IExportMainView`**
Marker interface for the export-specific main view. Inherits `IBaseView`. No additional members.
- **`IExportMainViewGrid`**
Marker interface for the export-specific grid view. Inherits `IBaseView`. No additional members.
- **`IViewerMainViewGrid`**
Marker interface for the viewer-specific grid view. Inherits `IBaseView`. No additional members.
#### **ViewModel Interfaces**
- **`IMainViewModel`**
Base view model for the general main view.
- `IBaseView View { get; }` — Gets the associated main view.
- `object ContextNavigationRegion { get; set; }`
- `object ContextGraphRegion { get; set; }`
- `object ContextTestsRegion { get; set; }`
- `object ContextGraphsRegion { get; set; }`
- `object ContextLegendRegion { get; set; }`
- `object ContextDiagRegion { get; set; }`
- `object ContextStatsRegion { get; set; }`
- `object ContextCursorRegion { get; set; }`
- `object ContextPropertyRegion { get; set; }`
— All represent region containers (e.g., for MVVM region injection or binding).
- `List<FrameworkElement> GetRegions();` — Returns a list of all region UI elements.
- **`IViewerMainViewModel`**
View model for the viewer-specific main view. Extends `IMainViewModel` via `IBaseViewModel` and `ISelectedDataViewModel`.
- `IBaseView View { get; set; }` — Gets or sets the associated viewer main view.
- All `Context*Region` properties from `IMainViewModel`.
- `List<FrameworkElement> GetRegions();` — Same semantics as above.
- `string ConfigPath { get; set; }` — Path to the viewer configuration file.
- `bool DoesUserHaveEditPermission { get; set; }` — Indicates whether the current user has edit permissions.
- `void ZoomReset();` — Resets zoom level to default.
- `void LeftKeyPress();` — Handles left arrow key press (e.g., step backward in time/data).
- `void RightKeyPress();` — Handles right arrow key press (e.g., step forward in time/data).
- `Common.Enums.IsoViewMode ChannelCodeViewMode { get; set; }` — Controls how channel codes are displayed (e.g., ISO view mode).
- `Common.Enums.Sensors.CalibrationBehaviors CalibrationBehaviorSetting { get; set; }` — Sets calibration behavior (e.g., auto, manual, off).
- `bool CalibrationBehaviorSettableInViewer { get; set; }` — Indicates if calibration behavior can be changed in the viewer UI.
- `Visibility SettingsVisibility { get; }` — Controls visibility of settings UI (read-only).
---
### **3. Invariants**
- All view interfaces (`IMainView`, `IViewerMainView`, etc.) are *marker interfaces*—they carry no behavioral contract beyond type identity and inheritance from `IBaseView`.
- All view model interfaces inherit from `IBaseViewModel`, implying they must implement at least the base view model contract (e.g., `IBaseViewModel` likely includes `IBaseView View { get; }` or similar).
- The `IMainViewModel` interface enforces that all region properties (`Context*Region`) must be settable and gettable, and `GetRegions()` must return a non-null list of `FrameworkElement`s.
- In `IViewerMainViewModel`, the `View` property is *read-write* (unlike `IMainViewModel` where it is read-only), allowing dynamic view assignment or swapping.
- `IViewerMainViewModel` extends `ISelectedDataViewModel`, implying it must also satisfy that interfaces contract (e.g., handling selected data state), though its members are not shown here.
- Region properties (`Context*Region`) are typed as `object`, indicating they are likely injected at runtime (e.g., via Prism regions or custom region managers), but their exact contract is not defined in this module.
---
### **4. Dependencies**
#### **Dependencies *of* this module:**
- `DTS.Common.Base` — Provides `IBaseView` and `IBaseViewModel`, and likely `ISelectedDataViewModel`.
- `System.Collections.Generic` — For `List<T>`.
- `System.Windows` — For `FrameworkElement` and `Visibility`.
#### **Dependencies *on* this module:**
- Any module implementing or consuming main views/view models (e.g., UI shell modules, region controllers, or viewer/export modules) will depend on these interfaces.
- Likely used by modules implementing:
- View composition (e.g., Prism-based region navigation).
- Viewer-specific logic (e.g., time-series playback, zoom, keyboard handling).
- Export workflows (e.g., grid export, report generation).
- `ISelectedDataViewModel` (from `DTS.Common.Base`) is required for `IViewerMainViewModel`, so any consumer must also reference that base module.
---
### **5. Gotchas**
- **Ambiguous region semantics**: All `Context*Region` properties are typed as `object`. Their expected runtime type (e.g., `RegionManager`, `FrameworkElement`, or custom container) is not documented here—implementation details are required to avoid misuse.
- **Redundant view interfaces**: The presence of `IMainView`, `IViewerMainView`, `IExportMainView`, and their grid variants suggests a design where UI behavior is differentiated *only by type*, not by shared interface members. This may indicate over-fragmentation or lack of behavioral differentiation in the interface layer.
- **Missing documentation for inherited interfaces**: `ISelectedDataViewModel` (implemented by `IViewerMainViewModel`) is referenced but not defined in this module—its contract is unknown.
- **`GetRegions()` behavior**: The method returns `List<FrameworkElement>`, but it is unclear whether this list is mutable, cached, or dynamically computed. Implementation may vary.
- **`SettingsVisibility` is read-only**: Its value is computed (likely based on permissions or config), but no setter or documentation is provided—consumers cannot programmatically toggle settings visibility.
- **No versioning or deprecation markers**: Interfaces like `IExportMainViewGrid` suggest a grid-specific export view, but no guidance is given on whether this is deprecated or superseded by other patterns.
None identified beyond the above.

View File

@@ -0,0 +1,44 @@
---
source_files:
- Common/DTS.Common/Interface/DTS.Viewer/Menu/IMenuView.cs
- Common/DTS.Common/Interface/DTS.Viewer/Menu/IMenuViewModel.cs
generated_at: "2026-04-16T03:07:48.572330+00:00"
model: "Qwen/Qwen3-Coder-Next-FP8"
schema_version: 1
sha256: "539bd98504c02d83"
---
# Menu
## 1. Purpose
This module defines the foundational interfaces for the menu layer within the DTS Viewer application, specifically establishing the contract between the view and view model for menu-related UI components. It extends the base MVVM (Model-View-ViewModel) abstractions (`IBaseView`, `IBaseViewModel`) to enforce a standardized separation of concerns for menu UI, ensuring that menu views and view models are explicitly tied together and conform to the broader applications architectural patterns.
## 2. Public Interface
- **`IMenuView`**
*Signature:* `public interface IMenuView : IBaseView`
*Behavior:* Represents the view layer for menu UI (e.g., a menu bar, context menu, or ribbon menu). It inherits from `IBaseView`, implying it participates in the base view lifecycle (e.g., initialization, binding, disposal), but the interface itself carries no additional members—its role is purely as a typed marker interface to distinguish menu-specific views.
- **`IMenuViewModel`**
*Signature:* `public interface IMenuViewModel : IBaseViewModel`
*Behavior:* Represents the view model for menu UI. It exposes a single read-only property:
- **`View`** (`IMenuView View { get; }`) — Provides access to the associated view instance, enforcing a bidirectional link between the view model and its view (a common pattern in MVVM frameworks to support view-model-driven view management or inversion of control). The view model inherits from `IBaseViewModel`, implying standard view model responsibilities (e.g., property change notification, command handling), though those are not detailed here.
## 3. Invariants
- `IMenuView` must be implemented by all concrete menu view types (e.g., `MenuView : IMenuView`).
- `IMenuViewModel` implementations **must** return a non-null `IMenuView` instance from the `View` property; nullability is not declared, and the XML summary implies a required relationship.
- The `View` property in `IMenuViewModel` is expected to be set during initialization and remain stable (no reassignment), though the interface does not enforce this explicitly.
- Both interfaces are part of the `DTS.Common.Interface` namespace and rely on `DTS.Common.Base` for their base contracts (`IBaseView`, `IBaseViewModel`), implying strict adherence to the base layers conventions (e.g., lifecycle, binding, or disposal semantics defined elsewhere).
## 4. Dependencies
- **Depends on:**
- `DTS.Common.Base` (specifically `IBaseView`, `IBaseViewModel`).
- **Depended upon by:**
- Any module implementing or consuming menu UI components (e.g., a menu controller, shell host, or DI container resolving `IMenuViewModel`).
- Concrete implementations (e.g., `MenuViewModel : IMenuViewModel`, `MenuView : IMenuView`) in other modules (not visible here, but implied by the interface design).
- **Notable absence:** No direct dependencies on UI frameworks (e.g., WPF, WinForms) or third-party libraries—suggesting this is a platform-agnostic abstraction layer.
## 5. Gotchas
- **Ambiguity in `View` property semantics:** The `View` property is read-only, but its initialization mechanism is unspecified (e.g., is it injected, set by a framework, or assigned by the view itself?). This could lead to runtime errors if the property is accessed before being set.
- **No explicit menu-specific members:** `IMenuView` and `IMenuViewModel` contain no methods/properties for menu operations (e.g., `AddMenuItem`, `IsEnabled`), implying menu behavior is either handled via commands in `IBaseViewModel` or deferred to derived interfaces (not shown here).
- **No versioning or extensibility markers:** Absence of attributes (e.g., `[ContractVersion]`) or explicit extension points may complicate future enhancements without breaking consumers.
- **None identified from source alone.**

View File

@@ -0,0 +1,47 @@
---
source_files:
- Common/DTS.Common/Interface/DTS.Viewer/Navigation/INavigationView.cs
- Common/DTS.Common/Interface/DTS.Viewer/Navigation/INavigationViewModel.cs
generated_at: "2026-04-16T03:07:38.322183+00:00"
model: "Qwen/Qwen3-Coder-Next-FP8"
schema_version: 1
sha256: "2a3c86a0916b7d5f"
---
# Navigation
## 1. Purpose
This module defines the foundational interfaces for navigation-related view and view model components within the DTS Viewer subsystem. Specifically, `INavigationView` and `INavigationViewModel` establish a contract for navigation UI layers, enforcing a separation of concerns where the view (UI layer) is bound to a view model (logic/data layer), with the view model exposing a reference back to its associated view. These interfaces extend base abstractions (`IBaseView`, `IBaseViewModel`) to integrate into a larger MVVM (Model-View-ViewModel) architecture, enabling consistent navigation state management and view coordination.
## 2. Public Interface
### `INavigationView`
- **Signature**: `public interface INavigationView : IBaseView { }`
- **Behavior**: Represents the UI layer for navigation functionality. It inherits from `IBaseView`, implying it adheres to the base view contract (e.g., lifecycle, binding context, or rendering responsibilities), but contains no additional members itself. Its purpose is to serve as a typed marker interface for navigation-specific views.
### `INavigationViewModel`
- **Signature**: `public interface INavigationViewModel : IBaseViewModel`
- **Property**: `INavigationView NavigationView { get; }`
- **Behavior**: Represents the view model for navigation logic. It exposes a read-only property `NavigationView` that provides access to the associated `INavigationView` instance. This enables the view model to interact with or query the view (e.g., for navigation commands, state updates, or coordination), while maintaining loose coupling through the interface.
## 3. Invariants
- `INavigationView` must be implemented by a concrete view class (e.g., a XAML page or control) that participates in the navigation flow.
- `INavigationViewModel` must be implemented by a view model class that maintains a reference to an instance of a type implementing `INavigationView`.
- The `NavigationView` property in `INavigationViewModel` must return a non-null reference to the view instance it is bound to (or has been associated with) during the view-model/view lifecycle.
- Both interfaces extend their respective base interfaces (`IBaseView`, `IBaseViewModel`), so all invariants of those base interfaces (e.g., binding context requirements, disposal patterns) apply transitively.
## 4. Dependencies
- **Depends on**:
- `DTS.Common.Base.IBaseView` (via `INavigationView`)
- `DTS.Common.Base.IBaseViewModel` (via `INavigationViewModel`)
- **Depended on by**:
- Concrete implementations of navigation views (e.g., `ShellView`, `MainMenuView`) will implement `INavigationView`.
- Concrete navigation view models (e.g., `ShellViewModel`, `NavigationViewModel`) will implement `INavigationViewModel`.
- Other modules (e.g., navigation service, shell host, or region manager) likely depend on `INavigationViewModel` to access or coordinate the navigation UI.
- *Note*: The source files do not specify concrete consumers, but the design strongly suggests usage in a view model locator or navigation framework (e.g., Prism, MVVM Light, or custom).
## 5. Gotchas
- The interfaces are intentionally minimal and serve as *marker interfaces*—they convey semantic meaning (navigation context) but no behavior. Consumers must rely on other mechanisms (e.g., commands, events, or additional interfaces) for actual navigation logic.
- The `NavigationView` property in `INavigationViewModel` is read-only, implying the view reference is set once (e.g., during view-model initialization or binding) and not expected to change. Reassignment may break assumptions in consuming code.
- No explicit thread-safety or lifecycle guarantees are defined for the `NavigationView` reference; callers should assume it is valid only during the active lifetime of the view/view-model pair.
- None identified from source alone.

View File

@@ -0,0 +1,138 @@
---
source_files:
- Common/DTS.Common/Interface/DTS.Viewer/Reports/PowerSpectralDensity/IPSDReportMainViewGrid.cs
- Common/DTS.Common/Interface/DTS.Viewer/Reports/PowerSpectralDensity/IPSDReportResultsView.cs
- Common/DTS.Common/Interface/DTS.Viewer/Reports/PowerSpectralDensity/IPSDReportSettingsView.cs
- Common/DTS.Common/Interface/DTS.Viewer/Reports/PowerSpectralDensity/IPSDReportMainView.cs
- Common/DTS.Common/Interface/DTS.Viewer/Reports/PowerSpectralDensity/IChannelGRMSSummary.cs
- Common/DTS.Common/Interface/DTS.Viewer/Reports/PowerSpectralDensity/IPSDReportSettingsViewModel.cs
- Common/DTS.Common/Interface/DTS.Viewer/Reports/PowerSpectralDensity/IPSDReportResultsViewModel.cs
- Common/DTS.Common/Interface/DTS.Viewer/Reports/PowerSpectralDensity/IPSDReportSettingsModel.cs
- Common/DTS.Common/Interface/DTS.Viewer/Reports/PowerSpectralDensity/IPSDReportMainViewModel.cs
generated_at: "2026-04-16T03:09:28.143964+00:00"
model: "Qwen/Qwen3-Coder-Next-FP8"
schema_version: 1
sha256: "0edcef037628c1da"
---
# PowerSpectralDensity
## Documentation: Power Spectral Density (PSD) Report Module Interfaces
---
### 1. **Purpose**
This module defines the interface layer for the Power Spectral Density (PSD) report functionality within the DTS Viewer. It establishes contracts for views, view models, and models that collectively support configuration, results display, and main orchestration of PSD reports. The interfaces follow a layered MVVM pattern (Model-View-ViewModel), with clear separation between UI presentation (`IBaseView`-derived interfaces), state management (`IBaseViewModel`-derived interfaces), and data/configuration (`IBaseModel`-derived interfaces). The module enables users to configure filtering, windowing, and data range parameters, compute GRMS summaries per channel, and export results—while integrating with broader viewer regions and navigation contexts.
---
### 2. **Public Interface**
#### **Interfaces (View Layer)**
All implement `IBaseView`.
- `IPSDReportMainView`
Top-level view interface for the PSD report. Serves as the root container for the report UI.
- `IPSDReportMainViewGrid`
Sub-view interface representing the main grid area within the PSD report view.
- `IPSDReportSettingsView`
View interface for the settings panel where users configure filters, windowing, and data range.
- `IPSDReportResultsView`
View interface for the results panel displaying channel GRMS summaries and related outputs.
#### **Interfaces (ViewModel Layer)**
All implement `IBaseViewModel`.
- `IPSDReportMainViewModel`
Main orchestrator for the PSD report. Manages regions (navigation, graph, tests, legend, property), user permissions, zoom/keyboard interactions, and view modes.
**Key members**:
- `List<FrameworkElement> GetRegions()`
- `void ZoomReset()`, `void LeftKeyPress()`, `void RightKeyPress()`
- `Visibility SettingsVisibility { get; }`
- `string ConfigPath`, `bool DoesUserHaveEditPermission`, `bool CalibrationBehaviorSettableInViewer`, `ChannelCodeViewMode`, `CalibrationBehaviorSetting`
- `IPSDReportSettingsViewModel`
View model for settings. Binds to `IPSDReportSettingsView` and `IPSDReportSettingsModel`.
**Key members**:
- `void PublishChanges()`
- `IBaseView View { get; set; }`, `IBaseViewModel Parent { get; set; }`, `IPSDReportSettingsModel Model { get; set; }`
- `IPSDReportResultsViewModel`
View model for results. Exposes export commands and channel GRMS data.
**Key members**:
- `DelegateCommand ExportToPDFCommand { get; }`
- `DelegateCommand ExportToCSVCommand { get; }`
- `ObservableCollection<IChannelGRMSSummary> Results { get; set; }`
- `IBaseView View { get; set; }`, `IBaseViewModel Parent { get; set; }`
#### **Interfaces (Model Layer)**
All implement `IBaseModel`.
- `IPSDReportSettingsModel`
Holds configuration state for the PSD report.
**Key members**:
- `bool LowPassFilterEnabled`, `double LowPassFilterFrequency`, `PassFilterType LowPassFilterType`, `int LowPassFilterOrder`
- `bool HighPassFilterEnabled`, `double HighPassFilterFrequency`, `PassFilterType HighPassFilterType`, `int HighPassFilterOrder`
- `WindowWidth WindowWidth`, `WindowType WindowType`, `WindowAveragingType WindowAveragingType`, `double WindowOverlappingPercent`
- `bool ShowEnvelope`, `bool CanPublishChanges`, `bool ReadData`, `double DataStart`, `double DataEnd`
- `IPSDReportSettingsViewModel Parent { get; set; }`
#### **Data Interfaces**
- `IChannelGRMSSummary`
Represents a single channels GRMS summary.
**Properties**:
- `string ChannelName { get; set; }`
- `int SampleRate { get; set; }`
- `double GRMS { get; set; }`
Implements `IBaseClass`.
---
### 3. **Invariants**
- All view interfaces (`IPSDReport*View`) derive from `IBaseView`, ensuring consistent UI contract.
- All view model interfaces derive from `IBaseViewModel`, and all model interfaces derive from `IBaseModel`, enforcing layered architecture.
- `IPSDReportSettingsViewModel.Model` must be non-null and of concrete type `IPSDReportSettingsModel`.
- `IPSDReportResultsViewModel.Results` must be an `ObservableCollection<IChannelGRMSSummary>`; individual items must have non-null `ChannelName`.
- `IPSDReportMainViewModel` implements `ISelectedDataViewModel`, implying it participates in shared data selection context.
- `IPSDReportSettingsModel.CanPublishChanges` likely controls whether `PublishChanges()` may be invoked (though enforcement is not explicit in interface).
- `IPSDReportMainViewModel.SettingsVisibility` is read-only; its value is determined internally (e.g., by permissions or configuration).
---
### 4. **Dependencies**
#### **Internal Dependencies**
- **Base Layer**: All interfaces depend on `DTS.Common.Base` (`IBaseView`, `IBaseViewModel`, `IBaseModel`, `IBaseClass`).
- **Enums**:
- `PassFilterType`, `WindowWidth`, `WindowType`, `WindowAveragingType` (from `DTS.Common.Enums.Viewer.Reports`)
- `IsoViewMode`, `CalibrationBehaviors` (from `DTS.Common.Enums`)
- **Prism Framework**: `IPSDReportResultsViewModel` and `IPSDReportSettingsViewModel` depend on `Prism.Commands.DelegateCommand`.
- **WPF**: `IPSDReportMainViewModel` depends on `System.Windows.FrameworkElement`.
#### **External Dependencies**
- **Consumers**: Likely used by a viewer module (e.g., `DTS.Viewer`) that implements these interfaces for concrete views/view models.
- **No direct external libraries beyond Prism and WPF** are referenced in the interfaces themselves.
#### **Depended Upon**
- This modules interfaces are consumed by implementations of the PSD report feature (not visible here), likely in a separate implementation project (e.g., `DTS.Viewer.Reports.PSD`).
---
### 5. **Gotchas**
- **Namespace inconsistency**: `// ReSharper disable CheckNamespace` in `IPSDReportMainView.cs` suggests namespace alignment may be manually enforced or legacy; verify actual usage matches `DTS.Common.Interface`.
- **Missing implementation details**:
- `IPSDReportMainViewModel` has commented-out `bool Standalone { get; set; }` — behavior may be partially implemented or deprecated.
- `IPSDReportSettingsModel` exposes `ReadData`, `DataStart`, `DataEnd` but no clear validation (e.g., `DataStart < DataEnd`) is enforced in the interface.
- **Ambiguous `CanPublishChanges`**: Its purpose is unclear—likely used to gate `PublishChanges()` calls, but no contract or event is defined for when it changes.
- **No explicit error handling**: Interfaces do not define error states or validation failure mechanisms (e.g., invalid filter frequencies).
- **`GetRegions()` returns `List<FrameworkElement>`**: Assumes WPF-specific region management; may not be portable to other UI frameworks.
- **No versioning or extensibility markers**: Interfaces are sealed contracts; changes risk breaking downstream implementations.
*None identified beyond the above.*

View File

@@ -0,0 +1,180 @@
---
source_files:
- Common/DTS.Common/Interface/DTS.Viewer/TestDefinition/ITestMetadata.cs
- Common/DTS.Common/Interface/DTS.Viewer/TestDefinition/ITestGraphs.cs
- Common/DTS.Common/Interface/DTS.Viewer/TestDefinition/ITestSetupMetadata.cs
- Common/DTS.Common/Interface/DTS.Viewer/TestDefinition/ITestEvent.cs
- Common/DTS.Common/Interface/DTS.Viewer/TestDefinition/ITestSummary.cs
- Common/DTS.Common/Interface/DTS.Viewer/TestDefinition/ITestRunMetadata.cs
- Common/DTS.Common/Interface/DTS.Viewer/TestDefinition/ITestModule.cs
- Common/DTS.Common/Interface/DTS.Viewer/TestDefinition/ITestCalculatedChannel.cs
- Common/DTS.Common/Interface/DTS.Viewer/TestDefinition/ITestChannel.cs
generated_at: "2026-04-16T03:09:25.548414+00:00"
model: "Qwen/Qwen3-Coder-Next-FP8"
schema_version: 1
sha256: "ba5d335a6c532c10"
---
# Documentation: Test Definition Interfaces
## 1. Purpose
This module defines a set of interfaces that model the metadata and structure of test data within the DTS (Dynamic Test System) viewer. It serves as the foundational data contract between data acquisition systems and the viewer application, enabling structured representation of test runs, setups, modules, channels (both physical and calculated), events, and associated metadata. These interfaces support UI binding (via `INotifyPropertyChanged`), serialization, and hierarchical navigation (e.g., `Parent` references), forming the backbone for test data visualization, analysis, and reporting.
## 2. Public Interface
### `ITestMetadata`
- **Namespace**: `DTS.Common.Interface.TestDefinition`
- **Properties**:
- `ITestRunMetadata TestRun { get; set; }`: Top-level metadata for the test run.
- `ITestSetupMetadata TestSetup { get; set; }`: Metadata describing the physical setup during the test.
### `ITestGraphs`
- **Namespace**: `DTS.Common.Interface`
- **Properties**:
- `string Name { get; set; }`: Human-readable name of the graph group.
- `string HardwareChannelName { get; set; }`: Original hardware channel name (e.g., "CH1").
- `List<string> ChannelIds { get; set; }`: List of logical channel IDs associated with this graph.
- `List<ITestChannel> Channels { get; set; }`: List of `ITestChannel` instances assigned to this graph.
### `ITestSetupMetadata`
- **Namespace**: `DTS.Common.Interface`
- **Properties**:
- `string SetupName { get; set; }`: Name of the test setup configuration.
- `DateTime TimeStamp { get; set; }`: Timestamp when the setup was created/recorded.
- `List<ITestGraphs> TestGraphs { get; set; }`: Collection of graph groupings used in the test.
- `CalibrationBehaviors CalibrationBehavior { get; set; }`: Enumerated calibration behavior settings (type defined in `DTS.Common.Enums.Sensors`).
### `ITestEvent`
- **Namespace**: `DTS.Common.Interface`
- **Properties**:
- `string TestId { get; set; }`: Unique identifier for the test.
- `string TestItem { get; set; }`: Name of the test item (e.g., part number).
- `string DTSFile { get; set; }`: Path or name of the associated `.dts` file.
- `bool IsLocked { get; set; }`: Indicates if the event is locked (e.g., read-only).
- `bool IsSelected { get; set; }`: Selection state in UI.
- `bool CanLock { get; set; }`: Whether locking is permitted.
- `IBaseViewModel Parent { get; set; }`: Parent view model in the UI hierarchy.
- `string Name { get; set; }`: Display name of the event.
- `int TreeIndex { get; set; }`: Position in a tree view hierarchy.
### `ITestSummary`
- **Namespace**: `DTS.Common.Interface.TestDefinition`
- **Inherits**: `IBaseClass`
- **Properties**:
- `string Id { get; set; }`: Unique identifier for the summary.
- `string Name { get; set; }`: Human-readable name of the test.
- `string Description { get; set; }`: Free-text description.
- `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; }`: Selection state.
- `List<ITestGraphs> Graphs { get; set; }`: Graph groupings.
- `List<ITestChannel> Channels { get; set; }`: Physical channels.
- `List<ITestChannel> CalculatedChannels { get; set; }`: Calculated channels.
- `IBaseViewModel Parent { get; set; }`: Parent view model.
### `ITestRunMetadata`
- **Namespace**: `DTS.Common.Interface`
- **Properties**:
- `string Name { get; set; }`: Name of the test run.
- `string Id { get; set; }`: Unique identifier.
- `string Description { get; set; }`: Free-text description.
- `bool InlineSerializedData { get; set; }`: Whether raw data is embedded in metadata.
- `string TestGuid { get; set; }`: Globally unique test identifier.
- `int FaultFlags { get; set; }`: Bitmask of fault conditions.
- `string Software { get; set; }`: Software name used (e.g., "DTS Viewer").
- `string SoftwareVersion { get; set; }`: Version string.
- `string DataType { get; set; }`: Data type classification.
- `DateTime FileDate { get; set; }`: File creation/modification timestamp.
- `string FilePath { get; set; }`: Full path to the data file.
- `List<ITestModule> Modules { get; set; }`: Collection of acquisition modules.
- `List<ITestChannel> Channels { get; set; }`: Physical channels.
- `List<ITestChannel> CalculatedChannels { get; set; }`: Calculated channels.
### `ITestModule`
- **Namespace**: `DTS.Common.Interface`
- **Properties**:
- `string SerialNumber { get; set; }`: Module serial number.
- `string BaseSerialNumber { get; set; }`: Base unit serial number (if applicable).
- `int AaFilterRateHz { get; set; }`: Anti-aliasing filter rate.
- `int Number { get; set; }`: Module index/number.
- `int NumberOfSamples { get; set; }`: Number of samples after subsampling.
- `int UnsubsampledNumberOfSamples { get; set; }`: Raw sample count.
- `double RequestedPostTriggerSeconds { get; set; }`: Requested post-trigger time.
- `double RequestedPreTriggerSeconds { get; set; }`: Requested pre-trigger time.
- `double PostTriggerSeconds { get; set; }`: Actual post-trigger time.
- `double PreTriggerSeconds { get; set; }`: Actual pre-trigger time.
- `string RecordingMode { get; set; }`: e.g., "Continuous", "Triggered".
- `int SampleRateHz { get; set; }`: Effective sample rate.
- `int StartRecordSampleNumber { get; set; }`: Sample index where recording started.
- `int NumberOfChannels { get; set; }`: Number of active channels on module.
- `bool InlineSerializedData { get; set; }`: Whether raw data is embedded.
- `int StartRecordTimestampSec { get; set; }` & `int StartRecordTimestampNanoSec { get; set; }`: Start time (POSIX seconds + nanoseconds).
- `int TriggerTimestampSec { get; set; }` & `int TriggerTimestampNanoSec { get; set; }`: Trigger time.
- `List<ulong> TriggerSampleNumbers { get; set; }`: Sample indices where triggers occurred.
- `bool PTPMasterSync { get; set; }`: Precision Time Protocol master sync status.
- `TiltSensorAxisX/Y/ZDegreesPre/Post { get; set; }`: Tilt sensor readings before/after test.
- `TemperatureLocation1-4Pre/Post { get; set; }`: Temperature readings before/after test.
- `List<ITestChannel> Channels { get; set; }`: Physical channels on this module.
- `List<ITestChannel> CalculatedChannels { get; set; }`: Calculated channels on this module.
### `ITestCalculatedChannel`
- **Namespace**: `DTS.Common.Interface`
- **Properties**:
- All properties of `ITestChannel` (see below), plus:
- `string SourceChannelNumber { get; set; }`: Source channel number(s) used in calculation.
- `string SourceModuleNumber { get; set; }`: Source module number(s).
- `string SourceModuleSerialNumber { get; set; }`: Source module serial number(s).
- `string Calculation { get; set; }`: Formula or operation used (e.g., "CH1 + CH2").
- `string SensitivityUnits { get; set; }`: Units for sensitivity (e.g., "mV/V").
- `int SensorCapacity { get; set; }`: Sensor full-scale capacity.
### `ITestChannel`
- **Namespace**: `DTS.Common.Interface`
- **Properties**:
- **Identification & Hierarchy**:
- `string Group { get; set; }`, `string SubGroup { get; set; }`: Logical grouping.
- `string TestId { get; set; }`, `string TestSetupName { get; set; }`, `string ModuleSerialNumber { get; set; }`, `string SerialNumber { get; set; }`, `string ChannelId { get; set; }`, `string ChannelDisplayName { get; set; }`, `string Description { get; set; }`, `string IsoCode { get; set; }`, `string IsoChannelName { get; set; }`, `string UserCode { get; set; }`, `string UserChannelName { get; set; }`, `string ChannelGroupName { get; set; }`, `string ChannelType { get; set; }`, `bool IsCalculatedChannel { get; set; }`, `int Number { get; set; }`.
- **Configuration & Calibration**:
- `string DigitalMultiplier { get; set; }`, `string DigitalMode { get; set; }`, `DateTime Start { get; set; }`, `string Bridge { get; set; }`, `double BridgeResistanceOhms { get; set; }`, `double ZeroPoint { get; set; }`, `string ChannelDescriptionString { get; set; }`, `void SetChannelDescriptionAndDisplayName(string channelDescriptionString)`, `string ChannelName2 { get; set; }`, `string HardwareChannelName { get; set; }`, `double DesiredRange { get; set; }`, `double ActualMaxRangeEu { get; set; }`, `double ActualMinRangeEu { get; set; }`, `double ActualMaxRangeAdc { get; }`, `double ActualMinRangeAdc { get; }`, `double ActualMaxRangeMv { get; set; }`, `double ActualMinRangeMv { get; set; }`, `double Sensitivity { get; set; }`, `string SoftwareFilter { get; set; }`, `bool ProportionalToExcitation { get; set; }`, `bool IsInverted { get; set; }`, `string LinearizationFormula { get; set; }`, `bool IsSubsampled { get; set; }`, `int AbsoluteDisplayOrder { get; set; }`, `DateTime LastCalibrationDate { get; set; }`, `string SensorId { get; set; }`, `int OffsetToleranceLowMv { get; set; }`, `int OffsetToleranceHighMv { get; set; }`, `int DataFlag { get; set; }`, `string ExcitationVoltage { get; set; }`, `string Eu { get; set; }`, `bool CalSignalEnabled { get; set; }`, `bool ShuntEnabled { get; set; }`, `bool VoltageInsertionCheckEnabled { get; set; }`, `bool RemoveOffset { get; set; }`, `string ZeroMethod { get; set; }`, `double ZeroAverageWindowBegin { get; set; }`, `double ZeroAverageWindowEnd { get; set; }`, `int InitialEu { get; set; }`, `string InitialOffset { get; set; }`, `int UnsubsampledSampleRateHz { get; set; }`, `double MeasuredShuntDeflectionMv { get; set; }`, `double TargetShuntDeflectionMv { get; set; }`, `double MeasuredExcitationVoltage { get; set; }`, `double FactoryExcitationVoltage { get; set; }`, `double TimeOfFirstSample { get; set; }`, `double Multiplier { get; set; }`, `double UserOffsetEu { get; set; }`, `int UnitConversion { get; set; }`, `bool AtCapacity { get; set; }`, `int CapacityOutputIsBasedOn { get; set; }`, `string SourceChannelNumber { get; set; }`, `string SourceModuleNumber { get; set; }`, `string SourceModuleSerialNumber { get; set; }`, `string Calculation { get; set; }`, `int SampleRateHz { get; set; }`, `string SensitivityUnits { get; set; }`, `int SensorCapacity { get; set; }`, `string SensorPolarity { get; set; }`, `int ChannelNumber { get; set; }`, `string BinaryFileName { get; set; }`, `string BinaryFilePath { get; set; }`, `double Xmax { get; set; }`, `double Xmin { get; set; }`, `int SequentialNumbers { get; set; }`, `ITestSetupMetadata ParentTestSetup { get; set; }`, `ITestModule ParentModule { get; set; }`, `IBaseViewModel Parent { get; set; }`.
- **UI & Interaction**:
- `Color ChannelColor { get; set; }`, `string ErrorMessage { get; set; }`, `bool IsError { get; set; }`, `Color? ErrorColor { get; set; }`, `bool IsSelected { get; set; }`, `bool CanSelectChannel { get; set; }`, `bool IsLocked { get; set; }`, `bool CanLock { get; set; }`, `ITestChannel Copy()`.
- **Time/Trigger Markers**:
- `ulong T1Sample { get; set; }`, `ulong T2Sample { get; set; }`, `double HIC { get; set; }`.
- **User Scaling**:
- `bool UseEUScaler { get; set; }`, `double ScaleFactorEU { get; set; }`.
- **Dataset Statistics (ADC/mV/EU/Current Units)**:
- `MinADC`, `MaxADC`, `AveADC`, `StdDevADC`, `T0ADC` (ADC domain).
- `MinMV`, `MaxMV`, `AveMV`, `StdDevMV`, `T0MV` (mV domain).
- `MinEU`, `MaxEU`, `AveEU`, `StdDevEU`, `T0EU` (Engineering Units).
- `MinY`, `MaxY`, `AveY`, `StdDevY`, `T0Value` (current display units).
- **EID (Electronic Identification)**:
- `string SetupEID { get; set; }`, `string DataCollectionEID { get; set; }`.
## 3. Invariants
- `ITestChannel` and `ITestCalculatedChannel` implement `INotifyPropertyChanged`, indicating they support data binding and must raise `PropertyChanged` events on property changes.
- `ITestRunMetadata`, `ITestModule`, `ITestChannel`, and `ITestCalculatedChannel` all implement `INotifyPropertyChanged`.
- `ITestChannel.ParentModule` and `ITestChannel.ParentTestSetup` must be non-null for channels associated with a module/test setup.
- `ITestChannel.IsCalculatedChannel` must be `true` for instances of `ITestCalculatedChannel` (though not enforced by interface alone).
- `ITestChannel.ChannelId` is expected to be unique within a given test context (not strictly enforced by interface).
- `ITestEvent.CanLock` implies whether `IsLocked` can be changed; if `false`, `IsLocked` should be treated as read-only.
- `ITestSummary.Graphs`, `Channels`, and `CalculatedChannels` are expected to be consistent with `ITestRunMetadata`'s corresponding collections (e.g., `Graphs` may aggregate `ITestGraphs` from `ITestRunMetadata.Modules`).
## 4. Dependencies
- **External Dependencies**:
- `System.Collections.Generic`, `System.ComponentModel`, `System` (core .NET types).
- `DTS.Common.Base` (for `IBaseViewModel`, `IBaseClass`).
- `DTS.Common.Enums.Sensors` (for `CalibrationBehaviors` enum).
- `System.Windows.Media` (for `Color` type used in `ITestChannel.ChannelColor`).
- **Depended Upon By**:
- UI layers (e.g., WPF view models, views) that bind to these interfaces for test data display and editing.
- Data parsers (e.g., `.dts` file readers) that populate instances of types implementing these interfaces.
- Serialization/deserialization logic (e.g., for `InlineSerializedData` handling).
- Analysis modules that consume channel statistics (e.g., `MinADC`, `MaxEU`, `HIC`).
## 5. Gotchas
- **Ambiguous `ITestCalculatedChannel` inheritance**: `ITestCalculatedChannel` does *not* explicitly inherit from `ITestChannel`, but its property list duplicates all members of `ITestChannel` (and adds extra fields). This suggests a design where calculated channels are treated as a distinct type, but consumers must be aware that `ITestCalculatedChannel` instances should be usable wherever `ITestChannel` is expected (e.g., via casting or pattern matching).
- **Redundant properties**: `ITestChannel` and `ITestCalculatedChannel` both contain `SourceChannelNumber`, `SourceModuleNumber`, etc., but only `ITestCalculatedChannel`s are semantically meaningful. Consumers should check `IsCalculatedChannel` before relying on these fields.
- **`ActualMaxRangeAdc`/`ActualMinRangeAdc` are read-only**: These are `get;` only in `ITestChannel`, implying they are computed from other properties (e.g., `ActualMaxRangeMv`, `Sensitivity`, etc.). Modifying them directly is impossible.
- **`ChannelColor` and `ChannelDisplayName` may be mutable post-creation**: Since they are `set;` properties, UI code may update them dynamically (e.g., for highlighting), but this could affect serialization if not handled.
- **`IT

View File

@@ -0,0 +1,103 @@
---
source_files:
- Common/DTS.Common/Interface/DTS.Viewer/TestModification/ITestModificationView.cs
- Common/DTS.Common/Interface/DTS.Viewer/TestModification/ITestModificationViewModel.cs
- Common/DTS.Common/Interface/DTS.Viewer/TestModification/ITestModificationModel.cs
generated_at: "2026-04-16T03:07:00.161504+00:00"
model: "Qwen/Qwen3-Coder-Next-FP8"
schema_version: 1
sha256: "43122e167ffc47f8"
---
# TestModification
### **Purpose**
This module defines the core interfaces for the *Test Modification* feature within the DTS Viewer application, enabling users to inspect and modify channel-specific calibration and configuration parameters (e.g., description, Eu multiplier/offset, T0/T1/T2 line-fit settings, sensitivity, software filters, and data flags). It implements the MVVM pattern across three layers—`ITestModificationView` (UI), `ITestModificationViewModel` (presentation logic), and `ITestModificationModel` (data/access to calibration and channel state)—to support interactive editing of test channel metadata and calibration values, including integration with the sensor database for calibration updates.
---
### **Public Interface**
#### **`ITestModificationView`**
- **Inherits**: `IBaseView`
- **Description**: A marker interface representing the view layer for the test modification UI. No additional members beyond base view contract.
#### **`ITestModificationViewModel`**
- **Inherits**: `IBaseViewModel`
- **Properties**:
- `ITestModificationView View { get; set; }` — Binds to the associated view instance.
- `IBaseViewModel Parent { get; set; }` — Reference to the parent view model (e.g., main viewer or channel list).
- `bool UseISOCodeFilterMapping { get; set; }` — Controls whether modifying a software filter should trigger automatic ISO code updates.
- `bool UseZeroForUnfiltered { get; set; }` — Determines whether `0` (vs. `P`) is used as the ISO code value when the software filter is set to "unfiltered".
- **Methods**:
- `void PublishChanges()` — Commits pending modifications (likely to the model or underlying data layer).
- `void UpdateDatabaseMethod()` — Updates the sensor calibration record in the database (see [case 43615](http://manuscript.dts.local/f/cases/43615/SW-Feature-Request-UART-Channel-Diagnostics-GPS-NMEA-1PPS)).
#### **`ITestModificationModel`**
- **Inherits**: `IBaseModel`
- **Properties**:
- `ITestModificationViewModel Parent { get; set; }` — Reference to the owning view model.
- `ITestChannel SelectedChannel { get; set; }` — The channel currently being modified.
- `string Description { get; set; }` — Channel description string; `IsModifiedDescription` tracks changes.
- `double EuMultiplier { get; set; }` — Eu multiplier; `IsModifiedEuMultiplier` tracks changes.
- `double EuOffset { get; set; }` — Eu offset; `IsModifiedEuOffset` tracks changes.
- `double T0 { get; set; }` — T0 offset in ms; `IsModifiedT0` tracks changes.
- `bool IsModifiedLineFit { get; set; }` — Whether T1/T2 line-fit parameters are modified.
- `double T1 { get; set; }` — Line-fit start time (ms).
- `double T2 { get; set; }` — Line-fit end time (ms).
- `double Sensitivity { get; set; }` — Channel sensitivity; `IsModifiedSensitivity` tracks changes.
- `IFilterClass SelectedFilter { get; set; }` — Software filter for the channel (per [FB 13120](https://github.com/...), uses `IFilterClass` instead of legacy `CFCFilter`).
- `T0Mode T0Mode { get; set; }` — T0 adjustment mode (enum value; type defined elsewhere).
- `DataFlag SelectedDataFlag { get; set; }` — Data flag setting; `IsModifiedDataFlag` tracks changes.
- `ISensorDbRecord Sensor { get; set; }` — Sensor record in the database corresponding to the channel.
- `ISensorCalDbRecord Cal { get; set; }` — Latest calibration record for the sensor.
- `double CalSensitivity { get; set; }` — Sensitivity value from the calibration record.
- `bool ShowSensorCal { get; }` — Whether sensor calibration UI should be visible.
- `bool NonLinear { get; }` — Whether the calibration is non-linear.
- `bool ProportionalToExcitation { get; }` — Whether the sensor output is proportional to excitation voltage.
- **Computed Flags** (read-only):
- `bool IsModified { get; }``true` if *any* field differs from its default/unmodified state.
- `bool IsModifiedDescription { get; }`
- `bool IsModifiedEuMultiplier { get; }`
- `bool IsModifiedEuOffset { get; }`
- `bool IsModifiedT0 { get; }`
- `bool IsModifiedSensitivity { get; }`
- `bool IsModifiedFilter { get; }`
- `bool IsModifiedDataFlag { get; }`
- **Methods**:
- `bool ValidateT0()` — Returns `true` if `T0` is within the valid time range of the current dataset; `false` otherwise.
---
### **Invariants**
- `SelectedChannel` must be non-null for all model properties to be meaningful; behavior is undefined if `SelectedChannel` is `null`.
- `IsModified*` flags are derived from comparisons against default/unmodified values and must be consistent with the corresponding property values.
- `ValidateT0()` must return `false` if `T0` falls outside the time span of the dataset associated with `SelectedChannel`.
- `CalSensitivity`, `NonLinear`, `ProportionalToExcitation`, and `ShowSensorCal` are derived from the `Cal` and `Sensor` records and must reflect their current state.
- `SelectedFilter` must be assignable to `IFilterClass` (no direct dependency on legacy `CFCFilter` per comment).
- `UseISOCodeFilterMapping` and `UseZeroForUnfiltered` control ISO code behavior *only when* a software filter is modified; they do not affect other fields.
---
### **Dependencies**
- **Internal Dependencies**:
- `DTS.Common.Base` — Provides `IBaseView`, `IBaseViewModel`, `IBaseModel`.
- `DTS.Common.Interface.Sensors` — Provides `ISensorDbRecord`, `ISensorCalDbRecord`.
- `DTS.Common.Interface.Sensors.SoftwareFilters` — Provides `IFilterClass`.
- `ITestChannel` — Referenced but not defined in these files; assumed to be defined elsewhere in `DTS.Common.Interface`.
- `T0Mode` — Enum type referenced but not defined here.
- `DataFlag` — Enum type referenced but not defined here.
- **Depended Upon By**:
- Concrete implementations of `ITestModificationView`, `ITestModificationViewModel`, and `ITestModificationModel` (e.g., WPF views, view models, and data models in the viewer module).
- Likely consumed by higher-level modules managing test channel editing workflows (e.g., main viewer, channel list, or calibration manager).
---
### **Gotchas**
- `IsModifiedLineFit` is the *only* `bool` property in `ITestModificationModel` with a public setter (`set`); all other `IsModified*` properties are read-only. This may indicate that line-fit modification state can be externally forced (e.g., reset), but usage is unclear without implementation context.
- `UpdateDatabaseMethod()` lacks parameterization; it likely operates on the current `SelectedChannel`, `Sensor`, and `Cal` state. Side effects (e.g., DB write, validation) are not documented beyond the XML comment.
- `UseZeroForUnfiltered` and `UseISOCodeFilterMapping` are *not* validated or enforced in the interface—behavior depends on implementation.
- No explicit error handling or exception contracts are defined (e.g., for `PublishChanges()` or `UpdateDatabaseMethod()`).
- `ValidateT0()`s validity criteria ("within the dataset") are underspecified: dataset bounds are not defined in the interface.
- None of the `IsModified*` flags are resettable via the interface—implementation may require external reset (e.g., after `PublishChanges()`).
- None identified from source alone.

View File

@@ -0,0 +1,54 @@
---
source_files:
- Common/DTS.Common/Interface/DTS.Viewer/TestModule/ITestModuleView.cs
- Common/DTS.Common/Interface/DTS.Viewer/TestModule/ITestModuleViewModel.cs
generated_at: "2026-04-16T03:06:43.064505+00:00"
model: "Qwen/Qwen3-Coder-Next-FP8"
schema_version: 1
sha256: "e731cfdd77fd98b8"
---
# TestModule
## 1. Purpose
This module defines the foundational view and view-model interfaces for a *Test Module* within the DTS Viewer subsystem. Its purpose is to establish a contract for test-related UI components—specifically, to enable the display and management of loaded .NET assemblies (e.g., for dynamic test discovery or execution). It extends the base view/view-model abstractions (`IBaseView`, `IBaseViewModel`) to provide a standardized structure for test module UIs, ensuring separation of concerns between presentation logic and data.
## 2. Public Interface
### `ITestModuleView`
```csharp
public interface ITestModuleView : IBaseView { }
```
- **Behavior**: A marker interface representing the *view* (UI layer) for the test module. It inherits from `IBaseView`, implying it adheres to the common view contract (e.g., lifecycle management, binding context), though the exact members of `IBaseView` are not visible here. No additional members are defined in this interface.
### `ITestModuleViewModel`
```csharp
public interface ITestModuleViewModel : IBaseViewModel
{
List<Assembly> AssemblyList { get; set; }
}
```
- **Behavior**: Represents the *view model* for the test module. It inherits from `IBaseViewModel`, implying standard view-model responsibilities (e.g., data binding, command handling). Its sole public member is `AssemblyList`, a mutable `List<Assembly>` property intended to hold the set of assemblies relevant to testing (e.g., test assemblies, dependencies). The property supports both read and write access, allowing replacement of the entire list.
## 3. Invariants
- `ITestModuleView` and `ITestModuleViewModel` must be used in conjunction (e.g., via MVVM binding), with `ITestModuleView` bound to an instance of `ITestModuleViewModel`.
- The `AssemblyList` property must be initialized to a non-null `List<Assembly>` before use (since it is a reference type with no default initialization in the interface).
- Assemblies in `AssemblyList` are expected to be *loaded* and *valid* (though the interface does not enforce this—consumers must handle `ReflectionTypeLoadException`, `BadImageFormatException`, etc., if applicable).
- No ordering guarantee is specified for `AssemblyList`; consumers must not assume any particular sequence unless enforced by the implementation.
## 4. Dependencies
- **Depends on**:
- `DTS.Common.Base.IBaseView` and `DTS.Common.Base.IBaseViewModel` (base abstractions for view/view-model).
- `System.Collections.Generic` (for `List<T>`).
- `System.Reflection` (for `Assembly`).
- **Depended on by**:
- Likely concrete implementations of test module views (e.g., WPF/WinForms controls) and view models (e.g., test assembly loader/view logic).
- The DTS Viewer subsystems composition or DI container (to resolve `ITestModuleView`/`ITestModuleViewModel` pairs).
*(Exact dependents are not inferable from this source alone.)*
## 5. Gotchas
- **No validation on `AssemblyList`**: The interface does not constrain the contents of `AssemblyList` (e.g., null assemblies, duplicate entries, non-test assemblies). Implementations must handle invalid entries.
- **Mutable property**: `AssemblyList` is a `set`table property, meaning external code can replace the entire list. This may cause unexpected UI updates if the view does not subscribe to change notifications (e.g., `INotifyPropertyChanged`—though not visible here, `IBaseViewModel` may or may not implement it).
- **No test-specific semantics**: Despite the name "TestModule", the interface provides no test-related functionality (e.g., test discovery, execution, filtering). All such behavior must reside in implementations.
- **Namespace quirk**: `// ReSharper disable CheckNamespace` suggests the namespace is intentionally `DTS.Common.Interface` (not nested under a `TestModule` sub-namespace), which may cause confusion in large solutions.
- **None identified from source alone.**

View File

@@ -0,0 +1,107 @@
---
source_files:
- Common/DTS.Common/Interface/DTS.Viewer/TestSummary/ITestSummaryListView.cs
- Common/DTS.Common/Interface/DTS.Viewer/TestSummary/ITestSummaryListViewModel.cs
- Common/DTS.Common/Interface/DTS.Viewer/TestSummary/ITestSummary.cs
generated_at: "2026-04-16T03:07:52.259971+00:00"
model: "Qwen/Qwen3-Coder-Next-FP8"
schema_version: 1
sha256: "710dfe38f0bd83ca"
---
# TestSummary
## Documentation: Test Summary List Module
### 1. Purpose
This module defines the interface contracts for a *Test Summary List* view and its associated view model in a test data viewer application. It enables the display and management of a list of test summaries (`ITestSummary`), supporting selection tracking (`SelectedTestSummaryList`), UI binding via `ObservableCollection`, and propagation of selection changes through the `PublishSelectedTestSummaryList()` method. It serves as the data and presentation layer abstraction for a list-based UI component (e.g., a grid or list view) that shows metadata about recorded tests, including setup name, channel count, timestamps, and associated graphs/channels.
---
### 2. Public Interface
#### `ITestSummaryListView`
- **Inherits**: `IBaseView`
- **Description**: A marker interface representing the view layer for the test summary list. No additional members defined; intended for dependency injection or view-model-to-view binding.
#### `ITestSummaryListViewModel`
- **Inherits**: `IBaseViewModel`
- **Properties**:
- `ITestSummaryListView View { get; }`
Gets the associated view instance.
- `ObservableCollection<ITestSummary> TestSummaryList { get; set; }`
The full list of test summaries displayed in the UI; observable for collection change notifications.
- `List<ITestSummary> SelectedTestSummaryList { get; set; }`
The subset of `TestSummaryList` items currently selected by the user. *Not* observable; changes must be explicitly published.
- **Methods**:
- `void PublishSelectedTestSummaryList()`
Triggers propagation of the current `SelectedTestSummaryList` to downstream consumers (e.g., via event or messaging).
- `void TestSummaryList_CollectionChanged(object sender, NotifyCollectionChangedEventArgs e)`
Handles `CollectionChanged` events for `TestSummaryList`, likely updating internal state (e.g., `SelectedTestSummaryList`) when items are added/removed/moved.
#### `ITestSummary`
- **Inherits**: `IBaseClass`
- **Properties**:
- `string Id { get; set; }`
Unique identifier for the test.
- `string SetupName { get; set; }`
Name of the test setup configuration.
- `string Description { get; set; }`
Human-readable description of the test.
- `int ChannelCount { get; set; }`
Number of physical channels recorded in the test.
- `DateTime FileDate { get; set; }`
Date the test file was created or last modified.
- `DateTime TimeStamp { get; set; }`
Timestamp of the test event (e.g., start time).
- `string DataType { get; set; }`
Type of data recorded (e.g., "Raw", "Processed").
- `bool IsSelected { get; set; }`
UI state flag indicating if this item is selected in the list.
- `List<ITestGraphs> Graphs { get; set; }`
List of graph definitions associated with this test.
- `List<ITestChannel> Channels { get; set; }`
List of physical channels in the test.
- `List<ITestChannel> CalculatedChannels { get; set; }`
List of derived/calculated channels.
- `IBaseViewModel Parent { get; set; }`
Reference to the parent view model in the hierarchy.
- `ITestMetadata TestMetadata { get; set; }`
Metadata object containing additional test details.
- `CalibrationBehaviors CalibrationBehavior { get; set; }`
Enumerated value indicating calibration behavior (from `DTS.Common.Enums.Sensors`).
---
### 3. Invariants
- `TestSummaryList` must be an `ObservableCollection<ITestSummary>` to support UI binding and change notifications.
- `SelectedTestSummaryList` is a plain `List<ITestSummary>`; selection state is *not* automatically synchronized with `TestSummaryList`. The caller must call `PublishSelectedTestSummaryList()` to propagate changes.
- `TestSummaryList_CollectionChanged` must be subscribed to `TestSummaryList.CollectionChanged` to maintain consistency between the full list and the selected list.
- `IsSelected` on individual `ITestSummary` instances reflects UI selection state but is *not* the source of truth for `SelectedTestSummaryList`; the latter is the authoritative list of selected items.
- `Parent` on `ITestSummary` must be non-null if the summary is part of a view model hierarchy (implied by `IBaseViewModel` inheritance).
---
### 4. Dependencies
#### This module depends on:
- `DTS.Common.Base` (for `IBaseView`, `IBaseViewModel`, `IBaseClass`)
- `System.Collections.Generic`, `System.Collections.ObjectModel`, `System.Collections.Specialized` (for collection types)
- `DTS.Common.Interface.TestDefinition` (for `ITestSummary`, `ITestGraphs`, `ITestChannel`, `ITestMetadata`)
- `DTS.Common.Enums.Sensors` (for `CalibrationBehaviors` enum)
#### This module is depended upon by:
- Likely concrete implementations of `ITestSummaryListView` (e.g., WPF `UserControl` or `Window`)
- View model implementations of `ITestSummaryListViewModel` (e.g., `TestSummaryListViewModel`)
- Any module responsible for publishing or consuming selected test summaries (e.g., analysis or reporting modules)
---
### 5. Gotchas
- `SelectedTestSummaryList` is a `List<T>`, not `ObservableCollection<T>`, meaning UI selection changes (e.g., via checkboxes) must manually update this list and call `PublishSelectedTestSummaryList()` to notify consumers.
- `TestSummaryList_CollectionChanged` is exposed as a public method but not declared as an event handler in the interface; callers must manually wire it to `TestSummaryList.CollectionChanged`.
- `IsSelected` on `ITestSummary` is a *view-level* property (likely bound to UI controls) but does not drive `SelectedTestSummaryList`; relying on it as the source of truth for selection will cause inconsistencies.
- No documentation is provided for *when* `PublishSelectedTestSummaryList()` should be called (e.g., on selection change, on save, or manually). This behavior is implementation-specific.
- The relationship between `FileDate` and `TimeStamp` is ambiguous (e.g., which is more reliable for sorting?); no guidance is given.
- None of the `List<T>` properties (`Graphs`, `Channels`, `CalculatedChannels`) are initialized in the interface; implementations must ensure non-null initialization to avoid `NullReferenceException`.
- None identified from source alone.

View File

@@ -0,0 +1,66 @@
---
source_files:
- Common/DTS.Common/Interface/DTS.Viewer/ViewerSettings/IViewerSettingsView.cs
- Common/DTS.Common/Interface/DTS.Viewer/ViewerSettings/IViewerSettingsViewModel.cs
generated_at: "2026-04-16T03:07:33.846375+00:00"
model: "Qwen/Qwen3-Coder-Next-FP8"
schema_version: 1
sha256: "cbdae98784eb0e4b"
---
# ViewerSettings
## Documentation: Viewer Settings Module
### 1. Purpose
This module defines the foundational interfaces for the *Viewer Settings* feature, which manages user-configurable display and calibration behaviors within the DTS Viewer application. It implements the Model-View-ViewModel (MVVM) pattern to decouple UI presentation (`IViewerSettingsView`) from business logic and state (`IViewerSettingsViewModel`). The module exists to provide a standardized contract for implementing settings UI and logic related to sensor calibration behavior and overall viewer configuration visibility—enabling consistent behavior across different viewer implementations while maintaining separation of concerns.
### 2. Public Interface
#### `IViewerSettingsView`
- **Namespace**: `DTS.Common.Interface`
- **Inherits**: `IBaseView`
- **Description**: A view interface representing the UI layer for viewer settings. It has no additional members beyond those inherited from `IBaseView`, implying it serves as a marker or placeholder interface—actual UI implementation details are not defined here.
#### `IViewerSettingsViewModel`
- **Namespace**: `DTS.Common.Interface`
- **Inherits**: `IBaseViewModel`
- **Members**:
- `IViewerSettingsView View { get; set; }`
- Gets or sets the associated view instance (MVVM binding context).
- `IBaseViewModel Parent { get; set; }`
- Gets or sets the parent view model in the hierarchy (e.g., main settings or viewer root).
- `void PublishChanges();`
- Commits or propagates any pending configuration changes (e.g., to sensor calibration settings).
- `Visibility CalibrationBehaviorSettingVisibility { get; set; }`
- Controls the visibility of the calibration behavior setting control in the UI (read/write).
- `Visibility OverallSettingsVisibility { get; }`
- Controls the visibility of the overall settings section (read-only).
- `DisplayedCalibrationBehavior[] AvailableCalibrationBehaviors { get; }`
- Returns the list of supported calibration behavior options (e.g., `Auto`, `Manual`, `Disabled`).
- `DisplayedCalibrationBehavior CalibrationBehaviorSetting { get; set; }`
- Gets or sets the currently selected calibration behavior from `AvailableCalibrationBehaviors`.
> **Note**: `DisplayedCalibrationBehavior` is defined in `DTS.Common.Classes.Sensors` (imported via `using`), but its structure is not included in the provided source files.
### 3. Invariants
- `IViewerSettingsViewModel.View` must be assigned to a valid instance implementing `IViewerSettingsView` before UI interaction occurs (enforced by MVVM binding conventions, though not explicitly validated in the interface).
- `CalibrationBehaviorSetting` must be one of the values in `AvailableCalibrationBehaviors` at all times (assumed invariant; no validation logic is visible in the interface).
- `OverallSettingsVisibility` is read-only, implying its value is computed internally (e.g., based on feature flags or runtime conditions) and not externally modifiable.
- `PublishChanges()` is expected to be called explicitly to persist changes—no automatic persistence is implied by the interface.
### 4. Dependencies
- **Depends on**:
- `DTS.Common.Base` (provides `IBaseView`, `IBaseViewModel`).
- `System.Windows` (for `Visibility` type—indicating WPF UI usage).
- `DTS.Common.Classes.Sensors` (for `DisplayedCalibrationBehavior` type).
- **Depended on by**:
- Any concrete implementation of `IViewerSettingsView`/`IViewerSettingsViewModel` (e.g., WPF user controls and view models in the viewer project).
- Likely consumed by higher-level view models (via `Parent`) or a settings management service (not visible in source).
### 5. Gotchas
- **Ambiguity in `DisplayedCalibrationBehavior`**: Its definition (e.g., properties like `Name`, `Value`, or enum vs. class) is not included here—implementation details are critical for correctly populating `AvailableCalibrationBehaviors` and interpreting `CalibrationBehaviorSetting`.
- **No validation in interface**: The interface does not enforce that `CalibrationBehaviorSetting` is in `AvailableCalibrationBehaviors`; implementations must handle this (e.g., via setter validation or initialization logic).
- **`OverallSettingsVisibility` is read-only**: Developers may mistakenly attempt to set it directly—its value must be managed internally by the view model.
- **`PublishChanges()` semantics undefined**: The interface does not specify whether changes are persisted synchronously, to disk, or to a sensor configuration service—implementation-specific behavior.
- **`View` property is mutable**: While common in MVVM, allowing `set` on `View` may introduce risks if reassigned during the view models lifetime (e.g., during UI re-creation).