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,63 @@
---
source_files:
- Common/DTS.Common/Attributes/VersionAttribute.cs
- Common/DTS.Common/Attributes/DisplayAttributeEx.cs
- Common/DTS.Common/Attributes/DescriptionAttributeEx.cs
- Common/DTS.Common/Attributes/ProgrammableTriggerAttributes.cs
generated_at: "2026-04-17T16:34:44.808885+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "44630fee2cdfa77b"
---
# Documentation: DTS.Common.Attributes
## 1. Purpose
This module provides a collection of custom .NET attributes used throughout the DTS codebase for metadata annotation. It includes `VersionAttribute` for versioning metadata, `DisplayAttributeEx` and `DescriptionAttributeEx` for localized string lookup via resource files, and `ProgrammableTriggersAttribute` for configuring trigger behavior on enum values. These attributes support reflection-based discovery and are designed to integrate with the system's localization and extensibility infrastructure.
---
## 2. Public Interface
### `VersionAttribute`
**Namespace:** `DTS.Common.Attributes`
**Base:** `System.Attribute`
A simple attribute for attaching version metadata to code elements.
| Member | Signature | Description |
|--------|-----------|-------------|
| Constructor | `VersionAttribute(int version)` | Initializes the attribute with the specified version number. |
| Property | `int Version { get; private set; }` | Gets the version value. Read-only after construction. |
---
### `DisplayAttributeEx`
**Namespace:** `DTS.Common.Attributes`
**Base:** `System.ComponentModel.DisplayNameAttribute`
Provides localized display names via resource lookup. The resource key is constructed as `{propertyId}_DisplayName`.
| Member | Signature | Description |
|--------|-----------|-------------|
| Constructor | `DisplayAttributeEx(string propertyId)` | Initializes with the property identifier used for resource lookup. |
| Property | `string DisplayName { get; }` | Overrides base. Returns the localized string from `StringResources`, or `##DisplayNameNotFound##{propertyId}` if not found. |
**Attribute Usage:** `Class | Enum | Interface | Delegate | Property`
---
### `DescriptionAttributeEx`
**Namespace:** `DTS.Common.Attributes`
**Base:** `System.ComponentModel.DescriptionAttribute`
Provides localized descriptions via resource lookup. The resource key is constructed as `{propertyId}_Description`.
| Member | Signature | Description |
|--------|-----------|-------------|
| Constructor | `DescriptionAttributeEx(string propertyId)` | Initializes with the property identifier used for resource lookup. |
| Property | `string Description { get; }` | Overrides base. Returns the localized string from `StringResources`, or `##DescriptionNotFound##{propertyId}` if not found. |
**Attribute Usage:** `Class | Enum | Interface | Delegate | Property`

View File

@@ -0,0 +1,145 @@
---
source_files:
- Common/DTS.Common/Base/Classes/BaseUserControl.cs
- Common/DTS.Common/Base/Classes/BasePropertyChanged.cs
- Common/DTS.Common/Base/Classes/DisplayResourceAttribute.cs
- Common/DTS.Common/Base/Classes/DescriptionResourceAttribute.cs
- Common/DTS.Common/Base/Classes/DynamicTypeDescriptor.cs
generated_at: "2026-04-17T15:36:38.292547+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "584aa4e7cd1ac4ca"
---
# Documentation: DTS.Common.Base Classes
## 1. Purpose
This module provides foundational infrastructure for the DTS codebase, including:
- **Property change notification base classes** (`BasePropertyChanged`, `BaseUserControl`) that implement the `INotifyPropertyChanged` pattern for data binding scenarios in both UI and non-UI contexts.
- **Localizable attribute classes** (`DisplayResourceAttribute`, `DescriptionResourceAttribute`) that enable runtime resource lookup for property display names and descriptions, supporting internationalization.
- **Dynamic type introspection** (`DynamicTypeDescriptor`) that enables runtime modification of type metadata, allowing dynamic addition/removal of properties and modification of attributes for scenarios like PropertyGrid customization.
---
## 2. Public Interface
### BaseUserControl (abstract class)
**Namespace:** `DTS.Common.Base.Classes`
**Inherits:** `System.Windows.Controls.UserControl`
| Member | Signature | Description |
|--------|-----------|-------------|
| `PropertyChanged` | `event PropertyChangedEventHandler PropertyChanged` | Event raised when a property value changes. |
| `SetProperty<T>` | `protected bool SetProperty<T>(ref T storage, T value, String propertyName = null)` | Sets the field value if different; returns `true` if changed, `false` if values are equal. Raises `PropertyChanged` on change. |
| `OnPropertyChanged` | `protected void OnPropertyChanged(string propertyName = null)` | Raises the `PropertyChanged` event. |
---
### BasePropertyChanged (abstract class)
**Namespace:** `DTS.Common.Base`
**Implements:** `IBasePropertyChanged` (interface definition not provided in source)
| Member | Signature | Description |
|--------|-----------|-------------|
| `PropertyChanged` | `public virtual event PropertyChangedEventHandler PropertyChanged` | Virtual event for property change notification. |
| `SetProperty<T>` | `public bool SetProperty<T>(ref T storage, T value, String propertyName = null)` | Sets the field value if different; returns `true` if changed. Public visibility (unlike `BaseUserControl`). |
| `OnPropertyChanged` | `public virtual void OnPropertyChanged(string propertyName = null)` | Virtual method to raise `PropertyChanged` event. |
---
### DisplayResourceAttribute
**Namespace:** `DTS.Common.Base.Classes`
**Inherits:** `System.ComponentModel.DisplayNameAttribute`
| Member | Signature | Description |
|--------|-----------|-------------|
| Constructor | `public DisplayResourceAttribute(string resourceId)` | Initializes with a resource identifier to look up. |
| `DisplayName` | `public override string DisplayName` | Looks up the localized string via `Strings.Strings.ResourceManager.GetString(_resourceId)`. Returns `"##ResourceNotFound##" + _resourceId` if not found. |
---
### DescriptionResourceAttribute
**Namespace:** `DTS.Common.Base.Classes`
**Inherits:** `System.ComponentModel.DescriptionAttribute`
| Member | Signature | Description |
|--------|-----------|-------------|
| Constructor | `public DescriptionResourceAttribute(string resourceId)` | Initializes with a resource identifier to look up. |
| `Description` | `public override string Description` | Looks up the localized string via `Strings.Strings.ResourceManager.GetString(_resourceId)`. Returns `"##DescriptionNotFound##" + _resourceId` if not found. |
---
### DynamicTypeDescriptor (sealed class)
**Namespace:** `DTS.Common.Base.Classes`
**Implements:** `System.ComponentModel.ICustomTypeDescriptor`, `System.ComponentModel.INotifyPropertyChanged`
#### Constructors
| Signature | Description |
|-----------|-------------|
| `public DynamicTypeDescriptor(Type type)` | Creates a descriptor for the specified type, extracting properties, attributes, editors, and events via `TypeDescriptor`. Throws `ArgumentNullException` if `type` is null. |
#### Properties
| Name | Type | Description |
|------|------|-------------|
| `Component` | `object` | The component instance this descriptor wraps (set via `FromComponent`). |
| `ClassName` | `string` | Optional override for class name. |
| `ComponentName` | `string` | Optional override for component name. |
| `OriginalProperties` | `PropertyDescriptorCollection` | Properties from the original type via `TypeDescriptor.GetProperties(type)`. |
| `Properties` | `PropertyDescriptorCollection` | Modifiable collection of properties (excludes non-browsable by default). |
#### Public Methods
| Signature | Description |
|-----------|-------------|
| `public T GetPropertyValue<T>(string name, T defaultValue)` | Gets a property value by name, returning `defaultValue` if not found or on conversion failure. |
| `public void SetPropertyValue(string name, object value)` | Sets a property value by name. |
| `public PropertyDescriptor AddProperty(Type type, string name, object value, string displayName, string description, string category, bool hasDefaultValue, object defaultValue, bool readOnly)` | Adds a new dynamic property. |
| `public PropertyDescriptor AddProperty(..., Type uiTypeEditor)` | Adds a new dynamic property with a UI type editor. |
| `public void AddProperty(PropertyDescriptor property)` | Adds an existing `PropertyDescriptor` to the `Properties` collection. |
| `public void RemoveProperty(string name)` | Removes all properties matching the given name. |
| `public DynamicTypeDescriptor FromComponent(object component)` | Creates a new `DynamicTypeDescriptor` bound to a specific component instance. Throws if component type is not assignable to `_type`. |
#### Events
| Member | Description |
|--------|-------------|
| `public event PropertyChangedEventHandler PropertyChanged` | Raised when a property value changes via `DynamicProperty.SetValue`. |
---
### DynamicTypeDescriptor.DynamicProperty (sealed class)
**Namespace:** `DTS.Common.Base.Classes.DynamicTypeDescriptor`
**Inherits:** `System.ComponentModel.PropertyDescriptor`
**Implements:** `System.ComponentModel.INotifyPropertyChanged`
#### Properties
| Name | Description |
|------|-------------|
| `Value` | The property value (used when no existing `PropertyDescriptor` is wrapped). |
| `AttributesList` | `IList<Attribute>` - modifiable list of attributes. |
| `IsBrowsable`, `IsReadOnly`, `DisplayName`, `Description`, `Category` | Overridable metadata values. |
#### Methods
| Signature | Description |
|-----------|-------------|
| `public void RemoveAttributesOfType<T>()` | Removes all attributes of type `T` from the property. |
| `public void SetBrowsable(bool browsable)` | Overrides the `IsBrowsable` value. |
| `public void SetIsReadOnly(bool readOnly)` | Overrides the `IsReadOnly` value. |
| `public void SetDisplayName(string displayName)` | Overrides the `DisplayName` value. |
| `public void SetDescription(string description)` | Overrides the `Description` value. |
| `public void SetCategory(string category)` | Overrides the `Category` value. |
| `public void SetEditor(Type editorBaseType, object obj)` | Sets or removes a custom editor for this property. |
---
## 3. Invariants
### BaseUserControl / BasePropertyChanged
- `SetProperty<T>` uses `Equals(storage, value)` for equality comparison; if values are equal, no event is raised and the method returns `false`.
- `propertyName` parameter defaults to `null`; caller is responsible for passing the correct property name (no `CallerMemberName` usage observed).
### DisplayResourceAttribute / DescriptionResourceAttribute
- The `_resourceId` field is stored but never validated for null/empty at construction time.
- Resource lookup is performed on every access to `DisplayName`/`Description` (no caching observed).
- Failure to find a resource results in a fallback string prefixed with `##ResourceNotFound##` or `##DescriptionNotFound##`.
### Dynamic

View File

@@ -0,0 +1,88 @@
---
source_files:
- Common/DTS.Common/Base/Interface/IBaseClass.cs
- Common/DTS.Common/Base/Interface/IViewModel.cs
- Common/DTS.Common/Base/Interface/IBaseView.cs
- Common/DTS.Common/Base/Interface/IBaseWindow.cs
- Common/DTS.Common/Base/Interface/IBaseModel.cs
- Common/DTS.Common/Base/Interface/IBasePropertyChanged.cs
- Common/DTS.Common/Base/Interface/IHeaderInfoProvider.cs
- Common/DTS.Common/Base/Interface/IBaseWindowModel.cs
- Common/DTS.Common/Base/Interface/IBaseViewModel.cs
generated_at: "2026-04-17T16:04:27.061097+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "9843a728bff22f95"
---
# Interface
### Purpose
This module defines the fundamental contracts for the MVVM (Model-View-ViewModel) architecture used within the `DTS.CommonCore` library. It establishes the base interfaces for property change notification, data models, views, and view models, ensuring a consistent approach to data binding and lifecycle management across the system.
### Public Interface
* **`interface IBasePropertyChanged : INotifyPropertyChanged`**
* Extends `INotifyPropertyChanged` to add a manual notification method.
* `void OnPropertyChanged(string propertyName)`: Raises the `PropertyChanged` event for the specified property name.
* **`interface IBaseClass : IBasePropertyChanged`**
* A marker interface for base classes that support property change notification. It defines no additional members.
* **`interface IBaseModel : IBasePropertyChanged`**
* Represents a data model with a persistent state tracking capability.
* `bool IsSaved { get; }`: Gets a value indicating whether the model is saved.
* **`interface IViewModel`**
* Defines a basic view model wrapper around a model object.
* `object Model { get; set; }`: Gets or sets the underlying data model object.
* **`interface IBaseView`**
* Defines a view element capable of data binding.
* `object DataContext { get; set; }`: Gets or sets the data context for the view.
* **`interface IBaseWindow`**
* Defines a window element capable of data binding.
* `object DataContext { get; set; }`: Gets or sets the data context for the window.
* **`interface IHeaderInfoProvider<T>`**
* Provides a mechanism for classes to expose header information for XAML binding.
* `T HeaderInfo { get; }`: Gets the header information.
* **`interface IBaseViewModel : IBasePropertyChanged`**
* Defines the lifecycle and state properties for a standard view model.
* `bool IsMenuIncluded { get; set; }`: Gets or sets whether a menu is included.
* `bool IsNavigationIncluded { get; set; }`: Gets or sets whether navigation is included.
* `bool IsBusy { get; set; }`: Gets or sets the busy state.
* `bool IsDirty { get; }`: Gets whether the view model has unsaved changes.
* `void Activated()`: Called when the view model is activated.
* `void Cleanup()`: Synchronously cleans up resources.
* `Task CleanupAsync()`: Asynchronously cleans up resources.
* `void Initialize()`: Initializes the view model.
* `void Initialize(object parameter)`: Initializes the view model with a parameter.
* `void Initialize(object parameter, object model)`: Initializes the view model with a parameter and a model.
* `Task InitializeAsync()`: Asynchronously initializes the view model.
* `Task InitializeAsync(object parameter)`: Asynchronously initializes the view model with a parameter.
* **`interface IBaseWindowModel : INotifyPropertyChanged`**
* Defines the lifecycle and state properties for a window-level model.
* `bool IsMenuIncluded { get; set; }`
* `bool IsNavigationIncluded { get; set; }`
* `bool IsBusy { get; set; }`
* `bool IsDirty { get; }`
* `void Activated()`
* `void Cleanup()`
* `Task CleanupAsync()`
* `void Initialize()`
* `void Initialize(object parameter)`
* `Task InitializeAsync()`
* `Task InitializeAsync(object parameter)`
### Invariants
* `IBaseView.DataContext` and `IBaseWindow.DataContext` must accept an object that is typically an implementation of `IBaseViewModel` or `IBaseWindowModel`.
* `IBaseViewModel.Initialize` overloads suggest that initialization logic must handle cases with zero, one, or two parameters.
* `IBaseWindowModel` inherits from `INotifyPropertyChanged` directly, whereas `IBaseViewModel` inherits from `IBasePropertyChanged`.
### Dependencies
* **Dependencies:** `System.ComponentModel`, `System.Threading.Tasks`.
* **Dep

View File

@@ -0,0 +1,39 @@
---
source_files:
- Common/DTS.Common/Base/Model/BaseModel.cs
generated_at: "2026-04-17T16:10:18.439141+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "3b859bff5a41827f"
---
# Model
### Purpose
This module provides the abstract `BaseModel<TModel>` class, which serves as a foundational base class for creating model wrapper objects in the DTS system. It establishes a pattern for wrapping domain model objects with additional infrastructure (property change notification and persistence tracking) while maintaining type safety through generics.
### Public Interface
- **`BaseModel<TModel>`** (abstract class)
- Inherits from: `BasePropertyChanged`, implements `IBaseModel`
- Generic constraint: `TModel : class`
- **`TModel Model { get; set; }`** - Gets or sets the wrapped model object.
- **`bool IsSaved { get; }`** - Gets a value indicating whether the model has been saved. Has a private setter; no public method exists to set this to true.
- **`BaseModel()`** - Public parameterless constructor. Creates a new instance of the base class.
### Invariants
- `TModel` must always be a reference type (class constraint).
- `IsSaved` is initialized to `false` (default bool value) and can only be modified within the class itself.
### Dependencies
- **Depends on**: `BasePropertyChanged` (base class providing property change notification), `IBaseModel` (interface contract).
- **Depended on by**: Unknown from this source alone, but designed as a base class for model wrappers throughout the system.
### Gotchas
- The `IsSaved` property has a private setter but no method in this class ever sets it to `true`. Subclasses or external code cannot modify it, suggesting either incomplete implementation or that reflection/serialization is expected to set it.
- The class is abstract but has a public constructor (suppressed ReSharper warning indicates this is intentional, possibly for serialization or reflection scenarios).
---

View File

@@ -0,0 +1,39 @@
---
source_files:
- Common/DTS.Common/Base/View/BaseWindow.cs
- Common/DTS.Common/Base/View/BaseView.cs
generated_at: "2026-04-17T16:07:30.415930+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "e97fdb071f87771a"
---
# View
### Purpose
This module defines base classes for views in a WPF/Prism application. `BaseWindow` and `BaseView` provide common properties (`IsDirty`, `HeaderInfo`) that delegate to their respective DataContext interfaces, enabling consistent dirty-tracking and header display across windows and user controls.
### Public Interface
**BaseWindow** (extends `Window`, implements `IBaseWindow`)
- `public bool IsDirty { get; }` — Returns `true` if `DataContext` implements `IBaseWindowModel` and `baseWindowModel.IsDirty` is `true`; otherwise returns `false`.
- `public string HeaderInfo { get; }` — Returns `iHeaderInfoProvider.HeaderInfo` if `DataContext` implements `IHeaderInfoProvider<string>`; otherwise returns `string.Empty`.
**BaseView** (extends `UserControl`, implements `IBaseView`)
- `public bool IsDirty { get; }` — Returns `true` if `DataContext` implements `IBaseViewModel` and `baseViewModel.IsDirty` is `true`; otherwise returns `false`.
- `public string HeaderInfo { get; }` — Returns `headerInfoProvider.HeaderInfo` if `DataContext` implements `IHeaderInfoProvider<string>`; otherwise returns `string.Empty`.
### Invariants
- Both `IsDirty` and `HeaderInfo` properties are read-only getters with no setters.
- If `DataContext` is `null`, both properties return default values (`false` for `IsDirty`, `string.Empty` for `HeaderInfo`).
- `BaseWindow.IsDirty` checks for `IBaseWindowModel`; `BaseView.IsDirty` checks for `IBaseViewModel` — these are different interfaces.
### Dependencies
- **Depends on**: `System.Windows` (`Window`), `System.Windows.Controls` (`UserControl`), `DTS.Common.Base` (interfaces `IBaseWindow`, `IBaseView`, `IBaseWindowModel`, `IBaseViewModel`, `IHeaderInfoProvider<string>` — inferred from usage).
- **Depended on by**: Unclear from source alone—likely used as base classes for specific views/windows throughout the application.
### Gotchas
- **Interface mismatch**: `BaseWindow.IsDirty` checks for `IBaseWindowModel` while `BaseView.IsDirty` checks for `IBaseViewModel`. If a DataContext implements the wrong interface for the container type, `IsDirty` will incorrectly return `false`.
- **Namespace directive**: Source includes `// ReSharper disable once CheckNamespace` suggesting the file location may not match the declared namespace `DTS.Common.Base`.
---

View File

@@ -0,0 +1,63 @@
---
source_files:
- Common/DTS.Common/Base/ViewModel/ViewModelBase.cs
- Common/DTS.Common/Base/ViewModel/BaseViewModel.cs
generated_at: "2026-04-17T15:41:12.237629+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "4dad13537847aaee"
---
# Documentation: DTS.Common.Base ViewModel Classes
## 1. Purpose
This module provides two abstract base classes for the Model-View-ViewModel (MVVM) pattern within a WPF application. `ViewModelBase<T>` serves as a foundational class for ViewModels that manage their own commands and actions, inheriting from `DependencyObject` to support WPF dependency properties. `BaseViewModel<TModel>` provides a more feature-rich base class with Prism integration, offering built-in support for event aggregation, dependency injection via Unity, interaction requests, and lifecycle management (initialization, activation, cleanup). Both classes implement property change notification and track busy/dirty states for UI binding.
---
## 2. Public Interface
### ViewModelBase<T>
**Type Parameters:** `T` - The type of the Model object.
| Member | Signature | Description |
|--------|-----------|-------------|
| `Model` | `public object Model { get; set; }` | Gets or sets the Model object. Note: This is typed as `object`, not `T`. |
| `IsBusy` | `public bool IsBusy { get; protected set; }` | Indicates whether the object is executing an asynchronous process. |
| `IsDirty` | `public virtual bool IsDirty { get; protected set; }` | Indicates whether the Model has been changed. |
| `ErrorOccurred` | `public virtual event EventHandler<ErrorEventArgs> ErrorOccurred` | Event raised when an error occurs during processing. |
| `PropertyChanged` | `public virtual event PropertyChangedEventHandler PropertyChanged` | Event raised when a property changes. |
**Protected Abstract Methods (must be implemented by derived classes):**
| Method | Signature | Description |
|--------|-----------|-------------|
| `InitializeAsync` | `protected abstract Task<T> InitializeAsync()` | Implement async initialization; the result sets the Model property. |
| `DoRefresh` | `protected abstract void DoRefresh(Func<T> factoryMethod)` | Creates or retrieves a new Model instance via a static factory method. |
| `OnError` | `protected abstract void OnError(Exception error)` | Raises the `ErrorOccurred` event when an error occurs. |
| `OnModelChanged` | `protected abstract void OnModelChanged(T oldValue, T newValue)` | Invoked when the Model changes; allows unhooking/hooking event handlers. |
| `OnPropertyChanged` | `protected abstract void OnPropertyChanged(string propertyName)` | Raises the `PropertyChanged` event. |
---
### BaseViewModel<TModel>
**Type Parameters:** `TModel` - The type of the Model object (must be a reference type: `where TModel : class`).
**Constructors:**
| Constructor | Signature | Description |
|-------------|-----------|-------------|
| Default | `protected BaseViewModel()` | Parameterless constructor. |
| DI Constructor | `protected BaseViewModel(IRegionManager regionManager, IEventAggregator eventAggregator, IUnityContainer unityContainer)` | Initializes aggregator, container, and calls `CreateCommands()`. Note: `regionManager` parameter is unused. |
**Properties:**
| Property | Signature | Description |
|----------|-----------|-------------|
| `Aggregator` | `protected IEventAggregator Aggregator { get; private set; }` | Prism event aggregator for pub/sub messaging. |
| `Container` | `protected IUnityContainer Container { get; private set; }` | Unity DI container. |
| `Model` | `public TModel Model { get; set; }` | The strongly-typed model object. |
| `Confirmation

View File

@@ -0,0 +1,120 @@
---
source_files:
- Common/DTS.Common/Behaviors/StringMetaDataAttr.cs
- Common/DTS.Common/Behaviors/TrimTextBoxBehavior.cs
- Common/DTS.Common/Behaviors/InteractivityTemplate.cs
- Common/DTS.Common/Behaviors/TextBoxPasteBehavior.cs
- Common/DTS.Common/Behaviors/MultiSelectionBehavior.cs
generated_at: "2026-04-17T15:36:03.026612+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "36e847a660d89b00"
---
# DTS.Common.Behaviors Namespace Documentation
## 1. Purpose
This module provides a collection of WPF behaviors and utilities for the DTS application. It includes: `StringMetaDataAttr` for attaching string metadata to enums and objects via reflection; `TrimTextBoxBehavior` for automatically trimming whitespace from TextBox input on focus loss; `InteractivityTemplate` and `InteractivityItems` for attaching behaviors and triggers via data templates (enabling MVVM-friendly dynamic interactivity); `TextBoxPasteBehavior` for intercepting paste operations and routing them through custom ICommand implementations; and `MultiSelectionBehavior` for two-way synchronization between a ListBox's selected items and a bound collection, with special optimizations for bulk operations on specific collection types.
---
## 2. Public Interface
### StringMetaDataAttr
```csharp
public class StringMetaDataAttr : Attribute
{
public string MetaData { get; }
internal StringMetaDataAttr(string attr);
public static string GetStringMetaData(object o);
}
```
- **`MetaData`** property: Read-only string containing the metadata value.
- **`StringMetaDataAttr(string attr)`**: Constructor marked `internal`; cannot be instantiated from outside the assembly.
- **`GetStringMetaData(object o)`**: Static method that retrieves the `MetaData` value from a `StringMetaDataAttr` applied to the member represented by `o`. Returns `null` if the object is null, has no matching member, or lacks the attribute.
---
### TrimTextBoxBehavior
```csharp
public class TrimTextBoxBehavior : Behavior<TextBox>
{
protected override void OnAttached();
protected override void OnDetaching();
}
```
- **`OnAttached()`**: Subscribes to `AssociatedObject.LostFocus`.
- **`OnDetaching()`**: Unsubscribes from `AssociatedObject.LostFocus`.
- Behavior trims whitespace from `AssociatedObject.Text` on focus loss and calls `UpdateSource()` on the `TextBox.TextProperty` binding expression if the text changed.
---
### InteractivityTemplate
```csharp
public class InteractivityTemplate : DataTemplate
{
}
```
- Empty class inheriting from `DataTemplate`. Serves as a marker/template type for interactivity.
### InteractivityItems
```csharp
public class InteractivityItems : FrameworkElement
{
public List<TriggerBase> Triggers { get; }
public List<Behavior> Behaviors { get; }
public static InteractivityTemplate GetTemplate(DependencyObject obj);
public static void SetTemplate(DependencyObject obj, InteractivityTemplate value);
public static readonly DependencyProperty TemplateProperty;
}
```
- **`Triggers`**: Lazily-initialized list of `TriggerBase` objects.
- **`Behaviors`**: Lazily-initialized list of `Behavior` objects.
- **`GetTemplate(DependencyObject obj)`**: Gets the attached `InteractivityTemplate`.
- **`SetTemplate(DependencyObject obj, InteractivityTemplate value)`**: Sets the attached `InteractivityTemplate`.
- **`TemplateProperty`**: Attached property. When changed, loads the template content, casts to `InteractivityItems`, and copies all behaviors and triggers to the target element via `Interaction.GetBehaviors()` and `Interaction.GetTriggers()`.
---
### TextBoxPasteBehavior
```csharp
public class TextBoxPasteBehavior
{
public static readonly DependencyProperty PasteCommandProperty;
public static ICommand GetPasteCommand(DependencyObject target);
public static void SetPasteCommand(DependencyObject target, ICommand value);
}
```
- **`PasteCommandProperty`**: Attached property of type `ICommand`.
- **`GetPasteCommand(DependencyObject target)`**: Returns the attached `ICommand`.
- **`SetPasteCommand(DependencyObject target, ICommand value)`**: Sets the attached `ICommand`. When set, registers or unregisters a handler for `CommandManager.ExecutedEvent` on the target.
- Internal handler `CommandExecuted` checks if the command is `ApplicationCommands.Paste` or a `RoutedUICommand` with name "Paste". If so, retrieves clipboard text via `Clipboard.GetText()`, executes the attached command (passing the TextBox as parameter), and marks the event handled.
---
### MultiSelectionBehavior
```csharp
public class MultiSelectionBehavior : Behavior<ListBox>
{
public IList SelectedItems { get; set; }
public static readonly DependencyProperty SelectedItemsProperty;
protected override void OnAttached();
}
```
- **`SelectedItems`**: Dependency property of type `IList`.

View File

@@ -0,0 +1,29 @@
---
source_files:
- Common/DTS.Common/BusyIndicatorManager/xBusyIndicator.xaml.cs
- Common/DTS.Common/BusyIndicatorManager/BusyIndicatorManager.cs
generated_at: "2026-04-17T16:07:35.693278+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "e6aa8724b93b00bb"
---
# BusyIndicatorManager
### Purpose
This module provides a thread-safe singleton manager for coordinating busy indicator UI state across the application. It supports multiple concurrent busy operations tracked by integer IDs, allowing nested or overlapping operations to display appropriate messages. The manager implements `INotifyPropertyChanged` via Prism's `BindableBase` to support XAML data binding.
### Public Interface
**BusyIndicatorManager : BindableBase (Singleton)**
*Properties:*
- `static BusyIndicatorManager Instance { get; }` — Thread-safe singleton accessor using double-checked locking pattern with `SyncRoot`.
- `bool IsBusy { get; }` — Returns `true` when one or more busy operations are active. Setter is private; managed via `ShowBusy`/`CloseBusy`.
- `string Message { get; }` — Returns the message of the most recently added busy operation. Setter is private; managed via `ShowBusy`/`CloseBusy`.
*Methods:*
- `void ShowBusy(int id, string busyMessage)` — Registers or updates a busy operation with the given `id`. Sets `IsBusy = true` and updates `Message` to `busyMessage`. If the `id` already exists, its message is updated.
- `void CloseBusy(int id)` — Removes the busy operation with the given `id`. If no operations remain, sets `IsBusy = false` and `Message = string.Empty`. If operations remain, keeps `IsBusy = true` and sets `Message` to the last entry's value (via `busyParameters.Last().Value`).
### Invariants

View File

@@ -0,0 +1,249 @@
---
source_files:
- Common/DTS.Common/Classes/UnityExtensions.cs
- Common/DTS.Common/Classes/StatusAndProgressBarEventArgs.cs
- Common/DTS.Common/Classes/Singleton.cs
- Common/DTS.Common/Classes/BulkObservableCollection.cs
- Common/DTS.Common/Classes/RegionNames.cs
- Common/DTS.Common/Classes/ImportData.cs
- Common/DTS.Common/Classes/ServiceCall.cs
- Common/DTS.Common/Classes/TagAwareBase.cs
- Common/DTS.Common/Classes/Utility.cs
- Common/DTS.Common/Classes/Tags.cs
generated_at: "2026-04-17T15:32:30.892965+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "a5c9eb9127824fdd"
---
# DTS.Common.Classes Module Documentation
## 1. Purpose
This module provides core infrastructure components for the DTS application, including dependency injection extensions, UI infrastructure (regions, progress reporting), design patterns (singleton, bulk observable collection), data import structures, service queue management, tag management, and database utility helpers. It serves as a foundational layer used across the application for common operations that don't belong to any specific domain module.
---
## 2. Public Interface
### UnityExtensions (static class)
**Namespace:** `DTS.Common.Interface`
| Method | Signature | Description |
|--------|-----------|-------------|
| `TryResolve<T>` | `public static T TryResolve<T>(this IUnityContainer container) where T : class` | Extension method that attempts to resolve a type from the Unity container. Returns `null` if resolution fails (catches all exceptions), rather than throwing. |
---
### StatusAndProgressBarEventArgs
**Namespace:** `DTS.Common.Classes`
| Property | Type | Description |
|----------|------|-------------|
| `StatusColor` | `Color` | The color to display for the status. |
| `StatusText` | `string` | The text to display in the status area. |
| `ProgressValue` | `double` | The current progress bar value. |
| `ProgressBarVisibility` | `Visibility` | Controls whether the progress bar is visible. |
| `Requester` | `IBaseViewModel` | Reference to the view model requesting the status update. |
| `ErrorText` | `string` | Error text to display, if any. |
---
### Singleton<T>
**Namespace:** `DTS.Common.Classes`
| Member | Signature | Description |
|--------|-----------|-------------|
| `Instance` (static property) | `public static T Instance { get; }` | Returns the singleton instance of type `T`. Throws `InvalidOperationException` if the singleton constructor failed during initialization. |
| Constructor | `protected Singleton()` | Protected constructor that throws `InvalidOperationException` if called when an instance already exists. |
**Generic constraint:** `where T : new()`
---
### BulkObservableCollection<T>
**Namespace:** `DTS.Common.Classes`
**Base class:** `ObservableCollection<T>`
| Method | Signature | Description |
|--------|-----------|-------------|
| `AddRange` | `public void AddRange(IEnumerable<T> items)` | Adds multiple items to the collection and fires a single `Reset` notification. Also raises `PropertyChanged` for `Count`. Logs exceptions to `APILogger.Log`. |
| `RemoveRange` | `public void RemoveRange(IEnumerable<T> itemsToRemove)` | Removes multiple items from the collection and fires a single `Reset` notification. Also raises `PropertyChanged` for `Count`. Logs exceptions to `APILogger.Log`. |
---
### RegionNames (static class)
**Namespace:** `DTS.Common.Classes`
Provides constant string identifiers for UI regions. Key constants include:
- `FrontRegion`, `MainRegion`
- `ViewerEuRegion`, `ViewerMvRegion`, `ViewerEdcRegion`, `ViewerTestsRegion`
- `ViewerGraphRegion`, `ViewerGraphsRegion`, `ViewerGraphMainRegion`, `ViewerGraphListRegion`, `ViewerGraphChannelRegion`
- `ViewerTestModificationRegion`, `ViewerLegendRegion`, `ViewerSearchRegion`, `ViewerSettingsRegion`
- `ViewerDiagRegion`, `ViewerDisplayRegion`, `ViewerChartOptionsRegion`, `ViewerStatsRegion`, `ViewerCursorRegion`, `ViewerFiterRegion` (note: typo in original)
- `MenuRegion`, `NavigationRegion`, `BottomRegion`, `RightRegion`, `TopRegion`
- `VerticalTabRegion`, `HorizontalTabRegion`, `RibbonRegion`
- `PropertyDisplayRegion`, `PropertyModifyRegion`, `PropertyAddRegion`
- `PSDDataSelectRegion`, `PSDGraphRegion`
- `ReportChartOptionsRegion`, `ReportResultsRegion`
---
### ImportPageType (enum)
**Namespace:** `DTS.Common.Classes`
| Value | Description |
|-------|-------------|
| `ImportSensor` | Indicates sensor import. |
| `ImportTestSetup` | Indicates test setup import. |
---
### SensorImportData
**Namespace:** `DTS.Common.Classes`
| Property | Type | Default |
|----------|------|---------|
| `GroupNameSensorListLookup` | `Dictionary<string, List<string>>` | `new Dictionary<string, List<string>>()` |
| `SensorGroupNameLookup` | `Dictionary<string, string>` | `new Dictionary<string, string>()` |
| `SensorGroupTypeLookup` | `Dictionary<string, string>` | `new Dictionary<string, string>()` |
| `GroupNameTestObjectLookup` | `Dictionary<string, string>` | `new Dictionary<string, string>()` |
| `Errors` | `List<string>` | `new List<string>()` |
| `SensorISOCode` | `Dictionary<string, string>` | `new Dictionary<string, string>()` |
| `SensorISOChannelName` | `Dictionary<string, string>` | `new Dictionary<string, string>()` |
| `SensorUserCode` | `Dictionary<string, string>` | `new Dictionary<string, string>()` |
| `SensorUserChannelName` | `Dictionary<string, string>` | `new Dictionary<string, string>()` |
| `SensorDASSerialNumber` | `Dictionary<string, string>` | `new Dictionary<string, string>()` |
| `SensorChannelIndex` | `Dictionary<string, int>` | `new Dictionary<string, int>()` |
---
### TestSetupImportData
**Namespace:** `DTS.Common.Classes`
| Property | Type | Default |
|----------|------|---------|
| `Name` | `string` | — |
| `Description` | `string` | — |
| `SamplesPerSecond` | `double` | — |
| `PosttriggerSeconds` | `double` | — |
| `PretriggerSeconds` | `double` | — |
| `RecordingMode` | `RecordingModes` | — |
| `CalibrationBehavior` | `CalibrationBehaviors` | — |
| `Version` | `int` | — |
| `TestChannelOrders` | `List<string>` | — |
| `Tags` | `List<string>` | — |
| `ClockMasterInput` | `InputClockSource` | `InputClockSource.None` |
| `ClockMasterOutput` | `OutputClockSource` | `OutputClockSource.None` |
| `ManageClocksOutsideOfDataPROMaster` | `bool` | `false` |
| `ManageClocksOutsideOfDataPROSlave` | `bool` | `false` |
| `ClockSlaveInput` | `OutputClockSource` | `OutputClockSource.None` |
| `ClockSlaveOutput` | `OutputClockSource` | `OutputClockSource.None` |
| `SampleRateForDAS` | `Dictionary<string, int>` | `new Dictionary<string, int>()` (readonly) |
| `DomainIdForDAS` | `Dictionary<string, uint>` | `new Dictionary<string, uint>()` (readonly) |
| `IsClockMaster` | `Dictionary<string, bool>` | `new Dictionary<string, bool>()` (readonly) |
---
### ServiceCall
**Namespace:** `DTS.Common.Classes`
| Member | Signature | Description |
|--------|-----------|-------------|
| `Started` | `public bool Started { get; set; }` | Indicates whether the service call has started execution. Default: `false`. |
| `WorkAction` | `public Action WorkAction { get; set; }` | The work delegate to execute. |
| `Name` | `public string Name { get; set; }` | Identifier for the service call. |
| Constructor | `public ServiceCall(string name)` | Creates a new service call with the given name. |
| `MarkDone` | `public void MarkDone()` | Marks the service call as finished, allowing the queue to proceed to the next item. |
---
### ServiceQueue (static class)
**Namespace:** `DTS.Common.Classes`
| Method | Signature | Description |
|--------|-----------|-------------|
| `Enqueue` | `public static void Enqueue(ServiceCall call)` | Adds a service call to the queue. If it's the only item, starts execution immediately via `Task.Run`. |
| `MarkFinished` | `public static void MarkFinished(ServiceCall call)` | Removes a completed call from the queue. If it was the active item, starts the next item. |
---
### TagAwareBase (abstract class)
**Namespace:** `DTS.Common.Classes`
**Base class:** `Base.BasePropertyChanged`
| Member | Signature | Description |
|--------|-----------|-------------|
| `TagType` (abstract) | `public abstract TagTypes TagType { get; }` | The type of taggable object. |
| `TagsBlobBytes` | `public byte[] TagsBlobBytes { get; set; }` | Gets/sets tags as a byte array (serialized int array). |
| `TagIDs` | `public int[] TagIDs { get; set; }` | Array of tag IDs. Never null (defaults to empty array). |
| `SetTagsFromCommaSeparatedString` | `public void SetTagsFromCommaSeparatedString(string tagText, Tags.GetSqlCommandDelegate getSqlCommand)` | Parses comma-separated tags and sets them. |
| `SetTags` (virtual) | `public virtual void SetTags(string[] tagsText, Tags.GetSqlCommandDelegate getSqlCommand)` | Sets tags from string array. |
| `GetTagsAsCommaSeparatedString` | `public string GetTagsAsCommaSeparatedString(Tags.GetSqlCommandDelegate getSqlCommand)` | Returns tags as comma-separated string. |
| `GetTagsArray` (virtual) | `public virtual string[] GetTagsArray(Tags.GetSqlCommandDelegate getSqlCommand)` | Returns tags as string array. |
| `GetTagIDs` (virtual) | `public virtual int[] GetTagIDs()` | Returns the TagIDs array. |
| `RemoveTags` (virtual) | `public virtual void RemoveTags(string[] tagsText)` | Intended to remove tags (implementation is empty/stub). |
| `TagCompatible` | `public bool TagCompatible(string tags, Tags.GetSqlCommandDelegate getSqlCommand)` | Checks if any tag in the comma-separated string matches this object's tags. |
| `TagCompatible` (virtual) | `public virtual bool TagCompatible(int[] tags)` | Returns true if tags array is empty or has intersecting tags. |
| `HasIntersectingTag` (virtual) | `public virtual bool HasIntersectingTag(int[] tags)` | Returns true if any tag ID intersects with this object's tags. |
| `InsertTagsFromCommaSeparatedString` | `public void InsertTagsFromCommaSeparatedString(int id, TagTypes tagType, string tags, Tags.GetSqlCommandDelegate getSqlCommand)` | Sets and commits tags in one operation. |
| `Commit` | `public void Commit(int id, TagTypes tagType, Tags.GetSqlCommandDelegate getSqlCommand)` | Commits tag assignments to database via stored procedures. |
| `GetTagIdList` | `public List<int> GetTagIdList(int objectId, TagTypes tagType, Tags.GetSqlCommandDelegate getSqlCommand)` | Retrieves tag IDs for an object from the database. |
**Nested enum `TagTypes`:** `User`, `Group`, `Template`, `TestSetup`, `Sensors`, `SensorModels`
---
### Tags
**Namespace:** `DTS.Common.Classes`
| Member | Signature | Description |
|--------|-----------|-------------|
| `GetTagsInstance` (static) | `public static Tags GetTagsInstance(GetSqlCommandDelegate getSqlCommand)` | Returns the singleton instance, creating it if necessary. |
| `GetSqlCommandDelegate` (delegate) | `public delegate SqlCommand GetSqlCommandDelegate(bool bNewConnection)` | Delegate for creating SQL commands. |
| `AddTag` (static) | `public static bool AddTag(string tagText, GetSqlCommandDelegate getSqlCommand)` | Adds a tag if not already cached. Returns `false` if already exists or text is empty. |
| `MigrateTag` (static) | `public static bool MigrateTag(string tagText, GetSqlCommandDelegate getSqlCommand)` | Commits a tag during database migration. |
| `AddRange` (static) | `public static bool[] AddRange(string[] tagText, GetSqlCommandDelegate getSqlCommand)` | Adds multiple tags. Trims start of each tag text. |
| `GetIDFromTagText` (static) | `public static int GetIDFromTagText(string tagText, GetSqlCommandDelegate getSqlCommand)` | Gets tag ID from database by text. |
| `GetIDsFromTagText` (static) | `public static int[] GetIDsFromTagText(string[] tagText, GetSqlCommandDelegate getSqlCommand)` | Converts array of tag texts to IDs. Filters out invalid IDs. |
| `GetTagTextFromID` (static) | `public static string GetTagTextFromID(int tagID, GetSqlCommandDelegate getSqlCommand)` | Gets tag text from cached lookup by ID. Returns `null` for invalid IDs. |
| `GetTagTextFromIDs` (static) | `public static string[] GetTagTextFromIDs(int[] tagId, GetSqlCommandDelegate getSqlCommand)` | Converts array of tag IDs to texts. Filters invalid/empty results. |
| `ContainsTag` | `public bool ContainsTag(string text)` | Checks if tag text exists in cached lookup. |
| `UpdateList` | `public void UpdateList(GetSqlCommandDelegate getSqlCommand)` | Refreshes the cached tag dictionary from database. |
**Nested class `Tag`:**
| Member | Description |
|--------|-------------|
| `INVALID_ID` (const) | `-1` |
| `ID` | Tag's database ID. |
| `Text` | Tag's display text. |
| `IsObsolete` | Whether tag is obsolete. |
| Constructor `(string tagText, int tagId)` | Creates a new tag. |
| Constructor `(Tag copy)` | Copy constructor. |
| Constructor `(IDataRecord reader)` | Creates tag from data reader. |
| Constructor `(DataRow dr)` | Creates tag from data row. |
| `Clone()` | Returns a copy of the tag. |
---
### Utility (sealed static class)
**Namespace:** `DTS.Common.Classes`
| Method | Signature | Description |
|--------|-----------|-------------|
| `GetBytesFromStringArray` | `public static byte[] GetBytesFromStringArray(string[] array, string separator)` | Joins array with separator and returns UTF8 bytes. |
| `GetAllErrorMessages` | `public static string GetAllErrorMessages(Exception ex)` | Returns all exception messages including inner exceptions. Returns empty string if `ex` is null. |
| `PingNetwork` | `public static bool PingNetwork(string hostNameOrAddress)` | Pings a host with 4-second timeout. Returns `false` on any exception. |
| `GetUShort` | `public static ushort GetUShort(IDataReader reader, string column, ushort defaultValue = 0)` | Safe reader method for `ushort`. |
| `GetUInt` | `public static uint GetUInt(IDataReader reader, string column, uint defaultValue = 0)` | Safe reader method for `uint`. |
| `GetString` | `public static string GetString(IDataReader reader, string column, string defaultValue = "")` | Safe reader method for `string`. |
| `GetStringArray` | `public static string[] GetStringArray(IDataReader reader, string column, string[] defaultValue, string separator)` | Reads byte array from column, decodes to UTF8, splits by separator. |
| `GetInt` | `public static int GetInt(IDataReader reader, string column, int defaultValue = 0)` | Safe reader method for `int`. |
| `GetDouble` | `public static double GetDouble(IDataReader reader, string column, double defaultValue = 0D)` | Safe reader method for `double`. |
| `GetShort` | `public static short GetShort(IDataReader reader, string column, short defaultValue = 0)` | Safe reader method for `short`. |
| `GetNullableDateTime` | `public static DateTime? GetNullableDateTime(IDataReader reader, string column)` | Returns `null` for DBNull. |
| `GetUlong` | `public static ulong GetUlong(IDataReader reader, string column, ulong defaultValue = 0)` | Safe reader method for `ulong`. |
| `GetNullableInt` | `public static int? GetNullableInt(IDataReader reader, string column)` | Returns `null` for DBNull. |
| `GetByteArray` | `public static byte[] GetByteArray(IDataReader reader, string column)` | Returns empty byte array for DBNull. |
| `GetBool` | `public static bool GetBool(IDataReader reader, string column, bool defaultValue = false)` | Safe reader method for `bool`. |
| `

View File

@@ -0,0 +1,64 @@
---
source_files:
- Common/DTS.Common/Classes/ChannelCodes/TextPastedArgs.cs
- Common/DTS.Common/Classes/ChannelCodes/ChannelCode.cs
generated_at: "2026-04-17T16:07:14.970939+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "fa1361db7a24ac6a"
---
# ChannelCodes
### Purpose
This module provides the core domain model and event handling infrastructure for channel codes, which represent coded identifiers (User or ISO type) used in channel configuration. It includes the `ChannelCode` entity class, a `PasteCommandClass` for handling clipboard paste operations with multi-field parsing, and a delegate type for coercing ISO code values. The module supports data-driven construction from database readers and integrates with the Prism event aggregation system.
### Public Interface
**ChannelCode** (class)
- Inherits from `BasePropertyChanged`, implements `IChannelCode`
- Constructors:
- `ChannelCode(IDataReader reader, IReadOnlyDictionary<short, string> channelTypeLookup)` - Constructs from database reader, mapping `CodeTypeInt` to `ChannelCodeType` via lookup
- `ChannelCode()` - Default constructor, sets `CodeType` to `ISO`
- `ChannelCode(IChannelCode channelCode)` - Copy constructor
- Properties:
- `int Id` - Unique identifier (default: -1)
- `UIItemStatus ItemStatus` - UI state (default: `UIItemStatus.None`)
- `string Code` - The channel code value
- `string Name` - The channel name
- `ChannelEnumsAndConstants.ChannelCodeType CodeType` - Either `User` or `ISO`
- `ICommand PasteCommand` - Command for paste handling (default: null)
- Constants:
- `public const string PASTE_ID = "ChannelCode"`
- Methods:
- `override bool Equals(object obj)` - Equality based on `Code`, `Name`, and `CodeType`
- Destructor: `~ChannelCode()` - Clears `_code` and `_name` to null
**PasteCommandClass** (class)
- Implements `ICommand`
- Constructor: `PasteCommandClass(string id)`
- Properties:
- `string Id { get; }` - Identifier for the command instance
- Methods:
- `bool CanExecute(object parameter)` - Always returns `true`
- `void Execute(object parameter)` - Handles paste from clipboard; parses multi-field text, publishes `TextPastedEvent` or `PageModifiedEvent`
- Events:
- `event EventHandler CanExecuteChanged`
**TextPastedArgs** (class)
- Implements `ITextPastedEventArgs`
- Constructor: `TextPastedArgs(string text, IChannelCode channelCode, string id, object tag)`
- Properties:
- `string Text { get; }` - Pasted text content
- `object Sender { get; }` - The `IChannelCode` source
- `string Id { get; }` - Identifier
- `object Tag { get; }` - Additional context
**CoerceISOCodeDelegate** (delegate)
- Signature: `delegate string CoerceISOCodeDelegate(string val, bool uniqueISOCodesRequired, bool useISOCodeFilterMapping)`
- Purpose: Coerces incoming ISO codes from UI to new values
### Invariants
- `ChannelCode.Id` defaults to -1 when not set
- `ChannelCode.Code` and `ChannelCode.Name` are never null (initialized to `string.Empty`)
- `PasteCommandClass.Execute` only processes paste if `Clipboard.ContainsText()` returns true

View File

@@ -0,0 +1,63 @@
---
source_files:
- Common/DTS.Common/Classes/ClockSync/IClockSyncProfile.cs
- Common/DTS.Common/Classes/ClockSync/ClockSyncProfile.cs
- Common/DTS.Common/Classes/ClockSync/ClockSyncProfileConverter.cs
- Common/DTS.Common/Classes/ClockSync/ClockSyncProfileCollection.cs
generated_at: "2026-04-17T15:37:46.003596+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "3a836b4af12d4326"
---
# ClockSync Profile Module Documentation
## 1. Purpose
This module provides configuration management for clock synchronization profiles within the DTS system. It defines various time synchronization methods (PTP IEEE 1588, IRIG-B, GPS, 1PPS) that can be used to synchronize system clocks. The module implements a singleton-based collection pattern with XML persistence, enabling runtime profile configuration while providing default profiles for standard clock sync scenarios. It is designed to integrate with property grid UI components for configuration interfaces.
---
## 2. Public Interface
### IClockSyncProfile (Interface)
**File:** `IClockSyncProfile.cs`
Defines the contract for clock synchronization profiles.
| Property | Type | Description |
|----------|------|-------------|
| `ProfileId` | `int` | Unique identifier for the profile |
| `ProfileName` | `string` | Display name of the profile |
| `ProfileDesc` | `string` | Description of the profile |
| `DisplayOrder` | `int` | Sort order for UI display |
| `Visible` | `bool` | Whether the profile is visible in UI |
| `FilterRestrictions` | `DASRestriction[]` | Array of restrictions applied to the profile |
---
### ClockSyncProfile (Class)
**File:** `ClockSyncProfile.cs`
Concrete implementation of `IClockSyncProfile`.
**Constructors:**
- `ClockSyncProfile()` — Default parameterless constructor.
- `ClockSyncProfile(int profileId, string profileName, string profileDesc, int displayOrder, bool visible, DASRestriction[] filterRestrictions)` — Initializes with all property values.
- `ClockSyncProfile(ClockSyncProfileCollection.ClockSyncProfileDefaults defaults, DASRestriction[] restrictions)` — Initializes from a defaults enum value; extracts display metadata via reflection.
**Methods:**
- `ToString()` — Override returning `ProfileName`.
---
### ClockSyncProfileConverter (Class)
**File:** `ClockSyncProfileConverter.cs`
Extends `ArrayConverter` for property grid integration.
**Properties:**
- `Values``ClockSyncProfile[]` — Lazily-loaded, filtered, and sorted array of visible profiles. Filters out null and non-visible entries; sorts by `DisplayOrder`.
**Methods:**
- `CanConvertFrom(ITypeDescriptorContext context,

View File

@@ -0,0 +1,13 @@
---
source_files:
- Common/DTS.Common/Classes/Connection/NotConnectedException.cs
generated_at: "2026-04-17T16:09:52.457703+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "027e1a40fa44a795"
---
# Connection
### Purpose
This module provides a custom exception type

View File

@@ -0,0 +1,94 @@
---
source_files:
- Common/DTS.Common/Classes/DASFactory/DiagnosticMessageRow.cs
- Common/DTS.Common/Classes/DASFactory/TCDiagnosticResult.cs
- Common/DTS.Common/Classes/DASFactory/CanDiagnostics.cs
- Common/DTS.Common/Classes/DASFactory/TemperatureConfig.cs
- Common/DTS.Common/Classes/DASFactory/TMSNConfig.cs
generated_at: "2026-04-17T15:36:22.888936+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "cf619de901da9b9c"
---
# DTS.Common.Classes.DASFactory Module Documentation
## 1. Purpose
This module provides data structures and configuration classes for the Data Acquisition System (DAS) factory components. It encapsulates diagnostic results for hardware channels (thermocouple and CAN bus), temperature logging configuration, and TMNS (Telemetry) streaming configuration. The classes serve as data transfer objects and configuration containers that bridge hardware diagnostics with the application layer, implementing property change notification for UI binding scenarios.
---
## 2. Public Interface
### DiagnosticMessageRow
A simple data container class for diagnostic message rows, currently used for CAN BIST (Built-In Self-Test) results.
**Constructor:**
```csharp
public DiagnosticMessageRow(string field, string value, string verdict)
```
**Properties:**
- `string Field { get; set; }` - The field name being diagnosed
- `string Value { get; set; }` - The diagnostic value
- `string Verdict { get; set; }` - The pass/fail verdict
**Methods:**
- `override string ToString()` - Returns formatted string: `"Field: {Field}, Value: {Value}, Verdict: {Verdict}"`
---
### TCDiagnosticResult
Implements `ITCDiagnosticResult` to hold thermocouple channel diagnostic results with property change notification.
**Properties:**
- `string ChannelName { get; set; }` - Name of the channel (default: empty string)
- `int ChannelIndex { get; set; }` - Index of the channel (default: 0)
- `double? CurrentReading { get; set; }` - Nullable current reading value (default: null)
- `DiagnosticStatus Status { get; set; }` - Diagnostic status (default: `DiagnosticStatus.Untested`)
- `ConnectionStatuses ConnectionStatus { get; set; }` - Connection status (default: `ConnectionStatuses.NotTested`)
**Methods:**
- `void Copy(ITCDiagnosticResult source)` - Copies `ChannelName`, `CurrentReading`, `Status`, and `ConnectionStatus` from source. Does **not** copy `ChannelIndex`.
---
### CanDiagnostics
Implements `ICanDiagnosticResult` to hold CAN bus diagnostic information with property change notification.
**Properties:**
- `bool Active { get; set; }` - Whether the CAN channel is active (default: false)
- `int ChannelIndex { get; set; }` - Index of the channel (default: -1)
- `int Data { get; set; }` - Data value (default: 0)
- `int ErrorFrame { get; set; }` - Error frame count (default: 0); setting triggers `OnPropertyChanged("Errors")`
- `double Load { get; set; }` - Bus load value
- `int Overruns { get; set; }` - Overrun count (default: 0); setting triggers `OnPropertyChanged("Errors")`
- `DateTime LastUpdate { get; set; }` - Timestamp of last update (default: `DateTime.MinValue`)
- `int Errors { get; }` - Computed property: returns `1 + Overruns` if `ErrorFrame != 0`, otherwise returns `Overruns`
- `string ChannelName { get; set; }` - Name of the channel (default: empty string)
**Methods:**
- `void Copy(ICanDiagnosticResult source)` - Copies all properties except `Errors` from source
---
### TemperatureConfig
Configuration class for temperature logging channels, using a `BitArray` internally to track enabled channels.
**Constructors:**
```csharp
public TemperatureConfig()
public TemperatureConfig(ushort[] ushortArray)
```
**Properties:**
- `ushort LogEnable { get; set; }` - Logging enable flag
- `ushort LogIntervalSec { get; set; }` - Logging interval in seconds
- `ushort Channels { get; set; }` - Bitmask of enabled channels (backed by internal `BitArray`)
- `const ushort Reserved = 0` - Reserved field constant
- `bool

View File

@@ -0,0 +1,158 @@
---
source_files:
- Common/DTS.Common/Classes/DSP/ScalerAttribute.cs
- Common/DTS.Common/Classes/DSP/DASRestriction.cs
- Common/DTS.Common/Classes/DSP/DSPFilterRestriction.cs
- Common/DTS.Common/Classes/DSP/IStreamingFilterProfile.cs
- Common/DTS.Common/Classes/DSP/StreamingFilterConverter.cs
- Common/DTS.Common/Classes/DSP/DSPFilterConverter.cs
- Common/DTS.Common/Classes/DSP/StreamingFilterProfile.cs
- Common/DTS.Common/Classes/DSP/DSPFilterCollection.cs
- Common/DTS.Common/Classes/DSP/StreamingFilterProfileCollection.cs
- Common/DTS.Common/Classes/DSP/DSPFilterType.cs
generated_at: "2026-04-17T15:32:03.691764+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "dfa8a5b3110baf53"
---
# DSP Module Documentation
## 1. Purpose
This module provides Digital Signal Processing (DSP) filter configuration, management, and type conversion for the DTS system. It defines streaming filter profiles and DSP filter types with hardware-specific restrictions, handles calculation of filter cutoff frequencies based on sample rates, and provides property grid integration through custom type converters. The module persists filter configurations to XML files and supports legacy filter behavior for specific hardware types (SLICE6_AIR, SLICE6_AIR_BR, SLICE6_AIR_TC).
---
## 2. Public Interface
### ScalerAttribute
A custom attribute for storing double values (scalers/ratios) on enum, class, struct, or field members.
```csharp
[AttributeUsage(AttributeTargets.Enum | AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Field, AllowMultiple = false)]
public class ScalerAttribute : Attribute
// Constructor
public ScalerAttribute(double d)
// Property
public double Scaler { get; set; }
```
### DASRestriction
Restricts filter usage based on DAS (Data Acquisition System) hardware type and protocol version.
```csharp
public class DASRestriction
// Constructors
public DASRestriction() // Defaults: DASType = "", ProtocolVersion = -1
public DASRestriction(string dasType, int protocolVersion)
// Properties
public string DASType { get; set; } // Hardware type string (e.g., "SLICE6_AIR"); empty = all DAS
public int ProtocolVersion { get; set; } // Protocol version; <=0 means all versions
```
### DSPFilterRestriction
Identical structure to `DASRestriction`. Used for restricting which DAS can use a specific filter.
```csharp
public class DSPFilterRestriction
// Same constructors and properties as DASRestriction
```
### IStreamingFilterProfile
Interface defining the contract for streaming filter profiles.
```csharp
public interface IStreamingFilterProfile
// Properties
int EnumValue { get; set; } // Byte/enum value for firmware
string DisplayString { get; set; } // Display name
string DescriptionString { get; set; } // Description text
DASRestriction[] Restrictions { get; set; } // DAS usage restrictions
double Ratio { get; set; } // Ratio of SPS to fC (if applicable)
// Method
double GetDSPFilterRate(double sps, string hwType) // Returns fC; NaN if not supported
```
### StreamingFilterProfile
Implementation of `IStreamingFilterProfile` for streaming filter configurations.
```csharp
public class StreamingFilterProfile : IStreamingFilterProfile
// Constructors
public StreamingFilterProfile()
public StreamingFilterProfile(StreamingFilterProfileCollection.DefaultProfiles profile, DASRestriction[] restrictions)
public StreamingFilterProfile(string display, string description, int enumValue, double ratio, DASRestriction[] restrictions)
// Properties (implements IStreamingFilterProfile)
public double Ratio { get; set; }
public string DisplayString { get; set; }
public string DescriptionString { get; set; }
public int EnumValue { get; set; }
public DASRestriction[] Restrictions { get; set; }
// Methods
public override string ToString() // Returns DisplayString
public static void GetProfileValues(StreamingFilterProfileCollection.DefaultProfiles profile, out string displayName, out string description, out int enumValue, out double ratio)
public double GetDSPFilterRate(double sps, string hwType)
```
### DSPFilterType
Implementation of `IStreamingFilterProfile` representing a specific DSP filter type.
```csharp
public class DSPFilterType : IStreamingFilterProfile
// Constructors
public DSPFilterType()
public DSPFilterType(DSPFilterCollection.DSPFilterDefaults filter, DASRestriction[] restrictions)
public DSPFilterType(int enumValue, string displayString, string descriptionString, double ratio, DASRestriction[] restrictions)
// Constants
public const int S6A_CAP = 20480; // SPS threshold for SLICE6_AIR fallback to AAF
// Static Methods
public static Tuple<int, int>[] Get6PButterWorthLegacyTable() // Returns breakpoints/fC table for S6A/BR
public static double GetLegacytDSPFilterRate(double sps, string hwType)
public static void GetProfileValues(DSPFilterCollection.DSPFilterDefaults filter, out string displayName, out string description, out int enumValue, out double ratio)
// Instance Methods
public double GetDSPFilterRate(double sps, string hwType)
public override string ToString()
```
### DSPFilterCollection
Thread-safe singleton collection of `DSPFilterType` objects with XML persistence.
```csharp
public class DSPFilterCollection : Collection<DSPFilterType>
// Static Method
public static DSPFilterCollection GetDSPFilterCollection() // Thread-safe singleton access
// Constants
public const int BUTTERWORTH = 13;
public const int FIR45TAP = 14;
public const int NONE = 0;
// Enum
public enum DSPFilterDefaults
{
[Display(Name ="None", Description = "Default and legacy setting for streaming")]
None = 0,
[Display(Name = "6th IIR Butterworth", Description = "6 - pole IIR Butterworth Low Pass")]
Butterworth = 13,
[Display(Name = "45-Tap FIR", Description = "finite impulse response filter with 45 taps")]
FIR = 14
}
// Instance Method
public DSPFilterType GetFilter(string s) // Returns matching filter,

View File

@@ -0,0 +1,37 @@
---
source_files:
- Common/DTS.Common/Classes/DTS.Viewer/Commands/RelayCommand.cs
generated_at: "2026-04-17T16:40:01.838480+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "24962272b11a45e1"
---
# Commands
## Documentation: `DTS.Common.Classes.Viewer.Commands.RelayCommand`
### 1. Purpose
This module provides an implementation of the `System.Windows.Input.ICommand` interface designed to delegate logic to methods passed as parameters. It exists to support the MVVM (Model-View-ViewModel) pattern within the DTS Viewer application, allowing UI controls (like buttons) to bind to actions defined in ViewModels without requiring the creation of separate concrete command classes for every action.
### 2. Public Interface
**Constructors**
* `public RelayCommand(Action<object> execute)`
* Initializes a new instance of the `RelayCommand` class that can always execute.
* **Parameter:** `execute` — The execution logic delegate.
* **Behavior:** Calls the overloaded constructor with `null` for the `canExecute` predicate.
* `public RelayCommand(Action<object> execute, Predicate<object> canExecute)`
* Initializes a new instance of the `RelayCommand` class.
* **Parameters:**
* `execute` — The execution logic delegate.
* `canExecute` — The execution status logic delegate (optional).
* **Behavior:** Throws an `ArgumentNullException` named "execute" if the `execute` delegate is null. Assigns delegates to internal readonly fields.
**Methods**
* `public bool CanExecute(object parameter)`
* Determines if the command can execute in its current state.
* **Behavior:** Returns `true` if `_canExecute` is `null`. Otherwise, returns the result of invoking `_canExecute(parameter)`

View File

@@ -0,0 +1,61 @@
---
source_files:
- Common/DTS.Common/Classes/DTS.Viewer/Reports/ChannelGRMSSummary.cs
generated_at: "2026-04-17T16:40:09.263539+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "261ab4516c9b0a7b"
---
# Documentation: ChannelGRMSSummary
## 1. Purpose
`ChannelGRMSSummary` is a data model class representing a summary report entry for channel GRMS (likely "G RMS" - Root Mean Square acceleration measured in G-force) data within the DTS Viewer reporting subsystem. It serves as a DTO (Data Transfer Object) that aggregates channel identification, sample rate, and calculated GRMS value, implementing `IChannelGRMSSummary` to conform to a broader system contract. The class also provides property change notification infrastructure, suggesting it may be used in data-binding scenarios (e.g., UI grids or observables).
---
## 2. Public Interface
### Class: `ChannelGRMSSummary`
**Namespace:** `DTS.Common.Classes.Viewer.Reports`
**Implements:** `IChannelGRMSSummary`
#### Properties
| Name | Type | Access | Description |
|------|------|--------|-------------|
| `ChannelName` | `string` | get/set | The name identifier for the channel being summarized. |
| `SampleRate` | `int` | get/set | The sample rate associated with the channel (units unspecified in source). |
| `GRMS` | `double` | get/set | The GRMS (G Root Mean Square) value calculated for the channel. |
#### Events
| Name | Type | Description |
|------|------|-------------|
| `PropertyChanged` | `PropertyChangedEventHandler` | Event raised when a property value changes. Standard `INotifyPropertyChanged` pattern event. |
#### Methods
| Signature | Description |
|-----------|-------------|
| `void OnPropertyChanged(string propertyName)` | Manually raises the `PropertyChanged` event with the specified property name. Invokes the event handler if subscribers exist. |
---
## 3. Invariants
- **Interface Contract:** The class must implement all members defined by `IChannelGRMSSummary` (exact members of the interface are not visible in this source file).
- **No Automatic Notification:** The properties (`ChannelName`, `SampleRate`, `GRMS`) are auto-implemented properties with no setters that call `OnPropertyChanged`. Property change notification must be triggered manually by external callers.
- **Null-Safe Event Invocation:** `OnPropertyChanged` safely handles cases where no subscribers are attached via null-conditional operator (`?.`).
---
## 4. Dependencies
### This module depends on:
- `DTS.Common.Interface` — Provides the `IChannelGRMSSummary` interface contract.
- `System.ComponentModel` — Provides `PropertyChangedEventHandler` and `PropertyChangedEventArgs` for property change notification.
### What depends on this module:
- **Unknown from source alone.** Consumers would be any code requiring `IChannelGRMSSummary` or `ChannelGRMSSum

View File

@@ -0,0 +1,191 @@
---
source_files:
- Common/DTS.Common/Classes/DTS.Viewer/TestMetadata/TestMetadata.cs
- Common/DTS.Common/Classes/DTS.Viewer/TestMetadata/TestGraphs.cs
- Common/DTS.Common/Classes/DTS.Viewer/TestMetadata/TestSetupMetadata.cs
- Common/DTS.Common/Classes/DTS.Viewer/TestMetadata/TestRunMetadata.cs
- Common/DTS.Common/Classes/DTS.Viewer/TestMetadata/TestSummary.cs
- Common/DTS.Common/Classes/DTS.Viewer/TestMetadata/TestModule.cs
- Common/DTS.Common/Classes/DTS.Viewer/TestMetadata/TestChannel.cs
- Common/DTS.Common/Classes/DTS.Viewer/TestMetadata/TestMetadataList.cs
generated_at: "2026-04-17T15:35:18.985744+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "6e14a81754a7f26b"
---
# TestMetadata Module Documentation
## 1. Purpose
This module provides the data model layer for test metadata in the DTS (Data Test System) application. It defines entity classes representing the hierarchical structure of test data: `TestMetadata` contains `TestRunMetadata` and `TestSetupMetadata`; `TestRunMetadata` contains `TestModule` instances; and each module contains `TestChannel` instances. The `TestMetadataList` class serves as a factory/parser that deserializes XML documents (`.dts` files) into these object graphs. These classes implement `INotifyPropertyChanged` and integrate with Prism commands to support MVVM data binding in the viewer application.
---
## 2. Public Interface
### TestMetadata
Implements `ITestMetadata`. A container class aggregating run and setup metadata.
| Member | Signature | Description |
|--------|-----------|-------------|
| `TestRun` | `ITestRunMetadata { get; set; }` | Contains test run information (channels, modules, file paths). |
| `TestSetup` | `ITestSetupMetadata { get; set; }` | Contains test setup configuration (graphs, calibration behavior). |
### TestGraphs
Implements `ITestGraphs`. Represents a graph configuration with associated channels.
| Member | Signature | Description |
|--------|-----------|-------------|
| `Name` | `string { get; set; }` | Graph name. |
| `HardwareChannelName` | `string { get; set; }` | Hardware channel identifier. |
| `ChannelIds` | `List<string> { get; set; }` | List of channel IDs belonging to this graph. |
| `Channels` | `List<ITestChannel> { get; set; }` | Resolved channel objects. |
### TestSetupMetadata
Implements `ITestSetupMetadata`. Contains test setup configuration.
| Member | Signature | Description |
|--------|-----------|-------------|
| `SetupName` | `string { get; set; }` | Name of the test setup. |
| `TimeStamp` | `DateTime { get; set; }` | Setup creation/modified timestamp. |
| `TestGraphs` | `List<ITestGraphs> { get; set; }` | Graph configurations for this setup. |
| `CalibrationBehavior` | `CalibrationBehaviors { get; set; }` | Calibration mode (enum from `DTS.Common.Enums.Sensors`). |
### TestRunMetadata
Implements `ITestRunMetadata`. Contains test run information with property change notification.
| Member | Signature | Description |
|--------|-----------|-------------|
| `Name` | `string { get; set; }` | Test name (ID from DTS file). |
| `Id` | `string { get; set; }` | File name without extension. |
| `Description` | `string { get; set; }` | Test description. |
| `InlineSerializedData` | `bool { get; set; }` | Whether data is inline serialized. |
| `TestGuid` | `string { get; set; }` | Unique test identifier. |
| `FaultFlags` | `int { get; set; }` | Fault status flags. |
| `Software` | `string { get; set; }` | Software name used for test. |
| `SoftwareVersion` | `string { get; set; }` | Software version. |
| `DataType` | `string { get; set; }` | Data type identifier. |
| `FileDate` | `DateTime { get; set; }` | File creation date. |
| `FilePath` | `string { get; set; }` | Full file path. |
| `Modules` | `List<ITestModule> { get; set; }` | List of test modules. |
| `Channels` | `List<ITestChannel> { get; set; }` | All channels across modules. |
| `CalculatedChannels` | `List<ITestChannel> { get; set; }` | Calculated/virtual channels. |
| `IsSelected` | `bool { get; set; }` | Selection state for UI. |
| `PropertyChanged` | `event PropertyChangedEventHandler` | Property change notification event. |
| `OnPropertyChanged` | `void OnPropertyChanged([CallerMemberName] string propertyName = null)` | Raises PropertyChanged event. |
### TestSummary
Implements `ITestSummary`. A flattened view of test metadata for list display with selection commands.
| Member | Signature | Description |
|--------|-----------|-------------|
| `ROI_SUFFIX` | `const string = @"_ROI Period"` | Suffix for ROI Period folder names (per bug 18411). |
| `Id` | `string { get; set; }` | Composite ID (TestRun.Id + event number). |
| `SetupName` | `string { get; set; }` | Name from test setup. |
| `Description` | `string { get; set; }` | Test description. |
| `ChannelCount` | `int { get; set; }` | Number of channels. |
| `FileDate` | `DateTime { get; set; }` | File date. |
| `TimeStamp` | `DateTime { get; set; }` | Calculated timestamp (from modules or setup). |
| `DataType` | `string { get; set; }` | Data type. |
| `IsSelected` | `bool { get; set; }` | Selection state; setter triggers `SelectionChanged()`. |
| `Graphs` | `List<ITestGraphs> { get; set; }` | Graph configurations. |
| `Channels` | `List<ITestChannel> { get; set; }` | Channel list. |
| `CalculatedChannels` | `List<ITestChannel> { get; set; }` | Calculated channels. |
| `Parent` | `IBaseViewModel { get; set; }` | Parent view model (expected to be `ITestSummaryListViewModel`). |
| `CalibrationBehavior` | `CalibrationBehaviors { get; set; }` | Defaults to `NonLinearIfAvailable`. |
| `TestMetadata` | `ITestMetadata { get; set; }` | Full metadata reference. |
| `IsSelectedCommand` | `DelegateCommand { get; set; }` | Prism command wrapping `SelectionChanged()`. |
| `SelectionChanged` | `void SelectionChanged()` | Updates parent's `SelectedTestSummaryList` and publishes event. |
| `OnPropertyChanged` | `void OnPropertyChanged(string propertyName)` | Raises PropertyChanged event. |
### TestModule
Implements `ITestModule`. Hardware module information with recording parameters.
| Member | Signature | Description |
|--------|-----------|-------------|
| `SerialNumber` | `string { get; set; }` | Module serial number. |
| `BaseSerialNumber` | `string { get; set; }` | Base serial number. |
| `AaFilterRateHz` | `int { get; set; }` | Anti-aliasing filter rate. |
| `Number` | `int { get; set; }` | Module number. |
| `NumberOfSamples` | `int { get; set; }` | Total samples recorded. |
| `UnsubsampledNumberOfSamples` | `int { get; set; }` | Samples before subsampling. |
| `RequestedPostTriggerSeconds` / `PostTriggerSeconds` | `double { get; set; }` | Post-trigger duration. |
| `RequestedPreTriggerSeconds` / `PreTriggerSeconds` | `double { get; set; }` | Pre-trigger duration. |
| `RecordingMode` | `string { get; set; }` | Recording mode identifier. |
| `SampleRateHz` | `int { get; set; }` | Sample rate in Hz. |
| `StartRecordSampleNumber` | `int { get; set; }` | Starting sample number. |
| `NumberOfChannels` | `int { get; set; }` | Channel count on module. |
| `InlineSerializedData` | `bool { get; set; }` | Inline serialization flag. |
| `StartRecordTimestampSec` / `StartRecordTimestampNanoSec` | `int { get; set; }` | PTP start record timestamp. |
| `TriggerTimestampSec` / `TriggerTimestampNanoSec` | `int { get; set; }` | PTP trigger timestamp. |
| `TriggerSampleNumbers` | `List<ulong> { get; set; }` | Trigger sample indices. |
| `PTPMasterSync` | `bool { get; set; }` | PTP master sync status. |
| `TiltSensorAxis*DegreesPre/Post` | `int { get; set; }` | Tilt sensor readings (X/Y/Z, pre/post). |
| `TemperatureLocation*Pre/Post` | `int { get; set; }` | Temperature readings (4 locations, pre/post). |
| `Channels` | `List<ITestChannel> { get; set; }` | Channel list. |
| `CalculatedChannels` | `List<ITestChannel> { get; set; }` | Calculated channels. |
| `IsSelected` | `bool { get; set; }` | Selection state. |
| `OnPropertyChanged` | `void OnPropertyChanged([CallerMemberName] string propertyName = null)` | Raises PropertyChanged. |
### TestChannel
Implements `ITestChannel`. Extensive channel metadata with statistics and UI state. Marked `[Serializable]`. Inherits from `BasePropertyChanged`.
**Key Properties:**
| Category | Members |
|----------|---------|
| **Identification** | `ChannelId`, `ChannelDisplayName`, `ChannelName2`, `ChannelDescriptionString`, `HardwareChannelName`, `SerialNumber`, `ModuleSerialNumber`, `SensorId`, `TestId`, `TestSetupName` |
| **Configuration** | `ChannelType`, `Number`, `Group`, `SubGroup`, `ChannelGroupName`, `Description`, `Bridge`, `BridgeResistanceOhms`, `Sensitivity`, `SensitivityUnits`, `DesiredRange`, `ExcitationVoltage`, `Eu` |
| **Calibration** | `ZeroPoint`, `ZeroMethod`, `ZeroAverageWindowBegin/End`, `RemoveOffset`, `CalSignalEnabled`, `ShuntEnabled`, `VoltageInsertionCheckEnabled`, `LastCalibrationDate`, `LinearizationFormula`, `MeasuredShuntDeflectionMv`, `TargetShuntDeflectionMv`, `MeasuredExcitationVoltage`, `FactoryExcitationVoltage` |
| **Digital Processing** | `DigitalMultiplier`, `DigitalMode`, `SoftwareFilter`, `IsInverted`, `ProportionalToExcitation`, `IsSubsampled`, `Multiplier`, `UnitConversion`, `UserOffsetEu`, `UseEUScaler`, `ScaleFactorEU` |
| **Range** | `ActualMaxRangeEu`, `ActualMinRangeEu`, `ActualMaxRangeAdc` (returns `short.MaxValue`), `ActualMinRangeAdc` (returns `short.MinValue`), `ActualMaxRangeMv`, `ActualMinRangeMv` |
| **Statistics (ADC)** | `MinADC`, `MaxADC`, `AveADC`, `StdDevADC`, `T0ADC` |
| **Statistics (mV)** | `MinMV`, `MaxMV`, `AveMV`, `StdDevMV`, `T0MV` |
| **Statistics (EU)** | `MinEU`, `MaxEU`, `AveEU`, `StdDevEU`, `T0EU` |
| **Statistics (Current Units)** | `MinY`, `MaxY`, `AveY`, `StdDevY`, `T0Value` |
| **HIC Calculation** | `HIC`, `T1Sample`, `T2Sample` |
| **File Info** | `BinaryFileName`, `BinaryFilePath`, `Start`, `TimeOfFirstSample`, `SampleRateHz`, `UnsubsampledSampleRateHz` |
| **Calculated Channel** | `IsCalculatedChannel`, `SourceChannelNumber`, `SourceModuleNumber`, `SourceModuleSerialNumber`, `Calculation`, `SensorCapacity`, `SensorPolarity`, `AtCapacity`, `CapacityOutputIsBasedOn` |
| **ISO/User Codes** | `IsoCode`, `IsoChannelName`, `UserCode`, `UserChannelName` |
| **EID** | `SetupEID`, `DataCollectionEID` |
| **UI State** | `IsSelected`, `IsLocked`, `IsGraphChannel`, `IsExpanded`, `CanLock`, `CanSelectChannel`, `ChannelColor`, `GraphName`, `AbsoluteDisplayOrder` |
| **Error State** | `IsError`, `ErrorMessage`, `ErrorColor` |
| **Parent References** | `Parent`, `ParentModule`, `ParentTestSetup` |
**Methods:**
| Member | Signature | Description |
|--------|-----------|-------------|
| `Copy` | `ITestChannel Copy()` | Returns shallow copy via `MemberwiseClone()`. |
| `ToString` | `override string ToString()` | Returns `ChannelName2` if test-specific embedded, otherwise `ChannelDescriptionString`. |
| `SetChannelDescriptionAndDisplayName` | `void SetChannelDescriptionAndDisplayName(string channelDescription)` | Sets `ChannelDescriptionString` and builds `ChannelDisplayName`. |
### TestMetadataList
Factory class for parsing XML into metadata objects.
| Member | Signature | Description |
|--------|-----------|-------------|
| `GetTestSummaryListAsync` | `Task<ObservableCollection<ITestSummary>> GetTestSummaryListAsync(IBaseViewModel parent, string path, string file, string pattern = "")` | Async wrapper (not truly async - warning suppressed). |
| `GetTestSummaryList` | `ObservableCollection<ITestSummary> GetTestSummaryList(IBaseViewModel parent, string path, string file = "", string pattern = "")` | Parses XML and returns summary list with parent reference. |
| `GetTestSummaryList` | `ObservableCollection<ITestSummary> GetTestSummaryList(string path, string file = "", string pattern = "")` | Overload without parent reference. |
| `GetTestMetadataList` | `List<ITestMetadata> GetTestMetadataList(XDocument xDoc, string path, string file)` | Parses XDocument into `ITestMetadata` list. |
---
## 3. Invariants
- **Timestamp Fallback**: `GetTimestamp()` uses module PTP timestamps if valid (post-1990); otherwise falls back to `TestSetup.TimeStamp`.
- **Channel Array Pre-allocation**: `GetTestMetadataList()` pre-allocates the `Channels` list size based on sum of `NumberOfChannels` across all modules.
- **Sort Order**: `BuildITestSummary()` always returns summaries ordered by `TimeStamp.Ticks` descending.
- **Default Calibration Behavior**: `TestSummary.CalibrationBehavior` and `TestSetupMetadata.CalibrationBehavior` default to `CalibrationBehaviors.NonLinearIfAvailable`.
- **ADC Range Constants**: `TestChannel.ActualMaxRangeAdc` always returns `short.MaxValue` (32767); `ActualMinRangeAdc` always returns `short.MinValue` (-32768).
- **ChannelId Fallback**: When parsing channels, if `ChannelId` is missing or -1, `GetHashCode().ToString()` is used as fallback.
- **Calculated Channel Fields Wiped**: For calculated channels, `SerialNumber`, `HardwareChannelName`, `IsoCode`, `IsoChannelName`, `UserCode`, `UserChannelName` are set to `Strings.Strings.Table_NA`.
---
## 4. Dependencies
### This module depends on:
- `DTS.Common.Interface` -

View File

@@ -0,0 +1,32 @@
---
source_files:
- Common/DTS.Common/Classes/GroupTemplates/Constants.cs
generated_at: "2026-04-17T16:27:17.171715+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "223c0fb36cdc3eef"
---
# GroupTemplates
### Purpose
The `Constants` class defines string constants used to identify non-ISO test object types and names within the group templates system. These constants serve as markers or placeholders for test objects that do not conform to the standard ISO code structure.
### Public Interface
**Constants:**
- `const string NON_ISO_TESTOBJECT_CHANNEL_TYPE = "x_NonISOTestObjectType_x"` — Identifier for non-ISO test object channel type.
- `const string NON_ISO_TESTOBJECT_NAME = "x_NonISOTestObjectName_x"` — Identifier for non-ISO test object name.
- `const string NON_ISO_TESTOBJECT_CHANNEL_TYPE2 = "NONISO_x_"` — Alternative prefix for non-ISO test object channel type.
### Invariants
- All constants are compile-time literals and cannot be modified at runtime.
### Dependencies
- **Depends on:** None.
- **Depended on by:** Not determinable from source alone.
### Gotchas
None identified from source alone.
---

View File

@@ -0,0 +1,231 @@
---
source_files:
- Common/DTS.Common/Classes/Groups/GroupGRPImportError.cs
- Common/DTS.Common/Classes/Groups/GroupGRPImportGroup.cs
- Common/DTS.Common/Classes/Groups/GroupHardwareDbRecord.cs
- Common/DTS.Common/Classes/Groups/TestSetupGroupRecord.cs
- Common/DTS.Common/Classes/Groups/GroupDbRecord.cs
- Common/DTS.Common/Classes/Groups/GroupGRPImportChannel.cs
- Common/DTS.Common/Classes/Groups/ChannelDbRecord.cs
- Common/DTS.Common/Classes/Groups/GroupHelper.cs
generated_at: "2026-04-17T15:32:48.649594+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "656ed2feb99179fd"
---
# Documentation: DTS.Common.Classes.Groups
## 1. Purpose
This module provides the core data structures for managing groups and channels within a data acquisition system (DAS). It handles three primary concerns: (1) importing GRP files with comprehensive error tracking via `GroupGRPImportError`, `GroupGRPImportGroup`, and `GroupGRPImportChannel`; (2) representing database records for groups, channels, hardware associations, and test setup relationships through `GroupDbRecord`, `ChannelDbRecord`, `GroupHardwareDbRecord`, and `TestSetupGroupRecord`; and (3) providing static caching and lookup utilities via `GroupHelper` for mapping between IDs, serial numbers, and hardware configurations across the system.
---
## 2. Public Interface
### GroupGRPImportError
Encapsulates errors encountered during GRP file import.
```csharp
public class GroupGRPImportError
{
public enum Errors
{
FileEmpty,
InvalidISOCodeInput,
InvalidFullScaleInput,
InvalidSensorInput,
InvalidInvertInput,
SensorNotFound,
InvalidInputMode,
InvalidDefaultValue,
InvalidActiveValue,
InvalidFireMode,
InvalidDelay,
InvalidLimitDuration,
InvalidDuration,
InvalidCurrent
}
public Errors ErrorCode { get; set; }
public string File { get; set; }
public int Line { get; set; }
public string ExtraInfo { get; set; }
public override string ToString() // Returns ExtraInfo
}
```
### GroupGRPImportGroup
Represents a group parsed from a GRP file, extending `BasePropertyChanged`.
```csharp
public class GroupGRPImportGroup : BasePropertyChanged
{
public bool Included { get; set; } = true;
public bool Overwrite { get; set; } = true;
public string GroupName { get; set; }
public string GroupTags { get; set; }
public string ImportingUserTags { get; set; }
public string SourceFile { get; set; }
public GroupGRPImportChannel[] Channels { get; set; } = { };
public GroupGRPImportError[] GroupErrors { get; set; } = null;
public bool GroupNameHasError { get; set; } // Notifies property change
}
```
### GroupGRPImportChannel
Represents a single channel/row in a TDC GRP file, extending `BasePropertyChanged`.
```csharp
public class GroupGRPImportChannel : BasePropertyChanged
{
// Field position constants
public const uint SerialNumberField = 0;
public const uint DisplayNameField = 1;
public const uint ISOCodeField = 2;
public const uint InvertField = 3;
public const uint CapacityField = 4;
public const uint InputModeField = 5;
public const uint DefaultValueField = 6;
public const uint ActiveValueField = 7;
public const uint FireModeField = 8;
public const uint DelayField = 9;
public const uint LimitDurationField = 10;
public const uint DurationField = 11;
public const uint CurrentField = 12;
public enum InputModes { na, TLH, THL, CCNO, CCNC }
public enum FireModes { na, CD, CC }
// Default value constants
public const InputModes DefaultInputMode = InputModes.CCNO;
public const double DefaultDefaultValue = 0.0;
public const double DefaultActiveValue = 1.0;
public const FireModes DefaultFireMode = FireModes.CD;
public const double DefaultDelay = 0.00;
public const bool DefaultLimitDuration = true;
public const double DefaultDuration = 10.0;
public const double DefaultCurrent = 1.5;
// Properties
public string SensorSerialNumber { get; set; }
public string DisplayName { get; set; }
public string ISOCode { get; set; }
public bool Invert { get; set; }
public double FullScale { get; set; }
public InputModes? InputMode { get; set; } = null;
public double? DefaultValue { get; set; } = null;
public double? ActiveValue { get; set; } = null;
public FireModes? FireMode { get; set; } = null;
public double? Delay { get; set; } = null;
public bool? LimitDuration { get; set; } = null;
public double? Duration { get; set; } = null;
public double? Current { get; set; } = null;
public GroupGRPImportError Error { get; set; } = null;
public GroupGRPImportGroup ParentGroup { get; set; }
public string GroupName { get; } // Returns "---" if ParentGroup is null
public void GroupNameInvalidate() // Raises PropertyChanged for GroupName
}
```
### GroupDbRecord
Database record for a group, implementing `IGroupDbRecord`, extending `BasePropertyChanged`.
```csharp
public class GroupDbRecord : BasePropertyChanged, IGroupDbRecord
{
[Key]
public int Id { get; set; } // Default -1
public string SerialNumber { get; set; }
public string Picture { get; set; }
public string DisplayName { get; set; }
public string Description { get; set; }
public bool Embedded { get; set; }
public DateTime LastModified { get; set; }
public string LastModifiedBy { get; set; }
public int? StaticGroupId { get; set; }
public string ExtraProperties { get; set; }
public GroupDbRecord()
public GroupDbRecord(IGroupDbRecord copy)
public GroupDbRecord(IGroup copy, List<KeyValuePair<string, string>> extraProperties)
public GroupDbRecord(IDataReader reader)
}
```
### ChannelDbRecord
Database record for a channel, implementing `IChannelDbRecord`, extending `BasePropertyChanged`.
```csharp
public class ChannelDbRecord : BasePropertyChanged, IChannelDbRecord
{
[Key]
public long Id { get; set; } // Default -1
public int GroupId { get; set; } // Default -1
public string IsoCode { get; set; }
public string IsoChannelName { get; set; }
public string UserCode { get; set; }
public string UserChannelName { get; set; }
public int DASId { get; set; } // Default -1
public int DASChannelIndex { get; set; } // Default -1
public int GroupChannelOrder { get; set; } // Default -1
public int TestSetupOrder { get; set; } // Default -1
public int SensorId { get; set; } // Default -1
public bool IsDisabled { get; set; } // Redirects to Disabled, raises PropertyChanged for "IsDisabled"
public bool Disabled { get; set; }
public DateTime LastModified { get; set; }
public string LastModifiedBy { get; set; }
public ChannelDbRecord()
public ChannelDbRecord(IChannelDbRecord copy)
public ChannelDbRecord(IDataReader reader)
}
```
### GroupHardwareDbRecord
Database record for group hardware associations, implementing `IGroupHardwareDbRecord`.
```csharp
public class GroupHardwareDbRecord : BasePropertyChanged, IGroupHardwareDbRecord
{
[Key]
public int Id { get; set; } // Default -1
public int GroupId { get; set; } // Default -1
public int DASId { get; set; } // Default -1
public string SerialNumber { get; set; }
public GroupHardwareDbRecord()
public GroupHardwareDbRecord(IGroupHardwareDbRecord copy)
public GroupHardwareDbRecord(IDataReader reader)
}
```
### TestSetupGroupRecord
Association between groups and test setups, implementing `ITestSetupGroupRecord`.
```csharp
public class TestSetupGroupRecord : BasePropertyChanged, ITestSetupGroupRecord
{
public int GroupId { get; set; } // Default -1
public int DisplayOrder { get; set; } // Default -1
public string Position { get; set; } // ISO 13499 position field
public string TestObjectType { get; set; } // ISO 13499 test object field
public int TestSetupId { get; set; } // Default -1
public TestSetupGroupRecord()
public TestSetupGroupRecord(IDataReader reader)
public TestSetupGroupRecord(ITestSetupGroupRecord copy)
}
```
### GroupHelper
Abstract class providing static caching and lookup methods.
```csharp
public abstract class GroupHelper
{
// StaticGroupNames
public static void ClearStaticGroupNames()
public static void SetStaticGroupName(int id, string name)

View File

@@ -0,0 +1,49 @@
---
source_files:
- Common/DTS.Common/Classes/Groups/ChannelSettings/ChannelSettingRecord.cs
- Common/DTS.Common/Classes/Groups/ChannelSettings/GroupChannelSettingRecord.cs
- Common/DTS.Common/Classes/Groups/ChannelSettings/ChannelSettingBase.cs
generated_at: "2026-04-17T15:40:13.354076+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "8d2215e3e5ca4a40"
---
# Channel Settings Module Documentation
## 1. Purpose
This module provides data structures for managing channel configuration settings within the DTS system. It defines three core classes: `ChannelSettingRecord` for storing setting definitions (ID, name, default value), `GroupChannelSettingRecord` for associating settings with specific channels, and `ChannelSettingBase` which serves as a concrete implementation of `IChannelSetting` with type conversion utilities and standardized setting name constants. The module supports both programmatic construction and hydration from database readers.
---
## 2. Public Interface
### ChannelSettingRecord
**Namespace:** `DTS.Common.Classes.Groups.ChannelSettings`
**Implements:** `IChannelSettingRecord`
**Inherits:** `Common.Base.BasePropertyChanged`
| Member | Signature | Description |
|--------|-----------|-------------|
| `Id` | `int` property (get/set) | Numeric identifier for the setting record. Notifies property change via `SetProperty`. |
| `SettingName` | `string` property (get/set) | Name identifier for the setting. Notifies property change. |
| `DefaultValue` | `string` property (get/set) | Default value for the setting. Notifies property change. |
| Constructor | `ChannelSettingRecord()` | Default parameterless constructor. |
| Constructor | `ChannelSettingRecord(IDataReader reader)` | Hydrates instance from database reader using `Utility.GetInt` and `Utility.GetString`. Reads columns: "Id", "SettingName", "DefaultValue". |
---
### GroupChannelSettingRecord
**Namespace:** `DTS.Common.Classes.Groups.ChannelSettings`
**Implements:** `IGroupChannelSettingRecord`
**Inherits:** `BasePropertyChanged`
| Member | Signature | Description |
|--------|-----------|-------------|
| `ChannelId` | `long` property (get/set) | Channel identifier. Notifies property change. |
| `SettingId` | `int` property (get/set) | Setting identifier. Notifies property change. |
| `SettingValue` | `string` property (get/set) | The value for this channel-setting pair. Notifies property change. |
| Constructor | `GroupChannelSettingRecord()` | Default parameterless constructor. |
| Constructor | `GroupChannelSettingRecord(IDataReader reader, int storedProcedureVersionUsed)` | Hydrates from database reader. Conditionally reads `ChannelId` only if `storedProcedureVersionUsed >= Constants.BULK_GROUPCHANNELSETTINGS_GET_DB_VERSION`. Always reads "SettingId" and "SettingValue". |
| Constructor | `GroupChannelSettingRecord(long channelId, int settingId, string settingValue)` | Direct

View File

@@ -0,0 +1,173 @@
---
source_files:
- Common/DTS.Common/Classes/Hardware/ExternalTilt.cs
- Common/DTS.Common/Classes/Hardware/DragAndDropPayload.cs
- Common/DTS.Common/Classes/Hardware/SerializableAAF.cs
- Common/DTS.Common/Classes/Hardware/DASDBRecord.cs
- Common/DTS.Common/Classes/Hardware/DASChannelDBRecord.cs
- Common/DTS.Common/Classes/Hardware/DASMonitorInfo.cs
generated_at: "2026-04-17T15:35:23.326019+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "4e304d35fc9dc2de"
---
# DTS.Common.Classes.Hardware Documentation
## Purpose
This module provides data structures and persistence logic for hardware-related entities within the DTS (Data Acquisition System) domain. It contains database record mappings for DAS units and their channels, monitor configuration state for tilt sensors and channel metadata, and utility classes for hardware identification and drag-and-drop operations. The module serves as the data layer abstraction between the hardware abstraction layer and the database/serialization infrastructure.
---
## Public Interface
### ExternalTilt
A simple POCO (Plain Old CLR Object) representing an external tilt sensor device.
**Properties:**
- `string SerialNumber { get; set; }` - Serial number of the tilt device
- `byte TiltID { get; set; }` - Numeric identifier for the tilt device
- `string SystemID { get; set; }` - System identifier where the tilt device is registered
- `string SystemLocation { get; set; }` - Physical location of the tilt device within the system
---
### DragAndDropPayload
Static container class defining clipboard format identifiers for drag-and-drop operations involving hardware table rows.
**Constants:**
- `const string FORMAT = "RESOLVECHANNELS_HARDWARETABLE"` - Standard drag format
- `const string ALT_FORMAT = "ALT_RESOLVECHANNELS_HARDWARETABLE"` - Alternate drag format (Alt key modifier)
- `const string CTRL_FORMAT = "CTRL_RESOLVECHANNELS_HARDWARETABLE"` - Control drag format (Ctrl key modifier)
---
### SerializableAAF
Container for Anti-Alias Filter serialization logic (currently non-functional).
**Nested Types:**
- `enum DAS_TYPE { TDAS = 0, SLICE = 1 }` - Enumeration identifying DAS hardware types
**Note:** All implementation methods (`GetSerializedKey()`, `GetSerializedValue()`, `FromSerializedStrings()`) are commented out. The class currently serves only as a container for the `DAS_TYPE` enum.
---
### DASDBRecord
Entity class representing a Data Acquisition System (DAS) database record. Implements `IDASDBRecord` and extends `BasePropertyChanged`.
**Constructors:**
- `DASDBRecord()` - Default constructor
- `DASDBRecord(IDASDBRecord copy)` - Copy constructor; performs shallow copy of most properties and deep copy of `ChannelTypes` array
- `DASDBRecord(IDataReader reader)` - Constructs instance from database reader using `Utility` helper methods
**Static Properties:**
- `static DateTime INVALID_DATE => new DateTime(1970, 1, 1)` - Sentinel value for unset date fields
**Instance Properties (Key Database Columns):**
- `int DASId { get; set; }` - Primary key (`[Key]`, mapped to column "DASId")
- `string SerialNumber { get; set; }` - Required, max length 50
- `int DASType { get; set; }` - DAS type identifier
- `int MaxModules { get; set; }` - Maximum module count
- `long MaxMemory { get; set; }` - Maximum memory in bytes
- `double MaxSampleRate { get; set; }` - Maximum sample rate (decimal(18,0) in DB)
- `double MinSampleRate { get; set; }` - Minimum sample rate (decimal(18,0) in DB)
- `string FirmwareVersion { get; set; }` - Firmware version string (max 50 chars)
- `DateTime CalDate { get; set; }` - Calibration date (defaults to `INVALID_DATE`)
- `int ProtocolVersion { get; set; }` - Protocol version number
- `DateTime LastModified { get; set; }` - Last modification timestamp
- `string LastModifiedBy { get; set; }` - User who last modified (max 50 chars)
- `int Version { get; set; }` - Record version
- `bool LocalOnly { get; set; }` - Whether record is local-only
- `DateTime LastUsed { get; set; }` - Last usage timestamp (defaults to `INVALID_DATE`)
- `string LastUsedBy { get; set; }` - User who last used (max 50 chars)
- `string Connection { get; set; }` - Connection string/info (max 50 chars)
- `int Channels { get; set; }` - Channel count
- `string Position { get; set; }` - Required position string (max 50 chars)
- `int[] ChannelTypes { get; set; }` - Array of channel type identifiers (max 255 chars in DB)
- `bool IsProgrammable { get; set; }` - Whether DAS is reprogrammable
- `bool IsReconfigurable { get; set; }` - Whether DAS is reconfigurable
- `bool IsModule { get; set; }` - Whether this is a module
- `int PositionOnDistributor { get; set; }` - Position index on distributor
- `int PositionOnChain { get; set; }` - Position index on chain
- `int Port { get; set; }` - Port number
- `string ParentDAS { get; set; }` - Parent DAS serial number (max 50 chars)
- `DateTime? FirstUseDate { get; set; }` - Nullable first use date
- `int? TestId { get; set; }` - Nullable test ID
- `int? GroupId { get; set; }` - Nullable group ID
- `bool StandIn { get; set; }` - Stand-in flag
- `double MaxAAFRate { get; set; }` - Maximum Anti-Alias Filter rate (decimal(18,0) in DB)
- `bool IsFirstUseValid { get; set; }` - Whether first use date is valid (references issue 15524)
---
### DASChannelDBRecord
Entity class representing a DAS channel database record. Implements `IDASChannelDBRecord` and extends `BasePropertyChanged`.
**Constructors:**
- `DASChannelDBRecord()` - Default constructor
- `DASChannelDBRecord(IDataReader reader)` - Constructs from database reader
- `DASChannelDBRecord(IDASChannelDBRecord copy)` - Copy constructor
**Constants (Bitmask Defaults):**
- `const int DEFAULT_SUPPORTED_BRIDGES = 12` - Default: half bridge (4) + full bridge (8)
- `const int DEFAULT_SUPPORTED_EXCITATIONS = 16` - Default: 5V excitation
- `const int DEFAULT_SUPPORTED_DI_MODES = 16` - Default digital input mode (CCNC)
- `const int DEFAULT_SQUIB_FIRE_MODES = 16` - Default squib fire mode
- `const int DEFAULT_SUPPORTED_DO_MODES = 16` - Default digital output mode
**Properties:**
- `string HardwareId { get; set; }` - Composite ID: "{serialnumber}_{dastype}"
- `int DaschannelId { get; set; }` - Primary key (`[Key]`, mapped to "DASChannelId")
- `int? Dasid { get; set; }` - Foreign key to parent DAS record
- `int ChannelIdx { get; set; }` - Physical channel index on DAS
- `int SupportedBridges { get; set; }` - Bitmask: IEPE(0), quarter(1), half(2), full(3), DI(4), squib(5), DO(6), half-bridge-signal-plus(7), RTC(8), UART(9)
- `int SupportedExcitations { get; set; }` - Bitmask: invalid(0), 2V(1), 2.5V(2), 3V(3), 5V(4), 10V(5), 1V(6)
- `int DASDisplayOrder { get; set; }` - Display order (may differ from physical order)
- `bool LocalOnly { get; set; }` - Deprecated; indicates local-only storage
- `int SupportedDigitalInputModes { get; set; }` - Bitmask: invalid(0), TLH(1), THL(2), CCNO(3), CCNC(4)
- `int SupportedSquibFireModes { get; set; }` - Bitmask: invalid(0), capacitor-discharge(1), constant-current(2), AC-discharge(3)
- `int SupportedDigitalOutputModes { get; set; }` - Bitmask: FVLH(0), FVHL(1), CCNO(2), CCNC(3)
- `string ModuleSerialNumber { get; set; }` - Serial of containing module (max 16 chars)
- `int SettingId { get; set; }` - Setting ID reference
- `int ModuleArrayIndex { get; set; }` - Index of module within DAS/Rack
---
### DASMonitorInfo
Class for persisting and retrieving DAS monitor configuration including tilt sensor calibration data. Implements `IDASMonitorInfo`.
**Constructors:**
- `DASMonitorInfo(IDASCommunication das, IsoViewMode mode)` - Constructs from live DAS communication object
- `DASMonitorInfo(string path)` - Constructs by reading from file at specified path
**Properties:**
- `string SerialNumber { get; private set; }` - DAS serial number
- `double[] TiltSensorCals { get; private set; }` - 18-element array of tilt sensor calibration values
- `short[] TiltSensorDataPre { get; private set; }` - 3-element array of pre-capture tilt data
- `DFConstantsAndEnums.TiltAxes TiltAxes { get; private set; }` - Tilt axis configuration (default: IXIYIZ)
- `int AxisIgnored { get; private set; }` - Which axis is ignored
- `double MountOffsetAxisOne { get; private set; }` - Mount offset for axis one (default: NaN)
- `double MountOffsetAxisTwo { get; private set; }` - Mount offset for axis two (default: NaN)
**Methods:**
- `string GetChannelName(int index)` - Returns channel name or generates default "Ch#XX" format
- `double GetOffsetTolerancemVHigh(int index)` - Returns high offset tolerance in mV
- `double GetOffsetTolerancemVLow(int index)` - Returns low offset tolerance in mV
- `void ReadFromFile(string path)` - Populates instance from file
- `void WriteToFile(string path)` - Serializes instance to file
---
## Invariants
1. **DASDBRecord.InvalidDate**: The `INVALID_DATE` constant (1970-01-01) serves as a sentinel value for unset date fields. Code comparing dates should account for this.
2. **DASDBRecord.FirstUseDate Validity**: `FirstUseDate` is only considered valid when `IsFirstUseValid` is `true`. A null `FirstUseDate` with `IsFirstUseValid == false` indicates the feature is not in use.
3. **DASDBRecord.ChannelTypes**: The `ChannelTypes` array is never null (defaults to `new int[0]`). The copy constructor performs a deep copy via `Array.Copy`.
4. **DASChannelDBRecord Bitmasks**: All `Supported*` properties use bit positions documented in XML comments. Bit 0 typically indicates "invalid" or "unset" for mode properties.
5. **DASMonitorInfo Array Sizes**:
- `TiltSensorCals` is

View File

@@ -0,0 +1,46 @@
---
source_files:
- Common/DTS.Common/Classes/ISO/IsoCode.cs
generated_at: "2026-04-17T16:27:17.170851+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "38189089a59088e0"
---
# ISO
### Purpose
The `IsoCode` class provides a structured representation of a 16-character ISO code, breaking it down into discrete fields: `TestObject` (1 char), `Position` (1 char), `MainLocation` (4 chars), `FineLocation1` (2 chars), `FineLocation2` (2 chars), `FineLocation3` (2 chars), `PhysicalDimension` (2 chars), `Direction` (1 char), and `FilterClass` (1 char). This class exists to parse, store, and reconstruct ISO codes used for identifying test objects and their spatial/dimensional attributes within the system.
### Public Interface
**Constructor:**
- `IsoCode(string isoCode)` — Constructs an `IsoCode` from a string. If null, treats as empty string. Truncates to 16 characters if longer; pads right with `'?'` if shorter.
**Properties:**
- `string TestObject` — Gets/sets the single-character test object identifier. Defaults to `'?'` if set to null/empty.
- `string Position` — Gets/sets the single-character position. Defaults to `'?'` if set to null/empty.
- `string MainLocation` — Gets/sets the 4-character main location. Pads right with `'?'` if under 4 chars; truncates to 4 if over.
- `string FineLocation1` — Gets/sets the 2-character fine location 1. Pads right with `'?'` if under 2 chars.
- `string FineLocation2` — Gets/sets the 2-character fine location 2. Pads right with `'?'` if under 2 chars.
- `string FineLocation3` — Gets/sets the 2-character fine location 3. Pads right with `'?'` if under 2 chars.
- `string PhysicalDimension` — Gets/sets the 2-character physical dimension. Pads right with `'?'` if under 2 chars; truncates to 2 if over.
- `string Direction` — Gets/sets the single-character direction. Defaults to `'?'` if set to null/empty.
- `string FilterClass` — Gets/sets the single-character filter class. Defaults to `'?'` if set to null/empty.
- `string StringRepresentation` — Gets the full 16-character ISO code string, or sets all 16 internal characters from a string (pads with `'0'` if shorter).
### Invariants
- The internal `_isoCodeFull` character array is always exactly 16 characters.
- All public property setters normalize input: single-character properties default to `'?'` on null/empty; multi-character properties pad with `'?'` or truncate to their fixed widths.
- The constructor always produces a fully-initialized 16-character code.
### Dependencies
- **Depends on:** `System.Text` (for `StringBuilder` in `StringRepresentation` getter).
- **Depended on by:** Not determinable from source alone.
### Gotchas
- **Inconsistent padding characters:** The constructor and public property setters pad with `'?'`, but the `StringRepresentation` setter pads with `'0'`. This could cause unexpected behavior when reconstructing an `IsoCode` via `StringRepresentation`.
- **Potential off-by-one bugs in private setters:** The private setters for `_fineLocation1`, `_fineLocation2`, `_fineLocation3`, and `_physicalDimension` use the condition `value.Length < i` instead of `value.Length <= i`. Since `i` starts at 0, this condition is always false for the first iteration, meaning the first character may not be set correctly when the input is shorter than expected.
- **Silent truncation:** `MainLocation` and `PhysicalDimension` silently truncate input exceeding their field width; other fields do not have this behavior documented in the same way.
---

View File

@@ -0,0 +1,60 @@
---
source_files:
- Common/DTS.Common/Classes/ISO/ExtraProperties/TextPastedArgs.cs
generated_at: "2026-04-17T16:40:00.349676+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "d715f67ccc715086"
---
# Documentation: TextPastedArgs
## 1. Purpose
`TextPastedArgs` is an event argument class that encapsulates data related to text paste operations within the ISO Extra Properties system. It implements `ITextPastedEventArgs` and serves as a data transfer object to communicate paste event details—including the pasted text content, the source extra property, an identifier, and an optional tag—between event producers and consumers.
## 2. Public Interface
### Class: `TextPastedArgs`
**Namespace:** `DTS.Common.ISO.ExtraProperties`
**Implements:** `ITextPastedEventArgs`
#### Properties
| Property | Type | Access | Description |
|----------|------|--------|-------------|
| `Text` | `string` | Read-only | The text content that was pasted. |
| `Sender` | `object` | Read-only | The source object of the paste event. Set from the `extraProperty` constructor parameter. |
| `Id` | `string` | Read-only | An identifier associated with the paste event. |
| `Tag` | `object` | Read-only | An arbitrary object for additional context or data. |
#### Constructor
```csharp
public TextPastedArgs(string text, IExtraProperty extraProperty, string id, object tag)
```
Creates a new `TextPastedArgs` instance with the specified values. The `extraProperty` parameter is assigned to the `Sender` property.
## 3. Invariants
- All properties are immutable after construction (read-only getters with no setters).
- `Sender` is always assigned from an `IExtraProperty` instance passed to the constructor, though the property type is `object`.
- No null validation is performed in the constructor; any parameter may be `null`.
## 4. Dependencies
### This module depends on:
- `DTS.Common.Events` — Likely contains event infrastructure or the `ITextPastedEventArgs` interface definition.
- `DTS.Common.Interface.ISO.ExtraProperties` — Provides `ITextPastedEventArgs` and `IExtraProperty` interfaces.
### What depends on this module:
- Cannot be determined from this source file alone.
## 5. Gotchas
1. **Naming mismatch:** The constructor parameter is named `extraProperty` but is assigned to the `Sender` property. This naming inconsistency may cause confusion about the intended semantics of the property.
2. **Unused imports:** The file imports `System.Collections.Generic`, `System.Linq`, and `System.Text`, none of which are used in the current implementation. This may indicate dead code or remnants from previous refactoring.
3. **No null guards:** The constructor performs no validation. Callers should be aware that `Text`, `Id`, `Sender`, and `Tag` may all be `null` depending on what is passed in.

View File

@@ -0,0 +1,53 @@
---
source_files:
- Common/DTS.Common/Classes/Locking/LockRecord.cs
- Common/DTS.Common/Classes/Locking/LockError.cs
- Common/DTS.Common/Classes/Locking/SensorsLocking.cs
generated_at: "2026-04-17T15:39:34.129608+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "1d4f4345fc0d551d"
---
# Documentation: DTS.Common.Classes.Locking
## 1. Purpose
This module provides a locking mechanism for managing concurrent access to items (identified by category and ID) within the DTS system. It consists of three classes: `LockRecord` represents an individual lock's metadata, `LockError` encapsulates error states from lock operations, and `SensorsLocking` manages a collection of locks with periodic update capabilities. The system tracks who holds locks, on which machine, and when locks were created/updated, supporting scenarios where locks can be "stolen" or lost due to connectivity issues.
---
## 2. Public Interface
### LockRecord
**Constructor:**
```csharp
public LockRecord(string user, string machine, DateTime createTime, DateTime lastUpdate, string itemKey, int itemCategory, int itemId)
```
Initializes a new immutable lock record with all properties set via constructor parameters.
**Properties (all read-only):**
- `string LockingUserName` — The user who holds the lock.
- `string LockingMachineName` — The machine name where the lock originated.
- `DateTime CreationTime` — When the lock was created.
- `DateTime LastUpdated` — When the lock was last refreshed.
- `string ItemKey` — A string key identifying the locked item.
- `int ItemCategory` — Numeric category value (maps to `LockCategories` in the database).
- `int ItemId` — Numeric identifier for the locked item.
---
### LockError
**Constructor:**
```csharp
public LockError(int error, string message, string user = null, string machine = null)
```
Creates an error object with optional user and machine parameters (default to empty string if null).
**Properties:**
- `int ErrorCode` — Numeric error code (private setter).
- `string Message` — Error message (private setter).
- `string LockingUser` — User associated with the error (private setter).
- `string Lock

View File

@@ -0,0 +1,251 @@
---
source_files:
- Common/DTS.Common/Classes/Sensors/DisplayedCalibrationBehavior.cs
- Common/DTS.Common/Classes/Sensors/ChannelSerialNumber.cs
- Common/DTS.Common/Classes/Sensors/ChannelTypeUtility.cs
- Common/DTS.Common/Classes/Sensors/SensorDbRecord.cs
- Common/DTS.Common/Classes/Sensors/ZeroRef.cs
- Common/DTS.Common/Classes/Sensors/CalMode.cs
- Common/DTS.Common/Classes/Sensors/ThermocouplerRecord.cs
- Common/DTS.Common/Classes/Sensors/StreamInputRecord.cs
- Common/DTS.Common/Classes/Sensors/CANRecord.cs
- Common/DTS.Common/Classes/Sensors/UARTRecord.cs
- Common/DTS.Common/Classes/Sensors/ParseParameters.cs
- Common/DTS.Common/Classes/Sensors/DigitalInputScaleMultiplier.cs
- Common/DTS.Common/Classes/Sensors/DigitalOutDbRecord.cs
- Common/DTS.Common/Classes/Sensors/SensorCalDbRecord.cs
- Common/DTS.Common/Classes/Sensors/StreamOutputRecord.cs
generated_at: "2026-04-17T15:28:19.491445+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "526a6c5ad42fed58"
---
# DTS.Common.Classes.Sensors Documentation
## 1. Purpose
This module provides sensor-related data structures, database record classes, and utility functions for the DTS system. It serves as the data layer for sensor management, handling persistence and serialization of sensor configurations including thermocouplers, CAN bus sensors, UART devices, stream input/output channels, digital outputs, and calibration records. The module bridges database representations with domain interfaces, providing `IDataReader` constructors for hydration and interface-based copy constructors for transformation between layers.
---
## 2. Public Interface
### DisplayedCalibrationBehavior
Simple data class pairing a calibration behavior enum with a display string.
| Member | Signature | Description |
|--------|-----------|-------------|
| `CalibrationBehavior` | `public DTS.Common.Enums.Sensors.CalibrationBehaviors CalibrationBehavior` | Public field holding the calibration behavior enum value. |
| `DisplayString` | `public string DisplayString` | Public field holding the human-readable display text. |
| `ToString()` | `public override string ToString()` | Returns `DisplayString`. |
---
### ChannelSerialNumber (static)
Utility for resolving serial numbers based on sensor embedding context.
| Member | Signature | Description |
|--------|-----------|-------------|
| `SerialNumberFromChannel` | `public static string SerialNumberFromChannel(bool isTestSpecificEmbedded, string testSpecificEmbeddedSensor, string sensorDataSerialNumber)` | Returns `testSpecificEmbeddedSensor` if `isTestSpecificEmbedded` is true; otherwise returns `sensorDataSerialNumber`. |
---
### ChannelTypeUtility (static)
Utility for parsing known channel type codes from sensor names.
| Member | Signature | Description |
|--------|-----------|-------------|
| `ParseSensorKnownChannelType` | `public static string ParseSensorKnownChannelType(string sensorName)` | Extracts the first 2 characters of `sensorName`, converts to uppercase, and returns it if it matches a value in `KnownChannelTypes` enum; otherwise returns `string.Empty`. Returns `string.Empty` for null/empty strings or strings shorter than 2 characters. |
#### KnownChannelTypes (enum)
Defined within `ChannelTypeUtility`:
- `VS`, `VU`, `SB`, `TI`, `TC`, `CT`, `XP`, `P4`, `VF`, `NB`, `EX`, `X1`, `R1`, `VO`, `CO`, `CP`
---
### SensorDbRecord
Database record for sensor models, implements `ISensorDbRecord`.
| Member | Signature | Description |
|--------|-----------|-------------|
| `TagType` | `public override TagTypes TagType => TagTypes.SensorModels` | Returns the tag type for this record. |
| `id` | `public int id { get; set; }` | Database primary key. |
| `SensorType` | `public short SensorType { get; set; }` | Sensor type identifier. |
| `SerialNumber` | `public string SerialNumber { get; set; }` | Sensor serial number. |
| **Constructor** | `public SensorDbRecord(IDataReader reader)` | Hydrates from database reader using columns: `id`, `SensorType`, `SerialNumber`. |
---
### ZeroRef
Helper class for zero reference configuration in SIFs, serialized to/from integer strings.
| Member | Signature | Description |
|--------|-----------|-------------|
| `ZeroType` (enum) | `AverageOverTime`, `UsePreEventDiagnostics`, `UseZeroMv` | Enumeration of zero reference methods. |
| `ZeroMethod` | `public ZeroType ZeroMethod { get; }` | The configured zero method (read-only). |
| **Constructor** | `public ZeroRef(string zeroref)` | Parses string: `"0"``AverageOverTime`, `"1"``UsePreEventDiagnostics`, `"2"``UseZeroMv`. Throws `NotSupportedException` for invalid values. |
| **Constructor** | `public ZeroRef(ZeroType type)` | Constructs from enum value. |
| `ToString()` | `public override string ToString()` | Serializes to string: `AverageOverTime``"0"`, `UsePreEventDiagnostics``"1"`, `UseZeroMv``"2"`. Throws `NotSupportedException` for unhandled enum values. |
---
### CalMode
Helper class for calibration mode in SIFs, represented as a 3-character sequence (shunt/bridge/filter).
| Member | Signature | Description |
|--------|-----------|-------------|
| `ShuntCheck` | `public bool ShuntCheck { get; set; }` | Shunt check enabled. |
| `FullBridge` | `public bool FullBridge { get; set; }` | Full bridge mode. |
| `Filter` | `public bool Filter { get; set; }` | Filter enabled. |
| **Constructor** | `public CalMode(string value)` | Parses 3-character string: Position 0 (`'S'`=true, `'I'`=false), Position 1 (`'D'`=true, `'S'`=false), Position 2 (`'F'`=true, `'B'`=false). Throws `NotSupportedException` for invalid characters. |
| **Constructor** | `public CalMode()` | Parameterless constructor. |
| `ToString()` | `public override string ToString()` | Serializes to 3-character string: `ShuntCheck ? 'S' : 'I'`, `FullBridge ? 'D' : 'S'`, `Filter ? 'F' : 'B'`. |
---
### ThermocouplerRecord
Database record for thermocoupler sensors, implements `IThermocouplerRecord`.
| Member | Signature | Description |
|--------|-----------|-------------|
| `TagType` | `public override TagTypes TagType => TagTypes.Sensors` | Returns `TagTypes.Sensors`. |
| `Id` | `public int Id { get; set; }` | Database primary key. |
| `SerialNumber` | `public string SerialNumber { get; set; }` | Sensor serial number. |
| `LastModified` | `public DateTime LastModified { get; set; }` | Last modification timestamp. |
| `LastUpdatedBy` | `public string LastUpdatedBy { get; set; }` | User who last modified. |
| `DoNotUse` | `public bool DoNotUse { get; set; }` | Flag indicating sensor should not be used. |
| `Broken` | `public bool Broken { get; set; }` | Flag indicating sensor is broken. |
| **Constructor** | `public ThermocouplerRecord(ISensorData sd)` | Constructs from `ISensorData` interface. Catches and logs exceptions. |
| **Constructor** | `public ThermocouplerRecord(IDataReader reader)` | Hydrates from database reader using columns: `Id`, `SerialNumber`, `Broken`, `DoNotUse`, `LastModified`, `LastModifiedBy`. Catches and logs exceptions. |
---
### StreamInputRecord
Database record for stream input sensors, implements `IStreamInputRecord`.
| Member | Signature | Description |
|--------|-----------|-------------|
| `TagType` | `public override TagTypes TagType => TagTypes.Sensors` | Returns `TagTypes.Sensors`. |
| `Id`, `SerialNumber`, `LastModified`, `LastUpdatedBy`, `DoNotUse`, `Broken` | (Same as ThermocouplerRecord) | Standard sensor record properties. |
| `DEFAULT_UDP_ADDRESS` | `public const string DEFAULT_UDP_ADDRESS = "UDP://239.1.2.10:8400"` | Default UDP multicast address. |
| `StreamInUDPAddress` | `public string StreamInUDPAddress { get; set; }` | UDP address for stream input. |
| **Constructor** | `public StreamInputRecord(ISensorData sd)` | Constructs from `ISensorData`. Catches and logs exceptions. |
| **Constructor** | `public StreamInputRecord(IDataReader reader)` | Hydrates from reader using columns: `Id`, `SerialNumber`, `UDPAddress`, `Broken`, `DoNotUse`, `LastModified`, `LastModifiedBy`. Catches and logs exceptions. |
---
### CANRecord
Database record for CAN bus sensors, implements `ICANRecord`.
| Member | Signature | Description |
|--------|-----------|-------------|
| `TagType` | `public override TagTypes TagType => TagTypes.Sensors` | Returns `TagTypes.Sensors`. |
| `Id`, `SerialNumber`, `LastModified`, `LastUpdatedBy`, `DoNotUse`, `Broken` | (Same as ThermocouplerRecord) | Standard sensor record properties. |
| `CanIsFD` | `public bool CanIsFD { get; set; }` | CAN FD mode flag. Default from `EmbeddedSensors.CANISFD_DEFAULT`. |
| `CanArbBaseBitrate` | `public int CanArbBaseBitrate { get; set; }` | Arbitration base bitrate. Default from `EmbeddedSensors.CANFD_ARB_BASE_BITRATE_DEFAULT`. |
| `CanArbBaseSJW` | `public int CanArbBaseSJW { get; set; }` | Arbitration base SJW. Default from `EmbeddedSensors.CANFD_1000000_ARB_BASE_SJW_MAX`. |
| `CanDataBitrate` | `public int CanDataBitrate { get; set; }` | Data bitrate. Default from `EmbeddedSensors.DATA_BITRATE_DEFAULT`. |
| `CanDataSJW` | `public int CanDataSJW { get; set; }` | Data SJW. Default from `EmbeddedSensors.DATA_SJW_DEFAULT`. |
| `CanFileType` | `public string CanFileType { get; set; }` | File type. Default from `EmbeddedSensors.FILETYPE_DEFAULT`. |
| **Constructor** | `public CANRecord(ISensorData sensor)` | Constructs from `ISensorData`. |
| **Constructor** | `public CANRecord(IDataReader reader)` | Hydrates from reader using columns: `Id`, `SerialNumber`, `IsFD`, `ArbBaseBitrate`, `ArbBaseSJW`, `DataBitrate`, `DataSJW`, `FileType`, `Broken`, `DoNotUse`, `LastModified`, `LastModifiedBy`. Catches and logs exceptions. |
---
### UARTRecord
Database record for UART sensors, implements `IUARTRecord`.
| Member | Signature | Description |
|--------|-----------|-------------|
| `TagType` | `public override TagTypes TagType => TagTypes.Sensors` | Returns `TagTypes.Sensors`. |
| `Id`, `SerialNumber`, `LastModified`, `LastUpdatedBy`, `DoNotUse`, `Broken` | (Same as ThermocouplerRecord) | Standard sensor record properties. |
| `UartBaudRate` | `public uint UartBaudRate { get; set; }` | Baud rate. Default from `DTS.Common.Constant.EmbeddedSensors.BAUD_RATE_DEFAULT`. |
| `UART_DATABITS_DEFAULT` | `public const uint UART_DATABITS_DEFAULT = 8` | Default data bits. |
| `UartDataBits` | `public uint UartDataBits { get; set; }` | Data bits setting. |
| `UART_STOPBITS_DEFAULT` | `public const StopBits UART_STOPBITS_DEFAULT = StopBits.None` | Default stop bits. |
| `UartStopBits` | `public StopBits UartStopBits { get; set; }` | Stop bits setting. |
| `UART_DATAFORMAT_DEFAULT` | `public const UartDataFormat UART_DATAFORMAT_DEFAULT = UartDataFormat.Binary` | Default data format. |
| `UART_FLOWCONTROL_DEFAULT` | `public const Handshake UART_FLOWCONTROL_DEFAULT = Handshake.None` | Default flow control. |
| `UartFlowControl` | `public Handshake UartFlowControl { get; set; }` | Flow control setting. |
| `UartDataFormat` | `public UartDataFormat UartDataFormat { get; set; }` | Data format setting. |
| `UART_PARITY_DEFAULT` | `public const Parity UART_PARITY_DEFAULT = Parity.None` | Default parity. |
| `UartParity` | `public Parity UartParity { get; set; }` | Parity setting. |
| **Constructor** | `public UARTRecord(ISensorData sensor)` | Constructs from `ISensorData`. |
| **Constructor** | `public UARTRecord(IDataReader reader)` | Hydrates from reader using columns: `Id`, `SerialNumber`, `BaudRate`, `DataBits`, `StopBits`, `Parity`, `FlowControl`, `DataFormat`, `Broken`, `DoNotUse`, `LastModified`, `LastModifiedBy`. Parses enum values from strings. Catches and logs exceptions. |
---
### ParseParameters
Internal helper class for passing parameters between CSV import methods.
| Member | Signature | Description |
|--------|-----------|-------------|
| `ImportContainedSensorRanges` | `public bool ImportContainedSensorRanges { get; set; }` | Flag for sensor ranges in import. Default: `false`. |
| `SensorData` | `public ISensorData SensorData { get; set; }` | Sensor data object. |
| `ImportCulture` | `public IFormatProvider ImportCulture { get; set; }` | Culture for parsing. |
| `Errors` | `public List<string> Errors { get; set; }` | Collection of error messages. |
| `IrtraccExponent` | `public double IrtraccExponent { get; set; }` | IR-Tracc exponent value. |
| `SensorCal` | `public ISensorCalibration SensorCal { get; set; }` | Sensor calibration object. |
| `Sensitivity` | `public double Sensitivity { get; set; }` | Sensitivity value. |
| `SavedIsProportional` | `public bool SavedIsProportional { get; set; }` | Saved proportional flag. |
| `SavedRemoveOffset` | `public bool SavedRemoveOffset { get; set; }` | Saved remove offset flag. |
| `StripBackslash` | `public bool StripBackslash { get; set; }` | Flag to strip backslash characters. |
| `OriginalOffset` | `public double OriginalOffset { get; set; }` | Original offset value. Default: `double.NaN`. |
| `ZeroType` | `public ZeroMethodType ZeroType { get; set; }` | Zero method type. |
| `ZeroEnd` | `public double ZeroEnd { get; set; }` | Zero method end value. |
| `ZeroStart` | `public double ZeroStart { get; set; }` | Zero method start value. |
| `SquibDefaults` | `public ISquibSettingDefaults SquibDefaults { get; set; }` | Squib setting defaults. |
| `DigitalOutDefaults` | `public IDigitalOutDefaults DigitalOutDefaults { get; set; }` | Digital output defaults. |
| `SensorGroupNameLookup` | `public Dictionary<string, string> SensorGroupNameLookup { get; set; }` | Lookup dictionary for sensor group names. |
| `SensorGroupTypeLookup` | `public Dictionary<string, string> SensorGroupTypeLookup { get; set; }` | Lookup dictionary for sensor group types. |
| `GroupNameToTestObjectLookup` | `public Dictionary<string, string> GroupNameToTestObjectLookup { get; set; }` | Lookup dictionary for test objects. |
| `SensorTestObject` | `public string SensorTestObject { get; set; }` | Sensor test object name. |
| `UseISOCodeFilterMapping` | `public bool UseISOCodeFilterMapping { get; set; }` | Flag for ISO code filter mapping. |
| `UseZeroForUnfiltered` | `public bool UseZeroForUnfiltered { get; set; }` | Flag for zero value on unfiltered data. |
| `SensorISOCode` | `public Dictionary<string, string> SensorISOCode { get; set; }` | ISO code lookup. |
| `SensorISOChannelName` | `public Dictionary<string, string> SensorISOChannelName { get; set; }` | ISO channel name lookup. |
| `SensorUserCode` | `public Dictionary<string, string> SensorUserCode { get; set; }` | User code lookup. |
| `SensorUserChannelName` | `public Dictionary<string, string> SensorUserChannelName { get; set; }` | User channel name lookup. |
| `SensorDASSerialNumber` | `public Dictionary<string, string> SensorDASSerialNumber { get; set; }` | DAS serial number lookup. |
| `SensorDASChannelIndex` | `public Dictionary<string, int> SensorDASChannelIndex { get; set; }` | DAS channel index lookup. |
---
### DigitalInputScaleMultiplier
Scaler for transforming digital input data, implements `IDigitalInputScaleMultiplier`.
| Member | Signature | Description |
|--------|-----------|-------------|
| `Form` | `public Forms Form { get; set; }` | Scaler form type. Default: `Forms.ArbitraryLowAndHigh`. |
| `DefaultValue` | `public double DefaultValue { get; set; }` | Value for OFF state (0). Default: `0D`. |
| `ActiveValue` | `public double ActiveValue { get; set; }` | Value for ON state (1). Default: `1D`. |
| `SimpleEquals` | `public bool SimpleEquals(IDigitalInputScaleMultiplier rhs)` | Compares `Form`, `DefaultValue`, and `ActiveValue`. |
| `Equals` | `public override bool Equals(object obj)` | Type-checked equality comparison. |
| `GetHashCode` | `public override int GetHashCode()` | Custom hash using primes 31, 79, 127, 23 to avoid collisions. |
| **Constructor** | `public DigitalInputScaleMultiplier()` | Default constructor, sets `DefaultValue = 0D`. |
| **Constructor** | `public DigitalInputScaleMultiplier(DigitalInputScaleMultiplier copy)` | Copy constructor. |
| `ToSerializeDbString` | `public string ToSerializeDbString()` | Serializes to string using invariant culture list separator. Throws `NotSupportedException` for unsupported forms. |
| `FromDbSerializeString` | `public void FromDbSerializeString(string s)` | Deserializes from string. Logs warning and returns early if string is null. Throws `NotSupportedException` for invalid formats. |
---
### DigitalOutDbRecord
Database record for digital output sensors, implements `IDigitalOutDbRecord`.
| Member | Signature | Description |
|--------|-----------|-------------|
| `SerialNumber` | `public string SerialNumber { get; set; }` | Sensor serial number. |
| `DODelay` | `public double DODelay { get; set; }` | Digital output delay in milliseconds. Default: `0D`. |
| `DODuration` | `public double DODuration { get; set; }` | Digital output duration in milliseconds. Default: `0D`. |
| `ModifiedBy` | `public string ModifiedBy { get; set; }` | User who last modified. |
| `LastModified` | `public DateTime LastModified { get; set; }` | Last modification timestamp. |
| `DatabaseId` | `public int DatabaseId { get; set; }` | Database primary key. Default: `-1`. |
| `ISOCode` | `public string ISOCode { get; set; }` | ISO code. |
| `ISOChannelName` | `public string ISOChannelName { get; set; }` | ISO channel name. |
| `UserCode` | `public string UserCode { get; set; }` | User code. |
| `UserChannelName` | `public string UserChannelName { get; set; }` | User channel name. |
| `Broken` | `public bool Broken { get; set; }` | Broken flag. Default: `false`. |
| `DoNotUse` | `public bool DoNotUse { get; set; }` | Do not use flag. Default: `false`. |
| `DOMode` | `public DigitalOutputModes DOMode { get; set; }` | Digital output mode. Default: `DigitalOutputModes.CCNC`. |
| `LimitDuration` | `public bool

View File

@@ -0,0 +1,55 @@
---
source_files:
- Common/DTS.Common/Classes/Sensors/AnalogDiagnostics/DiagnosticRun.cs
- Common/DTS.Common/Classes/Sensors/AnalogDiagnostics/DiagnosticEntry.cs
generated_at: "2026-04-17T15:41:04.266390+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "8eaedb5d34696af2"
---
# Documentation: DTS.Common.Classes.Sensors.AnalogDiagnostics
## 1. Purpose
This module provides entity classes for analog sensor diagnostics within the DTS system. It models diagnostic test runs and individual diagnostic measurements, serving as data transfer objects that map directly to database records. The classes support both programmatic instantiation and hydration from SQL query results via `SqlDataReader`, facilitating the persistence and retrieval of sensor diagnostic data such as excitation, offset, noise, and shunt measurements.
---
## 2. Public Interface
### DiagnosticRun Class
**Namespace:** `DTS.Common.Classes.Sensors.AnalogDiagnostics`
**Implements:** `IDiagnosticRun`
Represents a diagnostic test run session.
#### Constructors
| Signature | Description |
|-----------|-------------|
| `DiagnosticRun()` | Default parameterless constructor. |
| `DiagnosticRun(SqlDataReader reader)` | Constructs an instance by reading column values from the provided `SqlDataReader`. Checks for `DBNull.Value` before casting each field. |
#### Properties
| Property | Type | Default | Description |
|----------|------|---------|-------------|
| `Id` | `long?` | `null` | Unique identifier for the diagnostic run. |
| `DataPROUser` | `string` | `string.Empty` | User identifier associated with the run. |
| `TestId` | `int?` | `null` | Identifier for the test being executed. |
| `TestName` | `string` | `string.Empty` | Human-readable name of the test. |
| `PreTest` | `bool` | `true` | Indicates whether this is a pre-test diagnostic run. |
---
### DiagnosticEntry Class
**Namespace:** `DTS.Common.Classes.Sensors.AnalogDiagnostics`
**Implements:** `IDiagnosticEntry`
Represents a single diagnostic measurement entry within a `DiagnosticRun`, containing sensor channel information and multiple diagnostic measurements with their statuses.
#### Constructors

View File

@@ -0,0 +1,66 @@
---
source_files:
- Common/DTS.Common/Classes/Sensors/SensorsList/DragAndDropPayload.cs
generated_at: "2026-04-17T16:39:51.857757+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "4ab602cffdf9b6ad"
---
# Documentation: DragAndDropPayload
## 1. Purpose
`DragAndDropPayload` is a data transfer object that encapsulates an array of `IDragAndDropItem` objects for drag-and-drop operations within a sensors list context. It provides format identifiers for clipboard/drag-drop data interchange, with distinct constants for standard, ALT-modified, and CTRL-modified drop operations.
## 2. Public Interface
### Class: `DragAndDropPayload`
**Namespace:** `DTS.Common.Classes.Sensors.SensorsList`
#### Constructor
```csharp
public DragAndDropPayload(IDragAndDropItem[] items)
```
Creates a new payload containing the provided items. Assigns the `items` array directly to the `Items` property.
#### Properties
```csharp
public IDragAndDropItem[] Items { get; }
```
Read-only property returning the array of drag-and-drop items. No setter is exposed.
#### Constants
| Constant | Value |
|----------|-------|
| `FORMAT` | `"DTS.Common.Classes.Sensors.SensorsList.DragAndDropPayload"` |
| `ALT_FORMAT` | `"ALT_DTS.Common.Classes.Sensors.SensorsList.DragAndDropPayload"` |
| `CTRL_FORMAT` | `"CTRL_DTS.Common.Classes.Sensors.SensorsList.DragAndDropPayload"` |
These constants are intended for use as format strings in drag-and-drop or clipboard operations, distinguishing between unmodified, ALT-modified, and CTRL-modified drop actions.
## 3. Invariants
- The `Items` array reference is immutable after construction (no setter exposed).
- The format constants are compile-time constants and cannot be modified at runtime.
- **Note:** The source does not indicate whether null values are permitted for the `items` parameter or elements within the array.
## 4. Dependencies
**This module depends on:**
- `DTS.Common.Interface.Sensors.SensorsList.IDragAndDropItem` — interface type used for items in the payload.
**What depends on this module:**
- Not determinable from the source alone. Consumers would typically be UI components handling drag-and-drop operations for sensor lists.
## 5. Gotchas
- **No defensive copying:** The constructor assigns the input array directly to `Items` without copying. Callers retaining a reference to the passed array can mutate its contents after construction.
- **No null validation:** The source contains no null checks. Passing `null` to the constructor will result in `Items` being `null`.
- **Format string naming:** The format constants embed the full namespace path. If the class is refactored to a different namespace, these strings would need manual updating to remain consistent with any external systems expecting specific format identifiers.

View File

@@ -0,0 +1,25 @@
---
source_files:
- Common/DTS.Common/Classes/Sensors/StreamOut/UDPStreamProfilePacket.cs
generated_at: "2026-04-17T16:10:35.133764+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "9b781bc3bbbe9743"
---
# StreamOut
### Purpose
Defines data structures for UDP streaming profile packets used in sensor data transmission. This module provides configuration containers that specify header, timing, and payload parameters for formatting sensor data streams over UDP.
### Public Interface
**`UDPStreamProfilePacket` (class)**
- A POCO (Plain Old CLR Object) containing configuration properties for UDP stream packet formatting.
**Properties (all public get/set):**
- `int TransHeader` - Default: 4. Transaction header configuration.
- `int TimeHeader` - Default: 24. Time header configuration.
- `int SecondTimeHeader` - Default: 0. Secondary time header configuration.
- `int ChannelSpecificDataWord` - Default: 0. Channel-specific data word.
- `int PCM

View File

@@ -0,0 +1,98 @@
---
source_files:
- Common/DTS.Common/Classes/TMAT/TmtSingleFile.cs
- Common/DTS.Common/Classes/TMAT/TmtSplitFiles.cs
- Common/DTS.Common/Classes/TMAT/TMTBase.cs
generated_at: "2026-04-17T15:40:01.328534+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "eff9cc19ef2279f2"
---
# TMAT Template Processing Module Documentation
## 1. Purpose
This module provides a framework for processing TMATS (Telemetry Attributes Transfer Standard) template files. It supports two template configurations: single-file templates (`TmtSingleFile`) and split-file templates (`TmtSplitFile`) where channel definitions are separated from global settings. The module enables placeholder replacement in template files using strongly-typed enum keys, facilitating the generation of configuration files for data acquisition systems.
---
## 2. Public Interface
### `TmtBase` (Abstract Base Class)
The abstract base class implementing `ITMTTemplate` that defines the contract for template processing.
**Constants:**
- `TMT_MAX_CHANNEL_LENGTH` (`private const int = 200`) — Maximum length for channel names in TMT files.
**Static Methods:**
| Signature | Description |
|-----------|-------------|
| `string TMT_LimitString(string s)` | Truncates a string to `TMT_MAX_CHANNEL_LENGTH` characters. |
| `void UpdateChannelField(TMTChannelKeysEx key, ITMTTemplate template, int channelIndex, float[] ranges, double minEU, double maxEU, string eu, float[] scaleFactors, double adcToEUScalingFactor, string channelName2, string offsetEU, bool bSigned)` | Updates a channel-specific field in the template based on the key type. Handles scaling, formatting, and conditional logic for EU metadata masking. |
| `void UpdateGlobalField(IDASCommunication das, TMTGlobalKeys key, ITMTTemplate template, IConfigurationData ConfigData, String serialNumber, ushort? timeChannelId, ushort? dataChannelId, ushort? uartChannelId, int dasIndex, int bitsPerFrame)` | Updates a global field in the template. Handles program name, test ID, timestamps, DAS configuration, and streaming parameters. |
| `int GetNumberOfStreamedChannels(IDASCommunication das)` | Returns the number of streamed channels based on hardware type and module configuration. |
**Abstract Methods:**
| Signature | Description |
|-----------|-------------|
| `void UpdateValue(TMTChannelKeysEx key, string value, int channelNumber)` | Updates a channel-specific key (extended format) with the given value. |
| `void UpdateValue(TMTGlobalKeys key, string value)` | Updates a global key with the given value. |
| `void UpdateValue(TMTChannelKeys key, string value, int channelNumber)` | Updates a channel-specific key with the given value. |
| `string[] GetAllLines()` | Returns all lines in the processed template. |
---
### `TmtSingleFile` Class
Handles TMATS templates contained in a single file.
**Constructor:**
```csharp
public TmtSingleFile(string templateLocation)
```
Reads all lines from the file at `templateLocation` into memory. If the file does not exist, the internal line collection remains empty (no exception is thrown).
**Methods:**
| Signature | Description |
|-----------|-------------|
| `override void UpdateValue(TMTChannelKeysEx key, string value, int channelNumber)` | Iterates all lines, replacing occurrences of the pattern (from `TMTKey.GetKey(key)`) with `value`. |
| `override void UpdateValue(TMTGlobalKeys key, string value)` | Iterates all lines, replacing occurrences of the pattern (from `TMTKey.GetKey(key)`) with `value`. |
| `override void UpdateValue(TMTChannelKeys key, string value, int channelNumber)` | Iterates all lines, replacing occurrences of the pattern (from `TMTKey.GetKey(key, channelNumber)`) with `value`. |
| `override string[] GetAllLines()` | Returns a copy of all stored lines as an array. |
---
### `TmtSplitFile` Class
Handles TMATS templates split into two files: a DAS template and a channel template.
**Constructor:**
```csharp
public TmtSplitFile(string dasTemplate, string channelTemplate)
```
Reads lines from `dasTemplate` into `_lines` and lines from `channelTemplate` into `_channelTemplate`. Non-existent files are silently ignored.
**Methods:**
| Signature | Description |
|-----------|-------------|
| `override void UpdateValue(TMTChannelKeysEx key, string value, int channelNumber)` | Ensures a channel entry exists for `channelNumber`, then updates lines in that channel's specific copy of the template. |
| `override void UpdateValue(TMTGlobalKeys key, string value)` | Updates lines in `_lines` (the DAS template portion). |
| `override void UpdateValue(TMTChannelKeys key, string value, int channelNumber)` | Updates lines in `_lines` (the DAS template portion), using a channel-number-formatted pattern. |
| `override string[] GetAllLines()` | Concatenates `_lines` with all channel lines ordered by channel number (min to max). Returns just `_lines` if no channels exist. |
---
### `ITMTTemplate` Interface
Defines the contract for template implementations.
```csharp
void UpdateValue(TMTChannelKeysEx key, string value, int channelNumber);
void UpdateValue(TMTGlobalKeys key, string value);
void UpdateValue(TMT

View File

@@ -0,0 +1,51 @@
---
source_files:
- Common/DTS.Common/Classes/Tags/TagAssignment.cs
- Common/DTS.Common/Classes/Tags/Tag.cs
- Common/DTS.Common/Classes/Tags/TagAwareBase.cs
- Common/DTS.Common/Classes/Tags/TagsInstance.cs
generated_at: "2026-04-17T15:38:01.700774+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "8b6565afe8322597"
---
# Tag Management Module Documentation
## 1. Purpose
This module provides a comprehensive tag management system for the DTS application. It enables entities to be associated with string-based tags through a many-to-many relationship. The module consists of four core classes: `Tag` (represents individual tag records), `TagAssignment` (links tags to objects via composite relationships), `TagAwareBase` (an abstract base class for entities that can be tagged), and `TagsInstance` (a singleton cache manager for tag lookups with database synchronization). The system supports tag persistence, caching, and compatibility checking while abstracting database operations through delegate injection.
---
## 2. Public Interface
### Class: `Tag` (inherits `BasePropertyChanged`, implements `ITag`)
Represents a single tag record with an ID, text, and obsolete status.
**Constants:**
- `public const int INVALID_ID = -1` — Sentinel value indicating an invalid or unassigned tag ID.
**Constructors:**
- `public Tag(string tagText, int tagId)` — Creates a tag with specified text and ID; sets `IsObsolete` to `false`.
- `public Tag(Tag copy)` — Copy constructor; clones ID, Text, and IsObsolete from another tag.
- `public Tag(IDataReader reader)` — Hydrates from a database reader; expects columns "TagId", "Obsolete", "TagText".
- `public Tag()` — Parameterless constructor.
**Properties:**
- `public int ID { get; set; }` — The unique identifier for the tag.
- `public string Text { get; set; }` — The tag's display text; defaults to empty string.
- `public bool IsObsolete { get; set; }` — Obsolete flag; defaults to `false`.
**Methods:**
- `public object Clone()` — Returns a new `Tag` copied from this instance.
---
### Class: `TagAssignment` (inherits `BasePropertyChanged`, implements `ITagAssignment`)
Represents the assignment of a tag to a specific object.
**Constructors:**
- `public TagAssignment()`

View File

@@ -0,0 +1,15 @@
---
source_files:
- Common/DTS.Common/Classes/TestMetaData/TestEngineerDetailsDbRecord.cs
- Common/DTS.Common/Classes/TestMetaData/CustomerDetailsDbRecord.cs
- Common/DTS.Common/Classes/TestMetaData/LabratoryDetailsDbRecord.cs
generated_at: "2026-04-17T15:40:11.181815+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "07af7b27d4cdf992"
---
# Documentation: Test Metadata DB Records
## 1. Purpose

View File

@@ -0,0 +1,119 @@
---
source_files:
- Common/DTS.Common/Classes/TestSetups/SimpleHardware.cs
- Common/DTS.Common/Classes/TestSetups/TestSetupHelper.cs
- Common/DTS.Common/Classes/TestSetups/ExtraProperties.cs
- Common/DTS.Common/Classes/TestSetups/ROIPeriodChannelRecord.cs
- Common/DTS.Common/Classes/TestSetups/TestSetupHardwareRecord.cs
- Common/DTS.Common/Classes/TestSetups/TestSetupROIsRecord.cs
- Common/DTS.Common/Classes/TestSetups/CalculatedChannelRecord.cs
- Common/DTS.Common/Classes/TestSetups/ISFFile.cs
- Common/DTS.Common/Classes/TestSetups/GraphRecord.cs
- Common/DTS.Common/Classes/TestSetups/RegionOfInterest.cs
- Common/DTS.Common/Classes/TestSetups/ISFSensorRecord.cs
generated_at: "2026-04-17T15:31:22.274945+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "061f25a4b5f73dbc"
---
# Documentation: DTS.Common.Classes.TestSetups
## 1. Purpose
This module provides the data structures and helper utilities for defining, serializing, and managing test configurations within the DTS system. It encompasses hardware definitions (`SimpleHardware`, `TestSetupHardwareRecord`), data processing configurations (`CalculatedChannelRecord`, `RegionOfInterest`), graph layouts (`GraphRecord`), and legacy file format handling (`ISFFile`, `ISFSensorRecord`). It serves as the domain model layer mapping database records and interface contracts to concrete classes used throughout the application.
## 2. Public Interface
### **SimpleHardware**
Inherits from `Tuple<string, string, int, int>`. A lightweight immutable container for hardware identification.
* `SimpleHardware(string serialNumber, string parentDAS, int dasId, int dasType)` — Constructor.
* `string SerialNumber` — Gets Item1.
* `string ParentDAS` — Gets Item2.
* `int DASId` — Gets Item3.
* `int DASType` — Gets Item4.
### **TestSetupHelper**
Abstract class providing static management of test setup names.
* `static void ClearTestSetupNames()` — Clears the internal dictionary.
* `static void SetTestSetupName(int id, string name)` — Maps an ID to a name.
* `static string GetTestSetupName(int Id)` — Retrieves a name by ID; returns `string.Empty` if not found.
### **ExtraProperty**
Implements `IExtraProperty`. A key-value pair supporting `INotifyPropertyChanged` and UI commands.
* `ExtraProperty()` — Default constructor.
* `ExtraProperty(string key, string value)` — Constructor initializing key/value.
* `ExtraProperty(IExtraProperty iep)` — Copy constructor.
* `string Key` — Gets or sets the property key.
* `string Value` — Gets or sets the property value.
* `ICommand PasteCommand` — Gets or sets a command for paste operations (ignored by JSON serialization).
* `UIItemStatus ItemStatus` — Gets or sets the UI status (ignored by JSON serialization).
* `event PropertyChangedEventHandler PropertyChanged` — Notification event.
### **ROIPeriodChannelRecord**
Implements `IROIPeriodChannelRecord`. Represents a channel within a Region of Interest period.
* `ROIPeriodChannelRecord(IDataReader reader, int storedProcedureVersionToUse)` — Constructs a record from a data reader.
* `int TestSetupROIId` — Foreign key to the ROI table.
* `string ChannelName` — Name of the channel.
* `long ChannelId` — ID of the channel; defaults to -1 if `storedProcedureVersionToUse` is below `Constants.ROIPERIODCHANNELS_CHANNELID_DB_VERSION`.
### **TestSetupHardwareRecord**
Implements `ITestSetupHardwareRecord`. Represents hardware configuration for a test setup.
* `TestSetupHardwareRecord()` — Default constructor.
* `TestSetupHardwareRecord(IDataReader reader, int storedProcedureVersionToUse)` — Constructs from database reader.
* `TestSetupHardwareRecord(ITestSetupHardwareRecord copy)` — Copy constructor.
* `int DASId`, `int TestSetupId`, `bool AddDAS`, `int SamplesPerSecond`, `bool IsClockMaster`, `byte PTPDomainId`, `int AntiAliasFilterRate` — Configuration properties.
### **TestSetupROIsRecord**
Implements `ITestSetupROIRecord`. Represents a Region of Interest definition.
* `TestSetupROIsRecord(IDataReader reader)` — Constructs from database reader.
* `int TestSetupROIId`, `int TestSetupId`, `string Suffix`, `double ROIStart`, `double ROIEnd`, `bool IsEnabled`, `bool IsDefault` — ROI properties.
### **CalculatedChannelRecord**
Implements `ICalculatedChannelRecord`. Defines a derived channel based on operations on other channels.
* `CalculatedChannelRecord()` — Default constructor.
* `CalculatedChannelRecord(ICalculatedChannelRecord record)` — Copy constructor.
* `CalculatedChannelRecord(IDataReader reader)` — Constructs from database reader.
* `string Name`, `string TestSetupName`, `int Id`, `Operations Operation`, `string CalculatedValueCode`, `string[] InputChannelIds`, `string CFCForInputChannels`, `string ChannelFilterClassForOutput`, `int TestSetupId`, `bool ViewInRealtime`, `int ClipLength` — Calculation definition properties.
### **ISFFile**
Handles reading/writing ISF (fixed-width) files.
* `ISFFile()` — Constructor initializing header lines with spaces.
* `char[] HeaderLine1`, `char[] TestSetupName`, `char[] NumberOfRecords`, `char[] TestType`, `char[] TestDivision`, `char[] TCFile` — Header metadata properties.
* `IISFSensorRecord[] Records` — Gets the list of sensor records.
* `void AddRecord(IISFSensorRecord record)` — Adds a sensor record and updates the record count.
* `void WriteToFile(string pathToFile)` — Writes the header and records to a binary file.
* `void AddSensors(ISensorData[] sensors)` — Converts `ISensorData` array to `ISFSensorRecord` and adds them.
### **ArrayExtensions** (Static class in ISFFile.cs)
* `void Fill<T>(this T[] sourceArray, T with)` — Fills array with a specific value.
* `void SubFill<T>(this T[] source, T with, int startIndex, int finalIndex)` — Fills a range of the array.
* `void SetValues<T>(this T[] source, T[] with, int startIndex, int length, T pad)` — Copies values into a range, padding if necessary.
* `T[] GetValues<T>(this T[] source, int startIndex, int length)` — Extracts a segment of the array.
### **GraphRecord**
Implements `IGraphRecord`. Defines a graph layout for a test setup.
* `GraphRecord()` — Default constructor.
* `GraphRecord(IGraphRecord copy)` — Copy constructor.
* `GraphRecord(IDataReader reader)` — Constructs from database reader.
* `int GraphId`, `int TestSetupId`, `string GraphName`, `string GraphDescription`, `string ChannelsString`, `string ThresholdsString` — Identification and content.
* `bool UseDomainMin`, `double DomainMin`, `bool UseDomainMax`, `double DomainMax` — Domain axis settings.
* `bool UseRangeMin`, `double RangeMin`, `bool UseRangeMax`, `double RangeMax` — Range axis settings.
* `bool LocalOnly` — Deprecated property for DB synchronization.
### **RegionOfInterest**
Implements `IRegionOfInterest`. A mutable ROI definition with validation and event aggregation.
* `static bool Deserializing` — Flag to suppress change notifications during deserialization.
* `RegionOfInterest()`, `RegionOfInterest(bool isDefault)`, `RegionOfInterest(string suffix, bool isDefault, double start, double end)` — Constructors.
* `string Suffix` — Automatically prepends "_" if missing.
* `double Start`, `double End` — Time boundaries; enforce `Start < End` via adjustment.
* `bool IsEnabled`, `bool IsDefault` — State flags.
* `string[] ChannelNames`, `long[] ChannelIds` — Associated channels.
* `void ResetSuffix()` — Clears the suffix.
* `void SetChannelNamesNoNotify(string[] names)`, `void SetChannelIdsNoNotify(long[] ids)` — Mutators that bypass `NotifyChanged`.
* `static string GetAnalogChanName(...)` — Formats channel names for specific hardware types.
* `static string GetChanName(...)` — Formats channel names based on serial number and hardware.
* `static string RemoveParentDASName(string entireChannelName)` — Strips parent DAS prefix.
* `static string RemoveAssignedByIDFromHardwareString(string chHardware)` — Cleans up hardware string formatting.
### **ISFSensorRecord**
Implements `IISFSensorRecord`. Represents a sensor in an ISF file (4 records of

View File

@@ -0,0 +1,13 @@
---
source_files:
- Common/DTS.Common/Classes/WinApi/WindowsAPIHelpers.cs
generated_at: "2026-04-17T16:27:17.172309+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "43d9b9a0941ed121"
---
# WinApi
### Purpose
The `WindowsAPIHelpers` class provides Windows API interop

View File

@@ -0,0 +1,45 @@
---
source_files:
- Common/DTS.Common/Classes/WindowsFolder/WindowsFolder.cs
generated_at: "2026-04-17T16:10:35.131948+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "f5091c5260aad238"
---
# WindowsFolder
### Purpose
Provides utility functionality for opening Windows filesystem folders via Windows Explorer. This module exists to abstract the process of launching Explorer to display specific application directories, such as the Manuals folder, which contains documentation files for the DTS.Suite application.
### Public Interface
**`WindowsFolder` (class)**
- Static utility class for opening Windows folders.
**`public static void OpenManualsFolder(string path)`**
- Opens Windows Explorer to display the Manuals folder located at the specified path.
- Combines the provided `path` with `Constants.ManualsFolder` to construct the full path.
- Launches `Constants.WindowsExplorer` as a new process with the constructed path as an argument.
### Invariants
- The `path` parameter must be a valid filesystem path; no validation is performed within the method.
- The method assumes the Manuals folder exists within the provided `path` directory.
- `Constants.ManualsFolder` and `Constants.WindowsExplorer` must be defined and accessible.
### Dependencies
**This module depends on:**
- `System.IO.Path` - for path combination
- `System.Diagnostics.Process` and `ProcessStartInfo` - for launching Explorer
- `Constants.ManualsFolder` - constant defining the Manuals folder name
- `Constants.WindowsExplorer` - constant defining the Explorer executable path
**What depends on this module:**
- Not determinable from source alone.
### Gotchas
- The XML documentation mentions a default path of `C:\DTS\DTS.Suite\(version)\DataPRO\Manuals` but the method relies on the caller to provide the correct base path.
- No error handling is present; if the path is invalid or Explorer cannot be started, an exception will propagate to the caller.
- The method does not verify the folder exists before attempting to open it.
---

View File

@@ -0,0 +1,210 @@
---
source_files:
- Common/DTS.Common/Constant/XamlConstants.xaml.cs
- Common/DTS.Common/Constant/DigitalInputs.cs
- Common/DTS.Common/Constant/EmbeddedSensors.cs
- Common/DTS.Common/Constant/Constants.cs
generated_at: "2026-04-17T15:38:05.950870+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "fa6c5368d806d741"
---
# Documentation: DTS.Common.Constant Namespace
## 1. Purpose
This module provides a centralized collection of constant values, configuration defaults, and runtime-adjustable parameters for the DTS (Data Translation System) application. It encompasses hardware-specific thresholds for digital inputs, embedded sensor operational ranges and sample rates, CAN/CAN-FD communication parameters, and miscellaneous system-wide constants including database version markers, file extensions, clock synchronization profiles, and UI configuration values. The module serves as the single source of truth for magic numbers, hardware limits, and default settings used throughout the system.
---
## 2. Public Interface
### Class: `XamlConstants` (partial)
**File:** `XamlConstants.xaml.cs`
**Namespace:** `DTS.Common.Constant`
```
public partial class XamlConstants
```
An empty partial class. The XAML counterpart and actual constants are not visible in the provided source.
---
### Class: `DigitalInputs` (static)
**File:** `DigitalInputs.cs`
**Namespace:** `DTS.Common.Constant`
**Constants:**
```
public const double ConstantCurrentBreakPointDefault = 19005D;
public const double VoltageInputBreakPointDefault = 19661D;
public const bool DisplaySPDADCDefault = false;
```
**Static Properties:**
```
public static double ConstantCurrentBreakPoint { get; set; } // Default: 19005D
public static double VoltageInputBreakPoint { get; set; } // Default: 19661D
public static bool DisplaySPDADC { get; set; } // Default: false
```
- `ConstantCurrentBreakPoint` / `ConstantCurrentBreakPointDefault`: Threshold for contact closure detection (value 19005).
- `VoltageInputBreakPoint` / `VoltageInputBreakPointDefault`: Threshold for voltage input modes THL and TLH (value 19661, approximately 1.5V with signal grounded).
- `DisplaySPDADC` / `DisplaySPDADCDefault`: Controls visibility of SLICE Pro Digital analog ADC display.
---
### Class: `EmbeddedSensors` (static)
**File:** `EmbeddedSensors.cs`
**Namespace:** `DTS.Common.Constant`
**Power Management Constants:**
```
public const int MotionDetectInactivitySMaximum = 300; // 5 minutes
public const int MagnetTimeoutMsMaximum = 300000; // 5 minutes
```
**Sensor Range Constants:**
```
public const double EmbeddedLowGLinearAccelerometerRange = 8;
public const double EmbeddedHighGLinearAccelerometerRange = 400;
public const double EmbeddedAngularAccelerometerRange = 2000;
public const double EmbeddedAngularRateSensorRange = 2000;
public const double HumidityMinimum = 10;
public const double HumidityMaximum = 100;
public const double PressureMinimum = 5;
public const double PressureMaximum = 15;
public const double TemperatureMinimum = 0;
public const double TemperatureMaximum = 65;
```
**Timed Event Constants:**
```
public const double TimedIntervalEventDurationMsMinimum = 30;
public const double TimedIntervalEventDurationMsMaximum = 300000; // 5 minutes
public const double TimedIntervalNumberOfEventsMaximum = 100;
public const int IntervalBetweenEventStartsMinutesMaximum = 1440; // 24 hours
```
**Sample Rate Constants (Min/Max/Default):**
```
// Low-G Linear Accelerometer
public const double EmbeddedLowGLinearAccelerometerSampleRateMinimum = 1;
public const double EmbeddedLowGLinearAccelerometerSampleRateMaximum = 6400;
public const int DefaultEmbeddedLowGLinearAccelerometerSampleRate = 6400;
// High-G Linear Accelerometer
public const double EmbeddedHighGLinearAccelerometerSampleRateMinimum = 1;
public const double EmbeddedHighGLinearAccelerometerSampleRateMaximum = 5120;
public const int DefaultEmbeddedHighGLinearAccelerometerSampleRate = 5120;
// Angular Accelerometer
public const double EmbeddedAngularAccelerometerSampleRateMinimum = 1;
public const double EmbeddedAngularAccelerometerSampleRateMaximum = 1600;
public const int DefaultEmbeddedAngularAccelerometerSampleRate = 1600;
// Angular Accelerometer and Rate Sensor
public const double EmbeddedAngularAccelerometerAndRateSensorSampleRateMinimum = 1;
public const double EmbeddedAngularAccelerometerAndRateSensorSampleRateMaximum = 5120;
public const int DefaultEmbeddedAngularAccelerometerAndRateSensorSampleRate = 5120;
// Atmospheric Sensor
public const double EmbeddedAtmosphericSensorSampleRateMinimum = 1;
public const double EmbeddedAtmosphericSensorSampleRateMaximum = 157;
public const int DefaultEmbeddedAtmosphericSensorSampleRate = 157;
```
**Baud Rate Constants:**
```
public const uint BAUD_RATE_MIN = 96;
public const uint BAUD_RATE_DEFAULT = 57600;
public const uint BAUD_RATE_MAX = 921600;
public static readonly uint[] BAUD_RATES = { 300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200, 614400, 806400, 921600 };
```
**CAN/CAN-FD Constants:**
```
public const bool CANISFD_DEFAULT = true;
// Arbitration/Base Bitrate
public const int CANFD_ARB_BASE_BITRATE_MIN = 500000;
public const int CANFD_ARB_BASE_BITRATE_MAX = 1000000;
public const int CANFD_ARB_BASE_BITRATE_DEFAULT = 1000000;
public static readonly int[] CANFD_ARBBASEBITRATE_VALUES = { 500000, 1000000 };
public const int NON_CANFD_ARB_BASE_BITRATE_MIN = 50000;
public const int NON_CANFD_ARB_BASE_BITRATE_MAX = 500000;
public const int NON_CANFD_ARB_BASE_BITRATE_DEFAULT = 500000;
public static readonly int[] NON_CANFD_ARBBASEBITRATE_VALUES = { 50000, 62000, 83000, 100000, 125000, 250000, 500000 };
// Data Bitrate
public const int DATA_BITRATE_DEFAULT = 4000000;
public static readonly int[] DATABITRATE_VALUES = { 500000, 1000000, 2000000, 4000000, 8000000 };
// SJW (Synchronization Jump Width) values for various configurations
public const int DATA_SJW_DEFAULT = 2;
public const int DATA_SJW_MIN = 1;
// Multiple SJW arrays for different bitrate configurations (see source for full list)
```
**Filetype Constants:**
```
public const string FILETYPE_DEFAULT = "asc";
public static readonly string[] FILETYPE_VALUES = { "asc", "blf" };
```
---
### Class: `Constants` (static)
**File:** `Constants.cs`
**Namespace:** `DTS.Common`
**Timeout Constants:**
```
public const int GETARMSTATUS_TIMEOUT = 30000;
public const int EXECUTABLE_TIMEOUT = 30000;
public static int PING_ICMP_TIMEOUT { get; set; } = 500;
```
**Graph Auto-Zoom Constants:**
```
public const double GRAPH_MIN_AUTOZOOM = 0.01D; // 1% of full scale
public const double GRAPH_MAX_AUTOZOOM = 1.2D; // 120% of signal
```
**Runtime-Adjustable Properties:**
```
public static bool CheckStatusLinesInRealtime { get; set; } = true;
public static int UpdateIntervalRealtimeCharts { get; set; } = 100;
```
**File Extension Constants:**
```
public const string BACKUP_HEADER_EXTENSION = ".header.bak";
public const string BACKUP_FILE_EXTENSION = ".bak";
public const string TEMP_FILE_EXTENSION = ".tmp";
public const string CHANNEL_FILE_EXTENSION = ".chn";
public const string BINARY_FILE_EXTENSION = ".bin";
```
**Directory/Path Constants:**
```
public const string DAS_TEST_SETUPS = "DASTestSetup";
public const string DAS_CONFIGS = "DASConfigs";
public const string REPORT_DIR_NAME = "Reports";
public const string REPORT_TEMPLATE_DIR_NAME = "ReportTemplates";
public const string ManualsFolder = "Manuals";
```
**Database Version Constants:**
```
public const int TRACK_ANALOG_DIAGNOSTICS_DB_VERSION = 98;
public const int ALIGNUDPTOPPS_DB_VERSION = 98;
public const int ROITables_DB_VERSION = 92;
public const int EnableRepeat_DB_VERSION = 92;
public const int IgnoreShorted_DB_VERSION = 92;
public const int ONEPPS_OUT_DB_VERSION = 92;
public const int UNIX_EPOCH_TIME = 93;
public

View File

@@ -0,0 +1,155 @@
---
source_files:
- Common/DTS.Common/Constant/DASSpecific/TDAS.cs
- Common/DTS.Common/Constant/DASSpecific/SLICE.cs
- Common/DTS.Common/Constant/DASSpecific/PowerPRO.cs
- Common/DTS.Common/Constant/DASSpecific/SLICE2_TOM.cs
- Common/DTS.Common/Constant/DASSpecific/SLICEDB.cs
- Common/DTS.Common/Constant/DASSpecific/SLICE2.cs
- Common/DTS.Common/Constant/DASSpecific/SLICE1_5.cs
- Common/DTS.Common/Constant/DASSpecific/SLICE6DB.cs
- Common/DTS.Common/Constant/DASSpecific/SLICE6.cs
- Common/DTS.Common/Constant/DASSpecific/SLICE6AIRBR.cs
- Common/DTS.Common/Constant/DASSpecific/SLICE6AIRTC.cs
- Common/DTS.Common/Constant/DASSpecific/SliceProDB.cs
- Common/DTS.Common/Constant/DASSpecific/TSRAIR.cs
- Common/DTS.Common/Constant/DASSpecific/SLICE6AIR.cs
generated_at: "2026-04-17T15:30:30.128940+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "76ddf4c169177787"
---
# DAS-Specific Constants Module Documentation
## 1. Purpose
This module provides hardware-specific constants and capability detection logic for various Data Acquisition System (DAS) devices within the DTS ecosystem. Each class encapsulates the unique characteristics of a specific DAS model—including maximum anti-aliasing filter rates, protocol version thresholds for feature enablement, and runtime capability queries for recording modes, streaming profiles, and clock synchronization options. This abstraction allows higher-level code to query device capabilities without hardcoding hardware-specific logic throughout the codebase.
---
## 2. Public Interface
### TDAS
| Member | Signature | Description |
|--------|-----------|-------------|
| `MaxAAFilterRateHz` | `public const uint` | Maximum anti-aliasing filter rate: **4300 Hz** |
### SLICE
| Member | Signature | Description |
|--------|-----------|-------------|
| `MaxAAFilterRateHz` | `public const uint` | Maximum anti-aliasing filter rate: **30000 Hz** |
### PowerPRO
| Member | Signature | Description |
|--------|-----------|-------------|
| `MaxAAFilterRateHz` | `public const uint` | Maximum anti-aliasing filter rate: **20000 Hz** |
| `MIN_PROTOCOL_VER` | `public const byte` | Minimum protocol version: **1** |
| `DIAGNOS_SHUNT_DAC` | `public const byte` | Protocol version for shunt DAC diagnostics: **2** |
| `MIN_PROTOCOL_QUERYMACTABLE` | `public const byte` | Protocol version for MAC table queries: **9** |
| `MIN_PROTOCOL_MEASUREPOWERPROALLDIAGNOSTICCHANNEL` | `public const byte` | Protocol version for measuring all diagnostic channels: **12** |
### SLICE2_TOM
| Member | Signature | Description |
|--------|-----------|-------------|
| `IsRecordingModeSupported` | `public static bool IsRecordingModeSupported(RecordingModes mode, int protocolVersion)` | Returns `true` for `CircularBuffer`, `MultipleEventCircularBuffer`, `Recorder`, `MultipleEventRecorder`, `HybridRecorder`, `MultipleEventHybridRecorder`, `ContinuousRecorder`; `false` for all others. Note: `protocolVersion` parameter is accepted but not used in logic. |
### SLICEDB
| Member | Signature | Description |
|--------|-----------|-------------|
| `MaxAAFilterRateHz` | `public const uint` | Maximum anti-aliasing filter rate: **200000 Hz** |
| `MIN_PROTOCOL_VER` | `public const byte` | Minimum protocol version: **1** |
| `MIN_PROTOCOL_ARM` | `public const byte` | Protocol version for arm functionality: **2** |
| `MIN_PROTOCOL_ENABLEFAULTCHECKING` | `public const byte` | Alias for `MIN_PROTOCOL_ARM`: **2** |
| `MIN_PROTOCOL_DIAGNOSTICS` | `public const byte` | Protocol version for diagnostics: **3** |
| `MIN_PROTOCOL_ONOVERRIDE` | `public const byte` | Protocol version for ON override: **4** |
| `MIN_PROTOCOL_OMAP_GPIO` | `public const byte` | Alias for `MIN_PROTOCOL_ONOVERRIDE`: **4** |
| `MIN_PROTOCOL_INITHARDWAREINPUTLINES` | `public const byte` | Alias for `MIN_PROTOCOL_ONOVERRIDE`: **4** |
| `MIN_PROTOCOL_BASECALDATE` | `public const byte` | Protocol version for ECM Caldate support: **5** |
| `MIN_PROTOCOL_QUERYMACTABLE` | `public const byte` | Protocol version for MAC table queries: **9** |
| `MIN_PROTOCOL_TILT` | `public const byte` | Protocol version for tilt support: **14** |
### SLICE2
| Member | Signature | Description |
|--------|-----------|-------------|
| `MaxAAFilterRateHz` | `public const uint` | Maximum anti-aliasing filter rate: **200000 Hz** |
| `SLICE1_5_BASETYPE` | `public const int` | Base type identifier: **2** |
| `SLICEPRO_DIM_BASETYPE` | `public const int` | Base type identifier: **3** |
| `SLICEPRO_TOM_BASETYPE` | `public const int` | Base type identifier: **5** |
| `MIN_PROTOCOL_VER` | `public const byte` | Minimum protocol version: **128** |
| `FILE_DATA` | `public const int` | Protocol feature constant: **133** |
| `MULTIPLE_EVENTS` | `public const int` | Protocol feature constant: **134** |
| `STACK_SENSORS` | `public const int` | Protocol feature constant: **136** |
| `STACK_FIRMWARE_UPDATE` | `public const int` | Protocol feature constant: **137** |
| `DIAGNOSTIC_TWO_VOLT_EXCITATION` | `public const int` | Protocol feature constant: **138** |
| `QUERY_ARM_AND_TRIGGER_STATUS_TIME_LEFT_IN_ARM` | `public const int` | Protocol feature constant: **139** |
| `MIN_PROTOCOL_VER_GEN3` | `public const byte` | Gen3 minimum protocol version: **140** |
| `SLICE2_ONE_WIRE_ID` | `public const int` | Protocol feature constant: **142** |
| `EVENT_ARM_ATTEMPTS` | `public const int` | Protocol feature constant: **145** |
| `MEASURE_INTERNAL_OFFSET` | `public const int` | Protocol feature constant: **149** |
| `START_REC_DELAY_IN_SECONDS` | `public const int` | Protocol feature constant: **150** |
| `START_REALTIME_STREAM` | `public const int` | Protocol feature constant: **152** |
| `HALF_BRIDGE_SIG_PLUS_SUPPORT` | `public const int` | Protocol feature constant: **154** |
### SLICE1_5
| Member | Signature | Description |
|--------|-----------|-------------|
| `MaxAAFilterRateHz` | `public const uint` | Maximum anti-aliasing filter rate: **40000 Hz** |
| `MIN_PROTOCOL_VER` | `public const byte` | Minimum protocol version: **1** |
| `QUERY_ARM_AND_TRIGGER_STATUS_TIME_LEFT_IN_ARM` | `public const int` | Protocol feature constant: **2** |
| `IGNORE_SHORTED_START_EVENT` | `public const int` | Protocol feature constant: **4** |
| `START_REC_DELAY_IN_SECOND` | `public const int` | Protocol feature constant: **5** |
| `MEASURE_INTERNAL_OFFSET` | `public const int` | Protocol feature constant: **6** |
| `START_REALTIME_STREAM` | `public const int` | Protocol feature constant: **7** |
| `BASE_PLUS_MIN_MULTIEVENT_HYBRID_PROTOCOL` | `public const int` | Protocol version for multi-event hybrid: **8** |
| `IsRecordingModeSupported` | `public static bool IsRecordingModeSupported(RecordingModes mode, int protocolVersion)` | Returns `true` for `CircularBuffer`, `Recorder`, `MultipleEventCircularBuffer`, `MultipleEventRecorder`, `HybridRecorder`, `ContinuousRecorder`. For `MultipleEventHybridRecorder`, requires `protocolVersion >= 8`. Returns `false` for all others. |
### SLICE6DB
| Member | Signature | Description |
|--------|-----------|-------------|
| `MaxAAFilterRateHz` | `public const uint` | Maximum anti-aliasing filter rate: **200000 Hz** |
| `MIN_PROTOCOL_VER` | `public const byte` | Minimum protocol version: **1** |
| `MIN_PROTOCOL_QUERYTEMPLOGFILE` | `public const byte` | Protocol version for temp log file queries: **8** |
| `MIN_PROTOCOL_QUERYMACTABLE` | `public const byte` | Protocol version for MAC table queries: **9** |
| `MIN_PROTOCOL_TILT` | `public const byte` | Protocol version for tilt support: **14** |
| `CLOCKSYNCPROFILE` | `public const int` | Protocol version for clock sync profiles: **18** |
| `PTP_DOMAIN_ID_VER` | `public const int` | Protocol version for PTP Domain ID: **18** |
| `IsClockSyncProfileSupported` | `public static bool IsClockSyncProfileSupported(ClockSyncProfile profile, int protocolVersion)` | Returns `true` for `None` always. For `Manual`, returns `true` only if `protocolVersion < 18`. For `Master_E2E` and `Slave_E2E`, returns `true` if `protocolVersion >= 18`. |
### SLICE6
| Member | Signature | Description |
|--------|-----------|-------------|
| `MaxAAFilterRateHz` | `public const uint` | Maximum anti-aliasing filter rate: **20000 Hz** |
| `MIN_PROTOCOL_VER` | `public const int` | Minimum protocol version: **1** |
| `DIAGNOS_SHUNT_DAC` | `public const int` | Protocol feature constant: **2** |
| `START_REC_DELAY_IN_SECONDS` | `public const int` | Protocol feature constant: **3** |
| `IN_SLICE_TILT_SENSOR_ADC_PRE` | `public const int` | Protocol feature constant: **4** |
| `STACK_SENSORS` | `public const int` | Protocol feature constant: **5** |
| `START_REALTIME_STREAM` | `public const int` | Protocol feature constant: **11** |
| `UDP_REALTIME_STREAM` | `public const int` | Protocol feature constant: **14** |
| `CLOCKSYNCPROFILE` | `public const int` | Protocol version for clock sync profiles: **21** |
| `PTP_DOMAIN_ID_VER` | `public const int` | Protocol version for PTP Domain ID: **21** |
| `IsRecordingModeSupported` | `public static bool IsRecordingModeSupported(RecordingModes mode, int protocolVersion)` | Returns `true` for `CircularBuffer`, `Recorder`, `MultipleEventCircularBuffer`, `MultipleEventRecorder`, `HybridRecorder`, `MultipleEventHybridRecorder`, `ContinuousRecorder`, `MultipleEventRAMActive`, `RAMActive`. Returns `false` for all others. |
| `IsStreamingProfileSupported` | `public static bool IsStreamingProfileSupported(UDPStreamProfile profile, int protocolVersion)` | Returns `true` only for `RTCStreaming` and `DTS_UDP`. Returns `false` for all others. |
| `IsClockSyncProfileSupported` | `public static bool IsClockSyncProfileSupported(ClockSyncProfile profile, int protocolVersion)` | Returns `true` for `None` always. For `Manual`, returns `true` if `protocolVersion > 1`. For `Slave_E2E`, returns `true` if `protocolVersion >= 21`. Returns `false` for all others. |
### SLICE6AIRBR
| Member | Signature | Description |
|--------|-----------|-------------|
| `MIN_PROTOCOL_VER` | `public const int` | Minimum protocol version: **1** |
| `ADC_SAMPLES_PER_PACKET_VER` | `public const int` | Protocol version for ADC samples per packet: **47** |
| `UDPALIGNONPPS_PROTOCOL` | `public const int` | Protocol version for UDP align on PPS: **51** |
| `MaxAAFilterRateHz` | `public const uint` | Maximum anti-aliasing filter rate: **50000 Hz** |
| `IsRecordingModeSupported` | `public static bool IsRecordingModeSupported(RecordingModes mode, int protocolVersion)` | Returns `true` for extensive list of modes including `CircularBuffer`, `Recorder`, `HybridRecorder`, `ContinuousRecorder`, `S6A_DeviceStreamingOnly`, `RAMActive`, `RecordOnBoot`, `HybridAndStream`, and their multiple-event variants. Returns `false` for others. |
| `IsStreamingProfileSupported` | `public static bool IsStreamingProfileSupported(UDPStreamProfile profile, int protocolVersion)` | Returns `true` for `RTCStreaming`, `DTS_UDP`, all `CH10_*` profiles, `TMNS_*` profiles, and `IENA_PTYPE_STREAM`. |
| `IsClockSyncProfileSupported` | `public static bool IsClockSyncProfileSupported(ClockSyncProfile profile, int protocolVersion)` | Returns `true` for `None`, `Master_E2E`, `Slave_E2E`. Returns `false` for all others. |
### SLICE6AIRTC
| Member | Signature | Description |
|--------|-----------|-------------|
| `MIN_PROTOCOL_VER` | `public const int` | Minimum protocol version: **1** |
| `ADC_SAMPLES_PER_PACKET_VER` | `public const int` | Protocol version for ADC samples per packet: **1** |
| `MULTIPLE_CONFIGURATIONS_VER` | `public const int` | Protocol version for multiple configurations: **100** |
| `ThermocouplersPerModule` | `public const int` | Number of thermocouplers per module: **8** |
| `IsRecordingModeSupported` | `public static bool IsRecordingModeSupported(RecordingModes mode)` | Returns `true` only for `S6A_DeviceStreamingOnly`. Note: No protocol version parameter. |
|

View File

@@ -0,0 +1,283 @@
---
source_files:
- Common/DTS.Common/Controls/RoundedBox.xaml.cs
- Common/DTS.Common/Controls/TestIDView.xaml.cs
- Common/DTS.Common/Controls/checkbox.xaml.cs
- Common/DTS.Common/Controls/GridLengthAnimation.cs
- Common/DTS.Common/Controls/ISOPopup.xaml.cs
- Common/DTS.Common/Controls/LookupPopup.xaml.cs
- Common/DTS.Common/Controls/TestIdPreFixSuffixHelper.cs
- Common/DTS.Common/Controls/AutoSizedGridView.cs
- Common/DTS.Common/Controls/TestIDTestBox.xaml.cs
- Common/DTS.Common/Controls/DynamicGrid.cs
- Common/DTS.Common/Controls/TestIDViewModel.cs
- Common/DTS.Common/Controls/TestIDControl.xaml.cs
- Common/DTS.Common/Controls/GridViewColumnHeaderSelectable.xaml.cs
- Common/DTS.Common/Controls/IPTextBox.xaml.cs
- Common/DTS.Common/Controls/GridViewColumnHeaderSearchable.xaml.cs
generated_at: "2026-04-17T15:28:10.757079+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "6f3f540e08a3809f"
---
# DTS.Common.Controls Documentation
## 1. Purpose
The `DTS.Common.Controls` namespace provides a collection of custom WPF controls and helper classes for the DTS application. It includes specialized input controls (IP address entry, test ID input), animated grid components, popup dialogs for lookups and ISO entry, dynamic layout containers, and enhanced GridView column headers with search and selection capabilities. The module serves as a reusable UI component library supporting data entry validation, event-driven communication via Prism's EventAggregator, and MVVM-compatible bindable controls.
---
## 2. Public Interface
### RoundedBox
```csharp
public partial class RoundedBox : UserControl
public RoundedBox()
public void Connect(int connectionId, object target)
```
A simple UserControl. The `Connect` method is defined but contains commented-out code and effectively does nothing.
### TestIDView
```csharp
public partial class TestIDView : UserControl
public TestIDView()
```
A simple UserControl with no additional public members beyond the constructor.
### checkbox
```csharp
public partial class checkbox
public void ToolTipEventHandler(object sender, ToolTipEventArgs e)
```
Handles tooltip events by marking them handled and publishing a `HelpTextEvent` via the `IEventAggregator`.
### GridLengthAnimation
```csharp
public class GridLengthAnimation : AnimationTimeline
public GridLengthAnimation()
public GridLength From { get; set; } // DependencyProperty
public GridLength To { get; set; } // DependencyProperty
public override Type TargetPropertyType { get; } // Returns typeof(GridLength)
public override object GetCurrentValue(object defaultOriginValue, object defaultDestinationValue, AnimationClock animationClock)
protected override Freezable CreateInstanceCore()
```
Custom animation timeline for animating `GridLength` values. Supports both `Star` and `Pixel` unit types based on the `To` value.
### ISOPopup
```csharp
public partial class ISOPopup : Popup
public ISOPopup()
```
A Popup control with private event handlers (`ISOPart_OnPreviewKeyUp`, `ISOPart_OnGotMouseCapture`, `ISOPart_OnGotKeyboardFocus`) that restrict input to alphanumeric characters and select all text on focus.
### LookupPopup
```csharp
public partial class LookupPopup : Popup
public LookupPopup()
public IEnumerable<IChannelCode> AllChannelCodes { get; private set; }
public IList PossibleChannels { get; set; } // DependencyProperty
public delegate void ChannelCodeSelectedEventHandler(object sender, string code, string name)
public event ChannelCodeSelectedEventHandler ChannelCodeSelected
```
A Popup for selecting channel codes from a DataGrid. Raises `ChannelCodeSelected` event on double-click with `Code` and `Name` properties extracted via reflection.
### TestIdPreFixSuffixHelper & Related Classes
```csharp
public enum TestIdFixedPrefixSuffixValues { NotFixed = -1, None = 0, TimeStamp = 1, TestSetupName = 2 }
public class TestIdPreFixSuffix
public TestIdPreFixSuffix(TestIdFixedPrefixSuffixValues fixedPrefixSuffix)
public TestIdPreFixSuffix(string dbPrefixSuffix)
public TestIdFixedPrefixSuffixValues FixedValue { get; }
public override string ToString()
public class TestIdPreFixSuffixHelper : BasePropertyChanged
public TestIdPreFixSuffixHelper(string testIdPreFixSuffix)
public TestIdPreFixSuffixHelper(TestIdFixedPrefixSuffixValues testIdPreFixSuffix)
public TestIdPreFixSuffix TestIdPreFixSuffix { get; }
public override string ToString()
public override bool Equals(object obj)
```
Helper classes for managing test ID prefix/suffix values with support for fixed types (None, TimeStamp, TestSetupName) and custom database values.
### AutoSizedGridView
```csharp
public class AutoSizedGridView : GridView
protected override void PrepareItem(ListViewItem item)
```
Custom GridView that tracks auto-width columns and width-bound columns, forcing re-measurement and re-binding as needed during item preparation.
### TestIDTextBox
```csharp
public partial class TestIDTextBox : UserControl
public TestIDTextBox()
public void Clear()
public string Text { get; set; } // DependencyProperty, two-way binding by default
```
A UserControl for test ID input that validates against invalid filename/path characters and the period character.
### DynamicGrid
```csharp
public class DynamicGrid : Grid, INotifyPropertyChanged
public DynamicGrid()
public byte GridColumns { get; set; } // Default: 2
public void Refresh()
public event PropertyChangedEventHandler PropertyChanged
```
A Grid that automatically arranges children in a specified number of columns. The last column uses `Star` sizing; others use `Auto`. Implements `INotifyPropertyChanged`.
### TestIDViewModel
```csharp
public class TestIDViewModel : INotifyPropertyChanged
public string TestSetupLabel { get; set; }
public Visibility TestSetupLabelVisibility { get; }
public string TestIdEditableText { get; set; }
public void PopulateAllTestIdPrefixSuffixValues(string[] serializedValues)
public TestIdPreFixSuffixHelper[] AllTestIdPrefixSuffixValues { get; }
public TestIdPreFixSuffixHelper SelectedTestIdPrefixValueItem { get; set; } // Default: None
public TestIdPreFixSuffixHelper SelectedTestIdSuffixValueItem { get; set; } // Default: TimeStamp
public string TestName { get; set; }
public string GetTestId()
public string GetTestIdTimestamp()
public event PropertyChangedEventHandler PropertyChanged
```
ViewModel for constructing test IDs from prefix, label, editable text, and suffix components.
### TestIdControl
```csharp
public partial class TestIdControl : UserControl, INotifyPropertyChanged
public TestIdControl()
public string TestSetupLabel { get; set; }
public Visibility TestSetupLabelVisibility { get; }
public string TestIdEditableText { get; set; }
public void PopulateAllTestIdPrefixSuffixValues(string[] serializedValues)
public TestIdPreFixSuffixHelper[] AllTestIdPrefixSuffixValues { get; }
public TestIdPreFixSuffixHelper SelectedTestIdPrefixValueItem { get; set; } // Default: None
public TestIdPreFixSuffixHelper SelectedTestIdSuffixValueItem { get; set; } // Default: TimeStamp
public string TestName { get; set; }
public string GetTestId()
public string GetTestIdTimestamp()
public event PropertyChangedEventHandler PropertyChanged
```
**Marked for removal** per source comment. Nearly identical to `TestIDViewModel` but as a UserControl. Intended to be removed after TTS module deletion and migration to new test setup wizard.
### GridViewColumnHeaderSelectable
```csharp
public partial class GridViewColumnHeaderSelectable : UserControl, IBasePropertyChanged
public GridViewColumnHeaderSelectable()
public string ListviewId { get; set; } // DependencyProperty
public string HeaderTitle { get; set; } // DependencyProperty, default: "Awesome"
public bool ToggleButtonIsChecked { get; set; } // DependencyProperty, default: false
public event RoutedEventHandler OpenChanged // Bubbling routed event
public event RoutedEventHandler ClickHandler // Bubbling routed event
public event RoutedEventHandler SelectAll // Bubbling routed event
public event PropertyChangedEventHandler PropertyChanged
public override string ToString()
```
A column header with a toggle button popup supporting select-all/clear-all functionality. Subscribes to `ListViewStatusEvent` for unload handling.
### IPTextBox
```csharp
public partial class IPTextBox : UserControl
public IPTextBox()
public void Clear()
public string Address { get; set; } // DependencyProperty, two-way binding by default
```
An IP address input control with four segments. Handles navigation between segments, digit-only input, period key for segment advancement, and paste validation.
### GridViewColumnHeaderSearchable
```csharp
public partial class GridViewColumnHeaderSearchable : UserControl, IBasePropertyChanged
public GridViewColumnHeaderSearchable()
public string ListviewId { get; set; } // DependencyProperty
public string HeaderTitle { get; set; } // DependencyProperty, default: "Awesome"
public string HeaderSearchTerm { get; set; } // DependencyProperty
public bool ToggleButtonIsChecked { get; set; } // DependencyProperty, default: false
public Geometry ToggleIconGeometry { get; }
public event RoutedEventHandler OpenChanged // Bubbling routed event
public event RoutedEventHandler ClickHandler // Bubbling routed event
public event RoutedEventHandler Search // Bubbling routed event
public event PropertyChangedEventHandler PropertyChanged
public override string ToString()
```
A searchable column header with a popup containing a search textbox. Raises `Search` event on term change. Subscribes to `ListViewStatusEvent` for unload handling.
### BoolToInvertedBoolConverter
```csharp
public class BoolToInvertedBoolConverter : IValueConverter
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
public object ConvertBack(...) // Throws NotImplementedException
```
Value converter that inverts boolean values.
---
## 3. Invariants
- **GridLengthAnimation**: The `To.IsStar` property determines the `GridUnitType` of the resulting `GridLength` in `GetCurrentValue()`. The animation direction (expanding vs. collapsing) is determined by comparing `From.Value` to `To.Value`.
- **ISOPopup**: Input is restricted to A-Z, 0-9 (both main keyboard and numpad), and control keys (Enter, Return, Tab, OemBackTab, Delete, Back, Home, End, OemQuestion). All other keys are handled (suppressed).
- **LookupPopup**: The `PossibleChannels` list items must have `Code` and `Name` properties accessible via reflection for the `ChannelCodeSelected` event to function correctly.
- **TestIDTextBox**: Text cannot contain invalid filename characters, invalid path characters, or periods (`.`). The `Text` property binds two-way by default.
- **IPTextBox**: Each segment accepts up to 3 digits. The `Address` property format is `{0}.{1}.{2}.{3}`. The control automatically advances focus when a segment reaches 3 characters or period is pressed.
- **DynamicGrid**: `GridColumns` must be a `byte` value. The last column always uses `GridUnitType.Star`; all preceding columns use `GridUnitType.Auto`. An extra row with `Star` height is always added at the end.
- **TestIdPreFixSuffixHelper.Equals()**: Two instances are equal if their `FixedValue` properties match and are not `NotFixed`, OR if `FixedValue` is `NotFixed` and their string representations match.
- **GridViewColumnHeaderSelectable/GridViewColumnHeaderSearchable**: The `HeaderTitle` default value is `"Awesome"`. These controls require a resolved `IEventAggregator` from `ContainerLocator.Container` at construction time.
---
## 4. Dependencies
### External Dependencies (Imports)
- **System.Windows.Controls** - Base UserControl, GridView, ListView, Popup, TextBox, DataGrid
- **System.Windows** - DependencyObject, DependencyPropertyChangedEventArgs, FrameworkPropertyMetadata, GridLength, GridUnitType, Visibility, RoutedEvent, EventManager
- **System.Windows.Input** - Key, KeyEventArgs, KeyboardFocusChangedEventArgs, MouseButtonEventArgs, ModifierKeys, TraversalRequest, FocusManager
- **System.Windows.Media.Animation** - AnimationTimeline, AnimationClock
- **System.Windows.Data** - BindingExpression, BindingOperations, IValueConverter
- **System.Windows.Controls.Primitives** - Popup base class
- **System.ComponentModel** - INotifyPropertyChanged, PropertyChangedEventArgs
- **System.IO** - Path (for invalid character validation)
- **Prism.Ioc** - ContainerLocator
- **Prism.Events** - IEventAggregator, ThreadOption, PubSubEvent
### Internal Dependencies
- **DTS.Common.Events** - `HelpTextEvent`, `HelpTextEventArg`, `ListViewStatusEvent`, `ListViewStatusArg`
- **DTS.Common.Base** - `BasePropertyChanged`, `IBasePropertyChanged`
- **DTS.Common.Interface.Channels.ChannelCodes** - `IChannelCode`
- **DTS.Common.Utilities.Logging** - Referenced in `GridViewColumnHeaderSelectable` and `GridViewColumnHeaderSearchable` (usage not visible in provided source)
- **Strings.Strings** - ResourceManager for localized strings in `TestIdPreFixSuffixHelper.ToString()`
### Consumers
- Unknown from source alone. The controls are designed for consumption by other modules in the DTS application.
---
## 5. Gotchas
1. **TestIdControl is deprecated**: The source explicitly states: *"Remove this control after deleting the TTS module and migrating to new test setup wizard"*. New code should use `TestIDViewModel` instead.
2. **checkbox naming convention**: The `checkbox` class violates C# naming conventions (should be PascalCase `CheckBox`). This may cause confusion with `System.Windows.Controls.CheckBox`.
3. **RoundedBox.Connect is non-functional**: The method body is commented out with `//throw new System.NotImplementedException();`. It's unclear why this method exists.
4. **LookupPopup uses reflection**: The `PossibleChannels_OnMouseDoubleClick` handler uses `GetProperty("Code")` and `GetProperty("Name")` via reflection rather than casting to a known interface. This is fragile and will fail silently (return null) if properties don't exist.
5. **GridViewColumnHeaderSelectable/GridViewColumnHeaderSearchable require Prism container at construction**: These controls call `ContainerLocator.Container.Resolve<IEventAggregator>()` in their constructors. If the container is not available or not configured, this will throw.
6. **IPTextBox.Clear() does not update Address**: The `Clear()` method sets segment text to empty but does not trigger the `Address` property update (no `_suppressAddressUpdate` handling).
7. **TestIDTextBox validation allows empty strings**: `IsValidText("")` returns `true` since no invalid characters are present.
8. **GridLengthAnimation.GetCurrentValue() assumes CurrentProgress has value**: Accesses `animationClock.CurrentProgress.Value` without null checking `CurrentProgress`. May throw if progress is unavailable.
9. **DynamicGrid.Refresh() clears and rebuilds all definitions**: Called on every `GridColumns` change and every `OnVisualChildrenChanged`. This could be expensive for grids with many children.
10. **BoolToInvertedBoolConverter.ConvertBack throws**: Explicitly throws `NotImplementedException`. Do not use in two-way bindings expecting conversion back.

View File

@@ -0,0 +1,239 @@
---
source_files:
- Common/DTS.Common/Converters/BooleanToBorderThicknessConverter.cs
- Common/DTS.Common/Converters/BooleanToBorderBrushConverter.cs
- Common/DTS.Common/Converters/BooleanToGreenBorderConverter.cs
- Common/DTS.Common/Converters/YesNoRadioButtonsConventer.cs
- Common/DTS.Common/Converters/BooleanOrMultiConverter.cs
- Common/DTS.Common/Converters/DateTimeWithMillisecondsToStringConverter.cs
- Common/DTS.Common/Converters/EnumVisibilityConverter.cs
- Common/DTS.Common/Converters/InverseEnumVisibilityConverter.cs
- Common/DTS.Common/Converters/ActiveContentConverter.cs
- Common/DTS.Common/Converters/FaultedTextConverter.cs
- Common/DTS.Common/Converters/TriggerTextConverter.cs
- Common/DTS.Common/Converters/TriggerColorConverter.cs
- Common/DTS.Common/Converters/FaultedColorConverter.cs
- Common/DTS.Common/Converters/DateConverter.cs
- Common/DTS.Common/Converters/NullableFloatConverter.cs
- Common/DTS.Common/Converters/InverseEnumEnabledConverter.cs
- Common/DTS.Common/Converters/IsLessThanConverter.cs
- Common/DTS.Common/Converters/ListToStringConverter.cs
- Common/DTS.Common/Converters/IsGreaterThanConverter.cs
- Common/DTS.Common/Converters/NonZeroToColorConverter.cs
- Common/DTS.Common/Converters/HeightConverter.cs
- Common/DTS.Common/Converters/ErrorToBooleanConverter.cs
- Common/DTS.Common/Converters/WidthConverter.cs
- Common/DTS.Common/Converters/StringListToVisibilityConverter.cs
- Common/DTS.Common/Converters/StatusToBorderThicknessConverter.cs
- Common/DTS.Common/Converters/ArrayVisibilityConverter.cs
- Common/DTS.Common/Converters/DSPStreamingFilterFrequencyConverter.cs
- Common/DTS.Common/Converters/ErrorToColorConverter.cs
- Common/DTS.Common/Converters/GreaterThanToBoolConverter.cs
- Common/DTS.Common/Converters/BooleanToColorConverter.cs
- Common/DTS.Common/Converters/BooleanToItalicFontStyleConverter.cs
- Common/DTS.Common/Converters/IntervalToVisibilityConverter.cs
- Common/DTS.Common/Converters/StatusToColorConverter.cs
- Common/DTS.Common/Converters/DiagStatusShuntColorConverter.cs
- Common/DTS.Common/Converters/DiagStatusOffsetColorConverter.cs
- Common/DTS.Common/Converters/InverseBooleanToOpacityConverter.cs
- Common/DTS.Common/Converters/ColorToSolidColorBrushConverter .cs
- Common/DTS.Common/Converters/BooleanAndToVisibiltyMultiConverter.cs
- Common/DTS.Common/Converters/BooleanOrToVisibilityMultiConverter.cs
- Common/DTS.Common/Converters/DoubleFromThousandthUnitToBaseUnit.cs
- Common/DTS.Common/Converters/BooleanToOpacityConverter.cs
- Common/DTS.Common/Converters/DASStatusArmTextConverter.cs
- Common/DTS.Common/Converters/RecordingModePreTriggerVisibilityConverter.cs
- Common/DTS.Common/Converters/EnumBooleanConverter.cs
- Common/DTS.Common/Converters/InitialOffsetToIEPESensorOffsetConverter.cs
- Common/DTS.Common/Converters/DASStatusColorConverter.cs
- Common/DTS.Common/Converters/DASStatusArmColorConverter .cs
- Common/DTS.Common/Converters/PercentConverter.cs
- Common/DTS.Common/Converters/NumericStringFormatConverter.cs
- Common/DTS.Common/Converters/VisibilityToRowHeightConverter.cs
- Common/DTS.Common/Converters/GroupImportErrorToStringConverter.cs
- Common/DTS.Common/Converters/GroupNameToVisibilityConverter.cs
- Common/DTS.Common/Converters/FilePathsToShortStringConverter.cs
- Common/DTS.Common/Converters/InverseBooleanConverter.cs
- Common/DTS.Common/Converters/EnumDescriptionTypeConverter.cs
generated_at: "2026-04-17T15:27:07.760999+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "308c9c168d87b5fd"
---
# Documentation: DTS.Common.Converters
## 1. Purpose
This module provides a comprehensive library of WPF value converters (implementing `IValueConverter` and `IMultiValueConverter`) used to transform data models into UI representations within the DTS application. It bridges the gap between domain logic and presentation logic by handling conversions for data types such as Booleans, Enums, Collections, Dates, and domain-specific status objects into visual elements like `Visibility`, `Brush` (colors), `Thickness`, and formatted strings.
## 2. Public Interface
The module consists of the following classes, primarily located in the `DTS.Common.Converters` namespace.
### Boolean Converters
* **`BooleanToBorderThicknessConverter`** (`IValueConverter`)
* `Convert`: Returns `1` if `value` is `true`, otherwise `2`.
* `ConvertBack`: Returns `null`.
* **`BooleanToBorderBrushConverter`** (`IValueConverter`)
* `Convert`: Returns `BrushesAndColors.Brush_Warning` if `value` is `true` and not null; otherwise `Brushes.Transparent`.
* `ConvertBack`: Returns `null`.
* **`BooleanToGreenBorderConverter`** (`IValueConverter`)
* `Convert`: Returns `BrushesAndColors.BrushApplicationStatusPowerGreen` if `value` is `true` and not null; otherwise `Brushes.Transparent`.
* `ConvertBack`: Returns `null`.
* **`BooleanToColorConverter`** (`IValueConverter`)
* Properties: `Background` (bool), `Inverted` (bool), `AttentionBrush` (bool), `WarningBrush` (bool).
* `Convert`: Converts `value` (bool) to a `Brush`. Logic depends on configuration properties (e.g., returns `Brush_NoError` if true, `Brush_Error`/`Brush_Attention`/`Brush_Warning` if false).
* `ConvertBack`: Returns `null`.
* **`BooleanToItalicFontStyleConverter`** (`IValueConverter`)
* `Convert`: Returns `FontStyles.Italic` if `value` is `true`; otherwise `FontStyles.Normal`.
* `ConvertBack`: Returns `null`.
* **`BooleanToOpacityConverter`** (`IValueConverter`)
* `Convert`: Returns `0.5` if `value` is `true`; otherwise `1`.
* `ConvertBack`: Returns `null`.
* **`InverseBooleanToOpacityConverter`** (`IValueConverter`)
* `Convert`: Returns `1.0` if `value` is `true`; otherwise `0.5`.
* `ConvertBack`: Returns `null`.
* **`InverseBooleanConverter`** (`IValueConverter`)
* `Convert`: Returns the logical negation of `value`.
* `ConvertBack`: Returns the logical negation of `value`.
* **`BooleanOrMultiConverter`** (`IMultiValueConverter`)
* `Convert`: Returns `true` if any value in the `values` array is `true`. Returns `false` if any element is not a `bool`.
* `ConvertBack`: Throws `NotImplementedException`.
### Visibility Converters
* **`EnumVisibilityConverter`** (`IValueConverter`)
* `Convert`: Returns `Visibility.Visible` if `value.Equals(parameter)`; otherwise `Visibility.Hidden`.
* `ConvertBack`: Returns `parameter` if `value` is `Visibility.Visible`; otherwise `Binding.DoNothing`.
* **`InverseEnumVisibilityConverter`** (`IValueConverter`)
* `Convert`: Returns `Visibility.Hidden` if `value.Equals(parameter)`; otherwise `Visibility.Visible`.
* `ConvertBack`: Returns `parameter` if `value` is `Visibility.Hidden`; otherwise `Binding.DoNothing`.
* **`StringListToVisibilityConverter`** (`IValueConverter`)
* `Convert`: Returns `Visibility.Visible` if the `List<string>` is not null and contains elements; otherwise `Visibility.Collapsed`.
* `ConvertBack`: Throws `NotImplementedException`.
* **`ArrayVisibilityConverter`** (`IValueConverter`)
* `Convert`: Returns `Visibility.Visible` if `value` (IList or Array) has count/length > 0; otherwise `Visibility.Collapsed` or `Hidden`.
* `ConvertBack`: Returns `null`.
* **`BooleanAndToVisibilityMultiConverter`** (`IMultiValueConverter`)
* `Convert`: Returns `Visibility.Visible` if all values are `true`. Supports parameter strings "FALSE" (inverts logic) and "HIDE" (uses Hidden instead of Collapsed).
* `ConvertBack`: Throws `NotImplementedException`.
* **`BooleanOrToVisibilityMultiConverter`** (`IMultiValueConverter`)
* `Convert`: Returns `Visibility.Visible` if any value is `true`. Supports parameter strings "FALSE" and "HIDE".
* `ConvertBack`: Throws `NotImplementedException`.
* **`VisibilityToRowHeightConverter`** (`IValueConverter`, `DependencyObject`)
* `Convert`: Returns `0` if `value` is `Visibility.Collapsed`; otherwise returns `parameter`. Supports `InvertSource` property.
* `ConvertBack`: Returns `null`.
* **`GroupNameToVisibilityConverter`** (`IValueConverter`)
* `Convert`: Returns `Visibility.Visible` if `value.ToString()` starts with "Graph"; otherwise `Visibility.Collapsed`.
* `ConvertBack`: Returns `null`.
### Enum & Status Converters
* **`EnumBooleanConverter`** (`IValueConverter`)
* `Convert`: Returns `value.Equals(parameter)`.
* `ConvertBack`: Returns `parameter` if `value` is `true`; otherwise `Binding.DoNothing`.
* **`InverseEnumEnabledConverter`** (`IValueConverter`)
* `Convert`: Returns `false` if `value.Equals(parameter)`; otherwise `true`.
* `ConvertBack`: Returns `parameter` if `value` is `false`; otherwise `Binding.DoNothing`.
* **`StatusToBorderThicknessConverter`** (`IValueConverter`)
* `Convert`: Returns `2` if `value` (`UIItemStatus`) is Success, Failed, Error, or Warning; otherwise `1`.
* `ConvertBack`: Returns `null`.
* **`StatusToColorConverter`** (`IValueConverter`)
* `Convert`: Converts `UIItemStatus` to a specific `Brush` (e.g., `Brush_ApplicationStatus_Complete` for Success).
* `ConvertBack`: Returns `null`.
* **`DASStatusColorConverter`**, **`DASStatusArmColorConverter`**, **`DASStatusArmTextConverter`**
* Convert `DASStatuses` enum to specific Brushes or Strings (e.g., "Armed", "NotArmed").
* **`DiagStatusShuntColorConverter`**, **`DiagStatusOffsetColorConverter`**
* Convert `DiagStatuses` to Brushes based on bitwise flag checks (`&` operator).
### Numeric & Comparison Converters
* **`IsLessThanConverter`** / **`IsGreaterThanConverter`** (`IValueConverter`)
* `Convert`: Parses `value` and `parameter` as `decimal`. Returns result of comparison.
* `ConvertBack`: Returns `DependencyProperty.UnsetValue`.
* **`GreaterEqualThanToBoolConverter`** (`IValueConverter`)
* `Convert`: Returns `true` if `value >= parameter`. Handles `int`, `double`, `ushort`.
* `ConvertBack`: Returns `false`.
* **`IntervalToVisibilityConverter`** (`IValueConverter`)
* `Convert`: Returns `Visibility.Visible` if `value >= parameter`. Handles `int`, `double`, `ushort`.
* `ConvertBack`: Returns `false`.
* **`NonZeroToColorConverter`** (`IValueConverter`)
* `Convert`: Returns Green if string is "0", Clear if "---", otherwise Red.
* `ConvertBack`: Returns `null`.
* **`DoubleFromThousandthUnitToBaseUnit`** (`IValueConverter`)
* `Convert`: Divides value by 1000.0.
* `ConvertBack`: Multiplies value by 1000.0.
* **`PercentConverter`** (`IValueConverter`)
* `Convert`: Formats decimal as `"{0:F1}%"`.
* `ConvertBack`: Throws `NotImplementedException`.
### String & Text Converters
* **`DateConverter`** (`IValueConverter`)
* `Convert`: Returns `DateTime` if valid, otherwise `Strings.Strings.Table_NA`.
* `ConvertBack`: Mirrors `Convert`.
* **`DateTimeWithMillisecondsToStringConverter`** (`IValueConverter`)
* `Convert`: Calls `Utils.Utils.FormatTimeStamp`.
* `ConvertBack`: Returns `null`.
* **`ListToStringConverter`** (`IValueConverter`)
* `Convert`: Joins `List<string>` elements with `", "`.
* `ConvertBack`: Throws `NotImplementedException`.
* **`FaultedTextConverter`**, **`TriggerTextConverter`**
* Convert `bool` to specific localized strings (e.g., `Strings.Strings.Faulted`).
* **`FilePathsToShortStringConverter`** (`IValueConverter`)
* `Convert`: Returns filename for single path, or "MultipleFiles" string for array length > 1.
* **`NumericStringFormatConverter`** (`IMultiValueConverter`)
* `Convert`: Takes value and format string. Returns formatted string. Handles `NaN`.
* **`EnumDescriptionTypeConverter`** (`EnumConverter`)
* `ConvertTo`: Returns the `DescriptionAttribute` value of an Enum, looking up localization via `Strings.Strings.ResourceManager`.
### Layout & Misc Converters
* **`HeightConverter`** (`MarkupExtension`, `IValueConverter`)
* `Convert`: Returns `value - parameter`.
* `ConvertBack`: Returns `null`.
* Usage: Can be instantiated directly in XAML due to `MarkupExtension`.
* **`WidthConverter`** (`MarkupExtension`, `IValueConverter`)
* `Convert`: Returns `value * parameter`.
* `ConvertBack`: Throws `NotImplementedException`.
* **`ActiveContentConverter`** (`IValueConverter`)
* `Convert`/`ConvertBack`: Returns `value` if it is `ContentControl`, else `Binding.DoNothing`.
* **`ColorToSolidColorBrushConverter`** (`IValueConverter`)
* `Convert`: Returns `new SolidColorBrush(color)`.
* `ConvertBack`: Throws `NotImplementedException`.
* **`NullableFloatConverter`** (`IValueConverter`)
* `Convert`: Returns `double` or `float` value, or `string.Empty`.
* `ConvertBack`: Returns `float` or `string.Empty`.
## 3. Invariants
1. **Input Type Requirements**: Many converters perform direct casts (e.g., `(bool)value` in `BooleanToBorderThicknessConverter`) without null checks or type verification. The binding engine must supply the correct types, or a runtime exception will occur.
2. **One-Way Binding**: The majority of converters return `null`, throw `NotImplementedException`, or return `Binding.DoNothing` in the `ConvertBack` method, indicating they are designed for `OneWay` binding mode.
3. **Parameter Usage**: Several converters (e.g., `EnumVisibilityConverter`, `IsLessThanConverter`) rely heavily on the `parameter` argument passed from XAML. Omitting the parameter in the binding will result in incorrect logic or exceptions.
4. **Null Handling**: Null handling is inconsistent across the module:
* `BooleanToBorderBrushConverter` explicitly checks for null.
* `BooleanToBorderThicknessConverter` does not check for null and will throw if `value` is null.
* `ArrayVisibilityConverter` returns `Hidden` for null.
5. **Boolean Logic**: `BooleanOrMultiConverter` returns `false` if *any* value in the input array is not of type `bool`. It does not ignore non-boolean values; it fails the operation.
## 4. Dependencies
**Internal Dependencies (Inferred from imports):**
* `DTS.Common.Base`: Used for `BrushesAndColors` (static resource for specific brushes) and `Strings.Strings` (localized string lookup).
* `DTS.Common.Enums`: Defines `UIItemStatus`, `RecordingModes`.
* `DTS.Common.Interface.Hardware`: Defines `DiagStatuses`, `DASStatuses`.
* `DTS.Common.Classes.Groups`: Defines `GroupImportError`.
* `Utils.Utils`: Used for `FormatTimeStamp` in `DateTimeWithMillisecondsToStringConverter`.
**External Dependencies:**
* `System.Windows.Data` (`IValueConverter`, `IMultiValueConverter`, `Binding`)
* `System.Windows.Media` (`Brush`, `Color`, `Brushes`, `SolidColorBrush`)
* `System.Windows` (`Visibility`, `DependencyProperty`, `DependencyObject`, `ContentControl`)
* `System.ComponentModel` (`EnumConverter`, `DescriptionAttribute`)
## 5. Gotchas
1. **Filename/Classname Mismatch**: The file `GreaterThanToBoolConverter.cs` contains the class `GreaterEqualThanToBoolConverter`. The logic performs a `>=` comparison, not just `>`.
2. **Copy-Paste Error in Documentation**: The XML doc comment for `NullableFloat

View File

@@ -0,0 +1,108 @@
---
source_files:
- Common/DTS.Common/Dialogs/IRegionManagerAware.cs.cs
- Common/DTS.Common/Dialogs/IPopupWindowActionAware.cs
- Common/DTS.Common/Dialogs/ConfirmationEx.cs
- Common/DTS.Common/Dialogs/ConfirmationWindow.xaml.cs
- Common/DTS.Common/Dialogs/NotificationWindow.xaml.cs
- Common/DTS.Common/Dialogs/PopupWindowAction.cs
- Common/DTS.Common/Dialogs/BrowseForFolderDialog.cs
generated_at: "2026-04-17T15:34:29.121125+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "49bfef2ac994b629"
---
# Dialogs
## Purpose
The `DTS.Common.Dialogs` namespace provides infrastructure for displaying modal and non-modal dialogs within a WPF application, specifically designed to work with the Prism framework's `InteractionRequest` patterns. It bridges the gap between view-model interaction requests and actual window display via `PopupWindowAction`, supports region management within popups through `IRegionManagerAware`, and offers specialized window implementations for confirmations and notifications. Additionally, it provides a managed wrapper around the Win32 `SHBrowseForFolder` API for folder selection dialogs.
## Public Interface
### Interfaces
* **`IRegionManagerAware`**
* **Property:** `IRegionManager RegionManager { get; set; }`
* **Behavior:** Allows a view or data context to receive a scoped `IRegionManager` when hosted inside a popup window created by `PopupWindowAction`.
* **`IPopupWindowActionAware`**
* **Properties:**
* `Window HostWindow { get; set; }`
* `Notification HostNotification { get; set; }`
* **Behavior:** Allows a view or data context to access the host window instance and the notification context that triggered the popup.
### Classes
* **`ConfirmationEx`** (inherits `Confirmation`)
* **Properties:**
* `MessageBoxButton Buttons { get; set; }` (Default: `MessageBoxButton.OKCancel`)
* `MessageBoxImage Image { get; set; }` (Default: `MessageBoxImage.Question`)
* `MessageBoxResult Result { get; set; }`
* **Behavior:** Extends the standard `Confirmation` class to include specific button configurations, image types, and a result property for dialog outcomes.
* **`ConfirmationWindow`**
* **Constructors:** `public ConfirmationWindow()`
* **Properties:**
* `DataTemplate ConfirmationTemplate` (Dependency Property)
* **Methods:**
* `public void Connect(int connectionId, object target)`*Implementation throws `NotImplementedException`.*
* **`NotificationWindow`** (inherits `Window`)
* **Constructors:** `public NotificationWindow()`
* **Properties:**
* `DataTemplate NotificationTemplate` (Dependency Property)
* `Uri ImageUri` (Dependency Property; Default: `pack://application:,,,/.../warning_48.png`)
* **Methods:**
* `public void Connect(int connectionId, object target)`*Implementation is empty.*
* **`PopupWindowAction`** (inherits `TriggerAction<FrameworkElement>`)
* **Nested Types:** `enum WindowPositions` (`CenterOwner`, `CenterScreen`)
* **Properties (Dependency Properties):**
* `FrameworkElement WindowContent`
* `DataTemplate ContentTemplate`
* `bool IsModal`
* `WindowPositions StartupPosition` (Default: `CenterScreen`)
* `bool CenterOverAssociatedObject`*Note: Usage appears commented out in logic.*
* `bool AllowMultipleNotificationWindows`
* **Methods:**
* `protected override void Invoke(object parameter)`: Executes the trigger, creates the window, sets up positioning, and shows it (modal or non-modal).
* `protected void PrepareContentForWindow(Notification notification, Window wrapperWindow)`: Injects `RegionManager`, `HostWindow`, and `HostNotification` into the view if the view or its DataContext implements the aware interfaces.
* `protected Window GetWindow(Notification notification)`: Factory method returning a generic window or a specific `ConfirmationWindow`/`NotificationWindow`.
* `protected Window CreateWindow(Notification notification)`: Creates the specific window instance based on notification type.
* **`BrowseForFolderDialog`**
* **Constructors:** `public BrowseForFolderDialog()` (Sets default flags to `BIF_NEWDIALOGSTYLE`)
* **Properties:**
* `string SelectedFolder`
* `string Title`
* `string InitialFolder`
* `string InitialExpandedFolder`
* `string OKButtonText`
* `BROWSEINFOW BrowseInfo`
* `BrowseInfoFlags BrowserDialogFlags`
* **Methods:**
* `public Nullable<bool> ShowDialog()`
* `public Nullable<bool> ShowDialog(Window owner)`
* **Nested Types:**
* `enum BrowseInfoFlags` (Flags enum for `BIF_*` constants)
* `class BROWSEINFOW` (Win32 structure wrapper)
* `enum MessageFromBrowser`
* `enum MessageToBrowser`
* `delegate int BrowseCallbackProc(...)`
## Invariants
1. **Window System Menu Removal:** Both `ConfirmationWindow` and `NotificationWindow` will always have the `WS_SYSMENU` style bit removed during `SourceInitialized`. This effectively hides the system menu and the close button on the title bar.
2. **Region Management:** If `PopupWindowAction` creates a window with `WindowContent`, and that content does not already have a `RegionManager`, a new scoped `RegionManager` is automatically created and attached.
3. **Parent Check:** `PopupWindowAction.Invoke` will return and do nothing if `WindowContent` is already part of a visual tree (i.e., `WindowContent.Parent` is not null).
4. **Notification Content Requirement:** When `PopupWindowAction` creates a `NotificationWindow` (no `WindowContent` provided), the `Notification.Content` property must be castable to `NotificationContentEventArgs`; otherwise, the method returns `null` and no window is displayed.
5. **Modal vs Non-Modal:** If `IsModal` is true, `ShowDialog()` is called; otherwise, `Show()` is called.
## Dependencies
* **Internal Dependencies:**
* `DTS.Common.Interactivity` (for `Notification`, `Confirmation`, `InteractionRequestedEventArgs`).
* `DTS.Common.Enums` (for `PopupWindowImage`).
* `

View File

@@ -0,0 +1,457 @@
---
source_files:
- Common/DTS.Common/Enums/IsoRestrictionLevels.cs
- Common/DTS.Common/Enums/GPSSentenceTypes.cs
- Common/DTS.Common/Enums/UartDataFormat.cs
- Common/DTS.Common/Enums/NetworkSelection.cs
- Common/DTS.Common/Enums/ScriptTypes.cs
- Common/DTS.Common/Enums/DestructiveTestChoices.cs
- Common/DTS.Common/Enums/InitializationTypes.cs
- Common/DTS.Common/Enums/Strings.cs
- Common/DTS.Common/Enums/MigrationResult.cs
- Common/DTS.Common/Enums/SLICE6MulticastProperties.cs
- Common/DTS.Common/Enums/RibbonTabNames.cs
- Common/DTS.Common/Enums/IsoSupportLevels.cs
- Common/DTS.Common/Enums/TabControlOperation.cs
- Common/DTS.Common/Enums/IncludeOverwriteName.cs
- Common/DTS.Common/Enums/RibbonControlOperation.cs
- Common/DTS.Common/Enums/LogLevels.cs
- Common/DTS.Common/Enums/ImportFormats.cs
- Common/DTS.Common/Enums/UICultures.cs
- Common/DTS.Common/Enums/T0Mode.cs
- Common/DTS.Common/Enums/VelocityUnit.cs
- Common/DTS.Common/Enums/ImportStatus.cs
- Common/DTS.Common/Enums/IsoViewMode.cs
- Common/DTS.Common/Enums/PopupWindowImage.cs
- Common/DTS.Common/Enums/CanArbBaseBitrate.cs
- Common/DTS.Common/Enums/UIItemStatus.cs
- Common/DTS.Common/Enums/DigitalOutputs.cs
- Common/DTS.Common/Enums/DigitalInputs.cs
- Common/DTS.Common/Enums/DataFlag.cs
- Common/DTS.Common/Enums/Squibs.cs
- Common/DTS.Common/Enums/SupportedExportFormatBitFlags.cs
- Common/DTS.Common/Enums/UartBaudRate.cs
- Common/DTS.Common/Enums/EnumBindingSourceExtension.cs
- Common/DTS.Common/Enums/UDPStreamProfile.cs
- Common/DTS.Common/Enums/ExcitationVoltageOptions.cs
- Common/DTS.Common/Enums/ApplicationStatusTypes.cs
- Common/DTS.Common/Enums/ExportHeaderLine.cs
- Common/DTS.Common/Enums/RecordingModes.cs
- Common/DTS.Common/Enums/CFCFilter.cs
- Common/DTS.Common/Enums/ClockSource.cs
generated_at: "2026-04-17T15:26:42.516779+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "db4cd84d7cef4480"
---
# DTS.Common.Enums Module Documentation
## 1. Purpose
This module defines enumerations, constants, and supporting utility classes used throughout the DTS (Data Acquisition System) codebase. It provides standardized domain-specific types for hardware configuration (baud rates, clock sources, recording modes), data processing (CFC filters, data flags), import/export operations (file formats, header definitions), application state management (status types, log levels), and UI concerns (cultures, popup images, ribbon controls). The enums serve as the canonical type definitions for cross-module communication and data serialization.
---
## 2. Public Interface
### Enumerations
#### `GPSSentenceTypes`
```csharp
public enum GPSSentenceTypes { GPGGA, GPRMC }
```
Defines NMEA GPS sentence types for parsing GPS data streams.
#### `UartDataFormat`
```csharp
public enum UartDataFormat { Binary, PlainText, NMEA }
```
Specifies the format of UART data streams.
#### `NetworkSelection`
```csharp
public enum NetworkSelection { Default, NetworkId, NetworkDesc }
```
Defines criteria for network selection operations.
#### `ScriptTypes`
```csharp
[TypeConverter(typeof(EnumDescriptionTypeConverter))]
public enum ScriptTypes { Migration, Initialization }
```
Categorizes script execution types. Uses `EnumDescriptionTypeConverter` for UI display.
#### `DestructiveTestChoices`
```csharp
public enum DestructiveTestChoices { Yes, No, NotSet }
```
Tri-state selection for destructive test confirmation (FB 44625). `NotSet` indicates no selection made.
#### `InitializationTypes`
```csharp
[TypeConverter(typeof(EnumDescriptionTypeConverter))]
public enum InitializationTypes { Aero, Crash, TSRAIR }
```
Defines initialization configuration types for different test scenarios.
#### `StringReplacementMode`
```csharp
[TypeConverter(typeof(EnumDescriptionTypeConverter))]
public enum StringReplacementMode { All, First, Last }
```
Controls string replacement behavior in text processing operations.
#### `MigrationResult`
```csharp
[TypeConverter(typeof(EnumDescriptionTypeConverter))]
public enum MigrationResult { OK, ExceptionThrown, WarningAllowStreamingModesWasNotMigrated }
```
Indicates outcome of data migration operations.
#### `SLICE6Properties`
```csharp
public enum SLICE6Properties { SLICE6MulticastAddress, SLICE6MulticastCommandPort, SLICE6MulticastResponsePort }
```
Property identifiers for SLICE6 UDP broadcast autodiscovery configuration.
#### `RibbonTabNames`
```csharp
public static class RibbonTabNames
{
public const string Tab1 = "TBD";
public const string Tab2 = "TBD";
public const string Tab3 = "TBD";
}
```
Placeholder constants for ribbon tab identifiers. All values are currently "TBD".
#### `IsoSupportLevels`
```csharp
[TypeConverter(typeof(EnumDescriptionTypeConverter))]
public enum IsoSupportLevels
{
[Description("ISO 13499")] ISO_ONLY,
[Description("User specified channel codes")] TRANSITORY,
[Description("No ISO")] NO_ISO
}
```
Defines ISO 13499 compliance levels for channel coding.
#### `TabControlOperation` / `RibbonControlOperation`
```csharp
public enum TabControlOperation { AddedItem, RemovedItem }
public enum RibbonControlOperation { AddedItem, RemovedItem }
```
Identical enums representing UI control modification operations.
#### `IncludeOverwriteName`
```csharp
[TypeConverter(typeof(EnumDescriptionTypeConverter))]
public enum IncludeOverwriteName { IncludedCheckBox, OverwriteCheckBox, ImportingTestSetupName }
[TypeConverter(typeof(EnumDescriptionTypeConverter))]
public enum ExportChoices { ExportType, UnfilteredEUCheckBox, FilteredEUCheckBox, MVCheckBox, ADCCheckBox }
```
Defines checkbox/control identifiers for import/export UI operations.
#### `LogLevels`
```csharp
[TypeConverter(typeof(EnumDescriptionTypeConverter))]
public enum LogLevels
{
[Description("LogLevel_Trace")] TRACE = 1,
[Description("LogLevel_Debug")] DEBUG = 2,
[Description("LogLevel_Info")] INFO = 3,
[Description("LogLevel_Warn")] WARN = 4,
[Description("LogLevel_Error")] ERROR = 5,
[Description("LogLevel_Critical")] CRITICAL = 6
}
```
Severity levels for logging, with explicit integer values 1-6.
#### `ImportFormats`
```csharp
public enum ImportFormats
{
NOT_SPECIFIED = 1, DTS_XML = 2, ISF = 3, TSF = 4, DTS_CSV = 5,
TTS_XML = 6, CrashDesigner_XML = 7, E2X = 8, TTS_CSV = 9
}
public enum ImportFileFormat { NoTestSetup, SingleTestSetup, MultipleTestSetup }
```
File format identifiers for import operations. `ImportFileFormat` categorizes files by test setup count (FB 40758).
#### `UICultures`
```csharp
[TypeConverter(typeof(EnumDescriptionTypeConverter))]
public enum UICultures
{
[DescriptionResource("UICultures_de-DE")] de_DE,
[DescriptionResource("UICultures_en-US")] en_US,
[DescriptionResource("UICultures_es-ES")] es_ES,
[DescriptionResource("UICultures_fr-FR")] fr_FR,
[DescriptionResource("UICultures_it-IT")] it_IT,
[DescriptionResource("UICultures_ja-JP")] ja_JP
}
```
Supported UI localization cultures. Uses `DescriptionResource` attribute for localization lookup.
#### `T0Mode`
```csharp
[TypeConverter(typeof(EnumDescriptionTypeConverter))]
public enum T0Mode { [Description("DAS")] DAS = 0, [Description("Test")] Test = 1 }
```
Defines T0 (time zero) reference mode for data acquisition.
#### `VelocityUnit`
```csharp
[TypeConverter(typeof(EnumDescriptionTypeConverter))]
public enum VelocityUnit
{
[Description("EditTestSetupObjectMeta_VelocityUnit_KilometerPerHour")] KilometerPerHour = 0,
[Description("EditTestSetupObjectMeta_VelocityUnit_MeterPerSecond")] MeterPerSecond = 1
}
```
Velocity measurement units.
#### `ImportExtraStatus` / `PossibleStatus`
```csharp
public enum ImportExtraStatus
{
None, NormalizingIds, ReadingCalibrations, ReadingChannels, ReadingCustomerDetails,
ReadingEngineerDetails, ReadingGroups, ReadingHardware, ReadingLabDetails,
ReadingSensors, ReadingTestSetups, ReadingUsers, ReadingXML
}
public enum PossibleStatus { Waiting, Working, Done, Failed, Reading, Importing }
```
Granular status tracking for import operations.
#### `IsoViewMode`
```csharp
[TypeConverter(typeof(EnumDescriptionTypeConverter))]
public enum IsoViewMode
{
[Description("ISOOnly")] ISOOnly,
[Description("ISOAndUserCode")] ISOAndUserCode,
[Description("UserCodeOnly")] UserCodeOnly,
[Description("ChannelNameOnly")] ChannelNameOnly
}
```
Channel display mode for ISO-compliant views.
#### `IsoViewModeStatic`
```csharp
public abstract class IsoViewModeStatic
{
public static IsoViewMode ViewMode { get; set; }
}
```
Static holder for cross-module ISO view mode sharing. Does not persist or retrieve from database.
#### `PopupWindowImage`
```csharp
public enum PopupWindowImage { Warning = 0, Error = 1, Question = 2, Information = 3 }
```
Icon types for popup dialogs.
#### `CanArbBaseBitrate`
```csharp
[TypeConverter(typeof(EnumDescriptionTypeConverter))]
public enum CanArbBaseBitrate
{
_50000 = 50000, _62000 = 62000, _83000 = 83000, _100000 = 100000,
_125000 = 125000, _250000 = 250000, _500000 = 500000, _1000000 = 1000000
}
```
CAN bus arbitration base bitrates. Enum member names prefixed with underscore to allow numeric identifiers.
#### `UIItemStatus`
```csharp
public enum UIItemStatus { None, Success, Failed, Error, Warning }
```
Status indicators for UI elements.
#### `SelectedItemsStatus`
```csharp
public abstract class SelectedItemsStatus
{
public static void SetUpdating(object o, bool updating);
public static bool GetUpdating(object o);
}
```
Thread-safe dictionary-based tracking of update states per object instance.
#### `DigitalOutputModes`
```csharp
[TypeConverter(typeof(EnumDescriptionTypeConverter))]
public enum DigitalOutputModes
{
[Description("Off")] NONE = 0,
[DescriptionResource("DigitalOutputMode_FVLH")] FVLH = 1 << 0,
[DescriptionResource("DigitalOutputMode_FVHL")] FVHL = 1 << 1,
[DescriptionResource("DigitalOutputMode_CCNO")] CCNO = 1 << 2,
[DescriptionResource("DigitalOutputMode_CCNC")] CCNC = 1 << 3
}
```
Bitwise flags for digital output configuration (5V transitions and contact closure modes).
#### `DigitalInputModes`
```csharp
[TypeConverter(typeof(EnumDescriptionTypeConverter))]
public enum DigitalInputModes
{
NONE = 1 << 0,
[DescriptionResource("DigitalInputMode_TLH")] TLH = 1 << 1,
[DescriptionResource("DigitalInputMode_THL")] THL = 1 << 2,
[DescriptionResource("DigitalInputMode_CCNO")] CCNO = 1 << 3,
[DescriptionResource("DigitalInputMode_CCNC")] CCNC = 1 << 4
}
```
Bitwise flags for digital input configuration (transitions and contact closure).
#### `DataFlag`
```csharp
[TypeConverter(typeof(EnumDescriptionTypeConverter))]
public enum DataFlag
{
[Description("None")] None = 0,
[Description("Normal")] Normal = 1,
[Description("Saturated")] Saturated = 2,
[Description("Zero Crossing Error")] ZeroCrossing = 3,
[Description("Broken Wire")] BrokenWire = 4,
[Description("Other")] Other = -1
}
```
Data quality flags for channel samples. `Other` uses value -1.
#### `SquibMeasurementType` / `SquibFireMode`
```csharp
[TypeConverter(typeof(EnumDescriptionTypeConverter))]
public enum SquibMeasurementType
{
NONE = 0, CURRENT = 1 << 0, INIT_SIGNAL = 1 << 1, VOLTAGE = 1 << 2
}
[TypeConverter(typeof(EnumDescriptionTypeConverter))]
public enum SquibFireMode
{
NONE = 1 << 0,
[DescriptionResource("SquibFireMode_Cap")] CAP = 1 << 1,
[DescriptionResource("SquibFireMode_CC")] CONSTANT = 1 << 2,
AC = 1 << 3
}
```
Bitwise flags for squib (explosive initiator) configuration.
#### `SupportedExportFormatBitFlags`
```csharp
[Flags]
public enum SupportedExportFormatBitFlags
{
none = 0x0, csvunfiltered = 0x1, diademadc = 0x2, isounfiltered = 0x4,
somatunfiltered = 0x8, tdmsadc = 0x10, toyotaunfiltered = 0x20,
tsvunfiltered = 0x40, csvfiltered = 0x80, isofiltered = 0x200,
somatfiltered = 0x400, tdasadc = 0x800, toyotafiltered = 0x1000,
tsvfiltered = 0x2000, rdfadc = 0x4000, ChryslerDDAS = 0x8000,
HDFUnfiltered = 0x10000, HDFFiltered = 0x20000, HDFMV = 0x40000,
HDFADC = 0x80000, xlsxfiltered = 0x100000, xlsxunfiltered = 0x200000,
CSVADC = 0x400000, CSVMV = 0x800000, Ch10FilteredEU = 0x1000000,
Ch10UnfilteredEU = 0x2000000, FIATASC = 0x4000000
}
```
Bitwise flags for export format capabilities.
#### `UartBaudRate`
```csharp
[TypeConverter(typeof(EnumDescriptionTypeConverter))]
public enum UartBaudRate : uint
{
_110 = 110, _300 = 300, _600 = 600, _1200 = 1200, _2400 = 2400,
_4800 = 4800, _9600 = 9600, _14400 = 14400, _19200 = 19200,
_38400 = 38400, _57600 = 57600, _115200 = 115200, _230400 = 230400,
_460800 = 460800, _921600 = 921600
}
```
Standard UART baud rates. Underlying type is `uint`.
#### `UDPStreamProfile`
```csharp
[TypeConverter(typeof(EnumDescriptionTypeConverter))]
public enum UDPStreamProfile : byte
{
RTCStreaming = 0, DTS_UDP = 1, CH10_MANUAL_CONFIG = 2, CH10_PCM128_MM = 3,
CH10_ANALOG = 4, CH10_PCM_STANDARD = 5, CH10_PCM_SUPERCOM = 6,
CH10_PCM_128BIT_2HDR = 7, CH10_ANALOG_2HDR = 8, CH10_PCM_STANDARD_2HDR = 9,
CH10_PCM_SUPERCOM_2HDR = 10, TMNS_PCM_STANDARD = 11, TMNS_PCM_SUPERCOM = 12,
IENA_PTYPE_STREAM = 13, UART_STREAM = 14
}
```
UDP streaming configuration profiles (FB15313). Underlying type is `byte`.
#### `ExcitationVoltageOptions`
```csharp
public class ExcitationVoltageOptions
{
public enum ExcitationVoltageOption
{
[VoltageMagnitude(0.0)][Description("Undefined")] Undefined = 1,
[VoltageMagnitude(2.0)][Description("2.0")] Volt2 = 2,
[VoltageMagnitude(2.5)][Description("2.5")] Volt2_5 = 4,
[VoltageMagnitude(3.0)][Description("3.0")] Volt3 = 8,
[VoltageMagnitude(5.0)][Description("5.0")] Volt5 = 16,
[VoltageMagnitude(10.0)][Description("10.0")] Volt10 = 32,
[VoltageMagnitude(1.0)][Description("1.0")] Volt1 = 64
}
[AttributeUsage(AttributeTargets.Field)]
public class VoltageMagnitudeAttribute : Attribute
{
public double Value { get; }
public VoltageMagnitudeAttribute(double value);
}
public class VoltageMagnitudeAttributeCoder : AttributeCoder<ExcitationVoltageOption, VoltageMagnitudeAttribute, double>
{
public VoltageMagnitudeAttributeCoder();
}
}
```
Nested type providing excitation voltage options with magnitude extraction via custom attribute.
#### `ApplicationStatusTypes`
```csharp
public enum ApplicationStatusTypes
{
IDLE, SettingConfiguration, ClearingFlash, Arm, AutoArmPrepare, WaitingForStart,
WaitingForTrigger, WaitingForStartWithEvent, WaitingForTriggerCheck, WaitingForAutoArm,
WaitingForStreaming, Passed, FailedStart, FailedTrigger, Done, FailedArm, FailedDisarm,
// ... (50+ additional values)
}
```
Comprehensive application state machine values for DAS operations.
#### `FtssHeaderLine` / `UartHeaders` / `XLSXExportHeaderLine`
```csharp
public enum FtssHeaderLine { [Description("Headers")] Headers = 0, [Description("Test Date")] TestDate, ... }
public enum UartHeaders { [Description("Latitude")] Latitude, [Description("Longitude")] Longitude, ... }
public enum XLSXExportHeaderLine { [Description("Headers")] Headers = 0, [Description("Test Date")] TestDate, ... }
```
Header line definitions for CSV and XLSX export formats.
#### `HeaderLineExtension`
```csharp
public static class HeaderLineExtension
{
public static string GetDescription(this Enum genericEnum);
}
```
Extension method to retrieve `DescriptionAttribute` values from enum members.
#### `RecordingModes`
```csharp
[TypeConverter(typeof(EnumDescriptionTypeConverter))]
public enum RecordingModes
{
[Description("RecordingModes_CircularBuffer")][ProgrammableTr

View File

@@ -0,0 +1,66 @@
---
source_files:
- Common/DTS.Common/Enums/Channels/ChannelCodeType.cs
generated_at: "2026-04-17T16:40:22.843052+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "a889ef7dd7c871e6"
---
# Documentation: ChannelCodeType.cs
## 1. Purpose
This module defines channel code type classifications for the DTS system, providing both an enumeration and associated constants. It establishes the distinction between ISO-standardized channel codes (conforming to ISO 13499) and user-defined channel codes, along with their respective string representations and length constraints. This serves as a foundational reference for channel code validation and type checking throughout the system.
## 2. Public Interface
### Class: `ChannelEnumsAndConstants`
A container class housing channel-related enumeration and constants.
#### Constants
| Name | Type | Value | Description |
|------|------|-------|-------------|
| `IsoCodeTypeString` | `string` | `"ISO 13499"` | String representation for ISO channel code type |
| `UserCodeTypeString` | `string` | `"User"` | String representation for User-defined channel code type |
| `ISO_CODE_LENGTH` | `int` | `16` | Maximum/expected length for ISO channel codes |
| `USER_CODE_LENGTH` | `int` | `50` | Maximum/expected length for user-defined channel codes |
#### Enum: `ChannelCodeType`
Nested enumeration representing channel code classification.
| Member | Value | Description |
|--------|-------|-------------|
| `ISO` | `0` | Represents ISO 13499 standardized channel codes |
| `User` | `1` | Represents user-defined channel codes |
## 3. Invariants
- ISO channel codes must have a length of exactly `16` characters (as defined by `ISO_CODE_LENGTH`).
- User-defined channel codes must have a length of up to `50` characters (as defined by `USER_CODE_LENGTH`).
- The string representation `"ISO 13499"` corresponds to `ChannelCodeType.ISO`.
- The string representation `"User"` corresponds to `ChannelCodeType.User`.
- The enum values are implicitly ordered: `ISO = 0`, `User = 1`.
## 4. Dependencies
### Dependencies (what this module imports)
- **None** - This module is self-contained with no external imports or references.
### Dependents (what depends on this module)
- **Unknown** - No consumers are visible in the provided source. Other modules in the `DTS.Common.Enums.Channels` namespace or broader `DTS.Common` assembly likely reference this, but this cannot be confirmed from the source alone.
## 5. Gotchas
1. **Naming inconsistency**: The class is named `ChannelEnumsAndConstants` (plural, suggesting multiple enums), but the file is named `ChannelCodeType.cs`. The class contains only one enum, making the class name potentially misleading.
2. **Inconsistent constant naming convention**: The code mixes naming styles:
- `IsoCodeTypeString` and `UserCodeTypeString` use PascalCase
- `ISO_CODE_LENGTH` and `USER_CODE_LENGTH` use SCREAMING_SNAKE_CASE
This may cause confusion about which convention to follow when extending.
3. **String-to-enum mismatch**:

View File

@@ -0,0 +1,12 @@
---
source_files:
- Common/DTS.Common/Enums/Communication/CommunicationConstantsAndEnums.cs
generated_at: "2026-04-17T16:40:12.673932+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "2f7b426ee6e69362"
---
# Documentation: CommunicationConstantsAndEnums
## 1. Purpose

View File

@@ -0,0 +1,82 @@
---
source_files:
- Common/DTS.Common/Enums/DASFactory/WakeupTriggers.cs
- Common/DTS.Common/Enums/DASFactory/UseCasesTSRAIR.cs
- Common/DTS.Common/Enums/DASFactory/S6DBDiagnosticChannelList.cs
- Common/DTS.Common/Enums/DASFactory/ConstantsAndEnums.cs
generated_at: "2026-04-17T15:36:12.002625+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "f42ba2c5d896175e"
---
# Documentation: DTS.Common.Enums.DASFactory
## 1. Purpose
This module defines enumerations and constants used by the DAS (Data Acquisition System) Factory subsystem within the DTS Common library. It provides standardized identifiers for device types, diagnostic channels, use cases, wakeup triggers, and event markers used across the DTS hardware ecosystem. These enums serve as the canonical type definitions for inter-module communication and hardware configuration.
---
## 2. Public Interface
### `WakeupTriggers` (enum)
**Namespace:** `DTS.Common.Enums.DASFactory`
Defines triggers that can wake up the system.
| Member | Description Attribute |
|--------|----------------------|
| `MotionDetect` | `"WakeupTriggers_MotionDetect"` |
**Attributes:** `[TypeConverter(typeof(EnumDescriptionTypeConverter))]`
---
### `UseCasesTSRAIR` (enum : byte)
**Namespace:** `DTS.Common.Enums.DASFactory`
Defines operational use cases for TSR AIR devices.
| Member | Description Attribute |
|--------|----------------------|
| `AEROSPACE` | `"Aerospace"` |
| `AEROSPACE_with_motion` | `"Aerospace with motion"` |
| `VIBRATION` | `"Vibration"` |
| `SCHEDULED` | `"Scheduled"` |
| `INTERVAL` | `"Interval"` |
| `STREAMING` | `"Streaming"` |
| `PRETRIGGER_TEST` | `"Pretrigger test"` |
**Attributes:** `[TypeConverter(typeof(EnumDescriptionTypeConverter))]`
---
### `S6DBDiagnosticChannelList` (enum)
**Namespace:** `DTS.Common.Enums.DASFactory`
Defines diagnostic channel identifiers for Slice6 DB hardware.
**Legacy Base Channels (0-3):**
| Member | Value |
|--------|-------|
| `InputVoltage` | 0 |
| `BackupVoltage` | 1 |
| `TemperatureC` | 2 |
| `BatterySoc` | 3 |
**DB Diagnostic Channels (100-119):**
| Member | Value | Notes |
|--------|-------|-------|
| `DiagInputVoltage` | 100 | |
| `DiagMcuTemperature` | 101 | |
| `DiagChargerPower` | 102 | |
| `DiagChargerInputCurrent` | 103 | |
| `DiagEnv_1_Temperature` | 104 | Internal; replaces `DiagChargerDischargeCurrent` |
| `DiagEnv_1_Humidity` | 105 | Internal |
| `DiagEnv_2_Temperature` | 106 | |
| `DiagEnv_2_Humidity` | 107 | |
| `DiagEnv_3_Temperature` | 108 | |
| `DiagEnv_3_Humidity` | 109 | |
| `DiagEnv_4_Temperature` | 110 | |
| `DiagEnv_

View File

@@ -0,0 +1,30 @@
---
source_files:
- Common/DTS.Common/Enums/DBExport/TestObjectFields.cs
- Common/DTS.Common/Enums/DBExport/CustomDirectionFields.cs
- Common/DTS.Common/Enums/DBExport/CustomFinLoc2Fields.cs
- Common/DTS.Common/Enums/DBExport/CustomFinLoc1Fields.cs
- Common/DTS.Common/Enums/DBExport/CustomFinLoc3Fields.cs
- Common/DTS.Common/Enums/DBExport/CustomFilterFields.cs
- Common/DTS.Common/Enums/DBExport/PositionFields.cs
- Common/DTS.Common/Enums/DBExport/MainLocationFields.cs
- Common/DTS.Common/Enums/DBExport/PhysicalDimensionFields.cs
- Common/DTS.Common/Enums/DBExport/TopLevelFields.cs
generated_at: "2026-04-17T16:03:09.383864+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "bec80c1cc7593e6d"
---
# DBExport
### 1. Purpose
This module defines a set of public enumerations that serve as schemas for database export and import operations. It maps database fields for various domain entities—such as Test Objects, Locations (Fine and Main), Directions, Positions, and Physical Dimensions—to strongly typed constants. These enums likely facilitate serialization, XML tagging, or DataRow-to-Object mapping within the DTS system, ensuring consistent field naming when interacting with the underlying data store or external ISO-compatible components.
### 2. Public Interface
The module exposes the following enumerations:
* **`enum TestObjectFields`**: Defines fields for test objects.
* Values: `s_GUID`, `TEST_OBJECT`, `TEXT_L1`, `TEXT_L2`, `VERSION`, `DATE`, `REMARKS`, `EXPIRED`, `SORTKEY`, `LAST_CHANGE`, `LAST_CHANGE_TEXT`, `HISTORY`.
* **`enum CustomDirectionFields`**: Defines fields for `ISODll.MMEDirection`.
* Values: `Direction`, `Expired`, `History

View File

@@ -0,0 +1,34 @@
---
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-17T16:21:49.969799+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "c34e8b8a865b8f08"
---
# ChartOptions
### Purpose
This module defines enumeration types used for chart configuration options in the DTS Viewer component. It provides strongly-typed options for time unit display, data filtering, Y-axis range scaling, device wake methods, and chart unit types. Each enum is designed for use with the Xceed WPF Toolkit PropertyGrid, featuring `Description` attributes for display text and `IItemsSource` implementations for dropdown population.
### Public Interface
**TimeUnitTypeEnum** - Enum defining time unit display options.
- `MS = 0` - Milliseconds, displayed as "ms"
- `Seconds = 1` - Seconds, displayed as "Seconds"
**TimeUnitTypeItemSource** - Implements `IItemsSource`. Provides `GetValues()` method returning `ItemCollection` via `EnumUtil.GetValuesList<TimeUnitTypeEnum>()`.
**FilterOptionEnum** - Enum defining data filtering modes.
- `Unfiltered = 0` - No filtering applied
- `TestSetupDefault = 1` - Use test setup default filter settings
- `Custom = 2` - User-defined custom filtering
**FilterOptionEnumItemSource** - Implements `IItemsSource`. Provides `GetValues()` method returning `ItemCollection` via `EnumUtil.GetValuesList<FilterOptionEnum>()`.
**YRangeScaleEnum** -

View File

@@ -0,0 +1,13 @@
---
source_files:
- Common/DTS.Common/Enums/DTS.Viewer/Filter/SearchEnum.cs
generated_at: "2026-04-17T16:10:38.949013+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "71393fc59b124cd9"
---
# Filter
### Purpose
This module defines the `FilterEnum` enumeration, which categorizes view or filter types within the D

View File

@@ -0,0 +1,81 @@
---
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-17T16:35:07.692917+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "cbf2ecb747cdc1d7"
---
# Documentation: Power Spectral Density Enums
## 1. Purpose
This module defines four enumeration types used to configure Power Spectral Density (PSD) report generation within the DTS Viewer application. These enums provide strongly-typed configuration options for window functions, window widths, averaging methods, and filter types used in spectral analysis. All enums are decorated with `TypeConverter` and `Description` attributes to support user-friendly display in UI components.
---
## 2. Public Interface
### `WindowAveragingType`
**Namespace:** `DTS.Common.Enums.Viewer.Reports`
**Type:** `enum`
Specifies the averaging method applied during PSD window processing.
| Member | Description Attribute | Underlying Value |
|--------|----------------------|------------------|
| `Averaging` | "Averaging" | 0 |
| `PeakHoldMax` | "Peak Hold MAX" | 1 |
| `PeakHoldMin` | "Peak Hold MIN" | 2 |
---
### `PassFilterType`
**Namespace:** `DTS.Common.Enums.Viewer.Reports`
**Type:** `enum`
Specifies the filter algorithm type for PSD analysis.
| Member | Description Attribute | Underlying Value |
|--------|----------------------|------------------|
| `Bessel` | "Bessel" | 0 |
| `Butterworth` | "Butterworth" | 1 |
| `Chebyshev` | "Chebyshev" | 2 |
**Note:** A fourth member `CriticalDamping` is commented out in the source (see Gotchas).
---
### `WindowWidth`
**Namespace:** `DTS.Common.Enums.Viewer.Reports`
**Type:** `enum`
Specifies the FFT window size in samples. All values are explicit powers of two.
| Member | Description Attribute | Underlying Value |
|--------|----------------------|------------------|
| `FiveTwelve` | "512" | 512 |
| `TenTwentyFour` | "1024" | 1024 |
| `TwentyFortyEight` | "2048" | 2048 |
| `FortyNinetySix` | "4096" | 4096 |
| `EightyOneNinetyTwo` | "8192" | 8192 |
---
### `WindowType`
**Namespace:** `DTS.Common.Enums.Viewer.Reports`
**Type:** `enum`
Specifies the window function applied to data before FFT transformation.
| Member | Description Attribute | Underlying Value |
|--------|----------------------|------------------|
| `Rectangle` | "Rectangle" | 0 |
| `Hamming` | "Hamming" | 1 |
| `Hanning` | "Hanning" | 2 |
| `Blackman` | "Blackman" | 3 |
|

View File

@@ -0,0 +1,18 @@
---
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-17T16:22:17.506122+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "1e4f24b47c705e2c"
---
# TestMetadata
### Purpose
This module defines strongly-typed enumerations that serve as field identifiers for parsing,

View File

@@ -0,0 +1,13 @@
---
source_files:
- Common/DTS.Common/Enums/Database/DbType.cs
generated_at: "2026-04-17T16:43:11.647224+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "2d6cbd403b40bdd4"
---
# Documentation: `DTS.Common.Enums.Database.DbType`
## 1. Purpose
This module defines the `DbType` enumeration, which categorizes database connection strategies within the system. It provides a standardized way to distinguish between exclusive remote database connections, exclusive local database connections, and a hybrid approach,

View File

@@ -0,0 +1,53 @@
---
source_files:
- Common/DTS.Common/Enums/GroupTemplates/GroupTemplateChannelFields.cs
- Common/DTS.Common/Enums/GroupTemplates/GroupTemplateFields.cs
generated_at: "2026-04-17T16:37:50.343998+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "e1b5d92a7a788416"
---
# Documentation: Group Template Field Enums
## 1. Purpose
This module defines two enumerations, `GroupTemplateFields` and `GroupTemplateChannelFields`, which serve as strongly-typed identifiers for properties within the Group Templates domain. They likely function as keys for data mapping, validation logic, reflection operations, or UI binding, ensuring consistency when referencing specific fields of a Group Template or its associated Channels.
## 2. Public Interface
### Enum: `GroupTemplateFields`
**Namespace:** `DTS.Common.Enums.GroupTemplates`
**Underlying Type:** `int` (default)
Defines the fields available on a Group Template entity.
| Member Name | Integer Value (Implicit) |
| :--- | :--- |
| `Name` | 0 |
| `Description` | 1 |
| `Channels` | 2 |
| `LastModifiedBy` | 3 |
| `LastModified` | 4 |
| `AssociatedGroups` | 5 |
### Enum: `GroupTemplateChannelFields`
**Namespace:** `DTS.Common.Enums.GroupTemplates`
**Underlying Type:** `int` (default)
Defines the fields available on a Channel object within a Group Template.
| Member Name | Integer Value (Implicit) |
| :--- | :--- |
| `Required` | 0 |
| `Name` | 1 |
| `ISOCode` | 2 |
| `Custom` | 3 |
| `DisplayOrder` | 4 |
## 3. Invariants
1. **Implicit Values:** Since no explicit values are assigned in the source, the members rely on C# default indexing starting at `0` and incrementing by `1`.
2. **Value Stability:** The integrity of these enums relies on the source code order remaining unchanged. Inserting a new member at the beginning or middle of the list would shift the integer values of subsequent members, which could break serialization or persistence logic if stored as integers.
## 4. Dependencies
* **Dependencies (Imports):** None. The files rely solely on the default `System` namespace implicitly available in C#.
* **Consumers:** Unknown from the source alone. These types are likely consumed by services, repositories, or UI components within the

View File

@@ -0,0 +1,35 @@
---
source_files:
- Common/DTS.Common/Enums/Groups/GroupImport.cs
generated_at: "2026-04-17T16:09:44.180550+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "568e973318030b54"
---
# Groups
### Purpose
This module provides enumeration support for a group import workflow. It defines a stepped process for importing groups, likely used in a wizard-style UI where users progress through Options, Preview, and Import stages.
### Public Interface
**`abstract class GroupImportEnums`**
- Container class for import-related enumerations.
**`enum GroupImportEnums.Steps`**
- Values: `Options`, `Preview`, `Import`
- Represents the sequential stages of a group import operation.
### Invariants
- The class is `abstract`, indicating it is intended only as a namespace container and cannot be instantiated.
- Step ordering is sequential: `Options = 0`, `Preview = 1`, `Import = 2`.
### Dependencies
- **Depends on**: None.
- **Depended on by**: Unclear from source alone—likely consumed by group import UI or business logic.
### Gotchas
- None identified from source alone.
---

View File

@@ -0,0 +1,25 @@
---
source_files:
- Common/DTS.Common/Enums/Groups/GroupList/GroupFields.cs
generated_at: "2026-04-17T16:44:33.470980+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "c8d2a2a304554d0b"
---
# Documentation: GroupFields Enum
## 1. Purpose
This module defines the `GroupFields` enumeration within the `DTS.Common.Enums.Groups.GroupList` namespace. It serves as a strongly-typed definition of properties associated with a "Group" entity, likely used for UI data binding, column selection in list views, or sorting/filtering operations. The inclusion of `TypeConverter` and `Description` attributes indicates that this enum is designed to integrate with component-based UI frameworks (such as Windows Forms or WPF) where display names need to be localized or decoupled from the code identifiers.
## 2. Public Interface
### Enum: `GroupFields`
**Signature:**
```csharp
[TypeConverter(typeof(EnumDescriptionTypeConverter))]
public enum GroupFields
```
**Description:**
Defines the standard fields available for Group entities. It is decorated with `System.ComponentModel.TypeConverter` using `EnumDescriptionTypeConverter`, suggesting that when the

View File

@@ -0,0 +1,173 @@
---
source_files:
- Common/DTS.Common/Enums/Hardware/HardwareListTags.cs
- Common/DTS.Common/Enums/Hardware/SLICETCConfigurations.cs
- Common/DTS.Common/Enums/Hardware/SLICEConfigurations.cs
- Common/DTS.Common/Enums/Hardware/HardwareTypes.cs
generated_at: "2026-04-17T15:38:25.598144+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "ed0388408df57875"
---
# Documentation: DTS.Common.Enums.Hardware
## 1. Purpose
This module defines the core hardware enumeration types and constants for the DTS (Data Translation System) hardware platform. It provides a centralized definition of hardware types (SLICE, TDAS, TSR, and embedded sensor modules), hardware list metadata tags, configuration variants, and an abstract `HardwareConstants` class containing utility methods for hardware capability detection, recording mode validation, and feature support queries. This module serves as the foundational type system for hardware identification and capability negotiation throughout the DTS codebase.
---
## 2. Public Interface
### Enums
#### `HardwareListTags`
Defines metadata tags for hardware list entries.
```csharp
public enum HardwareListTags
{
Included,
SerialNumber,
HardwareType,
ChannelCount,
Firmware,
MaxSampleRate,
TestSampleRate,
DSPStreamingFilter,
CalDate,
CalDueDate,
IPAddress,
FirstUseDate
}
```
#### `SLICETCConfigurations`
Defines SLICE-TC configuration variants. Decorated with `[TypeConverter(typeof(EnumDescriptionTypeConverter))]`.
```csharp
public enum SLICETCConfigurations
{
[Description("SLICETC_CONFIGURATION_24")] TWENTYFOUR,
[Description("SLICETC_CONFIGURATION_16")] SIXTEEN,
[Description("SLICETC_CONFIGURATION_8")] EIGHT
}
```
#### `SLICEPROSIMConfigurations`
Defines SLICE Pro/ProSim configuration variants. Decorated with `[TypeConverter(typeof(EnumDescriptionTypeConverter))]`.
```csharp
public enum SLICEPROSIMConfigurations
{
[Description("SLICE_CONFIGURATION_MEGA")] MEGA,
[Description("SLICE_CONFIGURATION_800K")] EIGHT_HUNDRED,
[Description("SLICE_CONFIGURATION_700K")] SEVEN_HUNDRED,
[Description("SLICE_CONFIGURATION_600K")] SIX_HUNDRED
}
```
#### `HardwareTypes`
Defines all supported hardware device types with explicit integer values (0-60). Decorated with `[TypeConverter(typeof(EnumDescriptionTypeConverter))]`. Key values include:
- `SLICE_Base = 0` through `SLICE_PRO_CAN_FD = 60`
- Notable families: SLICE, SLICE2, SLICE6, TDAS, TSR, embedded sensor modules (EMB_*), and special types like `UNDEFINED = 38`
#### `SLICEBridgeTypes`
Defines bridge module types. Decorated with `[TypeConverter(typeof(EnumDescriptionTypeConverter))]`.
```csharp
public enum SLICEBridgeTypes
{
Bridge, IEPE, ARS, ACC, RTC, UART, StreamOut, Thermocoupler, CAN
}
```
#### `RackSizes`
Defines rack size configurations. Decorated with `[TypeConverter(typeof(EnumDescriptionTypeConverter))]`.
```csharp
public enum RackSizes
{
[Description("RACK_SIZE_4M")] FOUR,
[Description("RACK_SIZE_8M")] EIGHT
}
```
### HardwareConstants Class
#### Constants
```csharp
public const int TSRAIR_MAXSLICENABLE_VERSION = 28;
public const int TSR_AIR_MAX_MODULES = 6;
public const string TSR_AIR_PREPEND = "TA";
public const int INVALID_IDASCOMMUNICATION_RECORD_ID = -1;
public const int DEFAULTMEMORYSIZE_PRO = 16000000;
public const int DEFAULTMEMORYSIZE_DIM = 2000000;
public const int DEFAULTMEMORYSIZE_TOM = 2000000;
```
#### Properties
```csharp
public static bool AllowSoftDisconnects { get; set; } = false;
```
#### Methods
```csharp
public static bool IsTSRAIRSerialNumber(string serialNumber)
```
Returns `true` if the serial number starts with "TA" prefix; returns `false` for null or empty strings.
```csharp
public static SolidColorBrush GetBrushForVoltageStatus(DFConstantsAndEnums.VoltageStatusColor status)
```
Maps voltage status colors to WPF brush objects from `BrushesAndColors`.
```csharp
public static bool SupportsTriggerInversion(HardwareTypes type, int protocolVersion)
```
Returns `true` for SLICE1, SLICE1.5, SLICE2 variants (including IEPE, Nano, Micro, SIM, DIM, TOM, SLS, G5Stack, SLT, SLD). Returns `false` for all other hardware types. Note: `protocolVersion` parameter is accepted but not used in the implementation.
```csharp
public static bool SupportsStartInversion(HardwareTypes type, int protocolVersion)
```
Returns `true` for the same hardware types as `SupportsTriggerInversion` plus `SLICE6_AIR`. Note: `protocolVersion` parameter is accepted but not used in the implementation.
```csharp
public static bool IsEthernetRecorder(HardwareTypes type)
```
Returns `true` only for `HardwareTypes.S6A_EthernetRecorder`.
```csharp
public static bool HasEmbeddedSensors(HardwareTypes hardware)
```
Returns `true` for EMB_* module types, TSR_AIR variants, DIR, DKR, and SLICE6_AIR_TC.
```csharp
public static bool HasEmbeddedChannelType(HardwareTypes hardware, string channelType)
```
Determines if a channel type is supported by embedded hardware. Uses `DFConstantsAndEnums` string constants for channel type comparison. TSR_AIR and TSR_AIR_RevB always return `true`.
```csharp
public static bool IsRecordingModeSupported(RecordingModes mode, HardwareTypes dasType, int protocolVersion, bool includeNativeSupportOnly = false)
```
Dispatches to hardware-specific recording mode validation. Delegates to `SLICE1_5`, `SLICE6`, `SLICE6AIR`, `SLICE6AIRBR`, `SLICE2_TOM`, `TSRAIR`, `SLICE6AIRTC`, `SLICE6DB` classes based on hardware type.
```csharp
public static double MaxSampleRateForRecordingMode(IDASHardware h, RecordingModes mode, int protocolVersion = 1, uint baudRate = 0)
```
Returns maximum sample rate for a recording mode. Dispatches to `SLICE6AIR.MaxSampleRateHzForRecordingMode` for SLICE6_AIR, or `SLICE6AIR.MaxSampleRateHz_OBRDDR` for S6A_EthernetRecorder; otherwise uses `IDASHardware.GetMaxSampleRateDouble()`.
```csharp
public static bool IsStreamingProfileSupported(UDPStreamProfile profile, HardwareTypes dasType, int protocolVersion, bool includeNativeSupportOnly = false)
```
Dispatches streaming profile validation to `SLICE6`, `SLICE6AIR`, `SLICE6AIRBR`, `TSRAIR`, or `SLICE6AIRTC` classes.
```csharp
public static bool IsClockSyncProfileSupported(ClockSyncProfile profile, HardwareTypes dasType, int protocolVersion, bool includeNativeSupportOnly, bool master)
```
Dispatches clock sync profile validation to hardware-specific implementation classes.
---
## 3. Invariants
- **HardwareTypes enum values are explicitly assigned** and must remain stable for serialization/persistence compatibility (values 0-60 defined, with 22 and 35 commented out/unused).
- **TSR_AIR serial numbers** must start with "TA" prefix to be identified by `IsTSRAIRSerialNumber`.
- **HardwareConstants.AllowSoftDisconnects** is a global mutable state that must be set by the application at startup

View File

@@ -0,0 +1,23 @@
---
source_files:
- Common/DTS.Common/Enums/Reports/ReportConstantsAndEnums.cs
generated_at: "2026-04-17T16:42:51.364426+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "8c17bbbcd948f74f"
---
# Documentation for ReportConstantsAndEnums.cs
## 1. Purpose
This file defines the namespace `DTS.Common.Enums.Reports`. Based on the file name `ReportConstantsAndEnums.cs`, it is intended to serve as a central location for enumerations and constants related to the reporting subsystem. However, the current source contains no actual type definitions or logic.
## 2. Public Interface
**None.** The namespace block is empty. There are no public classes, methods, enums, or constants defined in the provided source.
## 3. Invariants
None identified from source alone.
## 4. Dependencies
* **Imports:** The file imports `System`, `System.Collections.Generic`, `System.Linq`, `System.Text`, and `System.Threading.Tasks`.
* *Note:* These imports are currently unused as the namespace contains no implementation.

View File

@@ -0,0 +1,307 @@
---
source_files:
- Common/DTS.Common/Enums/Sensors/SensorChangeTypes.cs
- Common/DTS.Common/Enums/Sensors/SensorStatus.cs
- Common/DTS.Common/Enums/Sensors/PossibleFilters.cs
- Common/DTS.Common/Enums/Sensors/LinearizationFormula.cs
- Common/DTS.Common/Enums/Sensors/CalibrationEnforcement.cs
- Common/DTS.Common/Enums/Sensors/SensitivityInspection.cs
- Common/DTS.Common/Enums/Sensors/CalibrationBehaviors.cs
- Common/DTS.Common/Enums/Sensors/InitialOffsetTypes.cs
- Common/DTS.Common/Enums/Sensors/FilterClassType.cs
- Common/DTS.Common/Enums/Sensors/ZeroMethodType.cs
- Common/DTS.Common/Enums/Sensors/CSVImportTags.cs
- Common/DTS.Common/Enums/Sensors/SensorConstants.cs
generated_at: "2026-04-17T15:31:44.880303+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "ef8fc2aacbeebadc"
---
# DTS.Common.Enums.Sensors Module Documentation
## 1. Purpose
This module provides the core enumerations, constants, and utility methods for sensor management within the DTS data acquisition system. It defines sensor lifecycle states, calibration behaviors, filter configurations, zero methods, CSV import/export field mappings, and various sensor-related constants. The module serves as a foundational layer for sensor configuration, validation, and data interchange across the application.
---
## 2. Public Interface
### Enumerations
#### `SensorChangeTypes`
```csharp
public enum SensorChangeTypes { OffsetTolerance }
```
Defines types of sensor changes. Currently only `OffsetTolerance` is defined.
#### `SensorStatus`
```csharp
public enum SensorStatus { Available, InUse, OutForService, OutForCalibration, Retired }
```
Defines the lifecycle states of a sensor.
#### `PossibleFilters`
```csharp
public enum PossibleFilters { All, Analog, Squib, DigitalIn, DigitalOut, UART, StreamOut, StreamIn, CAN }
```
Describes different ways of filtering channels and sensors by type.
#### `NonLinearStyles`
```csharp
public enum NonLinearStyles { IRTraccManual, IRTraccDiagnosticsZero, IRTraccZeroMMmV, IRTraccAverageOverTime, Polynomial, IRTraccCalFactor }
```
Defines linearization formula styles for non-linear sensor processing.
#### `NonLinearSLICEWareStyles`
```csharp
public enum NonLinearSLICEWareStyles { Manual, DiagnosticZeroMMmV, ZeroMMmV, AverageOverTime, Polynomial }
```
SLICEWare-specific linearization styles.
#### `CalibrationEnforcement`
```csharp
[TypeConverter(typeof(EnumDescriptionTypeConverter))]
public enum CalibrationEnforcement { None, NonLinear, Linear }
```
Defines calibration enforcement modes. Uses `EnumDescriptionTypeConverter` for display string conversion.
#### `SensitivityInspectionType`
```csharp
[TypeConverter(typeof(EnumDescriptionTypeConverter))]
public enum SensitivityInspectionType { NotSet = 0, Required = 1, Cleared = 2 }
```
Defines sensitivity inspection states with explicit integer values.
#### `CalibrationBehaviors`
```csharp
[TypeConverter(typeof(EnumDescriptionTypeConverter))]
public enum CalibrationBehaviors { LinearIfAvailable, NonLinearIfAvailable, UseBothIfAvailable }
```
Defines how calibration data should be selected when available.
#### `InitialOffsetTypes`
```csharp
[TypeConverter(typeof(EnumDescriptionTypeConverter))]
public enum InitialOffsetTypes { None = 0, EU = 1, EUAtMV = 2, LHS = 3, RHS = 4, FRONTAL = 5 }
```
Defines the format of initial offset values with explicit integer values.
#### `FilterClassType`
```csharp
[TypeConverter(typeof(EnumDescriptionTypeConverter))]
public enum FilterClassType { None = 0, AdHoc = -1, Unfiltered = -2, CFC10 = 17, CFC60 = 100, CFC180 = 300, CFC600 = 1000, CFC1000 = 1650 }
```
Defines SAE filter class types. Values represent cutoff frequencies in Hz. Uses `DescriptionResourceAttribute` for localized display strings.
#### `ZeroMethodType`
```csharp
[TypeConverter(typeof(EnumDescriptionTypeConverter))]
public enum ZeroMethodType { AverageOverTime = 0, UsePreEventDiagnosticsZero = 1, None = 2 }
```
Defines methods for calculating electrical zero. **Order and values are critical for legacy compatibility.**
#### `OriginalZeroMethodType`
```csharp
public enum OriginalZeroMethodType { AverageOverTime, UsePreCalZero, None }
```
Original version of zero method types for backward compatibility.
---
### CSVImportTags Class
```csharp
public abstract class CSVImportTags
```
#### Constants
```csharp
public const int MIN_VALID_VERSION = 0;
public const int MAX_VALID_VERSION = 6;
```
#### Static Methods
```csharp
public static bool IsSensorTag(int version)
```
Returns `true` if the version is in the sensor tags set (versions 0, 2, 3, or 4).
```csharp
public static Tags[] GetVersionTags(int version)
```
Returns all tags applicable to a given CSV import version. Returns empty array if version not found.
```csharp
public static string GetStringForTag(Tags tag)
```
Returns the display string for a given tag using `DisplayAttribute`.
```csharp
public static Tags GetTagForString(string s)
```
Returns the tag enum value for a display string. Returns `Tags.Unknown` if not found.
```csharp
public static int GetVersionForTag(Tags t)
```
Returns the version number in which a tag was introduced. Returns `int.MaxValue` if not found.
#### Nested `Tags` Enum
Contains 100+ tag values for CSV import/export fields, each decorated with `[Display(Name = "...")]` and `[Version(int)]` attributes indicating the field name and the version in which it was introduced.
---
### SensorConstants Class
```csharp
public abstract class SensorConstants
```
#### Static Properties (Cached Configuration Values)
| Property | Type | Default/Initial Value |
|----------|------|----------------------|
| `UseInitSignalTOM` | `bool` | `false` |
| `δThorax`, `δAbdomen`, `D0Thorax`, `D0Abdomen`, `δThoraxLower`, `D0ThoraxLower` | `double` | Various IR-TRACC 3D values |
| `UseSensorFirstUseDate` | `bool` | `false` |
| `DontAllowDataCollectionIfOverused` | `bool` | `false` |
| `AllowInspectBeforeUse` | `bool` | `false` |
| `UsageRemainingForWarning` | `int` | (uninitialized) |
| `DefaultMaxUsageAllowed` | `int` | (uninitialized) |
| `UseISOCodeFilterMapping` | `bool` | `true` |
| `DefaultZeroMethodType` | `ZeroMethodType` | `AverageOverTime` |
| `DefaultZeroMethodStart` | `double` | `-0.05D` |
| `DefaultZeroMethodEnd` | `double` | `-0.02D` |
| `DefaultRangeHiG` | `double` | `400D` |
| `DefaultRangeLowG` | `double` | `64D` |
| `DefaultRangeLowGDisplay` | `double` | `50D` |
| `DefaultRangeARS` | `double` | `2000D` |
| `DefaultRangeTemperature` | `double` | `85D` |
| `DefaultRangeHumidity` | `double` | `100D` |
| `DefaultRangePressure` | `double` | `16D` |
| `DisableAutoSense` | `bool` | (uninitialized) |
| `DefaultBridgeOffsetMVTolLow` | `double` | `-100` |
| `DefaultBridgeOffsetMVTolHigh` | `double` | `100` |
| `DefaultIEPEOffsetMVTolLow` | `double` | `-2000` |
| `DefaultIEPEOffsetMVTolHigh` | `double` | `2000` |
| `SensorCalOutOfDateWarningPeriodDays` | `int` | `14` |
| `SensorCalPolicyCurrent` | `SensorCalPolicy` | `DONT_ALLOW` |
#### Static Methods
```csharp
public static bool IsTestSpecificDigitalOut(string sn)
public static bool IsTestSpecificSquib(string sn)
public static bool IsTestSpecificDigitalIn(string sn)
public static bool IsTestSpecificEmbedded(string sn)
public static bool IsTestSpecificThermoCouple(string sn)
public static bool IsTestSpecificEmbeddedClock(string sn)
public static bool IsTestSpecificStreamOut(string sn)
public static bool IsTestSpecificStreamIn(string sn)
public static bool IsTestSpecificUart(string sn)
public static bool IsTestSpecificThermocoupler(string sn)
public static bool IsTestSpecificCAN(string sn)
```
Each returns `true` if the serial number starts with the corresponding test-specific prefix.
```csharp
public static bool IsTSRAirHighGChannel(string moduleSerialNumber)
public static bool IsTSRAirLowGChannel(string moduleSerialNumber)
public static bool IsTSRAirARSChannel(string moduleSerialNumber)
public static bool IsTSRAirAtmChannel(string moduleSerialNumber)
public static bool IsTSRAirHumidityChannel(string moduleSerialNumber, int channelNumber)
```
Identify TSR AIR module channel types by suffix or channel number.
```csharp
public static BridgeType ConvertIntToBridgeType(int bridge)
```
Converts integer database values to `BridgeType` enum.
```csharp
public static int ConvertBridgeToInt(BridgeType bridge)
```
Converts `BridgeType` enum to integer for database storage (non-bitmask values).
#### Nested Types
```csharp
public enum SensorSettings { Range, CFC, Polarity, Position, LimitDuration, Duration, Delay, OutputMode, SQMode, DIMode, DefaultValue, ActiveValue, SquibLimitDuration, SquibDuration, SquibDelay, DigitalOutLimitDuration, DigitalOutDuration, DigitalOutDelay, SquibCurrent, ZeroMethod, ZeroMethodStart, ZeroMethodEnd, UserValue1, UserValue2, UserValue3, InitialOffset, FilterClass, UartBaudRate, UartDataBits, UartStopBits, UartParity, UartFlowControl, UartDataFormat, StreamOutUDPProfile, StreamOutUDPAddress, StreamOutUDPTimeChannelId, StreamOutUDPDataChannelId, StreamOutUDPTmNSConfig, StreamOutIRIGTimeDataPacketIntervalMs, StreamInUDPAddress, ACCouplingEnabled, BridgeType }
public enum SensorType { Analog, DigitalIn, DigitalOut, Squib, Clock, UART, StreamOut, StreamIn, Thermocoupler }
public enum SensUnits { NONE = 0, mV = 1, mVperV = 2, mVperVperEU = 3, mVperEU = 4 }
public enum BridgeType { IEPE = 1, QuarterBridge = 2, HalfBridge = 4, FullBridge = 8, DigitalInput = 16, SQUIB = 32, TOMDigital = 64, HalfBridge_SigPlus = 128, RTC = 256, UART = 512, StreamOut = 1024, StreamIn = 2048, Thermocoupler = 4096, CAN = 8192 }
public enum SensorCalPolicy { AllowAlways, DONT_ALLOW }
public enum CouplingModes { AC = 0, DC }
public enum AvailableRangesLowG { LowG64D = 64 }
public enum AvailableRangesARS { ARS2000D = 2000 }
public abstract class SensUnitStringConverter
{
public static SensUnits ConvertFromString(string s)
}
```
---
## 3. Invariants
1. **CSV Version Range**: Valid CSV import versions are between `MIN_VALID_VERSION` (0) and `MAX_VALID_VERSION` (6), inclusive.
2. **Sensor Tag Versions**: Only versions 0, 2, 3, and 4 are considered "sensor tag" versions as defined in `_SensorTagsVersions`.
3. **Bridge Resistance Limits**: Valid bridge resistance values must be between `MIN_BRIDGE_RESISTANCE_OHMS` (1) and `MAX_BRIDGE_RESISTANCE_OHMS` (32000).
4. **ZeroMethodType Enum Ordering**: The order and explicit values of `ZeroMethodType` enum members must not be changed due to legacy compatibility requirements (e.g., GM ISF import).
5. **BridgeType Bitmask vs. Storage**: `BridgeType` uses bitmask values (powers of 2), but database storage uses sequential integers (0-4, 8) via `ConvertBridgeToInt`.
6. **FilterClassType Values**: Filter class values represent actual cutoff frequencies in Hz (e.g., `CFC60 = 100` Hz, not 60).
7. **TSR AIR Channel Numbers**: Humidity channel is channel 10, Pressure is channel 11, Temperature is channel 9 within TSR AIR atmospheric modules.
---
## 4. Dependencies
### This module depends on:
- `System` - Core .NET types
- `System.ComponentModel` - `TypeConverter`, `DescriptionAttribute`
- `System.ComponentModel.DataAnnotations` - `DisplayAttribute`
- `System.IO.Ports` - `StopBits`, `Parity`, `Handshake` enums
- `System.Collections.Generic` - `Dictionary`, `HashSet`, `List`
- `System.Linq` - LINQ extension methods
- `DTS.Common.Converters` - `EnumDescriptionTypeConverter`
- `DTS.Common.Attributes` - `DisplayAttribute`, `VersionAttribute` (custom attributes)
- `DTS.Common.Base.Classes` - `DescriptionResourceAttribute`
### What depends on this module:
- Unknown from source alone. This is a foundational enums/constants module likely used throughout the DTS application for sensor configuration, data acquisition, and import/export functionality.
---
## 5. Gotchas
1. **Static Property State**: Many static properties in `SensorConstants` (e.g., `UseInitSignalTOM`, `UseSensorFirstUseDate`, `DisableAutoSense`) are described as "holding values between processes" and do not serialize/deserialize. They must be set by using applications on startup.
2. **ZeroMethodType Legacy Compatibility**: The comment explicitly warns: *"Lots of legacy compatibility (e.g. importing GM ISF) depends on the order/value of this enum."* Do not reorder or reassign values.
3. **BridgeType Integer Conversion**: The `ConvertBridgeToInt` method uses non-bitmask integer values for database storage, which is described as "needed for historical reasons." The mapping is not 1:1 with bitmask values (e.g., `HalfBridge_SigPlus = 128` in enum but stores as `4`).
4. **Deprecated SensorSettings**: `LimitDuration`, `Duration`, and `Delay` in `SensorSettings` enum are marked as "deprecated in 2.1" but remain in the enum.
5. **FilterClassType None Behavior**: Per comments, `None = 0` has special behavior: "Code = P unless UseZeroForUnfiltered is True, then Code = 0". This behavior is not defined in this source file.
6. **Uninitialized Static Properties**: `UsageRemainingForWarning` and `DefaultMaxUsageAllowed` are declared without initialization, implying they must be set before use.
7. **Test-Specific Serial Number Prefixes**: Multiple similar prefixes exist (`TEST_SPECIFIC_THERMO = "TST_"` vs `TEST_SPECIFIC_THERMOCOUPLER = "TST_TestSpecific"`). The relationship between short prefixes and full serial formats is not fully documented in source.
8. **CSVImportTags Thread Safety**: All public methods use `lock(MY_LOCK)` for thread-safe lazy initialization of lookup dictionaries.

View File

@@ -0,0 +1,31 @@
---
source_files:
- Common/DTS.Common/Enums/Sensors/SensorsList/DigitalInputFields.cs
- Common/DTS.Common/Enums/Sensors/SensorsList/CanSettingFields.cs
- Common/DTS.Common/Enums/Sensors/SensorsList/DigitalOutFields.cs
- Common/DTS.Common/Enums/Sensors/SensorsList/SensorListTabs.cs
- Common/DTS.Common/Enums/Sensors/SensorsList/UartSettingFields.cs
- Common/DTS.Common/Enums/Sensors/SensorsList/SquibFields.cs
- Common/DTS.Common/Enums/Sensors/SensorsList/StreamInSettingFields.cs
- Common/DTS.Common/Enums/Sensors/SensorsList/StreamOutSettingFields.cs
- Common/DTS.Common/Enums/Sensors/SensorsList/CACOption.cs
- Common/DTS.Common/Enums/Sensors/SensorsList/AnalogSensorFields.cs
generated_at: "2026-04-17T16:02:00.654938+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "8dba545c41dc4c1e"
---
# SensorsList
1. **Purpose**
This module defines a set of enumerations used to represent fields, settings, and configuration options for various sensor types within the DTS application. It provides strongly-typed identifiers for sensor attributes (e.g., `SerialNumber`, `Description`, `CalDate`) and tab indices for UI navigation, facilitating data binding, grid column mapping, and serialization logic for sensor lists including Analog, Squib, Digital I/O, UART, and Stream types.
2. **Public Interface**
* `enum DigitalInputFields`: Represents fields for digital input sensors. Values: `Included`, `SerialNumber`, `Description`, `Mode`, `ModifiedBy`, `LastModified`.
* `enum CanSettingFields`: Represents CAN bus configuration fields. Values: `CanIsFD`, `CanArbBaseBitrate`, `CanArbBaseSJW`, `CanDataBitrate`, `CanDataSJW`, `CanFileType`.
* `enum DigitalOutFields`: Represents fields for digital output sensors. Values: `Included`, `SerialNumber`, `Description`, `Delay`, `Duration`, `ModifiedBy`, `LastModified`.
* `enum SensorListTabs`: Represents the index of tabs in a sensor list UI. Values: `ANALOG` (0), `SQUIB` (1), `DIGITAL_IN` (2), `DIGITAL_OUT` (3), `UART` (4), `STREAM_IN` (5), `STREAM_OUT` (6).
* `enum UartSettingFields`: Represents UART configuration fields. Values: `Included`, `SerialNumber`, `BaudRate`, `DataBits`, `StopBits`, `Parity`, `FlowControl`, `DataFormat`, `LastModifiedBy`, `LastModified`.
* `enum SquibFields`: Represents fields for squib sensors. Values: `Included`, `SerialNumber`, `Description`, `ResistanceLow`, `ResistanceHigh`, `Id`, `Mode`, `Delay`, `Current`, `Duration`, `ModifiedBy`, `LastModified`.
* `enum Stream

View File

@@ -0,0 +1,19 @@
---
source_files:
- Common/DTS.Common/Enums/SettingsExport/TopLevelFields.cs
generated_at: "2026-04-17T16:40:12.590244+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "83bafe2defbcfdd1"
---
# SettingsExport
## Documentation: `TopLevelFields.cs`
### 1. Purpose
This module defines the `TopLevelFields` enumeration within the `DTS.Common.Enums.SettingsExport` namespace. It provides a strongly-typed list of valid root-level XML tags used during settings export operations, ensuring that the system recognizes only specific top-level structures: `GlobalSettings`, `TestSetupDefaultSettings`, `SensorSettings`, and `TestHistorySettings`.
### 2. Public Interface
**Enum: `TopLevelFields`**
* **Namespace:** `D

View File

@@ -0,0 +1,37 @@
---
source_files:
- Common/DTS.Common/Enums/SliceSimpleArm/SSACommands.cs
generated_at: "2026-04-17T16:09:44.177740+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "948cd86b07501b26"
---
# SliceSimpleArm
### Purpose
This module defines command and response enumerations for interacting with a "Slice Simple Arm" device. It provides a typed vocabulary for device operations (arming, recording, downloading, etc.) and their possible outcomes, enabling structured communication between the application and the hardware device.
### Public Interface
**`enum SSACommand`**
- Values: `ConfigureDevice`, `Diagnostics`, `Arm`, `StartRecord`, `CheckForArmed`, `Disarm`, `Download`, `SetLowPowerMode`, `Trigger`
- Represents operations that can be sent to the Slice Simple Arm device.
**`enum SSAResponse`**
- Values: `Unknown`, `Status`, `Pass`, `Fail`, `SystemNotArmed`, `NoSensorsFound`, `NoEIDsFound`, `UnknownEIDFound`, `NoDASConnected`, `ExceptionThrown`, `DiagnosticsFailedOffsetTolerance`, `DiagnosticsFailedShuntCheck`
- Represents response codes returned from device operations.
### Invariants
- Enum values are implicitly integer-backed (default underlying type `int`).
- No explicit value assignments; ordering is sequential starting from 0.
### Dependencies
- **Depends on**: None (standalone enum definitions).
- **Depended on by**: Unclear from source alone—likely consumed by hardware communication layers or device controllers.
### Gotchas
- The term "EID" and "DAS" are not defined in this module; their meaning requires external context.
- `SSAResponse.Unknown` exists as a default/catch-all response, suggesting responses may be uninitialized or unrecognized in some flows.
---

View File

@@ -0,0 +1,14 @@
---
source_files:
- Common/DTS.Common/Enums/TSRAIRGo/NavigationButtonId.cs
- Common/DTS.Common/Enums/TSRAIRGo/ArmStateMachineStates.cs
generated_at: "2026-04-17T16:37:50.428083+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "a448f9c32d140970"
---
# Documentation: DTS.Common.Enums.TSRAIRGo
## 1. Purpose
This module defines core enumerations for the TSRAIRGo application subsystem. It provides

View File

@@ -0,0 +1,13 @@
---
source_files:
- Common/DTS.Common/Enums/TTS/TTSEnums.cs
generated_at: "2026-04-17T16:09:44.181611+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "ed24e75957330ae9"
---
# TTS
### Purpose
This module provides enumerations and attributes for Toyota Test System (TTS) data import

View File

@@ -0,0 +1,25 @@
---
source_files:
- Common/DTS.Common/Enums/TestSetups/RealtimeGraphsEnum.cs
generated_at: "2026-04-17T16:40:14.401448+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "38c6066ac998b2ae"
---
# Documentation: RealtimeGraphsEnum.cs
## 1. Purpose
This module defines a specific enumeration, `RealtimeGraphsEnum`, used to configure the quantity of realtime graphs displayed or utilized within test setups. It provides a strongly-typed set of allowed values (1, 3, or 6) and integrates with the `System.ComponentModel` architecture to support custom type conversion via `EnumDescriptionTypeConverter`, likely for UI binding or serialization purposes.
## 2. Public Interface
**Namespace:** `DTS.Common.Enums.TestSetups`
**Type:** `enum RealtimeGraphsEnum`
| Member | Value | Description Attribute |
| :--- | :--- | :--- |
| `One` | `1` | `"RealtimeGraphs_One"` |
| `Three` | `3` | `"RealtimeGraphs_Three"` |
| `Six` | `6` | `"RealtimeGraphs_Six"`

View File

@@ -0,0 +1,12 @@
---
source_files:
- Common/DTS.Common/Enums/TestSetups/TestSetupsList/TestSetupFields.cs
generated_at: "2026-04-17T16:52:23.951780+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "476a7b9a04a6daaa"
---
# TestSetupsList
##

View File

@@ -0,0 +1,190 @@
---
source_files:
- Common/DTS.Common/Events/LoadViewList.cs
- Common/DTS.Common/Events/LoadExportList.cs
- Common/DTS.Common/Events/ClearSelectedExportsEvent.cs
- Common/DTS.Common/Events/LoginUserEvent.cs
- Common/DTS.Common/Events/TextPastedEvent.cs
- Common/DTS.Common/Events/BusyIndicatorChangeNotification.cs
- Common/DTS.Common/Events/ComActiveEvent.cs
- Common/DTS.Common/Events/CloseApplicationRequested.cs
- Common/DTS.Common/Events/TabControlSelectionChanged.cs
- Common/DTS.Common/Events/RaiseNotification.cs
- Common/DTS.Common/Events/PageSetActiveEvent.cs
- Common/DTS.Common/Events/GroupTemplateChangeNotification.cs
- Common/DTS.Common/Events/DatabaseVersionChangedEvent.cs
- Common/DTS.Common/Events/SetSaveButton.cs
- Common/DTS.Common/Events/DBConnectionEvent.cs
- Common/DTS.Common/Events/AutomaticModeStatusEvent.cs
- Common/DTS.Common/Events/SetPageVisibilityEvent.cs
- Common/DTS.Common/Events/LogoutUserEvent.cs
- Common/DTS.Common/Events/TestEvent.cs
- Common/DTS.Common/Events/PageSelectionChanged.cs
- Common/DTS.Common/Events/PageNameEvent.cs
- Common/DTS.Common/Events/UserEvent.cs
- Common/DTS.Common/Events/ListViewStatusEvent.cs
- Common/DTS.Common/Events/HelpTextEvent.cs
- Common/DTS.Common/Events/PageModifiedEvent.cs
- Common/DTS.Common/Events/AssemblyListNotification.cs
- Common/DTS.Common/Events/FeedbackEvent.cs
- Common/DTS.Common/Events/CancelProcess.cs
- Common/DTS.Common/Events/TabControlSelectionEventArgs.cs
- Common/DTS.Common/Events/SLICE6MulticastPropertyEvent.cs
- Common/DTS.Common/Events/AppStatusEvent.cs
- Common/DTS.Common/Events/PageErrorEvent.cs
- Common/DTS.Common/Events/PageNavigationRequestEvent.cs
- Common/DTS.Common/Events/ProgressBarEvent.cs
- Common/DTS.Common/Events/NotificationContentEventArgs.cs
- Common/DTS.Common/Events/ShowStatus.cs
generated_at: "2026-04-17T15:25:56.885398+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "64c6547fc983e8c2"
---
# DTS.Common.Events Module Documentation
## 1. Purpose
This module defines the application-wide event system for the DTS application using the Prism Event Aggregator pattern. It provides a loosely-coupled pub/sub messaging infrastructure that enables communication between decoupled components. The module contains event definitions, their associated argument classes, and related enums for various cross-cutting concerns including UI state management, database connectivity, user authentication, navigation, process status, and hardware communication (SLICE6 devices).
---
## 2. Public Interface
### Event Classes (PubSubEvent<T> implementations)
| Event Class | Payload Type | Description |
|-------------|--------------|-------------|
| `LoadViewModulEvent` | `LoadViewModulArg` | Event for loading view modules |
| `LoadExportModuleEvent` | `LoadExportModuleArg` | Event for loading export modules |
| `ClearSelectedExportsEvent` | `ClearSelectedExportsArg` | Event to clear selected exports |
| `LoginUserEvent` | `LoginUserArg` | Event for user login notifications |
| `TextPastedEvent` | `ITextPastedEventArgs` | Event for text paste operations |
| `BusyIndicatorChangeNotification` | `bool` | Event to toggle busy indicator state |
| `CommActiveEvent` | `ComStatusArg` (enum) | Event for COM status changes |
| `CloseApplicationRequested` | `object` | Event to signal application close request |
| `TabControlSelectionChanged` | `TabControlSelectionEventArgs` | Event for tab control selection changes |
| `RaiseNotification` | `NotificationContentEventArgs` | Event to display notification dialogs |
| `PageSetActiveEvent` | `PageSetActiveEventArg` | Event signaling a page has been set active |
| `GroupTemplateChangeNotification` | `IBaseModel` | Event for group template selection changes |
| `DatabaseVersionChangedEvent` | `DatabaseVersionChangedEventArgs` | Event for database version changes |
| `SetSaveButton` | `SaveButtonUsability` | Event to enable/disable save button |
| `DBConnectionEvent` | `DBConnectionArg` | Event for database connection state changes |
| `AutomaticModeStatusEvent` | `AutomaticModeStatusEventArgs` | Event for automatic mode status changes |
| `SetPageHeaderVisibilityEvent` | `SetPageHeaderVisibilityEventArgs` | Event to control page header visibility |
| `LogoutUserEvent` | `LogoutUserArg` | Event for user logout notifications |
| `TestEvent` | `TestEventArg` | Event for test start/end notifications |
| `PageSelectionChanged` | `PageSelectionChangedArg` | Event for page selection changes |
| `PageNameEvent` | `PageNameEventArg` | Event for page name updates (uses `CompositePresentationEvent<T>`) |
| `UserEvent` | `UserEventArg` | Event for user-related notifications |
| `ListViewStatusEvent` | `ListViewStatusArg` | Event for list view status changes |
| `HelpTextEvent` | `HelpTextEventArg` | Event for tooltip/help text handling |
| `PageModifiedEvent` | `PageModifiedArg` | Event for page modification state changes |
| `AssemblyListNotification` | `AssemblyListInfo` | Event for assembly list notifications |
| `AssemblyListNotificationViewer` | `AssemblyListInfo` | Event for assembly list viewer notifications |
| `FeedbackEvent` | `FeedbackArg` | Event for feedback page updates |
| `CancelProcessEvent` | `CancelProcess` | Event to cancel running processes |
| `SLICE6MulticastPropertyEventChanged` | `SLICE6MulticastPropertyEventArgs` | Event for SLICE6 multicast property changes |
| `AppStatusEvent` | `AppStatusArg` (enum) | Event for application busy/available state |
| `AppStatusExEvent` | `AppStatusExArg` | Extended app status event with process name |
| `PageErrorEvent` | `PageErrorArg` | Event for surfacing page errors |
| `PageNavigationRequestEvent` | `PageNavigationRequest` | Event for page navigation requests |
| `ProgressBarEvent` | `ProgressBarEventArg` | Event for progress bar updates |
| `ShowStatus` | `StatusInfo` | Event for displaying process status |
### Argument Classes
#### `LoginUserArg`
```csharp
public string UserName { get; set; }
```
#### `ITextPastedEventArgs` (interface)
```csharp
string Text { get; }
object Sender { get; }
string Id { get; }
object Tag { get; }
```
#### `PageSetActiveEventArg`
```csharp
public IDataPROPage Page { get; set; }
```
#### `DatabaseVersionChangedEventArgs`
```csharp
public string Version { get; set; } = string.Empty;
```
#### `SaveButtonUsability`
```csharp
public bool IsUsable { get; set; }
```
#### `DBConnectionArg`
```csharp
public bool Connected { get; set; }
public string DBName { get; set; }
public string Server { get; set; }
```
#### `AutomaticModeStatusEventArgs`
```csharp
public bool TextSet { get; set; } = false;
public string Text { get; set; } = string.Empty;
```
#### `SetPageHeaderVisibilityEventArgs`
```csharp
public bool SetVisiblity { get; set; } = false;
public Visibility Visibility { get; set; }
```
#### `LogoutUserArg`
```csharp
public enum Reasons { DatabaseSwitch }
public Reasons Reason { get; }
// Constructor: LogoutUserArg(Reasons reason)
```
#### `TestEventArg`
```csharp
public TestEventStatus Status { get; private set; }
// Constructor: TestEventArg(TestEventStatus status)
```
#### `PageSelectionChangedArg`
```csharp
public object Page { get; }
public int Count { get; }
// Constructor: PageSelectionChangedArg(int count, object page)
```
#### `PageNameEventArg`
```csharp
public string Name { get; private set; }
public object Page { get; private set; }
// Constructor: PageNameEventArg(object page, string name)
```
#### `UserEventArg`
```csharp
public enum Events { ViewingUserChanged }
public Events EventType { get; private set; }
public object Argument { get; private set; }
// Constructor: UserEventArg(Events eventType, object argument)
```
#### `ListViewStatusArg`
```csharp
public enum ListViewStatus { Unloaded, ScrollToBottom }
public ListViewStatus Status { get; }
public string Id { get; }
// Constructor: ListViewStatusArg(ListViewStatus status, string id)
```
#### `HelpTextEventArg`
```csharp
public object Sender { get; set

View File

@@ -0,0 +1,44 @@
---
source_files:
- Common/DTS.Common/Events/ChannelCodes/ChannelCodesViewChangedEvent.cs
- Common/DTS.Common/Events/ChannelCodes/ChannelCodeCommittedEvent.cs
generated_at: "2026-04-17T16:07:34.968095+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "9d1faa44d38bcfed"
---
# ChannelCodes
### Purpose
This module defines event types for the Channel Codes subsystem within the DTS application. It provides pub/sub event definitions used to broadcast changes to channel code views and to notify the system when channel codes have been committed, carrying metadata about the committed code and user permissions.
### Public Interface
**`ChannelCodesViewChangedEvent`** (class, inherits `PubSubEvent<DTS.Common.Enums.IsoViewMode>`)
- Event payload: `DTS.Common.Enums.IsoViewMode` (enum value)
- Purpose: Broadcasts when the channel codes view mode has changed.
**`ChannelCodeCommittedEvent`** (class, inherits `PubSubEvent<ChannelCodeCommittedEventArgs[]>`)
- Event payload: Array of `ChannelCodeCommittedEventArgs`
- Purpose: Broadcasts when one or more channel codes have been committed.
**`ChannelCodeCommittedEventArgs`** (class)
- Constructor: `ChannelCodeCommittedEventArgs(ChannelEnumsAndConstants.ChannelCodeType channelCodeType, string code, string name, bool canUserCommitChannelCodes)`
- Properties:
- `ChannelCodeType` (`ChannelEnumsAndConstants.ChannelCodeType`) - The type of channel code.
- `Code` (`string`) - The code identifier.
- `Name` (`string`) - The display name.
- `CanUserCommitChannelCodes` (`bool`) - Indicates whether the user submitting the event has write privilege for channel codes.
### Invariants
- `ChannelCodeCommittedEventArgs` properties are set only via constructor and are read-only (private setters).
- `ChannelCodeCommittedEvent` publishes an array of event args, not a single instance.
### Dependencies
- **Depends on**: `Prism.Events` (for `PubSubEvent<T>` base class), `DTS.Common.Enums` (for `IsoViewMode`), `DTS.Common.Enums.Channels` (for `ChannelEnumsAndConstants.ChannelCodeType`).
### Gotchas
- The file `ChannelCodesViewChangedEvent.cs` suppresses the ReSharper namespace check, suggesting the file location may not match the declared namespace (`DTS.Common.Events` vs. expected `DTS.Common.Events.ChannelCodes`). This could cause confusion when locating the class.
---

View File

@@ -0,0 +1,23 @@
---
source_files:
- Common/DTS.Common/Events/DASFactory/DASConfigurationEvent.cs
generated_at: "2026-04-17T16:11:09.537747+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "217896f072379dd1"
---
# DASFactory
### Purpose
This module provides an event for broadcasting DAS (Data Acquisition System) configuration notifications, specifically to alert subscribers when configurations are blank or missing. It was introduced to handle emergency download scenarios where filestore configurations may be absent, per issue 17872.
### Public Interface
**`DASConfigurationEvent`**
- Signature: `class DASConfigurationEvent : PubSubEvent<IDASConfigurationArg>`
- Description: A pub/sub event that carries `IDASConfigurationArg` payloads to notify subscribers about configuration state, particularly blank or missing configurations.
### Invariants
- The event payload must implement `IDASConfigurationArg` interface (defined externally in `DTS.Common.Interface.DASFactory`).
- The event is currently only used for notifying about

View File

@@ -0,0 +1,78 @@
---
source_files:
- Common/DTS.Common/Events/DTS.Viewer/Reports/SaveReportToCSVRequestedEvent.cs
- Common/DTS.Common/Events/DTS.Viewer/Reports/SaveReportToPDFRequestedEvent.cs
generated_at: "2026-04-17T16:38:04.393080+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "0eaf9841175516dd"
---
# Documentation: Report Export Events
## 1. Purpose
This module defines two Prism event aggregation types for requesting report exports in the DTS Viewer application. `SaveReportToCSVRequestedEvent` and `SaveReportToPDFRequestedEvent` enable loosely-coupled communication between view models and report generation services, allowing components to request CSV or PDF exports without direct dependencies on each other. Both events carry the target directory path and a reference to the requesting parent view model.
---
## 2. Public Interface
### `SaveReportToCSVRequestedEvent`
**Signature:** `public class SaveReportToCSVRequestedEvent : PubSubEvent<SaveReportToCSVRequestedEventArgs>`
An event type for publishing and subscribing to CSV export requests. Inherits from Prism's `PubSubEvent<T>` and uses `SaveReportToCSVRequestedEventArgs` as its payload type.
---
### `SaveReportToCSVRequestedEventArgs`
**Signature:** `public class SaveReportToCSVRequestedEventArgs`
Payload class carrying data for CSV export requests.
| Property | Type | Access |
|----------|------|--------|
| `Directory` | `string` | get; set; |
| `ParentVM` | `IBaseViewModel` | get; set; |
---
### `SaveReportToPDFRequestedEvent`
**Signature:** `public class SaveReportToPDFRequestedEvent : PubSubEvent<SaveReportToPDFRequestedEventArgs>`
An event type for publishing and subscribing to PDF export requests. Inherits from Prism's `PubSubEvent<T>` and uses `SaveReportToPDFRequestedEventArgs` as its payload type.
---
### `SaveReportToPDFRequestedEventArgs`
**Signature:** `public class SaveReportToPDFRequestedEventArgs`
Payload class carrying data for PDF export requests.
| Property | Type | Access |
|----------|------|--------|
| `Directory` | `string` | get; set; |
| `ParentVM` | `IBaseViewModel` | get; set; |
---
## 3. Invariants
- Both event args classes expose identical property structures (`Directory` and `ParentVM`).
- `Directory` is intended to represent a file system path for the export destination.
- `ParentVM` must implement `IBaseViewModel` interface from `DTS.Common.Base`.
- Properties are mutable (public setters); no constructor-based initialization is enforced.
- No null validation or path validation is performed within these classes.
---
## 4. Dependencies
**This module depends on:**
- `Prism.Events` — Provides `PubSubEvent<T>` base class for event aggregation
- `DTS.Common.Base` — Provides `IBaseViewModel` interface
**Consumers (inferred):**
- Any module publishing or subscribing to report export requests via Prism's `IEventAggregator`
- Report generation services that handle these events
- View models that initiate export operations

View File

@@ -0,0 +1,46 @@
---
source_files:
- Common/DTS.Common/Events/DTS.Viewer/Reports/PowerSpectralDensity/PSDReportSettingsChangedEvent.cs
- Common/DTS.Common/Events/DTS.Viewer/Reports/PowerSpectralDensity/PSDReportGRMSValuesUpdatedEvent.cs
generated_at: "2026-04-17T16:26:51.849481+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "59c47482ba063f01"
---
# PowerSpectralDensity
### Purpose
This module defines Prism event types for broadcasting Power Spectral Density (PSD) report-related changes within the DTS Viewer application. It enables loose coupling between components that produce PSD report updates (settings changes, GRMS value recalculations) and consumers that need to react to those updates, using the event aggregation pattern.
### Public Interface
**`PSDReportSettingsChangedEvent`** (class, inherits `PubSubEvent<PSDReportSettingsChangedEventArg>`)
- Event type for publishing/subscribing to PSD report settings changes.
- Payload type: `PSDReportSettingsChangedEventArg`
**`PSDReportSettingsChangedEventArg`** (class)
- `IPSDReportSettingsModel Model { get; set; }` — The updated PSD report settings model.
- `IBaseViewModel ParentVM { get; set; }` — Reference to the parent view model originating the change.
**`PSDReportGRMSValuesUpdatedEvent`** (class, inherits `PubSubEvent<PSDReportGRMSValuesUpdatedEventArg>`)
- Event type for publishing/subscribing to GRMS (Root Mean Square) value updates in PSD reports.
- Payload type: `PSDReportGRMSValuesUpdatedEventArg`
**`PSDReportGRMSValuesUpdatedEventArg`** (class)
- `IChannelGRMSSummary[] Values { get; set; }` — Array of channel GRMS summary values.
- `IBaseViewModel ParentVM { get; set; }` — Reference to the parent view model associated with the update.
### Invariants
- Both event types inherit from `PubSubEvent<T>` from Prism, requiring the event aggregator pattern for publication/subscription.
- The `ParentVM` property in both event args is intended to identify the source context of the event (nullability is not enforced at compile time).
### Dependencies
- **Depends on**: `DTS.Common.Base` (for `IBaseViewModel`), `DTS.Common.Interface` (for `IPSDReportSettingsModel`, `IChannelGRMSSummary`), `Prism.Events` (for `PubSubEvent<T>`).
- **Depended on by**: Unclear from source alone—likely PSD report view models, view components, or services that subscribe to or publish these events.
### Gotchas
- The `ParentVM` property could be `null` if not set by the publisher; subscribers should handle this possibility.
- The event args classes use mutable auto-properties; event payloads can be modified after publication if references are retained.
---

View File

@@ -0,0 +1,83 @@
---
source_files:
- Common/DTS.Common/Events/DTS.Viewer/TestModification/RefreshTestRequestEvent.cs
- Common/DTS.Common/Events/DTS.Viewer/TestModification/ShowT0CursorEvent.cs
- Common/DTS.Common/Events/DTS.Viewer/TestModification/TestModificationChangedEvent.cs
- Common/DTS.Common/Events/DTS.Viewer/TestModification/SetUseZeroForUnfilteredEvent.cs
- Common/DTS.Common/Events/DTS.Viewer/TestModification/TestModificationEvent.cs
- Common/DTS.Common/Events/DTS.Viewer/TestModification/ShiftT0Event.cs
generated_at: "2026-04-17T16:03:15.426783+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "f69e333ecbb396d6"
---
# TestModification
### Purpose
This module defines a set of Prism events for coordinating test modification operations within the DTS Viewer system. It provides a loosely-coupled messaging mechanism for components to communicate changes to test data, T0 cursor state, and filtering behavior without direct references. All events inherit from `CompositePresentationEvent<T>` from the legacy Microsoft.Practices.Prism library.
### Public Interface
**RefreshTestRequestEvent**
- Signature: `public class RefreshTestRequestEvent : CompositePresentationEvent<string>`
- Payload: `string` (test ID)
- Behavior: Published to request a refresh of a specific test identified by its ID.
**ShowT0CursorEvent**
- Signature: `public class ShowT0CursorEvent : CompositePresentationEvent<bool>`
- Payload: `bool` (true to show, false to hide)
- Behavior: Controls visibility of the T0 cursor in the viewer.
**TestModificationChangedEvent**
- Signature: `public class TestModificationChangedEvent : CompositePresentationEvent<ITestModificationModel>`
- Payload: `ITestModificationModel`
- Behavior: Notifies subscribers when the data folder or test modification model has changed.
**SetUseZeroForUnfilteredEvent**
- Signature: `public class SetUseZeroForUnfilteredEvent : CompositePresentationEvent<bool>`
- Payload: `bool`
- Behavior: Controls whether 0 or P is used in the isocode filter field when modifying an isocode from a filter.
**TestModificationEvent**
- Signature: `public class TestModificationEvent : CompositePresentationEvent<TestModificationArgs>`
- Payload: `TestModificationArgs`
- Behavior: Published whenever a test is modified by the viewer. Used by DataPro to regenerate an ROI when an event is modified.
**TestModificationArgs**
- Properties:
- `string DataSetDirectory { get; private set; }` - Path to the DTS file
- `string TestId { get; private set; }` - Identifier of the modified test
- Constructor: `TestModificationArgs(string dtsFilePath, string testId)`
**ShiftT0Event**
- Signature: `public class ShiftT0Event : CompositePresentationEvent<ShiftT0EventArguments>`
- Payload: `ShiftT0EventArguments`
- Behavior: Published to shift the T0 marker position.
**ShiftT0EventArguments**
- Properties:
- `double T0Time { get; }` - The T0 time value
- `bool IsInitialization { get; }` - Whether this shift is part of initialization
- `int T0Steps { get; }` - Steps/samples from T0 to shift
- `bool IsKeyPress { get; }` - Whether shift was caused by arrow key press
- Constructors:
- `ShiftT0EventArguments(double t0, bool isInitialization)` - Sets T0Time, defaults T0Steps=0, IsKeyPress=false
- `ShiftT0EventArguments(int steps, bool isInitialization, bool isKeyPress)` - Sets T0Steps, defaults T0Time=0D
### Invariants
- `TestModificationArgs.DataSetDirectory` and `TestId` are set only at construction and cannot be modified.
- `ShiftT0EventArguments` properties are immutable after construction.
- When using the time-based constructor for `ShiftT0EventArguments`, `T0Steps` is always 0 and `IsKeyPress` is always false.
- When using the steps-based constructor for `ShiftT0EventArguments`, `T0Time` is always 0D.
### Dependencies
- **Depends on**: `Microsoft.Practices.Prism.Events` (legacy Prism event aggregation), `DTS.Common.Interface` (for `ITestModificationModel`)
- **Depended on by**: Unclear from source alone; likely consumed by viewer components, DataPro, and any module that modifies test data.
### Gotchas
- The XML comment for `TestModificationChangedEvent` states "The Data Folder changed event" which appears inconsistent with the class name and payload type (`ITestModificationModel`).
- Several files use `// ReSharper disable CheckNamespace` suggesting namespace inconsistencies that were suppressed rather than fixed.
- The `ShiftT0EventArguments` class has two mutually exclusive constructors; the time-based and steps-based approaches cannot be combined in a single instance.
---

View File

@@ -0,0 +1,62 @@
---
source_files:
- Common/DTS.Common/Events/DTS.Viewer/ViewerChartOptions/ResetZoomChangedEvent.cs
- Common/DTS.Common/Events/DTS.Viewer/ViewerChartOptions/CursorShowChangedEvent.cs
- Common/DTS.Common/Events/DTS.Viewer/ViewerChartOptions/CursorsClearChangedEvent.cs
- Common/DTS.Common/Events/DTS.Viewer/ViewerChartOptions/CursorShowMinMaxChangedEvent.cs
- Common/DTS.Common/Events/DTS.Viewer/ViewerChartOptions/CursorsAlailableChangedEvent.cs
- Common/DTS.Common/Events/DTS.Viewer/ViewerChartOptions/SaveToPDFRequestedEvent.cs
- Common/DTS.Common/Events/DTS.Viewer/ViewerChartOptions/ChartAxisChangedEvent.cs
- Common/DTS.Common/Events/DTS.Viewer/ViewerChartOptions/ChartOptionsChangedEvent.cs
generated_at: "2026-04-17T16:02:47.398492+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "795f6e3411213c28"
---
# ViewerChartOptions
### Purpose
This module defines Prism-based event classes for chart viewer operations, enabling loosely-coupled communication between components in the viewer subsystem. Events cover zoom reset, cursor display/clearing, PDF export, and axis/options changes. Uses the older `Microsoft.Practices.Prism.Events` namespace (Prism 4.x or earlier).
### Public Interface
**ResetZoomChangedEvent**
- Inherits `CompositePresentationEvent<bool>` - Event payload is a boolean.
**CursorShowChangedEvent**
- Inherits `CompositePresentationEvent<bool>` - Event payload is a boolean.
**CursorsClearChangedEvent**
- Inherits `CompositePresentationEvent<bool>` - Event payload is a boolean.
**CursorShowMinMaxChangedEvent**
- Inherits `CompositePresentationEvent<bool>` - Event payload is a boolean.
**CursorsAlailableChangedEvent**
- Inherits `CompositePresentationEvent<bool>` - Event payload is a boolean. Note: typo in class name ("Alailable" vs "Available").
**SaveToPDFRequestedEvent**
- Inherits `CompositePresentationEvent<string>` - Event payload is a string (likely file path).
**ChartAxisChangedEvent**
- Inherits `CompositePresentationEvent<ChartAxisChangedEventArg>` - Event payload is `ChartAxisChangedEventArg`.
**ChartAxisChangedEventArg**
- `IBaseViewModel ParentVM { get; set; }` - Parent view model reference.
- `string Axis { get; set; }` - Axis identifier.
- `double MinValue { get; set; }` - Minimum axis value.
- `double MaxValue { get; set; }` - Maximum axis value.
**ChartOptionsChangedEvent**
- Inherits `CompositePresentationEvent<ChartOptionsChangedEventArg>` - Event payload is `ChartOptionsChangedEventArg`.
**ChartOptionsChangedEventArg**
- `IBaseViewModel ParentVM { get; set; }` - Parent view model reference.
- `IChartOptionsModel Model { get; set; }` - Chart options model.
- `string ChartType { get; set; }` - Chart type identifier.
### Invariants
- All events inherit from `CompositePresentationEvent<T>` and are empty classes (no additional members).
- Event args classes (`ChartAxisChangedEventArg`, `ChartOptionsChangedEventArg`) are mutable POCOs with public getters and setters.
- The `

View File

@@ -0,0 +1,57 @@
---
source_files:
- Common/DTS.Common/Events/DTS.Viewer/ViewerFilter/FilterParameterChangedEvent.cs
generated_at: "2026-04-17T16:43:24.528045+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "ccf977f1060969f3"
---
# Documentation: FilterParameterChangedEvent
## Purpose
This module provides a Prism Event Aggregator event definition for broadcasting filter parameter changes across the application. It enables loosely coupled communication between view models when filter criteria are modified, allowing components to subscribe to and react to filter changes without requiring direct references to the originating component.
---
## Public Interface
### `FilterParameterArgs`
Event payload class containing the data transmitted when a filter parameter changes.
| Property | Type | Description |
|----------|------|-------------|
| `Requester` | `IBaseViewModel` | The view model that initiated the filter change request |
| `Param` | `string` | The filter parameter value being communicated |
### `FilterParameterChangedEvent`
Event class for pub/sub messaging via Prism's Event Aggregator.
- **Inherits from:** `PubSubEvent<FilterParameterArgs>`
- **Usage:** Subscribe to receive filter change notifications; publish to broadcast filter changes.
---
## Invariants
- `FilterParameterArgs` is a mutable POCO with no constructor enforcement—callers must explicitly set `Requester` and `Param` properties.
- Both properties on `FilterParameterArgs` may be `null` (no null-checking or validation is enforced at the class level).
- The event follows Prism's `PubSubEvent<T>` contract, which manages its own thread-safety and subscription lifecycle guarantees.
---
## Dependencies
**This module depends on:**
- `DTS.Common.Base` — provides `IBaseViewModel` interface
- `Prism.Events` — provides `PubSubEvent<T>` base class for event aggregation
**Consumers (inferred):**
- Any view model or component that publishes or subscribes to filter parameter changes via Prism's `IEventAggregator`.
---
## Gotchas

View File

@@ -0,0 +1,53 @@
---
source_files:
- Common/DTS.Common/Events/DTS.Viewer/ViewerSettings/CalibrationBehaviorSettableInViewerChangedEvent.cs
- Common/DTS.Common/Events/DTS.Viewer/ViewerSettings/ViewerSettingsVisibilityChangedEvent.cs
generated_at: "2026-04-17T16:37:52.583907+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "4781a254be509f2c"
---
# Documentation: Viewer Settings Events
## 1. Purpose
This module defines two Prism event classes used for decoupled communication within the DTS Viewer subsystem. These events facilitate pub/sub messaging related to viewer settings state changes—specifically, calibration behavior configuration and visibility toggling of the viewer settings UI. Both events leverage Prism's `PubSubEvent<T>` base class to enable loosely-coupled component communication.
---
## 2. Public Interface
### `CalibrationBehaviorSettableInViewerChangedEvent`
- **Signature:** `public class CalibrationBehaviorSettableInViewerChangedEvent : PubSubEvent<bool>`
- **Behavior:** A typed event that carries a `bool` payload indicating whether calibration behavior can be set in the viewer. Publishers broadcast the boolean state; subscribers receive it via the Prism event aggregation mechanism.
### `ViewerSettingsVisibilityChangedEvent`
- **Signature:** `public class ViewerSettingsVisibilityChangedEvent : PubSubEvent<Visibility>`
- **Behavior:** A typed event that carries a `System.Windows.Visibility` payload. Publishers broadcast visibility state changes (e.g., `Visible`, `Hidden`, `Collapsed`); subscribers receive the new visibility value.
---
## 3. Invariants
- **Payload types are fixed:** `CalibrationBehaviorSettableInViewerChangedEvent` always carries `bool`; `ViewerSettingsVisibilityChangedEvent` always carries `Visibility`.
- **Inheritance contract:** Both classes inherit from `PubSubEvent<T>` and do not override or extend any members, relying entirely on the Prism base implementation.
- **Namespace consistency:** Both types reside in `DTS.Common.Events` regardless of their file location within `DTS.Viewer/ViewerSettings/` subdirectories.
---
## 4. Dependencies
### This module depends on:
- `Prism.Events` — Provides `PubSubEvent<T>` base class for event aggregation
- `System.Windows` — Provides `Visibility` enum (used by `ViewerSettingsVisibilityChangedEvent` only)
### What depends on this module:
- **Unclear from source alone.** Consumers would be any component that publishes or subscribes to these events via Prism's `IEventAggregator`, but such usages are not present in the provided files.
---
## 5. Gotchas
- **Namespace/file path mismatch:** The files are located in `Common/DTS.Common/Events/DTS.Viewer/ViewerSettings/`, but the declared namespace is `DTS.Common.Events`. The `// ReSharper disable CheckNamespace` directive suppresses IDE warnings about this discrepancy. This may indicate a deliberate organizational choice or historical refactoring artifact.
- **No explicit constructors or members:** Both classes are empty declarations inheriting from `PubSubEvent<T>`. This is idiomatic for Prism events but may confuse developers expecting explicit publish/subscribe methods on the class itself—those are accessed via `IEventAggregator.GetEvent<T>()`.

View File

@@ -0,0 +1,56 @@
---
source_files:
- Common/DTS.Common/Events/DTS.Viewer/ViewerTestSummary/ChannelSelectionCountNotification.cs
- Common/DTS.Common/Events/DTS.Viewer/ViewerTestSummary/ChannelsModificationNotification.cs
- Common/DTS.Common/Events/DTS.Viewer/ViewerTestSummary/ChannelSelectionChangeNotification.cs
- Common/DTS.Common/Events/DTS.Viewer/ViewerTestSummary/GraphChannelReadCalcProgressChangedEvent.cs
- Common/DTS.Common/Events/DTS.Viewer/ViewerTestSummary/GraphChannelsReadCompletedNotification.cs
- Common/DTS.Common/Events/DTS.Viewer/ViewerTestSummary/DataFileSelectedEvent.cs
- Common/DTS.Common/Events/DTS.Viewer/ViewerTestSummary/TestLoadedCountNotification.cs
- Common/DTS.Common/Events/DTS.Viewer/ViewerTestSummary/GraphLoadedCountNotification.cs
- Common/DTS.Common/Events/DTS.Viewer/ViewerTestSummary/TestSummaryCountNotification.cs
- Common/DTS.Common/Events/DTS.Viewer/ViewerTestSummary/GraphClearNotification.cs
- Common/DTS.Common/Events/DTS.Viewer/ViewerTestSummary/GraphSelectedEventCountNotification.cs
- Common/DTS.Common/Events/DTS.Viewer/ViewerTestSummary/GraphSelectedChannelCountNotification.cs
- Common/DTS.Common/Events/DTS.Viewer/ViewerTestSummary/GraphSelectedChannelsNotification.cs
- Common/DTS.Common/Events/DTS.Viewer/ViewerTestSummary/GraphSelectedEventsNotification.cs
- Common/DTS.Common/Events/DTS.Viewer/ViewerTestSummary/ChannelsModificationLineFitNotification.cs
- Common/DTS.Common/Events/DTS.Viewer/ViewerTestSummary/TestSummaryChangeNotification.cs
- Common/DTS.Common/Events/DTS.Viewer/ViewerTestSummary/DataFolderChangedEvent.cs
generated_at: "2026-04-17T15:28:05.385787+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "9d06f7a32bf91d25"
---
# Documentation: DTS.Common.Events (ViewerTestSummary)
## 1. Purpose
This module defines a collection of Prism.Events-based pub/sub event types for the DTS Viewer's Test Summary functionality. It facilitates loosely-coupled communication between UI components regarding test data selection, graph state, channel modifications, and data file/folder operations. The events enable decoupled view models to broadcast and react to state changes without direct references, supporting the application's MVVM architecture.
---
## 2. Public Interface
### Events (all inherit from `PubSubEvent<T>`)
| Event Name | Payload Type | Description |
|------------|--------------|-------------|
| `ChannelSelectionCountNotification` | `int` | Broadcasts the count of selected channels. |
| `ChannelsModificationNotification` | `List<ITestChannel>` | Notifies when the collection of graph channels has been modified. |
| `ChannelSelectionChangeNotification` | `List<ITestChannel>` | Notifies when the selected test summary list changes. |
| `GraphChannelReadCalcProgressChangedEvent` | `GraphChannelReadCalcProgressChangedEventArgs` | Reports progress during graph channel read/calculation operations. |
| `GraphChannelsReadCompletedNotification` | `GraphChannelsReadCompletedNotificationArgs` | Signals completion of graph channel reading. |
| `DataFileSelectedEvent` | `DataFileSelectionArg` | Notifies when a data file is selected without triggering full folder change subscriptions. |
| `TestLoadedCountNotification` | `TestLoadedCountNotificationArg` | Broadcasts the count of loaded tests. |
| `GraphLoadedCountNotification` | `GraphLoadedCountNotificationArg` | Broadcasts the count of loaded graphs. |
| `TestSummaryCountNotification` | `TestSummaryCountNotificationArg` | Broadcasts the count of test summaries. |
| `GraphClearNotification` | `GraphClearNotificationArg` | Notifies when graphs should be cleared. |
| `GraphSelectedEventCountNotification` | `GraphSelectedEventCountNotificationArg` | Broadcasts the count of selected events in a graph. |
| `GraphSelectedChannelCountNotification` | `GraphSelectedChannelCountNotificationArg` | Broadcasts the count of selected channels in a graph. |
| `GraphSelectedChannelsNotification` | `GraphSelectedChannelsNotificationArg` | Notifies of the currently selected channels in a graph. |
| `GraphSelectedEventsNotification` | `GraphSelectedEventsNotificationArg` | Notifies of the currently selected events in a graph. |
| `ChannelsModificationLineFitNotification` | `LineFitArgs` | Notifies of line fit modifications with index range. |
| `TestSummaryChangeNotification` | `TestSummaryChangeNotificationArg` | Notifies when the test summary list changes. |
| `DataFolderChangedEvent` | `DataFolderSelectionArg` | Notifies when the data folder

View File

@@ -0,0 +1,47 @@
---
source_files:
- Common/DTS.Common/Events/Database/DbStatusEvent.cs
generated_at: "2026-04-17T16:10:34.394598+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "58b4a0b43cbc1077"
---
# Database
### Purpose
This module provides an event mechanism for communicating database switch operations and their outcomes throughout the application. It supports reporting various failure scenarios during database migration/switch operations (remote connection failures, backup failures, copy failures, restore failures) as well as successful completion, enabling the application to respond appropriately to database state transitions.
### Public Interface
**`DbStatusEvent`**
- Signature: `public class DbStatusEvent : PubSubEvent<DbStatusArg>`
- Description: A Prism `PubSubEvent` that carries a `DbStatusArg` payload. Used to notify the application when a database switch event has occurred.
**`DbStatusArg`**
- Signature: `public class DbStatusArg`
- Description: Argument class encapsulating the status and optional exception details for a database operation.
- **`EventTypes`** (nested enum): Defines possible operation outcomes:
- `FailedToConnectToRemote`
- `FailedToBackupLocal`
- `FailedToCopy`
- `FailedToRestoreLocal`
- `FailedToBackupLocalFileNotFound`
- `Complete`
- `LegacyStatus`
- **`Status`** property: `EventTypes` (getter only) - The status type of the operation.
- **`Exception`** property: `Exception` (getter only) - The exception associated with a failure, if any.
- **Constructor**: `DbStatusArg(EventTypes error, Exception exception)` - Initializes a new instance with the specified status and exception.
### Invariants
- `Status` is immutable after construction (get-only property).
- `Exception` is immutable after construction (get-only property).
- `Exception` may be `null` for non-error statuses (e.g., `Complete`), though this is not enforced by the constructor.
### Dependencies
- **Depends on**: `System` (for `Exception` type), `Prism.Events` (for `PubSubEvent<T>` base class).
- **Depended on by**: Not determinable from source alone; consumers would subscribe to or publish this event via Prism

View File

@@ -0,0 +1,40 @@
---
source_files:
- Common/DTS.Common/Events/Diagnostics/CheckDataToDownloadEvent.cs
generated_at: "2026-04-17T16:11:09.535998+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "432a82d8ead3203a"
---
# Diagnostics
### Purpose
This module provides a Prism event mechanism for coordinating data download checks within the DTS system. It allows producers to signal when data should be downloaded, with an option to bypass validation checks. The event facilitates communication between components that trigger downloads and components that validate or process download requests.
### Public Interface
**`CheckDataToDownloadEvent`**
- Signature: `class CheckDataToDownloadEvent : PubSubEvent<CheckDataToDownloadEventArgs>`
- Description: A pub/sub event type that carries `CheckDataToDownloadEventArgs` payloads. Subscribers can listen for download check requests and publishers can trigger them.
**`CheckDataToDownloadEventArgs`**
- Signature: `class CheckDataToDownloadEventArgs`
- Constructor: `CheckDataToDownloadEventArgs(bool bypassCheck, object o)`
- Properties:
- `bool BypassCheck { get; }` - Indicates whether validation checks should be skipped.
- `object Producer { get; }` - Reference to the object that initiated the check.
### Invariants
- `BypassCheck` and `Producer` are set only at construction and cannot be modified thereafter (private setters).
- `Producer` may be `null` if the constructor is called with a null object reference (no null validation in constructor).
### Dependencies
- **Depends on**: `Prism.Events` (for `PubSubEvent<T>` base class)
- **Depended on by**: Unknown from source alone (consumers would subscribe/publish this event)
### Gotchas
- The `Producer` parameter is stored as an untyped `object`, requiring runtime type checking by consumers if specific producer types need to be distinguished.
- No validation is performed on constructor arguments; callers can pass `null` for the producer.
---

View File

@@ -0,0 +1,71 @@
---
source_files:
- Common/DTS.Common/Events/GroupTemplates/CustomChannels/CustomChannelExportFileSetEvent.cs
- Common/DTS.Common/Events/GroupTemplates/CustomChannels/CustomChannelImportEvent.cs
generated_at: "2026-04-17T16:37:50.415537+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "0051299d71a30734"
---
# Documentation: Custom Channel Events
## 1. Purpose
This module provides event definitions for coordinating custom channel import and export operations within the group templates subsystem. It enables loosely-coupled communication between components regarding custom channel file handling, allowing the application to manage its busy state during exports and track import completion status. These events follow the Prism Event Aggregator pattern for pub/sub messaging.
---
## 2. Public Interface
### `CustomChannelExportFileSetEvent`
**Signature:** `public class CustomChannelExportFileSetEvent : PubSubEvent<string>`
An event that signals the application should change its busy/available state. The payload is a `string` value, though the semantic meaning of the string content is not specified in the source.
---
### `CustomChannelImportEvent`
**Signature:** `public class CustomChannelImportEvent : PubSubEvent<CustomChannelImportEventArgs>`
An event that communicates custom channel import status changes. Publishers emit `CustomChannelImportEventArgs` to inform subscribers of import progress.
---
### `CustomChannelImportEventArgs`
**Signature:** `public class CustomChannelImportEventArgs`
A payload class carrying import status information.
| Member | Type | Description |
|--------|------|-------------|
| `Status` (nested enum) | `enum` | Contains value: `Done` |
| `ImportStatus` | `Status` | Read-only property containing the import status |
| `CustomChannelImportEventArgs(Status status)` | Constructor | Initializes the instance with a status value |
---
## 3. Invariants
- `CustomChannelImportEventArgs.ImportStatus` is immutable after construction (read-only property with no setter).
- `CustomChannelImportEventArgs.Status` enum currently defines only the `Done` value; no other statuses are available.
- Both event classes inherit from `PubSubEvent<T>` and are intended to be used with Prism's `IEventAggregator`.
- The namespace `DTS.Common.Events.GroupTemplates.CustomChannels` groups these events under the custom channels feature area.
---
## 4. Dependencies
**This module depends on:**
- `Prism.Events` — Provides the `PubSubEvent<T>` base class for event aggregation.
**Consumers (inferred):**
- Any component that publishes or subscribes to custom channel import/export events within the group templates subsystem. Specific consumers are not identifiable from these source files alone.
---
## 5. Gotchas
- **Ambiguous string payload:** `CustomChannelExportFileSetEvent` uses a `string` payload, but the source does not define what the string represents (e.g., a file path, a message, an identifier). The XML comment mentions "mark itself busy or available," but how the string value maps to busy/available state is unclear from source alone.
- **Limited status enum:** `CustomChannelImportEventArgs.Status` only defines `Done`. There are no intermediate states (e.g., `Started`, `InProgress`) or error states (e.g., `Failed`, `Cancelled`).

View File

@@ -0,0 +1,70 @@
---
source_files:
- Common/DTS.Common/Events/GroupTemplates/GroupTemplateList/GroupTemplateListGroupDoubleClickEvent.cs
- Common/DTS.Common/Events/GroupTemplates/GroupTemplateList/GroupTemplateListGroupTemplateSelectedEvent.cs
generated_at: "2026-04-17T16:37:52.470436+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "6fe92df199df2a2d"
---
# Documentation: GroupTemplateList Events
## 1. Purpose
This module defines two event types for the GroupTemplateList feature within the DTS application. These events facilitate loosely-coupled communication between UI components using the Prism Event Aggregation pattern. They notify subscribers when user interactions occur with group templates—specifically when a template is selected or double-clicked.
---
## 2. Public Interface
### `GroupTemplateListGroupDoubleClickEvent`
**Signature:**
```csharp
public class GroupTemplateListGroupDoubleClickEvent : PubSubEvent<string> { }
```
**Behavior:**
An event that publishes a `string` payload. Intended to be raised when a user double-clicks on a group template in a list view. Subscribers receive the template identifier as a string.
---
### `GroupTemplateListGroupTemplateSelectedEvent`
**Signature:**
```csharp
public class GroupTemplateListGroupTemplateSelectedEvent : PubSubEvent<string[]> { }
```
**Behavior:**
An event that publishes a `string[]` (string array) payload. Intended to be raised when a template is selected in the group template list. Subscribers receive an array of strings, the contents of which are not documented in the source.
---
## 3. Invariants
- Both event classes inherit from `PubSubEvent<T>` and add no additional members or overrides.
- `GroupTemplateListGroupDoubleClickEvent` always carries a single `string` payload.
- `GroupTemplateListGroupTemplateSelectedEvent` always carries a `string[]` payload.
- Both classes are concrete, non-abstract, and non-sealed.
---
## 4. Dependencies
**This module depends on:**
- `Prism.Events` — Provides the `PubSubEvent<T>` base class for implementing the pub/sub event pattern.
**What depends on this module:**
- Cannot be determined from source alone. Consumers would typically be ViewModels or services that publish or subscribe to these events via Prism's `IEventAggregator`.
---
## 5. Gotchas
1. **Mismatched XML documentation:** The `<summary>` comment in `GroupTemplateListGroupDoubleClickEvent.cs` incorrectly states "The GroupTemplateListGroupTemplateSelectedEvent event" instead of referencing its own class name. This appears to be a copy-paste error.
2. **Inconsistent payload types:** The two events use different payload types (`string` vs `string[]`) despite both having the same remarks comment ("called when a template is selected"). The semantic meaning of the `string[]` payload in `GroupTemplateListGroupTemplateSelectedEvent` is unclear from the source—developers should investigate the publisher to understand what the array contains.
3. **Identical remarks:** Both events share the same remarks text, which is misleading since they represent different user

View File

@@ -0,0 +1,73 @@
---
source_files:
- Common/DTS.Common/Events/GroupTemplates/TemplateChannelList/TemplateChannelListOrderChangedEvent.cs
- Common/DTS.Common/Events/GroupTemplates/TemplateChannelList/TemplateChannelListSelectionChangedEvent.cs
- Common/DTS.Common/Events/GroupTemplates/TemplateChannelList/TemplateChannelListRequiredChangedEvent.cs
generated_at: "2026-04-17T16:36:14.988730+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "e9ebc9c1d84a9eda"
---
# Documentation: Template Channel List Events
## 1. Purpose
This module defines three Prism event types for broadcasting changes related to template channel lists within the group templates subsystem. These events enable loosely-coupled communication between components when channel order changes, selection state changes, or required channel state changes occur. All events follow the Prism Event Aggregator pattern, extending `PubSubEvent<T>`.
---
## 2. Public Interface
### `TemplateChannelListOrderChangedEvent`
**Signature:** `public class TemplateChannelListOrderChangedEvent : PubSubEvent<IGroupTemplateChannel>`
An event that publishes `IGroupTemplateChannel` payloads when the order of channels in a template channel list has changed.
---
### `TemplateChannelListSelectionChangedEvent`
**Signature:** `public class TemplateChannelListSelectionChangedEvent : PubSubEvent<IGroupTemplateChannel>`
An event that publishes `IGroupTemplateChannel` payloads when the selection state within a template channel list has changed.
---
### `TemplateChannelListRequiredChangedEvent`
**Signature:** `public class TemplateChannelListRequiredChangedEvent : PubSubEvent<TemplateChannelListRequiredChangeEventArgs>`
An event that publishes `TemplateChannelListRequiredChangeEventArgs` payloads when the "required" state of template channels has changed.
---
### `TemplateChannelListRequiredChangeEventArgs`
**Signature:** `public class TemplateChannelListRequiredChangeEventArgs`
A payload class carrying information about required channel changes.
| Property | Type | Description |
|----------|------|-------------|
| `Consumer` | `object` | The consumer object associated with the change. |
| `Channels` | `IGroupTemplateChannel[]` | Array of channels affected by the required change. |
**Constructor:**
```csharp
public TemplateChannelListRequiredChangeEventArgs(object o, IGroupTemplateChannel[] channels)
```
---
## 3. Invariants
- All three event classes inherit from `PubSubEvent<T>` from Prism, ensuring they work with the Prism Event Aggregator pattern.
- `TemplateChannelListOrderChangedEvent` and `TemplateChannelListSelectionChangedEvent` both use `IGroupTemplateChannel` as their payload type.
- `TemplateChannelListRequiredChangedEvent` uses `TemplateChannelListRequiredChangeEventArgs` as its payload type, which encapsulates both a consumer reference and an array of channels.
- `TemplateChannelListRequiredChangeEventArgs.Channels` is an array (not a collection), set at construction time with no null validation in the constructor.
---
## 4. Dependencies
**This module depends on:**
- `DTS.Common.Interface.GroupTemplate` — provides the `IGroupTemplateChannel` interface used as payload type
- `Prism.Events` — provides

View File

@@ -0,0 +1,96 @@
---
source_files:
- Common/DTS.Common/Events/Groups/GroupChannelList/GroupChannelDeleteRequestEvent.cs
- Common/DTS.Common/Events/Groups/GroupChannelList/GroupChannelsChangedEvent.cs
- Common/DTS.Common/Events/Groups/GroupChannelList/GroupUpdatedEvent.cs
generated_at: "2026-04-17T16:36:42.587532+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "9096e4545f2ae1d9"
---
# Documentation: DTS.Common.Events.Groups.GroupChannelList
## 1. Purpose
This module defines three event types used for inter-component communication within the group channel management subsystem. It leverages the Prism.Events pub/sub mechanism to enable loosely-coupled messaging between components that manage group channels. The events facilitate deletion requests, channel list change notifications, and group update status propagation.
## 2. Public Interface
### `GroupChannelDeleteRequestEvent`
**Signature:** `public class GroupChannelDeleteRequestEvent : PubSubEvent<GroupChannelDeleteRequestEventArgs>`
An event used to request deletion of a group channel. Publishers signal intent to delete; subscribers handle the actual deletion logic.
---
### `GroupChannelDeleteRequestEventArgs`
**Signature:** `public class GroupChannelDeleteRequestEventArgs`
| Property | Type | Description |
|----------|------|-------------|
| `Page` | `object` | The page/context initiating the delete request |
| `Channel` | `IGroupChannel` | The channel targeted for deletion |
**Constructor:** `GroupChannelDeleteRequestEventArgs(object page, IGroupChannel channel)`
---
### `GroupChannelsChangedEvent`
**Signature:** `public class GroupChannelsChangedEvent : PubSubEvent<GroupChannelsChangedEventArgs>`
An event published when the collection of channels associated with a group has changed.
---
### `GroupChannelsChangedEventArgs`
**Signature:** `public class GroupChannelsChangedEventArgs`
| Property | Type | Description |
|----------|------|-------------|
| `Group` | `object` | The group whose channels changed |
| `ChannelCount` | `int` | The updated count of channels in the group |
**Constructor:** `GroupChannelsChangedEventArgs(object group, int channelCount)`
---
### `GroupUpdatedEvent`
**Signature:** `public class GroupUpdatedEvent : PubSubEvent<GroupUpdatedEventArgs>`
An event published when a group has been updated, with specific status indicating the type of update.
---
### `GroupUpdatedEventArgs`
**Signature:** `public class GroupUpdatedEventArgs`
| Property | Type | Description |
|----------|------|-------------|
| `Page` | `object` | The page/context where the update occurred |
| `UpdateStatus` | `Status` | Enum indicating what type of update occurred |
**Constructor:** `GroupUpdatedEventArgs(object page, Status status)`
**Nested Enum:**
```csharp
public enum Status
{
ChannelsInserted,
AssignmentsMade
}
```
## 3. Invariants
- All event argument classes have immutable properties (read-only, set only via constructor).
- `GroupChannelDeleteRequestEventArgs.Channel` must be a valid `IGroupChannel` implementation instance.
- `GroupChannelsChangedEventArgs.ChannelCount` is an `int`; the source does not specify whether negative values are valid or prevented.
- `GroupUpdatedEventArgs.UpdateStatus` is constrained to the defined `Status` enum values (`ChannelsInserted`, `AssignmentsMade`).
- All `Page` and `Group` properties are typed as `object`, allowing any reference type; no type constraints are enforced at compile time.
## 4. Dependencies
**This module depends on:**
- `Prism.Events` — Provides `PubSubEvent<T>` base class for all three events.
- `DTS.Common

View File

@@ -0,0 +1,51 @@
---
source_files:
- Common/DTS.Common/Events/Groups/GroupsList/GroupListEditGroupEvent.cs
- Common/DTS.Common/Events/Groups/GroupsList/GroupListGroupSelectedEvent.cs
generated_at: "2026-04-17T16:37:48.828756+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "42ef77f2b2284294"
---
# Documentation: DTS.Common.Events.Groups.GroupList
## 1. Purpose
This module defines event types for the Group List feature using Prism's event aggregation pattern. These events enable decoupled publish/subscribe communication between components in the application when group-related user actions occur, such as selecting groups or initiating an edit operation. The events carry integer-based identifiers as payloads.
---
## 2. Public Interface
### `GroupListEditGroupEvent`
- **Signature:** `public class GroupListEditGroupEvent : PubSubEvent<int>`
- **Behavior:** An event that publishes an `int` payload, intended to signal that a group edit operation should be initiated. The payload represents a single group identifier.
### `GroupListGroupSelectedEvent`
- **Signature:** `public class GroupListGroupSelectedEvent : PubSubEvent<int[]>`
- **Behavior:** An event that publishes an `int[]` payload, intended to signal that one or more groups have been selected. The payload is an array of group identifiers.
---
## 3. Invariants
- `GroupListEditGroupEvent` always carries a single `int` payload representing a group ID.
- `GroupListGroupSelectedEvent` always carries an `int[]` payload representing zero or more group IDs.
- Both event types inherit from `PubSubEvent<T>`, guaranteeing they follow Prism's event aggregation contract.
---
## 4. Dependencies
**This module depends on:**
- `Prism.Events` — Provides the `PubSubEvent<T>` base class for event aggregation.
**What depends on this module:**
- Unknown from source alone. Consumers would be any component that publishes or subscribes to these events via Prism's `IEventAggregator`.
---
## 5. Gotchas
- **Stale XML documentation:** Both classes contain XML comments referencing `GroupTemplateListGroupTemplateSelectedEvent` and "called when a template is selected." This appears to be copy-paste documentation that does not match the actual class names or their intended purposes (group editing and group selection, not template selection). The documentation should not be trusted as accurate.

View File

@@ -0,0 +1,51 @@
---
source_files:
- Common/DTS.Common/Events/Hardware/HardwareList/HardwareListShowCompactEvent.cs
- Common/DTS.Common/Events/Hardware/HardwareList/HardwareListEditHardwareEvent.cs
- Common/DTS.Common/Events/Hardware/HardwareList/HardwareListHardwareSelectedEvent.cs
- Common/DTS.Common/Events/Hardware/HardwareList/HardwareReplaceEvent.cs
- Common/DTS.Common/Events/Hardware/HardwareList/HardwareSavedEvent.cs
- Common/DTS.Common/Events/Hardware/HardwareList/HardwareListHardwareIncludedEvent.cs
- Common/DTS.Common/Events/Hardware/HardwareList/HardwareListHardwareTestPTPDomainIDEvent.cs
- Common/DTS.Common/Events/Hardware/HardwareList/HardwareListHardwareTestSampleRateEvent.cs
- Common/DTS.Common/Events/Hardware/HardwareList/HardwareListHardwareTestClockMasterEvent.cs
- Common/DTS.Common/Events/Hardware/HardwareList/HardwareListHardwareTestAAFilterRateEvent.cs
generated_at: "2026-04-17T16:22:33.693123+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "093b189fdc0d0e9b"
---
# HardwareList
### Purpose
This module defines a collection of event types for the Prism Event Aggregator used to communicate changes and actions related to hardware within a hardware list. It facilitates loosely coupled communication between components regarding hardware selection, configuration changes (sample rate, clock master, PTP domain), and lifecycle events (saving, replacing).
### Public Interface
**Events (all inherit from `Prism.Events.PubSubEvent`)**
* `HardwareListShowCompactEvent` : `PubSubEvent<bool>`
* Payload: `bool` indicating the compact/expanded state.
* Used to signal a change in the view mode (compact vs. expanded).
* `HardwareListEditHardwareEvent` : `PubSubEvent<string>`
* Payload: `string` (likely a hardware identifier).
* Used to indicate a specific piece of hardware was selected for editing.
* `HardwareListHardwareSelectedEvent` : `PubSubEvent<string[]>`
* Payload: `string[]` (array of identifiers).
* Used to indicate one or more hardware items were selected.
* `HardwareReplaceEvent` : `PubSubEvent<Tuple<IHardware, IHardware>>`
* Payload: `Tuple<IHardware, IHardware>` (Old hardware, New hardware).
* Used to request a hardware replacement operation.
* `HardwareSavedEvent` : `PubSubEvent<Tuple<int, string>>`
* Payload: `Tuple<int, string>` (Database ID, Serial Number).
* Used to indicate hardware was added or updated.
* `HardwareListHardwareIncludedEvent` : `PubSubEvent<HardwareListHardwareIncludedEventArgs>`
* Payload: `HardwareListHardwareIncludedEventArgs`.
* Used to signal a change in the "included" status of hardware.
* `HardwareListHardwareTestPTPDomainIDEvent` : `PubSubEvent<HardwareListHardwareTestPTPDomainIDEventArgs>`
* Payload: `HardwareListHardwareTestPTPDomainIDEventArgs`.
* Used to indicate a change in the PTP Domain ID for a test.
* `HardwareListHardwareTestSampleRateEvent` : `PubSubEvent<HardwareListHardwareTestSampleRateEventArgs>`
* Payload: `HardwareListHardwareTestSampleRateEventArgs`.
* Used to indicate a change in the sample rate for

View File

@@ -0,0 +1,57 @@
---
source_files:
- Common/DTS.Common/Events/ISO/ExtraPropertiesChangedEvent.cs
generated_at: "2026-04-17T16:43:15.351224+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "f41653a888428aaa"
---
# Documentation: ExtraPropertiesChangedEvent.cs
## 1. Purpose
This module provides a Prism-based event mechanism for broadcasting changes to "extra properties" within an ISO-related domain. It enables loose coupling between producers and consumers of property change notifications by leveraging the `PubSubEvent` pattern from Prism's event aggregation framework. The event carries metadata about which properties changed, the object that produced the change, and the intended consumer.
## 2. Public Interface
### `ExtraPropertiesChangedEvent`
A class that extends `PubSubEvent<ExtraPropertiesChangedEventArgs>`. This is the event token used to subscribe to or publish extra property change notifications via a Prism `IEventAggregator`.
**Signature:**
```csharp
public class ExtraPropertiesChangedEvent : PubSubEvent<ExtraPropertiesChangedEventArgs> { }
```
### `ExtraPropertiesChangedEventArgs`
A class encapsulating the data passed when the event is raised.
**Constructor:**
```csharp
public ExtraPropertiesChangedEventArgs(IList<IExtraProperty> extraProperties, object producer, object consumer)
```
**Properties:**
| Property | Type | Access | Description |
|----------|------|--------|-------------|
| `ExtraProperties` | `IList<IExtraProperty>` | `get; private set;` | The collection of extra properties that changed. |
| `Producer` | `object` | `get; private set;` | The object that produced the property changes. |
| `Consumer` | `object` | `get; private set;` | The intended consumer of the property changes. |
## 3. Invariants
- **Immutability after construction**: All properties (`ExtraProperties`, `Producer`, `Consumer`) are set exclusively via the constructor and cannot be modified afterward due to `private set` accessors.
- **No null validation in constructor**: The constructor does not perform null checks on any parameters; callers may pass `null` values which will be assigned directly.
- **Reference semantics**: The `ExtraProperties` list is stored by reference, not copied; modifications to the original list after construction could affect the event args.
## 4. Dependencies
**This module depends on:**
- `System` - Core .NET framework
- `System.Collections.Generic` - For `IList<T>` interface
- `DTS.Common.Interface.ISO.ExtraProperties` - Provides `IExtraProperty` interface
- `Prism.Events` - Provides `PubSubEvent<T>` base class (Prism library)
**What depends on this module:**
- Cannot be determined from this source file alone. Consumers would be any module that publishes or subscribes to `ExtraPropertiesChangedEvent`

View File

@@ -0,0 +1,10 @@
---
source_files:
- Common/DTS.Common/Events/Realtime/RealtimeChannelSelectedEvent.cs
generated_at: "2026-04-17T16:44:09.812137+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "dbf91693356c6ab6"
---
# Documentation

View File

@@ -0,0 +1,32 @@
---
source_files:
- Common/DTS.Common/Events/RegionOfInterest/RegionOfInterestChangedEvent.cs
generated_at: "2026-04-17T16:10:34.392992+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "04ca50cc4f4be546"
---
# RegionOfInterest
### Purpose
This module defines a typed event for broadcasting changes to a Region of Interest (ROI) within the application. It leverages the Prism event aggregation system to enable loosely-coupled communication between components when ROI configuration changes, allowing subscribers to react to new ROI definitions without direct coupling to the publisher.
### Public Interface
**`RegionOfInterestChangedEvent`**
- Signature: `public class RegionOfInterestChangedEvent : PubSubEvent<IRegionOfInterest>`
- Description: A Prism `PubSubEvent` that carries an `IRegionOfInterest` payload. Publishers invoke this event with a new ROI instance; subscribers receive the `IRegionOfInterest` object when the event is published.
### Invariants
- The event payload must implement `IRegionOfInterest` (defined in `DTS.Common.Interface.RegionOfInterest`).
- As a `PubSubEvent<T>`, the event follows Prism's thread-safe publication/subscription semantics.
### Dependencies
- **Depends on**: `Prism.Events` (for `PubSubEvent<T>` base class), `DTS.Common.Interface.RegionOfInterest` (for `IRegionOfInterest` interface).
- **Depended on by**: Not determinable from source alone; consumers would subscribe to or publish this event via Prism's `IEventAggregator`.
### Gotchas
None identified from source alone.
---

View File

@@ -0,0 +1,31 @@
---
source_files:
- Common/DTS.Common/Events/RegionOfInterest/RegionOfInterestChannels/RegionOfInterestChannelsSelectedEvent.cs
generated_at: "2026-04-17T16:27:35.499903+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "04ae6f47be36fec7"
---
# RegionOfInterestChannels
### Purpose
This module defines a Prism event for publishing and subscribing to region of interest (ROI) channel selection changes. It enables loosely-coupled communication between components when users select channels associated with a specific region of interest, carrying both channel identifiers and names along with context about the consumer.
### Public Interface
**`RegionOfInterestChannelsSelectedEvent`**
- Inherits from `PubSubEvent<RegionOfInterestChannelsSelectedEventArgs>`
- A Prism event type used for pub/sub messaging across the application
**`RegionOfInterestChannelsSelectedEventArgs`**
- Constructor: `RegionOfInterestChannelsSelectedEventArgs(string roiSuffix, string[] selectedChannelNames, long[] selectedChannelIds, object o)`
- Properties (all read-only):
- `string RegionOfInterestSuffix` - Suffix identifier for the region of interest
- `string[] ChannelNames` - Array of selected channel names
- `long[] ChannelIds` - Array of selected channel IDs
- `object Consumer` - Reference to the object consuming this selection
### Invariants
- All properties on `RegionOfInterestChannelsSelectedEventArgs` are immutable after construction (private setters).
- Constructor requires all four parameters; no

View File

@@ -0,0 +1,67 @@
---
source_files:
- Common/DTS.Common/Events/Sensors/CalibrationBehaviorSettingChangedEvent.cs
- Common/DTS.Common/Events/Sensors/ExportCalibrationBehaviorSettingChangedEvent.cs
- Common/DTS.Common/Events/Sensors/SensorFilterTypeChangedEvent.cs
generated_at: "2026-04-17T16:35:56.568628+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "8318e849b47a0f7f"
---
# Documentation: DTS.Common.Events.Sensors
## 1. Purpose
This module defines event types for the Prism pub/sub event system, specifically for sensor-related state changes. It provides three event classes that enable loosely-coupled communication between components: two for calibration behavior setting changes (`CalibrationBehaviorSettingChangedEvent` and `ExportCalibrationBehaviorSettingChangedEvent`), and one for sensor filter type changes (`SensorFilterTypeChangedEvent`). These events facilitate notification when sensor calibration behaviors or filter configurations are modified, allowing subscribers to react without direct coupling to the event publishers.
---
## 2. Public Interface
### `CalibrationBehaviorSettingChangedEvent`
**Signature:**
```csharp
public class CalibrationBehaviorSettingChangedEvent : PubSubEvent<DTS.Common.Enums.Sensors.CalibrationBehaviors>
```
A pub/sub event that carries a `CalibrationBehaviors` enum value as its payload. Used to notify subscribers when a calibration behavior setting has changed.
---
### `ExportCalibrationBehaviorSettingChangedEvent`
**Signature:**
```csharp
public class ExportCalibrationBehaviorSettingChangedEvent : PubSubEvent<DTS.Common.Enums.Sensors.CalibrationBehaviors>
```
A pub/sub event that carries a `CalibrationBehaviors` enum value as its payload. Used to notify subscribers when an export-related calibration behavior setting has changed. Distinct from `CalibrationBehaviorSettingChangedEvent` to allow separate subscription channels.
---
### `SensorFilterTypeChangedEvent`
**Signature:**
```csharp
public class SensorFilterTypeChangedEvent : PubSubEvent<SensorFilterTypeChangedEventArgs>
```
A pub/sub event that carries `SensorFilterTypeChangedEventArgs` as its payload. Used to notify subscribers that a sensor filter or ISO code filter field has changed.
---
### `SensorFilterTypeChangedEventArgs`
**Signature:**
```csharp
public class SensorFilterTypeChangedEventArgs
```
**Properties:**
| Property | Type | Access |
|----------|------|--------|
| `ISOCodeChar` | `char` | `public get; private set` |
| `EventType` | `EventTypes` | `public get; private set` |
| `FilterClass` | `FilterClassType` | `public get; private set` |
| `Calibration` | `ISensorCalibration` | `public get; private set` |
| `Sensor` | `ISensorData` | `public get; private set` |
| `UseISOCodeFilterMapping` | `bool` | `public get; private set` |
| `UseZeroForUnfiltered` | `bool` | `public get; private set` |
**Nested Enum:**
```csharp

View File

@@ -0,0 +1,31 @@
---
source_files:
- Common/DTS.Common/Events/Sensors/SensorsList/SensorsListSensorSelectedEvent.cs
- Common/DTS.Common/Events/Sensors/SensorsList/SensorChangedEvent.cs
generated_at: "2026-04-17T16:07:34.970450+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "0b9c7db9a1a83e71"
---
# SensorsList
### Purpose
This module defines events for the Sensors List subsystem, enabling communication about sensor selection, persistence, and property changes. It supports the sensor configuration workflow by notifying subscribers when sensors are selected, saved, updated, or when specific sensor properties change.
### Public Interface
**`SensorsListSensorSelectedEvent`** (class, inherits `PubSubEvent<string[]>`)
- Event payload: `string[]` (array of sensor identifiers)
- Purpose: Indicates that a sensor has been selected from the sensors list.
- Note: XML documentation incorrectly references "TTSImportSummaryImportEvent" and "Summary step" — appears to be copy-paste documentation debt.
**`SensorSavedEvent`** (class, inherits `PubSubEvent<double>`)
- Event payload: `double`
- Purpose: Notifies the save function when a new sensor has been added in the settings menu (FB 13120).
**`SensorUpdatedEvent`** (class, inherits `PubSubEvent<bool>`)
- Event payload: `bool`
- Purpose: Used in selecting the default filter in filter list when adding or deleting a sensor (FB 13120).
**`SensorChangedEvent`** (

View File

@@ -0,0 +1,44 @@
---
source_files:
- Common/DTS.Common/Events/TSRAIRGo/StartStopDASScan.cs
- Common/DTS.Common/Events/TSRAIRGo/StartStopOverallStatusStateMachine.cs
- Common/DTS.Common/Events/TSRAIRGo/Trigger.cs
- Common/DTS.Common/Events/TSRAIRGo/Download.cs
- Common/DTS.Common/Events/TSRAIRGo/RemoveDAS.cs
- Common/DTS.Common/Events/TSRAIRGo/NavigateToDashboard.cs
- Common/DTS.Common/Events/TSRAIRGo/Arm.cs
- Common/DTS.Common/Events/TSRAIRGo/NavigateFromTSRAIRGoToDataPRO.cs
- Common/DTS.Common/Events/TSRAIRGo/ClearIpAddress.cs
- Common/DTS.Common/Events/TSRAIRGo/IpAddressToPing.cs
- Common/DTS.Common/Events/TSRAIRGo/RecordingModeChanged.cs
- Common/DTS.Common/Events/TSRAIRGo/SystemStatus.cs
- Common/DTS.Common/Events/TSRAIRGo/DASSampleRateChanged.cs
- Common/DTS.Common/Events/TSRAIRGo/SystemSettingsSampleRateChanged.cs
- Common/DTS.Common/Events/TSRAIRGo/LevelTrigger.cs
generated_at: "2026-04-17T16:03:25.204934+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "5489ddf486796c78"
---
# TSRAIRGo
### Purpose
This module defines a collection of event types and argument payloads for the Prism Event Aggregator, specifically catering to the TSRAIRGo subsystem. It facilitates loosely coupled communication between components regarding DAS (Data Acquisition System) hardware control (scanning, arming, removal), system configuration (sample rates, triggers, IP addresses), and navigation events.
### Public Interface
**Events (PubSubEvent<T>)**
* `StartStopDASScanEvent` : `PubSubEvent<bool>` - Signals to start or stop a DAS scan.
* `StartStopOverallStatusStateMachineEvent` : `PubSubEvent<bool>` - Controls the overall status state machine.
* `TriggerEvent` : `PubSubEvent<TriggerArg>` - Generic trigger event.
* `DownloadEvent` : `PubSubEvent<DownloadArg>` - Signals a download action.
* `RemoveDASEvent` : `PubSubEvent<string>` - Requests removal of a DAS unit (payload is likely an ID).
* `AddDASEvent` : `PubSubEvent<string>` - Requests addition of a DAS unit.
* `NavigateToDashboardEvent` : `PubSubEvent<NavigateToDashboardArg>` - Requests navigation to the dashboard.
* `ArmEvent` : `PubSubEvent<ArmArg>` - Signals an arm/disarm action.
* `NavigateFromTSRAIRGoToDataPROEvent` : `PubSubEvent<NavigateFromTSRAIRGoToDataPROArg>` - Requests navigation from TSRAIRGo to DataPRO.
* `ClearIpAddressEvent` : `PubSubEvent<ClearIpAddressArg>` - Signals to clear an IP address.
* `IpAddressToPingEvent` : `PubSubEvent<IpAddressToPingArg>` - Provides an IP address to ping.
* `SystemSettingsRecordingModeChangedEvent` : `PubSubEvent<RecordingModeArg>` - Notifies changes to recording mode settings.
* `SystemStatusEvent` : `PubSub

View File

@@ -0,0 +1,26 @@
---
source_files:
- Common/DTS.Common/Events/TTSImport/TTSImportSavedChangesStatusEvent.cs
- Common/DTS.Common/Events/TTSImport/StatusAndProgressBarEvent.cs
- Common/DTS.Common/Events/TTSImport/TTSImportSummaryRunTestEvent.cs
- Common/DTS.Common/Events/TTSImport/TTSImportTestSetupChangedEvent.cs
- Common/DTS.Common/Events/TTSImport/AssignedChannelsChangedEvent.cs
- Common/DTS.Common/Events/TTSImport/TTSImportHardwareScanRunEvent.cs
- Common/DTS.Common/Events/TTSImport/TTSImportSummaryImportEvent.cs
- Common/DTS.Common/Events/TTSImport/TTSImportArmedRunTestEvent.cs
- Common/DTS.Common/Events/TTSImport/TTSImportReadFileFinishedEvent.cs
- Common/DTS.Common/Events/TTSImport/TTSImportHardwareScanFinishedEvent.cs
- Common/DTS.Common/Events/TTSImport/EIDMappingEvent.cs
- Common/DTS.Common/Events/TTSImport/TTSImportReadFileStatusEvent.cs
- Common/DTS.Common/Events/TTSImport/TTSImportReadXMLFileEvent.cs
generated_at: "2026-04-17T16:34:17.362950+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "c0f2f04d8581f746"
---
# Documentation: DTS.Common.Events.TTSImport
## 1. Purpose
This module defines a collection of event

View File

@@ -0,0 +1,65 @@
---
source_files:
- Common/DTS.Common/Events/TestSetups/TestSetupsList/CurrentTestIdChangedEvent.cs
- Common/DTS.Common/Events/TestSetups/TestSetupsList/CurrentTestChangedEvent.cs
- Common/DTS.Common/Events/TestSetups/TestSetupsList/TestSetupsListEditTestSetupEvent.cs
- Common/DTS.Common/Events/TestSetups/TestSetupsList/TestSetupsListTestSetupSelectedEvent.cs
generated_at: "2026-04-17T16:35:07.898811+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "128ab82fb70c6bf8"
---
# Documentation: DTS.Common.Events.TestSetups.TestSetupsList
## 1. Purpose
This module defines a set of event types for the test setups list subsystem within the DTS application. These events enable loosely-coupled, pub/sub-style communication between components using the Prism Event Aggregator pattern. The events facilitate coordination for test setup selection, editing, and state change notifications across the application without requiring direct references between publishers and subscribers.
---
## 2. Public Interface
### `CurrentTestIdChangedEvent`
**Signature:** `public class CurrentTestIdChangedEvent : PubSubEvent<string>`
**Behavior:** Published when the current test's identifier changes. Carries the new test ID as a `string` payload. Subscribers receive the updated ID value.
---
### `CurrentTestChangedEvent`
**Signature:** `public class CurrentTestChangedEvent : PubSubEvent<string>`
**Behavior:** Published to signal that the current test setup has changed. Carries a `string` payload (presumably a test identifier or name). Distinct from `CurrentTestIdChangedEvent`, though the semantic difference is not clarified in source.
---
### `TestSetupsListEditTestSetupEvent`
**Signature:** `public class TestSetupsListEditTestSetupEvent : PubSubEvent<string>`
**Behavior:** Published when a test setup should be edited. Carries a `string` payload identifying the test setup to edit. Intended to trigger an edit workflow/action in response.
---
### `TestSetupsListTestSetupSelectedEvent`
**Signature:** `public class TestSetupsListTestSetupSelectedEvent : PubSubEvent<string[]>`
**Behavior:** Published when a test setup is selected from the list. Carries a `string[]` (array of strings) as its payload. According to source remarks, used by a "Summary step" to indicate an Import button click, though the relationship between selection and import is unclear from source alone.
---
## 3. Invariants
- All event classes inherit from `Prism.Events.PubSubEvent<T>` and are non-generic on their own (closed generic types).
- All classes are `public` and `sealed` implicitly (no inheritance modifiers visible).
- All classes reside in the `DTS.Common.Events.TestSetups.TestSetupsList` namespace.
- Payload types are fixed per event type:
- `CurrentTestIdChangedEvent`: `string`
- `CurrentTestChangedEvent`: `string`
- `TestSetupsListEditTestSetupEvent`: `string`
- `TestSetupsListTestSetupSelectedEvent`: `string[]`
- Events are reference types and must be resolved through Prism's `IEventAggregator` service (standard Prism pattern, not shown in source).
---
## 4

View File

@@ -0,0 +1,45 @@
---
source_files:
- Common/DTS.Common/Exceptions/OutOfDataException.cs
generated_at: "2026-04-17T16:39:37.776631+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "7cb87e56ccef92d8"
---
# Documentation: OutOfDataException
## 1. Purpose
`OutOfDataException` is a custom exception class designed to signal when a read operation attempts to access data beyond the available bounds of a data source. It captures the specific index position where the failure occurred, enabling callers to understand exactly where in a stream or buffer the data exhaustion happened. This exception is part of the `DTS.Common.Exceptions` namespace and serves as a domain-specific alternative to generic exceptions for data-underflow scenarios.
## 2. Public Interface
### Class: `OutOfDataException`
**Inherits from:** `System.Exception`
| Member | Signature | Description |
|--------|-----------|-------------|
| Property | `public long Index { get; private set; }` | Read-only property that stores the index position at which the data read failure occurred. Set only during construction. |
| Constructor | `public OutOfDataException(string ex, long index)` | Initializes a new instance with the specified message `ex` and the `index` where the out-of-data condition was detected. Passes the message string to the base `Exception` class. |
## 3. Invariants
- The `Index` property is immutable after construction (private setter).
- `Index` is always a `long` (64-bit signed integer), supporting large data sources.
- The exception message (passed via `ex` parameter) is always forwarded to the base `Exception` class.
- There is no parameterless constructor; all instances must be created with both a message and an index value.
## 4. Dependencies
**This module depends on:**
- `System` namespace (specifically `System.Exception` as the base class)
**What depends on this module:**
- Cannot be determined from source alone. This exception is likely thrown by data parsing, deserialization, or stream-reading components within the DTS codebase.
## 5. Gotchas
- **Misleading parameter name:** The constructor parameter `ex` suggests an exception object, but it is actually a string message. Callers should pass a descriptive error message, not an exception instance.
- **No standard exception constructors:** Unlike typical .NET exceptions, this class lacks common constructors such as a parameterless constructor, a message-only constructor, or a serialization constructor. This limits its use in certain scenarios (e.g., serialization, standard exception patterns).
- **No inner exception support:** There is no constructor overload that accepts an inner exception, making it impossible to wrap underlying exceptions while preserving the causal chain.

View File

@@ -0,0 +1,66 @@
---
source_files:
- Common/DTS.Common/Interactivity/IConfirmation.cs
- Common/DTS.Common/Interactivity/IInteractionRequest.cs
- Common/DTS.Common/Interactivity/Notification.cs
- Common/DTS.Common/Interactivity/Confirmation.cs
- Common/DTS.Common/Interactivity/INotification.cs
- Common/DTS.Common/Interactivity/IInteractionRequestAware.cs
- Common/DTS.Common/Interactivity/InteractionRequestTrigger.cs
- Common/DTS.Common/Interactivity/InteractionRequestedEventArgs.cs
- Common/DTS.Common/Interactivity/InteractionRequest.cs
generated_at: "2026-04-17T16:34:18.351118+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "265c037d82ad3991"
---
# DTS.Common.Interactivity Documentation
## 1. Purpose
This module implements an MVVM-friendly interactivity pattern for WPF applications, enabling ViewModels to request user interactions (such as notifications and confirmations) without creating direct dependencies on UI components. It provides a decoupled event-driven mechanism where ViewModels raise interaction requests via `InteractionRequest<T>`, which are handled by the View through triggers and behaviors. This pattern is commonly used in frameworks like Prism to maintain separation of concerns between presentation logic and UI implementation.
---
## 2. Public Interface
### Interfaces
**`INotification`**
- `string Title { get; set; }` — Gets or sets the title for the notification.
- `object Content { get; set; }` — Gets or sets the content of the notification.
**`IConfirmation : INotification`**
- `bool Confirmed { get; set; }` — Gets or sets a value indicating whether the confirmation was accepted.
**`IInteractionRequest`**
- `event EventHandler<InteractionRequestedEventArgs> Raised` — Event fired when an interaction is requested.
**`IInteractionRequestAware`**
- `INotification Notification { get; set; }` — The notification passed when the interaction request was raised.
- `Action FinishInteraction { get; set; }` — An action that can be invoked to finish the interaction.
---
### Classes
**`Notification : INotification`**
Concrete implementation of `INotification` providing `Title` and `Content` properties.
---
**`Confirmation : Notification, IConfirmation`**
Extends `Notification` and implements `IConfirmation`. Adds:
- `bool Confirmed { get; set; }` — Gets or sets a value indicating that the confirmation is confirmed.
---
**`InteractionRequest<T> : IInteractionRequest` where `T : INotification`**
Generic class for raising interaction requests.
- `event EventHandler<InteractionRequestedEventArgs> Raised` — Fired when interaction is needed.
- `void Raise(T context)`

View File

@@ -0,0 +1,89 @@
---
source_files:
- Common/DTS.Common/Interface/ITabView.cs
- Common/DTS.Common/Interface/IMainView.cs
- Common/DTS.Common/Interface/IMenuView.cs
- Common/DTS.Common/Interface/IShellView.cs
- Common/DTS.Common/Interface/INavigationView.cs
- Common/DTS.Common/Interface/IViewerShellView.cs
- Common/DTS.Common/Interface/ITabViewModel.cs
- Common/DTS.Common/Interface/IMenuViewModel.cs
- Common/DTS.Common/Interface/INavigationViewModel.cs
- Common/DTS.Common/Interface/IPluginComponent.cs
- Common/DTS.Common/Interface/IShellViewModel.cs
- Common/DTS.Common/Interface/IViewerShellViewModel.cs
- Common/DTS.Common/Interface/IMainViewModel.cs
- Common/DTS.Common/Interface/IAssemblyInfo.cs
- Common/DTS.Common/Interface/IDataPROPage.cs
generated_at: "2026-04-17T15:29:07.765657+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "44b6ec338865b0fd"
---
# DTS.Common.Interface Documentation
## 1. Purpose
This module defines the core interface contracts for a WPF-based application framework following the Model-View-ViewModel (MVVM) pattern. It establishes abstractions for views (`ITabView`, `IMainView`, `IShellView`, etc.), view models (`ITabViewModel`, `IShellViewModel`, `IMainViewModel`, etc.), plugin components (`IPluginComponent`), assembly metadata attributes (`ImageAttribute`, `TextAttribute`), and specialized UI pages (`IDataPROPage`). These interfaces enable loose coupling between UI components and their controllers, supporting a modular, plugin-based architecture.
---
## 2. Public Interface
### View Interfaces
#### `ITabView`
```csharp
public interface ITabView : IBaseView { }
```
Marker interface for tab-based views. Inherits from `IBaseView`.
#### `IMainView`
```csharp
public interface IMainView : IBaseView { }
```
Marker interface for main application views. Inherits from `IBaseView`.
#### `IMenuView`
```csharp
public interface IMenuView : IBaseView { }
```
Marker interface for menu views. Inherits from `IBaseView`.
#### `IShellView`
```csharp
public interface IShellView : IBaseWindow { }
```
Marker interface for shell window views. Inherits from `IBaseWindow` (not `IBaseView`).
#### `INavigationView`
```csharp
public interface INavigationView : IBaseView { }
```
Marker interface for navigation views. Inherits from `IBaseView`.
#### `IViewerShellView`
```csharp
public interface IViewerShellView : IBaseView { }
```
Marker interface for viewer shell views. Inherits from `IBaseView`.
---
### ViewModel Interfaces
#### `ITabViewModel`
```csharp
public interface ITabViewModel : IBaseViewModel
{
ITabView View { get; }
}
```
Defines a view model for tab views. Provides read-only access to the associated `ITabView`.
#### `IMenuViewModel`
```csharp
public interface IMenuViewModel : IBaseViewModel
{
IMenuView View { get

View File

@@ -0,0 +1,13 @@
---
source_files:
- Common/DTS.Common/Interface/BuildTestSetup/IBuildTestSetup.cs
generated_at: "2026-04-17T16:10:17.623733+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "334948e433f2c0b8"
---
# BuildTestSetup
### Purpose
This module

View File

@@ -0,0 +1,94 @@
---
source_files:
- Common/DTS.Common/Interface/Channels/IChannelSettingRecord.cs
- Common/DTS.Common/Interface/Channels/IGroupChannelSettingRecord.cs
- Common/DTS.Common/Interface/Channels/IChannelCode.cs
- Common/DTS.Common/Interface/Channels/IChannelSetting.cs
- Common/DTS.Common/Interface/Channels/IChannelDbRecord.cs
- Common/DTS.Common/Interface/Channels/IGroupChannel.cs
generated_at: "2026-04-17T15:34:44.843620+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "0ca0be184cb31e08"
---
# DTS.Common.Interface.Channels Documentation
## 1. Purpose
This module defines the core abstraction layer for channel management within the DTS (Data Acquisition System) domain. It provides interfaces for channel configuration persistence (`IChannelDbRecord`), channel settings management (`IChannelSetting`, `IChannelSettingRecord`, `IGroupChannelSettingRecord`), channel code identification (`IChannelCode`), and the primary aggregate channel interface (`IGroupChannel`) that combines database persistence, hardware/sensor assignment, and UI-facing state management. These interfaces serve as contracts between the data layer, business logic, and presentation layers for test setup configuration.
---
## 2. Public Interface
### IChannelSettingRecord
Defines a channel setting type definition (not an instance value).
| Member | Signature | Description |
|--------|-----------|-------------|
| `Id` | `int { get; set; }` | Unique identifier for the setting type. |
| `SettingName` | `string { get; set; }` | Name of the setting. |
| `DefaultValue` | `string { get; set; }` | Default value for this setting type. |
---
### IGroupChannelSettingRecord
Defines a setting value applied to a specific channel.
| Member | Signature | Description |
|--------|-----------|-------------|
| `ChannelId` | `long { get; set; }` | ID of the channel this setting applies to. |
| `SettingId` | `int { get; set; }` | Reference to the setting type ID. |
| `SettingValue` | `string { get; set; }` | The value applied to this channel. |
---
### IChannelCode
Defines a channel code identifier with type classification.
| Member | Signature | Description |
|--------|-----------|-------------|
| `Id` | `int { get; }` | Unique identifier (read-only). |
| `Code` | `string { get; }` | The code string value. |
| `Name` | `string { get; }` | Display name for the code. |
| `CodeType` | `ChannelEnumsAndConstants.ChannelCodeType { get; }` | Classification of the channel code type. |
---
### IChannelSetting
Defines a channel setting instance with typed value access and cloning capability.
| Member | Signature | Description |
|--------|-----------|-------------|
| `ChannelId` | `long { get; set; }` | ID of the associated channel. |
| `SettingTypeId` | `int { get; }` | The setting type identifier (read-only). |
| `SettingName` | `string { get; }` | Name of the setting (read-only). |
| `DefaultValue` | `string { get; }` | Default value for this setting (read-only). |
| `Value` | `string { get; set; }` | Raw string value. |
| `IntValue` | `int { get; set; }` | Integer interpretation of the value. |
| `DoubleValue` | `double { get; set; }` | Double interpretation of the value. |
| `BoolValue` | `bool { get; set; }` | Boolean interpretation of the value. |
| `Clone` | `IChannelSetting Clone()` | Creates a copy of this setting instance. |
---
### IChannelDbRecord
Defines the database persistence contract for a channel with Entity Framework data annotations.
| Member | Signature | Description |
|--------|-----------|-------------|
| `Id` | `long { get; set; }` | Primary key, mapped to column "Id". |
| `GroupId` | `int { get; set; }` | Foreign key to group, mapped to "GroupId". |
| `IsoCode` | `string { get; set; }` | ISO standard code, mapped to "IsoCode". |
| `IsoChannelName` | `string { get; set; }` | ISO channel name, mapped to "IsoChannelName". |
| `UserCode` | `string { get; set; }` | User-defined code, mapped to "UserCode". |
| `UserChannelName` | `string { get; set; }` | User-defined name, mapped to "UserChannelName". |
| `DASId` | `int { get; set; }` | Data Acquisition System ID, mapped to "DASId". |
| `DASChannelIndex` | `int { get; set; }` | Physical channel index on the DAS, mapped to "DASChannelIndex". |
| `GroupChannelOrder` | `int { get; set; }` | Sort order within group, mapped to "GroupChannelOrder". |
| `TestSetupOrder` | `int { get; set; }` | Sort order within test setup, mapped to "TestSetupOrder". |
| `SensorId` | `int { get; set; }` | Foreign key to sensor. |
| `Disabled` | `bool { get; set; }` | Whether channel is disabled, mapped to "Disabled". |
| `LastModified` | `DateTime { get; set; }` | Timestamp of last modification, mapped to "LastModified". |
| `LastModifiedBy` | `string { get; set;

View File

@@ -0,0 +1,84 @@
---
source_files:
- Common/DTS.Common/Interface/Channels/ChannelCodes/IChannelCodesListView.cs
- Common/DTS.Common/Interface/Channels/ChannelCodes/IChannelCodesListViewModel.cs
- Common/DTS.Common/Interface/Channels/ChannelCodes/IChannelCode.cs
generated_at: "2026-04-17T16:35:56.589507+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "71241a25844594e0"
---
# Documentation: Channel Codes Module
## 1. Purpose
This module defines the contract for a channel code management UI component within the DTS system. It provides interfaces for a View/ViewModel pattern that handles the display, editing, validation, and organization of two categories of channel codes: ISO channel codes and User-defined channel codes. The module abstracts the UI behavior for channel code lists, supporting operations such as filtering, sorting, copying, deleting, and bulk pasting of code data.
---
## 2. Public Interface
### `IChannelCodesListView`
**Namespace:** `DTS.Common.Interface.Channels.ChannelCodes`
**Signature:**
```csharp
public interface IChannelCodesListView : IBaseView { }
```
A marker interface extending `IBaseView` with no additional members. Represents the view contract for the channel codes list UI.
---
### `IChannelCodesListViewModel`
**Namespace:** `DTS.Common.Interface.Channels.ChannelCodes`
**Signature:**
```csharp
public interface IChannelCodesListViewModel : IBaseViewModel
```
**Properties:**
| Property | Type | Description |
|----------|------|-------------|
| `View` | `IChannelCodesListView` | Gets or sets the associated view instance. |
| `ISOChannelCodes` | `ObservableCollection<IChannelCode>` | Collection of ISO channel codes displayed in the UI. |
| `UserChannelCodes` | `ObservableCollection<IChannelCode>` | Collection of user-defined channel codes displayed in the UI. |
| `ChannelCodesFunc` | `Func<IList<IChannelCode>>` | Function delegate that returns a list of channel codes. |
| `ShowISOStringBuilder` | `bool` | Controls visibility of the ISO string builder UI element. |
| `UniqueISOCodesRequired` | `bool` | Indicates whether ISO codes must be unique. |
| `ShowChannelCodeLookupHelper` | `bool` | Controls visibility of the channel code lookup helper UI element. |
| `IsReadOnly` | `bool` | Controls whether the UI is in read-only mode. |
| `SelectedCodes` | `IChannelCode[]` | Returns an array of currently selected channel codes. |
**Methods:**
| Method | Signature | Description |
|--------|-----------|-------------|
| `Unset` | `void Unset()` | Clears or resets the view model state. |
| `SetPage` | `void SetPage(object page)` | Sets the current page context. |
| `OnSetActive` | `void OnSetActive()` | Called when the view becomes active. |
| `Save` | `bool Save()` | Persists changes. Returns success status. |
| `Validate` | `bool Validate(bool bDisplayWindow)` | Validates the current state. Parameter controls whether validation errors are displayed in a UI window. |
| `CopySelected` | `void CopySelected()` | Copies the currently selected channel codes. |
| `DeleteSelected` | `void DeleteSelected()` | Deletes the currently selected channel codes. |
| `Filter` | `void Filter(object columnTag, string searchTerm)` | Filters the displayed channel codes based on a column and search term. |
| `Sort` | `void Sort(object columnTag, bool bColumnClick)` | Sorts the displayed channel codes by the specified column. |
---
### `IChannelCode`
**Namespace:** `DTS.Common.Interface.Channels.ChannelCodes`
**Signature:**
```csharp
public interface IChannelCode
```
Represents a single channel code item for UI display and manipulation.
**Properties:**
| Property |

View File

@@ -0,0 +1,48 @@
---
source_files:
- Common/DTS.Common/Interface/CheckChannels/ICheckChannelsView.cs
- Common/DTS.Common/Interface/CheckChannels/ICheckChannelsViewModel.cs
- Common/DTS.Common/Interface/CheckChannels/ICheckChannelsMenuView.cs
- Common/DTS.Common/Interface/CheckChannels/ICheckChannelsMenuViewModel.cs
generated_at: "2026-04-17T16:22:07.564758+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "2700078ff70b5df1"
---
# CheckChannels
### Purpose
This module defines the view and ViewModel interfaces for a "Check Channels" feature within the DTS system. It provides both standard view/ViewModel pairs and Ribbon-specific variants, following the application's MVVM architecture pattern. The interfaces serve as contracts for UI components that allow users to verify or inspect channel configurations.
### Public Interface
**ICheckChannelsView** (`ICheckChannelsView.cs`)
- Signature: `public interface ICheckChannelsView : IBaseView`
- Description: Marker interface for the Check Channels view. Inherits from `IBaseView` but defines no additional members.
**ICheckChannelsViewModel** (`ICheckChannelsViewModel.cs`)
- Signature: `public interface ICheckChannelsViewModel : IBaseViewModel`
- Description: Marker interface for the Check Channels ViewModel. Inherits from `IBaseViewModel` but defines no additional members.
**ICheckChannelsMenuView** (`ICheckChannelsMenuView.cs`)
- Signature: `public interface ICheckChannelsMenuView : IRibbonView`
- Description: Marker interface for the Check Channels Ribbon menu view. Inherits from `IRibbonView` but defines no additional members.
**ICheckChannelsMenuViewModel** (`ICheckChannelsMenuViewModel.cs`)
- Signature: `public interface ICheckChannelsMenuViewModel : IRibbonViewModel`
- Description: Marker interface for the Check Channels Ribbon menu ViewModel. Inherits from `IRibbonViewModel` but defines no additional members.
### Invariants
- All views must implement `IBaseView` or `IRibbonView` respectively.
- All ViewModels must implement `IBaseViewModel` or `IRibbonViewModel` respectively.
- The menu variants (`ICheckChannelsMenuView`, `ICheckChannelsMenuViewModel`) are specifically for Ribbon-based UI integration.
### Dependencies
- **Depends on**: `DTS.Common.Base` (for `IBaseView`, `IBaseViewModel`, `IBaseModel`), `DTS.Common.RibbonControl` (for `IRibbonView`, `IRibbonViewModel`)
- **Depended on by**: Unknown from source alone (likely Check Channels feature implementation assemblies)
### Gotchas
- All four interfaces are marker interfaces with no members beyond their base types. Actual behavior contracts must be defined in implementing classes or documented elsewhere.
---

View File

@@ -0,0 +1,33 @@
---
source_files:
- Common/DTS.Common/Interface/CheckTrigger/ICheckTriggerView.cs
- Common/DTS.Common/Interface/CheckTrigger/ICheckTriggerViewModel.cs
generated_at: "2026-04-17T16:06:29.967191+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "16749ec2d102e7fd"
---
# CheckTrigger
### Purpose
This module defines the contract interfaces for the CheckTrigger feature following the MVVM (Model-View-ViewModel) pattern. It provides marker interfaces `ICheckTriggerView` and `ICheckTriggerViewModel` that extend base interfaces, enabling type-safe view/viewmodel associations and potentially supporting dependency injection or navigation frameworks.
### Public Interface
- **`ICheckTriggerView`** (interface) - Marker interface extending `IBaseView`. No additional members defined beyond the base interface.
- **`ICheckTriggerViewModel`** (interface) - Marker interface extending `IBaseViewModel`. No additional members defined beyond the base interface.
### Invariants
- Implementers of `ICheckTriggerView` must also satisfy the contract of `IBaseView` (members not visible in this source).
- Implementers of `ICheckTriggerViewModel` must also satisfy the contract of `IBaseViewModel` (members not visible in this source).
- The view and viewmodel interfaces are intended to be paired for the CheckTrigger feature.
### Dependencies
- **Depends on:** `DTS.Common.Base.IBaseView`, `DTS.Common.Base.IBaseViewModel`.
- **Depended on by:** Cannot be determined from source alone; likely used by CheckTrigger feature implementations and possibly an IoC container or navigation service.
### Gotchas
- These are marker interfaces with no additional members. The actual behavior contract is inherited from `IBaseView` and `IBaseViewModel` - refer to those base interfaces for the full API contract.
- The purpose of "CheckTrigger" is not documented in code; domain knowledge required to understand the feature's business purpose.
---

View File

@@ -0,0 +1,56 @@
---
source_files:
- Common/DTS.Common/Interface/Communication/ICommunicationReport.cs
- Common/DTS.Common/Interface/Communication/IDASConnectedDevice.cs
- Common/DTS.Common/Interface/Communication/ICommunication_DASInfo.cs
generated_at: "2026-04-17T16:35:32.988385+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "32c2a3f63497bcca"
---
# Documentation: DTS.Common.Interface.Communication
## 1. Purpose
This module defines a set of interfaces for modeling communication with Data Acquisition System (DAS) hardware and connected devices. It provides contracts for reporting communication results (`ICommunicationReport`), describing devices connected to a DAS (`IDASConnectedDevice`), and exposing DAS-specific metadata such as serial numbers, firmware versions, first-use tracking, and streaming capability (`ICommunication_DASInfo`). These interfaces enable decoupled communication between hardware abstraction layers and higher-level application logic.
---
## 2. Public Interface
### `ICommunicationReport`
Defines a structure for reporting the outcome of a communication operation.
| Member | Type | Description |
|--------|------|-------------|
| `UserState` | `object` | Gets or sets arbitrary user state associated with the communication. |
| `Result` | `CommunicationConstantsAndEnums.CommunicationResult` | Gets or sets the result status of the communication. |
| `Data` | `byte[]` | Gets or sets the raw data payload from the communication. |
---
### `IDASConnectedDevice`
Describes a device connected to a DAS (e.g., an S6 connected to an S6DB). Part of feature 10582 for auto-discovering and monitoring DAS status.
| Member | Type | Description |
|--------|------|-------------|
| `DeviceType` | `HardwareTypes` | Gets the hardware type of the connected device. |
| `Port` | `int` | Gets the 0-based port index on the DAS where the device is connected. |
| `SpotOnPort` | `int` | Gets the 0-based position on the chain or port where the device resides. |
| `PhysicalAddress` | `PhysicalAddress` | Gets the MAC/physical address of the device. |
| `IPAddress` | `string` | Gets the IP address of the device. |
| `SerialNumber` | `string` | Gets the serial number of the device. |
| `Location` | `string` | Gets the location descriptor of the device. |
| `Version` | `string` | Gets the firmware/hardware version of the device. |
---
### `ICommunication_DASInfo`
Provides metadata and device enumeration for a DAS unit.
| Member | Type | Description |
|--------|------|-------------|
| `ConnectedDevices` | `IDASConnectedDevice[]` | Gets the array of devices connected to this DAS. Currently only used by SLICE6DB. |
| `SetConnectedDevices(IDASConnectedDevice[] devices)` | `void` | Sets the `ConnectedDevices` array. |
| `SerialNumbers` |

View File

@@ -0,0 +1,24 @@
---
source_files:
- Common/DTS.Common/Interface/Components/IAssemblyView.cs
- Common/DTS.Common/Interface/Components/IAssemblyListView.cs
- Common/DTS.Common/Interface/Components/ITileView.cs
- Common/DTS.Common/Interface/Components/IGroupView.cs
- Common/DTS.Common/Interface/Components/ITileListView.cs
- Common/DTS.Common/Interface/Components/IGroupListView.cs
- Common/DTS.Common/Interface/Components/IAssemblyViewModel.cs
- Common/DTS.Common/Interface/Components/IAssemblyListViewModel.cs
- Common/DTS.Common/Interface/Components/ITileViewModel.cs
- Common/DTS.Common/Interface/Components/IGroupViewModel.cs
- Common/DTS.Common/Interface/Components/ITileListViewModel.cs
- Common/DTS.Common/Interface/Components/IGroupListViewModel.cs
generated_at: "2026-04-17T16:03:19.297979+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "e92ace6699531e75"
---
# Components
### Purpose
This module defines the View and ViewModel interfaces for

View File

@@ -0,0 +1,57 @@
---
source_files:
- Common/DTS.Common/Interface/Connection/IConnection.cs
generated_at: "2026-04-17T16:52:23.062559+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "c785cd9a26c94c57"
---
# Documentation: IConnection Interface
## 1. Purpose
The `IConnection` interface defines an abstraction for network connection management within the DTS system. It provides a comprehensive contract for socket-based communication, supporting both APM (Asynchronous Programming Model) and Task-based asynchronous patterns. The interface encapsulates connection lifecycle management (creation, connection, disconnection), data transfer operations (send/receive), server-side operations (bind/listen/accept), and introduces a "soft disconnect" concept for temporary disconnections with the expectation of reconnection. This interface exists to decouple higher-level application logic from specific connection implementations, enabling testability and implementation flexibility.
## 2. Public Interface
### Properties
| Signature | Description |
|-----------|-------------|
| `bool IsSoftDisconnected { get; }` | Returns `true` if the connection is in a soft-disconnected state (voluntarily disconnected with expectation of reconnecting). |
| `System.Net.Sockets.SocketFlags Flags { get; set; }` | Gets or sets socket flags used for send/receive operations. |
| `string ConnectString { get; }` | Returns the connection string associated with this connection. |
| `bool Connected { get; }` | Returns `true` if the connection is currently active. |
### Events
| Signature | Description |
|-----------|-------------|
| `event EventHandler OnDisconnected` | Raised when the connection is disconnected. |
### Methods - Connection Lifecycle
| Signature | Description |
|-----------|-------------|
| `void Create(string connectString)` | Initializes the connection using the provided connection string. |
| `void Create(string connectString, string hostIPAddress)` | Initializes the connection with a connection string and specific host IP address. |
| `void SoftDisconnect()` | Performs a soft disconnect (voluntary disconnection with intent to reconnect later). |
| `void SoftConnect()` | Reconnects a soft-disconnected connection. |
| `void KeepAliveErrorReceived()` | Called to indicate the device has not received a timely response to keep-alive. |
| `string GetConnectionData()` | Returns connection data as a string. |
### Methods - APM Pattern (Connect/Disconnect)
| Signature | Description |
|-----------|-------------|
| `IAsyncResult BeginConnect(AsyncCallback callback, object callbackObject)` | Begins an asynchronous connection attempt. |
| `void EndConnect(IAsyncResult ar)` | Completes an asynchronous connection attempt. |
| `IAsyncResult BeginDisconnect(bool reuseSocket, AsyncCallback callback, object state)` | Begins an asynchronous disconnection. |
| `void EndDisconnect(IAsyncResult asyncResult)` | Completes an asynchronous disconnection. |
### Methods - APM Pattern (Server Operations)
| Signature | Description |
|-----------|-------------|
| `void Bind(int port)` | Binds the connection to a specific port.

Some files were not shown because too many files have changed in this diff Show More