3.4 KiB
source_files, generated_at, model, schema_version, sha256
| source_files | generated_at | model | schema_version | sha256 | |
|---|---|---|---|---|---|
|
2026-04-16T11:00:59.568454+00:00 | zai-org/GLM-5-FP8 | 1 | 5b2351e33ed49693 |
Documentation: PSDReportSettingsView
1. Purpose
PSDReportSettingsView is a WPF view component that provides the user interface for configuring Power Spectral Density (PSD) report settings within the DTS Viewer application. It implements IPSDReportSettingsView and serves as the presentation layer for report configuration, exposing selectable options for spectral analysis parameters such as FFT window widths.
2. Public Interface
| Member | Signature | Description |
|---|---|---|
| Constructor | public PSDReportSettingsView() |
Initializes the view by calling InitializeComponent(), which loads the associated XAML layout. |
| Property | public List<int> AvailableWindowWidths |
Returns a new list containing valid FFT window size options: { 512, 1024, 2048, 4096, 8192 }. Each access creates a new list instance. |
Implemented Interface:
IPSDReportSettingsView(fromDTS.Common.Interface)
3. Invariants
- Window width values are fixed: The
AvailableWindowWidthsproperty always returns the same five integer values (512, 1024, 2048, 4096, 8192), representing power-of-two FFT sizes. - New instance per access:
AvailableWindowWidthscreates and returns a newList<int>on every property getter invocation; it does not cache the collection. - XAML initialization required: The constructor must call
InitializeComponent()before the view can be used, as this is a code-behind for a XAML file.
4. Dependencies
This module depends on:
DTS.Common.Interface— Provides theIPSDReportSettingsViewinterface that this class implements.System.Collections.Generic— ProvidesList<T>for the window widths collection.Xceed.Wpf.Toolkit.PropertyGrid.Attributes— Imported but not used in the visible source code.- The corresponding XAML file (
PSDReportSettingsView.xaml) — Paired via WPF partial class mechanism.
What depends on this module:
- Unclear from source alone. Consumers would reference this view through the
IPSDReportSettingsViewinterface, likely a presenter or view model following a MVP/MVVM pattern.
5. Gotchas
-
Unused import: The
Xceed.Wpf.Toolkit.PropertyGrid.Attributesnamespace is imported but no attributes or types from it are used in the visible code. This may be dead code or intended for future use. -
Commented-out members: Three properties (
AvailablePassFilterTypes,AvailableWindowAveragingTypes,AvailableWindowTypes) and their backing fields are fully commented out. These referencedIItemsSourceand enum item source classes fromDTS.Common.Enums.Viewer.Reports. This suggests either:- Incomplete refactoring
- Features moved elsewhere
- Work-in-progress that was disabled
-
Allocation on every access: The
AvailableWindowWidthsproperty allocates a newList<int>on every call. If accessed frequently (e.g., in UI binding update loops), this could cause unnecessary garbage collection pressure. Consider caching if performance becomes an issue. -
Interface contract unclear: The
IPSDReportSettingsViewinterface definition is not provided, so the expected contract beyond what's implemented here is unknown.