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,83 @@
---
source_files:
- Common/DTS.CommonCore/Interface/DTS.Viewer/CalculatedChannel/IAddCalculatedChannelView.cs
- Common/DTS.CommonCore/Interface/DTS.Viewer/CalculatedChannel/IAddCalculatedChannelViewModel.cs
generated_at: "2026-04-16T12:23:49.838372+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "720d768a9bb759bc"
---
# Documentation: IAddCalculatedChannelView & IAddCalculatedChannelViewModel
## 1. Purpose
This module defines the view and viewmodel interfaces for the "Add Calculated Channel" feature within a larger MVVM (Model-View-ViewModel) architecture. `IAddCalculatedChannelView` serves as a marker interface for the view component, while `IAddCalculatedChannelViewModel` defines the contract for the viewmodel, exposing commands and properties for managing calculated channel creation, ISO export settings, DTS encoding defaults, and search context regions.
---
## 2. Public Interface
### IAddCalculatedChannelView
**Declaration:**
```csharp
public interface IAddCalculatedChannelView : IBaseView { }
```
A marker interface extending `IBaseView`. Contains no members.
---
### IAddCalculatedChannelViewModel
**Declaration:**
```csharp
public interface IAddCalculatedChannelViewModel : IBaseViewModel
```
**Properties:**
| Name | Type | Access | Description |
|------|------|--------|-------------|
| `View` | `IBaseView` | get/set | The Search View associated with this viewmodel. |
| `Parent` | `IBaseViewModel` | get/set | Reference to the parent viewmodel in the hierarchy. |
| `IncludeGroupNameInISOExport` | `bool` | get/set | Controls whether group names are included in ISO export output. |
| `DefaultDTSEncoding` | `int` | get/set | The default DTS encoding value for calculated channels. |
| `AddCalculatedChannelCommand` | `ICommand` | get | Command to add a calculated channel. |
| `ContextSearchRegion` | `object` | get/set | Context object for the search region. |
**Methods:**
| Name | Return Type | Description |
|------|-------------|-------------|
| `PublishChanges()` | `void` | Publishes or commits pending changes. Behavior specifics not documented in source. |
---
## 3. Invariants
- `IAddCalculatedChannelView` must always be assignable to `IBaseView`.
- `IAddCalculatedChannelViewModel` must always be assignable to `IBaseViewModel`.
- `AddCalculatedChannelCommand` is read-only (getter only); it cannot be replaced after initialization, only executed.
- The presence of `Parent` property implies a hierarchical viewmodel structure that must be maintained.
---
## 4. Dependencies
**This module depends on:**
- `DTS.Common.Base` — Provides `IBaseView` and `IBaseViewModel` base interfaces.
- `System.Windows.Input` — Provides `ICommand` interface for the `AddCalculatedChannelCommand` property.
**Consumers:**
- Unknown from source alone. These interfaces are intended to be implemented by concrete view and viewmodel classes elsewhere in the codebase.
---
## 5. Gotchas
- **Namespace mismatch:** Both files include `// ReSharper disable CheckNamespace`, indicating the declared namespace (`DTS.Common.Interface`) may not match the folder structure (`Common/DTS.CommonCore/Interface/DTS.Viewer/CalculatedChannel/`). This could cause confusion when locating files or during refactoring.
- **Marker interface:** `IAddCalculatedChannelView` has no members and serves only as a type marker. Any view-specific behavior must come from `IBaseView` or be cast to a more specific type.
- **`ContextSearchRegion` type:** The property is typed as `object`, suggesting loose typing. The actual expected type and usage pattern is unclear from source alone.
- **`PublishChanges()` semantics:** The method name suggests an event-publishing or change-commit pattern, but the exact behavior (what changes are published, to whom, and when this should be called) is not documented in the source.

View File

@@ -0,0 +1,172 @@
---
source_files:
- Common/DTS.CommonCore/Interface/DTS.Viewer/ChartOptions/IChartOptionsView.cs
- Common/DTS.CommonCore/Interface/DTS.Viewer/ChartOptions/IChartOptionsViewModel.cs
- Common/DTS.CommonCore/Interface/DTS.Viewer/ChartOptions/IChartOptionsModel.cs
generated_at: "2026-04-16T12:25:32.635258+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "a0d576d041a71e53"
---
# Documentation: Chart Options Interfaces
## 1. Purpose
This module defines the contract for chart configuration and visualization options within the DTS system. It provides three interfaces (`IChartOptionsView`, `IChartOptionsViewModel`, `IChartOptionsModel`) that follow an MVVM (Model-View-ViewModel) pattern to manage chart display settings including axis scaling, cursors, unit types, filtering, and export functionality. These interfaces enable decoupled communication between UI components and business logic for chart rendering.
---
## 2. Public Interface
### IChartOptionsView
**Namespace:** `DTS.Common.Interface`
A marker interface extending `IBaseView` with no additional members.
```csharp
public interface IChartOptionsView : IBaseView { }
```
---
### IChartOptionsViewModel
**Namespace:** `DTS.Common.Interface`
Extends `IBaseViewModel` and coordinates between the view and model for chart options.
| Member | Type | Description |
|--------|------|-------------|
| `View` | `IBaseView` | Gets or sets the Search View. |
| `Parent` | `IBaseViewModel` | Gets or sets the parent view model. |
| `Model` | `IChartOptionsModel` | Gets or sets the associated chart options model. |
| `ContextSearchRegion` | `object` | Gets or sets a context search region object. |
**Methods:**
| Method | Signature | Description |
|--------|-----------|-------------|
| `PublishChanges` | `void PublishChanges()` | Publishes pending changes. |
| `ResetZoomMethod` | `void ResetZoomMethod()` | Resets the chart zoom. |
| `ResetTMethod` | `void ResetTMethod()` | Resets the time axis. |
| `SaveToPDFMethod` | `void SaveToPDFMethod()` | Saves the chart to PDF. |
| `ShowCusor` | `void ShowCusor(bool value)` | Shows or hides the cursor. |
| `ShowMinMaxCursor` | `void ShowMinMaxCursor(bool value)` | Shows or hides the min/max cursor. |
---
### IChartOptionsModel
**Namespace:** `DTS.Common.Interface`
Extends `IBaseModel` and holds all chart configuration state and commands.
**ADC/mV Display Properties:**
| Property | Type | Description |
|----------|------|-------------|
| `SupportsADC` | `bool` | True if all channels support ADC. |
| `SupportsMV` | `bool` | True if all channels support mV. |
| `DisplayingVolts` | `bool` | Indicates if current mV option is for Volts or mV. |
| `MVOrV` | `string` | Returns "mV" or "V" depending on `DisplayingVolts` value. |
**Y-Axis Properties:**
| Property | Type | Description |
|----------|------|-------------|
| `FullScaleValues` | `List<double>` | Available full scale values. |
| `SelectedFullScaleValue` | `double` | Currently selected full scale value. |
| `MinFixedY` | `double` | Minimum fixed Y value. |
| `MaxFixedY` | `double` | Maximum fixed Y value. |
| `LockedY` | `bool` | Indicates if Y-axis is locked. |
| `YRange` | `YRangeScaleEnum` | Y-axis range scale setting. |
| `UnitType` | `ChartUnitTypeEnum` | Chart unit type. |
| `UnitTypeDescription` | `string` | Description of the unit type (getter only). |
**Time Axis Properties:**
| Property | Type | Description |
|----------|------|-------------|
| `MinFixedT` | `double` | Minimum fixed T value. |
| `MaxFixedT` | `double` | Maximum fixed T value. |
| `LockedT` | `bool` | Indicates if T-axis is locked. |
| `TimeUnitType` | `TimeUnitTypeEnum` | Time unit type setting. |
**Cursor Properties:**
| Property | Type | Description |
|----------|------|-------------|
| `ShowCursor` | `bool` | Indicates if cursor is shown. |
| `CurrentCursorValues` | `string` | Current cursor values as string. |
| `IsCursorsAvailable` | `bool` | Indicates if cursors are available. |
**Filter Properties:**
| Property | Type | Description |
|----------|------|-------------|
| `Filter` | `FilterOptionEnum` | Filter option setting. |
| `SelectedFilter` | `IFilterClass` | Selected filter class instance. |
**Other Properties:**
| Property | Type | Description |
|----------|------|-------------|
| `Parent` | `IChartOptionsViewModel` | Parent view model reference. |
| `CanPublishChanges` | `bool` | Indicates if changes can be published. |
| `ReadData` | `bool` | Indicates if data should be read. |
| `IsDigitalChannel` | `bool` | Indicates if channel is digital. |
| `DecimateData` | `bool` | Indicates if data should be decimated. |
| `WidthPoints` | `long` | Width points value. |
**Commands:**
| Property | Type | Description |
|----------|------|-------------|
| `ResetZoomCommand` | `DelegateCommand` | Command to reset zoom. |
| `ResetTCommand` | `DelegateCommand` | Command to reset time axis. |
| `SaveToPDFCommand` | `DelegateCommand` | Command to save to PDF. |
---
## 3. Invariants
1. **Namespace Mismatch:** All three interfaces are declared in `DTS.Common.Interface` namespace, despite the file path suggesting `DTS.Viewer.ChartOptions`. The `// ReSharper disable CheckNamespace` directive indicates this is intentional.
2. **MVVM Hierarchy:**
- `IChartOptionsView` must implement `IBaseView`
- `IChartOptionsViewModel` must implement `IBaseViewModel`
- `IChartOptionsModel` must implement `IBaseModel`
3. **Parent-Child Relationships:**
- `IChartOptionsModel.Parent` must reference the `IChartOptionsViewModel` that owns it
- `IChartOptionsViewModel.Model` must reference the `IChartOptionsModel` it manages
4. **Unit Display Logic:** `MVOrV` property return value is determined by `DisplayingVolts` state.
5. **Command Availability:** The model exposes commands as `DelegateCommand` (Prism), implying they follow the `ICommand` pattern with execute/can-execute semantics.
---
## 4. Dependencies
### This module depends on:
- `DTS.Common.Base` - Provides `IBaseView`, `IBaseViewModel`, `IBaseModel`
- `DTS.Common.Enums.Viewer` - Provides `YRangeScaleEnum`, `ChartUnitTypeEnum`, `TimeUnitTypeEnum`, `FilterOptionEnum`
- `DTS.Common.Interface.Sensors.SoftwareFilters` - Provides `IFilterClass`
- `Microsoft.Practices.Prism.Commands` - Provides `DelegateCommand`
- `System.Collections.Generic` - Provides `List<T>`
- `System.Windows.Input` - Provides `ICommand` (indirectly via `DelegateCommand`)
### What depends on this module:
- **Unclear from source alone** - No consumers are shown in these files. Likely implementations exist in a viewer/charting module.
---
## 5. Gotchas
1. **Typo in Method Name:** `ShowCusor(bool value)` is misspelled (should be `ShowCursor`). This typo is part of the public API and must be used as-is.
2. **Namespace/Path Inconsistency:** Files are located in `Common/DTS.CommonCore/Interface/DTS.Viewer/ChartOptions/` but declare namespace `DTS.Common.Interface`. The ReSharper suppression confirms this is deliberate but may cause confusion during navigation.
3. **Command vs Method Duplication:** `IChartOptionsModel` exposes `ResetZoomCommand`, `ResetTCommand`, `SaveToPDFCommand` while `IChartOptionsViewModel` exposes corresponding methods `ResetZoomMethod()`, `ResetTMethod()`, `SaveToPDFMethod()`. The relationship between these is not documented in the source.
4. **Mixed Naming Conventions:** Some methods use `Method` suffix (e.g., `ResetZoomMethod`) while properties use `Command` suffix (e.g., `ResetZoomCommand`). The rationale is unclear from source alone.

View File

@@ -0,0 +1,67 @@
---
source_files:
- Common/DTS.CommonCore/Interface/DTS.Viewer/Filter/IFilterView.cs
- Common/DTS.CommonCore/Interface/DTS.Viewer/Filter/IFilterViewModel.cs
generated_at: "2026-04-16T12:24:10.338285+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "0d8966c24bd001af"
---
# Documentation: DTS.Common.Interface Filter Components
## 1. Purpose
This module defines the core interfaces for filter components within the DTS viewer system. It establishes a View-ViewModel contract for filter UI elements, following the MVVM (Model-View-ViewModel) pattern. The `IFilterView` and `IFilterViewModel` interfaces provide the abstraction layer that allows filter components to be integrated into the broader application architecture while maintaining separation between presentation and business logic.
---
## 2. Public Interface
### `IFilterView`
**Location:** `DTS.Common.Interface` namespace
**Inheritance:** `IBaseView`
A marker interface with no members. It extends `IBaseView` and serves to identify views that are specifically filter views within the type system.
---
### `IFilterViewModel`
**Location:** `DTS.Common.Interface` namespace
**Inheritance:** `IBaseViewModel`
| Property | Type | Accessor | Description |
|----------|------|----------|-------------|
| `View` | `IBaseView` | `get; set;` | Gets or sets the Search View associated with this filter view model. |
| `Parent` | `IBaseViewModel` | `get; set;` | Gets or sets the parent view model in the hierarchy. |
| `ContextSearchRegion` | `object` | `get; set;` | Gets or sets a context object for the search region. Purpose unclear from source alone. |
---
## 3. Invariants
- **Type Hierarchy:** `IFilterView` must always be assignable to `IBaseView`. `IFilterViewModel` must always be assignable to `IBaseViewModel`.
- **View Association:** The `View` property on `IFilterViewModel` is typed as `IBaseView` (not `IFilterView`), suggesting the view model may be associated with views broader than just filter views.
- **Parent-Child Relationship:** The `Parent` property establishes a hierarchical relationship between view models, though no validation or lifecycle management is defined at this interface level.
---
## 4. Dependencies
### This module depends on:
- `DTS.Common.Base` — Provides `IBaseView` and `IBaseViewModel` base interfaces
### What depends on this module:
- **Cannot be determined from source alone.** No imports or usages are visible in the provided files.
---
## 5. Gotchas
1. **Namespace suppression:** The file `IFilterViewModel.cs` contains a `// ReSharper disable CheckNamespace` directive, suggesting the declared namespace (`DTS.Common.Interface`) may not match the project's default namespace structure. This could indicate a historical refactoring or organizational inconsistency.
2. **Weakly-typed context:** The `ContextSearchRegion` property is typed as `object`, providing no compile-time type safety. Consumers must know the expected runtime type through external documentation or convention.
3. **Missing XML documentation:** Only the `View` property has XML documentation (`<summary>` comment). The `Parent` and `ContextSearchRegion` properties lack documentation, leaving their intended usage and semantics unclear.
4. **Marker interface with no contract:** `IFilterView` defines no members beyond inheriting `IBaseView`. Its purpose appears to be purely for type identification, but the specific behaviors or capabilities it signals are not documented in source.

View File

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

View File

@@ -0,0 +1,74 @@
---
source_files:
- Common/DTS.CommonCore/Interface/DTS.Viewer/Legend/ILegendView.cs
- Common/DTS.CommonCore/Interface/DTS.Viewer/Legend/ILegendViewModel.cs
generated_at: "2026-04-16T12:22:08.946405+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "fa541836d2cec79b"
---
# Documentation: ILegendView / ILegendViewModel
## 1. Purpose
This module defines the core interfaces for a Legend component within a Viewer system, following the MVVM (Model-View-ViewModel) architectural pattern. `ILegendView` represents the view abstraction for legend visualization, while `ILegendViewModel` defines the contract for its corresponding ViewModel, establishing the relationship between the two layers. These interfaces enable decoupled communication between the legend's presentation logic and its UI rendering.
---
## 2. Public Interface
### `ILegendView`
**Namespace:** `DTS.Common.Interface`
**Inherits:** `IBaseView`
A marker interface representing a legend view component. No members are defined beyond those inherited from `IBaseView`.
```csharp
public interface ILegendView : IBaseView { }
```
---
### `ILegendViewModel`
**Namespace:** `DTS.Common.Interface`
**Inherits:** `IBaseViewModel`
Defines the contract for a legend ViewModel with access to its associated view.
| Member | Type | Access | Description |
|--------|------|--------|-------------|
| `View` | `ILegendView` | `get` | Returns the associated `ILegendView` instance for this ViewModel. |
```csharp
public interface ILegendViewModel : IBaseViewModel
{
ILegendView View { get; }
}
```
---
## 3. Invariants
- `ILegendViewModel.View` must return a non-null `ILegendView` instance when accessed (implied by the contract, though nullability annotations are not present in the source).
- Both interfaces must maintain their inheritance from `IBaseView` and `IBaseViewModel` respectively, ensuring consistency with the broader view/viewmodel hierarchy.
- The `View` property on `ILegendViewModel` is read-only (getter only), suggesting the view association is established at construction or through internal mechanisms, not via public setters.
---
## 4. Dependencies
### This module depends on:
- `DTS.Common.Base` — Provides `IBaseView` and `IBaseViewModel` base interfaces from which these interfaces inherit.
### What depends on this module:
- **Cannot be determined from source alone.** Consumers would include concrete implementations of `ILegendView` and `ILegendViewModel`, as well as any components that render or interact with legend functionality.
---
## 5. Gotchas
- **Marker Interface:** `ILegendView` defines no members of its own. All functionality comes from `IBaseView`. Developers should consult `IBaseView` to understand available members.
- **Tight Coupling via Property:** The `ILegendViewModel.View` property creates a direct reference from the ViewModel to the View, which is a deviation from pure MVVM where ViewModels are typically view-agnostic. The rationale for this design choice is not documented in the source.
- **Missing Nullability Annotations:** The source lacks C# 8.0+ nullable reference type annotations, making it unclear whether `View` is guaranteed to be non-null.

View File

@@ -0,0 +1,143 @@
---
source_files:
- Common/DTS.CommonCore/Interface/DTS.Viewer/MainView/IMainView.cs
- Common/DTS.CommonCore/Interface/DTS.Viewer/MainView/IViewerMainView.cs
- Common/DTS.CommonCore/Interface/DTS.Viewer/MainView/IViewerMainViewGrid.cs
- Common/DTS.CommonCore/Interface/DTS.Viewer/MainView/IMainViewModel.cs
- Common/DTS.CommonCore/Interface/DTS.Viewer/MainView/IViewerMainViewModel.cs
generated_at: "2026-04-16T12:24:51.311433+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "95ec9f6198f586ac"
---
# Documentation: DTS.Common.Interface MainView Interfaces
## 1. Purpose
This module defines the core view and ViewModel interfaces for the main window of a DTS Viewer application. It establishes the contract for a modular, region-based UI layout using what appears to be a MVVM (Model-View-ViewModel) architecture. The interfaces support multiple UI regions (navigation, graphs, tests, legends, diagnostics, statistics, cursor, and property panels) and provide keyboard interaction handling, zoom control, and configuration management for a data visualization and analysis tool.
---
## 2. Public Interface
### View Interfaces
#### `IMainView`
```csharp
public interface IMainView : IBaseView { }
```
Marker interface for a main view component. Extends `IBaseView`. No members defined.
#### `IViewerMainView`
```csharp
public interface IViewerMainView : IBaseView { }
```
Marker interface for a viewer main view component. Extends `IBaseView`. No members defined.
#### `IViewerMainViewGrid`
```csharp
public interface IViewerMainViewGrid : IBaseView { }
```
Marker interface for a viewer main view grid component. Extends `IBaseView`. No members defined.
---
### ViewModel Interfaces
#### `IMainViewModel`
```csharp
public interface IMainViewModel : IBaseViewModel
```
| Member | Type | Access | Description |
|--------|------|--------|-------------|
| `View` | `IBaseView` | `get` | Gets the Main View instance |
| `ContextNavigationRegion` | `object` | `get; set` | Navigation region context |
| `ContextGraphRegion` | `object` | `get; set` | Graph region context |
| `ContextTestsRegion` | `object` | `get; set` | Tests region context |
| `ContextGraphsRegion` | `object` | `get; set` | Graphs region context |
| `ContextLegendRegion` | `object` | `get; set` | Legend region context |
| `ContextDiagRegion` | `object` | `get; set` | Diagnostics region context |
| `ContextStatsRegion` | `object` | `get; set` | Statistics region context |
| `ContextCursorRegion` | `object` | `get; set` | Cursor region context |
| `ContextPropertyRegion` | `object` | `get; set` | Property region context |
| `GetRegions()` | `List<FrameworkElement>` | method | Returns a list of all region FrameworkElements |
---
#### `IViewerMainViewModel`
```csharp
public interface IViewerMainViewModel : IBaseViewModel, ISelectedDataViewModel
```
| Member | Type | Access | Description |
|--------|------|--------|-------------|
| `View` | `IBaseView` | `get; set` | Gets or sets the Main View instance |
| `Standalone` | `bool` | `get; set` | Indicates if viewer is running in standalone mode |
| `ContextNavigationRegion` | `object` | `get; set` | Navigation region context |
| `ContextGraphRegion` | `object` | `get; set` | Graph region context |
| `ContextTestsRegion` | `object` | `get; set` | Tests region context |
| `ContextGraphsRegion` | `object` | `get; set` | Graphs region context |
| `ContextLegendRegion` | `object` | `get; set` | Legend region context |
| `ContextDiagRegion` | `object` | `get; set` | Diagnostics region context |
| `ContextStatsRegion` | `object` | `get; set` | Statistics region context |
| `ContextCursorRegion` | `object` | `get; set` | Cursor region context |
| `ContextPropertyRegion` | `object` | `get; set` | Property region context |
| `GetRegions()` | `List<FrameworkElement>` | method | Returns a list of all region FrameworkElements |
| `ConfigPath` | `string` | `get; set` | Path to configuration file |
| `DoesUserHaveEditPermission` | `bool` | `get; set` | User edit permission flag |
| `ZoomReset()` | `void` | method | Resets zoom to default state |
| `LeftKeyPress()` | `void` | method | Handles left arrow key press notification |
| `RightKeyPress()` | `void` | method | Handles right arrow key press notification |
| `ChannelCodeViewMode` | `Common.Enums.IsoViewMode` | `get; set` | Channel code view mode setting |
| `CalibrationBehaviorSetting` | `Common.Enums.Sensors.CalibrationBehaviors` | `get; set` | Calibration behavior configuration |
| `CalibrationBehaviorSettableInViewer` | `bool` | `get; set` | Whether calibration behavior can be set in viewer |
| `SettingsVisibility` | `Visibility` | `get` | Visibility state of settings UI |
---
## 3. Invariants
1. **Namespace Mismatch**: All interfaces are declared in namespace `DTS.Common.Interface` despite file paths suggesting `DTS.Viewer.MainView` sub-namespaces. The ReSharper disable comments indicate this is intentional.
2. **Region Context Types**: All `Context*Region` properties are typed as `object`, suggesting late binding or multiple possible region types. Implementations must handle assignment of appropriate region types.
3. **View Property Mutability**: `IMainViewModel.View` is read-only (`get`), while `IViewerMainViewModel.View` is read-write (`get; set`). Implementations must respect this difference.
4. **Inheritance Chain**:
- All view interfaces must implement `IBaseView`
- `IMainViewModel` must implement `IBaseViewModel`
- `IViewerMainViewModel` must implement both `IBaseViewModel` and `ISelectedDataViewModel`
5. **GetRegions() Contract**: Must return a non-null `List<FrameworkElement>` containing the UI regions.
---
## 4. Dependencies
### External Dependencies (Imports)
| Namespace | Usage |
|-----------|-------|
| `DTS.Common.Base` | `IBaseView`, `IBaseViewModel`, `ISelectedDataViewModel` base types |
| `System.Collections.Generic` | `List<T>` for `GetRegions()` return type |
| `System.Windows` | `FrameworkElement`, `Visibility` types |
| `Common.Enums` | `IsoViewMode` enum |
| `Common.Enums.Sensors` | `CalibrationBehaviors` enum |
### Downstream Dependencies
**Unclear from source alone** - These are interface definitions; concrete implementations and consumers are not present in the provided files.
---
## 5. Gotchas
1. **Namespace Inconsistency**: The file paths suggest namespaces like `DTS.Viewer.MainView`, but all interfaces are declared in `DTS.Common.Interface`. The `// ReSharper disable CheckNamespace` directives indicate this mismatch is known and suppressed. New developers should be aware that file location does not match declared namespace.
2. **View Property Asymmetry**: `IMainViewModel.View` is read-only while `IViewerMainViewModel.View` is read-write. This inconsistency could cause confusion when implementing or consuming these interfaces.
3. **Magic Object Types**: All region context properties use `object` type rather than specific region interfaces. The actual types expected/returned are unclear from the source alone.
4. **Duplicate Region Definitions**: Both `IMainViewModel` and `IViewerMainViewModel` define identical region properties. This suggests either parallel evolution or a design that could benefit from a shared base interface for region management.
5. **Partial Enum Paths**: The types `Common.Enums.IsoViewMode` and `Common.Enums.Sensors.CalibrationBehaviors` are referenced but their definitions are not provided, making their exact values and usage unclear from this source alone.

View File

@@ -0,0 +1,81 @@
---
source_files:
- Common/DTS.CommonCore/Interface/DTS.Viewer/Menu/IMenuView.cs
- Common/DTS.CommonCore/Interface/DTS.Viewer/Menu/IMenuViewModel.cs
generated_at: "2026-04-16T12:23:31.714436+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "f8804451d31ebe71"
---
# Documentation: DTS.Common.Interface Menu Module
## 1. Purpose
This module defines the core interfaces for the Menu component within the DTS Viewer application, following the MVVM (Model-View-ViewModel) architectural pattern. It establishes the contract between a menu view and its corresponding view model, enabling loose coupling and testability. The module serves as an abstraction layer that allows concrete implementations of menu UI components to vary independently from their presentation logic.
---
## 2. Public Interface
### `IMenuView`
**Namespace:** `DTS.Common.Interface`
**Inheritance:** `IBaseView`
An empty marker interface that defines the view contract for menu components. It inherits from `IBaseView` (defined in `DTS.Common.Base`), presumably providing common view-related functionality.
```csharp
public interface IMenuView : IBaseView { }
```
---
### `IMenuViewModel`
**Namespace:** `DTS.Common.Interface`
**Inheritance:** `IBaseViewModel`
Defines the contract for a menu view model, providing access to its associated view.
```csharp
public interface IMenuViewModel : IBaseViewModel
{
/// <summary>
/// Gets the Shell View.
/// </summary>
IMenuView View { get; }
}
```
| Member | Type | Accessor | Description |
|--------|------|----------|-------------|
| `View` | `IMenuView` | get-only | Returns the associated menu view instance |
---
## 3. Invariants
1. **Type Compatibility**: `IMenuView` instances must be assignable to `IBaseView`. `IMenuViewModel` instances must be assignable to `IBaseViewModel`.
2. **Non-null View**: The `View` property on any `IMenuViewModel` implementation should reasonably be expected to return a non-null `IMenuView` instance after initialization (inferred from typical MVVM patterns, though not explicitly enforced by the interface).
3. **Read-only View Reference**: The `View` property is get-only; implementations must not expose a public setter through this interface.
---
## 4. Dependencies
### This module depends on:
- **`DTS.Common.Base`** — Provides `IBaseView` and `IBaseViewModel` base interfaces that `IMenuView` and `IMenuViewModel` extend respectively.
### What depends on this module:
- **Unknown from source alone.** Concrete implementations of `IMenuView` and `IMenuViewModel` would exist elsewhere in the codebase, likely in presentation/UI layers.
---
## 5. Gotchas
1. **Misleading XML Documentation**: The XML comment on `IMenuViewModel.View` states "Gets the Shell View," but the return type is `IMenuView`, not a shell view interface. This appears to be a copy-paste error from another component (possibly a shell-related view model). The actual behavior returns a Menu View, not a Shell View.
2. **Marker Interface**: `IMenuView` is an empty interface with no members beyond what it inherits. Its purpose appears to be purely for type identification/categorization within the view hierarchy. The actual view behavior must come from `IBaseView`, whose members are not visible in the provided source.
3. **Tight Coupling via Property**: The `IMenuViewModel` interface exposes `IMenuView` directly as a property rather than through a more abstract mechanism. This creates a compile-time dependency on the view type, which is somewhat atypical for MVVM patterns where view models often avoid direct references to view abstractions.

View File

@@ -0,0 +1,62 @@
---
source_files:
- Common/DTS.CommonCore/Interface/DTS.Viewer/Navigation/INavigationView.cs
- Common/DTS.CommonCore/Interface/DTS.Viewer/Navigation/INavigationViewModel.cs
generated_at: "2026-04-16T12:23:10.877701+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "3183c8a5d454e0e2"
---
# Documentation: Navigation Interfaces
## 1. Purpose
This module defines the core navigation interfaces for the DTS viewer system, establishing a contract between navigation views and their associated view models. It follows the MVVM (Model-View-ViewModel) pattern, providing `INavigationView` as a marker interface for navigation view components and `INavigationViewModel` as the interface that exposes access to the navigation view. This abstraction layer allows for decoupled navigation components within the larger DTS.CommonCore framework.
---
## 2. Public Interface
### `INavigationView`
**Namespace:** `DTS.Common.Interface`
**Inheritance:** `IBaseView`
An empty marker interface extending `IBaseView`. It defines no members of its own; its purpose is to provide type identity for navigation view implementations within the view hierarchy.
---
### `INavigationViewModel`
**Namespace:** `DTS.Common.Interface`
**Inheritance:** `IBaseViewModel`
| Member | Type | Access | Description |
|--------|------|--------|-------------|
| `NavigationView` | `INavigationView` | `get` | Returns the associated navigation view instance. |
---
## 3. Invariants
- `INavigationView` must always inherit from `IBaseView`.
- `INavigationViewModel` must always inherit from `IBaseViewModel`.
- The `NavigationView` property on any `INavigationViewModel` implementation must return an object that implements `INavigationView`.
- The inheritance chain implies that any `INavigationView` or `INavigationViewModel` implementation must also satisfy the contracts of their respective base interfaces (`IBaseView`, `IBaseViewModel`).
---
## 4. Dependencies
### This module depends on:
- `DTS.Common.Base` — provides `IBaseView` and `IBaseViewModel` base interfaces.
### What depends on this module:
- **Cannot be determined from source alone.** No downstream consumers are visible in the provided files.
---
## 5. Gotchas
1. **Documentation mismatch:** The XML summary comment for `INavigationViewModel.NavigationView` states "Gets the Shell View," but the property is named `NavigationView`. It is unclear whether this is a copy-paste error in documentation, a historical naming remnant, or if "Shell View" and "Navigation View" are intended to be synonymous in this context.
2. **Empty interface design:** `INavigationView` defines no members and serves only as a marker interface. Developers implementing this interface must consult `IBaseView` to understand the actual required members, which are not visible in these source files.

View File

@@ -0,0 +1,236 @@
---
source_files:
- Common/DTS.CommonCore/Interface/DTS.Viewer/TestDefinition/ITestMetadata.cs
- Common/DTS.CommonCore/Interface/DTS.Viewer/TestDefinition/ITestGraphs.cs
- Common/DTS.CommonCore/Interface/DTS.Viewer/TestDefinition/ITestSetupMetadata.cs
- Common/DTS.CommonCore/Interface/DTS.Viewer/TestDefinition/ITestSummary.cs
- Common/DTS.CommonCore/Interface/DTS.Viewer/TestDefinition/ITestRunMetadata.cs
- Common/DTS.CommonCore/Interface/DTS.Viewer/TestDefinition/ITestModule.cs
- Common/DTS.CommonCore/Interface/DTS.Viewer/TestDefinition/ITestCalculatedChannel.cs
- Common/DTS.CommonCore/Interface/DTS.Viewer/TestDefinition/ITestChannel.cs
generated_at: "2026-04-16T12:25:55.415422+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "2ef74d227b33f018"
---
# Test Definition Interfaces Documentation
## 1. Purpose
This module defines the core data contract interfaces for test definition and metadata within the DTS (Data Test System) viewer application. It provides the abstraction layer for representing test runs, test setups, hardware modules, channels (both physical and calculated), and graph configurations. These interfaces model complex data acquisition scenarios including sensor configurations, calibration parameters, sample data statistics, and test execution metadata, enabling decoupling between data models and their consumers.
---
## 2. Public Interface
### ITestMetadata
Container interface aggregating test run and setup metadata.
| Member | Type | Description |
|--------|------|-------------|
| `TestRun` | `ITestRunMetadata` | Reference to test run metadata |
| `TestSetup` | `ITestSetupMetadata` | Reference to test setup metadata |
---
### ITestGraphs
Represents a graph configuration grouping channels for visualization.
| Member | Type | Description |
|--------|------|-------------|
| `Name` | `string` | Graph name identifier |
| `HardwareChannelName` | `string` | Associated hardware channel name |
| `ChannelIds` | `List<string>` | List of channel IDs belonging to this graph |
| `Channels` | `List<ITestChannel>` | List of resolved test channel objects |
---
### ITestSetupMetadata
Defines metadata for a test setup configuration.
| Member | Type | Description |
|--------|------|-------------|
| `SetupName` | `string` | Name of the test setup |
| `TimeStamp` | `DateTime` | Timestamp when setup was created/modified |
| `TestGraphs` | `List<ITestGraphs>` | Collection of graph configurations |
| `CalibrationBehavior` | `CalibrationBehaviors` | Calibration behavior setting (from `DTS.Common.Enums.Sensors`) |
---
### ITestSummary : IBaseClass
Provides summary information about a test for listing/display purposes.
| Member | Type | Description |
|--------|------|-------------|
| `Id` | `string` | Unique test identifier |
| `Name` | `string` | Test name |
| `Description` | `string` | Test description |
| `ChannelCount` | `int` | Total number of channels |
| `TestDate` | `DateTime` | Date the test was executed |
| `DataType` | `string` | Data type identifier |
| `IsSelected` | `bool` | Selection state for UI |
| `Graphs` | `List<ITestGraphs>` | Collection of graphs |
| `Channels` | `List<ITestChannel>` | Collection of physical channels |
| `CalculatedChannels` | `List<ITestChannel>` | Collection of calculated channels |
| `Parent` | `IBaseViewModel` | Reference to parent view model |
---
### ITestRunMetadata : INotifyPropertyChanged
Defines metadata for a single test run execution.
| Member | Type | Description |
|--------|------|-------------|
| `Name` | `string` | Run name |
| `Id` | `string` | Run identifier |
| `Description` | `string` | Run description |
| `InlineSerializedData` | `bool` | Whether data is serialized inline |
| `TestGuid` | `string` | Globally unique test identifier |
| `FaultFlags` | `int` | Bitmask of fault flags |
| `Software` | `string` | Software name used for acquisition |
| `SoftwareVersion` | `string` | Software version |
| `DataType` | `string` | Data type identifier |
| `FileDate` | `DateTime` | File creation/modification date |
| `FilePath` | `string` | Path to the data file |
| `Modules` | `List<ITestModule>` | Collection of hardware modules |
| `Channels` | `List<ITestChannel>` | Collection of channels |
| `CalculatedChannels` | `List<ITestChannel>` | Collection of calculated channels |
---
### ITestModule : INotifyPropertyChanged
Represents a hardware module used during test acquisition.
| Member | Type | Description |
|--------|------|-------------|
| `SerialNumber` | `string` | Module serial number |
| `BaseSerialNumber` | `string` | Base serial number |
| `AaFilterRateHz` | `int` | Anti-aliasing filter rate in Hz |
| `Number` | `int` | Module number |
| `NumberOfSamples` | `int` | Total samples recorded |
| `UnsubsampledNumberOfSamples` | `int` | Sample count before subsampling |
| `RequestedPostTriggerSeconds` | `double` | Requested post-trigger duration |
| `RequestedPreTriggerSeconds` | `double` | Requested pre-trigger duration |
| `PostTriggerSeconds` | `double` | Actual post-trigger duration |
| `PreTriggerSeconds` | `double` | Actual pre-trigger duration |
| `RecordingMode` | `string` | Recording mode identifier |
| `SampleRateHz` | `int` | Sample rate in Hz |
| `StartRecordSampleNumber` | `int` | Sample number at recording start |
| `NumberOfChannels` | `int` | Number of channels on module |
| `InlineSerializedData` | `bool` | Whether data is inline serialized |
| `StartRecordTimestampSec` | `int` | Recording start timestamp (seconds) |
| `StartRecordTimestampNanoSec` | `int` | Recording start timestamp (nanoseconds) |
| `TriggerTimestampSec` | `int` | Trigger timestamp (seconds) |
| `TriggerTimestampNanoSec` | `int` | Trigger timestamp (nanoseconds) |
| `TriggerSampleNumbers` | `List<ulong>` | List of trigger sample numbers |
| `PTPMasterSync` | `bool` | PTP master sync status |
| `TiltSensorAxisXDegreesPre` | `int` | Pre-test X-axis tilt in degrees |
| `TiltSensorAxisYDegreesPre` | `int` | Pre-test Y-axis tilt in degrees |
| `TiltSensorAxisZDegreesPre` | `int` | Pre-test Z-axis tilt in degrees |
| `TiltSensorAxisXDegreesPost` | `int` | Post-test X-axis tilt in degrees |
| `TiltSensorAxisYDegreesPost` | `int` | Post-test Y-axis tilt in degrees |
| `TiltSensorAxisZDegreesPost` | `int` | Post-test Z-axis tilt in degrees |
| `TemperatureLocation1Pre` through `TemperatureLocation4Pre` | `int` | Pre-test temperatures at 4 locations |
| `TemperatureLocation1Post` through `TemperatureLocation4Post` | `int` | Post-test temperatures at 4 locations |
| `Channels` | `List<ITestChannel>` | Collection of channels |
| `CalculatedChannels` | `List<ITestChannel>` | Collection of calculated channels |
---
### ITestCalculatedChannel : INotifyPropertyChanged
Defines a calculated/virtual channel derived from other channels.
| Member | Type | Description |
|--------|------|-------------|
| `SerialNumber` | `string` | Serial number |
| `ChannelId` | `string` | Channel identifier |
| `Description` | `string` | Channel description |
| `ChannelGroupName` | `string` | Group name for channel |
| `ChannelType` | `string` | Channel type identifier |
| `Number` | `int` | Channel number |
| `DigitalMultiplier` | `string` | Digital multiplier setting |
| `DigitalMode` | `string` | Digital mode setting |
| `Start` | `DateTime` | Start timestamp |
| `Bridge` | `string` | Bridge configuration |
| `BridgeResistanceOhms` | `int` | Bridge resistance in ohms |
| `ZeroPoint` | `double` | Zero point value |
| `ChannelDescriptionString` | `string` | Formatted description string |
| `ChannelName2` | `string` | Secondary channel name |
| `HardwareChannelName` | `string` | Hardware channel name |
| `DesiredRange` | `double` | Desired measurement range |
| `Sensitivity` | `double` | Sensitivity value |
| `SoftwareFilter` | `string` | Software filter configuration |
| `ProportionalToExcitation` | `bool` | Whether proportional to excitation |
| `IsInverted` | `bool` | Whether signal is inverted |
| `LinearizationFormula` | `string` | Linearization formula |
| `IsSubsampled` | `bool` | Whether channel is subsampled |
| `AbsoluteDisplayOrder` | `int` | Display order index |
| `LastCalibrationDate` | `DateTime` | Last calibration date |
| `SensorId` | `string` | Sensor identifier |
| `OffsetToleranceLowMv` | `int` | Low offset tolerance in mV |
| `OffsetToleranceHighMv` | `int` | High offset tolerance in mV |
| `DataFlag` | `int` | Data flag value |
| `ExcitationVoltage` | `int` | Excitation voltage |
| `Eu` | `string` | Engineering units |
| `CalSignalEnabled` | `bool` | Calibration signal enabled |
| `ShuntEnabled` | `bool` | Shunt enabled |
| `VoltageInsertionCheckEnabled` | `bool` | Voltage insertion check enabled |
| `RemoveOffset` | `bool` | Whether to remove offset |
| `ZeroMethod` | `string` | Zero method identifier |
| `ZeroAverageWindowBegin` | `double` | Zero averaging window start |
| `ZeroAverageWindowEnd` | `double` | Zero averaging window end |
| `InitialEu` | `int` | Initial engineering units |
| `InitialOffset` | `string` | Initial offset value |
| `UnsubsampledSampleRateHz` | `int` | Sample rate before subsampling |
| `MeasuredShuntDeflectionMv` | `double` | Measured shunt deflection in mV |
| `TargetShuntDeflectionMv` | `double` | Target shunt deflection in mV |
| `MeasuredExcitationVoltage` | `double` | Measured excitation voltage |
| `FactoryExcitationVoltage` | `double` | Factory excitation voltage |
| `TimeOfFirstSample` | `double` | Timestamp of first sample |
| `Multiplier` | `int` | Multiplier value |
| `UserOffsetEu` | `int` | User-defined offset in EU |
| `UnitConversion` | `int` | Unit conversion flag |
| `AtCapacity` | `bool` | Whether at capacity |
| `CapacityOutputIsBasedOn` | `int` | Capacity output reference |
| `SourceChannelNumber` | `string` | Source channel number |
| `SourceModuleNumber` | `string` | Source module number |
| `SourceModuleSerialNumber` | `string` | Source module serial number |
| `Calculation` | `string` | Calculation formula/expression |
| `SampleRateHz` | `int` | Sample rate in Hz |
| `SensitivityUnits` | `string` | Sensitivity units |
| `SensorCapacity` | `int` | Sensor capacity |
---
### ITestChannel : INotifyPropertyChanged
Represents a physical measurement channel with full configuration and statistics.
**Identity & Hierarchy:**
| Member | Type | Description |
|--------|------|-------------|
| `Group` | `string` | Group identifier |
| `SubGroup` | `string` | Sub-group identifier |
| `TestId` | `string` | Test identifier |
| `TestSetupName` | `string` | Parent test setup name |
| `ModuleSerialNumber` | `string` | Parent module serial number |
| `SerialNumber` | `string` | Channel serial number |
| `ChannelId` | `string` | Channel identifier |
| `ChannelDisplayName` | `string` | Display name |
| `Description` | `string` | Channel description |
| `ChannelGroupName` | `string` | Channel group name |
| `ChannelType` | `string` | Channel type |
| `Number` | `int` | Channel number |
| `ChannelNumber` | `int` | Channel number (alternate) |
| `ParentTestSetup` | `ITestSetupMetadata` | Reference to parent test setup |
| `ParentModule` | `ITestModule` | Reference to parent module |
| `Parent` | `IBaseViewModel` | Reference to parent view model |
**Graph Configuration:**
| Member | Type | Description |
|--------|------|-------------|
| `IsGraphChannel` | `bool` | Whether this is a graph channel |
| `GraphName` | `string` | Associated graph name |
| `ChannelColor` | `Color` | Display color for channel |
| `Xmax` | `double` | Maximum X value |
| `

View File

@@ -0,0 +1,149 @@
---
source_files:
- Common/DTS.CommonCore/Interface/DTS.Viewer/TestModification/ITestModificationView.cs
- Common/DTS.CommonCore/Interface/DTS.Viewer/TestModification/ITestModificationViewModel.cs
- Common/DTS.CommonCore/Interface/DTS.Viewer/TestModification/ITestModificationModel.cs
generated_at: "2026-04-16T12:22:54.326019+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "a5f27c5a375dc7b6"
---
# Documentation: Test Modification Module
## 1. Purpose
This module defines the contract for a Test Modification feature following the Model-View-ViewModel (MVVM) pattern. It provides interfaces for modifying test channel parameters—including description, EU multiplier/offset, T0 timing, line fit boundaries, sensitivity, software filters, and data flags—within a DTS data acquisition or sensor testing system. The module tracks modification state for each parameter and supports publishing changes back to the underlying data.
---
## 2. Public Interface
### `ITestModificationView`
**Namespace:** `DTS.Common.Interface`
A marker interface representing the view component for test modification.
```
public interface ITestModificationView : IBaseView { }
```
- Inherits from `IBaseView`
- Defines no additional members
---
### `ITestModificationViewModel`
**Namespace:** `DTS.Common.Interface`
The view model interface coordinating the test modification view and managing ISO code filter mapping behavior.
```
public interface ITestModificationViewModel : IBaseViewModel
```
**Properties:**
| Name | Type | Access | Description |
|------|------|--------|-------------|
| `View` | `ITestModificationView` | get/set | The associated view instance |
| `Parent` | `IBaseViewModel` | get/set | Reference to the parent view model |
| `UseISOCodeFilterMapping` | `bool` | get/set | Controls whether ISO code should be modified when software filter is modified |
| `UseZeroForUnfiltered` | `bool` | get/set | Controls whether '0' or 'P' is used when ISO code is modified due to software filter change |
**Methods:**
| Name | Return Type | Description |
|------|-------------|-------------|
| `PublishChanges()` | `void` | Publishes/commits the modifications |
---
### `ITestModificationModel`
**Namespace:** `DTS.Common.Interface`
The model interface holding test modification state for a selected channel.
```
public interface ITestModificationModel : IBaseModel
```
**Properties:**
| Name | Type | Access | Description |
|------|------|--------|-------------|
| `Parent` | `ITestModificationViewModel` | get/set | Reference to the parent view model |
| `SelectedChannel` | `ITestChannel` | get/set | The channel on which modifications are based |
| `Description` | `string` | get/set | The `ChannelDescriptionString` of the selected channel |
| `EuMultiplier` | `double` | get/set | EU multiplier of the selected channel |
| `EuOffset` | `double` | get/set | EU offset of the selected channel |
| `T0` | `double` | get/set | Current T0 offset in milliseconds |
| `T1` | `double` | get/set | Line fit start time in milliseconds |
| `T2` | `double` | get/set | Line fit end time in milliseconds |
| `Sensitivity` | `double` | get/set | Sensitivity of the selected channel |
| `SelectedFilter` | `IFilterClass` | get/set | Software filter for the selected class |
| `T0Mode` | `T0Mode` | get/set | T0 adjustment mode |
| `SelectedDataFlag` | `DataFlag` | get/set | Data flag for the selected channel |
| `IsModified` | `bool` | get | Indicates whether any values have changed from default |
| `IsModifiedDescription` | `bool` | get | Indicates whether the Description field has been modified |
| `IsModifiedEuMultiplier` | `bool` | get | Indicates whether EuMultiplier has been modified |
| `IsModifiedEuOffset` | `bool` | get | Indicates whether EU offset has been modified |
| `IsModifiedT0` | `bool` | get | Indicates whether T0 has been modified |
| `IsModifiedLineFit` | `bool` | get/set | Indicates whether T1 or T2 has been modified |
| `IsModifiedSensitivity` | `bool` | get | Indicates whether sensitivity has been modified |
| `IsModifiedFilter` | `bool` | get | Indicates whether filter has been modified |
| `IsModifiedDataFlag` | `bool` | get | Indicates whether DataFlag has been modified |
**Methods:**
| Name | Return Type | Description |
|------|-------------|-------------|
| `ValidateT0()` | `bool` | Returns `true` if T0 is valid (within the dataset), `false` otherwise |
---
## 3. Invariants
1. **Parent-Child Hierarchy:** `ITestModificationModel.Parent` must reference an `ITestModificationViewModel`, and `ITestModificationViewModel.Parent` must reference an `IBaseViewModel`, establishing a three-level hierarchy (Model → ViewModel → Parent ViewModel).
2. **Channel Selection Required:** `SelectedChannel` must be set before modification properties (`Description`, `EuMultiplier`, `EuOffset`, `T0`, `T1`, `T2`, `Sensitivity`, `SelectedFilter`, `SelectedDataFlag`) can meaningfully be accessed or modified—they represent values "of the selected channel."
3. **Modification Tracking Consistency:** Each `IsModified*` property should reflect the actual modification state of its corresponding value property. The aggregate `IsModified` property should be `true` if any individual `IsModified*` flag is `true`.
4. **T0 Validation:** `ValidateT0()` must be called to confirm T0 is within the dataset bounds before relying on the T0 value.
5. **Line Fit Ordering:** While not explicitly enforced in the interface, `T1` (line fit start) and `T2` (line fit end) are expected to represent a valid time range—unclear from source whether T1 < T2 is enforced.
---
## 4. Dependencies
### This module depends on:
- **`DTS.Common.Base`** — Provides base interfaces:
- `IBaseView`
- `IBaseViewModel`
- `IBaseModel`
- **`DTS.Common.Interface.Sensors.SoftwareFilters`** — Provides:
- `IFilterClass` (referenced in comment as replacement for `CFCFilter` per FB 13120)
### External types referenced (definitions not in source):
- `ITestChannel` — Type of `SelectedChannel`; location unknown
- `T0Mode` — Enum or type for T0 adjustment mode; location unknown
- `DataFlag` — Enum or type for channel data flags; location unknown
### Dependents:
- Cannot be determined from source alone. Concrete implementations of these interfaces would exist elsewhere in the codebase.
---
## 5. Gotchas
1. **Namespace Discrepancy:** The file path suggests namespace `DTS.Viewer.TestModification`, but the actual namespace declared is `DTS.Common.Interface`. The `// ReSharper disable CheckNamespace` directive indicates this mismatch is intentional/suppressed.
2. **Filter Type Change (FB 13120):** The comment indicates `IFilterClass` replaced `CFCFilter` as the type for `SelectedFilter`. Code referencing the old type may exist elsewhere in the codebase.
3. **ISO Code Filter Mapping Behavior:** The interaction between `UseISOCodeFilterMapping` and `UseZeroForUnfiltered` is not defined in these interfaces. The behavior for when ISO code is modified due to filter changes depends on implementation details not present here.
4. **IsModifiedLineFit is Read/Write:** Unlike other `IsModified*` properties which are read-only, `IsModifiedLineFit` has both getter and setter. The reason for this inconsistency is unclear from source alone.
5. **T0 Validation Not Automatic:** The interface provides `ValidateT0()` as an explicit method rather than automatic validation on set. Callers must remember to invoke it.

View File

@@ -0,0 +1,77 @@
---
source_files:
- Common/DTS.CommonCore/Interface/DTS.Viewer/TestModule/ITestModuleView.cs
- Common/DTS.CommonCore/Interface/DTS.Viewer/TestModule/ITestModuleViewModel.cs
generated_at: "2026-04-16T12:22:30.959477+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "43e7cc3a0d236351"
---
# Documentation: ITestModuleView & ITestModuleViewModel
## 1. Purpose
This module defines the view and view model interfaces for a Test Module component within an MVVM (Model-View-ViewModel) architecture. It establishes contracts for a test module view (`ITestModuleView`) and its corresponding view model (`ITestModuleViewModel`), with the view model specifically exposing a collection of assemblies for test management purposes. These interfaces enable decoupled communication between the presentation layer and business logic for test module functionality.
---
## 2. Public Interface
### `ITestModuleView`
**Signature:**
```csharp
public interface ITestModuleView : IBaseView { }
```
**Description:** A marker interface extending `IBaseView`. It defines no members of its own, serving purely as a type contract for test module view implementations.
---
### `ITestModuleViewModel`
**Signature:**
```csharp
public interface ITestModuleViewModel : IBaseViewModel
{
List<Assembly> AssemblyList { get; set; }
}
```
**Description:** An interface extending `IBaseViewModel` that defines the contract for a test module view model. Exposes a single property:
| Property | Type | Access | Description |
|----------|------|--------|-------------|
| `AssemblyList` | `List<Assembly>` | get; set; | A mutable list of .NET assemblies, presumably for test discovery or execution purposes. |
---
## 3. Invariants
- `ITestModuleView` must always implement `IBaseView`.
- `ITestModuleViewModel` must always implement `IBaseViewModel`.
- The `AssemblyList` property must be a mutable `List<Assembly>` (both getter and setter are required).
- The namespace `DTS.Common.Interface` is declared for both interfaces regardless of file location.
---
## 4. Dependencies
### This module depends on:
| Dependency | Usage |
|------------|-------|
| `DTS.Common.Base` | Provides `IBaseView` and `IBaseViewModel` base interfaces |
| `System.Collections.Generic` | Provides `List<T>` for the `AssemblyList` property |
| `System.Reflection` | Provides the `Assembly` type |
### What depends on this module:
**Cannot be determined from source alone.** Consumers would be concrete implementations of `ITestModuleView` and `ITestModuleViewModel`, as well as any code that depends on these abstractions (e.g., test runners, navigation services, or dependency injection containers).
---
## 5. Gotchas
- **Namespace mismatch with file path:** The declared namespace `DTS.Common.Interface` does not match the folder structure `Common/DTS.CommonCore/Interface/DTS.Viewer/TestModule/`. The `// ReSharper disable CheckNamespace` directive suppresses IDE warnings about this discrepancy, suggesting this may be intentional or a historical artifact.
- **Marker interface with no members:** `ITestModuleView` is an empty interface that only inherits from `IBaseView`. Its purpose beyond type identification is unclear from the source alone.
- **Mutable property on interface:** `AssemblyList` exposes both a getter and setter, implying implementations must support full replacement of the list, not just modification of its contents. The implications of this design choice (e.g., notification requirements, thread safety) are not documented in the source.

View File

@@ -0,0 +1,102 @@
---
source_files:
- Common/DTS.CommonCore/Interface/DTS.Viewer/TestSummary/ITestSummaryListView.cs
- Common/DTS.CommonCore/Interface/DTS.Viewer/TestSummary/ITestSummaryListViewModel.cs
- Common/DTS.CommonCore/Interface/DTS.Viewer/TestSummary/ITestSummary.cs
generated_at: "2026-04-16T12:23:26.707020+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "b60d1a2f75a9d685"
---
# Documentation: Test Summary List View Interfaces
## 1. Purpose
This module defines the core interfaces for a Test Summary List feature within an MVVM (Model-View-ViewModel) architecture. It provides contracts for displaying collections of test summaries, managing user selections, and representing individual test summary data including channels, graphs, and metadata. The module serves as the abstraction layer between the view and view model for test summary presentation.
---
## 2. Public Interface
### `ITestSummaryListView`
**Namespace:** `DTS.Common.Interface`
**Extends:** `IBaseView`
A marker interface representing the view component for the test summary list. No members are defined beyond the inherited `IBaseView`.
---
### `ITestSummaryListViewModel`
**Namespace:** `DTS.Common.Interface`
**Extends:** `IBaseViewModel`
| Member | Type | Description |
|--------|------|-------------|
| `View` | `ITestSummaryListView` (read-only) | Gets the Shell View associated with this view model. |
| `TestSummaryList` | `ObservableCollection<ITestSummary>` | Observable collection of test summaries bound to the view. Supports get/set. |
| `SelectedTestSummaryList` | `List<ITestSummary>` | List of currently selected test summaries. Supports get/set. |
| `PublishSelectedTestSummaryList()` | `void` | Publishes the selected test summary list (destination/consumers not specified in source). |
| `TestSummaryList_CollectionChanged(object sender, NotifyCollectionChangedEventArgs e)` | `void` | Event handler for collection change notifications on `TestSummaryList`. |
---
### `ITestSummary`
**Namespace:** `DTS.Common.Interface.TestDefinition`
**Extends:** `IBaseClass`
| Property | Type | Access |
|----------|------|--------|
| `Id` | `string` | get/set |
| `SetupName` | `string` | get/set |
| `Description` | `string` | get/set |
| `ChannelCount` | `int` | get/set |
| `FileDate` | `DateTime` | get/set |
| `TimeStamp` | `DateTime` | get/set |
| `DataType` | `string` | get/set |
| `IsSelected` | `bool` | get/set |
| `Graphs` | `List<ITestGraphs>` | get/set |
| `Channels` | `List<ITestChannel>` | get/set |
| `CalculatedChannels` | `List<ITestChannel>` | get/set |
| `Parent` | `IBaseViewModel` | get/set |
| `TestMetadata` | `ITestMetadata` | get/set |
| `CalibrationBehavior` | `CalibrationBehaviors` | get/set |
---
## 3. Invariants
- `ITestSummaryListView` must always be assignable to `IBaseView`.
- `ITestSummaryListViewModel` must always be assignable to `IBaseViewModel`.
- `ITestSummary` must always be assignable to `IBaseClass`.
- `TestSummaryList_CollectionChanged` is designed to handle `NotifyCollectionChangedEventArgs`, implying it expects to be wired to an `ObservableCollection<T>.CollectionChanged` event.
- The `Parent` property on `ITestSummary` suggests a hierarchical relationship where a test summary has a reference back to its containing view model.
---
## 4. Dependencies
### This module depends on:
- **`DTS.Common.Base`** — Provides `IBaseView`, `IBaseViewModel`, and `IBaseClass` base interfaces.
- **`DTS.Common.Enums.Sensors`** — Provides the `CalibrationBehaviors` enum used in `ITestSummary`.
- **`System.Collections.Generic`** — For `List<T>`.
- **`System.Collections.ObjectModel`** — For `ObservableCollection<T>`.
- **`System.Collections.Specialized`** — For `NotifyCollectionChangedEventArgs`.
- **`System`** — For `DateTime`.
### External types referenced but not defined in this module:
- `ITestGraphs` — Referenced in `ITestSummary.Graphs`; definition not provided in source.
- `ITestChannel` — Referenced in `ITestSummary.Channels` and `CalculatedChannels`; definition not provided in source.
- `ITestMetadata` — Referenced in `ITestSummary.TestMetadata`; definition not provided in source.
---
## 5. Gotchas
1. **Namespace/Directory Mismatch:** All three files contain `// ReSharper disable CheckNamespace` directives. The physical file path (`DTS.Viewer/TestSummary/`) does not match the declared namespace (`DTS.Common.Interface` or `DTS.Common.Interface.TestDefinition`). This suggests either a deliberate namespace flattening strategy or a historical refactoring that left files in their original locations.
2. **`TestSummaryList_CollectionChanged` Naming Convention:** The method name follows an event handler naming pattern but is defined as a regular interface method rather than being wired via an event subscription. The caller is responsible for connecting this handler to the `CollectionChanged` event of `TestSummaryList`.
3. **Unknown Publish Behavior:** The `PublishSelectedTestSummaryList()` method's implementation details (event aggregator, message bus, direct callback, etc.) are not specified in these interfaces. Consumers should consult the implementing class for the actual publish mechanism.
4. **Nullable Collections Not Specified:** The interfaces do not indicate whether `Graphs`, `Channels`, `CalculatedChannels`, or `TestMetadata` can be null. Implementers should document their null-handling strategy.

View File

@@ -0,0 +1,82 @@
---
source_files:
- Common/DTS.CommonCore/Interface/DTS.Viewer/ViewerSettings/IViewerSettingsView.cs
- Common/DTS.CommonCore/Interface/DTS.Viewer/ViewerSettings/IViewerSettingsViewModel.cs
generated_at: "2026-04-16T12:22:53.517734+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "aacb0b18894c95e6"
---
# Documentation: IViewerSettingsView & IViewerSettingsViewModel
## 1. Purpose
This module defines the contract for a Viewer Settings UI component following the MVVM (Model-View-ViewModel) pattern. `IViewerSettingsView` represents the view abstraction, while `IViewerSettingsViewModel` defines the presentation logic and state for configuring viewer-related settings, specifically calibration behavior options. These interfaces enable decoupled communication between the UI layer and business logic, allowing for testability and separation of concerns within the DTS viewer settings subsystem.
---
## 2. Public Interface
### IViewerSettingsView
**Namespace:** `DTS.Common.Interface`
```csharp
public interface IViewerSettingsView : IBaseView { }
```
A marker interface extending `IBaseView` with no additional members. Serves as a type contract for viewer settings views.
---
### IViewerSettingsViewModel
**Namespace:** `DTS.Common.Interface`
```csharp
public interface IViewerSettingsViewModel : IBaseViewModel
```
| Member | Type | Access | Description |
|--------|------|--------|-------------|
| `View` | `IViewerSettingsView` | get/set | Reference to the associated view instance. |
| `Parent` | `IBaseViewModel` | get/set | Reference to the parent view model in the hierarchy. |
| `PublishChanges()` | `void` | method | Publishes/commits current settings changes. Implementation behavior not specified in source. |
| `CalibrationBehaviorSettingVisibility` | `Visibility` | get/set | Controls visibility of the calibration behavior setting UI element. |
| `OverallSettingsVisibility` | `Visibility` | get | Read-only visibility state for overall settings panel. |
| `AvailableCalibrationBehaviors` | `DisplayedCalibrationBehavior[]` | get | Array of available calibration behavior options for selection. |
| `CalibrationBehaviorSetting` | `DisplayedCalibrationBehavior` | get/set | Currently selected calibration behavior setting. |
---
## 3. Invariants
- `IViewerSettingsView` must always be assignable to `IBaseView` (inheritance constraint).
- `IViewerSettingsViewModel` must always be assignable to `IBaseViewModel` (inheritance constraint).
- `AvailableCalibrationBehaviors` is read-only; consumers cannot replace the array reference, though the source does not specify whether the array contents are mutable.
- `OverallSettingsVisibility` is read-only; its value is determined internally by the implementing class.
**Unclear from source:**
- Whether `View` and `Parent` must be non-null at any point in the lifecycle.
- Whether `PublishChanges()` validates state before publishing or throws on invalid state.
- The relationship between `CalibrationBehaviorSettingVisibility` and `OverallSettingsVisibility`.
---
## 4. Dependencies
### This module depends on:
- `DTS.Common.Base` — for `IBaseView` and `IBaseViewModel` base interfaces
- `DTS.Common.Classes.Sensors` — for `DisplayedCalibrationBehavior` type
- `System.Windows` — for `Visibility` enumeration (WPF-specific)
### What depends on this module:
**Cannot be determined from source alone.** No consumers are shown in the provided files.
---
## 5. Gotchas
- **WPF Coupling:** The use of `System.Windows.Visibility` ties this interface to WPF. Porting to other UI frameworks would require abstraction changes.
- **Mutable Array Exposure:** `AvailableCalibrationBehaviors` returns an array (`DisplayedCalibrationBehavior[]`), not an immutable collection. If the implementing class does not defensively copy, callers could potentially modify array contents.
- **Setter on View Property:** The `View` property has a public setter, which may indicate the view can be swapped at runtime. Thread-safety implications are unclear from source.
- **PublishChanges Semantics:** The method name suggests a publish/subscribe or event-sourcing pattern, but the actual behavior (synchronous vs. asynchronous, error handling, side effects) is not specified in the interface.