This commit is contained in:
2026-04-17 14:55:32 -04:00
commit bc3ac1d4c9
18017 changed files with 4371742 additions and 0 deletions

View File

@@ -0,0 +1,58 @@
---
source_files:
- DataPRO/Modules/SensorsList/SensorSettingsModule/SensorSettingsModule.cs
generated_at: "2026-04-17T16:32:00.522409+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "9e3ed2e456d59d3e"
---
# SensorSettingsModule
### Purpose
This module provides sensor configuration functionality within the DTS application framework. It serves as a Prism module that registers and manages the View/ViewModel pair for sensor settings, exposing metadata (name, image, group, region) for the module loading system. The module is categorized under the Administrative group and targets the `SensorSettingsModuleRegion` for UI composition.
### Public Interface
**SensorSettingsModuleModule**
- `SensorSettingsModuleModule(IUnityContainer unityContainer)` - Constructor accepting a Unity container via dependency injection.
- `void Initialize()` - Registers `ISensorSettingsView``SensorSettingsView` and `ISensorSettingsViewModel``SensorSettingsViewModel` with the Unity container as transient types.
- `void OnInitialized(IContainerProvider containerProvider)` - Empty implementation; no initialization logic executed.
- `void RegisterTypes(IContainerRegistry containerRegistry)` - Delegates to `Initialize()` for type registration.
**SensorSettingsModuleModuleNameAttribute**
- `SensorSettingsModuleModuleNameAttribute()` / `SensorSettingsModuleModuleNameAttribute(string s)` - Constructors that set `AssemblyName` to `AssemblyNames.SensorSettingsModule.ToString()`.
- `override string AssemblyName { get; }` - Returns the module's assembly name.
- `override Type GetAttributeType()` - Returns `typeof(TextAttribute)`.
- `override string GetAssemblyName()` - Returns the assembly name.
**SensorSettingsModuleModuleImageAttribute**
- `override BitmapImage AssemblyImage { get; }` - Retrieves the module's image via `AssemblyInfo.GetImage()`.
- `override string AssemblyName { get; }` - Returns `AssemblyNames.SensorSettingsModule.ToString()`.
- `override string AssemblyGroup { get; }` - Returns `eAssemblyGroups.Administrative.ToString()`.
- `override eAssemblyRegion AssemblyRegion { get; }` - Returns `eAssemblyRegion.SensorSettingsModuleRegion`.
- `override BitmapImage GetAssemblyImage()` / `override string GetAssemblyName()` / `override string GetAssemblyGroup()` / `override eAssemblyRegion GetAssemblyRegion()` - Accessor methods for respective properties.
### Invariants
- The module must be constructed with a non-null `IUnityContainer` instance.
- `ISensorSettingsView` and `ISensorSettingsViewModel` must be registered before the view is resolved.
- Assembly-level attributes `SensorSettingsModuleModuleName` and `SensorSettingsModuleModuleImageAttribute` are applied exactly once per assembly (`AllowMultiple = false`).
### Dependencies
**Depends on:**
- `Prism.Modularity` (`IModule`, `ModuleAttribute`)
- `Prism.Ioc` (`IContainerProvider`, `IContainerRegistry`)
- `Unity` (`IUnityContainer`)
- `System.ComponentModel.Composition` (`ExportAttribute`)
- `DTS.Common` (`AssemblyNames`, `AssemblyInfo`, `eAssemblyGroups`, `eAssemblyRegion`)
- `DTS.Common.Interface` (`TextAttribute`, `ImageAttribute`)
- `DTS.Common.Interface.Sensors.SensorSettingsModule` (`ISensorSettingsView`, `ISensorSettingsViewModel`)
- `System.Windows.Media.Imaging` (`BitmapImage`)
**Depended on by:** Not determinable from source alone.
### Gotchas
- The `RegisterTypes` method calls `Initialize()` rather than using the `IContainerRegistry` parameter directly, mixing Prism's container abstraction with Unity-specific registration. This bypasses Prism's container-agnostic patterns.
- `OnInitialized` is empty; any module initialization logic that should run after container setup will not execute.
---

View File

@@ -0,0 +1,21 @@
---
source_files:
- DataPRO/Modules/SensorsList/SensorSettingsModule/Properties/Settings.Designer.cs
- DataPRO/Modules/SensorsList/SensorSettingsModule/Properties/AssemblyInfo.cs
generated_at: "2026-04-17T16:12:50.919123+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "931fc755f7e424ff"
---
# Properties
### 1. Purpose
This module contains the assembly-level configuration and metadata for the `CachedItemsList` assembly. It defines standard .NET assembly attributes (version, title, copyright) and provides a singleton entry point for application settings.
### 2. Public Interface
* **`Settings` (Class)**
* *Signature*: `internal sealed partial class Settings : ApplicationSettingsBase`
* *Property*: `public static Settings Default` — Returns a thread-safe singleton instance of the application settings for this assembly.
* **Assembly Attributes**
*

View File

@@ -0,0 +1,56 @@
---
source_files:
- DataPRO/Modules/SensorsList/SensorSettingsModule/Resources/TranslateExtension.cs
- DataPRO/Modules/SensorsList/SensorSettingsModule/Resources/StringResources.Designer.cs
generated_at: "2026-04-17T15:58:36.960492+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "a1a137641c23c850"
---
# Documentation: SensorSettingsModule Resources
## 1. Purpose
This module provides localization/internationalization infrastructure for the `SensorSettingsModule`. It consists of two components: a WPF/XAML markup extension (`TranslateExtension`) that enables declarative resource binding in XAML files, and an auto-generated strongly-typed resource class (`StringResources`) that wraps a `.resx` file for localized string lookup at runtime. The module centralizes all user-facing strings for sensor configuration UI, covering analog, digital, CAN, UART, IEPE, and squib settings among others.
---
## 2. Public Interface
### `TranslateExtension` (public class)
**Namespace:** `SensorSettingsModule`
**Inheritance:** `System.Windows.Markup.MarkupExtension`
**Attribute:** `[MarkupExtensionReturnType(typeof(string))]`
A XAML markup extension that resolves localized strings from resource files at runtime.
| Member | Signature | Description |
|--------|-----------|-------------|
| Constructor | `TranslateExtension(string key)` | Creates an instance with the specified resource key. The key is stored in a private readonly field `_key`. |
| `ProvideValue` | `override object ProvideValue(IServiceProvider serviceProvider)` | Returns the localized string for `_key`. Returns `#stringnotfound#` if key is null or empty. Returns `#stringnotfound# {key}` if the resource lookup returns null. |
**Constants:**
- `private const string NotFound = "#stringnotfound#"` — Fallback value for missing resources.
---
### `StringResources` (internal class)
**Namespace:** `SensorSettingsModule.Resources`
**Attributes:** `[GeneratedCode]`, `[DebuggerNonUserCode]`, `[CompilerGenerated]`
An auto-generated strongly-typed resource class providing access to localized strings. **This class is `internal`** and only accessible within the assembly.
| Member | Signature | Description |
|--------|-----------|-------------|
| `ResourceManager` | `internal static ResourceManager ResourceManager { get; }` | Lazily-initialized cached `ResourceManager` instance. Looks up resources named `"SensorSettingsModule.Resources.StringResources"` in the current assembly. |
| `Culture` | `internal static CultureInfo Culture { get; set; }` | Overrides the current thread's `CurrentUICulture` for resource lookups via this class. |
**Static Resource Properties (all `internal static string`):**
| Property | Default Value (English) |
|----------|------------------------|
| `_24VPowerHigh` | "24V Power high (V)" |
| `_24VPower

View File

@@ -0,0 +1,78 @@
---
source_files:
- DataPRO/Modules/SensorsList/SensorSettingsModule/View/SensorSettingsView.xaml.cs
generated_at: "2026-04-17T16:47:13.941806+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "6b4c7c3b33aba0b0"
---
# SensorSettingsView Documentation
## 1. Purpose
`SensorSettingsView` is a WPF view component within the `SensorSettingsModule` that provides a user interface for configuring sensor settings. Its primary responsibility is capturing ad-hoc filter frequency input from the user via a combo box (`cbFilterOption`) and broadcasting valid numeric values through the Prism event aggregation system when the control loses focus. This module exists to decouple filter frequency capture from persistence logic, allowing other components to react to filter changes via the `SensorSavedEvent`.
---
## 2. Public Interface
### Class: `SensorSettingsView`
**Implements:** `ISensorSettingsView`
**Location:** `SensorSettingsModule` namespace
#### Constructor
```csharp
public SensorSettingsView()
```
Initializes the view component by calling `InitializeComponent()` and resolves an `IEventAggregator` instance from the Prism `ContainerLocator.Container`.
#### Event Handler: `CbFilterOption_LostFocus`
```csharp
private void CbFilterOption_LostFocus(object sender, RoutedEventArgs e)
```
**Trigger:** LostFocus event on `cbFilterOption` control (defined in XAML).
**Behavior:**
1. Retrieves the text value from `cbFilterOption.Text`
2. Attempts to parse the text as a `double`
3. If parsing succeeds, publishes the parsed value via `_eventAggregator.GetEvent<SensorSavedEvent>().Publish(freq)`
---
## 3. Invariants
- The `ContainerLocator.Container` must be initialized and available before `SensorSettingsView` is instantiated; otherwise, resolving `IEventAggregator` will fail.
- `SensorSavedEvent` must be registered with the Prism event aggregation system for publication to succeed.
- The `cbFilterOption` control must be defined in the associated XAML file (`SensorSettingsView.xaml`); it is referenced by name but not declared in this code-behind file.
- The `freq` field is only updated when `double.TryParse` succeeds; invalid input is silently ignored.
---
## 4. Dependencies
### This module depends on:
| Dependency | Purpose |
|------------|---------|
| `DTS.Common.Events.Sensors.SensorsList.SensorSavedEvent` | Event type published when a filter frequency is captured |
| `DTS.Common.Interface.Sensors.SensorSettingsModule.ISensorSettingsView` | Interface contract this view implements |
| `Prism.Ioc.ContainerLocator` | Service location for resolving the event aggregator |
| `Prism.Events.IEventAggregator` | Event publishing/subscribing mechanism |
| `System.Windows` (WPF) | Base WPF types (`RoutedEventArgs`, `Window`/`UserControl` via `InitializeComponent`) |
### What depends on this module:
Cannot be determined from source alone. The `ISensorSettingsView` interface suggests this view is consumed via dependency injection or a navigation/region mechanism, but the consumers are not visible in this file.
---
## 5. Gotchas
1. **Service Locator Pattern:**

View File

@@ -0,0 +1,44 @@
---
source_files:
- DataPRO/Modules/SensorsList/SensorSettingsModule/ViewModel/SensorSettingsViewModel.cs
generated_at: "2026-04-17T16:00:55.618371+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "12451075d364b985"
---
# SensorSettingsViewModel Documentation
## 1. Purpose
`SensorSettingsViewModel` is a Prism-based ViewModel that manages sensor configuration defaults for a data acquisition system. It serves as the orchestration layer for loading, validating, and persisting various sensor setting types (Squib, Digital I/O, IEPE, Analog, UART, CAN, Stream Output, and Calibration Policy). The class implements `ISensorSettingsViewModel` and follows the MVVM pattern with MEF composition using a shared creation policy (singleton-like lifetime).
## 2. Public Interface
### Constructor
```csharp
public SensorSettingsViewModel(ISensorSettingsView view, IRegionManager regionManager,
IEventAggregator eventAggregator, IUnityContainer unityContainer)
```
Initializes the ViewModel, sets the View's DataContext, creates interaction requests, and subscribes to `RaiseNotification` and `BusyIndicatorChangeNotification` events.
### Properties
| Property | Type | Description |
|----------|------|-------------|
| `View` | `ISensorSettingsView` | The associated view instance. |
| `DigitalInputDefaults` | `IDigitalInputDefaults` | Digital input sensor default settings. |
| `SquibSettings` | `ISquibSettingDefaults` | Squib firing configuration defaults. |
| `DigitalOutSettings` | `IDigitalOutDefaults` | Digital output configuration defaults. |
| `IEPESensorDefaults` | `IIEPESensorDefaults` | IEPE sensor default settings. |
| `SensorCalibrationDefaults` | `ICalibrationPolicy` | Calibration policy settings. |
| `AnalogDefaults` | `IAnalogDefaults` | Analog setting defaults. |
| `UartIODefaults` | `IUartSettingDefaults` | UART communication defaults. |
| `CanIODefaults` | `ICanSettingDefaults` | CAN bus communication defaults. |
| `StreamOutputSettings` | `IStreamOutputSettingDefaults` | Stream output configuration defaults. |
| `NotificationRequest` | `InteractionRequest<Notification>` | Request for showing notification dialogs. |
| `ConfirmationRequest` | `InteractionRequest<Confirmation>` | Request for showing confirmation dialogs. |
| `User` | `string` | Current user identifier (setter public, getter public). |
| `UserID` | `int` | Current user ID (setter public, getter public). |
| `IsDirty` | `bool` | Always returns `false` (hardcoded). |
| `IsBusy` | `bool` | Busy indicator state, raises

View File

@@ -0,0 +1,58 @@
---
source_files:
- DataPRO/Modules/SensorsList/SensorsList/SensorsListModule.cs
generated_at: "2026-04-17T16:32:00.523986+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "7d304b967e735a7b"
---
# SensorsList
### Purpose
This module provides sensor configuration functionality within the DTS application framework. It serves as a Prism module that registers and manages the View/ViewModel pair for sensor settings, exposing metadata (name, image, group, region) for the module loading system. The module is categorized under the Administrative group and targets the `SensorSettingsModuleRegion` for UI composition.
### Public Interface
**SensorSettingsModuleModule**
- `SensorSettingsModuleModule(IUnityContainer unityContainer)` - Constructor accepting a Unity container via dependency injection.
- `void Initialize()` - Registers `ISensorSettingsView``SensorSettingsView` and `ISensorSettingsViewModel``SensorSettingsViewModel` with the Unity container as transient types.
- `void OnInitialized(IContainerProvider containerProvider)` - Empty implementation; no initialization logic executed.
- `void RegisterTypes(IContainerRegistry containerRegistry)` - Delegates to `Initialize()` for type registration.
**SensorSettingsModuleModuleNameAttribute**
- `SensorSettingsModuleModuleNameAttribute()` / `SensorSettingsModuleModuleNameAttribute(string s)` - Constructors that set `AssemblyName` to `AssemblyNames.SensorSettingsModule.ToString()`.
- `override string AssemblyName { get; }` - Returns the module's assembly name.
- `override Type GetAttributeType()` - Returns `typeof(TextAttribute)`.
- `override string GetAssemblyName()` - Returns the assembly name.
**SensorSettingsModuleModuleImageAttribute**
- `override BitmapImage AssemblyImage { get; }` - Retrieves the module's image via `AssemblyInfo.GetImage()`.
- `override string AssemblyName { get; }` - Returns `AssemblyNames.SensorSettingsModule.ToString()`.
- `override string AssemblyGroup { get; }` - Returns `eAssemblyGroups.Administrative.ToString()`.
- `override eAssemblyRegion AssemblyRegion { get; }` - Returns `eAssemblyRegion.SensorSettingsModuleRegion`.
- `override BitmapImage GetAssemblyImage()` / `override string GetAssemblyName()` / `override string GetAssemblyGroup()` / `override eAssemblyRegion GetAssemblyRegion()` - Accessor methods for respective properties.
### Invariants
- The module must be constructed with a non-null `IUnityContainer` instance.
- `ISensorSettingsView` and `ISensorSettingsViewModel` must be registered before the view is resolved.
- Assembly-level attributes `SensorSettingsModuleModuleName` and `SensorSettingsModuleModuleImageAttribute` are applied exactly once per assembly (`AllowMultiple = false`).
### Dependencies
**Depends on:**
- `Prism.Modularity` (`IModule`, `ModuleAttribute`)
- `Prism.Ioc` (`IContainerProvider`, `IContainerRegistry`)
- `Unity` (`IUnityContainer`)
- `System.ComponentModel.Composition` (`ExportAttribute`)
- `DTS.Common` (`AssemblyNames`, `AssemblyInfo`, `eAssemblyGroups`, `eAssemblyRegion`)
- `DTS.Common.Interface` (`TextAttribute`, `ImageAttribute`)
- `DTS.Common.Interface.Sensors.SensorSettingsModule` (`ISensorSettingsView`, `ISensorSettingsViewModel`)
- `System.Windows.Media.Imaging` (`BitmapImage`)
**Depended on by:** Not determinable from source alone.
### Gotchas
- The `RegisterTypes` method calls `Initialize()` rather than using the `IContainerRegistry` parameter directly, mixing Prism's container abstraction with Unity-specific registration. This bypasses Prism's container-agnostic patterns.
- `OnInitialized` is empty; any module initialization logic that should run after container setup will not execute.
---

View File

@@ -0,0 +1,174 @@
---
source_files:
- DataPRO/Modules/SensorsList/SensorsList/Model/DigitalOutputSetting.cs
- DataPRO/Modules/SensorsList/SensorsList/Model/StreamInputSetting.cs
- DataPRO/Modules/SensorsList/SensorsList/Model/CanIOSetting.cs
- DataPRO/Modules/SensorsList/SensorsList/Model/UartIOSetting.cs
- DataPRO/Modules/SensorsList/SensorsList/Model/DigitalInputSetting.cs
- DataPRO/Modules/SensorsList/SensorsList/Model/Squib.cs
- DataPRO/Modules/SensorsList/SensorsList/Model/StreamOutputSetting.cs
generated_at: "2026-04-17T15:51:18.314509+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "3b796896c8429f91"
---
# SensorsList.Model Module Documentation
## 1. Purpose
This module provides model classes for representing various sensor I/O configuration settings within a data acquisition system. It defines UI-facing data transfer objects for Digital I/O, Stream I/O, CAN bus, UART, and Squib (pyrotechnic) sensor types. Each model class wraps underlying database records or sensor data interfaces, provides property change notification for UI binding, implements filtering for list views, and includes a dedicated comparer class for multi-field sorting operations.
---
## 2. Public Interface
### DigitalOutputSetting
**Inherits:** `DigitalOutDbRecord`
**Implements:** `IDigitalOutputSetting`, `IDragAndDropItem`
| Member | Signature | Description |
|--------|-----------|-------------|
| `Included` | `bool { get; set; }` | Checkbox state for list views. Defaults to `true`. Raises property change notification. |
| `Description` | `string { get; set; }` | Description/comment text. Defaults to `""`. |
| `Disabled` | `bool { get; set; }` | Disabled state flag. Defaults to `false`. |
| `Assigned` | `bool { get; set; }` | Whether associated with a channel. Defaults to `false`. |
| `Online` | `bool { get; set; }` | Whether found online. Defaults to `false`. |
| `Filter` | `bool Filter(string term)` | Returns `true` if `SerialNumber`, `DODelay`, or `DODuration` contains the search term (case-insensitive). Empty/null term returns `true`. |
| `IsTestSpecificDigitalOutput` | `bool IsTestSpecificDigitalOutput()` | Returns `true` if `SerialNumber` starts with `"TSD_"`. |
| **Constructor** | `DigitalOutputSetting()` | Default constructor. |
| **Constructor** | `DigitalOutputSetting(IDigitalOutDbRecord record)` | Copies from a database record. |
| **Constructor** | `DigitalOutputSetting(ISensorData s)` | Populates from sensor data including `DatabaseId`, `Description`, `DODelay`, `DODuration`, `LastModified`, `ModifiedBy`, `SerialNumber`, `ISOCode`, `ISOChannelName`, `UserCode`, `UserChannelName`, `DOMode`, `LimitDuration`. |
### DigitalOutComparer
**Implements:** `IComparer<IDigitalOutputSetting>`
| Member | Signature | Description |
|--------|-----------|-------------|
| `SortField` | `DigitalOutFields { get; set; }` | Field to sort by. |
| `SortAscending` | `bool { get; set; }` | Sort direction. |
| `Compare` | `int Compare(IDigitalOutputSetting left, IDigitalOutputSetting right)` | Compares two settings. Handles nulls (`null` sorts first). Throws `ArgumentOutOfRangeException` for unrecognized `SortField`. Supports fields: `Included`, `SerialNumber`, `Description`, `Delay`, `Duration`, `ModifiedBy`, `LastModified`. |
---
### StreamInputSetting
**Inherits:** `DTS.Common.Base.BasePropertyChanged`
**Implements:** `IStreamInputSetting`, `IDragAndDropItem`
| Member | Signature | Description |
|--------|-----------|-------------|
| `Included` | `bool { get; set; }` | Checkbox state. Defaults to `true`. |
| `SerialNumber` | `string { get; set; }` | Defaults to `""`. |
| `Description` | `string { get; set; }` | Defaults to `""`. |
| `LastModifiedBy` | `string { get; set; }` | Last modifying user. |
| `LastModified` | `DateTime { get; set; }` | Last modification timestamp. |
| `Assigned` | `bool { get; set; }` | Defaults to `false`. |
| `Online` | `bool { get; set; }` | Defaults to `false`. |
| `DatabaseId` | `int { get; set; }` | Defaults to `-1`. |
| `ISOCode` / `ISOChannelName` | `string { get; set; }` | ISO channel identifiers. |
| `UserCode` / `UserChannelName` | `string { get; set; }` | User-defined channel identifiers. |
| `Broken` | `bool { get; set; }` | Defaults to `false`. |
| `DoNotUse` | `bool { get; set; }` | Defaults to `false`. |
| `UDPAddress` | `string { get; set; }` | Defaults to `"UDP://239.1.2.10:8400"`. |
| `Filter` | `bool Filter(string term)` | Returns `true` if `SerialNumber`, `Description`, or `UDPAddress` contains term. |
| `IsTestSpecificStreamInput` | `bool IsTestSpecificStreamInput()` | Returns `true` if `SerialNumber` starts with `"TSS_"`. |
| **Constructor** | `StreamInputSetting()` | Default constructor. |
| **Constructor** | `StreamInputSetting(ISensorData s)` | Populates from sensor data. |
### StreamInComparer
**Implements:** `IComparer<IStreamInputSetting>`
| Member | Signature | Description |
|--------|-----------|-------------|
| `SortField` | `StreamInSettingFields { get; set; }` | Field to sort by. |
| `SortAscending` | `bool { get; set; }` | Sort direction. |
| `Compare` | `int Compare(IStreamInputSetting left, IStreamInputSetting right)` | Supports fields: `Included`, `SerialNumber`, `Description`, `LastModifiedBy`, `LastModified`, `UDPAddress`. |
---
### CanIOSetting
**Inherits:** `DTS.Common.Base.BasePropertyChanged`
**Implements:** `ICanIOSetting`, `IDragAndDropItem`
| Member | Signature | Description |
|--------|-----------|-------------|
| `Included` | `bool { get; set; }` | Defaults to `true`. |
| `SerialNumber` | `string { get; set; }` | Defaults to `""`. |
| `Description` | `string { get; set; }` | Defaults to `""`. |
| `DatabaseId` | `int { get; set; }` | Defaults to `-1`. |
| `LastModifiedBy` | `string { get; set; }` | Defaults to `""`. |
| `LastModified` | `DateTime { get; set; }` | Modification timestamp. |
| `Assigned`, `Online`, `Broken`, `DoNotUse` | `bool { get; set; }` | Status flags, all default to `false`. |
| `CanIsFD` | `bool { get; set; }` | CAN FD mode flag. Defaults to `false`. |
| `CanArbBaseBitrate` | `int { get; set; }` | Arbitration base bitrate. Defaults to `0`. |
| `CanArbBaseSJW` | `int { get; set; }` | Arbitration base SJW. Defaults to `0`. |
| `CanDataBitrate` | `int { get; set; }` | Data bitrate. Defaults to `0`. |
| `CanDataSJW` | `int { get; set; }` | Data SJW. Defaults to `0`. |
| `CanFileType` | `string { get; set; }` | Defaults to `string.Empty`. |
| `ISOCode`, `ISOChannelName`, `UserCode`, `UserChannelName` | `string { get; set; }` | Channel identifiers. |
| `Filter` | `bool Filter(string term)` | Searches `SerialNumber`, `Description`, `CanIsFD`, `CanArbBaseBitrate`, `CanArbBaseSJW`, `CanDataBitrate`, `CanDataSJW`, `CanFileType`. |
| **Constructor** | `CanIOSetting()` | Default constructor. |
| **Constructor** | `CanIOSetting(ICANRecord record)` | Populates from CAN record (sets ISO/User codes to empty). |
| **Constructor** | `CanIOSetting(ISensorData s)` | Populates from sensor data. |
### CanIOComparer
**Implements:** `IComparer<ICanIOSetting>`
| Member | Signature | Description |
|--------|-----------|-------------|
| `SortField` | `CanSettingFields { get; set; }` | Field to sort by. |
| `SortAscending` | `bool { get; set; }` | Sort direction. |
| `Compare` | `int Compare(ICanIOSetting left, ICanIOSetting right)` | Uses `DTS.Common.Utilities.NaturalStringComparer` for string fields. Supports: `CanIsFD`, `CanArbBaseBitrate`, `CanArbBaseSJW`, `CanDataBitrate`, `CanDataSJW`, `CanFileType`. |
---
### UartIOSetting
**Inherits:** `DTS.Common.Base.BasePropertyChanged`
**Implements:** `IUartIOSetting`, `IDragAndDropItem`
| Member | Signature | Description |
|--------|-----------|-------------|
| `Included` | `bool { get; set; }` | Defaults to `true`. |
| `SerialNumber` | `string { get; set; }` | Defaults to `""`. |
| `Description` | `string { get; set; }` | Defaults to `""`. |
| `DatabaseId` | `int { get; set; }` | Defaults to `-1`. |
| `LastModifiedBy` | `string { get; set; }` | Defaults to `""`. |
| `LastModified` | `DateTime { get; set; }` | Modification timestamp. |
| `Assigned`, `Online`, `Broken`, `DoNotUse` | `bool { get; set; }` | Status flags. |
| `BaudRate` | `uint { get; set; }` | Defaults to `57600`. |
| `DataBits` | `uint { get; set; }` | Defaults to `8`. |
| `StopBits` | `StopBits { get; set; }` | Defaults to `StopBits.None`. |
| `Parity` | `Parity { get; set; }` | Defaults to `Parity.None`. |
| `FlowControl` | `Handshake { get; }` | **Read-only.** Always `Handshake.None`. |
| `DataFormat` | `UartDataFormat { get; set; }` | Defaults to `UartDataFormat.Binary`. |
| `ISOCode`, `ISOChannelName`, `UserCode`, `UserChannelName` | `string { get; set; }` | Channel identifiers. |
| `Filter` | `bool Filter(string term)` | Searches `SerialNumber`, `Description`, `BaudRate`, `DataBits`, `StopBits`, `Parity`, `FlowControl`, `DataFormat`. |
| **Constructor** | `UartIOSetting()` | Default constructor. |
| **Constructor** | `UartIOSetting(IUARTRecord record)` | Populates from UART record. |
| **Constructor** | `UartIOSetting(ISensorData s)` | Populates from sensor data. |
### UartIOComparer
**Implements:** `IComparer<IUartIOSetting>`
| Member | Signature | Description |
|--------|-----------|-------------|
| `SortField` | `UartSettingFields { get; set; }` | Field to sort by. |
| `SortAscending` | `bool { get; set; }` | Sort direction. |
| `Compare` | `int Compare(IUartIOSetting left, IUartIOSetting right)` | Uses `NaturalStringComparer` for string fields. Supports: `Included`, `SerialNumber`, `BaudRate`, `DataBits`, `StopBits`, `Parity`, `FlowControl`, `DataFormat`, `LastModifiedBy`, `LastModified`. |
---
### DigitalInputSetting
**Inherits:** `DigitalInDbRecord`
**Implements:** `IDigitalInputSetting`, `IDragAndDropItem`
| Member | Signature | Description |
|--------|-----------|-------------|
| `Included` | `bool { get; set; }` | Checkbox state. Defaults to `true`. |
| `Description` | `string { get; set; }` | Wraps `UserValue1` from base class. |
| `DIMode` | `string { get; set; }` | String representation of `DigitalInputModes` enum. Parses string to enum on set. |
| `ModifiedBy` | `string { get; set; }` | Wraps `LastModifiedBy`. |
| `Disabled` | `bool { get; set; }` | Defaults to `false`. Comment indicates "not used". |
| `Assigned` | `bool { get; set; }` | Whether associated with a channel. |
| `Online` | `bool { get; set; }` | Whether found online. |
| `DatabaseId` | `int { get; set; }` | Wraps `Id`. Valid

View File

@@ -0,0 +1,36 @@
---
source_files:
- DataPRO/Modules/SensorsList/SensorsList/Properties/Settings.Designer.cs
- DataPRO/Modules/SensorsList/SensorsList/Properties/AssemblyInfo.cs
generated_at: "2026-04-17T16:12:31.641209+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "a892c554420fb62a"
---
# Properties
### Purpose
This module contains auto-generated infrastructure code for the `SensorsList` assembly, providing application settings management and assembly metadata. It serves as the build-generated properties layer for the SensorsList component, which handles sensor listing functionality within the DTS product line (copyright 2017).
### Public Interface
- **`Settings` class** (internal sealed partial) - Inherits from `global::System.Configuration.ApplicationSettingsBase`. Provides thread-safe singleton access to application settings.
- `static Settings Default { get; }` - Returns the synchronized singleton instance of the settings class via `defaultInstance` field.
### Invariants
- The `Settings` class is generated by `Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator` version `17.10.0.0` targeting .NET Framework 4.0 runtime (`4.0.30319.42000`).
- The `defaultInstance` field is initialized via `Synchronized()` method ensuring thread-safe access.
- Assembly version is fixed at `1.0.0.0` for both `AssemblyVersion` and `AssemblyFileVersion`.
- COM visibility is explicitly disabled via `ComVisible(false)`.
- Assembly GUID: `9aa6d22f-5df9-4702-a16a-2c7f38b466f8`.
### Dependencies
- **Depends on**: `System.Configuration.ApplicationSettingsBase` (from System.Configuration assembly).
- **Depended on by**: Cannot be determined from source alone; this is a properties module likely consumed by the parent `SensorsList` assembly.
### Gotchas
- This file is auto-generated. Manual changes will be lost upon regeneration.
- The `Settings` class is `internal`, limiting access to within the `SensorsList` assembly.
- Copyright year (2017) differs from SoftwareFilters (2018), suggesting different development timelines.
---

View File

@@ -0,0 +1,136 @@
---
source_files:
- DataPRO/Modules/SensorsList/SensorsList/Resources/TranslateExtension.cs
- DataPRO/Modules/SensorsList/SensorsList/Resources/StringResources.Designer.cs
generated_at: "2026-04-17T15:58:41.709200+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "3a1ca5cd507016f6"
---
# Documentation: SensorsList.Resources Module
## 1. Purpose
This module provides localization infrastructure for the `SensorsList` module within the DataPRO system. It consists of a WPF/XAML markup extension (`TranslateExtension`) that enables declarative string localization in XAML bindings, backed by a strongly-typed resource class (`StringResources`) that exposes sensor-related UI labels and property names. The module exists to support internationalization of the sensor configuration interface, allowing sensor property names, settings labels, and status indicators to be displayed in the user's configured culture.
---
## 2. Public Interface
### `TranslateExtension` (Class)
**Namespace:** `SensorsList`
**Inheritance:** `System.Windows.Markup.MarkupExtension`
| Member | Signature | Description |
|--------|-----------|-------------|
| Constructor | `TranslateExtension(string key)` | Creates an instance with the specified resource key. The key is stored in a private readonly field `_key`. |
| `ProvideValue` | `override object ProvideValue(IServiceProvider serviceProvider)` | Returns the localized string for `_key` by querying `StringResources.ResourceManager.GetString(_key)`. Returns `NotFound` constant if key is null or empty. Returns `NotFound + " " + _key` if the resource lookup returns null. |
**Constants:**
- `private const string NotFound = "#stringnotfound#"` — Fallback string returned when a resource key is invalid or not found.
---
### `StringResources` (Class)
**Namespace:** `SensorsList.Resources`
**Visibility:** `internal`
**Attributes:** `[GeneratedCode]`, `[DebuggerNonUserCode]`, `[CompilerGenerated]`
| Member | Signature | Description |
|--------|-----------|-------------|
| `ResourceManager` | `static ResourceManager ResourceManager { get; }` | Lazy-initialized cached `ResourceManager` instance for the `"SensorsList.Resources.StringResources"` resource base name. |
| `Culture` | `static CultureInfo Culture { get; set; }` | Gets or sets the current thread's `CurrentUICulture` override for resource lookups. |
**Static Resource Properties (all return `string`):**
| Property | Default Value (English) |
|----------|------------------------|
| `Analog` | "Analog" |
| `Assembly` | "Assembly" |
| `CalDate` | "Cal Date" |
| `CalDueDate` | "Cal Due Date" |
| `Capacity` | "Capacity (EU)" |
| `DataChannelId` | "Data channel id" |
| `Description` | "Name" |
| `DigitalInputs` | "Digital Input Settings" |
| `DigitalOutputs` | "Digital Output Settings" |
| `DIMode` | "Input Mode" |
| `DODelay` | "Delay (ms)" |
| `DODuration` | "Duration (ms)" |
| `Excitation` | "Excitation (V)" |
| `FirstUseDate` | "First use date" |
| `ID` | "Sensor EID" |
| `IEPE` | "IEPE" |
| `InspectBeforeUse` | "Inspect Before Use" |
| `InWarningPeriod` | "In Warning Period" |
| `IRIGTimeDataPacketIntervalMs` | "Time packet interval (ms)" |
| `LastModified` | "Last Modified" |
| `LinearSensitivity` | "Linear Sensitivity" |
| `Manufacturer` | "Manufacturer" |
| `MaximumUsage` | "Maximum Usage" |
| `Model` | "Model" |
| `ModifiedBy` | "Modified By" |
| `NonLinearSensitivity` | "Non-Linear Sensitivity" |
| `OutOfDate` | "Out Of Date" |
| `Resistance` | "Resistance (Ω)" |
| `ResistanceHigh` | "Resistance High (Ω)" |
| `ResistanceLow` | "Resistance Low (Ω)" |
| `Sensitivity` | "Sensitivity" |
| `SensorMaxRange` | "Sensor max range" |
| `SerialNumber` | "Serial Number" |
| `SQDelay` | "Delay (ms)" |
| `SQDuration` | "Duration (ms)" |
| `SQMode` | "Squib Fire Mode" |
| `Squibs` | "Squib Settings" |
| `StreamInputs` | "Stream Input Settings" |
| `StreamOutputs` | "Stream Output Settings" |
| `StreamOutParameters_IENA_Key` | "IENA key" |
| `StreamOutParameters_IENA_SourcePort` | "IENA source port" |
| `StreamOutParameters_TMNS_MessageId` | "Message id" |
| `StreamOutParameters_TMNS_MinorPerMajor` | "PCM minor per major" |
| `StreamOutParameters_TMNS_SubFrameId` | "Subframe id" |
| `StreamOutParameters_TMNS_TMATSPort` | "TMATS port" |
| `Table_NA` | "---" |
| `TimeChannelId` | "Time channel id" |
| `TMATSIntervalMs` | "TMATS interval (ms)" |
| `TmNSConfig` | "TmNS config" |
| `UartBaudRate` | "Baud Rate (bps)" |
| `UartDataBits` | "Data Bits" |
| `UartDataFormat` | "Data Format" |
| `UartFlowControl` | "Flow Control" |
| `UartParity` | "Parity" |
| `Uarts` | "UART Settings" |
| `UartStopBits` | "Stop Bits" |
| `UDPAddress` | "UDP address" |
| `UDPProfile` | "Stream profile" |
| `Units` | "Units" |
| `UsageCount` | "Usage Count" |
| `UserValue1` | "UserValue1" |
| `UserValue2` | "UserValue2" |
| `UserValue3` | "UserValue3" |
---
## 3. Invariants
1. **Key Non-Null Guarantee:** `TranslateExtension._key` is set once in the constructor and never modified (readonly). However, it may be null or empty if passed as such.
2. **Fallback Behavior:** `TranslateExtension.ProvideValue` will never return null. It returns:
- `NotFound` ("#stringnotfound#") if `_key` is null or empty
- `NotFound + " " + _key` if the resource manager returns null for the key
- The localized string otherwise
3. **ResourceManager Singleton:** `StringResources.ResourceManager` is lazily initialized exactly once per AppDomain via null-check pattern.
4. **Generated Code Constraint:** `StringResources` is auto-generated from a `.resx` file. Manual edits will be overwritten upon regeneration.
5. **Culture Thread Affinity:** `StringResources.Culture` affects all subsequent resource lookups in the current thread context when set.
---
## 4. Dependencies
### This Module Depends On:
- `System` (core .NET types)
- `System.Windows.Markup` (for `MarkupExtension` and `MarkupExtensionReturnTypeAttribute`) — indicates WPF

View File

@@ -0,0 +1,179 @@
---
source_files:
- DataPRO/Modules/SensorsList/SensorsList/View/SensorTemplatesImportView.xaml.cs
- DataPRO/Modules/SensorsList/SensorsList/View/SensorTemplatesExportView.xaml.cs
- DataPRO/Modules/SensorsList/SensorsList/View/SensorsListOverdueView.xaml.cs
- DataPRO/Modules/SensorsList/SensorsList/View/SensorsListView.xaml.cs
- DataPRO/Modules/SensorsList/SensorsList/View/SensorsListEditGroupView.xaml.cs
generated_at: "2026-04-17T15:53:32.557562+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "8c17b749e19345ec"
---
# SensorsList View Module Documentation
## 1. Purpose
This module provides the WPF view layer for the SensorsList feature within the DTS application. It contains code-behind for multiple XAML views that display, edit, import, and export sensor configurations. The views support multiple sensor types (Analog, Squib, Digital I/O, UART, Stream I/O) and provide dynamic column management, sorting, filtering, and drag-and-drop functionality. The views implement interfaces from `DTS.Common.Interface.Sensors.SensorsList` and delegate business logic to associated ViewModels.
---
## 2. Public Interface
### SensorTemplatesImportView
**Implements:** `ISensorTemplatesImportView`
| Member | Signature | Description |
|--------|-----------|-------------|
| Constructor | `SensorTemplatesImportView()` | Initializes the view component via `InitializeComponent()`. |
---
### SensorTemplatesExportView
**Implements:** `ISensorTemplatesExportView`
| Member | Signature | Description |
|--------|-----------|-------------|
| Constructor | `SensorTemplatesExportView()` | Initializes the view component via `InitializeComponent()`. |
---
### SensorsListOverdueView
**Implements:** `ISensorsListOverdueView`
| Member | Signature | Description |
|--------|-----------|-------------|
| Constructor | `SensorsListOverdueView()` | Initializes the view component. |
| Event Handler | `void ListViewHeader_Click(object sender, RoutedEventArgs e)` | Handles column header clicks; extracts `GridViewColumnHeader` from `e.OriginalSource`, retrieves `ISensorsListViewModel` from `colHeader.DataContext`, and calls `viewModel.SortOverdue(colHeader.Tag, true)`. |
| Event Handler | `void GridViewColumnHeaderSearchable_OnSearch(object sender, RoutedEventArgs e)` | Extracts search term from `e.OriginalSource` and column tag from `sender`. Contains a `// Do search` comment but no implementation. |
---
### SensorsListView
**Implements:** `ISensorsListView`
| Member | Signature | Description |
|--------|-----------|-------------|
| Constructor | `SensorsListView()` | Initializes the view component. |
| Method | `void SetIncludedVisible(bool bUsesIncludeColumn)` | Dynamically adds or removes "Included" columns across all seven ListView types (Analog, Squib, DigitalIn, DigitalOut, Uart, StreamOut, StreamIn). Inserts at index 0 when adding. |
| Method | `void HandleColumns(CalibrationBehaviors calibrationBehavior)` | Manages calibration-related columns based on `CalibrationBehaviors` enum. Handles `LinearIfAvailable`, `NonLinearIfAvailable`, and `UseBothIfAvailable` cases. Also manages FirstUse column based on `SensorConstants.UseSensorFirstUseDate`. |
| Method | `void HandleInspectBeforeUseVisibilityColumn(bool show)` | Adds or removes the `InspectBeforeUseColumn` from the Analog ListView. |
| Method | `void HandleAssemblyVisibilityColumns(bool bDontAllowDataCollectionIfOverused)` | Conditionally adds/removes Assembly, UsageCount, and MaximumUsage columns. |
**Private Event Handlers (wired to XAML):**
| Handler | ViewModel Method Called |
|---------|------------------------|
| `GridViewColumnHeaderSearchable_OnSearch` | `viewModel.Filter(columnTag, searchTerm)` |
| `GridViewColumnHeaderSearchableSquib_OnSearch` | `viewModel.FilterSquib(columnTag, searchTerm)` |
| `GridViewColumnHeaderSearchableDigitalIn_OnSearch` | `viewModel.FilterDigitalIn(columnTag, searchTerm)` |
| `GridViewColumnHeaderSearchableDigitalOut_OnSearch` | `viewModel.FilterDigitalOut(columnTag, searchTerm)` |
| `GridViewColumnHeaderSearchableUart_OnSearch` | `viewModel.FilterUartIO(columnTag, searchTerm)` |
| `GridViewColumnHeaderSearchableStreamIn_OnSearch` | `viewModel.FilterStreamIn(columnTag, searchTerm)` |
| `GridViewColumnHeaderSearchableStreamOut_OnSearch` | `viewModel.FilterStreamOut(columnTag, searchTerm)` |
| `GridViewColumnHeader_OnClick` | `viewModel.Sort(columnTag, true)` |
| `GridViewColumnHeaderCheckBox_OnClick` | `viewModel.Sort(columnTag, true)` |
| `CheckBox_Filter` | `viewModel.Filter(columnTag, searchTerm)` (converts "All" to `null`) |
---
### SensorsListEditGroupView
**Implements:** `ISensorsListEditGroupView`
| Member | Signature | Description |
|--------|-----------|-------------|
| Constructor | `SensorsListEditGroupView()` | Initializes component and subscribes to `ListViewStatusEvent` via `IEventAggregator`. |
| Method | `void HandleColumns()` | Adds or removes FirstUse column based on `SensorConstants.UseSensorFirstUseDate`. |
| Method | `void HandleAssemblyVisibilityColumns(bool bDontAllowDataCollectionIfOverused)` | Conditionally adds/removes Assembly, UsageCount, and MaximumUsage columns. |
| Method | `void HandleInspectBeforeUseVisibilityColumn(bool show)` | Adds or removes `InspectBeforeUseColumn`. |
**Private Event Handlers:**
| Handler | ViewModel Method Called |
|---------|------------------------|
| `GridViewColumnHeaderSearchable_OnSearch` | `viewModel.Filter(columnTag, searchTerm)` |
| `GridViewColumnHeaderSearchableSquib_OnSearch` | `viewModel.FilterSquib(columnTag, searchTerm)` |
| `GridViewColumnHeaderSearchableDigitalIn_OnSearch` | `viewModel.FilterDigitalIn(columnTag, searchTerm)` |
| `GridViewColumnHeaderSearchableDigitalOut_OnSearch` | `viewModel.FilterDigitalOut(columnTag, searchTerm)` |
| `GridViewColumnHeaderSearchableUart_OnSearch` | `viewModel.FilterUartIO(columnTag, searchTerm)` |
| `GridViewColumnHeaderSearchableStreamIn_OnSearch` | `viewModel.FilterStreamIn(columnTag, searchTerm)` |
| `GridViewColumnHeaderSearchableStreamOut_OnSearch` | `viewModel.FilterStreamOut(columnTag, searchTerm)` |
| `GridViewColumnHeader_OnClick` | `viewModel.Sort(columnTag, true)` |
| `GridViewColumnHeaderCheckBox_OnClick` | `viewModel.Sort(columnTag, true)` |
| `CheckBox_Filter` | `viewModel.Filter(columnTag, searchTerm)` |
**Drag-and-Drop Handlers:**
- `AnalogDropOver`, `AnalogDragEnter`, `AnalogDragLeave`, `AnalogDrop`
- `Squibs_DragEnter`, `SquibsDragLeave`, `SquibsDragOver`, `SquibsDragDrop`
- `UartSettingsDragEnter`, `UartSettingsDragLeave`, `UartSettingsDragOver`, `UartSettingsDragDrop`
- `DigitalInDragEnter`, `DigitalInDragLeave`, `DigitalInDragOver`, `DigitalInDragDrop`
- `DigitalOutDragEnter`, `DigitalOutDragLeave`, `DigitalOutDragOver`, `DigitalOutDragDrop`
- `StreamOutDragEnter`, `StreamOutDragLeave`, `StreamOutDragOver`, `StreamOutDragDrop`
- `StreamInDragEnter`, `StreamInDragLeave`, `StreamInDragOver`, `StreamInDragDrop`
**Mouse Handlers for Drag Initiation:**
- `Analog_PreviewMouseLeftButtonDown` → calls `MouseDownHandler(lvAnalog, e)`
- `Squibs_PreviewMouseLeftButtonDown` → calls `MouseDownHandler(lvSquibs, e)`
- `DigitalInput_PreviewMouseLeftButtonDown` → calls `MouseDownHandler(lvDigitalInputs, e)`
- `DigitalOutput_PreviewMouseLeftButtonDown` → calls `MouseDownHandler(lvDigitalOutput, e)`
- `Uart_PreviewMouseLeftButtonDown` → calls `MouseDownHandler(lvUart, e)`
- `StreamOut_PreviewMouseLeftButtonDown` → calls `MouseDownHandler(lvStreamOut, e)`
- `StreamIn_PreviewMouseLeftButtonDown` → calls `MouseDownHandler(lvStreamIn, e)`
---
## 3. Invariants
1. **DataContext Type Requirements:**
- `SensorsListView` expects `DataContext` to be castable to `ISensorsListViewModel`
- `SensorsListEditGroupView` expects `DataContext` to be castable to `ISensorsListEditGroupViewModel` or `SensorsListEditGroupViewModel`
- `SensorsListOverdueView` expects column headers' `DataContext` to be `ISensorsListViewModel`
2. **Column Management:**
- All column add/remove operations check for column existence before modifying
- Columns are inserted at specific indices relative to other named columns (e.g., FirstUseColumn inserted after CalDateColumn)
3. **Drag-and-Drop:**
- Items in ListViews must implement `IDragAndDropItem` interface for drag initiation
- Drag-and-drop is blocked when `_bPopupOpen` is `true`
- Drag-and-drop requires valid item index and selected items
4. **GridView Requirements:**
- All views expect their `ListView.View` property to be of type `GridView`
5. **Event Aggregator:**
- `SensorsListEditGroupView` requires `ContainerLocator.Container` to be properly configured with `IEventAggregator` registration
---
## 4. Dependencies
### External Dependencies (Imports):
- `DTS.Common.Interface.Sensors.SensorsList` - Interface contracts (`ISensorTemplatesImportView`, `ISensorTemplatesExportView`, `ISensorsListOverdueView`, `ISensorsListView`, `ISensorsListEditGroupView`, `ISensorsListViewModel`, `ISensorsListEditGroupViewModel`, `IDragAndDropItem`)
- `DTS.Common.Controls` - Custom controls (`GridViewColumnHeaderSearchable`, `GridViewColumnHeaderSearchableCheckBox`)
- `DTS.Common.Enums.Sensors` - `CalibrationBehaviors` enum
- `DTS.Common.Utils` - `Utils.FindChild<T>()` method
- `DTS.Common.Classes.Sensors.SensorsList` - `DragAndDropPayload` class
- `DTS.Common.Events` - `ListViewStatusEvent`, `ListViewStatusArg`
- `DTS.Common.Utilities.Logging` - `APILogger` for exception logging
- `SensorsList.Resources` - `StringResources` for localized headers
- `Prism.Ioc` - `ContainerLocator`
- `Prism.Events` - `IEventAggregator`
- `System.Windows` - WPF core types
- `System.Windows.Controls` - `ListView`, `GridView`, `GridViewColumn`, `GridViewColumnHeader`
### XAML Dependencies (referenced but not in code-behind):
- Named ListView controls: `ListView_SensorsListView`, `ListView_Squib`, `ListView_DigitalIn`, `ListView_DigitalOutput`, `ListView_Uart`, `ListView_StreamOutput`, `ListView_StreamInput`
- Named columns: `AnalogIncludedColumn`, `SquibIncludedColumn`, `DigitalInIncludedColumn`, `DigitalOutIncludedColumn`, `UartIncludedColumn`, `StreamOutIncludedColumn`, `StreamInIncludedColumn`, `FirstUseColumn`, `CalDateColumn`, `AddedSensitivityColumn`, `SensitivityColumn`, `InspectBeforeUseColumn`, `InWarningPeriodColumn`, `AssemblyColumn`, `ModelColumn`, `UsageCountColumn`, `MaximumUsageColumn`, `DescriptionColumn`, `Units`
- Named headers: `SensitivityHeader`
---
## 5. Gotchas
1. **Unimplemented Search in OverdueView:** `GridViewColumnHeaderSearchable_OnSearch` in `SensorsListOverdueView` contains only a `// Do search` comment with no actual implementation.
2. **Empty Drag-Drop Handlers:** All `*DragDrop` and `*Drop` methods in `SensorsListEditGroupView` are empty—the drag-and-drop operations are initiated but the drop handling is not implemented in code-behind.
3. **Commented-Out Code:** In `SensorsListView.Add

View File

@@ -0,0 +1,53 @@
---
source_files:
- DataPRO/Modules/SensorsList/SensorsList/ViewModel/SensorTemplatesViewModel.cs
generated_at: "2026-04-17T15:55:22.351568+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "f4e1525f2feb364d"
---
# SensorTemplatesViewModel Documentation
## 1. Purpose
`SensorTemplatesViewModel` is a shared (singleton) ViewModel responsible for coordinating Sensor Templates Import/Export functionality within the SensorsList module. It serves as the data context for both `ISensorTemplatesImportView` and `ISensorTemplatesExportView`, handling user notifications via Prism's interaction requests and responding to application-wide events for busy indicator state and notification popups. This class follows the MVVM pattern and integrates with Prism's region management and event aggregation infrastructure.
## 2. Public Interface
### Constructor
```csharp
public SensorTemplatesViewModel(
ISensorTemplatesImportView view1,
ISensorTemplatesExportView view2,
IRegionManager regionManager,
IEventAggregator eventAggregator,
IUnityContainer unityContainer)
```
Initializes the ViewModel, sets the DataContext on both views to itself, creates interaction requests, and subscribes to `RaiseNotification` and `BusyIndicatorChangeNotification` events.
### Properties
| Property | Type | Description |
|----------|------|-------------|
| `ImportView` | `ISensorTemplatesImportView` | Gets or sets the import view instance. |
| `ExportView` | `ISensorTemplatesExportView` | Gets or sets the export view instance. |
| `NotificationRequest` | `InteractionRequest<Notification>` | Interaction request for displaying notification popups. |
| `ConfirmationRequest` | `InteractionRequest<Confirmation>` | Interaction request for displaying confirmation dialogs. |
| `IsDirty` | `bool` | Always returns `false`. |
| `IsBusy` | `bool` | Gets or sets the busy indicator state; raises `PropertyChanged` on change. |
| `IsMenuIncluded` | `bool` | Gets or sets whether menu is included; raises `PropertyChanged` on change. |
| `IsNavigationIncluded` | `bool` | Gets or sets whether navigation is included; raises `PropertyChanged` on change. |
| `CapacityFormat` | `string` | Gets or sets the capacity format string (default: `"N2"`); ignores null values. |
### Events
```csharp
public event PropertyChangedEventHandler PropertyChanged
```
Standard INotifyPropertyChanged event for data binding notifications.
### Methods
| Method | Return Type | Description |
|--------|-------------|-------------|
| `OnPropertyChanged(string propertyName)` |

View File

@@ -0,0 +1,55 @@
---
source_files:
- DataPRO/Modules/SensorsList/SoftwareFilters/SoftwareFiltersModule.cs
generated_at: "2026-04-17T16:32:00.523490+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "5a986d5465d55db3"
---
# SoftwareFilters
### Purpose
This module provides software filtering capabilities for sensor data within the DTS application. It follows the Prism modular architecture pattern, registering its View/ViewModel pair for dependency injection. The module is categorized under the Prepare group and targets the `SoftwareFiltersRegion` for UI composition.
### Public Interface
**SoftwareFiltersModule**
- `SoftwareFiltersModule(IUnityContainer unityContainer)` - Constructor accepting a Unity container via dependency injection.
- `void Initialize()` - Registers `ISoftwareFiltersView``SoftwareFiltersView` and `ISoftwareFiltersViewModel``SoftwareFiltersViewModel` with the Unity container.
- `void OnInitialized(IContainerProvider containerProvider)` - **Throws `NotImplementedException`**.
- `void RegisterTypes(IContainerRegistry containerRegistry)` - **Throws `NotImplementedException`**.
**SoftwareFiltersModuleNameAttribute**
- `SoftwareFiltersModuleNameAttribute()` / `SoftwareFiltersModuleNameAttribute(string s)` - Constructors that set `AssemblyName` to `AssemblyNames.SoftwareFilters.ToString()`.
- `override string AssemblyName { get; }` - Returns the module's assembly name.
- `override Type GetAttributeType()` - Returns `typeof(TextAttribute)`.
- `override string GetAssemblyName()` - Returns the assembly name.
**SoftwareFiltersModuleImageAttribute**
- `override BitmapImage AssemblyImage { get; }` - Retrieves the module's image via `AssemblyInfo.GetImage()`.
- `override string AssemblyName { get; }` - Returns `AssemblyNames.SoftwareFilters.ToString()`.
- `override string AssemblyGroup { get; }` - Returns `eAssemblyGroups.Prepare.ToString()`.
- `override eAssemblyRegion AssemblyRegion { get; }` - Returns `eAssemblyRegion.SoftwareFiltersRegion`.
- Accessor methods: `GetAssemblyImage()`, `GetAssemblyName()`, `GetAssemblyGroup()`, `GetAssemblyRegion()`.
### Invariants
- The module must be constructed with a non-null `IUnityContainer` instance.
- Assembly-level attributes are applied exactly once per assembly (`AllowMultiple = false`).
### Dependencies
**Depends on:**
- `Prism.Modularity` (`IModule`, `ModuleAttribute`)
- `Prism.Ioc` (`IContainerProvider`, `IContainerRegistry`)
- `Unity` (`IUnityContainer`)
- `System.ComponentModel.Composition` (`ExportAttribute`)
- `DTS.Common` (`AssemblyNames`, `AssemblyInfo`, `eAssemblyGroups`, `eAssemblyRegion`)
- `DTS.Common.Interface` (`TextAttribute`, `ImageAttribute`)
- `DTS.Common.Interface.Sensors.SoftwareFilters` (`ISoftwareFiltersView`, `ISoftwareFiltersViewModel`)
- `System.Windows.Media.Imaging` (`BitmapImage`)
**Depended on by:** Not determinable from source alone.
### Gotchas
- **Critical:** Both `OnInitialized` and `RegisterTypes` throw `NotImplementedException`. This module will crash at runtime if Prism's module initialization lifecycle calls either method. The module relies solely on `Initialize()` being called elsewhere (likely from a deprecated initialization path).
- The module appears incomplete or is in a transitional state between initialization patterns.

View File

@@ -0,0 +1,34 @@
---
source_files:
- DataPRO/Modules/SensorsList/SoftwareFilters/Properties/Settings.Designer.cs
- DataPRO/Modules/SensorsList/SoftwareFilters/Properties/AssemblyInfo.cs
generated_at: "2026-04-17T16:12:31.638713+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "a1f755ac9a00606e"
---
# Properties
### Purpose
This module contains auto-generated infrastructure code for the `SoftwareFilters` assembly, providing application settings management via .NET's configuration system and assembly metadata. It serves as the build-generated properties layer for the SoftwareFilters component, which appears to be a sensor data filtering module within the DTS product line.
### Public Interface
- **`Settings` class** (internal sealed partial) - Inherits from `global::System.Configuration.ApplicationSettingsBase`. Provides thread-safe singleton access to application settings.
- `static Settings Default { get; }` - Returns the synchronized singleton instance of the settings class via `defaultInstance` field.
### Invariants
- The `Settings` class is generated by `Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator` version `17.10.0.0` targeting .NET Framework 4.0 runtime (`4.0.30319.42000`).
- The `defaultInstance` field is initialized via `Synchronized()` method ensuring thread-safe access.
- Assembly version is fixed at `1.0.0.0` for both `AssemblyVersion` and `AssemblyFileVersion`.
- COM visibility is explicitly disabled via `ComVisible(false)`.
### Dependencies
- **Depends on**: `System.Configuration.ApplicationSettingsBase` (from System.Configuration assembly).
- **Depended on by**: Cannot be determined from source alone; this is a properties module likely consumed by the parent `SoftwareFilters` assembly.
### Gotchas
- This file is auto-generated. Manual changes will be lost upon regeneration. Settings values themselves are defined in a `.settings` file not shown here.
- The `Settings` class is `internal`, limiting access to within the `SoftwareFilters` assembly.
---

View File

@@ -0,0 +1,49 @@
---
source_files:
- DataPRO/Modules/SensorsList/SoftwareFilters/Resources/TranslateExtension.cs
- DataPRO/Modules/SensorsList/SoftwareFilters/Resources/StringResources.Designer.cs
generated_at: "2026-04-17T16:12:50.919800+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "f90435a16981be78"
---
# Resources
### 1. Purpose
This module provides localization resources specifically for the `CachedItemsList` functionality within the TestSetups system. It enables XAML-based UI components to bind to localized strings via a markup extension and exposes strongly-typed string properties for keys such as "CacheTime", "Hardware", and "Sensor" for use in code-behind or other logic.
### 2. Public Interface
* **`TranslateExtension` (Class)**
* *Signature*: `public class TranslateExtension : MarkupExtension`
* *Constructor*: `TranslateExtension(string key)` — Initializes the extension with the resource key to look up.
* *Method*: `public override object ProvideValue(IServiceProvider serviceProvider)` — Returns the localized string corresponding to `_key`. Returns `#stringnotfound#` if the key is null/empty, or `#stringnotfound# <key>` if the lookup fails.
* **`StringResources` (Class)**
* *Signature*: `internal class StringResources`
* *Properties*: Provides access to specific localized strings.
* `string CacheTime`: Looks up "Cache Time".
* `string DBTime`: Looks up "Db Time".
* `string Deleted`: Looks up "[Deleted]".
* `string Hardware`: Looks up "Hardware".
* `string Name`: Looks up "Name".
* `string ObjectType`: Looks up "(Type)".
* `string Prepare_TestSetups_EditTestSetup_Page_Update`: Looks up "Refresh".
* `string Sensor`: Looks up "Sensor".
* `string SensorCal`: Looks up "Sensor calibration".
* *Property*: `static ResourceManager ResourceManager` — Returns the cached resource manager for this assembly.
* *Property*: `static CultureInfo Culture` — Gets or sets the current UI culture for resource lookups.
### 3. Invariants
* `TranslateExtension` always returns a non-null string. It never returns `null` or throws exceptions for missing keys; it returns a fallback error string instead.
* `StringResources.ResourceManager` is lazily initialized and cached; it is thread-safe upon initialization via the standard .NET pattern shown.
* The `StringResources` class is `internal` and cannot be accessed outside the `CachedItemsList` assembly.
### 4. Dependencies
* **Depends on**: `System`, `System.Windows.Markup`, `System.Globalization`, `System.Resources`.
* **Resource File**: Implicitly depends on a `.resx` file (likely `StringResources.resx`) that generates the `StringResources` class.
### 5. Gotchas
* The `TranslateExtension` swallows missing key errors silently in the UI by returning `#stringnotfound#`. This is useful for debugging but requires UI inspection to catch missing translations.
* The constant `NotFound` is defined locally within `TranslateExtension`. If other modules use a similar pattern, the error string format is duplicated rather than shared.
---

View File

@@ -0,0 +1,41 @@
---
source_files:
- DataPRO/Modules/SensorsList/SoftwareFilters/View/SoftwareFiltersView.xaml.cs
generated_at: "2026-04-17T16:30:36.936983+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "16daae206a28d076"
---
# View
### Purpose
This module provides the WPF view (code-behind) for the Software Filters configuration UI. It implements `ISoftwareFiltersView` and serves as the user interface layer for managing software filter settings on sensors, handling user interactions such as text updates and filter removal, delegating business logic to the associated `SoftwareFiltersViewModel`.
### Public Interface
**`SoftwareFiltersView` (class)**
- `SoftwareFiltersView()` - Constructor that initializes the XAML component.
- `void TextBoxSourceUpdated(object sender, DataTransferEventArgs e)` - Event handler for textbox data binding updates. Validates sender as `TextBox` and its `DataContext` as `ISoftwareFilter`, then calls `viewModel.MarkModified(softwareFilter)`.
- `void GridViewColumnHeaderSearchable_OnSearch(object sender, RoutedEventArgs e)` - Event handler for searchable column header search. **Implementation is commented out.**
- `void GridViewColumnHeader_OnClick(object sender, RoutedEventArgs e)` - Event handler for column header clicks. **Implementation is commented out.**
- `void Remove_Click(object sender, RoutedEventArgs e)` - Event handler for remove button clicks. Validates sender as `Button` and its `DataContext` as `ISoftwareFilter`, then calls `viewModel.Remove(softwareFilter)`.
### Invariants
- The view's `DataContext` must be castable to `SoftwareFiltersViewModel` for event handlers to function.
- Event handlers perform type guards; if sender is not the expected type (`TextBox`, `Button`) or `DataContext` is not `ISoftwareFilter`, the handler returns early without action.
- The class implements `ISoftwareFiltersView` interface.
### Dependencies
**Imports:**
- `System.Windows`
- `System.Windows.Controls`
- `System.Windows.Data`
- `DTS.Common.Interface.Sensors`
- `DTS.Common.Interface.Sensors.SoftwareFilters`
**Inferred Consumers:**
- `SoftwareFiltersViewModel` (referenced via direct cast in event handlers)
### Gotchas
- Two event handlers (`GridViewColumnHeaderSearchable_OnSearch` and `GridViewColumnHeader_OnClick`) have their entire implementations commented out. They are wired in XAML

View File

@@ -0,0 +1,28 @@
---
source_files:
- DataPRO/Modules/SensorsList/SoftwareFilters/ViewModel/SoftwareFiltersViewModel.cs
generated_at: "2026-04-17T16:00:55.752698+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "9d41dd5cf517d0df"
---
# SoftwareFiltersViewModel Documentation
## 1. Purpose
`SoftwareFiltersViewModel` is a Prism-based ViewModel that manages the UI logic for a software filters configuration module. It provides CRUD operations for `ISoftwareFilter` objects, coordinates view binding through `INotifyPropertyChanged`, and integrates with the application's event system for notifications and busy indicator state. The class is designed as a shared singleton (via MEF `CreationPolicy.Shared`) and serves as the data context for `ISoftwareFiltersView`.
---
## 2. Public Interface
### Properties
| Signature | Description |
|-----------|-------------|
| `ISoftwareFiltersView View { get; set; }` | The associated view instance. Set via constructor; DataContext is bound to `this`. |
| `InteractionRequest<Notification> NotificationRequest { get; }` | Interaction request for displaying notification dialogs. |
| `InteractionRequest<Confirmation> ConfirmationRequest { get; }` | Interaction request for displaying confirmation dialogs. |
| `string CurrentUser { get; set; }` | Current user context for filter commit operations. |
| `bool IsDirty { get; }` | Always returns `false`. Intended to track modification state. |