init
This commit is contained in:
@@ -0,0 +1,68 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.Common/Events/ChannelCodes/ChannelCodesViewChangedEvent.cs
|
||||
- Common/DTS.Common/Events/ChannelCodes/ChannelCodeCommittedEvent.cs
|
||||
generated_at: "2026-04-16T03:25:06.865522+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "6fb84d209aefd419"
|
||||
---
|
||||
|
||||
# ChannelCodes
|
||||
|
||||
## Documentation: Channel Codes Event Definitions
|
||||
|
||||
### 1. Purpose
|
||||
This module defines Prism-based pub/sub events used to communicate channel code state changes across the application—specifically, when the user switches the view mode for channel codes (`ChannelCodesViewChangedEvent`) and when one or more channel codes are committed (saved) by the user (`ChannelCodeCommittedEvent`). These events decouple UI components (e.g., views, viewmodels) that trigger or react to channel code operations, enabling modular and testable interaction without tight coupling.
|
||||
|
||||
---
|
||||
|
||||
### 2. Public Interface
|
||||
|
||||
#### `ChannelCodesViewChangedEvent`
|
||||
- **Type**: `class` (inherits `PubSubEvent<DTS.Common.Enums.IsoViewMode>`)
|
||||
- **Payload**: `DTS.Common.Enums.IsoViewMode`
|
||||
- **Behavior**: A singleton event used to notify subscribers when the active view mode for channel codes has changed. The payload indicates the new view mode (e.g., `IsoViewMode.List`, `IsoViewMode.Tree`). Subscribers should update their UI or internal state accordingly.
|
||||
|
||||
#### `ChannelCodeCommittedEvent`
|
||||
- **Type**: `class` (inherits `PubSubEvent<ChannelCodeCommittedEventArgs[]>`)
|
||||
- **Payload**: `ChannelCodeCommittedEventArgs[]` (array of committed channel codes)
|
||||
- **Behavior**: A singleton event used to publish one or more channel codes that have been successfully committed (e.g., saved or persisted). Subscribers may refresh caches, update related UI, or audit the action.
|
||||
|
||||
##### `ChannelCodeCommittedEventArgs`
|
||||
- **Type**: `class`
|
||||
- **Properties**:
|
||||
- `ChannelCodeType`: `ChannelEnumsAndConstants.ChannelCodeType` — the semantic type of the channel code (e.g., `ChannelCodeType.Network`, `ChannelCodeType.Service`).
|
||||
- `Code`: `string` — the canonical identifier string for the channel code (e.g., `"NBC"`).
|
||||
- `Name`: `string` — the human-readable display name (e.g., `"National Broadcasting Company"`).
|
||||
- `CanUserCommitChannelCodes`: `bool` — indicates whether the user who triggered the commit has write privileges for channel codes.
|
||||
- **Behavior**: Encapsulates metadata about a single committed channel code. Instances are created and published as part of the `ChannelCodeCommittedEvent` payload.
|
||||
|
||||
---
|
||||
|
||||
### 3. Invariants
|
||||
- `ChannelCodeCommittedEventArgs.Code` and `ChannelCodeCommittedEventArgs.Name` are non-null (enforced by constructor; no validation is performed in the class itself, but nulls would likely cause downstream failures).
|
||||
- `ChannelCodeCommittedEventArgs.ChannelCodeType` must be a valid member of `ChannelEnumsAndConstants.ChannelCodeType` (enforced by caller; no runtime check in the class).
|
||||
- `ChannelCodeCommittedEvent` payload is always an array (possibly empty or with one or more elements); no ordering guarantee is specified.
|
||||
- `CanUserCommitChannelCodes` reflects the *submitting user’s* privileges at the time of commit, not necessarily the current user’s privileges.
|
||||
|
||||
---
|
||||
|
||||
### 4. Dependencies
|
||||
- **Dependencies on other modules**:
|
||||
- `Prism.Events` (external library for event aggregation).
|
||||
- `DTS.Common.Enums` (for `IsoViewMode` used in `ChannelCodesViewChangedEvent`).
|
||||
- `DTS.Common.Enums.Channels` (for `ChannelEnumsAndConstants.ChannelCodeType` used in `ChannelCodeCommittedEventArgs`).
|
||||
- **Depended upon by**:
|
||||
- UI components (e.g., views/viewmodels handling channel code display or editing) that subscribe to these events to synchronize state.
|
||||
- Likely consumed by modules in `DTS.Common` and higher layers (e.g., `DTS.Client` or `DTS.Application`) that manage channel code workflows.
|
||||
|
||||
---
|
||||
|
||||
### 5. Gotchas
|
||||
- **Namespace inconsistency**: `ChannelCodesViewChangedEvent` resides in `DTS.Common.Events`, while `ChannelCodeCommittedEvent` resides in `DTS.Common.Events.ChannelCodes`. This may cause confusion when discovering or subscribing to events.
|
||||
- **No validation in `ChannelCodeCommittedEventArgs`**: The constructor accepts any `string` values for `Code`/`Name` and does not enforce non-empty or format constraints. Callers must ensure validity.
|
||||
- **Privilege flag is static at commit time**: `CanUserCommitChannelCodes` is captured at the moment of commit and does not reflect potential privilege changes afterward. Subscribers should treat it as a historical snapshot.
|
||||
- **No documentation of `IsoViewMode` values**: The meaning of each `IsoViewMode` enum member is not included here; refer to `DTS.Common.Enums.IsoViewMode` definition.
|
||||
- **Array payload may be empty**: `ChannelCodeCommittedEvent` may be published with an empty array (e.g., in batch operations where no codes were actually modified). Subscribers should handle this case.
|
||||
- **None identified from source alone** for `ChannelCodesViewChangedEvent` beyond namespace inconsistency.
|
||||
@@ -0,0 +1,39 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.Common/Events/DASFactory/DASConfigurationEvent.cs
|
||||
generated_at: "2026-04-16T03:25:13.824064+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "e69018b59746b653"
|
||||
---
|
||||
|
||||
# DASFactory
|
||||
|
||||
### 1. **Purpose**
|
||||
This module defines the `DASConfigurationEvent`, a Prism-based pub/sub event used to notify subscribers about DAS (Device Abstraction Service) configuration state changes—specifically, to signal when configuration data is blank or missing. It supports emergency download scenarios (per issue #17872) where DAS must fall back to XML configuration files on disk when filestore entries are blank, ensuring robustness during recovery operations.
|
||||
|
||||
### 2. **Public Interface**
|
||||
- **`DASConfigurationEvent`**
|
||||
- *Type*: `class` (inherits from `PubSubEvent<IDASConfigurationArg>`)
|
||||
- *Behavior*: A Prism `PubSubEvent` payload for publishing and subscribing to configuration-related notifications. The event carries an argument of type `IDASConfigurationArg`, which encapsulates the configuration state (e.g., blank/missing indicators). Subscribers receive this event when DAS configuration issues occur.
|
||||
|
||||
### 3. **Invariants**
|
||||
- The event **only publishes** when configuration data is blank or missing; it is not used for normal (valid) configuration updates.
|
||||
- The payload type is strictly `IDASConfigurationArg`; no other argument types are supported.
|
||||
- The event inherits Prism’s `PubSubEvent<TPayload>` semantics:
|
||||
- Subscriptions are weak-referenced by default (to prevent memory leaks).
|
||||
- Events are published asynchronously unless explicitly configured otherwise via Prism’s `ThreadOption`.
|
||||
|
||||
### 4. **Dependencies**
|
||||
- **Depends on**:
|
||||
- `Prism.Events` (for `PubSubEvent<T>` base class).
|
||||
- `DTS.Common.Interface.DASFactory.IDASConfigurationArg` (the payload interface defining the contract for configuration arguments).
|
||||
- **Used by**:
|
||||
- Components in the DAS factory or configuration subsystem that detect blank/missing configurations (e.g., during emergency download workflows).
|
||||
- Subscribers (e.g., UI or service layers) that need to react to configuration failures (e.g., by prompting user action or switching to fallback XML files).
|
||||
|
||||
### 5. **Gotchas**
|
||||
- The event is **not intended for general configuration changes**—only for *blank/missing* states. Publishing it for valid configurations would violate its semantic contract.
|
||||
- The actual structure and contents of `IDASConfigurationArg` are defined externally (in `DTS.Common.Interface.DASFactory`); this file does not specify them, so behavior details (e.g., which properties indicate "blank/missing") are not inferable here.
|
||||
- No explicit error codes or metadata are included in the event itself; subscribers must rely on `IDASConfigurationArg`’s implementation for diagnostic details.
|
||||
- None identified from source alone.
|
||||
@@ -0,0 +1,65 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.Common/Events/DTS.Viewer/Reports/SaveReportToCSVRequestedEvent.cs
|
||||
- Common/DTS.Common/Events/DTS.Viewer/Reports/SaveReportToPDFRequestedEvent.cs
|
||||
generated_at: "2026-04-16T03:27:02.713322+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "c23355273750380a"
|
||||
---
|
||||
|
||||
# Reports
|
||||
|
||||
## Documentation: Report Export Request Events
|
||||
|
||||
### 1. Purpose
|
||||
This module defines Prism-based pub/sub events used to signal user-initiated requests to export report data to external formats—specifically CSV and PDF. These events decouple the UI layer (e.g., a report viewer control or dialog) from the export implementation logic, enabling loose coupling and testability in the MVVM pattern. When a user selects "Save as CSV" or "Save as PDF", the UI publishes the corresponding event, and a dedicated handler (e.g., in a service or view model) subscribes to perform the actual file I/O and export processing.
|
||||
|
||||
### 2. Public Interface
|
||||
|
||||
- **`SaveReportToCSVRequestedEvent`**
|
||||
*Type:* `class` inheriting from `PubSubEvent<SaveReportToCSVRequestedEventArgs>`
|
||||
*Behavior:* A Prism event used to publish requests to save a report to CSV format. Subscribers receive an instance of `SaveReportToCSVRequestedEventArgs` containing the target directory and parent view model context.
|
||||
|
||||
- **`SaveReportToCSVRequestedEventArgs`**
|
||||
*Type:* `class`
|
||||
*Properties:*
|
||||
- `Directory` (`string`): The file system directory where the CSV file should be saved.
|
||||
- `ParentVM` (`IBaseViewModel`): The view model that initiated or owns the report context (e.g., the active report view model). Used for context-aware operations (e.g., resolving data sources or parent window handles).
|
||||
|
||||
- **`SaveReportToPDFRequestedEvent`**
|
||||
*Type:* `class` inheriting from `PubSubEvent<SaveReportToPDFRequestedEventArgs>`
|
||||
*Behavior:* A Prism event used to publish requests to save a report to PDF format. Subscribers receive an instance of `SaveReportToPDFRequestedEventArgs` with the same payload structure as the CSV variant.
|
||||
|
||||
- **`SaveReportToPDFRequestedEventArgs`**
|
||||
*Type:* `class`
|
||||
*Properties:*
|
||||
- `Directory` (`string`): The file system directory where the PDF file should be saved.
|
||||
- `ParentVM` (`IBaseViewModel`): The view model that initiated or owns the report context.
|
||||
|
||||
> **Note:** Both event argument classes are *mutable* (public setters on properties) and lack validation or immutability guarantees.
|
||||
|
||||
### 3. Invariants
|
||||
- The `Directory` property in both argument types is expected to be a valid, writable file system path at the time of event publication.
|
||||
- The `ParentVM` property is expected to be non-null at event publication; however, no explicit null-checking or enforcement is present in the event argument classes themselves.
|
||||
- Events are published *before* export logic executes (i.e., they are request triggers, not completion notifications).
|
||||
- No ordering guarantees exist between multiple subscribers—concurrent or conflicting writes to the same path are possible if not handled by subscribers.
|
||||
|
||||
### 4. Dependencies
|
||||
- **Internal Dependencies:**
|
||||
- `DTS.Common.Base.IBaseViewModel`: Defines the contract for view models used in the parent context.
|
||||
- `Prism.Events.PubSubEvent<T>`: Prism’s event aggregation infrastructure.
|
||||
- **External Dependencies:**
|
||||
- `System` and `System.Collections.Generic`, `System.Linq`, `System.Text`, `System.Threading.Tasks`: Standard .NET libraries.
|
||||
- **Consumers (inferred):**
|
||||
- UI components (e.g., report viewer controls) that publish these events on user action.
|
||||
- Export service classes or view models that subscribe to these events to handle file generation.
|
||||
- Likely used in conjunction with `IBaseViewModel` implementations that expose report data and coordinate with export services.
|
||||
|
||||
### 5. Gotchas
|
||||
- **No filename specification:** The event arguments only provide a *directory*, not a filename. Subscribers must derive filenames (e.g., via timestamp, report name from `ParentVM`, or user input), which may lead to inconsistent naming or overwrites if not handled carefully.
|
||||
- **No cancellation support:** Events lack a mechanism to signal cancellation (e.g., via `CancellationToken`) or to abort the operation mid-process.
|
||||
- **No error propagation:** Exceptions thrown by subscribers are not captured or propagated back to the publisher; error handling must be implemented entirely within subscribers.
|
||||
- **No format-specific metadata:** Arguments do not include export options (e.g., CSV delimiter, PDF page size, inclusion of headers). Subscribers must hardcode or infer such settings.
|
||||
- **Mutable payload:** Since `Directory` and `ParentVM` have public setters, subscribers could inadvertently modify the event args—though this is unlikely to be intentional.
|
||||
- **None identified from source alone.**
|
||||
@@ -0,0 +1,74 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.Common/Events/DTS.Viewer/Reports/PowerSpectralDensity/PSDReportSettingsChangedEvent.cs
|
||||
- Common/DTS.Common/Events/DTS.Viewer/Reports/PowerSpectralDensity/PSDReportGRMSValuesUpdatedEvent.cs
|
||||
generated_at: "2026-04-16T03:27:06.629572+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "bc3a14258ff7c95a"
|
||||
---
|
||||
|
||||
# PowerSpectralDensity
|
||||
|
||||
## Documentation: Power Spectral Density (PSD) Report Events
|
||||
|
||||
---
|
||||
|
||||
### 1. **Purpose**
|
||||
This module defines Prism-based pub/sub events used to communicate state changes and data updates within the Power Spectral Density (PSD) report generation and display subsystem. Specifically, it enables decoupled notification of changes to PSD report configuration settings (`PSDReportSettingsChangedEvent`) and updates to GRMS (Root Mean Square of acceleration) summary values per channel (`PSDReportGRMSValuesUpdatedEvent`). These events facilitate reactive UI updates and model synchronization without tight coupling between view models and data models in the DTS Viewer application.
|
||||
|
||||
---
|
||||
|
||||
### 2. **Public Interface**
|
||||
|
||||
#### `PSDReportSettingsChangedEvent`
|
||||
- **Type**: `class` inheriting from `PubSubEvent<PSDReportSettingsChangedEventArg>`
|
||||
- **Behavior**: A Prism event used to publish notifications when PSD report settings have been modified. Subscribers receive an instance of `PSDReportSettingsChangedEventArg` containing the updated settings model and the originating view model.
|
||||
|
||||
#### `PSDReportSettingsChangedEventArg`
|
||||
- **Type**: `class`
|
||||
- **Properties**:
|
||||
- `Model`: `IPSDReportSettingsModel` — The updated PSD report settings model.
|
||||
- `ParentVM`: `IBaseViewModel` — The view model that triggered or owns the settings change.
|
||||
|
||||
#### `PSDReportGRMSValuesUpdatedEvent`
|
||||
- **Type**: `class` inheriting from `PubSubEvent<PSDReportGRMSValuesUpdatedEventArg>`
|
||||
- **Behavior**: A Prism event used to publish notifications when GRMS summary values (per channel) have been recalculated or updated. Subscribers receive an instance of `PSDReportGRMSValuesUpdatedEventArg` containing the new GRMS values and the originating view model.
|
||||
|
||||
#### `PSDReportGRMSValuesUpdatedEventArg`
|
||||
- **Type**: `class`
|
||||
- **Properties**:
|
||||
- `Values`: `IChannelGRMSSummary[]` — Array of GRMS summary values, one per channel.
|
||||
- `ParentVM`: `IBaseViewModel` — The view model responsible for the update.
|
||||
|
||||
---
|
||||
|
||||
### 3. **Invariants**
|
||||
|
||||
- **Event argument nullability**: Neither `Model` (in `PSDReportSettingsChangedEventArg`) nor `Values` (in `PSDReportGRMSValuesUpdatedEventArg`) is explicitly guaranteed to be non-null in the source. However, since they are public setters on reference types, callers are expected to provide valid instances when raising the events.
|
||||
- **ParentVM requirement**: `ParentVM` is present in both argument types but is not validated for null. It is assumed that the publisher always sets `ParentVM` to the relevant view model context.
|
||||
- **Ordering**: No ordering guarantees are specified or implied for event delivery; subscribers must not rely on event sequence unless enforced externally.
|
||||
|
||||
---
|
||||
|
||||
### 4. **Dependencies**
|
||||
|
||||
#### Dependencies *of* this module:
|
||||
- `DTS.Common.Base` — Provides `IBaseViewModel`.
|
||||
- `DTS.Common.Interface` — Provides:
|
||||
- `IPSDReportSettingsModel`
|
||||
- `IChannelGRMSSummary`
|
||||
- `Prism.Events` — Provides `PubSubEvent<T>` base class.
|
||||
|
||||
#### Dependencies *on* this module:
|
||||
- Any module/view model involved in PSD report configuration or GRMS calculation (e.g., report view models, data processing services) likely subscribes to or publishes these events. However, no explicit consumers are visible in the provided source.
|
||||
|
||||
---
|
||||
|
||||
### 5. **Gotchas**
|
||||
|
||||
- **No validation or immutability**: The argument classes expose public setters for all properties, meaning subscribers could inadvertently mutate the event args. There is no indication of immutability or defensive copying.
|
||||
- **Ambiguous scope of `ParentVM`**: While `ParentVM` is included, its semantics (e.g., whether it is the *originator*, *owner*, or *context* of the change) are not documented in this file. Consumers must infer usage from surrounding code.
|
||||
- **Array mutability risk**: `Values` is exposed as `IChannelGRMSSummary[]`, a mutable array. Subscribers may modify the array contents, potentially causing side effects if the same instance is reused.
|
||||
- **Missing documentation of event semantics**: The source does not clarify whether events are *synchronous*, *thread-affine*, or *throttled*. Behavior depends on Prism’s default `PubSubEvent` behavior (synchronous, UI-thread aware if subscribed on UI thread), but this is not explicit here.
|
||||
- **None identified from source alone.** *(Note: The above are inferred based on common pitfalls with Prism events and public mutable properties, not explicit warnings in the source.)*
|
||||
@@ -0,0 +1,102 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.Common/Events/DTS.Viewer/TestModification/RefreshTestRequestEvent.cs
|
||||
- Common/DTS.Common/Events/DTS.Viewer/TestModification/ShowT0CursorEvent.cs
|
||||
- Common/DTS.Common/Events/DTS.Viewer/TestModification/TestModificationChangedEvent.cs
|
||||
- Common/DTS.Common/Events/DTS.Viewer/TestModification/SetUseZeroForUnfilteredEvent.cs
|
||||
- Common/DTS.Common/Events/DTS.Viewer/TestModification/TestModificationEvent.cs
|
||||
- Common/DTS.Common/Events/DTS.Viewer/TestModification/ShiftT0Event.cs
|
||||
generated_at: "2026-04-16T03:26:33.870349+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "74b84eb90ba5f23e"
|
||||
---
|
||||
|
||||
# TestModification
|
||||
|
||||
## Documentation: Test Modification Event Module
|
||||
|
||||
### 1. Purpose
|
||||
This module defines a set of Prism-based pub/sub events used to coordinate test modification operations within the DTS Viewer component. It enables decoupled communication between UI components (e.g., viewers, controllers) and backend services (e.g., data processors, ROI generators) when tests are modified, T0 cursor state changes, or related configuration (e.g., `UseZeroForUnfiltered`) is updated. The events serve as a contract for propagating state changes and user actions related to test metadata, cursor positioning, and filtering behavior.
|
||||
|
||||
### 2. Public Interface
|
||||
|
||||
- **`RefreshTestRequestEvent`**
|
||||
```csharp
|
||||
public class RefreshTestRequestEvent : PubSubEvent<string> { }
|
||||
```
|
||||
Publishes a request to refresh a specific test, identified by its `string` test ID. Payload is the test ID.
|
||||
|
||||
- **`ShowT0CursorEvent`**
|
||||
```csharp
|
||||
public class ShowT0CursorEvent : PubSubEvent<bool> { }
|
||||
```
|
||||
Publishes a request to show or hide the T0 cursor. Payload is a `bool`: `true` to show, `false` to hide.
|
||||
|
||||
- **`TestModificationChangedEvent`**
|
||||
```csharp
|
||||
public class TestModificationChangedEvent : PubSubEvent<ITestModificationModel> { }
|
||||
```
|
||||
Publishes when the test modification model has changed. Payload is an `ITestModificationModel` instance representing the new/updated state.
|
||||
|
||||
- **`SetUseZeroForUnfilteredEvent`**
|
||||
```csharp
|
||||
public class SetUseZeroForUnfilteredEvent : PubSubEvent<bool> { }
|
||||
```
|
||||
Publishes a request to set the `UseZeroForUnfiltered` property. Payload is a `bool`: `true` means `0` is used in the isocode filter field for unfiltered cases; `false` means `P` is used.
|
||||
|
||||
- **`TestModificationEvent`**
|
||||
```csharp
|
||||
public class TestModificationEvent : PubSubEvent<TestModificationArgs> { }
|
||||
public class TestModificationArgs
|
||||
{
|
||||
public string DataSetDirectory { get; }
|
||||
public string TestId { get; }
|
||||
public TestModificationArgs(string dtsFilePath, string testId)
|
||||
}
|
||||
```
|
||||
Publishes whenever a test is modified by the viewer. Payload is a `TestModificationArgs` object containing:
|
||||
- `DataSetDirectory`: The path to the data set directory (originally passed as `dtsFilePath`).
|
||||
- `TestId`: The ID of the modified test.
|
||||
|
||||
- **`ShiftT0Event`**
|
||||
```csharp
|
||||
public class ShiftT0Event : PubSubEvent<ShiftT0EventArguments> { }
|
||||
public class ShiftT0EventArguments
|
||||
{
|
||||
public double T0Time { get; }
|
||||
public bool IsInitialization { get; }
|
||||
public int T0Steps { get; }
|
||||
public bool IsKeyPress { get; }
|
||||
public ShiftT0EventArguments(double t0, bool isInitialization)
|
||||
public ShiftT0EventArguments(int steps, bool isInitialization, bool isKeyPress)
|
||||
}
|
||||
```
|
||||
Publishes a request to shift the T0 time. Payload is a `ShiftT0EventArguments` object, constructed via one of two constructors:
|
||||
- `ShiftT0EventArguments(double t0, bool isInitialization)`: For absolute T0 time shifts. Sets `T0Time = t0`, `T0Steps = 0`, `IsKeyPress = false`.
|
||||
- `ShiftT0EventArguments(int steps, bool isInitialization, bool isKeyPress)`: For relative shifts (e.g., arrow key navigation). Sets `T0Time = 0`, `T0Steps = steps`, `IsKeyPress = isKeyPress`.
|
||||
|
||||
### 3. Invariants
|
||||
- All events derive from `Prism.Events.PubSubEvent<T>`, implying they are published/subscribed using Prism’s event aggregation mechanism.
|
||||
- `TestModificationArgs.TestId` and `TestModificationArgs.DataSetDirectory` are immutable after construction (`private set`).
|
||||
- `ShiftT0EventArguments` has two mutually exclusive modes of operation:
|
||||
- Absolute shift: `T0Time != 0`, `T0Steps == 0`, `IsKeyPress == false`.
|
||||
- Relative shift: `T0Time == 0`, `T0Steps != 0`, `IsKeyPress` reflects whether triggered by keyboard.
|
||||
- `ShowT0CursorEvent` payload is strictly interpreted as a boolean toggle (no undefined or null values).
|
||||
- `RefreshTestRequestEvent` payload is expected to be a valid test ID string (no validation is performed in this module).
|
||||
|
||||
### 4. Dependencies
|
||||
- **Dependencies on other modules**:
|
||||
- `Prism.Events` (external library for event aggregation).
|
||||
- `DTS.Common.Interface` (for `ITestModificationModel` used in `TestModificationChangedEvent`).
|
||||
- **Dependencies on this module**:
|
||||
- Inferred consumers include components that handle test modification (e.g., `DataPro` per `TestModificationEvent` summary), UI viewers managing T0 cursor visibility/position, and modules handling isocode filter configuration.
|
||||
- The module is part of `DTS.Common.Events`, suggesting it is consumed by viewer and data processing layers (e.g., `DTS.Viewer`, `DTS.DataPro`).
|
||||
|
||||
### 5. Gotchas
|
||||
- **Ambiguous naming**: `TestModificationChangedEvent`’s summary says “The Data Folder changed event”, but its payload is `ITestModificationModel`, not a folder path. This appears to be a documentation error.
|
||||
- **Constructor overloading ambiguity**: `ShiftT0EventArguments` has two constructors that set different fields; callers must ensure correct constructor is used. Mixing usage (e.g., passing `T0Time` in the steps-based constructor) is prevented by design but may cause confusion if not documented externally.
|
||||
- **No validation on payloads**: Events carry raw data (e.g., `string` test IDs, `double` T0 times) without built-in validation—consumers must validate inputs.
|
||||
- **`IsKeyPress` in `ShiftT0EventArguments` is only set in the relative-shift constructor**: In the absolute-shift constructor, it is always `false`, which may be non-obvious.
|
||||
- **Namespace consistency**: `// ReSharper disable CheckNamespace` is present in some files but not others—suggests possible inconsistency in namespace usage across the codebase (though all events reside in `DTS.Common.Events`).
|
||||
- **No versioning or deprecation markers**: Events may evolve without explicit signaling (e.g., adding fields to `TestModificationArgs` could break subscribers).
|
||||
@@ -0,0 +1,86 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.Common/Events/DTS.Viewer/ViewerChartOptions/ResetZoomChangedEvent.cs
|
||||
- Common/DTS.Common/Events/DTS.Viewer/ViewerChartOptions/CursorShowChangedEvent.cs
|
||||
- Common/DTS.Common/Events/DTS.Viewer/ViewerChartOptions/CursorsClearChangedEvent.cs
|
||||
- Common/DTS.Common/Events/DTS.Viewer/ViewerChartOptions/CursorShowMinMaxChangedEvent.cs
|
||||
- Common/DTS.Common/Events/DTS.Viewer/ViewerChartOptions/CursorsAlailableChangedEvent.cs
|
||||
- Common/DTS.Common/Events/DTS.Viewer/ViewerChartOptions/SaveToPDFRequestedEvent.cs
|
||||
- Common/DTS.Common/Events/DTS.Viewer/ViewerChartOptions/ChartAxisChangedEvent.cs
|
||||
- Common/DTS.Common/Events/DTS.Viewer/ViewerChartOptions/ChartOptionsChangedEvent.cs
|
||||
generated_at: "2026-04-16T03:26:50.843144+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "31b0212fbe1dea4d"
|
||||
---
|
||||
|
||||
# ViewerChartOptions
|
||||
|
||||
## Documentation: Viewer Chart Options Events
|
||||
|
||||
### 1. Purpose
|
||||
This module defines a set of Prism `PubSubEvent`-based events used to communicate state changes and user requests related to chart visualization options in the DTS Viewer component. These events decouple chart UI controls (e.g., zoom, cursor, axis, export) from the underlying view models and chart rendering logic, enabling loose coupling and event-driven updates across the application. All events reside in the `DTS.Common.Events` namespace and are part of the shared `DTS.Common` library.
|
||||
|
||||
---
|
||||
|
||||
### 2. Public Interface
|
||||
|
||||
| Event Class | Payload Type | Behavior |
|
||||
|-------------|--------------|----------|
|
||||
| `ResetZoomChangedEvent` | `bool` | Published when the reset-zoom option state changes (e.g., enabled/disabled). *Note: XML comment incorrectly states “The Data Folder changed event.”* |
|
||||
| `CursorShowChangedEvent` | `bool` | Published when the visibility state of the primary cursor changes. *Note: XML comment incorrectly states “The Data Folder changed event.”* |
|
||||
| `CursorsClearChangedEvent` | `bool` | Published when the state of the “clear cursors” option changes. *Note: XML comment incorrectly states “The Data Folder changed event.”* |
|
||||
| `CursorShowMinMaxChangedEvent` | `bool` | Published when the option to show min/max values for cursors changes. *Note: XML comment incorrectly states “The Data Folder changed event.”* |
|
||||
| `CursorsAlailableChangedEvent` | `bool` | Published when the availability (e.g., enabled/disabled) of cursor functionality changes. *Note: Typo in class name (`Alailable` instead of `Available`); XML comment incorrectly states “The Data Folder changed event.”* |
|
||||
| `SaveToPDFRequestedEvent` | `string` | Published when the user requests saving the current chart to PDF. The payload is a string—likely a suggested file path or filename. |
|
||||
| `ChartAxisChangedEvent` | `ChartAxisChangedEventArg` | Published when chart axis ranges are modified. Payload contains the parent view model, axis identifier, and min/max values. |
|
||||
| `ChartOptionsChangedEvent` | `ChartOptionsChangedEventArg` | Published when general chart options change (e.g., chart type, model settings). Payload contains the parent view model, the updated chart options model, and chart type. |
|
||||
|
||||
**Helper Types**
|
||||
- `ChartAxisChangedEventArg`
|
||||
- `ParentVM`: `IBaseViewModel` – The view model associated with the chart.
|
||||
- `Axis`: `string` – Identifier for the axis (e.g., `"X"`, `"Y"`, `"Primary"`, `"Secondary"`).
|
||||
- `MinValue`: `double` – New minimum value for the axis.
|
||||
- `MaxValue`: `double` – New maximum value for the axis.
|
||||
|
||||
- `ChartOptionsChangedEventArg`
|
||||
- `ParentVM`: `IBaseViewModel` – The view model associated with the chart.
|
||||
- `Model`: `IChartOptionsModel` – The updated chart options model instance.
|
||||
- `ChartType`: `string` – The chart type (e.g., `"Line"`, `"Bar"`, `"Scatter"`).
|
||||
|
||||
---
|
||||
|
||||
### 3. Invariants
|
||||
|
||||
- All events inherit from `Prism.Events.PubSubEvent<T>`, meaning they use Prism’s event aggregation pattern for thread-safe, decoupled publish/subscribe communication.
|
||||
- Boolean events (`ResetZoomChangedEvent`, `CursorShowChangedEvent`, `CursorsClearChangedEvent`, `CursorShowMinMaxChangedEvent`, `CursorsAlailableChangedEvent`) use `bool` payloads to represent *state changes* (e.g., toggled on/off), not necessarily *current values*—subscribers must interpret the payload as the new state.
|
||||
- `SaveToPDFRequestedEvent`’s `string` payload is not validated in this file; its semantics (e.g., path vs. filename) are implementation-dependent.
|
||||
- `ChartAxisChangedEventArg` and `ChartOptionsChangedEventArg` both require a `ParentVM` of type `IBaseViewModel`, implying the event originator must be a view model implementing that interface.
|
||||
- `ChartOptionsChangedEventArg.Model` must implement `IChartOptionsModel`, but no validation is enforced at the event level.
|
||||
|
||||
---
|
||||
|
||||
### 4. Dependencies
|
||||
|
||||
**Dependencies *of* this module:**
|
||||
- `Prism.Events` – Core dependency for `PubSubEvent<T>`.
|
||||
- `DTS.Common.Base` – Required for `IBaseViewModel` (used in `ChartAxisChangedEventArg` and `ChartOptionsChangedEventArg`).
|
||||
- `DTS.Common.Interface` – Required for `IChartOptionsModel` (used in `ChartOptionsChangedEventArg`).
|
||||
|
||||
**Dependencies *on* this module:**
|
||||
- Any component that manages chart UI state (e.g., view models, chart controls) likely subscribes to these events to react to user actions or model changes.
|
||||
- The `SaveToPDFRequestedEvent` suggests integration with a PDF export service (not visible here).
|
||||
- The `ChartAxisChangedEvent` and `ChartOptionsChangedEvent` imply coupling with chart rendering logic and data binding systems (e.g., MVVM framework).
|
||||
|
||||
---
|
||||
|
||||
### 5. Gotchas
|
||||
|
||||
- **Misleading XML comments**: All events (except `SaveToPDFRequestedEvent`) have XML comments stating “The Data Folder changed event.” This is clearly incorrect and likely copy-paste error—do not rely on comments for semantics.
|
||||
- **Typo in class name**: `CursorsAlailableChangedEvent` uses `Alailable` instead of `Available`. This may cause confusion and should be corrected in future refactoring.
|
||||
- **Ambiguous payload semantics**: Boolean events use `bool` payloads, but it is unclear whether `true` means *enabled*, *visible*, *requested*, or *changed to true*. Subscribers must infer meaning from context or external documentation.
|
||||
- **No validation on `ChartAxisChangedEventArg`**: No checks ensure `MinValue < MaxValue` or that `Axis` is a recognized identifier. Invalid values may propagate silently.
|
||||
- **No documentation for `ChartType` values**: The `ChartType` string in `ChartOptionsChangedEventArg` has no documented set of valid values (e.g., `"Line"`, `"Bar"`), risking runtime errors if unexpected values are used.
|
||||
- **No versioning or deprecation markers**: Events may evolve (e.g., payload changes), but no attributes or comments indicate stability or obsolescence.
|
||||
|
||||
*None of the above are explicitly enforced in the source—these are inferred from inconsistencies and omissions.*
|
||||
@@ -0,0 +1,54 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.Common/Events/DTS.Viewer/ViewerFilter/FilterParameterChangedEvent.cs
|
||||
generated_at: "2026-04-16T03:26:16.445122+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "f65dc87a2ce033e4"
|
||||
---
|
||||
|
||||
# ViewerFilter
|
||||
|
||||
### **Purpose**
|
||||
This module defines a Prism-based event mechanism for propagating changes to filter parameters within the DTS Viewer component. It enables decoupled communication between view models (implementing `IBaseViewModel`) that request or respond to filter updates—specifically when a filter parameter value changes—by publishing `FilterParameterChangedEvent` instances carrying the parameter name and the originating view model.
|
||||
|
||||
---
|
||||
|
||||
### **Public Interface**
|
||||
|
||||
#### `FilterParameterArgs`
|
||||
- **`IBaseViewModel Requester { get; set; }`**
|
||||
The view model instance that initiated or is associated with the filter parameter change. Used to identify the source of the event.
|
||||
- **`string Param { get; set; }`**
|
||||
The name (key) of the filter parameter that has changed. Represents the specific filter field being updated (e.g., `"DateRange"`, `"Status"`).
|
||||
|
||||
#### `FilterParameterChangedEvent`
|
||||
- **Inherits from `PubSubEvent<FilterParameterArgs>`**
|
||||
A Prism `PubSubEvent` that carries `FilterParameterArgs` payloads. Subscribers can register handlers to react when a filter parameter changes.
|
||||
|
||||
---
|
||||
|
||||
### **Invariants**
|
||||
- `Param` must be a non-null, non-empty string representing a valid filter parameter identifier (enforced by convention/consumer logic, not by this class).
|
||||
- `Requester` must be non-null when the event is published (enforced by publisher; this class does not validate).
|
||||
- The event is *publish-only*—no built-in subscription validation or filtering logic is present in this file.
|
||||
|
||||
---
|
||||
|
||||
### **Dependencies**
|
||||
- **Imports/References**:
|
||||
- `DTS.Common.Base` (provides `IBaseViewModel`)
|
||||
- `Prism.Events` (provides `PubSubEvent<T>`)
|
||||
- **Depended on by**:
|
||||
- Any module/view model in the DTS Viewer that needs to publish or subscribe to filter parameter changes (e.g., filter controls, data grids, or search components).
|
||||
- No direct consumers are visible in this file; dependencies are inferred from usage of `PubSubEvent<T>` and `IBaseViewModel`.
|
||||
|
||||
---
|
||||
|
||||
### **Gotchas**
|
||||
- **No validation**: The class does not enforce non-null/non-empty constraints on `Param` or `Requester`; invalid values may propagate silently.
|
||||
- **No payload for new value**: The event only carries the *parameter name* (`Param`), not its new value. Subscribers must infer or retrieve the updated value from the `Requester` (e.g., via a property like `Requester.FilterParams[Param]`).
|
||||
- **Namespace quirk**: The `// ReSharper disable CheckNamespace` directive suggests intentional namespace flattening (`DTS.Common.Events` instead of `DTS.Common.Events.DTS.Viewer.FilterParameter`), which may affect discoverability or tooling.
|
||||
- **No backward/forward compatibility guarantees**: As a proprietary module, changes to `Param` naming conventions or `Requester` semantics may break consumers without warning.
|
||||
|
||||
None identified beyond the above.
|
||||
@@ -0,0 +1,44 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.Common/Events/DTS.Viewer/ViewerSettings/CalibrationBehaviorSettableInViewerChangedEvent.cs
|
||||
- Common/DTS.Common/Events/DTS.Viewer/ViewerSettings/ViewerSettingsVisibilityChangedEvent.cs
|
||||
generated_at: "2026-04-16T03:26:29.245992+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "aa456ba674677929"
|
||||
---
|
||||
|
||||
# ViewerSettings
|
||||
|
||||
### 1. Purpose
|
||||
This module defines two Prism-based pub/sub events used for broadcasting changes to viewer settings in the DTS system: one signaling whether calibration behavior is settable in the viewer (`CalibrationBehaviorSettableInViewerChangedEvent`), and another signaling changes to the visibility state of the viewer settings UI (`ViewerSettingsVisibilityChangedEvent`). These events enable decoupled communication between components—e.g., view models or services—responsible for managing viewer configuration and UI state, allowing subscribers to react to runtime updates without tight coupling.
|
||||
|
||||
### 2. Public Interface
|
||||
- **`CalibrationBehaviorSettableInViewerChangedEvent`**
|
||||
- *Inherits from:* `PubSubEvent<bool>`
|
||||
- *Behavior:* A Prism event used to publish and subscribe to changes in whether the calibration behavior settings are editable within the viewer. The payload is a `bool`: `true` indicates calibration behavior *is* settable in the viewer; `false` indicates it is not.
|
||||
|
||||
- **`ViewerSettingsVisibilityChangedEvent`**
|
||||
- *Inherits from:* `PubSubEvent<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`), reflecting the current UI state of the settings panel.
|
||||
|
||||
### 3. Invariants
|
||||
- `CalibrationBehaviorSettableInViewerChangedEvent` payloads must be strictly `true` or `false`; no null or intermediate values are possible (since `bool` is non-nullable).
|
||||
- `ViewerSettingsVisibilityChangedEvent` payloads must be one of the three `Visibility` enum values defined in `System.Windows`: `Visible`, `Collapsed`, or `Hidden`.
|
||||
- Events are published *only* when the respective state actually changes; no redundant or duplicate publications are implied by the source (though enforcement of this is outside the scope of the event definitions themselves).
|
||||
- No ordering guarantees are specified or implied between these two events; they are independent.
|
||||
|
||||
### 4. Dependencies
|
||||
- **Dependencies *of* this module:**
|
||||
- `Prism.Events` (specifically `PubSubEvent<T>`), indicating reliance on the Prism library for event aggregation.
|
||||
- `System.Windows` (only for `ViewerSettingsVisibilityChangedEvent`, via `Visibility`).
|
||||
- **Dependencies *on* this module:**
|
||||
- Not inferable from the provided source files alone. However, any consumer (e.g., view models, services) that needs to react to viewer settings changes or calibration behavior availability must subscribe to these events via the Prism `IEventAggregator`.
|
||||
- These events are likely published by components managing viewer configuration state (e.g., a viewer settings view model or calibration service), but such publishers are not visible in this source.
|
||||
|
||||
### 5. Gotchas
|
||||
- **Namespace flattening:** The `// ReSharper disable CheckNamespace` directive suggests the namespace is intentionally `DTS.Common.Events` (not nested under a more specific sub-namespace), possibly to avoid deep nesting in legacy or tooling-constrained contexts.
|
||||
- **No validation in event definition:** The events themselves do not enforce semantics (e.g., that `Visibility.Collapsed` and `Visibility.Hidden` are treated differently); interpretation of payload values is deferred to subscribers.
|
||||
- **No documentation comments:** The source lacks XML documentation comments, so semantic meaning (e.g., *why* calibration behavior might be settable or not) is not embedded here—consumers must infer intent from usage.
|
||||
- **No versioning or deprecation markers:** No indication of whether these events are stable, experimental, or scheduled for change.
|
||||
- **None identified from source alone.**
|
||||
@@ -0,0 +1,104 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.Common/Events/DTS.Viewer/ViewerTestSummary/ChannelSelectionCountNotification.cs
|
||||
- Common/DTS.Common/Events/DTS.Viewer/ViewerTestSummary/ChannelsModificationNotification.cs
|
||||
- Common/DTS.Common/Events/DTS.Viewer/ViewerTestSummary/ChannelSelectionChangeNotification.cs
|
||||
- Common/DTS.Common/Events/DTS.Viewer/ViewerTestSummary/GraphChannelReadCalcProgressChangedEvent.cs
|
||||
- Common/DTS.Common/Events/DTS.Viewer/ViewerTestSummary/GraphChannelsReadCompletedNotification.cs
|
||||
- Common/DTS.Common/Events/DTS.Viewer/ViewerTestSummary/DataFileSelectedEvent.cs
|
||||
- Common/DTS.Common/Events/DTS.Viewer/ViewerTestSummary/TestLoadedCountNotification.cs
|
||||
- Common/DTS.Common/Events/DTS.Viewer/ViewerTestSummary/GraphLoadedCountNotification.cs
|
||||
- Common/DTS.Common/Events/DTS.Viewer/ViewerTestSummary/TestSummaryCountNotification.cs
|
||||
- Common/DTS.Common/Events/DTS.Viewer/ViewerTestSummary/GraphClearNotification.cs
|
||||
- Common/DTS.Common/Events/DTS.Viewer/ViewerTestSummary/GraphSelectedEventCountNotification.cs
|
||||
- Common/DTS.Common/Events/DTS.Viewer/ViewerTestSummary/GraphSelectedChannelCountNotification.cs
|
||||
- Common/DTS.Common/Events/DTS.Viewer/ViewerTestSummary/GraphSelectedChannelsNotification.cs
|
||||
- Common/DTS.Common/Events/DTS.Viewer/ViewerTestSummary/GraphSelectedEventsNotification.cs
|
||||
- Common/DTS.Common/Events/DTS.Viewer/ViewerTestSummary/ChannelsModificationLineFitNotification.cs
|
||||
- Common/DTS.Common/Events/DTS.Viewer/ViewerTestSummary/TestSummaryChangeNotification.cs
|
||||
- Common/DTS.Common/Events/DTS.Viewer/ViewerTestSummary/DataFolderChangedEvent.cs
|
||||
generated_at: "2026-04-16T03:26:54.981028+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "efa128df50cbdb70"
|
||||
---
|
||||
|
||||
# ViewerTestSummary Events Module Documentation
|
||||
|
||||
## 1. Purpose
|
||||
This module defines a suite of Prism `PubSubEvent<T>`-based notification events used within the DTS Viewer (specifically for the *ViewerTestSummary* component) to decouple state changes in test channel, event, graph, and summary selection from UI components and view models. These events enable loose coupling between data-loading, selection, and UI-update logic—particularly important given the module’s role in supporting both standard test viewers and reuse for PSD reports (as indicated by issue #24417 comments). Events cover changes in data file/folder selection, counts of loaded/selected items, progress updates during data reading/calculation, and modifications to channel selections (including line-fit operations).
|
||||
|
||||
## 2. Public Interface
|
||||
All types are `public` and reside in `DTS.Common.Events`. Each inherits from `PubSubEvent<T>` (Prism.Events), meaning they are intended for subscription/publishing via an `IEventAggregator`.
|
||||
|
||||
### Event Classes & Payload Types
|
||||
|
||||
| Event Class | Payload Type | Description |
|
||||
|-------------|--------------|-------------|
|
||||
| `ChannelSelectionCountNotification` | `int` | Notifies when the count of selected test channels changes. |
|
||||
| `ChannelsModificationNotification` | `List<ITestChannel>` | Notifies when the set of selected test channels is modified (e.g., added/removed). |
|
||||
| `ChannelSelectionChangeNotification` | `List<ITestChannel>` | Notifies when the selected test channel list changes (semantically similar to `ChannelsModificationNotification`, but distinct event). |
|
||||
| `GraphChannelReadCalcProgressChangedEvent` | `GraphChannelReadCalcProgressChangedEventArgs` | Reports progress during graph channel read/calculation. |
|
||||
| `GraphChannelsReadCompletedNotification` | `GraphChannelsReadCompletedNotificationArgs` | Signals completion of reading graph channels. |
|
||||
| `DataFileSelectedEvent` | `DataFileSelectionArg` | Signals selection of a specific data file (avoids triggering `DataFolderChangedEvent` subscribers). |
|
||||
| `TestLoadedCountNotification` | `TestLoadedCountNotificationArg` | Notifies when the count of loaded tests changes. |
|
||||
| `GraphLoadedCountNotification` | `GraphLoadedCountNotificationArg` | Notifies when the count of loaded graphs changes. |
|
||||
| `TestSummaryCountNotification` | `TestSummaryCountNotificationArg` | Notifies when the count of test summaries changes. |
|
||||
| `GraphClearNotification` | `GraphClearNotificationArg` | Signals that a graph has been cleared. |
|
||||
| `GraphSelectedEventCountNotification` | `GraphSelectedEventCountNotificationArg` | Notifies when the count of selected events in a graph changes. |
|
||||
| `GraphSelectedChannelCountNotification` | `GraphSelectedChannelCountNotificationArg` | Notifies when the count of selected channels in a graph changes. |
|
||||
| `GraphSelectedChannelsNotification` | `GraphSelectedChannelsNotificationArg` | Notifies when the set of selected channels in a graph changes. |
|
||||
| `GraphSelectedEventsNotification` | `GraphSelectedEventsNotificationArg` | Notifies when the set of selected events in a graph changes. |
|
||||
| `ChannelsModificationLineFitNotification` | `LineFitArgs` | Notifies that a line-fit operation is requested on a specific channel over a range of indices. |
|
||||
| `TestSummaryChangeNotification` | `TestSummaryChangeNotificationArg` | Notifies when the list of selected test summaries changes. |
|
||||
| `DataFolderChangedEvent` | `DataFolderSelectionArg` | Signals a change in the selected data folder (triggers broader updates). |
|
||||
|
||||
### Payload Class Definitions
|
||||
|
||||
| Payload Class | Key Properties | Notes |
|
||||
|---------------|----------------|-------|
|
||||
| `GraphChannelReadCalcProgressChangedEventArgs` | `string ProgressMessage`, `double ProgressPercent`, `IBaseViewModel GraphVM` | Used for progress reporting; `GraphVM` identifies the associated graph view model. |
|
||||
| `GraphChannelsReadCompletedNotificationArgs` | `bool IsReadCompleted`, `IBaseViewModel GraphVM` | `IsReadCompleted` indicates success/failure of read operation. |
|
||||
| `DataFileSelectionArg` | `string File`, `IBaseViewModel ParentVM` | `File` is the selected file path; `ParentVM` supports reuse for PSD reports. |
|
||||
| `TestLoadedCountNotificationArg` | `int LoadedCount`, `IBaseViewModel ParentVM` | `LoadedCount` reflects number of loaded tests; `ParentVM` enables scoping. |
|
||||
| `GraphLoadedCountNotificationArg` | `int LoadedCount`, `IBaseViewModel ParentVM` | `LoadedCount` reflects number of loaded graphs. |
|
||||
| `TestSummaryCountNotificationArg` | `int SummaryCount`, `IBaseViewModel ParentVM` | `SummaryCount` reflects number of summaries. |
|
||||
| `GraphClearNotificationArg` | `bool GraphClear`, `IBaseViewModel ParentVM` | `GraphClear` likely indicates whether the graph is now empty. |
|
||||
| `GraphSelectedEventCountNotificationArg` | `int SelectedEventCount`, `IBaseViewModel ParentVM` | `SelectedEventCount` reflects number of selected events. |
|
||||
| `GraphSelectedChannelCountNotificationArg` | `int SelectedChannelCount`, `IBaseViewModel ParentVM` | `SelectedChannelCount` reflects number of selected channels. |
|
||||
| `GraphSelectedChannelsNotificationArg` | `List<ITestChannel> SelectedChannels`, `IBaseViewModel ParentVM` | `SelectedChannels` is the current set of selected channels. |
|
||||
| `GraphSelectedEventsNotificationArg` | `BindingList<ITestEvent> SelectedEvents`, `IBaseViewModel ParentVM` | `SelectedEvents` uses `BindingList<T>` (supports UI binding). |
|
||||
| `LineFitArgs` | `ITestChannel Channel`, `ulong StartIndex`, `ulong EndIndex` | Immutable; constructor enforces non-null `Channel`. |
|
||||
| `TestSummaryChangeNotificationArg` | `List<ITestSummary> SummaryList`, `IBaseViewModel ParentVM`, `int TotalSummaryCount` | `SummaryList` is the new selection; `TotalSummaryCount` may include unselected summaries. |
|
||||
| `DataFolderSelectionArg` | `string Path`, `string File`, `bool SetSelected`, `bool SelectAll`, `IBaseViewModel ParentVM` | `SetSelected` controls UI selection; `SelectAll` controls whether to auto-select all tests (e.g., for export). |
|
||||
|
||||
## 3. Invariants
|
||||
- All events are *notifications* (i.e., fire-and-forget); no return value or cancellation is expected.
|
||||
- `GraphSelectedEventsNotificationArg.SelectedEvents` is a `System.ComponentModel.BindingList<ITestEvent>`; subscribers may rely on its change notification capabilities.
|
||||
- `LineFitArgs` is immutable: its properties are read-only and set only via constructor.
|
||||
- `DataFileSelectedEvent` is *distinct* from `DataFolderChangedEvent`—publishing one does not imply publishing the other (see comment in `DataFileSelectedEvent.cs`).
|
||||
- All payload classes with `ParentVM` properties use `IBaseViewModel` to support scoping for reuse (e.g., PSD reports), implying that event handlers should respect `ParentVM` to avoid cross-view interference.
|
||||
- `DataFolderSelectionArg.SetSelected` defaults to `false`; `SelectAll` defaults to `false`.
|
||||
- `ChannelsModificationNotification` and `ChannelSelectionChangeNotification` both carry `List<ITestChannel>` but are separate events—subscribers must distinguish them intentionally.
|
||||
|
||||
## 4. Dependencies
|
||||
### Dependencies *of* this module:
|
||||
- **Prism.Events**: All events inherit from `PubSubEvent<T>`.
|
||||
- **DTS.Common.Interface**:
|
||||
- `ITestChannel`, `ITestEvent`, `ITestSummary` (from `DTS.Common.Interface`)
|
||||
- `IBaseViewModel` (from `DTS.Common.Base`)
|
||||
- **DTS.Common.Base**: Provides `IBaseViewModel` and `GraphChannelReadCalcProgressChangedEventArgs`.
|
||||
|
||||
### Dependencies *on* this module:
|
||||
- Any module/view model that needs to react to viewer state changes (e.g., UI updates, data loading, graph rendering) will subscribe to these events.
|
||||
- Specifically, components handling test summary views, graph rendering, and data file/folder navigation likely depend on this module.
|
||||
|
||||
## 5. Gotchas
|
||||
- **Ambiguous naming**: `ChannelsModificationNotification` and `ChannelSelectionChangeNotification` both carry `List<ITestChannel>` and have near-identical summaries ("The selected Test Summary list changed event" / "The number of selected Graphs changed event"). Their distinct existence suggests semantic differences (e.g., one for *additions/removals*, one for *reordering*), but this is not documented in the source.
|
||||
- **Inconsistent summaries**: Several event summaries incorrectly describe the event (e.g., `GraphLoadedCountNotification` says "The number of selected Tests changed event" instead of graphs). This may mislead developers.
|
||||
- **`DataFileSelectedEvent` vs `DataFolderChangedEvent`**: The comment in `DataFileSelectedEvent.cs` explicitly warns against triggering `DataFolderChangedEvent` subscribers—subscribers must not assume these events are interchangeable.
|
||||
- **`TestSummaryChangeNotificationArg.TotalSummaryCount`**: Not clarified whether this includes only summaries in `SummaryList` or all available summaries.
|
||||
- **`GraphClearNotificationArg.GraphClear`**: The boolean name suggests a flag, but its meaning (e.g., `true` = cleared vs. `true` = *not* cleared) is ambiguous without implementation context.
|
||||
- **No validation on payloads**: Payload classes have no validation (e.g., `ProgressPercent` could be outside [0,100], `SelectedChannels` could be null). Subscribers must defensively handle invalid values.
|
||||
- **No ordering guarantees**: Events may be published in any order (e.g., `GraphChannelsReadCompletedNotification` may fire before `GraphChannelReadCalcProgressChangedEvent` completes).
|
||||
- **None identified from source alone** for: thread-safety, lifecycle management, or disposal requirements.
|
||||
@@ -0,0 +1,56 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.Common/Events/Database/DbStatusEvent.cs
|
||||
generated_at: "2026-04-16T03:24:36.502234+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "907205cba2ff43f9"
|
||||
---
|
||||
|
||||
# Database
|
||||
|
||||
## 1. Purpose
|
||||
This module defines a Prism-based event (`DbStatusEvent`) used to communicate database operation status changes throughout the application—specifically for signaling failures or completion of database-related operations such as remote connection, local backup, file copy, and restore. It enables decoupled notification of database state transitions, allowing UI components or background services to react appropriately (e.g., display error messages, update status indicators) when database operations succeed or fail.
|
||||
|
||||
## 2. Public Interface
|
||||
- **`DbStatusEvent`**
|
||||
- *Type*: `class` inheriting from `PubSubEvent<DbStatusArg>`
|
||||
- *Behavior*: A Prism event used to publish and subscribe to database status updates. Payload is a `DbStatusArg` instance.
|
||||
|
||||
- **`DbStatusArg`**
|
||||
- *Type*: `class`
|
||||
- *Properties*:
|
||||
- `EventTypes Status { get; }` – The type of database status event (see `EventTypes` enum below).
|
||||
- `Exception Exception { get; }` – The exception associated with the event (if any); may be `null` for non-error statuses (e.g., `Complete`).
|
||||
- *Constructor*:
|
||||
- `DbStatusArg(EventTypes error, Exception exception)` – Initializes a new instance with the given status and exception.
|
||||
- **Nested `EventTypes` enum**:
|
||||
- `FailedToConnectToRemote`
|
||||
- `FailedToBackupLocal`
|
||||
- `FailedToCopy`
|
||||
- `FailedToRestoreLocal`
|
||||
- `FailedToBackupLocalFileNotFound`
|
||||
- `Complete`
|
||||
- `LegacyStatus`
|
||||
|
||||
## 3. Invariants
|
||||
- `Status` is immutable after construction (only set via constructor).
|
||||
- `Exception` is immutable after construction (only set via constructor).
|
||||
- `Exception` may be `null` (e.g., for `Complete` or `LegacyStatus` events), but the constructor does not enforce non-nullability—consumers must handle null cases.
|
||||
- `EventTypes` values represent *discrete, exhaustive* status categories; no validation is performed on the enum value passed to the constructor (e.g., invalid or future enum values are accepted silently).
|
||||
|
||||
## 4. Dependencies
|
||||
- **Depends on**:
|
||||
- `Prism.Events` (specifically `PubSubEvent<T>`)
|
||||
- `System` (for `Exception`)
|
||||
- **Depends on nothing else in the provided source**.
|
||||
- **Used by**:
|
||||
- Any part of the application that needs to publish or subscribe to database status updates (e.g., database service, UI status bar, logging module).
|
||||
- Inferred from naming (`DTS.Common.Events.Database` namespace), this is part of a shared/common library (`DTS.Common`), so it is likely consumed by multiple downstream modules (e.g., UI, data access layer).
|
||||
|
||||
## 5. Gotchas
|
||||
- The `Exception` property may be `null` for certain statuses (e.g., `Complete`, `LegacyStatus`), but the constructor signature does not enforce non-nullability—subscribers must defensively check for null before accessing `Exception.Message` or stack trace.
|
||||
- `LegacyStatus` is included but not documented; its semantics are unclear from source alone (e.g., whether it indicates a deprecated status, a fallback, or historical artifact).
|
||||
- No validation is performed on the `EventTypes` value passed to the constructor—invalid or mistyped enum values (e.g., due to refactoring) will be silently accepted.
|
||||
- The `<remarks>` section in `DbStatusEvent` is empty, suggesting incomplete documentation.
|
||||
- No guidance is provided on expected usage patterns (e.g., whether `FailedToBackupLocalFileNotFound` should *always* be accompanied by a `FileNotFoundException` in `Exception`).
|
||||
@@ -0,0 +1,56 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.Common/Events/Diagnostics/CheckDataToDownloadEvent.cs
|
||||
generated_at: "2026-04-16T03:24:51.174525+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "99f81a50a8d987c0"
|
||||
---
|
||||
|
||||
# Diagnostics
|
||||
|
||||
### 1. **Purpose**
|
||||
This module defines a Prism-based event (`CheckDataToDownloadEvent`) used to signal and coordinate a check for data that needs to be downloaded in the DTS system. It enables decoupled communication between components—typically a producer (e.g., a service or view model) initiating a download readiness check—and subscribers (e.g., a download manager or UI component) responsible for evaluating and acting on whether a download is necessary. The event supports bypassing the check (e.g., for forced or manual downloads) via the `BypassCheck` flag, and carries a reference to the originating producer for context or audit purposes.
|
||||
|
||||
---
|
||||
|
||||
### 2. **Public Interface**
|
||||
|
||||
- **`CheckDataToDownloadEvent`**
|
||||
- *Type*: `class` inheriting from `PubSubEvent<CheckDataToDownloadEventArgs>`
|
||||
- *Behavior*: A Prism `PubSubEvent` used to publish and subscribe to download-check requests. Subscribers receive an instance of `CheckDataToDownloadEventArgs` when the event is published.
|
||||
|
||||
- **`CheckDataToDownloadEventArgs`**
|
||||
- *Type*: `class`
|
||||
- *Properties*:
|
||||
- `bool BypassCheck { get; }` — Indicates whether the caller requests skipping the normal data existence/validity check (e.g., proceed directly to download).
|
||||
- `object Producer { get; }` — The object that triggered the event (e.g., a view model, service, or UI element). Used for identification or logging.
|
||||
- *Constructor*:
|
||||
- `CheckDataToDownloadEventArgs(bool bypassCheck, object o)` — Initializes the args with the bypass flag and producer reference. Both values are immutable after construction.
|
||||
|
||||
---
|
||||
|
||||
### 3. **Invariants**
|
||||
- `BypassCheck` is set at construction and **never modified** afterward (due to `private set`).
|
||||
- `Producer` is set at construction and **never modified** afterward (due to `private set`).
|
||||
- The `Producer` reference may be `null` (no validation is performed in the constructor), so consumers must handle null cases.
|
||||
- The event is strictly for *initiating* a check—not for reporting results. The event itself does not carry download status or payload; subscribers are expected to handle side effects (e.g., triggering downloads) based on their own logic.
|
||||
|
||||
---
|
||||
|
||||
### 4. **Dependencies**
|
||||
- **Depends on**:
|
||||
- `Prism.Events` (specifically `PubSubEvent<T>` from the Prism library).
|
||||
- **Used by**:
|
||||
- Any component needing to request a data-downloads check (e.g., `DownloadService`, `MainViewModel`, or UI controls).
|
||||
- Subscribers (e.g., `DownloadManager`) that react to this event to determine whether to proceed with downloading data.
|
||||
- **No other internal dependencies** are evident from this file alone.
|
||||
|
||||
---
|
||||
|
||||
### 5. **Gotchas**
|
||||
- **No validation on `Producer`**: The constructor accepts any `object`, including `null`. Consumers must defensively check `Producer` before use (e.g., for logging or routing).
|
||||
- **Event semantics are ambiguous**: The name `CheckDataToDownloadEvent` implies a *request*, but the event does not provide a way to *return* a result (e.g., whether download is needed). Subscribers must act asynchronously or via side effects (e.g., publishing a follow-up event).
|
||||
- **No cancellation support**: There is no mechanism for subscribers to cancel or delay the check (e.g., via a token).
|
||||
- **No versioning or schema evolution**: If `BypassCheck` or `Producer` semantics change in the future, this event type offers no backward/forward compatibility.
|
||||
- **None identified from source alone.**
|
||||
@@ -0,0 +1,61 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.Common/Events/GroupTemplates/CustomChannels/CustomChannelExportFileSetEvent.cs
|
||||
- Common/DTS.Common/Events/GroupTemplates/CustomChannels/CustomChannelImportEvent.cs
|
||||
generated_at: "2026-04-16T03:25:48.906062+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "7dcb7f08a2b119d1"
|
||||
---
|
||||
|
||||
# CustomChannels
|
||||
|
||||
## Documentation: Custom Channel Events Module
|
||||
|
||||
### 1. Purpose
|
||||
This module defines Prism-based pub/sub events used to coordinate custom channel import and export operations within the application. Specifically, `CustomChannelExportFileSetEvent` signals that a custom channel export file set has been prepared (and the application should update its busy/available state accordingly), while `CustomChannelImportEvent` communicates the completion status of a custom channel import operation. These events decouple the UI and business logic layers during asynchronous custom channel workflows.
|
||||
|
||||
### 2. Public Interface
|
||||
|
||||
- **`CustomChannelExportFileSetEvent`**
|
||||
- *Type*: `class` inheriting from `PubSubEvent<string>`
|
||||
- *Behavior*: A Prism event used to notify subscribers that a custom channel export file set has been generated. Despite inheriting `PubSubEvent<string>`, the event payload type is not actively used in the current implementation (see *Gotchas*). Subscribers should interpret publication of this event as a signal to mark the application as available (e.g., disable busy indicators).
|
||||
|
||||
- **`CustomChannelImportEvent`**
|
||||
- *Type*: `class` inheriting from `PubSubEvent<CustomChannelImportEventArgs>`
|
||||
- *Behavior*: A Prism event used to notify subscribers of the completion status of a custom channel import operation. Currently only supports a single status (`Done`).
|
||||
|
||||
- **`CustomChannelImportEventArgs`**
|
||||
- *Type*: `class`
|
||||
- *Properties*:
|
||||
- `Status ImportStatus { get; }` – The completion status of the import operation.
|
||||
- *Constructors*:
|
||||
- `CustomChannelImportEventArgs(Status status)` – Initializes the args with the given `Status`.
|
||||
- *Nested Enum*:
|
||||
- `enum Status { Done }` – Represents possible import outcomes. Only `Done` is defined.
|
||||
|
||||
### 3. Invariants
|
||||
- `CustomChannelImportEventArgs.ImportStatus` is immutable after construction (read-only property).
|
||||
- `CustomChannelImportEventArgs.Status` currently supports only one value (`Done`). No other statuses (e.g., `Failed`, `Cancelled`) are defined or used in the source.
|
||||
- `CustomChannelExportFileSetEvent` inherits from `PubSubEvent<string>`, but no payload is expected or used (see *Gotchas*).
|
||||
|
||||
### 4. Dependencies
|
||||
- **Dependencies *of* this module**:
|
||||
- `Prism.Events` (specifically `PubSubEvent<T>`).
|
||||
- No other internal modules or types are referenced in the source files.
|
||||
|
||||
- **Dependencies *on* this module**:
|
||||
- Not specified in the provided source, but by convention, modules handling custom channel import/export workflows (e.g., UI view models, service layers) are expected to subscribe to these events.
|
||||
|
||||
### 5. Gotchas
|
||||
- **Payload type mismatch in `CustomChannelExportFileSetEvent`**:
|
||||
The class inherits from `PubSubEvent<string>`, implying a `string` payload, but the XML documentation and naming suggest it is used as a *signal* (not a data carrier). There is no evidence in the source that any subscriber expects or receives a `string` argument. This may indicate legacy or incomplete refactoring. Subscribers should treat this event as a *unit signal* (i.e., ignore the payload).
|
||||
|
||||
- **Extensibility limitation in `CustomChannelImportEventArgs.Status`**:
|
||||
The `Status` enum currently contains only `Done`. If future workflows require additional statuses (e.g., `Error`, `Cancelled`), this enum must be extended—but doing so without updating all subscribers could lead to unhandled cases.
|
||||
|
||||
- **No error reporting mechanism**:
|
||||
`CustomChannelImportEvent` only signals completion (`Done`). There is no provision for conveying error details, partial success, or cancellation. If import failures need to be communicated, a new event or extension of `CustomChannelImportEventArgs` would be required.
|
||||
|
||||
- **Empty `<remarks>` sections**:
|
||||
Neither event includes meaningful remarks in its XML documentation, suggesting minimal initial documentation effort or reliance on external design documents.
|
||||
@@ -0,0 +1,47 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.Common/Events/GroupTemplates/GroupTemplateList/GroupTemplateListGroupDoubleClickEvent.cs
|
||||
- Common/DTS.Common/Events/GroupTemplates/GroupTemplateList/GroupTemplateListGroupTemplateSelectedEvent.cs
|
||||
generated_at: "2026-04-16T03:25:57.698700+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "fe288275e1339690"
|
||||
---
|
||||
|
||||
# GroupTemplateList
|
||||
|
||||
## Documentation: GroupTemplateList Events
|
||||
|
||||
### 1. Purpose
|
||||
This module defines Prism-based pub/sub events used to communicate user interactions with the group template list UI component—specifically, when a template is *selected* (potentially multiple templates) or when a template is *double-clicked*. These events decouple the UI layer (e.g., a list control) from downstream logic (e.g., template loading or editing), enabling modular and testable event-driven behavior in the application.
|
||||
|
||||
### 2. Public Interface
|
||||
All types reside in the `DTS.Common.Events.GroupTemplates.GroupTemplateList` namespace.
|
||||
|
||||
- **`GroupTemplateListGroupDoubleClickEvent`**
|
||||
```csharp
|
||||
public class GroupTemplateListGroupDoubleClickEvent : PubSubEvent<string> { }
|
||||
```
|
||||
A Prism `PubSubEvent` carrying a single `string` payload. Published when a user double-clicks a *single* group template in the list. The payload is the identifier (e.g., name or GUID) of the selected template.
|
||||
|
||||
- **`GroupTemplateListGroupTemplateSelectedEvent`**
|
||||
```csharp
|
||||
public class GroupTemplateListGroupTemplateSelectedEvent : PubSubEvent<string[]> { }
|
||||
```
|
||||
A Prism `PubSubEvent` carrying a `string[]` payload. Published when one or more templates are *selected* (e.g., via click or keyboard selection). The payload is an array of template identifiers.
|
||||
|
||||
### 3. Invariants
|
||||
- `GroupTemplateListGroupDoubleClickEvent` always carries exactly one template identifier (i.e., the array length is implicitly 1), though the type system does not enforce this—consumers must assume a single-element array or handle accordingly.
|
||||
- `GroupTemplateListGroupTemplateSelectedEvent` may carry zero, one, or multiple template identifiers (i.e., the array may be empty or have length ≥ 1).
|
||||
- The string identifiers used in both events are assumed to be stable and meaningful to downstream consumers (e.g., database keys or file paths), but their exact format is not defined in this module.
|
||||
|
||||
### 4. Dependencies
|
||||
- **Depends on**: `Prism.Events` (specifically `PubSubEvent<T>`).
|
||||
- **Used by**: UI components (e.g., a list view control) that raise these events on user interaction, and consumers (e.g., view models or services) that subscribe to them to trigger actions like opening a template editor or loading configuration.
|
||||
- **No other modules in this codebase are referenced** in the source files, indicating this is a self-contained event definition layer.
|
||||
|
||||
### 5. Gotchas
|
||||
- **Ambiguity in "selected" vs. "double-clicked" semantics**: The documentation comments for both events say “called when a template is selected,” but the event names and payload types (`string` vs `string[]`) imply different user actions (single double-click vs. multi-select). Consumers must distinguish based on event type, not comment text.
|
||||
- **No validation on payload contents**: Neither event validates or constrains the template identifiers (e.g., null checks, format). Subscribers must handle invalid or unexpected values.
|
||||
- **Potential confusion from naming**: `GroupTemplateListGroupDoubleClickEvent` is documented as `GroupTemplateListGroupTemplateSelectedEvent` in its XML comment (a copy-paste error in the source). This may cause confusion during code review or debugging.
|
||||
- **No ordering guarantee**: The Prism `PubSubEvent` implementation does not guarantee delivery order to subscribers if multiple handlers exist.
|
||||
@@ -0,0 +1,81 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.Common/Events/GroupTemplates/TemplateChannelList/TemplateChannelListOrderChangedEvent.cs
|
||||
- Common/DTS.Common/Events/GroupTemplates/TemplateChannelList/TemplateChannelListSelectionChangedEvent.cs
|
||||
- Common/DTS.Common/Events/GroupTemplates/TemplateChannelList/TemplateChannelListRequiredChangedEvent.cs
|
||||
generated_at: "2026-04-16T03:26:02.944009+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "0971a3dcff5effca"
|
||||
---
|
||||
|
||||
# TemplateChannelList
|
||||
|
||||
## Documentation: TemplateChannelList Events Module
|
||||
|
||||
### 1. Purpose
|
||||
This module defines Prism-based pub/sub events used to signal changes in the state of a *template channel list*—a UI or business construct representing ordered, configurable channels associated with a group template. Specifically, it enables decoupled communication between components that manage or consume channel lists (e.g., UI views, view models, or services), notifying them when the *order*, *selection*, or *required-ness* of channels changes. Though the XML documentation comments are misleading (referring to “template selection” instead of channel list state), the actual event types and payloads indicate they are concerned with channel-level state transitions.
|
||||
|
||||
---
|
||||
|
||||
### 2. Public Interface
|
||||
|
||||
#### `TemplateChannelListOrderChangedEvent`
|
||||
- **Type**: `class`
|
||||
- **Inherits**: `PubSubEvent<IGroupTemplateChannel>`
|
||||
- **Behavior**: Published when the *ordering* of channels in a template channel list changes. The payload is the *single channel* whose position has changed (e.g., moved up/down in the list). Subscribers can use this to reorder internal structures or update UI bindings accordingly.
|
||||
|
||||
#### `TemplateChannelListSelectionChangedEvent`
|
||||
- **Type**: `class`
|
||||
- **Inherits**: `PubSubEvent<IGroupTemplateChannel>`
|
||||
- **Behavior**: Published when the *selection state* of a channel in the list changes (e.g., user selects/deselects a channel). The payload is the *channel* whose selection status changed.
|
||||
|
||||
#### `TemplateChannelListRequiredChangedEvent`
|
||||
- **Type**: `class`
|
||||
- **Inherits**: `PubSubEvent<TemplateChannelListRequiredChangeEventArgs>`
|
||||
- **Behavior**: Published when the *required status* of one or more channels changes (e.g., a channel becomes mandatory or optional). The payload is a `TemplateChannelListRequiredChangeEventArgs` object containing:
|
||||
- `Consumer`: The object (e.g., view model or service) triggering the change.
|
||||
- `Channels`: An array of `IGroupTemplateChannel` instances whose required status has changed.
|
||||
|
||||
#### `TemplateChannelListRequiredChangeEventArgs`
|
||||
- **Type**: `class`
|
||||
- **Properties**:
|
||||
- `public object Consumer { get; }` — The entity initiating the required-status change.
|
||||
- `public IGroupTemplateChannel[] Channels { get; }` — The channels affected by the required-status change.
|
||||
- **Constructor**:
|
||||
```csharp
|
||||
public TemplateChannelListRequiredChangeEventArgs(object o, IGroupTemplateChannel[] channels)
|
||||
```
|
||||
Initializes the args with the specified consumer and channel array.
|
||||
|
||||
---
|
||||
|
||||
### 3. Invariants
|
||||
- All events are **asynchronous** (via Prism’s `PubSubEvent`), so ordering of delivery to subscribers is *not guaranteed*.
|
||||
- The `IGroupTemplateChannel` type is assumed to represent a single channel with identity, name, and state (e.g., selection, required flag), but its exact contract is defined externally (see *Dependencies*).
|
||||
- For `TemplateChannelListOrderChangedEvent` and `TemplateChannelListSelectionChangedEvent`, only *one* channel is emitted per event—no batch semantics are implied.
|
||||
- For `TemplateChannelListRequiredChangedEvent`, the `Channels` array may contain *zero or more* channels, but the event is only published when at least one channel’s required status changes.
|
||||
- The `Consumer` field in `TemplateChannelListRequiredChangeEventArgs` is *not validated*—it may be `null`, though this is discouraged.
|
||||
|
||||
---
|
||||
|
||||
### 4. Dependencies
|
||||
|
||||
#### Dependencies *of this module*:
|
||||
- `Prism.Events` — Provides the base `PubSubEvent<T>` class.
|
||||
- `DTS.Common.Interface.GroupTemplate.IGroupTemplateChannel` — Defines the interface for channel objects. Its contract is assumed to include properties like `IsSelected`, `IsRequired`, and identity (e.g., `Id`), but this is not visible in the source.
|
||||
|
||||
#### Dependencies *on this module*:
|
||||
- Any component managing or reacting to channel list state (e.g., UI views, view models, or services in the `DTS.Common` or higher layers) will subscribe to these events.
|
||||
- The `TemplateChannelListRequiredChangedEvent` suggests integration with a consumer registration pattern (via the `Consumer` property), implying downstream systems track which entities are responsible for channel requirements.
|
||||
|
||||
---
|
||||
|
||||
### 5. Gotchas
|
||||
- **Misleading documentation**: All three events’ XML comments incorrectly state *“called when a template is selected”*—this is inconsistent with their actual payloads and naming. This may cause confusion during debugging or onboarding.
|
||||
- **Ambiguous semantics of `Consumer`**: The `Consumer` field in `TemplateChannelListRequiredChangeEventArgs` is typed as `object`, offering no compile-time safety or clarity about expected types. This increases the risk of runtime errors if consumers misidentify the source of the change.
|
||||
- **No distinction between *initiator* and *affected channels***: In `TemplateChannelListRequiredChangedEvent`, the `Consumer` and `Channels` are bundled together, but it is unclear whether *all* channels in the array changed *because of* the consumer or *for* the consumer. This could lead to incorrect assumptions about causality.
|
||||
- **No event for bulk operations**: If multiple channels’ order or selection changes simultaneously (e.g., drag-and-drop reordering of several items), this module provides no event to signal the full set—only per-channel events. Subscribers must deduce batch changes by correlating events, which is error-prone.
|
||||
- **No cancellation or rollback mechanism**: These are *notification-only* events (fire-and-forget). There is no way for subscribers to veto a change (e.g., prevent an invalid reordering).
|
||||
|
||||
None identified beyond the above.
|
||||
@@ -0,0 +1,91 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.Common/Events/Groups/GroupChannelList/GroupChannelDeleteRequestEvent.cs
|
||||
- Common/DTS.Common/Events/Groups/GroupChannelList/GroupChannelsChangedEvent.cs
|
||||
- Common/DTS.Common/Events/Groups/GroupChannelList/GroupUpdatedEvent.cs
|
||||
generated_at: "2026-04-16T03:26:19.461930+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "a198b0938e9f2ac1"
|
||||
---
|
||||
|
||||
# GroupChannelList
|
||||
|
||||
## Documentation: GroupChannelList Events Module
|
||||
|
||||
### 1. Purpose
|
||||
This module defines Prism-based pub/sub events used to coordinate group channel list state changes across loosely coupled components in the application. Specifically, it enables decoupled communication for three distinct scenarios: (1) a request to delete a channel from a group (`GroupChannelDeleteRequestEvent`), (2) notification that the set of channels in a group has changed (`GroupChannelsChangedEvent`), and (3) notification that a group’s state has been updated via channel insertion or assignment (`GroupUpdatedEvent`). These events facilitate UI-layer and service-layer synchronization without tight coupling, particularly around group template selection and channel management workflows.
|
||||
|
||||
---
|
||||
|
||||
### 2. Public Interface
|
||||
|
||||
#### `GroupChannelDeleteRequestEvent`
|
||||
- **Type**: `class` inheriting from `PubSubEvent<GroupChannelDeleteRequestEventArgs>`
|
||||
- **Behavior**: A Prism event used to signal that a channel deletion is requested. Subscribers receive a `GroupChannelDeleteRequestEventArgs` payload containing the page context and the channel to be deleted.
|
||||
|
||||
#### `GroupChannelDeleteRequestEventArgs`
|
||||
- **Constructor**: `GroupChannelDeleteRequestEventArgs(object page, IGroupChannel channel)`
|
||||
- **Properties**:
|
||||
- `object Page` — The UI page (e.g., view model or control) initiating or associated with the deletion request.
|
||||
- `IGroupChannel Channel` — The channel instance targeted for deletion.
|
||||
|
||||
#### `GroupChannelsChangedEvent`
|
||||
- **Type**: `class` inheriting from `PubSubEvent<GroupChannelsChangedEventArgs>`
|
||||
- **Behavior**: A Prism event used to notify subscribers that the number of channels in a group has changed (e.g., after adding/removing channels).
|
||||
- **Note**: Despite the summary comment referencing “The GroupUpdated event”, the actual event name is `GroupChannelsChangedEvent`.
|
||||
|
||||
#### `GroupChannelsChangedEventArgs`
|
||||
- **Constructor**: `GroupChannelsChangedEventArgs(object group, int channelCount)`
|
||||
- **Properties**:
|
||||
- `object Group` — The group whose channel count has changed.
|
||||
- `int ChannelCount` — The new total number of channels in the group.
|
||||
|
||||
#### `GroupUpdatedEvent`
|
||||
- **Type**: `class` inheriting from `PubSubEvent<GroupUpdatedEventArgs>`
|
||||
- **Behavior**: A Prism event used to signal that a group’s state has been updated in a specific way (channel insertion or assignment).
|
||||
- **Note**: The XML summary incorrectly labels this as “The GroupUpdated event” but the class name is `GroupUpdatedEvent`.
|
||||
|
||||
#### `GroupUpdatedEventArgs`
|
||||
- **Constructor**: `GroupUpdatedEventArgs(object page, Status status)`
|
||||
- **Properties**:
|
||||
- `object Page` — The UI page (e.g., view model or control) where the update occurred.
|
||||
- `Status UpdateStatus` — The type of update performed (see `Status` enum below).
|
||||
- **Nested Enum `Status`**:
|
||||
- `ChannelsInserted` — Indicates channels were inserted into the group.
|
||||
- `AssignmentsMade` — Indicates channel assignments were modified (e.g., user/group assignments).
|
||||
|
||||
---
|
||||
|
||||
### 3. Invariants
|
||||
|
||||
- **Event Payload Immutability**: All `EventArgs` classes expose only read-only properties (`get;`), and their constructors enforce non-null assignment of all fields at construction time.
|
||||
- **Page Context Consistency**: In both `GroupChannelDeleteRequestEventArgs` and `GroupUpdatedEventArgs`, the `Page` property is expected to represent the originating UI context (e.g., a view model or control instance), though the type is `object`, allowing flexibility but requiring callers to ensure consistency.
|
||||
- **Channel Count Validity**: In `GroupChannelsChangedEventArgs`, `ChannelCount` is expected to reflect the *current* number of channels in the group after the change, not a delta.
|
||||
- **Status Exhaustiveness**: `GroupUpdatedEventArgs.Status` is a closed enum with exactly two values; no other statuses are defined.
|
||||
|
||||
---
|
||||
|
||||
### 4. Dependencies
|
||||
|
||||
#### Dependencies *of* this module:
|
||||
- **Prism.Events**: All event types derive from `PubSubEvent<T>` (from the Prism library), indicating a dependency on Prism’s event aggregation framework.
|
||||
- **DTS.Common.Interface.Channels**: `GroupChannelDeleteRequestEventArgs` depends on the `IGroupChannel` interface (imported via `using DTS.Common.Interface.Channels;`).
|
||||
|
||||
#### Dependencies *on* this module:
|
||||
- Any module or component that needs to coordinate group channel list changes (e.g., UI pages, channel management services) will subscribe to or publish these events.
|
||||
- Specifically, components managing group templates (as suggested by the `<remarks>` in `GroupChannelsChangedEvent` and `GroupUpdatedEvent`) likely depend on this module.
|
||||
|
||||
---
|
||||
|
||||
### 5. Gotchas
|
||||
|
||||
- **Ambiguous `object` Types**: The `Page` and `Group` properties are typed as `object`, not a specific interface or base class. This introduces ambiguity: consumers must know the expected concrete types (e.g., likely view models or controls) to safely cast or use them.
|
||||
- **Misleading XML Comments**:
|
||||
- `GroupChannelsChangedEvent`’s summary says “The GroupUpdated event” — this appears to be a copy-paste error.
|
||||
- Both `GroupChannelsChangedEvent` and `GroupUpdatedEvent` have `<remarks>` stating “called when a template is selected,” but `GroupChannelDeleteRequestEvent` has no such comment. This may imply inconsistent documentation or that the remarks apply only to certain events.
|
||||
- **No Validation on `ChannelCount`**: `GroupChannelsChangedEventArgs` accepts any `int` for `channelCount`, including negative values. While unlikely, there is no runtime enforcement that `channelCount ≥ 0`.
|
||||
- **No Cancellation Mechanism**: `GroupChannelDeleteRequestEvent` is a *request* event, but there is no built-in cancellation or confirmation mechanism (e.g., via `CancelableEventArgs`). Subscribers must handle deletion logic themselves, and callers cannot abort the operation based on subscriber responses.
|
||||
- **Enum Naming vs. Semantics**: `GroupUpdatedEventArgs.Status.AssignmentsMade` is vague — it could mean assignment of users to channels, channels to groups, or other relationships. The interface `IGroupChannel` is not defined here, so the exact semantics of “assignments” cannot be inferred.
|
||||
|
||||
None identified beyond the above.
|
||||
@@ -0,0 +1,58 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.Common/Events/Groups/GroupsList/GroupListEditGroupEvent.cs
|
||||
- Common/DTS.Common/Events/Groups/GroupsList/GroupListGroupSelectedEvent.cs
|
||||
generated_at: "2026-04-16T03:26:07.948442+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "bca3088a7f9f7005"
|
||||
---
|
||||
|
||||
# GroupsList
|
||||
|
||||
## Documentation: Group List Events Module
|
||||
|
||||
### 1. Purpose
|
||||
This module defines two Prism-based pub/sub events used to communicate group selection and editing actions within the group list UI layer. Specifically, `GroupListEditGroupEvent` signals that a single group should be edited (via its numeric ID), while `GroupListGroupSelectedEvent` signals that a set of groups has been selected (via an array of IDs). These events decouple UI components (e.g., a group list view) from handlers (e.g., a view model or controller responsible for launching an edit dialog or performing bulk operations), enabling flexible event-driven interactions in the application’s MVVM architecture.
|
||||
|
||||
---
|
||||
|
||||
### 2. Public Interface
|
||||
|
||||
#### `GroupListEditGroupEvent`
|
||||
- **Signature**: `public class GroupListEditGroupEvent : PubSubEvent<int> { }`
|
||||
- **Behavior**: A Prism `PubSubEvent<int>` used to publish when a single group is selected for editing. The payload is the group’s integer ID. Subscribers receive this ID to initiate editing logic (e.g., opening an edit dialog for the group with that ID).
|
||||
|
||||
#### `GroupListGroupSelectedEvent`
|
||||
- **Signature**: `public class GroupListGroupSelectedEvent : PubSubEvent<int[]> { }`
|
||||
- **Behavior**: A Prism `PubSubEvent<int[]>` used to publish when multiple groups are selected (e.g., via multi-select UI). The payload is an array of group IDs (`int[]`) representing the currently selected groups. Subscribers may use this to enable bulk operations (e.g., delete, assign) or update selection state.
|
||||
|
||||
> **Note**: Both event classes have no public methods, properties, or constructors beyond the inherited `PubSubEvent<TPayload>` behavior (e.g., `Subscribe`, `Publish`). Their sole purpose is to define strongly-typed event payloads.
|
||||
|
||||
---
|
||||
|
||||
### 3. Invariants
|
||||
- `GroupListEditGroupEvent` **always** carries a single non-null `int` payload representing a valid group identifier.
|
||||
- `GroupListGroupSelectedEvent` **always** carries a non-null `int[]` payload. The array may be empty (indicating deselection of all groups) but must not be `null`.
|
||||
- IDs in both events are expected to correspond to existing groups in the system’s data model (though validation is not enforced by the event classes themselves).
|
||||
- No ordering guarantee is provided for `int[]` payloads in `GroupListGroupSelectedEvent`; the order of IDs is implementation-dependent (e.g., reflects UI selection order or internal storage order).
|
||||
|
||||
---
|
||||
|
||||
### 4. Dependencies
|
||||
- **Depends on**:
|
||||
- `Prism.Events.PubSubEvent<T>` (from the Prism library) — base class for both events.
|
||||
- `DTS.Common` namespace — shared common library (implied by `DTS.Common.Events` namespace).
|
||||
- **Depended on by**:
|
||||
- UI components (e.g., group list views) that publish these events on user interaction.
|
||||
- View models or services that subscribe to these events to handle group editing or selection logic.
|
||||
- *Inferred*: Any module handling group lifecycle operations (e.g., editing, bulk actions) will likely reference these events.
|
||||
|
||||
---
|
||||
|
||||
### 5. Gotchas
|
||||
- **Misleading XML documentation**: Both events’ `<summary>` and `<remarks>` incorrectly reference `"GroupTemplateListGroupTemplateSelectedEvent"` and `"called when a template is selected"`. This appears to be copy-paste error or outdated documentation; the actual purpose relates to *groups*, not templates.
|
||||
- **Ambiguous selection semantics**: `GroupListGroupSelectedEvent`’s payload (`int[]`) does not distinguish between user-initiated selection changes (e.g., adding/removing items) and explicit "apply" actions. Subscribers must infer intent from context or additional state.
|
||||
- **No validation in event**: Neither event validates that IDs exist or are non-negative. Invalid IDs may propagate to subscribers, requiring defensive handling.
|
||||
- **Thread-safety**: As Prism `PubSubEvent` instances, events are published on the UI thread by default (unless configured otherwise), but subscribers must ensure thread-safe operations if they perform non-UI work.
|
||||
- **None identified from source alone** for behavioral quirks beyond the above.
|
||||
@@ -0,0 +1,99 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.Common/Events/Hardware/HardwareList/HardwareListShowCompactEvent.cs
|
||||
- Common/DTS.Common/Events/Hardware/HardwareList/HardwareListEditHardwareEvent.cs
|
||||
- Common/DTS.Common/Events/Hardware/HardwareList/HardwareListHardwareSelectedEvent.cs
|
||||
- Common/DTS.Common/Events/Hardware/HardwareList/HardwareReplaceEvent.cs
|
||||
- Common/DTS.Common/Events/Hardware/HardwareList/HardwareSavedEvent.cs
|
||||
- Common/DTS.Common/Events/Hardware/HardwareList/HardwareListHardwareIncludedEvent.cs
|
||||
- Common/DTS.Common/Events/Hardware/HardwareList/HardwareListHardwareTestPTPDomainIDEvent.cs
|
||||
- Common/DTS.Common/Events/Hardware/HardwareList/HardwareListHardwareTestSampleRateEvent.cs
|
||||
- Common/DTS.Common/Events/Hardware/HardwareList/HardwareListHardwareTestClockMasterEvent.cs
|
||||
- Common/DTS.Common/Events/Hardware/HardwareList/HardwareListHardwareTestAAFilterRateEvent.cs
|
||||
generated_at: "2026-04-16T03:25:48.611478+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "37867324a1f6116a"
|
||||
---
|
||||
|
||||
# Hardware List Events Module Documentation
|
||||
|
||||
---
|
||||
|
||||
## 1. Purpose
|
||||
|
||||
This module defines a set of Prism-based pub/sub events used to communicate state changes and user actions related to hardware configuration and testing within the DTS (DAS Test System) application. These events facilitate decoupled communication between UI components (e.g., hardware list views) and backend logic, enabling reactive updates when hardware selection, inclusion status, or test-specific parameters (e.g., sample rate, PTP domain ID, clock master status) are modified. The events are grouped under the `DTS.Common.Events.Hardware.HardwareList` namespace and are intended for use in MVVM-based WPF applications leveraging Prism’s event aggregation framework.
|
||||
|
||||
---
|
||||
|
||||
## 2. Public Interface
|
||||
|
||||
All classes are event types derived from `Prism.Events.PubSubEvent<TPayload>`. They are published/subscribed via Prism’s `IEventAggregator`.
|
||||
|
||||
| Event Type | Payload Type | Description |
|
||||
|-----------|--------------|-------------|
|
||||
| `HardwareListShowCompactEvent` | `bool` | Indicates whether the hardware list view should be shown in *compact* (`true`) or *expanded* (`false`) mode. |
|
||||
| `HardwareListEditHardwareEvent` | `string` | Indicates a request to edit hardware; payload is the **serial number** of the hardware to edit. *(Note: Class XML comment incorrectly says “HardwareListHardwareSelectedEvent” — actual class name is `HardwareListEditHardwareEvent`.)* |
|
||||
| `HardwareListHardwareSelectedEvent` | `string[]` | Indicates hardware(s) have been selected; payload is an array of **serial numbers** of selected hardware items. |
|
||||
| `HardwareReplaceEvent` | `Tuple<IHardware, IHardware>` | Indicates a hardware replacement request; payload is a tuple where `Item1` is the *old* hardware and `Item2` is the *new* hardware. *(Requires `IHardware` interface from `DTS.Common.Interface.DASFactory.Diagnostics.HardwareList`.)* |
|
||||
| `HardwareSavedEvent` | `Tuple<int, string>` | Indicates hardware was added or updated; payload is a tuple where `Item1` is the **database ID** (int) and `Item2` is the **serial number** (string). |
|
||||
| `HardwareListHardwareIncludedEvent` | `HardwareListHardwareIncludedEventArgs` | Indicates inclusion status of a hardware item changed; payload contains `SerialNumber`, `DASId`, and `Included` (bool). |
|
||||
| `HardwareListHardwareTestPTPDomainIDEvent` | `HardwareListHardwareTestPTPDomainIDEventArgs` | Indicates the PTP domain ID for a hardware item in the current test changed; payload contains `SerialNumber`, `DASId`, and `PTPDomainId` (byte). |
|
||||
| `HardwareListHardwareTestSampleRateEvent` | `HardwareListHardwareTestSampleRateEventArgs` | Indicates the sample rate for a hardware item in the current test changed; payload contains `SerialNumber`, `DASId`, and `TestSampleRate` (double). |
|
||||
| `HardwareListHardwareTestClockMasterEvent` | `HardwareListHardwareTestClockMasterEventArgs` | Indicates the clock master status for a hardware item in the current test changed; payload contains `SerialNumber`, `DASId`, and `IsClockMaster` (bool). |
|
||||
| `HardwareListHardwareTestAAFilterRateEvent` | `HardwareListHardwareTestAAFilterRateEventArgs` | Indicates the anti-aliasing filter rate for a hardware item in the current test changed; payload contains `SerialNumber`, `DASId`, and `TestAAFilterRate` (float). |
|
||||
|
||||
### Event Argument Classes (Nested)
|
||||
|
||||
| Class | Properties | Notes |
|
||||
|------|------------|-------|
|
||||
| `HardwareListHardwareIncludedEventArgs` | `string SerialNumber`, `int DASId`, `bool Included` | Constructor: `HardwareListHardwareIncludedEventArgs(string serial, bool included, int dasId)` |
|
||||
| `HardwareListHardwareTestPTPDomainIDEventArgs` | `string SerialNumber`, `int DASId`, `byte PTPDomainId` | Constructor: `HardwareListHardwareTestPTPDomainIDEventArgs(string serial, int dasId, byte ptpDomainId)` |
|
||||
| `HardwareListHardwareTestSampleRateEventArgs` | `string SerialNumber`, `int DASId`, `double TestSampleRate` | Constructor: `HardwareListHardwareTestSampleRateEventArgs(string serial, double testSampleRate, int dasId)` |
|
||||
| `HardwareListHardwareTestClockMasterEventArgs` | `string SerialNumber`, `int DASId`, `bool IsClockMaster` | Constructor: `HardwareListHardwareTestClockMasterEventArgs(string serial, bool isClockMaster, int dasId)` |
|
||||
| `HardwareListHardwareTestAAFilterRateEventArgs` | `string SerialNumber`, `int DASId`, `float TestAAFilterRate` | Constructor: `HardwareListHardwareTestAAFilterRateEventArgs(string serial, float testAAFilterRate, int dasId)` |
|
||||
|
||||
> **Note**: All event argument classes have *read-only* properties (set only via constructor). All properties are `public` but setters are `private`.
|
||||
|
||||
---
|
||||
|
||||
## 3. Invariants
|
||||
|
||||
- All events inherit from `PubSubEvent<T>`, meaning they follow Prism’s default pub/sub semantics: **one-to-many**, **asynchronous** (on the UI thread by default), and **no guaranteed ordering** of subscribers.
|
||||
- Payload types are strictly typed and non-nullable (e.g., `bool`, `string`, `int`, `byte`, `double`, `float`, `Tuple<...>`, or custom `EventArgs`).
|
||||
- For events carrying `SerialNumber`, the value is expected to be a non-null, non-empty string identifying a hardware unit.
|
||||
- For events carrying `DASId`, the value is expected to be a valid database identifier for a DAS (Data Acquisition System) instance.
|
||||
- `HardwareReplaceEvent`’s payload tuple must contain two non-null `IHardware` instances (though nullability is not enforced by the event type itself).
|
||||
- `HardwareSavedEvent`’s `int` payload (database ID) is expected to be `> 0` for existing hardware, but may be `0` or negative for new hardware (not specified in source — *inferred from typical patterns*).
|
||||
- All `HardwareListHardwareTest*` events are test-scoped: the `DASId` in the payload identifies the *test context* (not necessarily the hardware’s persistent DAS assignment).
|
||||
|
||||
---
|
||||
|
||||
## 4. Dependencies
|
||||
|
||||
### Dependencies *of* this module:
|
||||
- **Prism.Events** (`Prism` library) — required for `PubSubEvent<T>` base class.
|
||||
- **DTS.Common.Interface.DASFactory.Diagnostics.HardwareList** — referenced in `HardwareListEditHardwareEvent`, `HardwareListHardwareSelectedEvent`, `HardwareReplaceEvent`, and `HardwareSavedEvent` via `IHardware` (used only in `HardwareReplaceEvent` payload).
|
||||
|
||||
### Dependencies *on* this module:
|
||||
- Any module/UI component that needs to react to hardware list state changes (e.g., view models, services, test runners) will subscribe to one or more of these events.
|
||||
- Likely consumers include:
|
||||
- `HardwareListViewModel` (or similar)
|
||||
- Test configuration UIs (for test-specific events like `*TestSampleRateEvent`)
|
||||
- Persistence services (e.g., `HardwareSavedEvent` subscribers may update DB or cache)
|
||||
|
||||
---
|
||||
|
||||
## 5. Gotchas
|
||||
|
||||
- **Misleading XML comment**: `HardwareListEditHardwareEvent`’s class-level XML says “The HardwareListHardwareSelectedEvent event” — this is a copy-paste error; the actual class name is `HardwareListEditHardwareEvent`.
|
||||
- **Ambiguous naming**: `HardwareListHardwareSelectedEvent` vs. `HardwareListHardwareIncludedEvent` — both relate to selection/inclusion but serve different purposes:
|
||||
- `HardwareListHardwareSelectedEvent`: user *selection* (multi-select, UI-level).
|
||||
- `HardwareListHardwareIncludedEvent`: user toggled *inclusion* in the test configuration (logical inclusion/exclusion).
|
||||
- **`HardwareSavedEvent` name mismatch**: Class is named `HardwareSavedEvent`, but XML comment says “The HardwareAddedEvent event” — likely historical artifact.
|
||||
- **No validation on payload values**: Events do not enforce constraints (e.g., `PTPDomainId` range, `TestSampleRate` > 0). Consumers must validate.
|
||||
- **`HardwareReplaceEvent` uses `Tuple<IHardware, IHardware>`**: Requires `IHardware` interface from an external assembly (`DTS.Common.Interface.DASFactory.Diagnostics.HardwareList`). Ensure this interface is stable and versioned appropriately.
|
||||
- **`HardwareListHardwareIncludedEvent` payload includes `DASId`**: This suggests inclusion status may be *per-DAS*, but the event name does not reflect this nuance — could cause confusion if inclusion is assumed global.
|
||||
- **No cancellation or async support**: Events are fire-and-forget; subscribers cannot cancel or signal failure via the event payload.
|
||||
|
||||
> **None identified from source alone** for additional gotchas beyond those explicitly noted above.
|
||||
58
enriched-qwen3-coder-next/Common/DTS.Common/Events/ISO.md
Normal file
58
enriched-qwen3-coder-next/Common/DTS.Common/Events/ISO.md
Normal file
@@ -0,0 +1,58 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.Common/Events/ISO/ExtraPropertiesChangedEvent.cs
|
||||
generated_at: "2026-04-16T03:25:01.894095+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "61eef1209c66c784"
|
||||
---
|
||||
|
||||
# ISO
|
||||
|
||||
### 1. Purpose
|
||||
This module defines event infrastructure for propagating changes to *extra properties* within the ISO domain layer of the DTS system. Specifically, it provides a Prism-based pub/sub event (`ExtraPropertiesChangedEvent`) and its associated argument container (`ExtraPropertiesChangedEventArgs`) to decouple producers and consumers of property updates—enabling reactive UI or business logic components to respond when a collection of `IExtraProperty` instances is modified, while preserving provenance via `Producer` and `Consumer` references.
|
||||
|
||||
---
|
||||
|
||||
### 2. Public Interface
|
||||
|
||||
- **`ExtraPropertiesChangedEvent`**
|
||||
- *Type:* `class` inheriting from `PubSubEvent<ExtraPropertiesChangedEventArgs>`
|
||||
- *Behavior:* A Prism `PubSubEvent` used to publish and subscribe to notifications about changes to extra properties. Subscribers receive an `ExtraPropertiesChangedEventArgs` payload.
|
||||
|
||||
- **`ExtraPropertiesChangedEventArgs`**
|
||||
- *Type:* `class`
|
||||
- *Constructor:* `ExtraPropertiesChangedEventArgs(IList<IExtraProperty> extraProperties, object producer, object consumer)`
|
||||
- *Properties:*
|
||||
- `IList<IExtraProperty> ExtraProperties { get; }` — The updated collection of extra properties.
|
||||
- `object Producer { get; }` — The object instance that initiated or caused the change.
|
||||
- `object Consumer { get; }` — The object instance that is the intended recipient or target of the change.
|
||||
- *Behavior:* Encapsulates the data for an `ExtraPropertiesChangedEvent` payload. All properties are read-only after construction.
|
||||
|
||||
---
|
||||
|
||||
### 3. Invariants
|
||||
- `ExtraProperties` is non-null (enforced by constructor assignment; no null-check is present, so passing `null` will result in a `NullReferenceException` at runtime).
|
||||
- `Producer` and `Consumer` may be `null` (no validation is enforced in the constructor).
|
||||
- The `ExtraProperties` list reference is immutable in terms of property exposure (only a getter), but the *contents* of the list are not defensively copied—consumers must treat the list as potentially mutable if the producer retains a reference.
|
||||
- The event is strictly *publish-once-per-change*; no batching or deduplication semantics are implied.
|
||||
|
||||
---
|
||||
|
||||
### 4. Dependencies
|
||||
- **Dependencies *on* this module:**
|
||||
- `DTS.Common.Interface.ISO.ExtraProperties` — Provides the `IExtraProperty` interface used in `ExtraPropertiesChangedEventArgs.ExtraProperties`.
|
||||
- `Prism.Events` — Provides the `PubSubEvent<T>` base class.
|
||||
- `System.Collections.Generic` — Provides `IList<T>`.
|
||||
- **Dependencies *of* this module:**
|
||||
- This module is consumed by components that use Prism event aggregation (e.g., view models, services) to react to extra property changes in the ISO domain.
|
||||
- No other modules in this file depend on it—this is a leaf event definition.
|
||||
|
||||
---
|
||||
|
||||
### 5. Gotchas
|
||||
- **No defensive copying:** The `ExtraProperties` list is assigned directly from the constructor argument; if the caller mutates the list *after* constructing the args object, subscribers may observe unexpected changes.
|
||||
- **No validation on `Producer`/`Consumer`:** These may be `null`, and subscribers must handle this case explicitly.
|
||||
- **No versioning or metadata:** The event carries no timestamp, correlation ID, or change type (e.g., add/remove/replace), limiting traceability or differential processing.
|
||||
- **Assumes Prism event aggregator usage:** The class is tightly coupled to Prism’s `PubSubEvent<T>`—not usable in isolation without Prism infrastructure.
|
||||
- **No documentation on semantics of `Producer` vs `Consumer`:** The distinction between the two is not clarified in the source—consumers must infer intent (e.g., `Producer` = source of change, `Consumer` = target component).
|
||||
@@ -0,0 +1,36 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.Common/Events/Realtime/RealtimeChannelSelectedEvent.cs
|
||||
generated_at: "2026-04-16T03:24:41.583856+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "f8835260c1874944"
|
||||
---
|
||||
|
||||
# Realtime
|
||||
|
||||
## 1. Purpose
|
||||
This module defines the `RealtimeChannelSelectedEvent` class, a Prism `PubSubEvent` used to broadcast notifications across the application whenever a realtime communication channel is selected. Its role is to decouple the selection logic (e.g., UI interaction or configuration change) from downstream components (e.g., data handlers, UI panels, or connection managers) that need to react to channel changes—such as updating active subscriptions, switching data streams, or refreshing UI elements tied to the selected channel.
|
||||
|
||||
## 2. Public Interface
|
||||
- **`RealtimeChannelSelectedEvent`**
|
||||
- *Inherits from*: `PubSubEvent<IRealtimeChannel>`
|
||||
- *Behavior*: A concrete event type that carries an `IRealtimeChannel` payload. When published (via `EventAggregator.Publish()`), it notifies all subscribers that a new realtime channel has been selected. Subscribers receive the selected channel instance as the event argument.
|
||||
|
||||
## 3. Invariants
|
||||
- The event payload is guaranteed to be non-null *at the time of publication*, assuming callers follow the intended usage pattern (publishing only when a valid channel is selected).
|
||||
- The event is strictly *asynchronous* and *loosely coupled*—publishing does not block, and subscribers execute independently.
|
||||
- The event type is immutable by design (no custom logic beyond inheritance); behavior is defined entirely by Prism’s `PubSubEvent` infrastructure.
|
||||
|
||||
## 4. Dependencies
|
||||
- **Depends on**:
|
||||
- `Prism.Events` (for `PubSubEvent<TPayload>`)
|
||||
- `DTS.Common.Interface.Realtime` (for `IRealtimeChannel` interface)
|
||||
- **Depended upon by**:
|
||||
- Any component that needs to react to realtime channel selection changes (e.g., UI views, service layers managing subscriptions). Specific dependents are not visible in this file but would typically subscribe via `EventAggregator.GetEvent<RealtimeChannelSelectedEvent>().Subscribe(...)`.
|
||||
|
||||
## 5. Gotchas
|
||||
- **No null-safety enforcement**: While the event payload is expected to be non-null, Prism’s `PubSubEvent` does not enforce this. Callers must ensure only valid `IRealtimeChannel` instances are published.
|
||||
- **Lifetime management**: Subscribers must manually unsubscribe (e.g., in `Dispose` or view cleanup) to avoid memory leaks—especially for long-lived subscribers (e.g., services) subscribing to this short-lived event.
|
||||
- **No ordering guarantees**: Multiple subscribers execute in an undefined order; if sequential logic is required (e.g., cleanup before setup), explicit coordination is needed.
|
||||
- **None identified from source alone.**
|
||||
@@ -0,0 +1,38 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.Common/Events/RegionOfInterest/RegionOfInterestChangedEvent.cs
|
||||
generated_at: "2026-04-16T03:24:29.831249+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "b57954f8953ae512"
|
||||
---
|
||||
|
||||
# RegionOfInterest
|
||||
|
||||
### 1. Purpose
|
||||
This module defines a Prism-based event (`RegionOfInterestChangedEvent`) used to publish notifications when the current region of interest (ROI) changes in the application. It serves as a decoupling mechanism in the MVVM pattern, allowing view models or services to subscribe to ROI changes without direct references, enabling reactive UI updates or downstream processing (e.g., image analysis, rendering, or logging) in response to ROI modifications.
|
||||
|
||||
### 2. Public Interface
|
||||
- **`RegionOfInterestChangedEvent`**
|
||||
- *Type*: `class` (inherits from `Prism.Events.PubSubEvent<IRegionOfInterest>`)
|
||||
- *Behavior*: A Prism `PubSubEvent` that carries an `IRegionOfInterest` payload. When published (via `Publish`), all subscribers receive the new ROI instance. This event is *not* thread-safe by default (Prism’s `PubSubEvent` uses the synchronization context of the publisher unless configured otherwise).
|
||||
|
||||
### 3. Invariants
|
||||
- The event payload is always of type `IRegionOfInterest` (from `DTS.Common.Interface.RegionOfInterest`).
|
||||
- The event is *publish-only* in this file—no custom logic is defined for subscription, filtering, or persistence.
|
||||
- No validation or normalization of the `IRegionOfInterest` instance is performed by this class; validity of the payload is assumed to be enforced by publishers.
|
||||
|
||||
### 4. Dependencies
|
||||
- **External**:
|
||||
- `Prism.Events` (specifically `PubSubEvent<TPayload>`)
|
||||
- `DTS.Common.Interface.RegionOfInterest` (for the `IRegionOfInterest` interface)
|
||||
- **Internal**:
|
||||
- *Consumers*: Any module/service/view model that needs to react to ROI changes (e.g., via `IEventAggregator.GetEvent<RegionOfInterestChangedEvent>().Subscribe(...)`).
|
||||
- *Producers*: Code that calls `eventAggregator.GetEvent<RegionOfInterestChangedEvent>().Publish(roi)`, where `roi` implements `IRegionOfInterest`.
|
||||
|
||||
### 5. Gotchas
|
||||
- **No default thread-safety**: Subscribers may execute on the publisher’s thread context; if the publisher is on a background thread, subscribers must handle cross-thread access (e.g., via `Subscribe(..., ThreadOption.PublisherThread)` or UI dispatcher invocation).
|
||||
- **Lifetime management**: Subscribers must manually unsubscribe (e.g., in `Dispose` or view model cleanup) to avoid memory leaks, as Prism’s `PubSubEvent` holds strong references by default.
|
||||
- **No null-safety guarantee**: The event does not enforce non-null payloads; publishers must ensure `IRegionOfInterest` instances are valid (though `null` may be used intentionally to signal "clear ROI" if documented elsewhere).
|
||||
- **Interface dependency**: Behavior relies entirely on the contract of `IRegionOfInterest`; changes to that interface may silently break subscribers.
|
||||
- *None identified from source alone* regarding ordering guarantees, deduplication, or historical quirks—these would require inspection of publishers/subscribers.
|
||||
@@ -0,0 +1,55 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.Common/Events/RegionOfInterest/RegionOfInterestChannels/RegionOfInterestChannelsSelectedEvent.cs
|
||||
generated_at: "2026-04-16T03:25:26.350849+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "708a3abe68702000"
|
||||
---
|
||||
|
||||
# RegionOfInterestChannels
|
||||
|
||||
## 1. Purpose
|
||||
This module defines a Prism-based event for propagating region-of-interest (ROI) channel selection changes across the application. Specifically, `RegionOfInterestChannelsSelectedEvent` is a `PubSubEvent` used to broadcast when a user or system component selects a set of channels (by name and ID) for a given ROI—identified by its suffix—along with the consumer responsible for the selection. It enables decoupled communication between ROI management UI components (e.g., channel selectors) and downstream consumers (e.g., visualization or processing modules) without tight coupling.
|
||||
|
||||
## 2. Public Interface
|
||||
- **`RegionOfInterestChannelsSelectedEvent`**
|
||||
*Type:* `class` (inherits from `Prism.Events.PubSubEvent<RegionOfInterestChannelsSelectedEventArgs>`)
|
||||
*Behavior:* A Prism event used to publish and subscribe to ROI channel selection changes. Subscribers receive an instance of `RegionOfInterestChannelsSelectedEventArgs` containing the selection details.
|
||||
|
||||
- **`RegionOfInterestChannelsSelectedEventArgs`**
|
||||
*Type:* `class`
|
||||
*Behavior:* Encapsulates the payload of a channel selection event.
|
||||
- **Constructor:**
|
||||
`RegionOfInterestChannelsSelectedEventArgs(string roiSuffix, string[] selectedChannelNames, long[] selectedChannelIds, object o)`
|
||||
Initializes the event args with the ROI suffix, selected channel names, selected channel IDs, and the consumer object. All properties are set once and immutable after construction.
|
||||
- **Properties:**
|
||||
- `string RegionOfInterestSuffix { get; }` — The suffix identifying the ROI (e.g., `"Brain"`, `"Tumor"`), used to correlate the selection with a specific ROI context.
|
||||
- `string[] ChannelNames { get; }` — Ordered array of selected channel *names* (e.g., `["Red", "Green"]`). May be empty.
|
||||
- `long[] ChannelIds { get; }` — Ordered array of corresponding selected channel *IDs* (e.g., `[101L, 102L]`). Must be same length as `ChannelNames`.
|
||||
- `object Consumer { get; }` — The object (typically a view model or service) that triggered or is responsible for the selection. Used to avoid re-processing events originating from the same consumer.
|
||||
|
||||
## 3. Invariants
|
||||
- `ChannelNames.Length == ChannelIds.Length` must hold for all valid instances (enforced by caller; no runtime validation is present in the class).
|
||||
- `RegionOfInterestSuffix` is non-null and non-empty (implied by usage context; not validated in the constructor).
|
||||
- `ChannelNames` and `ChannelIds` arrays are never `null` (constructor assigns them directly; caller must provide non-null arrays).
|
||||
- `Consumer` may be `null`, but typically represents a unique consumer instance to prevent echo loops.
|
||||
- The order of elements in `ChannelNames` and `ChannelIds` is semantically meaningful (i.e., index `i` in `ChannelNames` corresponds to index `i` in `ChannelIds`).
|
||||
|
||||
## 4. Dependencies
|
||||
- **Dependencies *on* this module:**
|
||||
- `Prism.Events` (via `PubSubEvent<T>`) — Required for event publication/subscription.
|
||||
- `Prism.Regions` — Imported but *not used* in this file (likely a remnant or for future extension).
|
||||
- **Dependencies *of* this module:**
|
||||
- Consumers of `RegionOfInterestChannelsSelectedEvent` (e.g., view models, services) must subscribe to it using Prism’s event aggregator.
|
||||
- Publishers must provide valid `RegionOfInterestChannelsSelectedEventArgs` instances.
|
||||
- **Inferred consumers:**
|
||||
- Any module handling ROI-specific channel logic (e.g., rendering, analysis pipelines) likely subscribes to this event.
|
||||
|
||||
## 5. Gotchas
|
||||
- **No validation of array lengths or nulls in the constructor** — Callers must ensure `selectedChannelNames` and `selectedChannelIds` are non-null and of equal length; otherwise, downstream consumers may encounter `IndexOutOfRangeException` or inconsistent state.
|
||||
- **`Consumer` is an `object`** — No type safety or interface contract is enforced. Subscribers must cast or check the type themselves (e.g., `is IRegionOfInterestConsumer`), risking runtime errors if misused.
|
||||
- **`Prism.Regions` is imported but unused** — Suggests possible historical or future use (e.g., region-scoped events), but currently adds no value and may confuse readers.
|
||||
- **No documentation of expected ROI suffix format** — The meaning of `RegionOfInterestSuffix` (e.g., casing, allowed characters) is application-specific and not defined here.
|
||||
- **No mechanism to distinguish initial selection vs. subsequent updates** — Subscribers must track state themselves to avoid redundant processing.
|
||||
- **No cancellation or error handling support** — The event is fire-and-forget; subscribers cannot signal failure or abort propagation.
|
||||
@@ -0,0 +1,93 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.Common/Events/Sensors/CalibrationBehaviorSettingChangedEvent.cs
|
||||
- Common/DTS.Common/Events/Sensors/ExportCalibrationBehaviorSettingChangedEvent.cs
|
||||
- Common/DTS.Common/Events/Sensors/SensorFilterTypeChangedEvent.cs
|
||||
generated_at: "2026-04-16T03:24:51.949729+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "0b8580fe5a59ce51"
|
||||
---
|
||||
|
||||
# Sensors
|
||||
|
||||
## Documentation: Sensor Configuration Event Definitions
|
||||
|
||||
---
|
||||
|
||||
### 1. **Purpose**
|
||||
This module defines event types used to propagate changes in sensor configuration settings across the application, leveraging the Prism EventAggregator pattern for decoupled communication. Specifically, it publishes notifications when calibration behavior settings change (for both general and export contexts) and when the filter type applied to a sensor changes—enabling UI components and business logic modules to react to these changes without tight coupling. These events are part of the shared `DTS.Common` library and are intended for use across modules that manage sensor data acquisition, filtering, and calibration.
|
||||
|
||||
---
|
||||
|
||||
### 2. **Public Interface**
|
||||
|
||||
#### `CalibrationBehaviorSettingChangedEvent`
|
||||
- **Signature**:
|
||||
`public class CalibrationBehaviorSettingChangedEvent : PubSubEvent<DTS.Common.Enums.Sensors.CalibrationBehaviors> { }`
|
||||
- **Behavior**:
|
||||
Publishes a change in the *general* calibration behavior setting. Payload is a value of the `CalibrationBehaviors` enum, representing the new behavior.
|
||||
|
||||
#### `ExportCalibrationBehaviorSettingChangedEvent`
|
||||
- **Signature**:
|
||||
`public class ExportCalibrationBehaviorSettingChangedEvent : PubSubEvent<DTS.Common.Enums.Sensors.CalibrationBehaviors> { }`
|
||||
- **Behavior**:
|
||||
Publishes a change in the *export-specific* calibration behavior setting. Payload is a value of the `CalibrationBehaviors` enum, representing the new behavior for export operations.
|
||||
|
||||
#### `SensorFilterTypeChangedEvent`
|
||||
- **Signature**:
|
||||
`public class SensorFilterTypeChangedEvent : PubSubEvent<SensorFilterTypeChangedEventArgs> { }`
|
||||
- **Behavior**:
|
||||
Publishes a change in the filter type applied to a sensor. Payload is a `SensorFilterTypeChangedEventArgs` object containing details about the change (e.g., ISO code character, filter class, associated sensor/calibration objects, and configuration flags).
|
||||
|
||||
#### `SensorFilterTypeChangedEventArgs`
|
||||
- **Properties**:
|
||||
- `char ISOCodeChar` — The ISO code character used when `EventType == EventTypes.ISOCodeChar`.
|
||||
- `EventTypes EventType` — Indicates whether the change was triggered by an ISO code character (`ISOCodeChar`) or a filter class (`FilterClass`).
|
||||
- `FilterClassType FilterClass` — The new filter class type used when `EventType == EventTypes.FilterClass`.
|
||||
- `ISensorCalibration Calibration` — The calibration object associated with the sensor at the time of change.
|
||||
- `ISensorData Sensor` — The sensor instance whose filter type changed.
|
||||
- `bool UseISOCodeFilterMapping` — Flag indicating whether ISO code filtering is enabled/mapped.
|
||||
- `bool UseZeroForUnfiltered` — Flag indicating whether zero should be used for unfiltered values.
|
||||
- **Constructors**:
|
||||
- `SensorFilterTypeChangedEventArgs(char code, ISensorData sensor, ISensorCalibration sensorCalibration, bool useISOCodeFilterMapping, bool bUseZeroForUnfiltered)`
|
||||
Initializes for ISO code–based filter changes (`EventType = EventTypes.ISOCodeChar`).
|
||||
- `SensorFilterTypeChangedEventArgs(FilterClassType filterClassType, ISensorData sensor, ISensorCalibration sensorCalibration, bool useISOCodeFilterMapping, bool bUseZeroForUnfiltered)`
|
||||
Initializes for filter class–based changes (`EventType = EventTypes.FilterClass`).
|
||||
|
||||
---
|
||||
|
||||
### 3. **Invariants**
|
||||
- `SensorFilterTypeChangedEventArgs` must be constructed with **exactly one** of `ISOCodeChar` or `FilterClass` populated, depending on `EventType`. The other field remains default (`\0` or `default(FilterClassType)`).
|
||||
- `EventType` is immutable after construction and is set based on which constructor overload is used.
|
||||
- All `SensorFilterTypeChangedEventArgs` instances must include non-null `Sensor` and `Calibration` references (no null checks are performed in the source, implying callers are expected to ensure validity).
|
||||
- `UseISOCodeFilterMapping` and `UseZeroForUnfiltered` are boolean flags passed directly from the caller and are not validated or normalized.
|
||||
|
||||
---
|
||||
|
||||
### 4. **Dependencies**
|
||||
- **Depends on**:
|
||||
- `Prism.Events` (for `PubSubEvent<T>` base class).
|
||||
- `DTS.Common.Enums.Sensors` (for `CalibrationBehaviors`, `SensorFilterTypeChangedEventArgs.EventTypes`, and `FilterClassType`).
|
||||
- `DTS.Common.Interface.Sensors` (for `ISensorCalibration` and `ISensorData` interfaces).
|
||||
- **Used by**:
|
||||
- Modules consuming sensor configuration changes (e.g., UI views, data processing pipelines, export services).
|
||||
- Likely subscribed to by components that update filter UI, reconfigure sensor pipelines, or regenerate filtered data exports.
|
||||
|
||||
---
|
||||
|
||||
### 5. **Gotchas**
|
||||
- **Namespace inconsistency**:
|
||||
`CalibrationBehaviorSettingChangedEvent` and `ExportCalibrationBehaviorSettingChangedEvent` reside in `DTS.Common.Events`, while `SensorFilterTypeChangedEvent` resides in `DTS.Common.Events.Sensors`. This may cause confusion when registering/subscribing (e.g., `eventAggregator.GetEvent<SensorFilterTypeChangedEvent>()` vs `GetEvent<CalibrationBehaviorSettingChangedEvent>()`).
|
||||
- **No validation in constructor**:
|
||||
The constructors do not enforce that `sensor` or `sensorCalibration` are non-null. Callers must ensure this, or risk `NullReferenceException` at event handling time.
|
||||
- **Ambiguous `FilterClassType` usage**:
|
||||
The type `FilterClassType` is referenced but not defined in the provided source—its possible values and semantics are unknown here.
|
||||
- **Dual constructor overloads**:
|
||||
The two `SensorFilterTypeChangedEventArgs` constructors are not symmetric in naming or parameter order (e.g., `code` vs `filterClassType` first), increasing risk of misuse.
|
||||
- **No documentation on `CalibrationBehaviors` enum**:
|
||||
The meaning of specific `CalibrationBehaviors` values is not included in this module and must be inferred from elsewhere.
|
||||
|
||||
---
|
||||
|
||||
*Documentation generated from provided source files only.*
|
||||
@@ -0,0 +1,90 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.Common/Events/Sensors/SensorsList/SensorsListSensorSelectedEvent.cs
|
||||
- Common/DTS.Common/Events/Sensors/SensorsList/SensorChangedEvent.cs
|
||||
generated_at: "2026-04-16T03:25:38.832250+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "58207bf6cc93d33a"
|
||||
---
|
||||
|
||||
# SensorsList
|
||||
|
||||
## Documentation Page: `DTS.Common.Events.Sensors.SensorsList`
|
||||
|
||||
---
|
||||
|
||||
### 1. Purpose
|
||||
This module defines a set of Prism-based pub/sub events used to coordinate sensor-related state changes and user actions across the UI and business logic layers in the DTS application. Specifically, it enables decoupled communication for sensor selection, saving, updating, and modification of sensor properties (e.g., sensitivity, excitation, nonlinearity). These events allow view models and services to react to sensor lifecycle events without tight coupling—e.g., updating filter lists when a sensor is added/deleted, or refreshing sensitivity controls when a user modifies a sensor’s properties.
|
||||
|
||||
---
|
||||
|
||||
### 2. Public Interface
|
||||
|
||||
#### `SensorsListSensorSelectedEvent`
|
||||
- **Type**: `class SensorsListSensorSelectedEvent : PubSubEvent<string[]>`
|
||||
- **Behavior**: Publishes an array of strings (likely serial numbers or identifiers) when a sensor is selected in the sensors list UI. Subscribers receive the selected sensor identifiers via the payload.
|
||||
- **Note**: Despite the XML comment referencing `TTSImportSummaryImportEvent` and “Import button was clicked,” the class name, namespace, and inheritance clearly indicate it is for *sensor selection*, not import. This appears to be a documentation error.
|
||||
|
||||
#### `SensorSavedEvent`
|
||||
- **Type**: `class SensorSavedEvent : PubSubEvent<double>`
|
||||
- **Behavior**: Published after a new sensor is saved (e.g., added via the settings menu). The `double` payload likely represents the database ID of the newly saved sensor (as suggested by the comment referencing “FB 13120” and “save function”).
|
||||
|
||||
#### `SensorUpdatedEvent`
|
||||
- **Type**: `class SensorUpdatedEvent : PubSubEvent<bool>`
|
||||
- **Behavior**: Published when a sensor is added or deleted to signal that the default filter selection in the filter list should be refreshed. The `bool` payload likely indicates whether the change was an *addition* (`true`) or *deletion* (`false`), though the source does not explicitly define the semantics of the boolean.
|
||||
|
||||
#### `SensorChangedEvent`
|
||||
- **Type**: `class SensorChangedEvent : PubSubEvent<SensorChangedArgs>`
|
||||
- **Behavior**: Published when one or more sensor properties are modified by the user. Carries a `SensorChangedArgs` object detailing *which* properties changed.
|
||||
|
||||
##### `SensorChangedArgs`
|
||||
- **Type**: `class SensorChangedArgs`
|
||||
- **Properties**:
|
||||
- `SerialNumber` (`string`) – Serial number of the changed sensor (currently unused, reserved for future use).
|
||||
- `DatabaseId` (`int`) – Database ID of the changed sensor (currently unused, reserved for future use).
|
||||
- `CurrentModelLoading` (`bool`) – `true` if the current model is being loaded (e.g., on startup or restore).
|
||||
- `NonLinearChanged` (`bool`) – `true` if the nonlinearity setting changed.
|
||||
- `SensitivityChanged` (`bool`) – `true` if the sensitivity value changed.
|
||||
- `IsProportionalChanged` (`bool`) – `true` if the proportionality setting changed.
|
||||
- `ExcitationChanged` (`bool`) – `true` if an excitation setting changed.
|
||||
- **Constructor**:
|
||||
```csharp
|
||||
public SensorChangedArgs(string serialNumber, int databaseId, bool currentModelLoading,
|
||||
bool nonLinearChanged, bool sensitivityChanged,
|
||||
bool isProportionalChanged, bool excitationChanged)
|
||||
```
|
||||
All parameters are required and stored immutably.
|
||||
|
||||
---
|
||||
|
||||
### 3. Invariants
|
||||
- All events inherit from `Prism.Events.PubSubEvent<T>`, meaning they follow Prism’s pub/sub semantics:
|
||||
- Events are published asynchronously (on the UI thread by default in Prism WPF).
|
||||
- Subscribers must explicitly subscribe/unsubscribe to avoid memory leaks.
|
||||
- `SensorChangedArgs` is immutable: all properties are `get`-only and initialized via constructor.
|
||||
- The `SerialNumber` and `DatabaseId` fields in `SensorChangedArgs` are *not currently used* (per comments), so consumers should not rely on them for identification.
|
||||
- The boolean flags in `SensorChangedArgs` are *independent*—multiple may be `true` in a single event (e.g., both `SensitivityChanged` and `ExcitationChanged` if both were modified in one operation).
|
||||
|
||||
---
|
||||
|
||||
### 4. Dependencies
|
||||
- **Internal Dependencies**:
|
||||
- `Prism.Events` (via `using Prism.Events;`) — required for `PubSubEvent<T>`.
|
||||
- Namespace `DTS.Common.Events.Sensors.SensorsList` — all events are co-located here.
|
||||
- **External Dependencies (inferred)**:
|
||||
- Likely consumed by UI components (e.g., view models for sensor list, filter controls, settings panels) and services managing sensor persistence.
|
||||
- `SensorSavedEvent`’s `double` payload suggests integration with a database layer (e.g., returning a new sensor’s ID).
|
||||
- `SensorChangedEvent` implies integration with sensor configuration UI (e.g., sensitivity/excitation controls).
|
||||
- **No external libraries beyond Prism** are referenced in the source.
|
||||
|
||||
---
|
||||
|
||||
### 5. Gotchas
|
||||
- **Misleading XML comment**: `SensorsListSensorSelectedEvent`’s summary incorrectly describes `TTSImportSummaryImportEvent` and import behavior. This is likely a copy-paste error and should be corrected to reflect sensor *selection*.
|
||||
- **Ambiguous boolean semantics**: The meaning of the `bool` payload in `SensorUpdatedEvent` is not documented beyond “used in selecting the default filter.” Consumers must infer or verify whether `true` = add, `false` = delete.
|
||||
- **Unused fields**: `SerialNumber` and `DatabaseId` in `SensorChangedArgs` are explicitly marked as unused. Do not depend on them—future use is planned but not implemented.
|
||||
- **No validation or error handling**: Events carry no error state or validation context. Subscribers must handle invalid states or errors independently.
|
||||
- **No ordering guarantees**: As Prism events are asynchronous, there is no guarantee about the order in which subscribers receive events (e.g., `SensorSavedEvent` vs. `SensorUpdatedEvent` after a save operation).
|
||||
|
||||
None identified beyond the above.
|
||||
111
enriched-qwen3-coder-next/Common/DTS.Common/Events/TSRAIRGo.md
Normal file
111
enriched-qwen3-coder-next/Common/DTS.Common/Events/TSRAIRGo.md
Normal file
@@ -0,0 +1,111 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.Common/Events/TSRAIRGo/StartStopDASScan.cs
|
||||
- Common/DTS.Common/Events/TSRAIRGo/StartStopOverallStatusStateMachine.cs
|
||||
- Common/DTS.Common/Events/TSRAIRGo/Trigger.cs
|
||||
- Common/DTS.Common/Events/TSRAIRGo/Download.cs
|
||||
- Common/DTS.Common/Events/TSRAIRGo/RemoveDAS.cs
|
||||
- Common/DTS.Common/Events/TSRAIRGo/NavigateToDashboard.cs
|
||||
- Common/DTS.Common/Events/TSRAIRGo/Arm.cs
|
||||
- Common/DTS.Common/Events/TSRAIRGo/NavigateFromTSRAIRGoToDataPRO.cs
|
||||
- Common/DTS.Common/Events/TSRAIRGo/ClearIpAddress.cs
|
||||
- Common/DTS.Common/Events/TSRAIRGo/IpAddressToPing.cs
|
||||
- Common/DTS.Common/Events/TSRAIRGo/RecordingModeChanged.cs
|
||||
- Common/DTS.Common/Events/TSRAIRGo/SystemStatus.cs
|
||||
- Common/DTS.Common/Events/TSRAIRGo/DASSampleRateChanged.cs
|
||||
- Common/DTS.Common/Events/TSRAIRGo/SystemSettingsSampleRateChanged.cs
|
||||
- Common/DTS.Common/Events/TSRAIRGo/LevelTrigger.cs
|
||||
generated_at: "2026-04-16T03:24:54.024483+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "60eefa60bead6fb1"
|
||||
---
|
||||
|
||||
# TSRAIRGo Event Definitions
|
||||
|
||||
## 1. Purpose
|
||||
This module defines a set of Prism `PubSubEvent<T>`-based events used for inter-component communication within the TSRAIRGo subsystem. These events coordinate high-level system operations such as starting/stopping DAS scans, managing system status and errors, handling DAS device lifecycle (add/remove), configuring sampling rates and recording modes, triggering downloads, managing IP address pinging, and navigating between UI views (e.g., dashboard, DataPRO). The events serve as a decoupled messaging mechanism to synchronize state and actions across loosely coupled modules without direct dependencies.
|
||||
|
||||
## 2. Public Interface
|
||||
|
||||
### Event Classes (all inherit from `Prism.Events.PubSubEvent<T>`)
|
||||
|
||||
| Event Name | Payload Type | Payload Description |
|
||||
|------------|--------------|---------------------|
|
||||
| `StartStopDASScanEvent` | `bool` | `true` to start DAS scan, `false` to stop. |
|
||||
| `StartStopOverallStatusStateMachineEvent` | `bool` | `true` to start the overall status state machine, `false` to stop. |
|
||||
| `TriggerEvent` | `TriggerArg` | Generic trigger event; `TriggerArg` is currently empty. |
|
||||
| `DownloadEvent` | `DownloadArg` | Request to initiate a download; `DownloadArg` is currently empty. |
|
||||
| `RemoveDASEvent` | `string` | Identifier (e.g., serial number or name) of the DAS device to remove. |
|
||||
| `AddDASEvent` | `string` | Identifier of the DAS device to add. |
|
||||
| `NavigateToDashboardEvent` | `NavigateToDashboardArg` | Request to navigate to the dashboard view; `NavigateToDashboardArg` is currently empty. |
|
||||
| `ArmEvent` | `ArmArg` | Arm/disarm command. `Arm` property: `true` to arm, `false` to disarm. |
|
||||
| `ClearIpAddressEvent` | `ClearIpAddressArg` | Request to clear an IP address. `Clear` property: `true` to clear, `false` otherwise. |
|
||||
| `IpAddressToPingEvent` | `IpAddressToPingArg` | IP address to ping. `IpAddress` property: non-null string. |
|
||||
| `SystemSettingsRecordingModeChangedEvent` | `RecordingModeArg` | Recording mode has changed. `RecordingModeDisplayString` property: human-readable mode string. |
|
||||
| `SystemStatusEvent` | `SystemStatusArg` | General system status update. `Message` property: status message. |
|
||||
| `SystemErrorEvent` | `SystemErrorArg` | System error notification. `Error` property: error message. |
|
||||
| `DASSampleRateChangedEvent` | `DASSampleRateArg` | DAS sample rate changed. `SampleRate` property: integer (e.g., Hz). |
|
||||
| `DASListChangedEvent` | `bool` | DAS device list has changed. Payload indicates presence/absence of devices (e.g., `true` if at least one DAS is present). |
|
||||
| `SystemSettingsSampleRateChangedEvent` | `SystemSettingsSampleRateArg` | System settings sample rate changed. `SampleRate` property: integer. |
|
||||
| `SystemSettingsDurationChangedEvent` | `SystemSettingsDurationChangedArg` | System settings duration changed. `Duration` property: `double` (e.g., seconds). |
|
||||
| `SystemSettingsLevelTriggerChangedEvent` | `LevelTriggerArg` | Level trigger configuration changed in system settings. |
|
||||
| `DASLevelTriggerChangedEvent` | `LevelTriggerArg` | Level trigger configuration changed for DAS. |
|
||||
|
||||
> **Note**: `NavigateToDashboardEvent` and `NavigateFromTSRAIRGoToDataPROEvent` (see below) reside in `DTS.Common.Events` (not `DTS.Common.Events.TSRAIRGo`), indicating cross-subsystem navigation.
|
||||
|
||||
| Event Name | Payload Type | Payload Description |
|
||||
|------------|--------------|---------------------|
|
||||
| `NavigateFromTSRAIRGoToDataPROEvent` | `NavigateFromTSRAIRGoToDataPROArg` | Request to navigate from TSRAIRGo to DataPRO view; `NavigateFromTSRAIRGoToDataPROArg` is currently empty. |
|
||||
|
||||
### Argument Classes
|
||||
|
||||
| Class | Properties | Notes |
|
||||
|-------|------------|-------|
|
||||
| `TriggerArg` | *(none)* | Placeholder; may be extended in future. |
|
||||
| `DownloadArg` | *(none)* | Placeholder; may be extended in future. |
|
||||
| `ArmArg` | `public bool Arm { get; set; }` | Controls arming state. |
|
||||
| `ClearIpAddressArg` | `public bool Clear { get; set; }` | Controls whether to clear IP address. |
|
||||
| `IpAddressToPingArg` | `public string IpAddress { get; set; }` | IP address to ping; must be non-null. |
|
||||
| `RecordingModeArg` | `public string RecordingModeDisplayString { get; set; }` | Human-readable display string for recording mode. |
|
||||
| `SystemStatusArg` | `public string Message { get; set; }` | Status message (e.g., "Ready", "Recording"). |
|
||||
| `SystemErrorArg` | `public string Error { get; set; }` | Error message (e.g., exception text). |
|
||||
| `DASSampleRateArg` | `public int SampleRate { get; set; }` | Sample rate in Hz. |
|
||||
| `SystemSettingsSampleRateArg` | `public int SampleRate { get; set; }` | Sample rate in Hz. |
|
||||
| `SystemSettingsDurationChangedArg` | `public double Duration { get; set; }` | Duration in seconds. |
|
||||
| `LevelTriggerArg` | `string LevelTriggerText`, `bool? LevelTriggerAxis1`, `bool? LevelTriggerAxis2`, `bool? LevelTriggerAxis3` | Level trigger configuration. Implements custom `Equals()` logic for comparison. |
|
||||
|
||||
## 3. Invariants
|
||||
|
||||
- All events derive from `Prism.Events.PubSubEvent<T>` and are intended for use with Prism’s event aggregation pattern.
|
||||
- Payload types are strictly typed (`bool`, `string`, `int`, `double`, or custom argument classes).
|
||||
- `LevelTriggerArg.Equals()` implements *partial equivalence*: two instances are equal if **any one** of the following matches:
|
||||
- Both `LevelTriggerAxis1` are `true` (and non-null),
|
||||
- Both `LevelTriggerAxis2` are `true`,
|
||||
- Both `LevelTriggerAxis3` are `true`,
|
||||
- Both `LevelTriggerText` are non-empty and equal.
|
||||
- Otherwise, `false`.
|
||||
- `DASLevelTriggerChangedEvent` has a `SuppressMessage` attribute for naming convention (`S101`), indicating intentional deviation from PascalCase naming for compatibility with DAS domain terminology.
|
||||
- Navigation events (`NavigateToDashboardEvent`, `NavigateFromTSRAIRGoToDataPROEvent`) reside in the top-level `DTS.Common.Events` namespace, implying broader system scope beyond TSRAIRGo.
|
||||
|
||||
## 4. Dependencies
|
||||
|
||||
### Dependencies *of* this module:
|
||||
- **Prism.Events**: All events rely on `Prism.Events.PubSubEvent<T>`, indicating a dependency on the Prism library (likely Prism.Core).
|
||||
- **System**: Minimal usage (`System`, `System.Collections.Generic`, etc.) only in `DASSampleRateChanged.cs` (likely auto-generated using `using` directives).
|
||||
|
||||
### Dependencies *on* this module:
|
||||
- Any module requiring TSRAIRGo coordination (e.g., UI modules, DAS service modules, status managers) will subscribe to these events.
|
||||
- Specifically:
|
||||
- `StartStopDASScanEvent`, `StartStopOverallStatusStateMachineEvent`: Likely consumed by DAS control and state machine modules.
|
||||
- `AddDASEvent`/`RemoveDASEvent`: Consumed by device management modules.
|
||||
- `SystemStatusEvent`/`SystemErrorEvent`: Likely consumed by status display/UI modules.
|
||||
- Navigation events: Consumed by shell/navigation modules.
|
||||
|
||||
## 5. Gotchas
|
||||
|
||||
- **Empty argument classes**: Several argument types (`TriggerArg`, `DownloadArg`, `NavigateToDashboardArg`, `NavigateFromTSRAIRGoToDataPROArg`) are currently empty. This may indicate incomplete design or future extensibility—consumers should not assume payload semantics beyond the event name.
|
||||
- **`LevelTriggerArg.Equals()` semantics**: The custom equality logic is non-standard (only checks for *true* values in axis flags or text match). This may cause unexpected behavior if used in collections (e.g., `HashSet`, `Dictionary`) or comparisons expecting full structural equality.
|
||||
- **Namespace inconsistency**: `NavigateToDashboardEvent` and `NavigateFromTSRAIRGoToDataPROEvent` are in `DTS.Common.Events`, while most others are in `DTS.Common.Events.TSRAIRGo`. This may reflect legacy or cross-module design decisions—verify intended scope.
|
||||
- **No validation on payload values**: Events accept raw payloads (e.g., `IpAddress` may be invalid, `SampleRate` may be negative). Validation (if any) must occur at subscriber/consumer level.
|
||||
- **`bool?` in `LevelTriggerArg`**: The use of nullable booleans (`bool?`) for axis flags suggests three-state logic (e.g., `true`/`false`/not applicable), but the `Equals()` implementation only considers `true` values—this may be a source of confusion or bugs.
|
||||
@@ -0,0 +1,94 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.Common/Events/TTSImport/TTSImportSavedChangesStatusEvent.cs
|
||||
- Common/DTS.Common/Events/TTSImport/StatusAndProgressBarEvent.cs
|
||||
- Common/DTS.Common/Events/TTSImport/TTSImportSummaryRunTestEvent.cs
|
||||
- Common/DTS.Common/Events/TTSImport/TTSImportTestSetupChangedEvent.cs
|
||||
- Common/DTS.Common/Events/TTSImport/AssignedChannelsChangedEvent.cs
|
||||
- Common/DTS.Common/Events/TTSImport/TTSImportHardwareScanRunEvent.cs
|
||||
- Common/DTS.Common/Events/TTSImport/TTSImportSummaryImportEvent.cs
|
||||
- Common/DTS.Common/Events/TTSImport/TTSImportArmedRunTestEvent.cs
|
||||
- Common/DTS.Common/Events/TTSImport/TTSImportReadFileFinishedEvent.cs
|
||||
- Common/DTS.Common/Events/TTSImport/TTSImportHardwareScanFinishedEvent.cs
|
||||
- Common/DTS.Common/Events/TTSImport/EIDMappingEvent.cs
|
||||
- Common/DTS.Common/Events/TTSImport/TTSImportReadFileStatusEvent.cs
|
||||
- Common/DTS.Common/Events/TTSImport/TTSImportReadXMLFileEvent.cs
|
||||
generated_at: "2026-04-16T03:25:22.937764+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "6b29eb45ebade668"
|
||||
---
|
||||
|
||||
# TTS Import Event Documentation
|
||||
|
||||
## 1. Purpose
|
||||
This module defines a set of Prism-based events used to coordinate state and workflow across the TTS (Time-to-Sync) import process in the DTS system. These events facilitate loose coupling between UI views, view models, and business logic layers during file reading, hardware scanning, test setup configuration, and import execution. They enable asynchronous communication for steps such as file parsing, hardware channel assignment, test execution triggers, and status reporting, ensuring separation of concerns and testability.
|
||||
|
||||
## 2. Public Interface
|
||||
|
||||
### Event Classes (all inherit from `PubSubEvent<TPayload>` unless otherwise noted):
|
||||
|
||||
| Event Name | Payload Type | Description |
|
||||
|------------|--------------|-------------|
|
||||
| `TTSImportSavedChangesStatusEvent` | `bool` | Indicates whether changes to the current TTS import setup have been saved (`true`) or not (`false`). |
|
||||
| `StatusAndProgressBarEvent` | `StatusAndProgressBarEventArgs` | Updates status text and/or progress bar UI elements. *(Note: `StatusAndProgressBarEventArgs` is referenced but not defined in the provided source; its structure must be inferred from usage or defined elsewhere.)* |
|
||||
| `TTSImportSummaryRunTestEvent` | `ITTSSetup` | Triggered by the Summary step to instruct the page to execute a test. |
|
||||
| `TTSImportTestSetupChangedEvent` | `ITTSSetup` | Published whenever the current TTS test setup object is modified. |
|
||||
| `AssignedChannelsChangedEvent` | `ITTSSetup` | Published when the set of hardware channels assigned to sensors changes. |
|
||||
| `TTSImportHardwareScanRunEvent` | `ITTSSetup` | Triggered by the Hardware Scan step to initiate hardware pinging. |
|
||||
| `TTSImportSummaryImportEvent` | `ITTSSetup` | Published when the user clicks the Import button in the Summary step. |
|
||||
| `TTSImportArmedRunTestEvent` | `ITTSSetup` | Triggered by the Hardware Scan step to advance the workflow to the Arm step in Run Test. |
|
||||
| `TTSImportReadFileFinishedEvent` | `ITTSSetup` | Published by the Read File step to signal completion of file reading. *(Note: Inherits from `CompositePresentationEvent<T>` instead of `PubSubEvent<T>`.)* |
|
||||
| `TTSImportHardwareScanFinishedEvent` | `List<IDASHardware>` | Published by the page to notify the Hardware Scan view model that hardware scanning is complete, carrying the updated list of DAS hardware. |
|
||||
| `EIDMappingEvent` | `IDictionary<string, string>` | Published when sensor ID to hardware channel ID mapping is determined. Key = sensor ID, Value = hardware channel ID. |
|
||||
| `TTSImportReadFileStatusEvent` | `ReadFileStatusArg` | Reports success/failure of file reading. Payload contains `Status`, `TTSSetup`, and `ErrorMessage`. |
|
||||
| `TTSImportReadXMLFileRequestEvent` | `TTSImportReadXMLFileRequestArg` | Request to read an XML file. Payload includes `FilePath` and `TestSetup`. |
|
||||
| `TTSImportReadXMLFileResponseEvent` | `TTSImportReadXMLFileResponseEventArg` | Response to an XML read request. Payload includes `TestSetup`, `Errors`, `TTSSetup`, and `LevelTriggers`. |
|
||||
|
||||
### Supporting Argument Classes (defined in source):
|
||||
|
||||
| Class | Fields | Description |
|
||||
|-------|--------|-------------|
|
||||
| `ReadFileStatusArg` | `bool Status`, `ITTSSetup TTSSetup`, `string ErrorMessage` | Payload for `TTSImportReadFileStatusEvent`. `Status` indicates success; `ErrorMessage` is only meaningful when `Status == false`. |
|
||||
| `TTSImportReadXMLFileRequestArg` | `string FilePath`, `ITTSSetup TestSetup` | Payload for `TTSImportReadXMLFileRequestEvent`. Used to request XML file parsing. |
|
||||
| `TTSImportReadXMLLevelTrigger` | `double Threshold`, `string SensorSerialNumber` | Represents a level trigger configuration parsed from XML. |
|
||||
| `TTSImportReadXMLFileResponseEventArg` | `ITestSetup TestSetup`, `string[] Errors`, `ITTSSetup TTSSetup`, `TTSImportReadXMLLevelTrigger[] LevelTriggers` | Payload for `TTSImportReadXMLFileResponseEvent`. Contains parsed data and any errors encountered. |
|
||||
|
||||
## 3. Invariants
|
||||
|
||||
- All events use Prism’s event aggregation pattern (`PubSubEvent<T>` or `CompositePresentationEvent<T>`), implying publish-subscribe semantics: events are published once and may be subscribed to by multiple handlers.
|
||||
- Events are **asynchronous** and **decoupled**; publishers do not block waiting for subscribers.
|
||||
- For `TTSImportReadFileStatusEvent`, the `Status` field is the authoritative indicator of success/failure; `ErrorMessage` is only valid when `Status == false`.
|
||||
- For `TTSImportReadXMLFileResponseEventArg`, `Errors` may be non-empty even if `TTSSetup` is populated (partial success).
|
||||
- `EIDMappingEvent` payload is a mapping **from sensor ID to hardware channel ID**, not the reverse.
|
||||
- `TTSImportReadFileFinishedEvent` uses `CompositePresentationEvent<T>` instead of `PubSubEvent<T>`, which may imply different threading or subscription behavior (e.g., thread-safe delivery, multiple subscriptions handled differently). This distinction must be respected in subscribers.
|
||||
|
||||
## 4. Dependencies
|
||||
|
||||
### Dependencies *of* this module:
|
||||
- **Prism.Events**: Core dependency for `PubSubEvent<T>` and `CompositePresentationEvent<T>`.
|
||||
- **DTS.Common.Interface.TestSetups.Imports.TTS.ReadFile**: Provides `ITTSSetup`, `ITestSetup`, and related interfaces.
|
||||
- **DTS.Common.Interface.DataRecorders**: Provides `IDASHardware` and `IDAS` interfaces.
|
||||
- **System.Collections.Generic**: For `IDictionary<string, string>` and `List<T>`.
|
||||
|
||||
### Dependencies *on* this module:
|
||||
- UI layers (views/view models) involved in TTS import workflow (e.g., Read File, Hardware Scan, Summary steps).
|
||||
- Business logic components that process XML configuration files or manage hardware scanning.
|
||||
- Any module that needs to react to test setup changes, file read results, or import progress.
|
||||
|
||||
## 5. Gotchas
|
||||
|
||||
- **Inconsistent namespace usage**:
|
||||
- `TTSImportTestSetupChangedEvent` and `AssignedChannelsChangedEvent` are in `DTS.Common.Events.TTSImport` namespace, while most others are in `DTS.Common.Events`. This may cause confusion during event subscription (e.g., `eventAggregator.GetEvent<TTSImportTestSetupChangedEvent>().Subscribe(...)` vs. `GetEvent<TTSImportSavedChangesStatusEvent>()`).
|
||||
- **Missing definition for `StatusAndProgressBarEventArgs`**:
|
||||
- Referenced in `StatusAndProgressBarEvent` but not defined in the provided source. Its structure (e.g., properties like `StatusText`, `ProgressValue`, `IsIndeterminate`) must be found elsewhere.
|
||||
- **`TTSImportReadFileFinishedEvent` uses `CompositePresentationEvent<T>`**:
|
||||
- This may have different semantics than `PubSubEvent<T>` (e.g., thread affinity, subscription lifetime). Subscribers must be aware of this distinction.
|
||||
- **Ambiguity in `ITTSSetup` vs `ITestSetup`**:
|
||||
- `TTSImportReadXMLFileResponseEventArg` contains both `ITestSetup` and `ITTSSetup`. It is unclear whether `ITTSSetup` is a specialized subtype of `ITestSetup` or a separate interface. Misunderstanding this could lead to incorrect casting or null dereferences.
|
||||
- **No validation rules documented**:
|
||||
- While `ReadFileStatusArg` includes `ErrorMessage`, the source does not specify what constitutes a valid `ITTSSetup` or what error conditions are expected. Validation logic (e.g., required fields in XML) is not visible here.
|
||||
- **No ordering guarantees**:
|
||||
- Events are published asynchronously. Consumers must not assume a specific order of delivery (e.g., `TTSImportTestSetupChangedEvent` may arrive before or after `AssignedChannelsChangedEvent` after a setup change).
|
||||
|
||||
None identified beyond the above.
|
||||
@@ -0,0 +1,84 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.Common/Events/TestSetups/TestSetupsList/CurrentTestIdChangedEvent.cs
|
||||
- Common/DTS.Common/Events/TestSetups/TestSetupsList/CurrentTestChangedEvent.cs
|
||||
- Common/DTS.Common/Events/TestSetups/TestSetupsList/TestSetupsListEditTestSetupEvent.cs
|
||||
- Common/DTS.Common/Events/TestSetups/TestSetupsList/TestSetupsListTestSetupSelectedEvent.cs
|
||||
generated_at: "2026-04-16T03:27:18.056477+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "147ad5f06ebe2c02"
|
||||
---
|
||||
|
||||
# TestSetupsList
|
||||
|
||||
## Documentation: TestSetupsList Events Module
|
||||
|
||||
### 1. Purpose
|
||||
This module defines a set of Prism-based pub/sub events used to coordinate state changes and user interactions within the *Test Setups List* UI component. Specifically, it enables decoupled communication between view models or services involved in managing test setups—such as tracking the currently selected test, signaling edits, or handling selection changes—by publishing strongly-typed events through the `Prism.Events.EventAggregator`. These events facilitate reactive UI updates and state synchronization without tight coupling.
|
||||
|
||||
---
|
||||
|
||||
### 2. Public Interface
|
||||
|
||||
All classes are `public` and inherit from `Prism.Events.PubSubEvent<TPayload>`, making them suitable for subscription and publication via `IEventAggregator`.
|
||||
|
||||
| Event Class | Payload Type | Signature & Behavior |
|
||||
|-------------|--------------|----------------------|
|
||||
| `CurrentTestIdChangedEvent` | `string` | `public class CurrentTestIdChangedEvent : PubSubEvent<string>`<br>• Published when the *ID* of the current test changes (e.g., user navigates to a different test).<br>• Payload is the **new test ID** (a `string`). |
|
||||
| `CurrentTestChangedEvent` | `string` | `public class CurrentTestChangedEvent : PubSubEvent<string>`<br>• Published when the *entire current test setup* changes (not just its ID).<br>• Payload is the **new test ID** (a `string`).<br>• *Note:* Despite the semantic difference implied by the names, both events carry the same payload type and likely the same value (the test ID). |
|
||||
| `TestSetupsListEditTestSetupEvent` | `string` | `public class TestSetupsListEditTestSetupEvent : PubSubEvent<string>`<br>• Published when the user initiates editing of a test setup.<br>• Payload is the **ID of the test setup to be edited** (a `string`). |
|
||||
| `TestSetupsListTestSetupSelectedEvent` | `string[]` | `public class TestSetupsListTestSetupSelectedEvent : PubSubEvent<string[]>`<br>• Published when one or more test setups are selected (e.g., via checkbox or multi-select UI).<br>• Payload is an array of **test setup IDs** (a `string[]`).<br>• *Note:* XML comment incorrectly refers to this as `TTSImportSummaryImportEvent`—this is likely a copy-paste error. |
|
||||
|
||||
---
|
||||
|
||||
### 3. Invariants
|
||||
|
||||
- **Payload semantics**:
|
||||
- For `CurrentTestIdChangedEvent`, `CurrentTestChangedEvent`, and `TestSetupsListEditTestSetupEvent`, the payload is a single test ID (`string`).
|
||||
- For `TestSetupsListTestSetupSelectedEvent`, the payload is an array of test IDs (`string[]`).
|
||||
- **Event naming consistency**: All events reside in the `DTS.Common.Events.TestSetups.TestSetupsList` namespace and follow the `*Event` suffix convention.
|
||||
- **No validation**: Events carry raw IDs; no validation (e.g., null-check, format validation) is performed *within the event class itself*. Consumers are responsible for handling invalid payloads.
|
||||
- **Ordering**: No ordering guarantees are implied—events may be published/subscribed asynchronously via Prism’s `PubSubEvent`.
|
||||
|
||||
---
|
||||
|
||||
### 4. Dependencies
|
||||
|
||||
- **Dependencies *of* this module**:
|
||||
- `Prism.Events` (via `using Prism.Events;`) — required for `PubSubEvent<T>`.
|
||||
- .NET runtime (standard for Prism-based projects).
|
||||
|
||||
- **Dependencies *on* this module**:
|
||||
- Any module/view model interacting with the *Test Setups List* UI (e.g., a test list view model, a test editor, or a test selection handler) will likely subscribe to these events.
|
||||
- Specifically, components handling test selection, navigation, or editing workflows depend on these events for state propagation.
|
||||
|
||||
- **Inferred consumers** (not visible in source, but typical for Prism patterns):
|
||||
- View models bound to the test setups list UI.
|
||||
- Navigation or routing services that respond to `CurrentTestChangedEvent`.
|
||||
- Editor launchers that handle `TestSetupsListEditTestSetupEvent`.
|
||||
- Multi-select action handlers (e.g., bulk operations) that react to `TestSetupsListTestSetupSelectedEvent`.
|
||||
|
||||
---
|
||||
|
||||
### 5. Gotchas
|
||||
|
||||
- **Ambiguous semantics between `CurrentTestIdChangedEvent` and `CurrentTestChangedEvent`**:
|
||||
Both events carry `string` payloads (test IDs) and have nearly identical documentation. It is unclear whether:
|
||||
- `CurrentTestIdChangedEvent` is intended for *ID-only* changes (e.g., renaming a test without reloading its full setup),
|
||||
- or if one is legacy/unused.
|
||||
**Recommendation**: Clarify with domain experts or inspect subscribers to confirm intended usage.
|
||||
|
||||
- **Misleading XML comment for `TestSetupsListTestSetupSelectedEvent`**:
|
||||
The `<summary>` and `<remarks>` incorrectly reference `TTSImportSummaryImportEvent` and "Import button was clicked", which contradicts the class name and payload (`string[]` vs. likely a single import action). This is likely a copy-paste artifact and may mislead developers.
|
||||
|
||||
- **No null-safety guarantees**:
|
||||
Payloads may be `null` (e.g., if a test is deselected or cleared). Subscribers must handle `null` or empty strings/arrays.
|
||||
|
||||
- **No event grouping or cancellation**:
|
||||
Events are fire-and-forget; no mechanism is provided for throttling, debouncing, or canceling propagation.
|
||||
|
||||
- **No versioning or schema evolution**:
|
||||
Payloads are unstructured (`string`/`string[]`). If test ID format changes (e.g., GUID → composite key), all subscribers must be updated manually.
|
||||
|
||||
None identified beyond the above.
|
||||
Reference in New Issue
Block a user