init
This commit is contained in:
@@ -0,0 +1,60 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.CommonCore/Events/DTS.Viewer/Reports/SaveReportToCSVRequestedEvent.cs
|
||||
- Common/DTS.CommonCore/Events/DTS.Viewer/Reports/SaveReportToPDFRequestedEvent.cs
|
||||
generated_at: "2026-04-16T02:50:24.002572+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "32eb4ff533778e72"
|
||||
---
|
||||
|
||||
# Reports
|
||||
|
||||
## Documentation: Report Export Request Events
|
||||
|
||||
### 1. Purpose
|
||||
This module defines Prism-based event types used to signal user requests to export report data to external file formats—specifically CSV and PDF. These events serve as decoupled communication mechanisms within the application’s event-driven architecture, allowing view models or UI components to request export operations without direct coupling to the export implementation logic (e.g., a report service or controller). They are part of the `DTS.Common.Events` namespace and are intended for use in Prism-based WPF or similar XAML-based UI frameworks.
|
||||
|
||||
### 2. Public Interface
|
||||
|
||||
- **`SaveReportToCSVRequestedEvent`**
|
||||
*Type:* `class` (inherits from `CompositePresentationEvent<SaveReportToCSVRequestedEventArgs>`)
|
||||
*Behavior:* A Prism event token used to publish and subscribe to requests to save a report to CSV format. Subscribers handle the actual export logic.
|
||||
|
||||
- **`SaveReportToCSVRequestedEventArgs`**
|
||||
*Type:* `class`
|
||||
*Properties:*
|
||||
- `Directory` (`string`): The target directory path where the CSV file should be saved.
|
||||
- `ParentVM` (`IBaseViewModel`): A reference to the view model initiating the request, typically used for context (e.g., to access report data or UI state).
|
||||
|
||||
- **`SaveReportToPDFRequestedEvent`**
|
||||
*Type:* `class` (inherits from `CompositePresentationEvent<SaveReportToPDFRequestedEventArgs>`)
|
||||
*Behavior:* A Prism event token used to publish and subscribe to requests to save a report to PDF format. Subscribers handle the actual export logic.
|
||||
|
||||
- **`SaveReportToPDFRequestedEventArgs`**
|
||||
*Type:* `class`
|
||||
*Properties:*
|
||||
- `Directory` (`string`): The target directory path where the PDF file should be saved.
|
||||
- `ParentVM` (`IBaseViewModel`): A reference to the view model initiating the request, typically used for context (e.g., to access report data or UI state).
|
||||
|
||||
### 3. Invariants
|
||||
- Both event argument classes (`SaveReportToCSVRequestedEventArgs`, `SaveReportToPDFRequestedEventArgs`) require that `Directory` and `ParentVM` be non-null at the time the event is published, though the source does not enforce this explicitly.
|
||||
- The `Directory` property is expected to represent a valid, writable file system path (conventionally validated by the subscriber).
|
||||
- `ParentVM` must implement `IBaseViewModel` (from `DTS.Common.Base`), implying the event publisher has access to a view model instance conforming to that interface.
|
||||
- No ordering or timing guarantees are specified—events are published asynchronously via Prism’s `CompositePresentationEvent` mechanism.
|
||||
|
||||
### 4. Dependencies
|
||||
- **Dependencies *of* this module:**
|
||||
- `DTS.Common.Base` (provides `IBaseViewModel`)
|
||||
- `Microsoft.Practices.Prism.Events` (provides `CompositePresentationEvent<T>`)
|
||||
- **Dependencies *on* this module:**
|
||||
- Any component (e.g., view models, services) that needs to trigger a report export must subscribe to or publish these events.
|
||||
- Export handlers (e.g., services in other modules) must subscribe to these events to perform the actual file generation.
|
||||
- No other modules in the provided source reference these events, so their consumers are external to this file set.
|
||||
|
||||
### 5. Gotchas
|
||||
- **Ambiguity in `Directory` semantics:** The property name is `Directory`, but export operations typically require a *full file path* (e.g., `C:\Reports\export.csv`). It is unclear whether subscribers are expected to append a filename, or if the filename is derived from `ParentVM` or other context.
|
||||
- **No cancellation or error propagation mechanism:** The events carry no way to signal success/failure or allow cancellation (e.g., via `CancellationToken` or result object), which may complicate error handling in subscribers.
|
||||
- **No metadata about the report:** Neither event argument includes information about *which* report to export (e.g., report ID, data source, or filter criteria). This data must be inferred from `ParentVM`, increasing coupling and risk of inconsistency.
|
||||
- **No thread-safety guarantees:** As Prism’s `CompositePresentationEvent` uses the UI thread by default for subscriptions (unless `ThreadOption.Background` is specified), subscribers may need to marshal work off the UI thread, but this is not documented or enforced here.
|
||||
- **Historical duplication:** The near-identical structure of `SaveReportToCSVRequestedEvent` and `SaveReportToPDFRequestedEvent` suggests potential for refactoring into a generic `SaveReportRequestedEvent<T>` (if Prism and project constraints allow), but no such generic exists in the source.
|
||||
@@ -0,0 +1,60 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.CommonCore/Events/DTS.Viewer/Reports/PowerSpectralDensity/PSDReportGRMSValuesUpdatedEvent.cs
|
||||
- Common/DTS.CommonCore/Events/DTS.Viewer/Reports/PowerSpectralDensity/PSDReportSettingsChangedEvent.cs
|
||||
generated_at: "2026-04-16T02:50:24.419139+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "8cae978d3c87299f"
|
||||
---
|
||||
|
||||
# PowerSpectralDensity
|
||||
|
||||
## Documentation: PSD Report Events
|
||||
|
||||
### 1. Purpose
|
||||
This module defines Prism-based event types used to communicate changes in Power Spectral Density (PSD) report state within the DTS Viewer application. Specifically, it provides events for notifying subscribers when GRMS (Root Mean Square acceleration) summary values have been updated (`PSDReportGRMSValuesUpdatedEvent`) and when PSD report configuration settings have changed (`PSDReportSettingsChangedEvent`). These events facilitate decoupled UI updates and state synchronization across view models and services in a Prism-based MVVM architecture.
|
||||
|
||||
### 2. Public Interface
|
||||
|
||||
#### `PSDReportGRMSValuesUpdatedEvent`
|
||||
- **Type**: `CompositePresentationEvent<PSDReportGRMSValuesUpdatedEventArg>`
|
||||
- **Behavior**: A Prism event used to publish notifications when GRMS summary values for a PSD report have been recalculated or updated. Subscribers receive an `PSDReportGRMSValuesUpdatedEventArg` instance containing the updated values and the originating view model.
|
||||
|
||||
#### `PSDReportGRMSValuesUpdatedEventArg`
|
||||
- **Type**: `class`
|
||||
- **Properties**:
|
||||
- `IChannelGRMSSummary[] Values`: Array of GRMS summary data per channel.
|
||||
- `IBaseViewModel ParentVM`: Reference to the view model that triggered the event (e.g., the report view model).
|
||||
|
||||
#### `PSDReportSettingsChangedEvent`
|
||||
- **Type**: `CompositePresentationEvent<PSDReportSettingsChangedEventArg>`
|
||||
- **Behavior**: A Prism event used to publish notifications when PSD report settings (e.g., frequency range, window type, overlap) have been modified. Subscribers receive an `PSDReportSettingsChangedEventArg` instance containing the updated settings model and the originating view model.
|
||||
|
||||
#### `PSDReportSettingsChangedEventArg`
|
||||
- **Type**: `class`
|
||||
- **Properties**:
|
||||
- `IPSDReportSettingsModel Model`: The updated PSD report settings model.
|
||||
- `IBaseViewModel ParentVM`: Reference to the view model that triggered the event.
|
||||
|
||||
### 3. Invariants
|
||||
- `Values` in `PSDReportGRMSValuesUpdatedEventArg` must be non-null when the event is published (though the array may be empty).
|
||||
- `Model` in `PSDReportSettingsChangedEventArg` must be non-null when the event is published.
|
||||
- `ParentVM` in both argument types is expected to be non-null and represent the view model instance associated with the report that triggered the event.
|
||||
- Events are published via Prism’s `EventAggregator`; subscribers must subscribe on the appropriate thread context (e.g., UI thread) if UI updates are required.
|
||||
|
||||
### 4. Dependencies
|
||||
- **Dependencies on other modules**:
|
||||
- `DTS.Common.Base` (provides `IBaseViewModel`)
|
||||
- `DTS.Common.Interface` (provides `IChannelGRMSSummary`, `IPSDReportSettingsModel`)
|
||||
- `Microsoft.Practices.Prism.Events` (provides `CompositePresentationEvent<T>`)
|
||||
- **Depended on by**:
|
||||
- View models and services that consume or produce PSD report data (e.g., report generation logic, UI components like `PSDReportViewModel`).
|
||||
- Likely consumed by modules handling report display, export, or analysis (not specified in source).
|
||||
|
||||
### 5. Gotchas
|
||||
- **No validation or immutability guarantees**: The argument classes expose public setters for all properties. Subscribers must assume values may be mutated after event publication unless explicitly copied.
|
||||
- **No event payload versioning**: Changes to `IChannelGRMSSummary` or `IPSDReportSettingsModel` interfaces may break subscribers without warning.
|
||||
- **Ambiguity in `ParentVM` semantics**: While `ParentVM` is included, its exact role (e.g., originator, owner, or context) is not documented in this file; callers must infer usage from surrounding code.
|
||||
- **No documentation of event subscription/unsubscription patterns**: It is unclear whether events are intended for one-time use, persistent subscriptions, or scoped lifetime (e.g., per-view).
|
||||
- **None identified from source alone.**
|
||||
@@ -0,0 +1,73 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.CommonCore/Events/DTS.Viewer/TestModification/RefreshTestRequestEvent.cs
|
||||
- Common/DTS.CommonCore/Events/DTS.Viewer/TestModification/ShowT0CursorEvent.cs
|
||||
- Common/DTS.CommonCore/Events/DTS.Viewer/TestModification/TestModificationChangedEvent.cs
|
||||
- Common/DTS.CommonCore/Events/DTS.Viewer/TestModification/SetUseZeroForUnfilteredEvent.cs
|
||||
- Common/DTS.CommonCore/Events/DTS.Viewer/TestModification/TestModificationEvent.cs
|
||||
- Common/DTS.CommonCore/Events/DTS.Viewer/TestModification/ShiftT0Event.cs
|
||||
generated_at: "2026-04-16T02:49:56.440589+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "42735a65c478074f"
|
||||
---
|
||||
|
||||
# TestModification
|
||||
|
||||
## Documentation: Test Modification Event Definitions
|
||||
|
||||
### 1. Purpose
|
||||
This module defines a set of Prism-based event types used for communication within the DTS Viewer component related to test modification operations. These events facilitate decoupled UI and data layer interactions—such as refreshing test data, toggling or shifting the T0 cursor, updating filter behavior, and signaling when a test has been modified—enabling reactive updates across modules without tight coupling. All events inherit from `CompositePresentationEvent<T>` (Prism’s pub/sub mechanism), indicating they are intended for cross-view or cross-module communication in a WPF/Prism-based application.
|
||||
|
||||
### 2. Public Interface
|
||||
|
||||
| Event / Type | Signature | Behavior |
|
||||
|--------------|-----------|----------|
|
||||
| `RefreshTestRequestEvent` | `public class RefreshTestRequestEvent : CompositePresentationEvent<string> { }` | Payload is a `string` representing the **Test ID**. Subscribers use this to refresh the UI/data for the specified test. |
|
||||
| `ShowT0CursorEvent` | `public class ShowT0CursorEvent : CompositePresentationEvent<bool> { }` | Payload is a `bool`. `true` to show the T0 cursor, `false` to hide it. |
|
||||
| `TestModificationChangedEvent` | `public class TestModificationChangedEvent : CompositePresentationEvent<ITestModificationModel> { }` | Payload is an `ITestModificationModel`. Signals that the current test modification state (e.g., metadata, parameters) has changed. |
|
||||
| `SetUseZeroForUnfilteredEvent` | `public class SetUseZeroForUnfilteredEvent : CompositePresentationEvent<bool> { }` | Payload is a `bool`. Controls whether `0` (true) or `P` (false) is displayed in the isocode filter field when modifying an isocode from a filter. |
|
||||
| `TestModificationEvent` | `public class TestModificationEvent : CompositePresentationEvent<TestModificationArgs> { }` | Payload is a `TestModificationArgs`. Raised whenever a test is modified by the viewer (e.g., user edits metadata or parameters). Triggers downstream regeneration of ROIs (e.g., by DataPro). |
|
||||
| `TestModificationArgs` | `public class TestModificationArgs { public string DataSetDirectory { get; } public string TestId { get; } public TestModificationArgs(string dtsFilePath, string testId) { ... } }` | Encapsulates context for a test modification: `dtsFilePath` → `DataSetDirectory`, and `testId`. |
|
||||
| `ShiftT0Event` | `public class ShiftT0Event : CompositePresentationEvent<ShiftT0EventArguments> { }` | Payload is a `ShiftT0EventArguments`. Requests shifting the T0 time (cursor) either by absolute time offset or by sample/step count. |
|
||||
| `ShiftT0EventArguments` | `public class ShiftT0EventArguments { public double T0Time { get; } public bool IsInitialization { get; } public int T0Steps { get; } public bool IsKeyPress { get; }` | Contains shift parameters: <br>• `T0Time`: Absolute time value (used in one constructor). <br>• `T0Steps`: Number of steps/samples to shift (used in the other constructor). <br>• `IsInitialization`: Whether this shift is part of initial setup. <br>• `IsKeyPress`: Whether the shift was triggered by a keyboard event (left/right arrow). |
|
||||
|
||||
> **Note**: Two distinct constructors for `ShiftT0EventArguments` exist:
|
||||
> - One accepting `(double t0, bool isInitialization)` → sets `T0Time`, `IsInitialization`; `T0Steps = 0`, `IsKeyPress = false`.
|
||||
> - One accepting `(int steps, bool isInitialization, bool isKeyPress)` → sets `T0Steps`, `IsInitialization`, `IsKeyPress`; `T0Time = 0D`.
|
||||
|
||||
### 3. Invariants
|
||||
- All events are **non-interactive** (i.e., they carry data only; no return values or side effects in the event class itself).
|
||||
- Payload types are strictly typed:
|
||||
- `RefreshTestRequestEvent` → `string` (Test ID)
|
||||
- `ShowT0CursorEvent` → `bool`
|
||||
- `TestModificationChangedEvent` → `ITestModificationModel` (interface, not concrete type)
|
||||
- `SetUseZeroForUnfilteredEvent` → `bool`
|
||||
- `TestModificationEvent` → `TestModificationArgs`
|
||||
- `ShiftT0Event` → `ShiftT0EventArguments`
|
||||
- `TestModificationArgs.TestId` and `TestModificationArgs.DataSetDirectory` are **immutable** (`private set;`).
|
||||
- In `ShiftT0EventArguments`, `T0Time` and `T0Steps` are mutually exclusive: only one is non-zero/non-default per instance.
|
||||
- `IsInitialization` and `IsKeyPress` are independent flags; both may be `false` (e.g., programmatic shifts not triggered by user input or initialization).
|
||||
|
||||
### 4. Dependencies
|
||||
- **External Dependency**:
|
||||
- `Microsoft.Practices.Prism.Events` (Prism library) — required for `CompositePresentationEvent<T>`.
|
||||
- **Internal Dependency**:
|
||||
- `DTS.Common.Interface.ITestModificationModel` — referenced in `TestModificationChangedEvent`. This interface must be defined elsewhere in the codebase (not included here).
|
||||
- **Inferred Usage**:
|
||||
- Events are likely published by the DTS Viewer (e.g., test editing UI) and consumed by modules like DataPro (for ROI regeneration), cursor rendering components, or filter UI logic.
|
||||
- No direct consumers are listed in the source; usage must be inferred from comments (e.g., `TestModificationEvent` is used by DataPro to regenerate ROI).
|
||||
|
||||
### 5. Gotchas
|
||||
- **Ambiguous payload semantics**:
|
||||
- `DataSetDirectory` in `TestModificationArgs` is initialized from `dtsFilePath`, but its name suggests a *directory* while the parameter is named `dtsFilePath` (which may be a full file path). Clarify whether this expects a directory or file path.
|
||||
- `ShiftT0EventArguments` has two constructors with overlapping parameters (`isInitialization`) but different semantics. Callers must ensure correct constructor is used—mixing them may lead to `T0Time = 0` when a time shift was intended.
|
||||
- **Missing validation**:
|
||||
- No validation is present in `ShiftT0EventArguments` constructors (e.g., `steps` could be negative; `T0Time` could be negative). Behavior for invalid values is undefined.
|
||||
- **Namespace quirk**:
|
||||
- `// ReSharper disable CheckNamespace` is present in multiple files, suggesting intentional deviation from folder-based namespace conventions. Ensure build/linting rules accommodate this.
|
||||
- **No documentation on event subscription/unsubscription patterns**:
|
||||
- Since these are Prism events, subscribers must manage thread affinity (e.g., `ThreadOption.PublisherThread` vs `UIThread`) explicitly—this is not documented here.
|
||||
- **No deprecation notices**:
|
||||
- The comment for `TestModificationEvent` ("this event is called currently whenever...") suggests it may be legacy or in flux. No indication of planned replacement or migration path.
|
||||
- **None identified from source alone.**
|
||||
@@ -0,0 +1,85 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.CommonCore/Events/DTS.Viewer/ViewerChartOptions/ResetZoomChangedEvent.cs
|
||||
- Common/DTS.CommonCore/Events/DTS.Viewer/ViewerChartOptions/CursorShowChangedEvent.cs
|
||||
- Common/DTS.CommonCore/Events/DTS.Viewer/ViewerChartOptions/CursorsClearChangedEvent.cs
|
||||
- Common/DTS.CommonCore/Events/DTS.Viewer/ViewerChartOptions/CursorShowMinMaxChangedEvent.cs
|
||||
- Common/DTS.CommonCore/Events/DTS.Viewer/ViewerChartOptions/CursorsAlailableChangedEvent.cs
|
||||
- Common/DTS.CommonCore/Events/DTS.Viewer/ViewerChartOptions/SaveToPDFRequestedEvent.cs
|
||||
- Common/DTS.CommonCore/Events/DTS.Viewer/ViewerChartOptions/ChartAxisChangedEvent.cs
|
||||
- Common/DTS.CommonCore/Events/DTS.Viewer/ViewerChartOptions/ChartOptionsChangedEvent.cs
|
||||
generated_at: "2026-04-16T02:50:11.916711+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "16f84af1488883a8"
|
||||
---
|
||||
|
||||
# ViewerChartOptions
|
||||
|
||||
## Documentation: Viewer Chart Options Events Module
|
||||
|
||||
### 1. Purpose
|
||||
This module defines a set of Prism-based pub/sub events used to communicate state changes and user requests related to chart viewer options in the DTS system. These events enable decoupled communication between chart UI components (e.g., view models, views, controllers) and backend logic—specifically for toggling cursor/zoom behavior, axis adjustments, chart configuration changes, and export actions. The events are part of the `DTS.Common.Events` namespace and rely on the `CompositePresentationEvent<T>` base class from Prism for cross-thread subscription and publication.
|
||||
|
||||
---
|
||||
|
||||
### 2. Public Interface
|
||||
|
||||
All event classes are *payload-only*—they carry no methods or properties beyond their inherited event infrastructure. Each inherits from `CompositePresentationEvent<TPayload>` and defines a strongly-typed payload.
|
||||
|
||||
| Event Class | Payload Type | Description |
|
||||
|-------------|--------------|-------------|
|
||||
| `ResetZoomChangedEvent` | `bool` | Indicates that the reset-zoom state has changed (e.g., whether reset-zoom is enabled or active). |
|
||||
| `CursorShowChangedEvent` | `bool` | Indicates that the visibility state of the primary cursor has changed. |
|
||||
| `CursorsClearChangedEvent` | `bool` | Indicates that the state of the “clear cursors” action has changed (e.g., whether clearing is allowed or requested). |
|
||||
| `CursorShowMinMaxChangedEvent` | `bool` | Indicates that the state of displaying min/max values alongside cursors has changed. |
|
||||
| `CursorsAlailableChangedEvent` | `bool` | *Note: Typo in class name—intended `CursorsAvailableChangedEvent`.* Indicates that the availability state of cursors has changed (e.g., whether cursors are enabled for interaction). |
|
||||
| `SaveToPDFRequestedEvent` | `string` | Signals a request to save the current chart to PDF. The payload is a string—likely a suggested filename or export path. |
|
||||
| `ChartAxisChangedEvent` | `ChartAxisChangedEventArg` | Signals that one chart axis (X or Y) has been adjusted. Payload contains updated axis bounds and the parent view model. |
|
||||
| `ChartOptionsChangedEvent` | `ChartOptionsChangedEventArg` | Signals that high-level chart options (e.g., type, model settings) have changed. Payload includes the updated model, chart type, and parent view model. |
|
||||
|
||||
#### Payload Types
|
||||
|
||||
| Type | Fields | Description |
|
||||
|------|--------|-------------|
|
||||
| `ChartAxisChangedEventArg` | `IBaseViewModel ParentVM`, `string Axis`, `double MinValue`, `double MaxValue` | Encapsulates axis change details. `Axis` is likely `"X"` or `"Y"`. |
|
||||
| `ChartOptionsChangedEventArg` | `IBaseViewModel ParentVM`, `IChartOptionsModel Model`, `string ChartType` | Encapsulates chart configuration change. `Model` holds serializable chart settings; `ChartType` identifies the visualization mode (e.g., `"Line"`, `"Bar"`). |
|
||||
|
||||
---
|
||||
|
||||
### 3. Invariants
|
||||
|
||||
- **Event naming convention**: All event classes end with `ChangedEvent` (for state changes) or `RequestedEvent` (for user-initiated actions).
|
||||
- **Payload semantics**:
|
||||
- Boolean events (`ResetZoomChangedEvent`, `CursorShowChangedEvent`, etc.) use `true`/`false` to represent *on/off* or *enabled/disabled* states—**not** toggling actions.
|
||||
- `SaveToPDFRequestedEvent` payload is a `string`—interpreted as a *request* (not a confirmation), so the payload likely represents a *target* (e.g., filename or path), not a result.
|
||||
- **ParentVM usage**: In `ChartAxisChangedEventArg` and `ChartOptionsChangedEventArg`, `ParentVM` is non-null and identifies the originating view model—enabling subscribers to scope responses to specific chart instances.
|
||||
- **No validation in event classes**: Payload objects contain no validation logic; subscribers must enforce constraints (e.g., `MinValue ≤ MaxValue`).
|
||||
|
||||
---
|
||||
|
||||
### 4. Dependencies
|
||||
|
||||
#### Dependencies *of* this module:
|
||||
- `Microsoft.Practices.Prism.Events` → Provides `CompositePresentationEvent<T>`.
|
||||
- `DTS.Common.Base` → Provides `IBaseViewModel` interface.
|
||||
- `DTS.Common.Interface` → Provides `IChartOptionsModel` interface.
|
||||
|
||||
#### Dependencies *on* this module:
|
||||
- Any module/view model/view that needs to react to chart viewer option changes (e.g., chart rendering logic, cursor management, export handlers).
|
||||
- Specifically:
|
||||
- Subscribers to `ChartAxisChangedEvent` likely update axis scales in chart controls.
|
||||
- Subscribers to `SaveToPDFRequestedEvent` likely trigger PDF export workflows.
|
||||
- UI components (e.g., toolbar buttons) may publish `ResetZoomChangedEvent`/`CursorShowChangedEvent` to reflect toggle states.
|
||||
|
||||
---
|
||||
|
||||
### 5. Gotchas
|
||||
|
||||
- **Typo in class name**: `CursorsAlailableChangedEvent` is misspelled (`Alailable` instead of `Available`). This is preserved in the source and must be respected in code.
|
||||
- **Misleading XML comments**: All events (except `SaveToPDFRequestedEvent`) have a comment `/// <summary>The Data Folder changed event.</summary>`, which is incorrect and likely copy-paste error. This does not affect runtime behavior but may confuse developers.
|
||||
- **Ambiguous boolean semantics**: The meaning of `true`/`false` in boolean events is not standardized in the source. For example, `CursorShowChangedEvent` with `true` could mean *“show cursors”* or *“cursor visibility changed to visible”*—subscribers must infer intent from context or external documentation.
|
||||
- **No event grouping**: Related events (e.g., cursor toggles) are defined separately, requiring subscribers to subscribe to each individually. No composite event or enum-based alternative is provided.
|
||||
- **No deprecation markers**: Despite the typo, no `[Obsolete]` attribute or migration path is indicated.
|
||||
|
||||
None identified beyond the above.
|
||||
@@ -0,0 +1,56 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.CommonCore/Events/DTS.Viewer/ViewerFilter/FilterParameterChangedEvent.cs
|
||||
generated_at: "2026-04-16T02:49:40.608427+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "b412d168caf7b62d"
|
||||
---
|
||||
|
||||
# ViewerFilter
|
||||
|
||||
### 1. **Purpose**
|
||||
This module defines a Prism-based event (`FilterParameterChangedEvent`) used to broadcast changes to filter parameters within the DTS Viewer component. It enables decoupled communication between view models (implementing `IBaseViewModel`) and other subscribers (e.g., filter controllers, data aggregators) when a filter parameter is modified—typically in response to user interaction in the UI. The event carries metadata about *who* triggered the change (`Requester`) and *which* parameter changed (`Param`), supporting dynamic, reactive filtering logic without tight coupling.
|
||||
|
||||
---
|
||||
|
||||
### 2. **Public Interface**
|
||||
|
||||
- **`FilterParameterArgs`**
|
||||
A data carrier class for the event payload.
|
||||
- `IBaseViewModel Requester { get; set; }` — The view model instance that initiated the filter parameter change.
|
||||
- `string Param { get; set; }` — The name or identifier of the filter parameter that changed.
|
||||
|
||||
- **`FilterParameterChangedEvent`**
|
||||
A Prism `CompositePresentationEvent<FilterParameterArgs>` subclass used to publish and subscribe to filter parameter change notifications.
|
||||
- Inherits standard Prism event methods: `Subscribe(...)`, `Publish(...)`, `Unsubscribe(...)`, etc.
|
||||
- Payload type is `FilterParameterArgs`.
|
||||
|
||||
---
|
||||
|
||||
### 3. **Invariants**
|
||||
- `Requester` **must not be null** when publishing the event (implied by the XML comment “Filter requester” and typical Prism usage patterns), though the source does not enforce this at runtime.
|
||||
- `Param` **must be non-null and non-empty** for meaningful filtering, though again, no explicit validation is present in the source.
|
||||
- The event is *asynchronous* by default (as `CompositePresentationEvent` supports thread marshaling), but no specific threading guarantees are documented.
|
||||
- No ordering guarantees are provided for subscribers—multiple subscribers may receive the event in arbitrary order.
|
||||
|
||||
---
|
||||
|
||||
### 4. **Dependencies**
|
||||
- **Depends on**:
|
||||
- `DTS.Common.Base.IBaseViewModel` — Defines the contract for the `Requester`.
|
||||
- `Microsoft.Practices.Prism.Events.CompositePresentationEvent<T>` — Prism’s event aggregation infrastructure.
|
||||
- **Used by**:
|
||||
- Any component in the DTS Viewer module (e.g., filter controls, view models, data services) that needs to notify others of filter parameter changes.
|
||||
- Likely consumed by filter logic handlers (e.g., in a `FilterService` or `ViewerViewModel`) to re-query or re-render data.
|
||||
|
||||
---
|
||||
|
||||
### 5. **Gotchas**
|
||||
- **No null-safety**: The class does not validate or guard against `null` values for `Requester` or `Param`. Subscribers must handle potential `NullReferenceException`s if these are not validated before publishing.
|
||||
- **String-based parameter identification**: Using `string Param` instead of an enum or typed identifier increases risk of typos/mismatches (e.g., `"Status"` vs `"status"`).
|
||||
- **No versioning or metadata**: The event carries no timestamp, correlation ID, or version info—making debugging or deduplication difficult in complex flows.
|
||||
- **Namespace quirk**: The `// ReSharper disable CheckNamespace` comment suggests namespace alignment may be manually enforced, but the `DTS.Common.Events` namespace is used despite the file path `.../DTS.Viewer/...`. Developers should verify namespace consistency across the codebase.
|
||||
- **No documentation on event lifecycle**: It is unclear whether this event is intended for one-time use, repeated updates, or if subscribers must clean up to avoid memory leaks (standard Prism practice applies: always `Unsubscribe` when appropriate).
|
||||
|
||||
*None identified from source alone.*
|
||||
@@ -0,0 +1,61 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.CommonCore/Events/DTS.Viewer/ViewerSettings/CalibrationBehaviorSettableInViewerChangedEvent.cs
|
||||
- Common/DTS.CommonCore/Events/DTS.Viewer/ViewerSettings/ViewerSettingsVisibilityChangedEvent.cs
|
||||
generated_at: "2026-04-16T02:49:52.617936+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "7819516e9af4aa9e"
|
||||
---
|
||||
|
||||
# ViewerSettings
|
||||
|
||||
### 1. **Purpose**
|
||||
This module defines two Prism-based event types used for broadcasting changes to viewer settings within the DTS application. Specifically, `CalibrationBehaviorSettableInViewerChangedEvent` signals when the availability (enabled/disabled state) of calibration behavior configuration in the viewer has changed, while `ViewerSettingsVisibilityChangedEvent` signals when the visibility state of the viewer settings panel has changed. These events facilitate loose coupling between components that manage or respond to viewer configuration state, enabling reactive UI updates or logic adjustments without direct dependencies.
|
||||
|
||||
---
|
||||
|
||||
### 2. **Public Interface**
|
||||
|
||||
- **`CalibrationBehaviorSettableInViewerChangedEvent`**
|
||||
- **Inherits from**: `CompositePresentationEvent<bool>`
|
||||
- **Behavior**: A Prism event used to publish and subscribe to changes in whether calibration behavior settings are settable (i.e., enabled) in the viewer. The payload is a `bool`: `true` indicates calibration behavior *is* settable; `false` indicates it is not.
|
||||
- **Usage**: Published when the underlying logic determines that the user should or should not be allowed to modify calibration behavior via the viewer UI (e.g., due to permissions, mode constraints, or data state).
|
||||
|
||||
- **`ViewerSettingsVisibilityChangedEvent`**
|
||||
- **Inherits from**: `CompositePresentationEvent<Visibility>`
|
||||
- **Behavior**: A Prism event used to publish and subscribe to changes in the visibility of the viewer settings panel. The payload is a `System.Windows.Visibility` value (`Visible`, `Collapsed`, or `Hidden`).
|
||||
- **Usage**: Published when the viewer settings panel is shown, hidden, or collapsed—e.g., in response to user actions (toggling a settings button) or application state changes (e.g., entering full-screen mode).
|
||||
|
||||
---
|
||||
|
||||
### 3. **Invariants**
|
||||
- Both events are *purely informational*—they carry no side effects beyond notification; subscribers are responsible for any state changes or UI updates.
|
||||
- The payload for `CalibrationBehaviorSettableInViewerChangedEvent` is strictly a `bool`, with no defined semantics beyond “settable” (`true`) vs. “not settable” (`false`). No intermediate or invalid states are implied.
|
||||
- The payload for `ViewerSettingsVisibilityChangedEvent` must be one of the three `Visibility` enum values defined in `System.Windows`, and no other values are expected.
|
||||
- Events are published *asynchronously* (via Prism’s `CompositePresentationEvent` semantics), so subscribers may not receive events in the same call stack as the publisher.
|
||||
- No ordering guarantees are provided between these two events—e.g., a visibility change may occur before or after a settable-state change, and subscribers must handle arbitrary sequences.
|
||||
|
||||
---
|
||||
|
||||
### 4. **Dependencies**
|
||||
|
||||
- **External Dependencies**:
|
||||
- `Microsoft.Practices.Prism.Events` (Prism library for event aggregation).
|
||||
- `System.Windows` (for `Visibility` type used in `ViewerSettingsVisibilityChangedEvent`).
|
||||
|
||||
- **Namespace**:
|
||||
- Defined in `DTS.Common.Events`, indicating it is part of a shared/common core library (`DTS.CommonCore`).
|
||||
|
||||
- **Inferred Usage**:
|
||||
- Likely consumed by viewer-related UI components (e.g., a settings panel view model or control) and possibly by core logic modules that manage calibration or viewer state.
|
||||
- No direct reverse dependencies are visible in the source—these are leaf event definitions.
|
||||
|
||||
---
|
||||
|
||||
### 5. **Gotchas**
|
||||
- **No default value semantics**: The source does not specify what the *initial* value of `CalibrationBehaviorSettableInViewerChangedEvent` or `ViewerSettingsVisibilityChangedEvent` should be (e.g., whether `false` or `Visibility.Collapsed` is the default). Subscribers must not assume an initial state unless documented elsewhere.
|
||||
- **`Visibility` ambiguity**: `Visibility` has three states (`Visible`, `Collapsed`, `Hidden`), but the source does not clarify whether all three are intentionally used or whether only `Visible`/`Collapsed` are expected. Misuse (e.g., publishing `Hidden` when only `Collapsed` is handled) could cause subtle UI inconsistencies.
|
||||
- **No deprecation or versioning markers**: The events lack attributes or comments indicating planned obsolescence, migration paths, or versioning—though this may be handled at a higher architectural layer.
|
||||
- **Namespace consistency**: The `// ReSharper disable CheckNamespace` directive suggests the namespace is intentionally `DTS.Common.Events` (not nested under `DTS.CommonCore.Events`), which may conflict with folder structure expectations. Developers should verify expected namespace usage.
|
||||
- **None identified from source alone.**
|
||||
@@ -0,0 +1,136 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.CommonCore/Events/DTS.Viewer/ViewerTestSummary/ChannelSelectionCountNotification.cs
|
||||
- Common/DTS.CommonCore/Events/DTS.Viewer/ViewerTestSummary/ChannelsModificationNotification.cs
|
||||
- Common/DTS.CommonCore/Events/DTS.Viewer/ViewerTestSummary/ChannelSelectionChangeNotification.cs
|
||||
- Common/DTS.CommonCore/Events/DTS.Viewer/ViewerTestSummary/GraphChannelReadCalcProgressChangedEvent.cs
|
||||
- Common/DTS.CommonCore/Events/DTS.Viewer/ViewerTestSummary/GraphChannelsReadCompletedNotification.cs
|
||||
- Common/DTS.CommonCore/Events/DTS.Viewer/ViewerTestSummary/DataFileSelectedEvent.cs
|
||||
- Common/DTS.CommonCore/Events/DTS.Viewer/ViewerTestSummary/GraphLoadedCountNotification.cs
|
||||
- Common/DTS.CommonCore/Events/DTS.Viewer/ViewerTestSummary/TestLoadedCountNotification.cs
|
||||
- Common/DTS.CommonCore/Events/DTS.Viewer/ViewerTestSummary/TestSummaryCountNotification.cs
|
||||
- Common/DTS.CommonCore/Events/DTS.Viewer/ViewerTestSummary/GraphClearNotification.cs
|
||||
- Common/DTS.CommonCore/Events/DTS.Viewer/ViewerTestSummary/GraphSelectedChannelCountNotification.cs
|
||||
- Common/DTS.CommonCore/Events/DTS.Viewer/ViewerTestSummary/GraphSelectedChannelsNotification.cs
|
||||
- Common/DTS.CommonCore/Events/DTS.Viewer/ViewerTestSummary/ChannelsModificationLineFitNotification.cs
|
||||
- Common/DTS.CommonCore/Events/DTS.Viewer/ViewerTestSummary/TestSummaryChangeNotification.cs
|
||||
- Common/DTS.CommonCore/Events/DTS.Viewer/ViewerTestSummary/DataFolderChangedEvent.cs
|
||||
generated_at: "2026-04-16T02:50:13.872680+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "cf000c210789fe90"
|
||||
---
|
||||
|
||||
# Documentation: DTS.Viewer Test Summary Events Module
|
||||
|
||||
## 1. Purpose
|
||||
This module defines a set of Prism-based event types used for decoupled communication within the DTS Viewer component, specifically for tracking and propagating changes related to test data selection, channel state, graph loading, and progress updates. It serves as a central event bus for UI and view model layers to react to state changes in the Test Summary view (e.g., when channels are selected, graphs are loaded, or data files/folders change), enabling modular and testable architecture without tight coupling between components.
|
||||
|
||||
## 2. Public Interface
|
||||
|
||||
All event classes inherit from `CompositePresentationEvent<TPayload>` (Prism event type), and payloads are strongly typed. Public types are:
|
||||
|
||||
### Event Classes (Payload Types in parentheses):
|
||||
|
||||
- **`ChannelSelectionCountNotification`** (`int`)
|
||||
Published when the count of selected test channels changes.
|
||||
|
||||
- **`ChannelsModificationNotification`** (`List<ITestChannel>`)
|
||||
Published when the set of selected test channels is modified (e.g., added/removed). Payload is the *current* list of selected channels.
|
||||
|
||||
- **`ChannelSelectionChangeNotification`** (`List<ITestChannel>`)
|
||||
Published when the selected test channel list changes. Payload is the *new* list of selected channels.
|
||||
*Note: Semantically similar to `ChannelsModificationNotification`; distinction unclear from source.*
|
||||
|
||||
- **`GraphChannelReadCalcProgressChangedEvent`** (`GraphChannelReadCalcProgressChangedEventArgs`)
|
||||
Published to report progress during graph channel read/calculation. Payload contains:
|
||||
- `ProgressMessage`: string description of current operation.
|
||||
- `ProgressPercent`: double (0–100) indicating completion percentage.
|
||||
- `GraphVM`: `IBaseViewModel` instance associated with the graph.
|
||||
|
||||
- **`GraphChannelsReadCompletedNotification`** (`GraphChannelsReadCompletedNotificationArgs`)
|
||||
Published when reading channels for a graph completes. Payload contains:
|
||||
- `IsReadCompleted`: bool indicating success/failure status.
|
||||
- `GraphVM`: `IBaseViewModel` instance associated with the graph.
|
||||
|
||||
- **`DataFileSelectedEvent`** (`DataFileSelectionArg`)
|
||||
Published when a specific data file is selected (distinct from folder-level changes). Payload contains:
|
||||
- `File`: string path to the selected file.
|
||||
- `ParentVM`: `IBaseViewModel` referencing the owner view model (for multi-view reuse).
|
||||
|
||||
- **`GraphLoadedCountNotification`** (`GraphLoadedCountNotificationArg`)
|
||||
Published when the count of loaded graphs changes. Payload contains:
|
||||
- `LoadedCount`: int number of loaded graphs.
|
||||
- `ParentVM`: `IBaseViewModel` instance (for multi-view reuse).
|
||||
|
||||
- **`TestLoadedCountNotification`** (`TestLoadedCountNotificationArg`)
|
||||
Published when the count of loaded tests changes. Payload contains:
|
||||
- `LoadedCount`: int number of loaded tests.
|
||||
- `ParentVM`: `IBaseViewModel` instance.
|
||||
|
||||
- **`TestSummaryCountNotification`** (`TestSummaryCountNotificationArg`)
|
||||
Published when the count of items in the test summary list changes. Payload contains:
|
||||
- `SummaryCount`: int number of summary items.
|
||||
- `ParentVM`: `IBaseViewModel` instance.
|
||||
|
||||
- **`GraphClearNotification`** (`GraphClearNotificationArg`)
|
||||
Published when a graph is cleared. Payload contains:
|
||||
- `GraphClear`: bool (always `true` per usage; likely legacy naming).
|
||||
- `ParentVM`: `IBaseViewModel` instance.
|
||||
|
||||
- **`GraphSelectedChannelCountNotification`** (`GraphSelectedChannelCountNotificationArg`)
|
||||
Published when the count of selected channels *for a specific graph* changes. Payload contains:
|
||||
- `SelectedChannelCount`: int number of selected channels.
|
||||
- `ParentVM`: `IBaseViewModel` instance.
|
||||
|
||||
- **`GraphSelectedChannelsNotification`** (`GraphSelectedChannelsNotificationArg`)
|
||||
Published when the set of selected channels *for a specific graph* changes. Payload contains:
|
||||
- `SelectedChannels`: `List<ITestChannel>` (current selection).
|
||||
- `ParentVM`: `IBaseViewModel` instance.
|
||||
|
||||
- **`ChannelsModificationLineFitNotification`** (`LineFitArgs`)
|
||||
Published to request or notify about line-fit calculations on a channel. Payload contains:
|
||||
- `Channel`: `ITestChannel` to process.
|
||||
- `StartIndex`: `ulong` start index for fit range.
|
||||
- `EndIndex`: `ulong` end index for fit range.
|
||||
|
||||
- **`TestSummaryChangeNotification`** (`TestSummaryChangeNotificationArg`)
|
||||
Published when the test summary list changes. Payload contains:
|
||||
- `SummaryList`: `List<ITestSummary>` (new summary items).
|
||||
- `ParentVM`: `IBaseViewModel` instance.
|
||||
|
||||
- **`DataFolderChangedEvent`** (`DataFolderSelectionArg`)
|
||||
Published when the data folder path changes. Payload contains:
|
||||
- `Path`: string folder path.
|
||||
- `File`: string file path (may be null or empty).
|
||||
- `SetSelected`: bool flag indicating whether to select the file in UI/viewer (default `false`).
|
||||
- `ParentVM`: `IBaseViewModel` instance.
|
||||
|
||||
## 3. Invariants
|
||||
|
||||
- All events derive from `CompositePresentationEvent<T>`, implying they are published/subscribed via Prism’s `EventAggregator`.
|
||||
- Payloads are *always* passed by reference (no defensive copies implied by source).
|
||||
- `ParentVM` is consistently present in all events related to multi-view reuse (commented as part of issue #24417), and must be non-null when used in contexts requiring view model scoping.
|
||||
- `DataFileSelectedEvent` is explicitly intended *not* to trigger `DataFolderChangedEvent` subscribers (per inline comment), indicating a semantic distinction between file-level and folder-level selection.
|
||||
- `GraphClearNotificationArg.GraphClear` is always `true` in practice (despite being a `bool` property), suggesting legacy naming or incomplete refactoring.
|
||||
|
||||
## 4. Dependencies
|
||||
|
||||
### Dependencies *of* this module:
|
||||
- `Microsoft.Practices.Prism.Events` (Prism library for event aggregation).
|
||||
- `DTS.Common.Base` (provides `IBaseViewModel`).
|
||||
- `DTS.Common.Interface` (provides `ITestChannel`, `ITestSummary`).
|
||||
- `DTS.Common.Interface.TestDefinition` (provides `ITestSummary` via `TestSummaryChangeNotification`).
|
||||
|
||||
### Dependencies *on* this module:
|
||||
- Any component in the Viewer/Test Summary UI or view models that needs to react to selection, loading, or progress changes (e.g., `IBaseViewModel` implementations, UI controls).
|
||||
- Likely consumed by modules handling graph rendering, channel selection, and data file/folder navigation.
|
||||
|
||||
## 5. Gotchas
|
||||
|
||||
- **Ambiguous event semantics**: `ChannelsModificationNotification` and `ChannelSelectionChangeNotification` both carry `List<ITestChannel>` and have near-identical documentation ("selected Test Summary list changed" vs "selected Graphs changed"). Without runtime usage context, it is unclear if they serve distinct purposes or are redundant.
|
||||
- **`GraphClear` property naming**: `GraphClearNotificationArg.GraphClear` is always `true` (per usage pattern), suggesting it should be a constant or removed. Its presence may mislead consumers into expecting variable state.
|
||||
- **`DataFileSelectedEvent` vs `DataFolderChangedEvent`**: Though both involve file/folder paths, `DataFileSelectedEvent` is explicitly designed *not* to trigger `DataFolderChangedEvent` subscriptions. Consumers must avoid conflating the two.
|
||||
- **`LineFitArgs` immutability**: `LineFitArgs` has read-only properties (`Channel`, `StartIndex`, `EndIndex`) initialized via constructor, but `ChannelsModificationLineFitNotification` is a *notification* (not a request), implying consumers should not mutate the payload.
|
||||
- **`ParentVM` usage**: All events with `ParentVM` are tied to multi-view reuse (issue #24417). Omitting or misassigning `ParentVM` may cause incorrect view scoping in PSD report or other derived viewers.
|
||||
- **No validation rules**: Payloads (e.g., `List<ITestChannel>`, `IBaseViewModel`) are not validated in the event definitions. Consumers must handle nulls, empty lists, or invalid states.
|
||||
Reference in New Issue
Block a user