init
This commit is contained in:
@@ -0,0 +1,69 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.Common/Enums/DTS.Viewer/ChartOptions/TimeUnitType.cs
|
||||
- Common/DTS.Common/Enums/DTS.Viewer/ChartOptions/FilterOption.cs
|
||||
- Common/DTS.Common/Enums/DTS.Viewer/ChartOptions/YRangeScale.cs
|
||||
- Common/DTS.Common/Enums/DTS.Viewer/ChartOptions/WakeMethodType.cs
|
||||
- Common/DTS.Common/Enums/DTS.Viewer/ChartOptions/ChartUnitType.cs
|
||||
generated_at: "2026-04-16T03:22:06.280473+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "01cac2bfa9823a62"
|
||||
---
|
||||
|
||||
# ChartOptions
|
||||
|
||||
## Documentation: Chart Configuration Enums Module
|
||||
|
||||
### 1. Purpose
|
||||
This module defines a set of strongly-typed enumerations and associated `IItemsSource` implementations used to configure chart display and behavior in the DTS Viewer application. These enums standardize user-facing options for time units, filtering, Y-axis scaling, wake methods, and chart units—ensuring consistency across UI components (e.g., property grids) and backend logic that consumes these configuration values. All enums are decorated with `[Description]` attributes for localized display text and use a custom `EnumDescriptionTypeConverter` to support UI binding.
|
||||
|
||||
### 2. Public Interface
|
||||
|
||||
#### Enums (all in `DTS.Common.Enums.Viewer` namespace)
|
||||
|
||||
| Enum | Members & Descriptions |
|
||||
|------|------------------------|
|
||||
| `TimeUnitTypeEnum` | `MS = 0` ("ms"), `Seconds = 1` ("Seconds") — Time unit for chart X-axis. |
|
||||
| `FilterOptionEnum` | `Unfiltered = 0` ("Unfiltered"), `TestSetupDefault = 1` ("Test Setup Default"), `Custom = 2` ("Custom") — Filter mode selection for chart data. |
|
||||
| `YRangeScaleEnum` | `AutoRange = 0` ("Auto Range"), `FullScale = 1` ("% Full Scale"), `Fixed = 2` ("Fixed"), `Manual = 3` ("Manual") — Y-axis scaling strategy. |
|
||||
| `WakeMethodTypeEnum` | `None = 0` ("None"), `MotionDetect = 1` ("Motion detect"), `TimeSession = 2` ("Time session"), `Magnet = 3` ("Magnet") — Device wake-up trigger method. |
|
||||
| `ChartUnitTypeEnum` | `EU = 0` ("EU"), `mV = 1` ("mV"), `ADC = 2` ("ADC"), `FFT = 3` ("FFT"), `PSD = 4` ("PSD") — Unit type for chart Y-axis values. |
|
||||
|
||||
#### Item Source Classes (used for UI binding, e.g., property grids)
|
||||
|
||||
| Class | Method | Behavior |
|
||||
|-------|--------|----------|
|
||||
| `TimeUnitTypeItemSource` | `ItemCollection GetValues()` | Returns a list of all `TimeUnitTypeEnum` values via `EnumUtil.GetValuesList<TimeUnitTypeEnum>()`. |
|
||||
| `FilterOptionEnumItemSource` | `ItemCollection GetValues()` | Returns a list of all `FilterOptionEnum` values. |
|
||||
| `YRangeScaleItemSource` | `ItemCollection GetValues()` | Returns a list of all `YRangeScaleEnum` values. |
|
||||
| `WakeMethodTypeItemSource` | `ItemCollection GetValues()` | Returns a list of all `WakeMethodTypeEnum` values. |
|
||||
| `ChartUnitTypeItemSource` | `ItemCollection GetValues()` | Returns a list of all `ChartUnitTypeEnum` values. |
|
||||
|
||||
### 3. Invariants
|
||||
- All enum values are explicitly assigned integer constants starting from `0` and incrementing by `1`.
|
||||
- Each enum member has a `[Description]` attribute with a non-empty string; no member lacks a description.
|
||||
- The `GetValues()` methods in all `IItemsSource` implementations are pure and idempotent—repeated calls return equivalent `ItemCollection` instances.
|
||||
- Enums are strictly for *configuration metadata*; no business logic is embedded in these types.
|
||||
- The `EnumDescriptionTypeConverter` is assumed to map enum values to their `[Description]` attribute values for display (not verified in source, but implied by usage).
|
||||
|
||||
### 4. Dependencies
|
||||
**Dependencies *of* this module:**
|
||||
- `System.ComponentModel` (for `DescriptionAttribute`)
|
||||
- `DTS.Common.Converters.EnumDescriptionTypeConverter` (custom type converter)
|
||||
- `DTS.Common.Utils.EnumUtil` (provides `GetValuesList<T>()`)
|
||||
- `Xceed.Wpf.Toolkit.PropertyGrid.Attributes.IItemsSource` (WPF Toolkit interface for property grid item sources)
|
||||
|
||||
**Dependencies *on* this module:**
|
||||
- UI components (e.g., WPF property grids) that bind to these enums via `IItemsSource` implementations.
|
||||
- Any code that consumes chart configuration state (e.g., chart rendering logic, session configuration serializers) likely references these enums.
|
||||
- *Inferred*: `EnumDescriptionTypeConverter` and `EnumUtil` are internal to `DTS.Common`; this module is part of the `DTS.Common` library.
|
||||
|
||||
### 5. Gotchas
|
||||
- **No validation or range checks** are present in the enums themselves—consumers must enforce valid combinations (e.g., `FFT`/`PSD` units may only be valid for specific chart types).
|
||||
- **Historical comments** in `ChartUnitTypeEnum` reference issue numbers (`//6402`, `//25554`), indicating incomplete features (FFT live switch, PSD implementation). These may affect runtime behavior if used prematurely.
|
||||
- **Case sensitivity**: The `mV` member uses lowercase `v` (not `MV`), which may conflict with conventions (e.g., SI unit standards).
|
||||
- **No deprecation markers**: Older enum values (e.g., `TimeSession` vs. newer wake methods) lack `[Obsolete]` attributes despite potential obsolescence.
|
||||
- **No documentation on default values**: It is unclear which enum value is used as default in UI or configuration (e.g., `Unfiltered` for `FilterOptionEnum`? `AutoRange` for `YRangeScaleEnum`?).
|
||||
- **No cross-enum constraints**: E.g., `Manual` Y-axis scaling may require additional parameters (not defined here), but the enum alone does not enforce this.
|
||||
- **None identified from source alone.** (Note: The above are *inferred* from code structure and comments, but not explicitly stated in the source.)
|
||||
@@ -0,0 +1,36 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.Common/Enums/DTS.Viewer/Filter/SearchEnum.cs
|
||||
generated_at: "2026-04-16T03:21:51.281513+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "50f7f71ba1198362"
|
||||
---
|
||||
|
||||
# Filter
|
||||
|
||||
1. **Purpose**
|
||||
This module defines a simple enumeration (`FilterEnum`) used to represent filter types within the DTS Viewer component of the system. It serves as a type-safe mechanism to distinguish between supported filter categories—specifically `Test` and `Graph`—likely used in UI filtering logic or data processing pipelines related to viewer functionality.
|
||||
|
||||
2. **Public Interface**
|
||||
- **`enum FilterEnum`**
|
||||
A two-member enumeration defined in the `DTS.Common.Enums.Viewer` namespace:
|
||||
- `Test`: Represents a filter type for test-related data or views.
|
||||
- `Graph`: Represents a filter type for graph-based data or views.
|
||||
|
||||
3. **Invariants**
|
||||
- The enumeration contains exactly two values: `Test` (default, value `0`) and `Graph` (value `1`).
|
||||
- No additional values are defined or expected to be added without corresponding updates to consuming code.
|
||||
- The enum is intended for use only in contexts where filter selection between *test* and *graph* views is semantically valid.
|
||||
|
||||
4. **Dependencies**
|
||||
- **Internal dependency**: This enum resides in the `DTS.Common` assembly (likely a shared library), implying it is consumed by other modules in the DTS ecosystem (e.g., viewer UI components, data adapters).
|
||||
- **No external dependencies**: The file imports no external types or libraries beyond implicit .NET runtime support.
|
||||
- **Consumers inferred**: Any module referencing `DTS.Common` and using `FilterEnum` (e.g., to configure filters, route view rendering, or serialize/deserialize filter state) depends on this definition.
|
||||
|
||||
5. **Gotchas**
|
||||
- The enum name is `FilterEnum`, but the file is named `SearchEnum.cs`—this mismatch may cause confusion during code navigation or refactoring.
|
||||
- No XML documentation comments are present on the enum or its members, reducing discoverability for consumers.
|
||||
- The `// ReSharper disable CheckNamespace` directive suggests the namespace may intentionally avoid folder-namespace alignment (e.g., `DTS.Common.Enums.Viewer` does not match the physical path `Common/DTS.Common/Enums/DTS.Viewer`), which could mislead developers expecting convention-based layout.
|
||||
- No validation or parsing logic (e.g., `TryParse`) is included; consumers must handle invalid values (e.g., from deserialization) manually.
|
||||
- None identified from source alone.
|
||||
@@ -0,0 +1,89 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.Common/Enums/DTS.Viewer/Reports/PowerSpectralDensity/WindowAveragingType.cs
|
||||
- Common/DTS.Common/Enums/DTS.Viewer/Reports/PowerSpectralDensity/PassFilterType.cs
|
||||
- Common/DTS.Common/Enums/DTS.Viewer/Reports/PowerSpectralDensity/WindowWidth.cs
|
||||
- Common/DTS.Common/Enums/DTS.Viewer/Reports/PowerSpectralDensity/WindowType.cs
|
||||
generated_at: "2026-04-16T03:21:08.807677+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "e228857d6b62ca1f"
|
||||
---
|
||||
|
||||
# PowerSpectralDensity
|
||||
|
||||
## Documentation: Power Spectral Density Configuration Enums
|
||||
|
||||
---
|
||||
|
||||
### 1. Purpose
|
||||
This module defines a set of strongly-typed enumerations used to configure parameters for Power Spectral Density (PSD) analysis in the DTS Viewer reporting system. These enums (`WindowAveragingType`, `PassFilterType`, `WindowWidth`, and `WindowType`) provide a standardized, validated set of options for controlling how spectral data is computed and displayed—specifically for windowing, filtering, and averaging strategies—ensuring consistency across UI, serialization, and backend processing layers.
|
||||
|
||||
---
|
||||
|
||||
### 2. Public Interface
|
||||
|
||||
All types are `public enum`s in the `DTS.Common.Enums.Viewer.Reports` namespace. Each enum value is annotated with a `[Description]` attribute (from `System.ComponentModel`) and uses the `EnumDescriptionTypeConverter` for UI/data binding scenarios.
|
||||
|
||||
#### `WindowAveragingType`
|
||||
- **Values**:
|
||||
- `Averaging` → Description: `"Averaging"`
|
||||
- `PeakHoldMax` → Description: `"Peak Hold MAX"`
|
||||
- `PeakHoldMin` → Description: `"Peak Hold MIN"`
|
||||
- **Purpose**: Specifies the method used to average spectral frames over time (e.g., for smoothing or peak tracking).
|
||||
|
||||
#### `PassFilterType`
|
||||
- **Values**:
|
||||
- `Bessel` → Description: `"Bessel"`
|
||||
- `Butterworth` → Description: `"Butterworth"`
|
||||
- `Chebyshev` → Description: `"Chebyshev"`
|
||||
- **Purpose**: Defines the digital filter type applied during signal preprocessing before FFT computation.
|
||||
*Note*: `CriticalDamping` is commented out and not available.
|
||||
|
||||
#### `WindowWidth`
|
||||
- **Values** (with explicit integer values):
|
||||
- `FiveTwelve` = 512 → Description: `"512"`
|
||||
- `TenTwentyFour` = 1024 → Description: `"1024"`
|
||||
- `TwentyFortyEight` = 2048 → Description: `"2048"`
|
||||
- `FortyNinetySix` = 4096 → Description: `"4096"`
|
||||
- `EightyOneNinetyTwo` = 8192 → Description: `"8192"`
|
||||
- **Purpose**: Specifies the FFT window size (in samples) used in PSD computation.
|
||||
|
||||
#### `WindowType`
|
||||
- **Values**:
|
||||
- `Rectangle` → Description: `"Rectangle"`
|
||||
- `Hamming` → Description: `"Hamming"`
|
||||
- `Hanning` → Description: `"Hanning"`
|
||||
- `Blackman` → Description: `"Blackman"`
|
||||
- `BlackmanHarris` → Description: `"Blackman-Harris"`
|
||||
- `FlatTop` → Description: `"Flat Top"`
|
||||
- **Purpose**: Selects the time-domain window function applied to the signal prior to FFT to mitigate spectral leakage.
|
||||
|
||||
---
|
||||
|
||||
### 3. Invariants
|
||||
- All enum values are **exhaustively documented** via `[Description]` attributes; no value lacks a description.
|
||||
- `WindowWidth` values are **strictly powers of two** (512, 1024, ..., 8192), consistent with FFT implementation constraints.
|
||||
- `PassFilterType` is **incomplete**: `CriticalDamping` is commented out and *not* part of the active API.
|
||||
- No runtime validation is performed by the enums themselves—validation (e.g., range checks on `WindowWidth`) must occur in consuming code.
|
||||
|
||||
---
|
||||
|
||||
### 4. Dependencies
|
||||
- **Internal dependencies**:
|
||||
- `DTS.Common.Converters.EnumDescriptionTypeConverter` — used via `[TypeConverter]` for deserialization/UI binding.
|
||||
- `System.ComponentModel` — for `[Description]` attribute.
|
||||
- **Consumers** (inferred from namespace and naming):
|
||||
- Likely used by reporting/UI components in `DTS.Viewer` (e.g., PSD report configuration models, settings dialogs).
|
||||
- May be referenced by backend signal processing modules (e.g., FFT or filter pipeline classes) that accept these enums as configuration parameters.
|
||||
|
||||
---
|
||||
|
||||
### 5. Gotchas
|
||||
- **`CriticalDamping` is disabled**: The commented-out `CriticalDamping` entry in `PassFilterType` includes a TODO comment (`// REMOVE THIS HACK / uncomment when implemented in exocortex`), indicating this enum is a placeholder for future functionality. **Do not assume `CriticalDamping` is supported.**
|
||||
- **Case-sensitive enum names**: `BlackmanHarris` (no hyphen) vs. `Blackman-Harris` (hyphen in description). UI or serialization logic may rely on the *description* text, not the name.
|
||||
- **`Hanning` vs. `Hanning`**: The enum uses `Hanning` (double *n*), which is a common misspelling of the correct term *Hann* (though *Hanning* is widely used in signal processing literature). Ensure downstream code matches this spelling.
|
||||
- **No validation on `WindowWidth` values**: While only powers of two are defined, the enum itself does not enforce this—consumers must validate if needed.
|
||||
- **No versioning or deprecation markers**: If enums evolve (e.g., new filter types added), consumers may break if deserializing from external sources (e.g., JSON) without fallback handling.
|
||||
|
||||
None identified beyond these.
|
||||
@@ -0,0 +1,94 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.Common/Enums/DTS.Viewer/TestMetadata/ChannelGroups.cs
|
||||
- Common/DTS.Common/Enums/DTS.Viewer/TestMetadata/TestGraphsFields.cs
|
||||
- Common/DTS.Common/Enums/DTS.Viewer/TestMetadata/TestSetupFields.cs
|
||||
- Common/DTS.Common/Enums/DTS.Viewer/TestMetadata/TestRunMetadataFields.cs
|
||||
- Common/DTS.Common/Enums/DTS.Viewer/TestMetadata/TestModuleFields.cs
|
||||
- Common/DTS.Common/Enums/DTS.Viewer/TestMetadata/TestChannelFields.cs
|
||||
generated_at: "2026-04-16T03:21:56.552310+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "d809c3870c3acf47"
|
||||
---
|
||||
|
||||
# Documentation: Test Metadata Enumerations
|
||||
|
||||
## 1. Purpose
|
||||
This module defines a set of strongly-typed enumerations used to represent field names and groupings within test metadata structures in the DTS Viewer system. These enums serve as standardized keys for accessing, serializing, deserializing, and querying hierarchical test data—such as test runs, modules, channels, graphs, and calculated channels—across the application. They ensure consistency in data contract definitions (e.g., for JSON serialization, UI binding, or database mapping) by decoupling field identifiers from string literals, thereby reducing typos, enabling refactoring safety, and improving code readability.
|
||||
|
||||
## 2. Public Interface
|
||||
|
||||
### `ChannelGroups`
|
||||
- **Namespace**: `DTS.Common.Enums.Viewer`
|
||||
- **Values**:
|
||||
- `Channel`
|
||||
- `Graph`
|
||||
- `CalculatedChannel`
|
||||
- **Purpose**: Represents high-level logical groupings of channel-like entities in test metadata. Used to categorize or filter channels by type.
|
||||
|
||||
### `TestGraphsFields`
|
||||
- **Namespace**: `DTS.Common.Enums.Viewer`
|
||||
- **Values**:
|
||||
- `Name`
|
||||
- `HardwareChannelName`
|
||||
- `Channels`
|
||||
- `Channel`
|
||||
- `ChannelId`
|
||||
- **Purpose**: Defines the set of valid field names for objects representing a *graph* in test metadata (e.g., a named aggregation of channels for visualization or analysis).
|
||||
|
||||
### `TestSetupMetadataFields`
|
||||
- **Namespace**: `DTS.Common.Enums.Viewer`
|
||||
- **Values**:
|
||||
- `Name`
|
||||
- `DateOfTheTest`
|
||||
- `Graphs`
|
||||
- `Timestamp`
|
||||
- `CalibrationBehavior`
|
||||
- **Purpose**: Specifies top-level metadata fields for a *test setup*, typically describing static configuration or context of a test session.
|
||||
|
||||
### `TestRunMetadataFields`
|
||||
- **Namespace**: `DTS.Common.Enums.Viewer`
|
||||
- **Values**:
|
||||
- `Id`, `Description`, `InlineSerializedData`, `Guid`, `FaultFlags`, `Software`, `SoftwareVersion`, `DataType`, `FileDate`, `FilePath`, `Modules`, `Module`, `Channels`, `CalculatedChannels`, `CalculatedChannel`
|
||||
- **Purpose**: Represents the top-level fields of a *test run*—a single execution instance containing modules, channels, and calculated channels.
|
||||
|
||||
### `TestModuleFields`
|
||||
- **Namespace**: `DTS.Common.Enums.Viewer`
|
||||
- **Values**: 44 fields including:
|
||||
- `SerialNumber`, `BaseSerialNumber`, `Number`, `SampleRateHz`, `NumberOfChannels`, `RecordingMode`, `RequestedPreTriggerSeconds`, `PostTriggerSeconds`, `TriggerTimestampSec`, `TriggerTimestampNanoSec`, `StartRecordSampleNumber`, `UnsubsampledNumberOfSamples`, `PTPMasterSync`, `TiltSensorAxisXDegreesPre/Post`, `TemperatureLocation1Pre/Post`, `InlineSerializedData`, etc.
|
||||
- **Purpose**: Defines all known fields for a *test module*, representing a physical acquisition device (e.g., a data logger) involved in the test.
|
||||
|
||||
### `TestChannelFields`
|
||||
- **Namespace**: `DTS.Common.Enums.Viewer`
|
||||
- **Values**: 71 fields including:
|
||||
- `SerialNumber`, `ChannelId`, `Description`, `ChannelGroupName`, `ChannelType`, `Number`, `HardwareChannelName`, `Sensitivity`, `ExcitationVoltage`, `ZeroMethod`, `IsSubsampled`, `AbsoluteDisplayOrder`, `LastCalibrationDate`, `CalSignalEnabled`, `ShuntEnabled`, `LinearizationFormula`, `SourceModuleSerialNumber`, `Calculation`, `IsoCode`, `UserCode`, `UserChannelName`, `SensorPolarity`, `HIC`, `UseEUScaler`, `ScaleFactorEU`, `T1`, `T2`, etc.
|
||||
- **Purpose**: Enumerates all possible fields for a *test channel*, representing a single measured or computed signal (e.g., voltage, strain, temperature) during a test.
|
||||
|
||||
> **Note**: All enums are plain `public enum` types with no methods, properties, or attributes defined in the source.
|
||||
|
||||
## 3. Invariants
|
||||
- **No overlap between enum namespaces**: Each enum belongs to a distinct semantic domain (e.g., `TestModuleFields` vs `TestChannelFields`), and field names may be duplicated across enums (e.g., `Channels`, `Module`, `Channel`) but refer to different contexts.
|
||||
- **Field names are case-sensitive**: All enum values use PascalCase (e.g., `HardwareChannelName`, `RequestedPreTriggerSeconds`).
|
||||
- **No validation or runtime enforcement**: These are *metadata keys*, not validators; the enums themselves do not enforce presence, type, or consistency of corresponding data.
|
||||
- **No versioning**: Enums are not versioned; adding/removing values may break downstream consumers expecting specific keys.
|
||||
|
||||
## 4. Dependencies
|
||||
- **Depends on**: None (self-contained; no external references in the provided source).
|
||||
- **Used by**:
|
||||
- Likely consumed by serialization/deserialization logic (e.g., JSON converters, DTO mappers) in higher layers (e.g., `DTS.Viewer`, `DTS.Data`).
|
||||
- Likely referenced in UI binding layers (e.g., to populate dropdowns or column headers).
|
||||
- Likely used in query/filter APIs (e.g., `Where(x => x[TestChannelFields.ChannelGroupName] == ChannelGroups.Channel.ToString())`).
|
||||
- **Inferred consumers**: Any module that handles test metadata serialization, UI rendering, or data querying (not visible in source, but implied by naming and usage patterns).
|
||||
|
||||
## 5. Gotchas
|
||||
- **Ambiguous field names across enums**:
|
||||
- `Channels` appears in `TestRunMetadataFields` (plural, likely a collection) and `TestGraphsFields` (singular, possibly a reference or collection).
|
||||
- `Module` and `CalculatedChannel` appear in `TestRunMetadataFields` (singular), while `Modules`, `CalculatedChannels` (plural) also exist—suggesting inconsistent naming for collections vs. references.
|
||||
- **Redundant or overlapping fields**:
|
||||
- `Channel` and `Channels` appear in both `TestRunMetadataFields` and `TestGraphsFields`, but their semantics differ (e.g., one may be a single channel object, the other a list).
|
||||
- `ChannelGroupName` in `TestChannelFields` maps to values in `ChannelGroups`, but no compile-time linkage exists.
|
||||
- **Missing grouping for calculated channels**: While `CalculatedChannel` is a `TestRunMetadataFields` key, `CalculatedChannels` (plural) also exists—suggesting possible inconsistency in how collections are named.
|
||||
- **No documentation comments**: All enums lack XML documentation; field meanings must be inferred from naming alone (e.g., `T1`, `T2` in `TestChannelFields` are undefined).
|
||||
- **Historical field bloat**: `TestChannelFields` has 71 values—indicating possible technical debt from incremental additions without cleanup.
|
||||
- **None identified from source alone** for behavioral quirks (e.g., null handling, default values), as enums are pure identifiers.
|
||||
Reference in New Issue
Block a user