init
This commit is contained in:
@@ -0,0 +1,84 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.CommonCore/Interface/DTS.Viewer/CalculatedChannel/IAddCalculatedChannelView.cs
|
||||
- Common/DTS.CommonCore/Interface/DTS.Viewer/CalculatedChannel/IAddCalculatedChannelViewModel.cs
|
||||
generated_at: "2026-04-16T02:33:14.120126+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "720d768a9bb759bc"
|
||||
---
|
||||
|
||||
# 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 new calculated channel* in the DTS Viewer application. It enables user interaction to configure and submit a new calculated channel definition, with support for grouping, encoding settings, and integration with a search region (likely for channel/channel-group discovery). The interfaces serve as decoupled abstractions between the view (UI layer) and view model (business logic layer), following the project’s base interface hierarchy (`IBaseView`, `IBaseViewModel`).
|
||||
|
||||
---
|
||||
|
||||
### 2. **Public Interface**
|
||||
|
||||
#### `IAddCalculatedChannelView`
|
||||
- **Type**: `interface`
|
||||
- **Inherits**: `IBaseView`
|
||||
- **Behavior**: Represents the *view* (e.g., XAML user control) for the add-calculated-channel dialog. No additional members beyond the base view contract are declared—implementation details are expected in the concrete view class.
|
||||
|
||||
#### `IAddCalculatedChannelViewModel`
|
||||
- **Type**: `interface`
|
||||
- **Inherits**: `IBaseViewModel`
|
||||
- **Members**:
|
||||
- `IBaseView View { get; set; }`
|
||||
Gets or sets the associated view instance (the concrete implementation of `IAddCalculatedChannelView`). Enables bidirectional linkage between view and view model.
|
||||
- `IBaseViewModel Parent { get; set; }`
|
||||
Gets or sets the parent view model (e.g., the main channel management view), allowing hierarchical navigation or coordination.
|
||||
- `void PublishChanges();`
|
||||
Commits or submits the current configuration (e.g., channel name, expression, group, encoding) to the underlying system or model. Likely triggers validation and persistence logic.
|
||||
- `bool IncludeGroupNameInISOExport { get; set; }`
|
||||
Gets or sets a flag indicating whether the group name should be included when exporting the calculated channel to ISO format (e.g., for interoperability or metadata preservation).
|
||||
- `int DefaultDTSEncoding { get; set; }`
|
||||
Gets or sets the default encoding (as an integer code, e.g., `0 = UTF8`, `1 = ASCII`, etc.) used for the new channel. Exact encoding semantics are defined elsewhere (e.g., in `DTS.Common.Base` or a related enum).
|
||||
- `ICommand AddCalculatedChannelCommand { get; }`
|
||||
Returns a command (e.g., bound to a “Save” button) that, when executed, invokes the logic to add the calculated channel (likely calls `PublishChanges()` internally).
|
||||
- `object ContextSearchRegion { get; set; }`
|
||||
Gets or sets a region/context object used for channel/channel-group search operations (e.g., a container or scope for search results). Type is `object`, suggesting flexibility but low type safety.
|
||||
|
||||
---
|
||||
|
||||
### 3. **Invariants**
|
||||
|
||||
- `View` and `Parent` must be non-null after initialization and before `PublishChanges()` is called (implied by typical MVVM patterns, though not explicitly enforced in the interface).
|
||||
- `AddCalculatedChannelCommand` must be non-null and executable (i.e., `CanExecute` returns `true` when the input is valid).
|
||||
- `DefaultDTSEncoding` must be a valid encoding identifier recognized by the DTS system (e.g., matching values in a known `DTSEncoding` enum or constant set).
|
||||
- `IncludeGroupNameInISOExport` must be respected during export operations (e.g., if `true`, group metadata must appear in the ISO output).
|
||||
- `ContextSearchRegion` must be compatible with the search logic used by the view (e.g., if the view expects a `SearchRegionContext`, assigning an incompatible type will cause runtime failure).
|
||||
|
||||
---
|
||||
|
||||
### 4. **Dependencies**
|
||||
|
||||
- **Internal Dependencies**:
|
||||
- `DTS.Common.Base.IBaseView` and `DTS.Common.Base.IBaseViewModel` — base interfaces for view/view model layers.
|
||||
- `System.Windows.Input.ICommand` — WPF command infrastructure.
|
||||
- **Inferred Consumers**:
|
||||
- A concrete implementation of `IAddCalculatedChannelView` (e.g., `AddCalculatedChannelView.xaml.cs`).
|
||||
- A concrete implementation of `IAddCalculatedChannelViewModel` (e.g., `AddCalculatedChannelViewModel`).
|
||||
- Likely used by a parent view model (e.g., `ChannelManagerViewModel`) that instantiates and hosts this dialog/view model.
|
||||
- **External Dependencies**:
|
||||
- WPF (via `ICommand` and likely XAML binding).
|
||||
- `DTS.Common.Base` assembly (for base interfaces).
|
||||
|
||||
---
|
||||
|
||||
### 5. **Gotchas**
|
||||
|
||||
- **Ambiguous `ContextSearchRegion` type**: The property is typed as `object`, making it unclear what concrete types are expected or supported. Consumers must rely on documentation or implementation details to avoid runtime type mismatches.
|
||||
- **No explicit validation or error reporting**: The interface does not define properties like `IsValid` or `ErrorMessage`, suggesting error handling may be implicit (e.g., via command `CanExecute` state or side effects of `PublishChanges()`).
|
||||
- **`DefaultDTSEncoding` is an `int`**: Using a raw integer instead of an enum or strongly-typed constant increases risk of invalid values (e.g., `-1`, `999`). Validation must occur at runtime.
|
||||
- **No cancellation support**: The interface lacks a `CancelCommand` or `IsCancellationRequested` flag—users may assume cancellation is possible, but it is not surfaced here.
|
||||
- **No documentation for `PublishChanges()` semantics**: It is unclear whether this method performs validation, throws exceptions on failure, or returns status. Implementation-specific behavior must be consulted.
|
||||
|
||||
*None identified beyond the above.*
|
||||
@@ -0,0 +1,107 @@
|
||||
---
|
||||
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-16T02:34:12.071463+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "a0d576d041a71e53"
|
||||
---
|
||||
|
||||
# ChartOptions
|
||||
|
||||
## Documentation Page: Chart Options Module
|
||||
|
||||
### 1. Purpose
|
||||
This module defines the core interfaces for the chart options UI layer in the DTS Viewer subsystem. It establishes the MVVM (Model-View-ViewModel) contract for configuring chart display parameters—such as timebase, voltage range, filtering, cursor visibility, and data export—within a charting context. The interfaces `IChartOptionsView`, `IChartOptionsViewModel`, and `IChartOptionsModel` collectively enable separation of concerns between UI presentation, state management, and business logic, supporting features like zoom/t-scale resets, PDF export, and dynamic unit display (e.g., V vs. mV).
|
||||
|
||||
---
|
||||
|
||||
### 2. Public Interface
|
||||
|
||||
#### `IChartOptionsView`
|
||||
- **Inherits**: `IBaseView`
|
||||
- **Description**: Marker interface for the view (UI) component of the chart options panel. No additional members beyond base view contract.
|
||||
|
||||
#### `IChartOptionsViewModel`
|
||||
- **Inherits**: `IBaseViewModel`
|
||||
- **Properties**:
|
||||
- `IBaseView View { get; set; }` – Reference 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 underlying data model.
|
||||
- `object ContextSearchRegion { get; set; }` – Context object for search/region operations (type not specified; likely used for interop or region selection).
|
||||
- **Methods**:
|
||||
- `void PublishChanges()` – Commits pending configuration changes (e.g., updated filters, scale, units).
|
||||
- `void ResetZoomMethod()` – Resets Y-axis zoom to default/full scale.
|
||||
- `void ResetTMethod()` – Resets T-axis (timebase) zoom/limits 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` instead of `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 measurements.
|
||||
- `bool DisplayingVolts { get; set; }` – True if units are displayed in Volts; false implies mV.
|
||||
- `string MVOrV { get; }` – Returns `"V"` or `"mV"` based on `DisplayingVolts`.
|
||||
- `List<double> FullScaleValues { get; set; }` – Available full-scale range options (e.g., [1, 5, 10] for Volts).
|
||||
- `double SelectedFullScaleValue { get; set; }` – Currently selected full-scale value.
|
||||
- `double MinFixedY { get; set; }` / `MaxFixedY { get; set; }` – Fixed Y-axis range limits.
|
||||
- `double MinFixedT { get; set; }` / `MaxFixedT { get; set; }` – Fixed T-axis (time) range limits.
|
||||
- `bool LockedT { get; set; }` – True if T-axis range is locked (immutable).
|
||||
- `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 current cursor positions (e.g., "t=1.23s, y=4.56mV").
|
||||
- `YRangeScaleEnum YRange { get; set; }` – Enumerated Y-axis scaling mode (e.g., Auto, Fixed, Full).
|
||||
- `ChartUnitTypeEnum UnitType { get; set; }` – Enumerated unit type for Y-axis (e.g., Voltage, Current).
|
||||
- `TimeUnitTypeEnum TimeUnitType { get; set; }` – Enumerated unit type for T-axis (e.g., Seconds, Milliseconds).
|
||||
- `string UnitTypeDescription { get; }` – Human-readable description of `UnitType` (e.g., "Voltage (mV)").
|
||||
- `FilterOptionEnum Filter { get; set; }` – Selected filter option (e.g., None, Lowpass, Highpass).
|
||||
- `IFilterClass SelectedFilter { get; set; }` – Concrete filter instance corresponding to `Filter`.
|
||||
- `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 live data acquisition is active.
|
||||
- `bool IsDigitalChannel { get; set; }` – True if the chart displays digital (logic) channel data.
|
||||
- `bool DecimateData { get; set; }` – True if data decimation is applied for performance.
|
||||
- `long WidthPoints { get; set; }` – Number of data points displayed horizontally (resolution).
|
||||
- **Commands (Prism `DelegateCommand`)**:
|
||||
- `DelegateCommand ResetZoomCommand { get; }` – Binds to `ResetZoomMethod()` (via ViewModel).
|
||||
- `DelegateCommand ResetTCommand { get; }` – Binds to `ResetTMethod()` (via ViewModel).
|
||||
- `DelegateCommand SaveToPDFCommand { get; }` – Binds to `SaveToPDFMethod()` (via ViewModel).
|
||||
- **Relationships**:
|
||||
- `IChartOptionsViewModel Parent { get; set; }` – Back-reference to the owning view model.
|
||||
|
||||
---
|
||||
|
||||
### 3. Invariants
|
||||
- `IChartOptionsModel.MVOrV` is derived from `DisplayingVolts` and must return `"V"` when `DisplayingVolts == true`, otherwise `"mV"`.
|
||||
- `IChartOptionsModel.UnitTypeDescription` is derived from `UnitType` and must reflect the current unit type’s human-readable form.
|
||||
- `IChartOptionsModel.Filter` and `SelectedFilter` must be kept in sync: setting `Filter` should update `SelectedFilter` to a corresponding `IFilterClass` instance.
|
||||
- `IChartOptionsModel.IsCursorsAvailable` must be `false` for digital channels (`IsDigitalChannel == true`), as cursors are typically analog-only.
|
||||
- `IChartOptionsModel.LockedT` and `LockedY` imply that `MinFixedT/MaxFixedT` and `MinFixedY/MaxFixedY` are immutable during the lock period.
|
||||
- `IChartOptionsViewModel.Model` must be non-null and consistent with `IChartOptionsModel.Parent`.
|
||||
|
||||
---
|
||||
|
||||
### 4. Dependencies
|
||||
- **Dependencies *of* this module**:
|
||||
- `DTS.Common.Base` (provides `IBaseView`, `IBaseViewModel`, `IBaseModel`).
|
||||
- `DTS.Common.Enums.Viewer` (provides `YRangeScaleEnum`, `ChartUnitTypeEnum`, `TimeUnitTypeEnum`).
|
||||
- `DTS.Common.Interface.Sensors.SoftwareFilters` (provides `IFilterClass`).
|
||||
- `Microsoft.Practices.Prism.Commands` (provides `DelegateCommand`).
|
||||
- **Dependencies *on* this module**:
|
||||
- Any charting UI component requiring configuration (e.g., `IChartView`/`IChartViewModel`) likely consumes `IChartOptionsViewModel` and/or `IChartOptionsModel`.
|
||||
- Data acquisition or rendering logic may depend on `IChartOptionsModel` properties (e.g., `DecimateData`, `ReadData`, `SelectedFilter`).
|
||||
|
||||
---
|
||||
|
||||
### 5. Gotchas
|
||||
- **Typo in method name**: `ShowCusor(bool)` (should be `ShowCursor`). This is consistent across the source and likely reflects legacy naming.
|
||||
- **Ambiguous `ContextSearchRegion`**: Type is `object` with no documentation—consumers must infer contract (e.g., likely expects a region object from a parent view model or chart control).
|
||||
- **`MVOrV` and `UnitTypeDescription` are read-only**: Their values are computed from other properties; direct assignment is impossible.
|
||||
- **`SelectedFilter` is of type `IFilterClass`**: Implementation must ensure the selected filter instance matches the `Filter` enum value (per comment: "FB 13120 Updated to use IFilterClass").
|
||||
- **No validation rules exposed**: `CanPublishChanges` is a boolean flag but its update logic (e.g., when it becomes `true`) is not defined in this interface.
|
||||
- **No thread-safety guarantees**: All methods/properties assume single-threaded access (common in WPF MVVM but not explicit here).
|
||||
- **None identified from source alone** for digital channel behavior beyond `IsCursorsAvailable`.
|
||||
@@ -0,0 +1,53 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.CommonCore/Interface/DTS.Viewer/Filter/IFilterView.cs
|
||||
- Common/DTS.CommonCore/Interface/DTS.Viewer/Filter/IFilterViewModel.cs
|
||||
generated_at: "2026-04-16T02:33:25.462939+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "0d8966c24bd001af"
|
||||
---
|
||||
|
||||
# Filter
|
||||
|
||||
## 1. Purpose
|
||||
This module defines foundational interfaces for the filtering subsystem within the DTS Viewer component. Specifically, `IFilterView` and `IFilterViewModel` establish the contract for a filter UI layer that adheres to the standard View/ViewModel pattern used across the DTS codebase. `IFilterView` represents the UI presentation layer (likely a control or window), while `IFilterViewModel` encapsulates the state and logic for filter operations—including search context and parent-child relationships—enabling separation of concerns and testability in the viewer’s filtering functionality.
|
||||
|
||||
## 2. Public Interface
|
||||
|
||||
### `IFilterView`
|
||||
- **Signature**: `public interface IFilterView : IBaseView`
|
||||
- **Behavior**: Represents the view (UI) component for the filter. Inherits from `IBaseView`, implying it participates in the base view hierarchy (e.g., supports initialization, lifecycle, or binding contracts defined in `DTS.Common.Base`). No additional members are declared—its purpose is purely to tag/filter-specific views within the type system.
|
||||
|
||||
### `IFilterViewModel`
|
||||
- **Signature**: `public interface IFilterViewModel : IBaseViewModel`
|
||||
- **Behavior**: Represents the ViewModel for the filter UI. Inherits from `IBaseViewModel`, implying it participates in the base ViewModel contract (e.g., property change notification, command handling). It exposes:
|
||||
- `View`: Gets or sets the associated `IBaseView` instance (the corresponding UI view).
|
||||
- `Parent`: Gets or sets the parent `IBaseViewModel` (enabling hierarchical navigation or context propagation).
|
||||
- `ContextSearchRegion`: Gets or sets an `object` representing the scope or region in which search/filter operations apply (e.g., a data container, grid, or document region).
|
||||
|
||||
## 3. Invariants
|
||||
- `IFilterView` must be implemented by classes that serve as the *view* for filter UI (e.g., a `UserControl` or window subclass).
|
||||
- `IFilterViewModel` must be implemented by classes that serve as the *ViewModel* for filter logic.
|
||||
- For any valid `IFilterViewModel` instance:
|
||||
- `View` must be non-null and assignable to an `IFilterView` (though not enforced by the interface itself—this is a *de facto* expectation).
|
||||
- `Parent` may be null (no constraint specified), but if non-null, must be an `IBaseViewModel`.
|
||||
- `ContextSearchRegion` may be null or any object; its semantics are application-specific (e.g., could be a `ICollectionView`, `IEnumerable`, or custom context object).
|
||||
- No ordering, initialization, or lifecycle guarantees are defined beyond those inherited from `IBaseViewModel`/`IBaseView`.
|
||||
|
||||
## 4. Dependencies
|
||||
- **Depends on**:
|
||||
- `DTS.Common.Base` (specifically `IBaseView` and `IBaseViewModel`).
|
||||
- **Depended upon by**:
|
||||
- *Not directly inferable from the source files alone*. However, given the naming and structure, implementations of `IFilterView`/`IFilterViewModel` are likely consumed by:
|
||||
- The DTS Viewer’s main shell or navigation system (to instantiate/filter UI regions).
|
||||
- DI containers or view-model factories (to resolve/filter-related components).
|
||||
- Other modules in `DTS.Common.Interface` (e.g., `IDocumentView`, `IViewerViewModel`) that integrate filtering.
|
||||
- **No external third-party dependencies** are evident from these files.
|
||||
|
||||
## 5. Gotchas
|
||||
- **Ambiguity in `ContextSearchRegion`**: Its type is `object`, with no documentation on expected concrete types or lifecycle (e.g., ownership, disposal). Consumers must infer or document expected usage (e.g., is it a `SearchContext`? A `FrameworkElement`? A `List<object>`?).
|
||||
- **No explicit binding contract**: While `IFilterView`/`IFilterViewModel` imply MVVM binding, the interface itself does not enforce or specify binding paths, command names, or event contracts (e.g., how search is triggered). This is likely handled by convention or base classes.
|
||||
- **Namespace quirk**: `IFilterViewModel` includes `// ReSharper disable CheckNamespace`, suggesting the namespace was intentionally preserved (possibly for legacy compatibility), but this does not affect runtime behavior.
|
||||
- **No versioning or extensibility hooks**: Interfaces are minimal and non-extensible (no methods/events beyond inherited base members). Adding new functionality would require breaking changes or new interfaces.
|
||||
- **None identified from source alone.**
|
||||
@@ -0,0 +1,126 @@
|
||||
---
|
||||
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-16T02:33:34.206978+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "99208da86b0faad5"
|
||||
---
|
||||
|
||||
# Graph View Module Documentation
|
||||
|
||||
## 1. Purpose
|
||||
This module defines the interface contracts for the graphing subsystem within the DTS Viewer, enabling separation of concerns between UI views and their corresponding view models in a MVVM pattern. It provides a structured set of interfaces for managing graph displays, channel selection, test data series, and property views—supporting both time-domain and frequency-domain (FFT/PSD) visualization of test data. The interfaces collectively enable modular UI composition where graph-related functionality (e.g., channel grouping, cursor tracking, report export) is decoupled from implementation details.
|
||||
|
||||
## 2. Public Interface
|
||||
|
||||
### Interfaces (View Layer)
|
||||
- **`IGraphMainView`**
|
||||
Represents the main graph tab view. Inherits `IBaseView`. No additional members defined.
|
||||
|
||||
- **`IGraphChannelView`**
|
||||
Represents the channel selection/view tab. Inherits `IBaseView`. No additional members defined.
|
||||
|
||||
- **`IGraphPropertyView`**
|
||||
Represents the property display tab. Inherits `IBaseView`. No additional members defined.
|
||||
|
||||
- **`ITestDataView`**
|
||||
Represents the test data tab. Inherits `IBaseView`. No additional members defined.
|
||||
|
||||
- **`ITestDataSeriesView`**
|
||||
Represents the view for a single test data series. Inherits `IBaseView`.
|
||||
- `bool SaveReportToPDF(string directory)` – Saves the series report to PDF in the specified directory.
|
||||
- `bool SaveReportToCSV(string directory)` – Saves the series report to CSV in the specified directory.
|
||||
|
||||
- **`IGraphView`**
|
||||
Represents the main graph display view. Inherits `IBaseView`.
|
||||
- *Commented-out method*: `void SetGraphs(ObservableCollection<ITestDataSeries> graphs);` — Not active in current interface.
|
||||
|
||||
### Interfaces (ViewModel Layer)
|
||||
- **`IGraphMainViewModel`**
|
||||
Manages the main graph view and channel/group selection logic. Inherits `IBaseViewModel`.
|
||||
- `IGraphMainView View { get; set; }`
|
||||
- `IBaseViewModel Parent { get; set; }`
|
||||
- `List<ITestChannel> LockedChannelList { get; set; }`
|
||||
- `List<ITestChannel> SelectedChannelList { get; set; }`
|
||||
- `string LockedGroupName { get; set; }`
|
||||
- `void PublishSelectedChannels()` – Commits selected channels for display.
|
||||
- `void AddSelectedChannel(ITestChannel channel)` – Adds a single channel to the selected list.
|
||||
- `void AddSelectedGroupChannels(string groupName, List<ITestChannel> channels)` – Adds a group of channels to the selected list.
|
||||
- `void AddLockedChannel(ITestChannel channel, bool isLocked)` – Adds a channel to the locked list; `isLocked` indicates lock status.
|
||||
- `void AddLockedGroupChannels(string testName, string groupName, List<ITestChannel> channels, bool isLocked)` – Adds a group of channels to the locked list.
|
||||
- `void GraphList_CollectionChanged(object sender, NotifyCollectionChangedEventArgs e)` – Handles collection change events for the graph list.
|
||||
|
||||
- **`IGraphChannelViewModel`**
|
||||
Manages channel selection and grouping for graphing. Inherits `IBaseViewModel`.
|
||||
- `IGraphChannelView View { get; }`
|
||||
- `ObservableCollection<ITestChannel> GraphChannelList { get; set; }`
|
||||
- `ObservableCollection<ITestChannel> SelectedGraphChannelList { get; set; }`
|
||||
- `TestChannel SelectedGraphChannel { get; set; }`
|
||||
|
||||
- **`IGraphPropertyViewModel`**
|
||||
Manages property view. Inherits `IBaseViewModel`.
|
||||
- `IGraphPropertyView View { get; }`
|
||||
|
||||
- **`IGraphViewModel`**
|
||||
Coordinates the main graph view and its data series view. Inherits `IBaseViewModel`.
|
||||
- `IGraphView View { get; }`
|
||||
- `ITestDataSeriesView DataSeriesView { get; set; }`
|
||||
|
||||
- **`ITestDataViewModel`**
|
||||
Manages a single test data series view. Inherits `IBaseViewModel`.
|
||||
- `ITestDataView View { get; set; }`
|
||||
- `ITestDataSeries Model { get; set; }`
|
||||
|
||||
- **`ITestDataSeriesViewModel`**
|
||||
Manages a single test data series view and cursor interaction. Inherits `IBaseViewModel`.
|
||||
- `ITestDataSeriesView View { get; set; }`
|
||||
- `ITestDataSeries Model { get; set; }`
|
||||
- `void MoveCursor(object sender, KeyEventArgs e)` – Handles cursor movement (e.g., keyboard navigation).
|
||||
- `string CurrentCursorValues { get; set; }` – Holds the current cursor position values (e.g., X/Y coordinates).
|
||||
|
||||
## 3. Invariants
|
||||
- All view interfaces (`IGraph*View`, `ITestData*View`) inherit `IBaseView`, implying a consistent base contract for UI components.
|
||||
- All view model interfaces (`IGraph*ViewModel`, `ITestData*ViewModel`) inherit `IBaseViewModel`, implying a consistent base contract for view models.
|
||||
- Each view model exposes a strongly-typed `View` property (e.g., `IGraphView`, `ITestDataSeriesView`)—ensuring one-to-one view/viewmodel pairing.
|
||||
- `ITestDataSeries` implements metadata properties (e.g., `TestGroup`, `ChannelName`, `EngineeringUnits`) and computed statistics (`MinY`, `MaxY`, `AvgY`, `StdDevY`, `PeakFrequency`, `PeakMagnitude`, `GRMS`)—some conditional on `FFT` or `PSD` mode.
|
||||
- `ITestDataSeries.FFT` indicates whether the series is frequency-domain data; `PeakFrequency` and `PeakMagnitude` are only populated when `FFT == true`.
|
||||
- `ITestDataSeries.HIC` is a boolean flag; `HICValue` is a string (likely formatted value).
|
||||
- `ITestDataSeries.GRMS` is only calculated in PSD results graphs (per documentation).
|
||||
- `ITestDataSeries.Description`, `SensorSNDisplay`, `MinY`, `MaxY`, `AvgY`, `StdDevY`, `T1Time`, `T2Time`, `RecordingMode` are read-only (`get;` only).
|
||||
- `ITestDataSeriesViewModel.MoveCursor` uses WPF’s `KeyEventArgs`, implying keyboard-based cursor interaction.
|
||||
|
||||
## 4. Dependencies
|
||||
### Internal Dependencies
|
||||
- **`DTS.Common.Base`** – All interfaces depend on `IBaseView` and `IBaseViewModel` from this namespace.
|
||||
- **`DTS.Common.Events`** – `ITestDataSeriesView` depends on this (though no event types are used in the provided snippet).
|
||||
- **`DTS.Common.Classes.Viewer.TestMetadata`** – `IGraphChannelViewModel` depends on `TestChannel` (imported from this namespace).
|
||||
- **`System.Collections.Generic`**, **`System.Collections.ObjectModel`**, **`System.Collections.Specialized`**, **`System.Windows.Input`**, **`System.Windows.Media`** – Used for collections, commands, and UI types.
|
||||
|
||||
### External Dependencies
|
||||
- **WPF** – Indicated by use of `KeyEventArgs`, `ObservableCollection<T>`, and `Brush`.
|
||||
- **Unknown types**: `ITestChannel`, `ITestDataSeries`, `TestChannel` — referenced but not defined in this module; must be defined elsewhere (likely in `DTS.Common.Classes.Viewer.TestMetadata` or similar).
|
||||
|
||||
## 5. Gotchas
|
||||
- **`IGraphView.SetGraphs(...)` is commented out** — The method signature exists only as a comment, suggesting incomplete or deprecated functionality. Do not assume this method is implemented or callable.
|
||||
- **`ITestDataSeries` metadata is mixed**: Some properties are read-only (`Description`, `SensorSNDisplay`, `MinY`, etc.), others are read-write (`TestGroup`, `ChannelName`, etc.). Ensure consumers respect mutability.
|
||||
- **`ITestDataSeriesViewModel.MoveCursor` uses WPF types** — This implies tight coupling to WPF; non-WPF UI implementations may require adaptation or stubbing.
|
||||
- **`ITestDataSeriesViewModel.CurrentCursorValues` is a string** — Its format is not specified; consumers must agree on parsing/formatting (e.g., `"X: 1.23, Y: 4.56"`).
|
||||
- **`ITestDataSeriesViewModel.Model` is of type `ITestDataSeries`** — The interface name matches the model type, but the property is named `Model`, not `TestDataSeries`. Ensure consistency in naming.
|
||||
- **Namespace consistency via `// ReSharper disable CheckNamespace`** — Indicates intentional namespace alignment across files; do not assume additional namespace nesting.
|
||||
- **No explicit validation or error handling** — Interfaces do not define exception behavior or validation rules; these are likely implementation-specific.
|
||||
- **`ITestDataSeriesView.SaveReportToPDF` and `SaveReportToCSV` return `bool`** — Success/failure semantics are not documented; callers must infer meaning (e.g., `true` = success, `false` = failure or cancellation).
|
||||
- **`IGraphMainViewModel` uses `List<ITestChannel>` for locked/selected lists** — Not thread-safe; concurrent modifications may cause issues if not externally synchronized.
|
||||
- **`LockedGroupName` and `TestName` parameters in `AddLockedGroupChannels`** — Ambiguity: `testName` is used in locked group context but `groupName` is used elsewhere for grouping; ensure naming consistency across consumers.
|
||||
@@ -0,0 +1,41 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.CommonCore/Interface/DTS.Viewer/Legend/ILegendView.cs
|
||||
- Common/DTS.CommonCore/Interface/DTS.Viewer/Legend/ILegendViewModel.cs
|
||||
generated_at: "2026-04-16T02:32:30.081859+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "fa541836d2cec79b"
|
||||
---
|
||||
|
||||
# Legend
|
||||
|
||||
## 1. Purpose
|
||||
This module defines the foundational interfaces for a legend view component within the DTS viewer subsystem. It establishes a contract for separating view and view model concerns for legend UI elements, leveraging the existing `IBaseView` and `IBaseViewModel` base abstractions. The interfaces are minimal and serve as markers or contracts to ensure consistent architectural alignment with the broader DTS framework—likely part of a larger MVVM (Model-View-ViewModel) pattern implementation for visualization components.
|
||||
|
||||
## 2. Public Interface
|
||||
- **`ILegendView`**
|
||||
- *Signature*: `public interface ILegendView : IBaseView`
|
||||
- *Behavior*: Represents the view layer for a legend component. As it inherits `IBaseView`, it is expected to conform to the base view contract (e.g., lifecycle, binding context, or UI rendering responsibilities), though the exact details of `IBaseView` are not provided here. This interface itself carries no additional members.
|
||||
|
||||
- **`ILegendViewModel`**
|
||||
- *Signature*: `public interface ILegendViewModel : IBaseViewModel`
|
||||
- *Behavior*: Represents the view model for a legend component. It exposes a single read-only property `View` of type `ILegendView`, providing access to the associated view instance. As it inherits `IBaseViewModel`, it is expected to support standard view model responsibilities (e.g., data binding, command handling), though specifics depend on `IBaseViewModel`.
|
||||
|
||||
## 3. Invariants
|
||||
- `ILegendView` must be implemented by a concrete view class that adheres to the contract of `IBaseView`.
|
||||
- `ILegendViewModel` must be implemented by a concrete view model class that adheres to `IBaseViewModel` and ensures its `View` property returns a non-null instance of a type implementing `ILegendView`.
|
||||
- The `View` property in `ILegendViewModel` is expected to be set once (likely during initialization) and remain stable—though nullability is not explicitly constrained in the interface, its documentation ("Gets the Tab View") implies a required, non-optional association.
|
||||
|
||||
## 4. Dependencies
|
||||
- **Depends on**:
|
||||
- `DTS.Common.Base` namespace (specifically `IBaseView` and `IBaseViewModel`, though their definitions are external to this module).
|
||||
- **Depended on by**:
|
||||
- Concrete implementations of `ILegendView` and `ILegendViewModel` (not visible in source).
|
||||
- Likely consumed by higher-level viewer components (e.g., a main view or legend manager) that coordinate legend display—though no direct usage is visible in the provided files.
|
||||
|
||||
## 5. Gotchas
|
||||
- **Ambiguity in `IBaseView`/`IBaseViewModel` semantics**: The behavior and contract of the base interfaces (`IBaseView`, `IBaseViewModel`) are not defined here, so assumptions about lifecycle, threading, or binding behavior must be inferred from external context.
|
||||
- **No explicit initialization contract**: The `View` property in `ILegendViewModel` lacks documentation on when it must be set (e.g., constructor, setter-only, or via injection), potentially leading to runtime null reference issues if misused.
|
||||
- **Minimal surface area**: The interfaces are intentionally sparse—this may indicate they are placeholders for future extension or that legend-specific logic resides elsewhere (e.g., in a concrete implementation or a separate service).
|
||||
- **Namespace naming inconsistency**: The namespace `DTS.Common.Interface` (singular "Interface") may be a typo or legacy artifact; the project may also use `DTS.Common.Interfaces` elsewhere.
|
||||
@@ -0,0 +1,125 @@
|
||||
---
|
||||
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-16T02:33:47.869826+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "95ec9f6198f586ac"
|
||||
---
|
||||
|
||||
# MainView
|
||||
|
||||
## Documentation: Main View & ViewModel Interfaces (`DTS.Common.Interface`)
|
||||
|
||||
---
|
||||
|
||||
### 1. Purpose
|
||||
This module defines the core interfaces for the main view and view model layers of the DTS viewer application. It establishes a contract between the UI (views) and the presentation logic (view models), enabling separation of concerns and testability. The interfaces `IMainView`, `IViewerMainView`, and `IViewerMainViewGrid` represent distinct view roles, while `IMainViewModel` and `IViewerMainViewModel` encapsulate shared and viewer-specific presentation state and behavior—particularly around region management, navigation context, and user interaction (e.g., keyboard input, zoom, calibration settings). This module exists to standardize how the main application shell and viewer components interact with their view models, especially in contexts involving graphing, diagnostics, and test data.
|
||||
|
||||
---
|
||||
|
||||
### 2. Public Interface
|
||||
|
||||
#### Interfaces (all in `DTS.Common.Interface` namespace)
|
||||
|
||||
| Interface | Inheritance | Description |
|
||||
|----------|-------------|-------------|
|
||||
| `IMainView` | `IBaseView` | Marker interface for the main application view. No additional members defined. |
|
||||
| `IViewerMainView` | `IBaseView` | Marker interface for the viewer-specific main view. No additional members defined. |
|
||||
| `IViewerMainViewGrid` | `IBaseView` | Marker interface for a grid-based variant of the viewer main view. No additional members defined. |
|
||||
| `IMainViewModel` | `IBaseViewModel` | Base view model for the main application. Manages shared region contexts and exposes a read-only `View` reference. |
|
||||
| `IViewerMainViewModel` | `IBaseViewModel`, `ISelectedDataViewModel` | Extended view model for the viewer. Adds viewer-specific state (e.g., `Standalone`, `ConfigPath`, permissions), region context management, zoom/keyboard controls, and calibration/view-mode settings. |
|
||||
|
||||
##### `IMainViewModel` Members
|
||||
- `IBaseView View { get; }`
|
||||
Gets the associated main view instance.
|
||||
- `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; }`
|
||||
Gets or sets the region object for a named UI region (e.g., for Prism region injection). Each corresponds to a distinct visual area in the main view.
|
||||
- `List<FrameworkElement> GetRegions()`
|
||||
Returns a list of all region `FrameworkElement`s currently assigned to the view model’s context properties.
|
||||
|
||||
##### `IViewerMainViewModel` Members
|
||||
- `IBaseView View { get; set; }`
|
||||
Gets or sets the associated viewer main view instance. *(Note: Setter differs from `IMainViewModel`)*
|
||||
- `bool Standalone { get; set; }`
|
||||
Indicates whether the viewer is running in standalone mode.
|
||||
- `string ConfigPath { get; set; }`
|
||||
Path to the configuration file used by the viewer.
|
||||
- `bool DoesUserHaveEditPermission { get; set; }`
|
||||
Indicates whether the current user has edit permissions in the viewer.
|
||||
- `Common.Enums.IsoViewMode ChannelCodeViewMode { get; set; }`
|
||||
Gets or sets the view mode for channel code display (e.g., raw, decoded, etc.).
|
||||
- `Common.Enums.Sensors.CalibrationBehaviors CalibrationBehaviorSetting { get; set; }`
|
||||
Gets or sets the calibration behavior setting (e.g., auto, manual, disabled).
|
||||
- `bool CalibrationBehaviorSettableInViewer { get; set; }`
|
||||
Indicates whether the user can change `CalibrationBehaviorSetting` in the viewer UI.
|
||||
- `Visibility SettingsVisibility { get; }`
|
||||
Gets the visibility state of the settings panel (e.g., `Visible`, `Collapsed`).
|
||||
- `void ZoomReset()`
|
||||
Resets zoom level(s) in the viewer to default.
|
||||
- `void LeftKeyPress()`
|
||||
Notifies the view model that the left arrow key was pressed (e.g., for timeline navigation).
|
||||
- `void RightKeyPress()`
|
||||
Notifies the view model that the right arrow key was pressed.
|
||||
- `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; }`
|
||||
Identical to `IMainViewModel`; manages region contexts for viewer-specific UI areas.
|
||||
- `List<FrameworkElement> GetRegions()`
|
||||
Identical to `IMainViewModel`; returns all region `FrameworkElement`s.
|
||||
|
||||
---
|
||||
|
||||
### 3. Invariants
|
||||
- All view interfaces (`IMainView`, `IViewerMainView`, `IViewerMainViewGrid`) must be implemented by concrete WPF `View` classes (e.g., `UserControl` or `Window` subclasses).
|
||||
- All view model interfaces (`IMainViewModel`, `IViewerMainViewModel`) must be implemented by concrete view models that:
|
||||
- Implement `IBaseViewModel` (implied by inheritance).
|
||||
- Maintain non-null `View` references (for `IMainViewModel`) or allow `View` assignment (for `IViewerMainViewModel`).
|
||||
- Ensure `GetRegions()` returns a list containing exactly the `FrameworkElement`s assigned to the 9 `Context*Region` properties.
|
||||
- `IViewerMainViewModel` extends `ISelectedDataViewModel` (not shown here), implying it must also satisfy that interface’s contract (e.g., data selection state).
|
||||
- `Context*Region` properties are expected to hold region objects (e.g., Prism `IRegion` instances or `FrameworkElement` instances) used for UI composition.
|
||||
|
||||
---
|
||||
|
||||
### 4. Dependencies
|
||||
|
||||
#### Dependencies *of* this module:
|
||||
- `DTS.Common.Base` (provides `IBaseView`, `IBaseViewModel`, `ISelectedDataViewModel`).
|
||||
- `System.Windows` (for `FrameworkElement`, `Visibility`).
|
||||
- `System.Collections.Generic` (for `List<T>`).
|
||||
- `Common.Enums.IsoViewMode`, `Common.Enums.Sensors.CalibrationBehaviors`, `Visibility` (from `System.Windows`).
|
||||
|
||||
#### Dependencies *on* this module:
|
||||
- Any module implementing or consuming main/viewer views/view models (e.g., `DTS.Viewer`, `DTS.App`, or Prism region navigation logic).
|
||||
- Likely used by view model factories, region managers, or shell layout controllers to wire up UI components.
|
||||
|
||||
---
|
||||
|
||||
### 5. Gotchas
|
||||
- **Setter visibility mismatch**: `IMainViewModel.View` is read-only (`get;`), while `IViewerMainViewModel.View` is read-write (`get; set;`). This implies `IViewerMainViewModel` may support late view binding (e.g., for dynamic view swapping), whereas `IMainViewModel` assumes fixed view assignment.
|
||||
- **Region naming ambiguity**: The 9 `Context*Region` properties share identical signatures but no documentation on expected types or lifecycle. Consumers must infer semantics from naming (e.g., `ContextDiagRegion` → diagnostics panel).
|
||||
- **No explicit region validation**: `GetRegions()` returns `List<FrameworkElement>`, but there is no guarantee of uniqueness, ordering, or completeness. Implementations must ensure consistency with the `Context*Region` properties.
|
||||
- **Enum dependencies**: `ChannelCodeViewMode` and `CalibrationBehaviorSetting` depend on external enums (`Common.Enums.*`) not included in the source—behavior is undefined without those definitions.
|
||||
- **`Standalone` semantics unclear**: The `Standalone` property exists but its behavioral impact (e.g., feature toggling, UI simplification) is not documented here.
|
||||
- **Key press methods**: `LeftKeyPress()`/`RightKeyPress()` are named descriptively but provide no context (e.g., modifier keys, repeat count). Likely tied to specific timeline navigation behavior.
|
||||
- **No versioning or deprecation markers**: Interfaces are minimal and lack attributes (e.g., `[Obsolete]`) or versioning hints, making evolution tracking difficult.
|
||||
|
||||
None identified beyond the above.
|
||||
@@ -0,0 +1,44 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.CommonCore/Interface/DTS.Viewer/Menu/IMenuView.cs
|
||||
- Common/DTS.CommonCore/Interface/DTS.Viewer/Menu/IMenuViewModel.cs
|
||||
generated_at: "2026-04-16T02:32:59.510070+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "f8804451d31ebe71"
|
||||
---
|
||||
|
||||
# Menu
|
||||
|
||||
## 1. Purpose
|
||||
This module defines the core interfaces for the menu layer in the DTS Viewer component, establishing a contract between the view and view model following the MVVM (Model-View-ViewModel) pattern. It extends base abstractions (`IBaseView`, `IBaseViewModel`) to provide a minimal, focused interface hierarchy specifically for menu-related UI concerns—enabling separation of concerns, testability, and decoupled UI implementation while maintaining consistency with the broader codebase’s architectural patterns.
|
||||
|
||||
## 2. Public Interface
|
||||
- **`IMenuView`**
|
||||
*Signature:* `public interface IMenuView : IBaseView`
|
||||
*Behavior:* Represents the view layer for menu UI. It inherits from `IBaseView`, implying it adheres to the base view contract (e.g., lifecycle, binding context), but contains no additional members beyond inheritance. Its purpose is to serve as a typed marker interface for menu-specific views.
|
||||
|
||||
- **`IMenuViewModel`**
|
||||
*Signature:* `public interface IMenuViewModel : IBaseViewModel`
|
||||
*Behavior:* Represents the view model for menu logic. It exposes a single read-only property `View` of type `IMenuView`, providing access to the associated view instance. This enables the view model to interact with or query the view when necessary (e.g., for coordination, state synchronization, or view-specific operations), while still maintaining separation of concerns.
|
||||
|
||||
## 3. Invariants
|
||||
- `IMenuView` must be implemented by any concrete class serving as the menu UI view.
|
||||
- `IMenuViewModel` implementations must provide a non-null `View` property referencing an instance of a type that implements `IMenuView`.
|
||||
- The `View` property in `IMenuViewModel` is expected to be set during initialization and remain stable for the lifetime of the view model (though not explicitly enforced by the interface).
|
||||
- Both interfaces extend `IBaseView` and `IBaseViewModel` respectively, inheriting all invariants and contracts defined in those base interfaces (not shown here, but assumed to be part of the `DTS.Common.Base` namespace).
|
||||
|
||||
## 4. Dependencies
|
||||
- **Depends on:**
|
||||
- `DTS.Common.Base` (specifically `IBaseView` and `IBaseViewModel`)
|
||||
- **Depended on by (inferred):**
|
||||
- Concrete implementations of `IMenuView` (e.g., WPF/WinForms/Xamarin UI controls)
|
||||
- Concrete implementations of `IMenuViewModel` (e.g., menu logic classes)
|
||||
- Framework or DI containers that resolve menu-related view/view model pairs
|
||||
- Higher-level components (e.g., shell or navigation services) that coordinate menu UI with other parts of the viewer
|
||||
|
||||
## 5. Gotchas
|
||||
- The interfaces are intentionally minimal—`IMenuView` has no members beyond inheritance, and `IMenuViewModel` only exposes the `View` property. Developers should not expect built-in command, data binding, or event handling contracts here; those would be defined in derived interfaces or concrete classes.
|
||||
- The `View` property in `IMenuViewModel` is not initialized by the interface itself; implementations must ensure it is set (likely via constructor or property injection) to avoid `NullReferenceException` at runtime.
|
||||
- No guidance is provided on how view/view model pairing is established (e.g., via DI, factory, or manual wiring), which may lead to inconsistency across implementations.
|
||||
- None identified from source alone.
|
||||
@@ -0,0 +1,49 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.CommonCore/Interface/DTS.Viewer/Navigation/INavigationView.cs
|
||||
- Common/DTS.CommonCore/Interface/DTS.Viewer/Navigation/INavigationViewModel.cs
|
||||
generated_at: "2026-04-16T02:32:50.807752+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "3183c8a5d454e0e2"
|
||||
---
|
||||
|
||||
# Navigation
|
||||
|
||||
## 1. Purpose
|
||||
This module defines foundational interfaces for navigation-related view and view model components within the `DTS.Common.Interface` namespace. Specifically, it establishes `INavigationView` as a marker interface extending `IBaseView`, and `INavigationViewModel` as a view model interface that enforces a contract for accessing its associated shell view via the `NavigationView` property. These interfaces serve as abstractions to decouple navigation logic from concrete UI implementations, likely supporting MVVM (Model-View-ViewModel) patterns in a viewer application.
|
||||
|
||||
## 2. Public Interface
|
||||
|
||||
### `INavigationView`
|
||||
- **Signature**: `public interface INavigationView : IBaseView`
|
||||
- **Behavior**: A marker interface indicating that a concrete view class participates in the navigation system. It inherits from `IBaseView`, implying it adheres to the base view contract (e.g., lifecycle, data context, or rendering responsibilities defined elsewhere). No additional members are declared in this interface.
|
||||
|
||||
### `INavigationViewModel`
|
||||
- **Signature**: `public interface INavigationViewModel : IBaseViewModel`
|
||||
- **Behavior**: Extends `IBaseViewModel` and requires implementers to expose a read-only property `NavigationView` of type `INavigationView`. This property provides access to the *Shell View*—the top-level navigation container (e.g., a window or master layout) that hosts navigation content.
|
||||
- **Property**:
|
||||
- `INavigationView NavigationView { get; }`
|
||||
- **Purpose**: Retrieves the associated navigation shell view.
|
||||
- **Constraints**: Must not be `null` (implied by documentation and typical usage, though not explicitly stated in source).
|
||||
|
||||
## 3. Invariants
|
||||
- `INavigationView` must be implemented by a class that also satisfies `IBaseView` (inherited contract).
|
||||
- `INavigationViewModel` must be implemented by a class that also satisfies `IBaseViewModel` (inherited contract).
|
||||
- For any valid instance of `INavigationViewModel`, the `NavigationView` property must return a non-null reference to an object implementing `INavigationView`.
|
||||
- The `NavigationView` property is read-only; no setter is defined, implying the association is established at construction and immutable thereafter.
|
||||
|
||||
## 4. Dependencies
|
||||
- **Depends on**:
|
||||
- `DTS.Common.Base.IBaseView` (via `INavigationView`)
|
||||
- `DTS.Common.Base.IBaseViewModel` (via `INavigationViewModel`)
|
||||
- **Depended on by**:
|
||||
- *Not explicitly stated in the provided source*, but any concrete navigation view/view model implementations (e.g., `ShellView`, `ShellViewModel`) would depend on these interfaces.
|
||||
- Likely consumed by navigation infrastructure (e.g., a navigation service or router) to bind views and view models, though such consumers are not visible in this file.
|
||||
|
||||
## 5. Gotchas
|
||||
- **Ambiguity in "Shell View"**: The XML documentation states `NavigationView` "Gets the Shell View," but the term *Shell View* is not defined here. Its semantics (e.g., whether it is the root window, a navigation frame, or a specific UI container) are not clarified in the source and must be inferred from context or other modules.
|
||||
- **No validation guarantees**: While `NavigationView` is expected to be non-null, the interface does not enforce this via contracts or attributes (e.g., `[NotNull]`). Implementers must ensure null-safety.
|
||||
- **No navigation operations defined**: The interfaces themselves contain no methods for navigation (e.g., `NavigateTo`, `GoBack`). Navigation logic is likely handled by separate services or view model methods outside this scope.
|
||||
- **No versioning or extensibility hooks**: As minimal marker interfaces, future enhancements (e.g., adding lifecycle callbacks) would require breaking changes unless new interfaces are introduced.
|
||||
- **None identified from source alone.**
|
||||
@@ -0,0 +1,133 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.CommonCore/Interface/DTS.Viewer/Reports/PowerSpectralDensity/IPSDReportMainViewGrid.cs
|
||||
- Common/DTS.CommonCore/Interface/DTS.Viewer/Reports/PowerSpectralDensity/IPSDReportResultsView.cs
|
||||
- Common/DTS.CommonCore/Interface/DTS.Viewer/Reports/PowerSpectralDensity/IPSDReportSettingsView.cs
|
||||
- Common/DTS.CommonCore/Interface/DTS.Viewer/Reports/PowerSpectralDensity/IPSDReportMainView.cs
|
||||
- Common/DTS.CommonCore/Interface/DTS.Viewer/Reports/PowerSpectralDensity/IChannelGRMSSummary.cs
|
||||
- Common/DTS.CommonCore/Interface/DTS.Viewer/Reports/PowerSpectralDensity/IPSDReportSettingsViewModel.cs
|
||||
- Common/DTS.CommonCore/Interface/DTS.Viewer/Reports/PowerSpectralDensity/IPSDReportResultsViewModel.cs
|
||||
- Common/DTS.CommonCore/Interface/DTS.Viewer/Reports/PowerSpectralDensity/IPSDReportSettingsModel.cs
|
||||
- Common/DTS.CommonCore/Interface/DTS.Viewer/Reports/PowerSpectralDensity/IPSDReportMainViewModel.cs
|
||||
generated_at: "2026-04-16T02:34:33.465391+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "51ec830c696b3994"
|
||||
---
|
||||
|
||||
# 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 application. It establishes contracts for views, view models, and models that support configuration of signal processing parameters (e.g., filtering, windowing), display of computed results (e.g., channel GRMS summaries), and main view orchestration. The interfaces follow a layered architecture (View → ViewModel → Model) aligned with Prism/MVVM patterns, enabling separation of concerns and testability. The module serves as the contract surface for implementing PSD-specific reporting features, including export capabilities and interactive navigation.
|
||||
|
||||
---
|
||||
|
||||
### 2. **Public Interface**
|
||||
|
||||
#### **Interfaces (View Layer)**
|
||||
- `IPSDReportMainView : IBaseView`
|
||||
Marker interface for the main view container of the PSD report UI.
|
||||
|
||||
- `IPSDReportMainViewGrid : IBaseView`
|
||||
Marker interface for the grid-specific sub-view within the main PSD report view.
|
||||
|
||||
- `IPSDReportResultsView : IBaseView`
|
||||
Marker interface for the view responsible for displaying PSD analysis results.
|
||||
|
||||
- `IPSDReportSettingsView : IBaseView`
|
||||
Marker interface for the view used to configure PSD analysis settings.
|
||||
|
||||
#### **Interfaces (Model Layer)**
|
||||
- `IChannelGRMSSummary : IBaseClass`
|
||||
Represents a summary of GRMS (Gaussian Root Mean Square) for a single channel.
|
||||
- `string ChannelName { get; set; }`
|
||||
- `int SampleRate { get; set; }`
|
||||
- `double GRMS { get; set; }`
|
||||
|
||||
- `IPSDReportSettingsModel : IBaseModel`
|
||||
Encapsulates configurable parameters for PSD analysis.
|
||||
- `IPSDReportSettingsViewModel Parent { get; set; }`
|
||||
- `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`
|
||||
|
||||
#### **Interfaces (ViewModel Layer)**
|
||||
- `IPSDReportSettingsViewModel : IBaseViewModel`
|
||||
ViewModel for settings view.
|
||||
- `IBaseView View { get; set; }`
|
||||
- `IBaseViewModel Parent { get; set; }`
|
||||
- `IPSDReportSettingsModel Model { get; set; }`
|
||||
- `void PublishChanges()` — Commits pending setting changes.
|
||||
|
||||
- `IPSDReportResultsViewModel : IBaseViewModel`
|
||||
ViewModel for results view.
|
||||
- `IBaseView View { get; set; }`
|
||||
- `IBaseViewModel Parent { get; set; }`
|
||||
- `DelegateCommand ExportToPDFCommand { get; }`
|
||||
- `DelegateCommand ExportToCSVCommand { get; }`
|
||||
- `ObservableCollection<IChannelGRMSSummary> Results { get; set; }`
|
||||
|
||||
- `IPSDReportMainViewModel : IBaseViewModel, ISelectedDataViewModel`
|
||||
Orchestrates the entire PSD report view.
|
||||
- `IBaseView View { get; set; }`
|
||||
- `object ContextNavigationRegion`, `ContextGraphRegion`, `ContextTestsRegion`, `ContextGraphsRegion`, `ContextLegendRegion`, `ContextPropertyRegion { get; set; }`
|
||||
- `List<FrameworkElement> GetRegions()` — Returns UI regions for region management.
|
||||
- `string ConfigPath { get; set; }`
|
||||
- `bool DoesUserHaveEditPermission { get; set; }`
|
||||
- `void ZoomReset()`, `void LeftKeyPress()`, `void RightKeyPress()` — Navigation/interaction handlers.
|
||||
- `Common.Enums.IsoViewMode ChannelCodeViewMode { get; set; }`
|
||||
- `Common.Enums.Sensors.CalibrationBehaviors CalibrationBehaviorSetting { get; set; }`
|
||||
- `bool CalibrationBehaviorSettableInViewer { get; set; }`
|
||||
- `Visibility SettingsVisibility { get; }` — Read-only visibility state for settings panel.
|
||||
|
||||
---
|
||||
|
||||
### 3. **Invariants**
|
||||
|
||||
- All view interfaces (`IPSDReport*View`) inherit from `IBaseView`, implying they must conform to the base view contract (e.g., lifetime management, region registration).
|
||||
- All view model interfaces (`IPSDReport*ViewModel`) inherit from `IBaseViewModel`, implying they must support parent-child relationships and view binding.
|
||||
- All model interfaces (`IPSDReport*Model`) inherit from `IBaseModel`, implying they must support data binding and change notification.
|
||||
- `IPSDReportSettingsModel` properties are mutually consistent: e.g., filter enable flags must align with associated frequency/type/order properties.
|
||||
- `IPSDReportSettingsViewModel.PublishChanges()` must be called to persist changes to `IPSDReportSettingsModel`.
|
||||
- `IPSDReportResultsViewModel.Results` is an `ObservableCollection<IChannelGRMSSummary>`, implying UI binding to dynamic result lists.
|
||||
- `IPSDReportMainViewModel` implements `ISelectedDataViewModel`, implying it manages selected data context (e.g., test, channel, or time range).
|
||||
- `GetRegions()` must return a non-null list of `FrameworkElement`s corresponding to named regions used by the navigation or region manager.
|
||||
|
||||
---
|
||||
|
||||
### 4. **Dependencies**
|
||||
|
||||
#### **Internal Dependencies**
|
||||
- `DTS.Common.Base` — Base contracts (`IBaseView`, `IBaseViewModel`, `IBaseModel`, `IBaseClass`).
|
||||
- `DTS.Common.Enums.Viewer.Reports` — Enumerations: `PassFilterType`, `WindowWidth`, `WindowType`, `WindowAveragingType`.
|
||||
- `DTS.Common.Enums` — Additional enums: `IsoViewMode`, `Sensors.CalibrationBehaviors`.
|
||||
- `System.Collections.ObjectModel` — For `ObservableCollection<T>`.
|
||||
- `Microsoft.Practices.Prism.Commands` — For `DelegateCommand`.
|
||||
|
||||
#### **External Dependencies**
|
||||
- **Prism Library** — Used for command infrastructure (`DelegateCommand`).
|
||||
- **WPF** — `System.Windows.FrameworkElement` used in `GetRegions()`.
|
||||
|
||||
#### **Dependents**
|
||||
- Concrete implementations of these interfaces (e.g., `PSDReportMainView.xaml.cs`, `PSDReportSettingsViewModel.cs`) are expected to reside in the viewer module (`DTS.Viewer.*`) or reporting module.
|
||||
- Likely consumed by a main report controller or region manager to instantiate and wire views/view models.
|
||||
|
||||
---
|
||||
|
||||
### 5. **Gotchas**
|
||||
|
||||
- **No implementation details exposed**: All interfaces are empty markers except for `IChannelGRMSSummary`, `IPSDReportSettingsModel`, and the two view models — no logic, validation, or default behavior is defined here.
|
||||
- **Missing `Standalone` property**: `IPSDReportMainViewModel` has a commented-out `bool Standalone { get; set; }` — this may indicate incomplete or deprecated functionality.
|
||||
- **Ambiguous region semantics**: `Context*Region` properties are typed as `object`; their expected usage (e.g., `RegionManager.RegisterViewWithRegion`) is not specified in the interface.
|
||||
- **No error handling or async patterns**: `PublishChanges()` and `GetRegions()` have no documented exceptions or async variants — callers may assume synchronous behavior.
|
||||
- **Enum dependencies not detailed**: Types like `PassFilterType`, `WindowWidth`, etc., are referenced but not defined here — their valid values and semantics must be verified in `DTS.Common.Enums.Viewer.Reports`.
|
||||
- **No documentation for `ReadData`, `DataStart`, `DataEnd` semantics**: It is unclear whether these represent time-domain indices, sample indices, or absolute timestamps.
|
||||
|
||||
None identified beyond the above.
|
||||
@@ -0,0 +1,150 @@
|
||||
---
|
||||
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-16T02:34:18.141479+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "2ef74d227b33f018"
|
||||
---
|
||||
|
||||
# Documentation: Test Definition Interfaces
|
||||
|
||||
## 1. Purpose
|
||||
|
||||
This module defines a set of interfaces that collectively model metadata and structural information for test data in the DTS (Data Transfer System) viewer. These interfaces (`ITestMetadata`, `ITestRunMetadata`, `ITestSetupMetadata`, `ITestSummary`, `ITestModule`, `ITestChannel`, `ITestCalculatedChannel`, `ITestGraphs`) provide a standardized contract for representing hierarchical test metadata—including run-level, setup-level, module-level, and channel-level details—enabling consistent data binding, serialization, and UI rendering across the viewer application. The interfaces are designed to support both raw and derived (calculated) channels, with rich metadata for calibration, configuration, and signal processing.
|
||||
|
||||
## 2. Public Interface
|
||||
|
||||
### `ITestMetadata`
|
||||
- **Namespace**: `DTS.Common.Interface.TestDefinition`
|
||||
- **Properties**:
|
||||
- `ITestRunMetadata TestRun { get; set; }` – Top-level metadata for a single test run.
|
||||
- `ITestSetupMetadata TestSetup { get; set; }` – Metadata describing the physical test setup (e.g., hardware configuration, timestamps).
|
||||
|
||||
### `ITestGraphs`
|
||||
- **Namespace**: `DTS.Common.Interface`
|
||||
- **Properties**:
|
||||
- `string Name { get; set; }` – Graph name.
|
||||
- `string HardwareChannelName { get; set; }` – Hardware channel name associated with the graph.
|
||||
- `List<string> ChannelIds { get; set; }` – List of channel IDs included in the graph.
|
||||
- `List<ITestChannel> Channels { get; set; }` – List of `ITestChannel` instances associated with the graph.
|
||||
|
||||
### `ITestSetupMetadata`
|
||||
- **Namespace**: `DTS.Common.Interface`
|
||||
- **Properties**:
|
||||
- `string SetupName { get; set; }` – Human-readable name of the setup.
|
||||
- `DateTime TimeStamp { get; set; }` – Timestamp when the setup was created/configured.
|
||||
- `List<ITestGraphs> TestGraphs { get; set; }` – Collection of graphs defined for this setup.
|
||||
- `CalibrationBehaviors CalibrationBehavior { get; set; }` – Enumerated calibration behavior settings (type defined in `DTS.Common.Enums.Sensors`).
|
||||
|
||||
### `ITestSummary`
|
||||
- **Namespace**: `DTS.Common.Interface.TestDefinition`
|
||||
- **Inherits**: `IBaseClass`
|
||||
- **Properties**:
|
||||
- `string Id { get; set; }`, `string Name { get; set; }`, `string Description { get; set; }` – Identifying and descriptive metadata.
|
||||
- `int ChannelCount { get; set; }` – Total number of channels.
|
||||
- `DateTime TestDate { get; set; }` – Date/time of the test.
|
||||
- `string DataType { get; set; }` – Type of data (e.g., “Raw”, “Processed”).
|
||||
- `bool IsSelected { get; set; }` – UI selection state.
|
||||
- `List<ITestGraphs> Graphs { get; set; }`, `List<ITestChannel> Channels { get; set; }`, `List<ITestChannel> CalculatedChannels { get; set; }` – Collections of graphs, raw channels, and calculated channels.
|
||||
- `IBaseViewModel Parent { get; set; }` – Parent view model for UI binding.
|
||||
|
||||
### `ITestRunMetadata`
|
||||
- **Namespace**: `DTS.Common.Interface`
|
||||
- **Inherits**: `INotifyPropertyChanged`
|
||||
- **Properties**:
|
||||
- `string Name`, `string Id`, `string Description` – Run-level identifiers and description.
|
||||
- `bool InlineSerializedData { get; set; }` – Indicates whether binary data is embedded inline.
|
||||
- `string TestGuid { get; set; }` – Unique GUID for the test.
|
||||
- `int FaultFlags { get; set; }` – Bitmask of fault conditions.
|
||||
- `string Software`, `string SoftwareVersion` – Software and version used during test.
|
||||
- `string DataType { get; set; }` – Data type (e.g., “Raw”, “Processed”).
|
||||
- `DateTime FileDate { get; set; }`, `string FilePath { get; set; }` – File timestamp and path.
|
||||
- `List<ITestModule> Modules { get; set; }`, `List<ITestChannel> Channels { get; set; }`, `List<ITestChannel> CalculatedChannels { get; set; }` – Collections of modules, raw channels, and calculated channels.
|
||||
|
||||
### `ITestModule`
|
||||
- **Namespace**: `DTS.Common.Interface`
|
||||
- **Inherits**: `INotifyPropertyChanged`
|
||||
- **Properties**:
|
||||
- `string SerialNumber`, `string BaseSerialNumber` – Module serial identifiers.
|
||||
- `int AaFilterRateHz { get; set; }` – Anti-aliasing filter rate.
|
||||
- `int Number { get; set; }`, `int NumberOfChannels { get; set; }` – Module number and channel count.
|
||||
- `int NumberOfSamples`, `int UnsubsampledNumberOfSamples` – Sample counts (subsampled/unsubsampled).
|
||||
- `double RequestedPostTriggerSeconds`, `double RequestedPreTriggerSeconds`, `double PostTriggerSeconds`, `double PreTriggerSeconds` – Trigger timing parameters.
|
||||
- `string RecordingMode { get; set; }` – e.g., “Continuous”, “Triggered”.
|
||||
- `int SampleRateHz { get; set; }` – Actual sample rate.
|
||||
- `int StartRecordSampleNumber { get; set; }` – Sample index where recording started.
|
||||
- `int StartRecordTimestampSec`, `int StartRecordTimestampNanoSec` – Start timestamp (seconds + nanoseconds).
|
||||
- `int TriggerTimestampSec`, `int TriggerTimestampNanoSec` – Trigger timestamp.
|
||||
- `List<ulong> TriggerSampleNumbers { get; set; }` – Sample numbers where triggers occurred.
|
||||
- `bool PTPMasterSync { get; set; }` – Precision Time Protocol master sync status.
|
||||
- Tilt sensor angles (pre/post) for X/Y/Z axes (e.g., `TiltSensorAxisXDegreesPre`, `TiltSensorAxisZDegreesPost`).
|
||||
- Temperature readings (pre/post) for 4 locations (e.g., `TemperatureLocation1Pre`, `TemperatureLocation4Post`).
|
||||
- `List<ITestChannel> Channels { get; set; }`, `List<ITestChannel> CalculatedChannels { get; set; }` – Channels associated with this module.
|
||||
|
||||
### `ITestCalculatedChannel`
|
||||
- **Namespace**: `DTS.Common.Interface`
|
||||
- **Inherits**: `INotifyPropertyChanged`
|
||||
- **Properties**: (All properties are read-write unless otherwise noted)
|
||||
- `string SerialNumber`, `string ChannelId`, `string Description`, `string ChannelGroupName`, `string ChannelType`, `int Number`, `string DigitalMultiplier`, `string DigitalMode`, `DateTime Start`, `string Bridge`, `int BridgeResistanceOhms`, `double ZeroPoint`, `string ChannelDescriptionString`, `string ChannelName2`, `string HardwareChannelName`, `double DesiredRange`, `double Sensitivity`, `string SoftwareFilter`, `bool ProportionalToExcitation`, `bool IsInverted`, `string LinearizationFormula`, `bool IsSubsampled`, `int AbsoluteDisplayOrder`, `DateTime LastCalibrationDate`, `string SensorId`, `int OffsetToleranceLowMv`, `int OffsetToleranceHighMv`, `int DataFlag`, `int ExcitationVoltage`, `string Eu`, `bool CalSignalEnabled`, `bool ShuntEnabled`, `bool VoltageInsertionCheckEnabled`, `bool RemoveOffset`, `string ZeroMethod`, `double ZeroAverageWindowBegin`, `double ZeroAverageWindowEnd`, `int InitialEu`, `string InitialOffset`, `int UnsubsampledSampleRateHz`, `double MeasuredShuntDeflectionMv`, `double TargetShuntDeflectionMv`, `double MeasuredExcitationVoltage`, `double FactoryExcitationVoltage`, `double TimeOfFirstSample`, `int Multiplier`, `int UserOffsetEu`, `int UnitConversion`, `bool AtCapacity`, `int CapacityOutputIsBasedOn`, `string SourceChannelNumber`, `string SourceModuleNumber`, `string SourceModuleSerialNumber`, `string Calculation`, `int SampleRateHz`, `string SensitivityUnits`, `int SensorCapacity`.
|
||||
|
||||
### `ITestChannel`
|
||||
- **Namespace**: `DTS.Common.Interface`
|
||||
- **Inherits**: `INotifyPropertyChanged`
|
||||
- **Properties**:
|
||||
- **Identification & Context**:
|
||||
- `string Group`, `string SubGroup`, `string TestId`, `string TestSetupName`, `string ModuleSerialNumber`, `string SerialNumber`, `string ChannelId`, `string ChannelDisplayName`, `string Description`, `string IsoCode`, `string IsoChannelName`, `string UserCode`, `string UserChannelName`, `string ChannelGroupName`, `string ChannelType`, `bool IsCalculatedChannel`, `int Number`, `string DigitalMultiplier`, `string DigitalMode`, `DateTime Start`, `string Bridge`, `double BridgeResistanceOhms`, `double ZeroPoint`, `string ChannelDescriptionString`, `string ChannelName2`, `string HardwareChannelName`, `string ExcitationVoltage`, `string Eu`, `string SensitivityUnits`, `int SensorCapacity`, `string SensorPolarity`, `int ChannelNumber`, `string BinaryFileName`, `string BinaryFilePath`.
|
||||
- **Calibration & Configuration**:
|
||||
- `double DesiredRange`, `double ActualMaxRangeEu`, `double ActualMinRangeEu`, `double ActualMaxRangeAdc { get; }`, `double ActualMinRangeAdc { get; }`, `double ActualMaxRangeMv`, `double ActualMinRangeMv`, `double Sensitivity`, `string SoftwareFilter`, `bool ProportionalToExcitation`, `bool IsInverted`, `string LinearizationFormula`, `bool IsSubsampled`, `int AbsoluteDisplayOrder`, `DateTime LastCalibrationDate`, `string SensorId`, `int OffsetToleranceLowMv`, `int OffsetToleranceHighMv`, `int DataFlag`, `bool CalSignalEnabled`, `bool ShuntEnabled`, `bool VoltageInsertionCheckEnabled`, `bool RemoveOffset`, `string ZeroMethod`, `double ZeroAverageWindowBegin`, `double ZeroAverageWindowEnd`, `int InitialEu`, `string InitialOffset`, `int UnsubsampledSampleRateHz`, `double MeasuredShuntDeflectionMv`, `double TargetShuntDeflectionMv`, `double MeasuredExcitationVoltage`, `double FactoryExcitationVoltage`, `double TimeOfFirstSample`, `double Multiplier`, `double UserOffsetEu`, `int UnitConversion`, `bool AtCapacity`, `int CapacityOutputIsBasedOn`, `string SourceChannelNumber`, `string SourceModuleNumber`, `string SourceModuleSerialNumber`, `string Calculation`, `int SampleRateHz`.
|
||||
- **Statistics & Display**:
|
||||
- `double MinADC`, `double MaxADC`, `double AveADC`, `double StdDevADC`, `double T0ADC`, `double MinMV`, `double MaxMV`, `double AveMV`, `double StdDevMV`, `double T0MV`, `double MinEU`, `double MaxEU`, `double AveEU`, `double StdDevEU`, `double T0EU`, `double MinY`, `double MaxY`, `double AveY`, `double StdDevY`, `double T0Value`.
|
||||
- **UI & State**:
|
||||
- `string GraphName`, `bool IsGraphChannel`, `IBaseViewModel Parent`, `Color ChannelColor`, `string ErrorMessage`, `bool IsError`, `Color? ErrorColor`, `bool IsSelected`, `bool CanSelectChannel`, `bool IsLocked`, `bool CanLock`.
|
||||
- **Parent References**:
|
||||
- `ITestSetupMetadata ParentTestSetup { get; set; }`, `ITestModule ParentModule { get; set; }`.
|
||||
- **Methods**:
|
||||
- `void SetChannelDescriptionAndDisplayName(string channelDescriptionString)` – Updates `ChannelDescriptionString` and `ChannelDisplayName`.
|
||||
- `ITestChannel Copy()` – Returns a copy of the channel.
|
||||
- **Trigger/Timing**:
|
||||
- `ulong T1Sample { get; set; }`, `ulong T2Sample { get; set; }`, `double HIC { get; set; }`.
|
||||
- **EU Scaling**:
|
||||
- `bool UseEUScaler { get; set; }`, `double ScaleFactorEU { get; set; }`.
|
||||
|
||||
## 3. Invariants
|
||||
|
||||
- **Hierarchical Consistency**: `ITestRunMetadata` contains `Modules`, `Channels`, and `CalculatedChannels`. Each `ITestModule` contains its own `Channels` and `CalculatedChannels`. Each `ITestChannel` has `ParentModule` and `ParentTestSetup` references, implying a tree structure: `TestRun → Modules → Channels`.
|
||||
- **Channel Type Distinction**: `ITestChannel.IsCalculatedChannel` distinguishes raw vs. derived channels. `ITestSummary` and `ITestRunMetadata` maintain separate lists for `Channels` (raw) and `CalculatedChannels`.
|
||||
- **Metadata Completeness**: `ITestSetupMetadata.TestGraphs` and `ITestSummary.Graphs` contain `ITestGraphs` instances, each referencing a list of `ChannelIds` and `ITestChannel` instances. This implies that graphs are derived views over channel collections.
|
||||
- **Timestamps**: All `DateTime` fields (e.g., `TimeStamp`, `FileDate`, `Start`, `LastCalibrationDate`) are expected to be non-null and represent UTC or local time consistently (source does not specify, so assume caller must enforce).
|
||||
- **INotifyPropertyChanged**: All interfaces (`ITestRunMetadata`, `ITestModule`, `ITestChannel`, `ITestCalculatedChannel`) implement `INotifyPropertyChanged`, indicating they are intended for data binding and must raise change notifications on property updates.
|
||||
- **Range Calculations**: `ITestChannel` exposes both raw (`Adc`, `Mv`) and engineering (`EU`, `Y`) unit ranges. The `ActualMaxRangeAdc`/`ActualMinRangeAdc` are read-only, suggesting they are computed from data, not user-configurable.
|
||||
|
||||
## 4. Dependencies
|
||||
|
||||
### External Dependencies
|
||||
- `System.Collections.Generic`, `System.ComponentModel`, `System` – Core .NET namespaces.
|
||||
- `DTS.Common.Base` – Provides `IBaseClass` and `IBaseViewModel`.
|
||||
- `DTS.Common.Enums.Sensors` – Defines `CalibrationBehaviors` enum used in `ITestSetupMetadata`.
|
||||
|
||||
### Internal Dependencies
|
||||
- **Consumers**: This module is consumed by UI/view layer components (e.g., viewers, exporters, analyzers) that rely on `ITestSummary`, `ITestRunMetadata`, `ITestChannel`, etc., for binding and rendering test data.
|
||||
- **Implementations**: Concrete types implementing these interfaces are not included in the source, but are likely in data loading/serialization modules (e.g., binary file parsers, database mappers).
|
||||
|
||||
## 5. Gotchas
|
||||
|
||||
- **Redundant Channel Lists**: `ITestRunMetadata`, `ITestModule`, `ITestSummary`, and `ITestGraphs` all contain `Channels` and `CalculatedChannels`. These may be redundant or represent different subsets (e.g., flattened vs. module-scoped). No guarantee of consistency across lists is implied.
|
||||
- **`ActualMaxRangeAdc`/`ActualMinRangeAdc` are read-only**: These properties are `get;` only in `ITestChannel`, but all others are `get; set;`. This suggests they are computed post-data-load and should not be set directly.
|
||||
- **`ExcitationVoltage` vs. `MeasuredExcitationVoltage`/`FactoryExcitationVoltage`**: `ITestChannel` has `string ExcitationVoltage` (likely a display string), while `ITestCalculatedChannel` and `ITestChannel` also have `double MeasuredExcitationVoltage` and `double FactoryExcitationVoltage`. Confusing naming may lead to misuse.
|
||||
- **`ChannelColor` and `ErrorMessage`**: UI-specific properties (`ChannelColor`, `ErrorMessage`, `IsError`, `ErrorColor`, `IsSelected`, `CanSelectChannel`, etc.) are included in `ITestChannel`, implying tight coupling between data model and UI state—potentially violating separation of concerns.
|
||||
- **`CalculatedChannels` vs `ITestCalculatedChannel`**: `ITestChannel` has `IsCalculatedChannel` flag, but `ITestCalculatedChannel` is a separate interface. Implementations must ensure that channels marked `IsCalculatedChannel == true` are either castable to `ITestCalculatedChannel` or contain equivalent data.
|
||||
- **`ITestGraphs.ChannelIds` vs `Channels`**: `ITestGraphs` has both `List<string> ChannelIds` and `List<ITestChannel> Channels`. The relationship between them (e.g., whether `ChannelIds` is derived from `Channels`) is not specified.
|
||||
- **No Validation Rules**: None of the interfaces enforce non-null constraints (e.g., `Name`, `Id`, `SerialNumber`), which may lead to runtime errors if consumers assume non-nullability.
|
||||
|
||||
None identified beyond the above.
|
||||
@@ -0,0 +1,98 @@
|
||||
---
|
||||
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-16T02:32:49.562747+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "a5f27c5a375dc7b6"
|
||||
---
|
||||
|
||||
# TestModification
|
||||
|
||||
## Documentation: Test Modification Module Interfaces
|
||||
|
||||
---
|
||||
|
||||
### 1. Purpose
|
||||
This module defines the core interfaces for the *Test Modification* feature, which enables users to modify properties of a selected test channel (e.g., description, Eu multiplier/offset, T0/T1/T2 timing, sensitivity, software filter, and data flag). It follows the MVVM pattern, with `ITestModificationView`, `ITestModificationViewModel`, and `ITestModificationModel` forming the view, view model, and model layers respectively. The module exists to encapsulate state and behavior related to channel-specific modifications, supporting features such as ISO code synchronization when software filters change and configurable representation of unfiltered states (e.g., `"0"` vs `"P"`).
|
||||
|
||||
---
|
||||
|
||||
### 2. Public Interface
|
||||
|
||||
#### `ITestModificationView`
|
||||
- **Inherits**: `IBaseView`
|
||||
- **Description**: Marker interface for the view layer of the test modification UI. No additional members defined 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., containing test configuration).
|
||||
- `bool UseISOCodeFilterMapping { get; set; }` – Controls whether modifying the software filter should trigger automatic ISO code updates.
|
||||
- `bool UseZeroForUnfiltered { get; set; }` – Controls whether `"0"` or `"P"` is used when the ISO code is auto-updated due to filter change (i.e., for unfiltered state).
|
||||
- **Methods**:
|
||||
- `void PublishChanges()` – Commits pending modifications (e.g., to the selected channel or underlying data model). Behavior not specified beyond this; implementation-dependent.
|
||||
|
||||
#### `ITestModificationModel`
|
||||
- **Inherits**: `IBaseModel`
|
||||
- **Properties**:
|
||||
- `ITestModificationViewModel Parent { get; set; }` – Back-reference to the associated view model.
|
||||
- `ITestChannel SelectedChannel { get; set; }` – The channel whose properties are being modified.
|
||||
- `string Description { get; set; }` – The `ChannelDescriptionString` of `SelectedChannel`.
|
||||
- `bool IsModifiedDescription { get; }` – `true` if `Description` differs from the channel’s original value.
|
||||
- `double EuMultiplier { get; set; }` – Eu multiplier of `SelectedChannel`.
|
||||
- `bool IsModifiedEuMultiplier { get; }` – `true` if `EuMultiplier` differs from original.
|
||||
- `double EuOffset { get; set; }` – Eu offset of `SelectedChannel`.
|
||||
- `bool IsModifiedEuOffset { get; }` – `true` if `EuOffset` differs from original.
|
||||
- `double T0 { get; set; }` – T0 offset in milliseconds.
|
||||
- `bool IsModifiedT0 { get; }` – `true` if `T0` differs from original.
|
||||
- `bool IsModifiedLineFit { get; set; }` – `true` if `T1` or `T2` has been modified.
|
||||
- `double T1 { get; set; }` – Start time (ms) for line fit.
|
||||
- `double T2 { get; set; }` – End time (ms) for line fit.
|
||||
- `bool IsModifiedSensitivity { get; }` – `true` if `Sensitivity` differs from original.
|
||||
- `double Sensitivity { get; set; }` – Sensitivity of `SelectedChannel`.
|
||||
- `bool IsModifiedFilter { get; }` – `true` if `SelectedFilter` differs from original.
|
||||
- `IFilterClass SelectedFilter { get; set; }` – Software filter applied to `SelectedChannel`.
|
||||
- `T0Mode T0Mode { get; set; }` – Adjustment mode for T0 (type `T0Mode` not defined in provided sources).
|
||||
- `DataFlag SelectedDataFlag { get; set; }` – Data flag for `SelectedChannel`.
|
||||
- `bool IsModifiedDataFlag { get; }` – `true` if `SelectedDataFlag` differs from original.
|
||||
- `bool IsModified { get; }` – `true` if *any* channel property has been modified.
|
||||
- **Methods**:
|
||||
- `bool ValidateT0()` – Returns `true` if `T0` is within the valid time range of the dataset; `false` otherwise.
|
||||
|
||||
---
|
||||
|
||||
### 3. Invariants
|
||||
- `SelectedChannel` must be non-null for `ITestModificationModel` to function meaningfully (all `IsModified*` properties and value getters depend on it).
|
||||
- `IsModified*` properties are read-only indicators of whether the corresponding property differs from the *original* value of `SelectedChannel` (not necessarily the current in-memory value).
|
||||
- `IsModified` is a logical OR of all `IsModified*` properties (inferred from documentation).
|
||||
- `ValidateT0()` must evaluate `T0` against the dataset’s time bounds (exact bounds unspecified).
|
||||
- `UseISOCodeFilterMapping` and `UseZeroForUnfiltered` only affect behavior when `SelectedFilter` is modified *and* ISO code synchronization is enabled (implementation detail not specified).
|
||||
|
||||
---
|
||||
|
||||
### 4. Dependencies
|
||||
|
||||
#### This Module Depends On:
|
||||
- `DTS.Common.Base` namespace: Provides `IBaseView`, `IBaseViewModel`, `IBaseModel`.
|
||||
- `DTS.Common.Interface.Sensors.SoftwareFilters`: Provides `IFilterClass`.
|
||||
- `DTS.Common.Interface`: Contains `ITestChannel`, `DataFlag`, and `T0Mode` (not shown in source but referenced).
|
||||
|
||||
#### This Module Is Used By:
|
||||
- Likely consumed by higher-level modules (e.g., test configuration UI, channel editor) that instantiate and wire `ITestModificationViewModel` and `ITestModificationModel`.
|
||||
- `ITestModificationView` implies integration with a UI framework (e.g., WPF) via `IBaseView`.
|
||||
|
||||
---
|
||||
|
||||
### 5. Gotchas
|
||||
- `IsModifiedLineFit` is the only `IsModified*` property defined as `get; set;` (others are `get;` only). This suggests it may be settable externally (e.g., to force marking line fit as modified without changing `T1`/`T2`), which is inconsistent with other flags.
|
||||
- `SelectedFilter` uses `IFilterClass` (comment notes: *"FB 13120 Use IFilterClass instead of CFCFilter"*), indicating a refactor history. Ensure no legacy code still assumes `CFCFilter`.
|
||||
- `T0Mode` and `DataFlag` types are referenced but not defined in the provided sources; their semantics and valid values are unknown here.
|
||||
- `ValidateT0()`’s behavior is underspecified: "within the dataset" is ambiguous (e.g., dataset start/end? sample timestamps? configuration bounds?).
|
||||
- No explicit event or notification mechanism is defined for change tracking (e.g., `INotifyPropertyChanged`). Assumed to be provided via `IBaseViewModel`/`IBaseModel` or external mechanisms.
|
||||
- None of the `IsModified*` properties are resettable—once `true`, they remain `true` unless the value is reverted to the original (implementation-dependent).
|
||||
|
||||
None identified beyond the above.
|
||||
@@ -0,0 +1,46 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.CommonCore/Interface/DTS.Viewer/TestModule/ITestModuleView.cs
|
||||
- Common/DTS.CommonCore/Interface/DTS.Viewer/TestModule/ITestModuleViewModel.cs
|
||||
generated_at: "2026-04-16T02:32:30.110646+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "43e7cc3a0d236351"
|
||||
---
|
||||
|
||||
# TestModule
|
||||
|
||||
## 1. Purpose
|
||||
This module defines the foundational view and view-model interfaces for a *Test Module* within the DTS Viewer subsystem. Its role is to establish a contract for UI components responsible for displaying or managing test-related functionality—specifically, operations involving .NET `Assembly` inspection or manipulation—by extending the common base interfaces (`IBaseView` and `IBaseViewModel`) and exposing a list of assemblies (`AssemblyList`) as its core data payload.
|
||||
|
||||
## 2. Public Interface
|
||||
|
||||
### `ITestModuleView`
|
||||
- **Signature**: `public interface ITestModuleView : IBaseView`
|
||||
- **Behavior**: A marker interface for the *view* layer of the Test Module. It inherits from `IBaseView`, implying it adheres to the standard view contract (e.g., binding context, lifecycle hooks) defined elsewhere in `DTS.Common.Base`. No additional members are declared here.
|
||||
|
||||
### `ITestModuleViewModel`
|
||||
- **Signature**: `public interface ITestModuleViewModel : IBaseViewModel`
|
||||
- **Behavior**: A view-model interface for the Test Module. It extends `IBaseViewModel` and exposes a single property:
|
||||
- `AssemblyList`: A `List<Assembly>` (read-write) intended to hold the collection of .NET assemblies relevant to the test module’s functionality (e.g., loaded test assemblies, plugin assemblies, or candidate assemblies for execution).
|
||||
|
||||
## 3. Invariants
|
||||
- `ITestModuleView` and `ITestModuleViewModel` must be used in conjunction per the standard MVVM pattern (view ↔ view-model binding), though the source does not enforce this directly.
|
||||
- `AssemblyList` is nullable by default (as it is a read-write property of a reference type); implementations must ensure it is initialized before use to avoid `NullReferenceException`.
|
||||
- No explicit validation rules or ordering constraints are defined for `AssemblyList` (e.g., no requirement for uniqueness, null-safety, or sortedness).
|
||||
|
||||
## 4. Dependencies
|
||||
- **Depends on**:
|
||||
- `DTS.Common.Base` (for `IBaseView`, `IBaseViewModel`)
|
||||
- `System.Collections.Generic` (for `List<T>`)
|
||||
- `System.Reflection` (for `Assembly`)
|
||||
- **Depended on by**:
|
||||
- Unknown from source alone. Concretions (e.g., `TestModuleView : ITestModuleView`, `TestModuleViewModel : ITestModuleViewModel`) and consumers (e.g., DI containers, view-resolution logic) are not visible here.
|
||||
|
||||
## 5. Gotchas
|
||||
- **Ambiguous scope of `AssemblyList`**: The interface does not clarify whether `AssemblyList` represents *all* assemblies, *selected* assemblies, *loaded* assemblies, or *candidate* assemblies. Its semantics are implementation-defined.
|
||||
- **No immutability or change notification**: The property is read-write with no indication of reactive updates (e.g., `INotifyCollectionChanged`). Consumers may need to manually handle synchronization if the list is modified externally.
|
||||
- **No null-safety contract**: While `List<Assembly>` is non-nullable as a type, the property itself may be `null` at initialization. Implementers must decide whether to auto-initialize or require callers to do so.
|
||||
- **Namespace quirk**: The `// ReSharper disable CheckNamespace` directive suggests intentional namespace flattening (likely to avoid deep nesting), but this is a tooling hint—not a runtime behavior—and does not affect semantics.
|
||||
|
||||
None identified beyond the above.
|
||||
@@ -0,0 +1,110 @@
|
||||
---
|
||||
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-16T02:33:09.531156+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "b60d1a2f75a9d685"
|
||||
---
|
||||
|
||||
# TestSummary
|
||||
|
||||
## Documentation: Test Summary List Module
|
||||
|
||||
### 1. Purpose
|
||||
This module defines the interface contracts for a *Test Summary List* view and its associated ViewModel in a test data visualization system. It enables the display, selection, and management of test summary items—each representing a test run with associated metadata, channels, and graphs—within a list-based UI (e.g., a grid or list view). The module serves as the abstraction layer between the UI (via `ITestSummaryListView`) and the data/logic layer (via `ITestSummaryListViewModel`), supporting selection tracking, dynamic list updates (via `ObservableCollection`), and publishing of selected items for downstream processing.
|
||||
|
||||
---
|
||||
|
||||
### 2. Public Interface
|
||||
|
||||
#### `ITestSummaryListView`
|
||||
- **Inherits**: `IBaseView`
|
||||
- **Description**: A marker interface representing the *view* component for the test summary list UI. It has no additional members beyond inheritance, implying the view implementation is expected to conform to the base view contract (e.g., binding context, lifecycle hooks) but does not expose further view-specific APIs in this interface.
|
||||
|
||||
#### `ITestSummaryListViewModel`
|
||||
- **Inherits**: `IBaseViewModel`
|
||||
- **Properties**:
|
||||
- `ITestSummaryListView View { get; }`
|
||||
Gets the associated Shell View instance (the concrete UI control bound to this ViewModel).
|
||||
- `ObservableCollection<ITestSummary> TestSummaryList { get; set; }`
|
||||
The primary collection of test summary items displayed in the list. Supports change notifications via `ObservableCollection<T>`.
|
||||
- `List<ITestSummary> SelectedTestSummaryList { get; set; }`
|
||||
A *separate* list tracking currently selected `ITestSummary` items (distinct from `TestSummaryList`). Not observable—changes must be explicitly managed.
|
||||
|
||||
- **Methods**:
|
||||
- `void PublishSelectedTestSummaryList()`
|
||||
Triggers publication (e.g., event, message, or command) of the current `SelectedTestSummaryList` to other parts of the system (e.g., for analysis, export, or visualization).
|
||||
- `void TestSummaryList_CollectionChanged(object sender, NotifyCollectionChangedEventArgs e)`
|
||||
Handles `CollectionChanged` events from `TestSummaryList` (e.g., item added/removed/moved). Likely updates internal state (e.g., syncs selection, refreshes UI).
|
||||
|
||||
#### `ITestSummary`
|
||||
- **Inherits**: `IBaseClass`
|
||||
- **Properties**:
|
||||
- `string Id { get; set; }`
|
||||
Unique identifier for the test summary.
|
||||
- `string SetupName { get; set; }`
|
||||
Name of the test setup/configuration used.
|
||||
- `string Description { get; set; }`
|
||||
Human-readable description of the test.
|
||||
- `int ChannelCount { get; set; }`
|
||||
Number of raw channels in the test.
|
||||
- `DateTime FileDate { get; set; }`
|
||||
Date the test data file was created/modified.
|
||||
- `DateTime TimeStamp { get; set; }`
|
||||
Timestamp of the test run (possibly when started or completed).
|
||||
- `string DataType { get; set; }`
|
||||
Type/classification of the test data (e.g., "Vibration", "Temperature").
|
||||
- `bool IsSelected { get; set; }`
|
||||
Indicates whether this item is currently selected in the UI.
|
||||
- `List<ITestGraphs> Graphs { get; set; }`
|
||||
Collection of graph definitions associated with this test.
|
||||
- `List<ITestChannel> Channels { get; set; }`
|
||||
List of raw measurement channels.
|
||||
- `List<ITestChannel> CalculatedChannels { get; set; }`
|
||||
List of derived/calculated channels (e.g., computed from raw channels).
|
||||
- `IBaseViewModel Parent { get; set; }`
|
||||
Reference to the parent ViewModel (e.g., for navigation or context).
|
||||
- `ITestMetadata TestMetadata { get; set; }`
|
||||
Structured metadata (e.g., test conditions, operator, equipment).
|
||||
- `CalibrationBehaviors CalibrationBehavior { get; set; }`
|
||||
Enumerated calibration behavior flags (from `DTS.Common.Enums.Sensors`).
|
||||
|
||||
---
|
||||
|
||||
### 3. Invariants
|
||||
- `TestSummaryList` must be an `ObservableCollection<ITestSummary>`; direct replacement (e.g., assigning a `List<T>`) is allowed by the property setter but may require manual event subscription for change notifications.
|
||||
- `SelectedTestSummaryList` is a plain `List<ITestSummary>`—no automatic synchronization with `TestSummaryList` or `IsSelected` flags is implied. Updates to selection must be handled explicitly (e.g., via `TestSummaryList_CollectionChanged`).
|
||||
- `ITestSummaryListViewModel.TestSummaryList_CollectionChanged` is expected to be subscribed to `TestSummaryList.CollectionChanged` events; failure to do so may result in stale selection state.
|
||||
- `IsSelected` on an `ITestSummary` instance is *not* guaranteed to reflect its presence in `SelectedTestSummaryList` unless explicitly synchronized (e.g., in `TestSummaryList_CollectionChanged`).
|
||||
- `Parent` on `ITestSummary` must be non-null if the item is part of a ViewModel-managed list (as `Parent` is used for context).
|
||||
|
||||
---
|
||||
|
||||
### 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:
|
||||
- Concrete implementations of `ITestSummaryListView` (e.g., WPF `UserControl` or `Window` hosting the list).
|
||||
- Concrete implementations of `ITestSummaryListViewModel` (e.g., a ViewModel class managing test data display).
|
||||
- Any consumer of `PublishSelectedTestSummaryList()` (e.g., a command handler, event listener, or service that processes selected tests).
|
||||
- Code that constructs or manipulates `ITestSummary` instances (e.g., test data loaders, parsers).
|
||||
|
||||
---
|
||||
|
||||
### 5. Gotchas
|
||||
- **Selection Synchronization Risk**: `SelectedTestSummaryList` and `IsSelected` are *not* automatically kept in sync. Implementations must manually update both (e.g., in `TestSummaryList_CollectionChanged`) to avoid inconsistencies.
|
||||
- **`TestSummaryList_CollectionChanged` is a method, not an event**: It must be *called* explicitly (e.g., from `TestSummaryList.CollectionChanged += viewModel.TestSummaryList_CollectionChanged`). It is not an event handler itself.
|
||||
- **`TestSummaryList` setter allows reassignment**: Assigning a new `ObservableCollection<ITestSummary>` will require re-subscribing to its `CollectionChanged` event; the old collection’s subscription is lost.
|
||||
- **`IsSelected` is a property on `ITestSummary` but not used in the interface contract**: Its purpose is unclear without seeing implementations—likely used by the *view* for UI highlighting, but not enforced by the ViewModel interface.
|
||||
- **No explicit ordering guarantees**: `TestSummaryList` order is determined by the underlying `ObservableCollection<T>`; no sorting or ordering logic is defined in this interface.
|
||||
- **`CalibrationBehaviors` enum usage**: Its meaning and valid values are defined externally (`DTS.Common.Enums.Sensors`); behavior changes based on this property are not described here.
|
||||
|
||||
None identified beyond the above.
|
||||
@@ -0,0 +1,61 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.CommonCore/Interface/DTS.Viewer/ViewerSettings/IViewerSettingsView.cs
|
||||
- Common/DTS.CommonCore/Interface/DTS.Viewer/ViewerSettings/IViewerSettingsViewModel.cs
|
||||
generated_at: "2026-04-16T02:32:41.267985+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "aacb0b18894c95e6"
|
||||
---
|
||||
|
||||
# ViewerSettings
|
||||
|
||||
## Documentation: Viewer Settings Module Interfaces
|
||||
|
||||
### 1. Purpose
|
||||
This module defines the contract interfaces for the viewer settings UI layer, implementing the Model-View-ViewModel (MVVM) pattern. It provides a standardized abstraction between the view (UI) and view model (logic/data) for configuring viewer-specific settings—specifically calibration behavior and visibility of settings sections. The interfaces `IViewerSettingsView` and `IViewerSettingsViewModel` enable decoupled development and testing of the viewer settings UI, ensuring separation of concerns while integrating into the broader `DTS.Common` framework.
|
||||
|
||||
### 2. Public Interface
|
||||
|
||||
#### `IViewerSettingsView`
|
||||
- **Inherits**: `IBaseView`
|
||||
- **Description**: A marker interface representing the view (e.g., a WPF `UserControl`) responsible for rendering viewer settings. It carries no additional members beyond those defined in `IBaseView`, implying it relies on base view conventions (e.g., binding context, lifecycle hooks) defined elsewhere.
|
||||
|
||||
#### `IViewerSettingsViewModel`
|
||||
- **Inherits**: `IBaseViewModel`
|
||||
- **Properties**:
|
||||
- `IViewerSettingsView View { get; set; }`
|
||||
Gets or sets the associated view instance. Enables two-way binding and view-model-to-view coordination.
|
||||
- `IBaseViewModel Parent { get; set; }`
|
||||
Gets or sets the parent view model, supporting hierarchical view model composition (e.g., for navigation or context propagation).
|
||||
- `Visibility CalibrationBehaviorSettingVisibility { get; set; }`
|
||||
Controls the visibility of the calibration behavior setting UI element (e.g., a dropdown or group box). Read-write, allowing runtime toggling.
|
||||
- `Visibility OverallSettingsVisibility { get; }`
|
||||
Read-only visibility flag for the entire settings section (e.g., to hide/show the whole panel). Likely derived from application state or permissions.
|
||||
- `DisplayedCalibrationBehavior[] AvailableCalibrationBehaviors { get; }`
|
||||
Returns an array of available calibration behavior options, represented as `DisplayedCalibrationBehavior` objects (defined in `DTS.Common.Classes.Sensors`). Used to populate a selection UI.
|
||||
- **Methods**:
|
||||
- `void PublishChanges()`
|
||||
Commits or broadcasts any pending changes made in the settings UI (e.g., to a sensor configuration service or settings store). Behavior is implementation-defined but implies persistence or notification.
|
||||
|
||||
### 3. Invariants
|
||||
- `View` must be assigned to an instance implementing `IViewerSettingsView` before the view model is used (enforced by MVVM framework conventions, though not explicitly validated in the interface).
|
||||
- `CalibrationBehaviorSetting` must be one of the values in `AvailableCalibrationBehaviors` at all times; invalid assignments are expected to be rejected by the implementation (not enforced by interface).
|
||||
- `OverallSettingsVisibility` is read-only and must remain consistent with higher-level application state (e.g., user role, active sensor type).
|
||||
- `AvailableCalibrationBehaviors` must be non-null and immutable once set; modifications require reassignment.
|
||||
|
||||
### 4. Dependencies
|
||||
- **Depends on**:
|
||||
- `DTS.Common.Base` (provides `IBaseView`, `IBaseViewModel`)
|
||||
- `System.Windows` (for `Visibility` type)
|
||||
- `DTS.Common.Classes.Sensors` (for `DisplayedCalibrationBehavior` type)
|
||||
- **Depended on by**:
|
||||
- Likely consumed by a WPF UI project (via `IViewerSettingsView`) and a core logic/service layer (via `IViewerSettingsViewModel`).
|
||||
- Implementation classes (e.g., `ViewerSettingsViewModel`, `ViewerSettingsView`) would depend on this interface for decoupled instantiation and testing.
|
||||
|
||||
### 5. Gotchas
|
||||
- `DisplayedCalibrationBehavior` is referenced but not defined in this source; its structure (e.g., properties like `Name`, `Value`) is unknown here and must be verified in `DTS.Common.Classes.Sensors`.
|
||||
- `PublishChanges()` has no documented error handling or rollback semantics—implementation may throw or silently fail.
|
||||
- `OverallSettingsVisibility` is read-only; callers cannot directly control it, which may limit flexibility if dynamic reconfiguration is needed.
|
||||
- No validation or null-safety guarantees are specified for `View` or `Parent`; implementations must handle null references.
|
||||
- None identified from source alone.
|
||||
Reference in New Issue
Block a user