init
This commit is contained in:
@@ -0,0 +1,78 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.CommonCore/Enums/DTS.Viewer/ChartOptions/TimeUnitType.cs
|
||||
- Common/DTS.CommonCore/Enums/DTS.Viewer/ChartOptions/FilterOption.cs
|
||||
- Common/DTS.CommonCore/Enums/DTS.Viewer/ChartOptions/YRangeScale.cs
|
||||
- Common/DTS.CommonCore/Enums/DTS.Viewer/ChartOptions/WakeMethodType.cs
|
||||
- Common/DTS.CommonCore/Enums/DTS.Viewer/ChartOptions/ChartUnitType.cs
|
||||
generated_at: "2026-04-16T02:45:21.946060+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "50e4739cba57afa5"
|
||||
---
|
||||
|
||||
# Chart Options Enumerations Documentation
|
||||
|
||||
## 1. Purpose
|
||||
|
||||
This module defines a set of strongly-typed enumerations used to configure chart display and behavior in the DTS Viewer application. Each enumeration represents a distinct chart configuration option—such as time unit, filtering strategy, Y-axis scaling, wake-up method, and unit type—and provides associated metadata (e.g., user-facing descriptions) and item source implementations for UI binding (e.g., property grid dropdowns). These enums are part of the `DTS.Common.Enums.Viewer` namespace and serve as foundational configuration primitives for chart rendering and user interaction.
|
||||
|
||||
## 2. Public Interface
|
||||
|
||||
All public types reside in the `DTS.Common.Enums.Viewer` namespace.
|
||||
|
||||
### Enumerations
|
||||
|
||||
| Name | Values | Description |
|
||||
|------|--------|-------------|
|
||||
| `TimeUnitTypeEnum` | `MS = 0` (displayed as `"ms"`), `Seconds = 1` (displayed as `"Seconds"`) | Specifies the time axis unit for chart display. |
|
||||
| `FilterOptionEnum` | `Unfiltered = 0` (`"Unfiltered"`), `TestSetupDefault = 1` (`"Test Setup Default"`), `Custom = 2` (`"Custom"`) | Defines the filtering strategy applied to chart data. |
|
||||
| `YRangeScaleEnum` | `AutoRange = 0` (`"Auto Range"`), `FullScale = 1` (`"% Full Scale"`), `Fixed = 2` (`"Fixed"`), `Manual = 3` (`"Manual"`) | Controls how the Y-axis range is determined for a chart. |
|
||||
| `WakeMethodTypeEnum` | `None = 0` (`"None"`), `MotionDetect = 1` (`"Motion detect"`), `TimeSession = 2` (`"Time session"`), `Magnet = 3` (`"Magnet"`) | Specifies the method used to trigger or wake a data acquisition session. |
|
||||
| `ChartUnitTypeEnum` | `EU = 0` (`"EU"`), `mV = 1` (`"mV"`), `ADC = 2` (`"ADC"`), `FFT = 3` (`"FFT"`), `PSD = 4` (`"PSD"`) | Defines the unit type displayed on the Y-axis of a chart. Includes support for FFT and PSD (Power Spectral Density) as noted in inline comments. |
|
||||
|
||||
### Item Source Classes
|
||||
|
||||
Each enum has a corresponding `IItemsSource` implementation for populating UI controls (e.g., property grid dropdowns). All use `EnumUtil.GetValuesList<T>()` internally.
|
||||
|
||||
| Name | Returns | Purpose |
|
||||
|------|---------|---------|
|
||||
| `TimeUnitTypeItemSource` | `ItemCollection` of `TimeUnitTypeEnum` values | Provides list of time unit options for UI binding. |
|
||||
| `FilterOptionEnumItemSource` | `ItemCollection` of `FilterOptionEnum` values | Provides list of filter options for UI binding. |
|
||||
| `YRangeScaleItemSource` | `ItemCollection` of `YRangeScaleEnum` values | Provides list of Y-axis scaling modes for UI binding. |
|
||||
| `WakeMethodTypeItemSource` | `ItemCollection` of `WakeMethodTypeEnum` values | Provides list of wake-up methods for UI binding. |
|
||||
| `ChartUnitTypeItemSource` | `ItemCollection` of `ChartUnitTypeEnum` values | Provides list of chart unit types for UI binding. |
|
||||
|
||||
All enums are decorated with `[TypeConverter(typeof(EnumDescriptionTypeConverter))]`, indicating they support localized or descriptive string conversion (e.g., for display in UI).
|
||||
|
||||
## 3. Invariants
|
||||
|
||||
- **Enum values are stable**: The underlying integer values (`0`, `1`, `2`, etc.) are fixed and must not be changed without backward-compatibility review.
|
||||
- **Descriptions are non-empty**: Each enum member has a `[Description(...)]` attribute with a non-null, non-empty string; this is required for correct UI rendering via `EnumDescriptionTypeConverter`.
|
||||
- **Item sources are exhaustive**: Each `IItemsSource.GetValues()` implementation returns *all* defined enum values via `EnumUtil.GetValuesList<T>()`, ensuring UI controls show all available options.
|
||||
- **Namespace consistency**: All types reside in `DTS.Common.Enums.Viewer`; no cross-namespace inheritance or extension is present.
|
||||
|
||||
## 4. Dependencies
|
||||
|
||||
### Internal Dependencies
|
||||
- `DTS.Common.Converters.EnumDescriptionTypeConverter`: Used for type conversion (e.g., enum → display string).
|
||||
- `DTS.Common.Utils.EnumUtil`: Provides `GetValuesList<T>()` for populating `ItemCollection`s.
|
||||
- `Xceed.Wpf.Toolkit.PropertyGrid.Attributes.IItemsSource`: Interface implemented by item source classes for WPF property grid integration.
|
||||
|
||||
### External Dependencies
|
||||
- `System.ComponentModel`: For `DescriptionAttribute` and `TypeConverterAttribute`.
|
||||
- `Xceed.Wpf.Toolkit`: For `IItemsSource` and `ItemCollection` types.
|
||||
|
||||
### Consumers (Inferred)
|
||||
- UI components using property grids (e.g., chart configuration panels) likely consume these item sources to populate dropdowns.
|
||||
- Chart rendering logic likely consumes these enums to configure axis units, scaling, filtering, and time base.
|
||||
|
||||
## 5. Gotchas
|
||||
|
||||
- **`ChartUnitTypeEnum.FFT` and `PSD` are marked with issue references** (`//6402` and `//25554`), indicating incomplete or future implementation. These values may be present in the enum but lack full runtime support.
|
||||
- **No validation logic is present in the enums themselves**: The enums are pure data definitions; validation (e.g., ensuring `Custom` filter option has associated parameters) must be handled elsewhere.
|
||||
- **Descriptions are hard-coded strings**: Changes to `[Description(...)]` values may affect localization or UI consistency if not coordinated across resources.
|
||||
- **No deprecation markers**: Older enum values (e.g., `TimeUnitTypeEnum.MS`) are not marked obsolete, even if deprecated in practice.
|
||||
- **No documentation for `EnumDescriptionTypeConverter` behavior**: It is unclear whether descriptions are localized or culture-sensitive—this is implementation-specific to `DTS.Common.Converters`.
|
||||
|
||||
None identified beyond the above.
|
||||
@@ -0,0 +1,37 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.CommonCore/Enums/DTS.Viewer/Filter/SearchEnum.cs
|
||||
generated_at: "2026-04-16T02:45:06.628654+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "4c091220b50d19ae"
|
||||
---
|
||||
|
||||
# Filter
|
||||
|
||||
1. **Purpose**
|
||||
This module defines a simple enumeration (`FilterEnum`) used to represent the two supported filter types within the DTS Viewer subsystem: `Test` and `Graph`. It serves as a type-safe mechanism to distinguish between filter categories, likely used in UI components, filtering logic, or configuration handling related to data visualization or test result presentation.
|
||||
|
||||
2. **Public Interface**
|
||||
- **`enum FilterEnum`**
|
||||
A two-valued enumeration defined in namespace `DTS.Common.Enums.Viewer` with the following members:
|
||||
- `Test`: Represents a filter type for test-related data or views.
|
||||
- `Graph`: Represents a filter type for graph-based data or visualizations.
|
||||
|
||||
No methods, properties, or additional members are defined on the enum.
|
||||
|
||||
3. **Invariants**
|
||||
- The enum contains exactly two members: `Test` and `Graph`.
|
||||
- No other values are permitted by the type definition.
|
||||
- The underlying type is the default `int` (not explicitly specified).
|
||||
- No runtime validation or additional constraints are enforced by this enum itself.
|
||||
|
||||
4. **Dependencies**
|
||||
- **Depends on**: None (no external imports or references in the source file).
|
||||
- **Depended on by**: Not visible in this file; likely referenced in other modules (e.g., UI components, filtering services, configuration parsers) within the `DTS.CommonCore` or related assemblies. Based on the namespace (`DTS.Common.Enums.Viewer`), it is part of a shared/common library used across the DTS system.
|
||||
|
||||
5. **Gotchas**
|
||||
- The enum name `FilterEnum` is generic and may be ambiguous without context; consumers must rely on documentation or usage sites to interpret `Test` vs `Graph`.
|
||||
- No XML documentation comments are present in the source, reducing discoverability of intended semantics.
|
||||
- The `// ReSharper disable CheckNamespace` directive suggests this file may reside in a non-default folder structure that intentionally overrides the default namespace inference—developers should verify the actual compiled namespace matches expectations.
|
||||
- None identified from source alone.
|
||||
@@ -0,0 +1,87 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.CommonCore/Enums/DTS.Viewer/Reports/PowerSpectralDensity/WindowAveragingType.cs
|
||||
- Common/DTS.CommonCore/Enums/DTS.Viewer/Reports/PowerSpectralDensity/PassFilterType.cs
|
||||
- Common/DTS.CommonCore/Enums/DTS.Viewer/Reports/PowerSpectralDensity/WindowWidth.cs
|
||||
- Common/DTS.CommonCore/Enums/DTS.Viewer/Reports/PowerSpectralDensity/WindowType.cs
|
||||
generated_at: "2026-04-16T02:45:34.185690+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "4301849ff5429f6c"
|
||||
---
|
||||
|
||||
# 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 standardize user-facing display labels and internal representation for key signal processing choices—namely, how frequency-domain data is averaged (`WindowAveragingType`), which analog filter type is applied (`PassFilterType`), the FFT window size (`WindowWidth`), and the time-domain windowing function (`WindowType`). They serve as the canonical source of valid options for PSD configuration UIs and serialization layers, ensuring consistency across client and server components.
|
||||
|
||||
### 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 (via `System.ComponentModel`) that provides a human-readable label.
|
||||
|
||||
- **`WindowAveragingType`**
|
||||
```csharp
|
||||
public enum WindowAveragingType
|
||||
```
|
||||
Specifies the method used to average spectral estimates across multiple frames/windows.
|
||||
- `Averaging`: Linear (mean) averaging of spectral magnitudes.
|
||||
- `PeakHoldMax`: For each frequency bin, retain the maximum magnitude observed across frames.
|
||||
- `PeakHoldMin`: For each frequency bin, retain the minimum magnitude observed across frames.
|
||||
|
||||
- **`PassFilterType`**
|
||||
```csharp
|
||||
public enum PassFilterType
|
||||
```
|
||||
Specifies the analog filter type used for anti-aliasing or pre-filtering before digitization/FFT.
|
||||
- `Bessel`: Maximally flat group delay (linear phase).
|
||||
- `Butterworth`: Maximally flat magnitude response.
|
||||
- `Chebyshev`: Equiripple behavior in passband (type I).
|
||||
*Note:* `CriticalDamping` is commented out and not available for use.
|
||||
|
||||
- **`WindowWidth`**
|
||||
```csharp
|
||||
public enum WindowWidth
|
||||
```
|
||||
Specifies the number of samples in the analysis window (i.e., FFT length).
|
||||
- `FiveTwelve` = 512
|
||||
- `TenTwentyFour` = 1024
|
||||
- `TwentyFortyEight` = 2048
|
||||
- `FortyNinetySix` = 4096
|
||||
- `EightyOneNinetyTwo` = 8192
|
||||
|
||||
- **`WindowType`**
|
||||
```csharp
|
||||
public enum WindowType
|
||||
```
|
||||
Specifies the time-domain window function applied to data prior to FFT.
|
||||
- `Rectangle`: No windowing (rectangular window).
|
||||
- `Hamming`: Minimizes nearest-neighbor sidelobes.
|
||||
- `Hanning`: Also known as Hann; smooths edges.
|
||||
- `Blackman`: Low sidelobes, wider main lobe.
|
||||
- `BlackmanHarris`: Very low sidelobes (4-term).
|
||||
- `FlatTop`: Minimizes amplitude error for frequency estimation.
|
||||
|
||||
### 3. Invariants
|
||||
- All enum values are explicitly assigned underlying `int` values (via `= N` syntax) **only** for `WindowWidth`; all others use default sequential `int` values starting at 0.
|
||||
- Each enum value *must* have a `[Description]` attribute; missing descriptions are not permitted in the current implementation.
|
||||
- `PassFilterType` is *not* extensible at runtime—no mechanism for dynamic addition of filter types exists.
|
||||
- `CriticalDamping` is commented out and *must not* be used; its presence is explicitly marked as a known technical debt ("REMOVE THIS HACK").
|
||||
- Enum names use PascalCase, and `[Description]` strings use title case with spaces and hyphens as appropriate (e.g., `"Blackman-Harris"`).
|
||||
|
||||
### 4. Dependencies
|
||||
- **Internal dependencies**:
|
||||
- `DTS.Common.Converters.EnumDescriptionTypeConverter` (used via `[TypeConverter]` attribute for UI binding/deserialization).
|
||||
- `System.ComponentModel` (for `[Description]` and `TypeConverter`).
|
||||
- **Consumers (inferred)**:
|
||||
- Likely consumed by UI layers (e.g., WPF/WinForms controls) via the `EnumDescriptionTypeConverter` to render user-friendly labels.
|
||||
- Likely used in serialization (e.g., JSON, XML) where the `[Description]` value is mapped to/from the enum name.
|
||||
- Part of a larger `DTS.Common.Enums.Viewer.Reports` hierarchy (suggesting related enums exist for other report types).
|
||||
|
||||
### 5. Gotchas
|
||||
- **`PassFilterType` has a disabled value**: `CriticalDamping` is commented out but not removed. Do *not* assume it is available—attempting to use it will result in invalid state or runtime errors.
|
||||
- **`WindowWidth` values are powers of two**: All valid values are `2^9` through `2^13`. No validation is enforced at the enum level; callers must ensure input aligns with FFT constraints elsewhere in the system.
|
||||
- **`Hanning` vs. `Hann`**: The enum uses `Hanning` (a common misspelling), not `Hann`. This may cause confusion if consumers expect standard naming.
|
||||
- **No `None` or `Auto` option**: All enums require an explicit selection; there is no fallback or default value defined in the enum itself.
|
||||
- **Description strings are fixed**: Changing `[Description]` values will affect UI text and potentially serialized data contracts.
|
||||
- **No XML documentation comments**: The source provides no `<summary>` or `<remarks>`—all documentation must be inferred from enum names and `[Description]` attributes.
|
||||
@@ -0,0 +1,79 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.CommonCore/Enums/DTS.Viewer/TestMetadata/ChannelGroups.cs
|
||||
- Common/DTS.CommonCore/Enums/DTS.Viewer/TestMetadata/TestGraphsFields.cs
|
||||
- Common/DTS.CommonCore/Enums/DTS.Viewer/TestMetadata/TestSetupFields.cs
|
||||
- Common/DTS.CommonCore/Enums/DTS.Viewer/TestMetadata/TestRunMetadataFields.cs
|
||||
- Common/DTS.CommonCore/Enums/DTS.Viewer/TestMetadata/TestModuleFields.cs
|
||||
- Common/DTS.CommonCore/Enums/DTS.Viewer/TestMetadata/TestChannelFields.cs
|
||||
generated_at: "2026-04-16T02:45:19.428554+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "5089f69caf0a7cb3"
|
||||
---
|
||||
|
||||
# Documentation: Test Metadata Enumerations
|
||||
|
||||
## 1. Purpose
|
||||
This module defines a set of strongly-typed enumerations that represent field names and groupings used for test metadata in the DTS Viewer system. These enums serve as standardized keys for accessing, serializing, deserializing, and querying structured metadata associated with test runs, modules, channels, graphs, and setup information. They enable type-safe handling of metadata schemas across the application—particularly in UI components, data serialization layers, and metadata validation logic—by providing a fixed set of valid field identifiers and channel group categories.
|
||||
|
||||
## 2. Public Interface
|
||||
|
||||
All types are `public enum`s in the `DTS.Common.Enums.Viewer` namespace. No classes, methods, or properties are exposed.
|
||||
|
||||
### `ChannelGroups`
|
||||
- **Members**:
|
||||
- `Channel`: Represents raw or physical channels.
|
||||
- `Graph`: Represents graph-based visualizations (likely aggregations or derived views).
|
||||
- `CalculatedChannel`: Represents channels whose values are computed from other channels (e.g., via formulas).
|
||||
- **Purpose**: Categorizes channels into logical groups for filtering or UI rendering.
|
||||
|
||||
### `TestGraphsFields`
|
||||
- **Members**:
|
||||
- `Name`, `HardwareChannelName`, `Channels`, `Channel`, `ChannelId`
|
||||
- **Purpose**: Defines valid field names for objects representing test graphs (e.g., in JSON schemas or metadata structures).
|
||||
|
||||
### `TestSetupMetadataFields`
|
||||
- **Members**:
|
||||
- `Name`, `DateOfTheTest`, `Graphs`, `Timestamp`, `CalibrationBehavior`
|
||||
- **Purpose**: Specifies fields applicable to top-level test setup metadata (e.g., configuration or session-level data).
|
||||
|
||||
### `TestRunMetadataFields`
|
||||
- **Members**:
|
||||
- `Id`, `Description`, `InlineSerializedData`, `Guid`, `FaultFlags`, `Software`, `SoftwareVersion`, `DataType`, `FileDate`, `FilePath`, `Modules`, `Module`, `Channels`, `CalculatedChannels`, `CalculatedChannel`
|
||||
- **Purpose**: Defines top-level fields for a test run’s metadata, including references to nested entities (modules, channels, etc.) and runtime context.
|
||||
|
||||
### `TestModuleFields`
|
||||
- **Members**:
|
||||
- Includes identifiers (`SerialNumber`, `BaseSerialNumber`, `Number`), timing (`StartRecordTimestampSec`, `TriggerTimestampSec`, etc.), sampling (`NumberOfSamples`, `UnsubsampledNumberOfSamples`, `SampleRateHz`, `StartRecordSampleNumber`), configuration (`RecordingMode`, `RequestedPreTriggerSeconds`, `AaFilterRateHz`), sensor data (`TiltSensorAxisXDegreesPre`, `TemperatureLocation1Pre`, etc.), and metadata (`InlineSerializedData`, `PTPMasterSync`).
|
||||
- **Purpose**: Represents all known fields for a test module’s metadata, including pre/post-trigger conditions, sensor readings, and acquisition parameters.
|
||||
|
||||
### `TestChannelFields`
|
||||
- **Members**:
|
||||
- Includes identifiers (`SerialNumber`, `ChannelId`, `HardwareChannelName`, `SensorId`), configuration (`Description`, `ChannelDescriptionString`, `ChannelName2`, `UnitConversion`, `LinearizationFormula`, `ZeroMethod`, `ZeroAverageWindowBegin`, `ZeroAverageWindowEnd`), calibration (`LastCalibrationDate`, `Sensitivity`, `SensitivityUnits`, `CalSignalEnabled`, `ShuntEnabled`, `MeasuredShuntDeflectionMv`, `TargetShuntDeflectionMv`), acquisition (`Start`, `IsSubsampled`, `AbsoluteDisplayOrder`, `SampleRateHz`, `UnsubsampledSampleRateHz`, `TimeOfFirstSample`), electrical properties (`ExcitationVoltage`, `MeasuredExcitationVoltage`, `FactoryExcitationVoltage`, `BridgeResistanceOhms`, `OffsetToleranceLowMv`, `OffsetToleranceHighMv`), derived values (`InitialEu`, `InitialOffset`, `UserOffsetEU`, `ScaleFactorEU`), and metadata (`IsoCode`, `UserCode`, `HIC`, `SourceModuleSerialNumber`, `Calculation`, `DataFlag`, `AtCapacity`, `SensorPolarity`, `UseEUScaler`, `T1`, `T2`).
|
||||
- **Purpose**: Provides exhaustive field coverage for channel-level metadata, supporting both raw and calculated channels.
|
||||
|
||||
## 3. Invariants
|
||||
|
||||
- **No overlap across enums**: Each enum defines a distinct set of field names for a specific metadata entity (e.g., `TestChannelFields` vs. `TestModuleFields`). There is no guarantee of uniqueness across enums (e.g., `Name`, `Channels`, `Module` appear in multiple enums), but within each enum, all members are unique.
|
||||
- **Field names are string-literal keys**: These enums are intended to map to string-based keys (e.g., in JSON or dictionaries). Their values are implicitly `int`-backed, but the *semantic meaning* comes from their *names*, not their numeric values.
|
||||
- **No ordering guarantees**: The enums are not ordered by importance, hierarchy, or sequence. `AbsoluteDisplayOrder` in `TestChannelFields` is a *field name*, not an ordering directive for the enum itself.
|
||||
- **No validation logic**: These are *pure data definitions*; no runtime validation or constraints are enforced by the enums themselves.
|
||||
|
||||
## 4. Dependencies
|
||||
|
||||
- **Internal usage**: These enums are defined in `DTS.CommonCore`, indicating they are part of a shared common library. They are likely consumed by:
|
||||
- UI components (e.g., metadata viewers, configuration panels)
|
||||
- Serialization/deserialization logic (e.g., JSON converters, DTOs)
|
||||
- Metadata querying or filtering systems
|
||||
- **No external dependencies**: The source files contain no `using` statements, implying no dependencies on other project types or external libraries. They rely solely on the base .NET runtime.
|
||||
|
||||
## 5. Gotchas
|
||||
|
||||
- **Ambiguity in field semantics**: While enum names are precise, their *intended usage* (e.g., whether `Channels` in `TestGraphsFields` refers to a list or a single channel) is not clarified by the enum alone. Context (e.g., JSON schema or usage site) is required.
|
||||
- **Redundant field names across enums**: Fields like `Module`, `Channels`, `CalculatedChannel`, `Name`, and `ChannelId` appear in multiple enums (`TestRunMetadataFields`, `TestSetupMetadataFields`, `TestGraphsFields`, `TestChannelFields`). This may indicate shared schema concepts but risks misuse if enums are used interchangeably.
|
||||
- **No deprecation markers**: The enums do not indicate obsolete or legacy fields (e.g., `ChannelName2`, `UserChannelName`, `UserCode`), which may complicate maintenance or migration.
|
||||
- **Tilt/temperature fields assume pre/post sensor states**: `TestModuleFields` includes many `Pre`/`Post`-suffixed fields (e.g., `TiltSensorAxisXDegreesPre`, `TemperatureLocation4Post`). This implies a rigid assumption about test procedures involving pre/post events; deviations may cause misinterpretation.
|
||||
- **No documentation on `InlineSerializedData`**: Its purpose (e.g., binary vs. JSON, encoding) is not evident from the enum alone.
|
||||
|
||||
None identified beyond the above ambiguities and design assumptions.
|
||||
Reference in New Issue
Block a user