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,36 @@
---
source_files:
- Common/DTS.Common/Interface/Sensors/AnalogDiagnostics/IDiagnosticRun.cs
- Common/DTS.Common/Interface/Sensors/AnalogDiagnostics/IDiagnosticEntry.cs
generated_at: "2026-04-17T16:24:55.024568+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "5ebd8c3221c912e5"
---
# AnalogDiagnostics
### Purpose
This module defines the data contracts for analog sensor diagnostic testing. It captures the structure of diagnostic runs (test sessions) and individual diagnostic entries (per-channel test results), including excitation, offset, range, noise, and shunt measurements with pass/fail status tracking.
### Public Interface
**`IDiagnosticRun`** (interface)
- Namespace: `DTS.Common.Interface.Sensors.AnalogDiagnostics`
- Members:
- `long? Id { get; set; }` — Nullable identifier for the diagnostic run
- `string DataPROUser { get; set; }` — User associated with the diagnostic run
- `int? TestId { get; set; }` — Nullable test identifier
- `string TestName { get; set; }` — Name of the test
- `bool PreTest { get; set; }` — Flag indicating if this is a pre-test run
**`IDiagnosticEntry`** (interface)
- Namespace: `DTS.Common.Interface.Sensors.AnalogDiagnostics`
- Members:
- `long? Id { get; set; }` — Nullable identifier for the entry
- `long DiagnosticRunId { get; set; }` — Foreign key to parent diagnostic run (non-nullable)
- `double? Excitation { get; set; }` — Excitation measurement value
- `DiagnosticStatus ExcitationStatus { get; set; }` — Status of excitation test
- `double? Offset { get; set; }` — Offset measurement value
- `DiagnosticStatus OffsetStatus { get; set; }` — Status of offset test
- `double? ActualRange { get; set; }` — Actual range measurement

View File

@@ -0,0 +1,61 @@
---
source_files:
- Common/DTS.Common/Interface/Sensors/SensorSettingsModule/ISensorSettingsView.cs
- Common/DTS.Common/Interface/Sensors/SensorSettingsModule/ISensorSettingsViewModel.cs
- Common/DTS.Common/Interface/Sensors/SensorSettingsModule/ICalibrationPolicy.cs
generated_at: "2026-04-17T16:23:28.254054+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "14988a2958fb721f"
---
# SensorSettingsModule
### Purpose
This module defines the contract for the Sensor Settings user interface component within the DTS application. It provides interfaces for configuring sensor-related defaults including squib settings, digital I/O, IEPE sensors, calibration policies, and analog settings. The module follows a Model-View-ViewModel (MVVM) pattern, separating the view concerns from the business logic of persisting and validating sensor configuration defaults per user.
### Public Interface
**ISensorSettingsView**
- `interface ISensorSettingsView : IBaseView` - Marker interface for the Sensor Settings view. No members defined beyond the base interface.
**ISensorSettingsViewModel**
- `string User { get; set; }` - User identifier used when saving/reading defaults from the database.
- `int UserID { get; set; }` - Numeric user ID used when saving/reading defaults from the database.
- `ISensorSettingsView View { get; set; }` - The associated view instance for this ViewModel.
- `ISquibSettingDefaults SquibSettings { get; set; }` - Defaults for squib configuration.
- `IDigitalOutDefaults DigitalOutSettings { get; set; }` - Defaults for digital output configuration.
- `IDigitalInputDefaults DigitalInputDefaults { get; set; }` - Defaults for digital input configuration.
- `IIEPESensorDefaults IEPESensorDefaults { get; set; }` - Defaults for IEPE sensor configuration.
- `ICalibrationPolicy SensorCalibrationDefaults { get; set; }` - Calibration policy defaults.
- `IAnalogDefaults AnalogDefaults { get; set; }` - Analog settings defaults (FB 13120 default filter class setting).
- `void RestoreOriginalSettings()` - Restores all settings to their original/pre-modification values.
- `void Unset()` - Uninitializes the display and frees memory resources.
- `void OnSetActive()` - Initializes the display when the view becomes active.
- `bool ValidateAndSave()` - Validates current settings; returns true if valid and saves, returns false if invalid without saving.
**ICalibrationPolicy**
- `SensorConstants.SensorCalPolicy SelectedCalPolicy { get; set; }` - The currently selected calibration policy.
- `SensorConstants.SensorCalPolicy[] AvailableSensorCalPolicies { get; }` - Array of all available calibration policies.
- `int WarningPeriod { get; set; }` - Period in days before calibration is due for a warning.
- `bool UseSensorFirstUseDate { get; set; }` - Whether calibration interval starts after calibration date or first use date.
- `bool DontAllowDataCollectionIfOverused { get; set; }` - Whether to validate Test Setup based on sensor usage limits.
- `int UsageRemainingForWarning { get; set; }` - Threshold for warning when sensor usage approaches maximum.
- `int DefaultMaxUsageAllowed { get; set; }` - Default maximum number of uses for sensors.
- `bool SensorAssemblyEnabled { get; }` - Whether the database supports sensor usage policy.
- `bool AllowInspectBeforeUseEnabled { get; }` - Whether the database supports "inspect before use" feature.
- `bool AllowInspectBeforeUse { get; set; }` - Whether to allow inspect before use (FB43142).
- `void ReadXML(System.Xml.XmlElement root)` - Imports settings from XML (FB15758).
- `void WriteXML(ref System.Xml.XmlWriter writer)` - Exports settings to XML (FB15758).
### Invariants
- `ValidateAndSave()` must not persist invalid settings; it returns false and performs no save operation.
- `RestoreOriginalSettings()` should return all configurable properties to their state as of the last successful load or save.
- XML import/export methods (`ReadXML`/`WriteXML`) are paired operations for settings migration.
### Dependencies
- **Depends on**: `DTS.Common.Base` (IBaseView, IBaseViewModel), `DTS.Common.Enums.Sensors` (SensorConstants.SensorCalPolicy).
- **Referenced interfaces not defined in this module**: `ISquibSettingDefaults`, `IDigitalOutDefaults`, `IDigitalInputDefaults`, `IIEPESensorDefaults`, `IAnalogDefaults` (all used as property types).
### Gotchas
- The `User` and `UserID` properties are used for database persistence context; their synchronization with

View File

@@ -0,0 +1,365 @@
---
source_files:
- Common/DTS.Common/Interface/Sensors/SensorsList/ISensorsListOverdueView.cs
- Common/DTS.Common/Interface/Sensors/SensorsList/ISensorTemplatesExportView.cs
- Common/DTS.Common/Interface/Sensors/SensorsList/ISensorsTemplatesImportView.cs
- Common/DTS.Common/Interface/Sensors/SensorsList/ISensorTemplatesViewModel.cs
- Common/DTS.Common/Interface/Sensors/SensorsList/ISensorsListView.cs
- Common/DTS.Common/Interface/Sensors/SensorsList/ISensorsListEditGroupView.cs
- Common/DTS.Common/Interface/Sensors/SensorsList/IDragAndDropItem.cs
- Common/DTS.Common/Interface/Sensors/SensorsList/ISquib.cs
- Common/DTS.Common/Interface/Sensors/SensorsList/ISensorsListEditGroupViewModel.cs
- Common/DTS.Common/Interface/Sensors/SensorsList/IStreamInputSetting.cs
- Common/DTS.Common/Interface/Sensors/SensorsList/ICanIOSetting.cs
- Common/DTS.Common/Interface/Sensors/SensorsList/IUartIOSetting.cs
- Common/DTS.Common/Interface/Sensors/SensorsList/IDigitalInputSetting.cs
- Common/DTS.Common/Interface/Sensors/SensorsList/IDigitalOutputSetting.cs
- Common/DTS.Common/Interface/Sensors/SensorsList/ISensorsListViewModel.cs
- Common/DTS.Common/Interface/Sensors/SensorsList/IStreamOutputSetting.cs
- Common/DTS.Common/Interface/Sensors/SensorsList/IAnalogSensor.cs
generated_at: "2026-04-17T15:28:59.729208+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "bee3b0a04bb35df3"
---
# Documentation: DTS.Common.Interface.Sensors.SensorsList
## 1. Purpose
This module defines the interface contracts for the sensor management subsystem, encompassing views, view models, and data models for multiple sensor types (analog sensors, squibs, digital I/O, UART, CAN, and stream I/O). It provides the abstraction layer between UI components and business logic for displaying, filtering, sorting, and managing sensors, supporting calibration tracking, drag-and-drop operations, sensor grouping, and template import/export functionality.
---
## 2. Public Interface
### Marker Interfaces (Empty Contracts)
| Interface | Base | Purpose |
|-----------|------|---------|
| `ISensorsListOverdueView` | `IBaseView` | Marker for overdue sensors view |
| `ISensorTemplatesExportView` | `IBaseView` | Marker for template export view |
| `ISensorsTemplatesImportView` | `IBaseView` | Marker for template import view |
| `ISensorTemplatesViewModel` | `IBaseViewModel` | Marker for templates view model |
---
### ISensorsListView
```csharp
public interface ISensorsListView : IBaseView
{
void HandleColumns(CalibrationBehaviors calibrationBehavior);
void SetIncludedVisible(bool bUsesIncludeColumn);
void HandleAssemblyVisibilityColumns(bool bDontAllowDataCollectionIfOverused);
void HandleInspectBeforeUseVisibilityColumn(bool show);
}
```
**Behavior**: Controls column visibility and configuration for the main sensors list view based on calibration behavior and system settings.
---
### ISensorsListEditGroupView
```csharp
public interface ISensorsListEditGroupView : IBaseView
{
void HandleColumns();
void HandleAssemblyVisibilityColumns(bool bDontAllowDataCollectionIfOverused);
void HandleInspectBeforeUseVisibilityColumn(bool show);
}
```
**Behavior**: Manages column configuration for the sensor group editing view. Referenced in FB 13065 (Sensor "First Use" Date).
---
### IDragAndDropItem
```csharp
public interface IDragAndDropItem
{
string SerialNumber { get; set; }
int DatabaseId { get; set; }
string ISOCode { get; }
string ISOChannelName { get; }
string UserCode { get; }
string UserChannelName { get; }
}
```
**Behavior**: Describes the payload when dragging sensors from a sensor list. Common interface across different sensor types.
---
### ISquib
```csharp
public interface ISquib
{
int DatabaseId { get; set; }
bool Included { get; set; }
string SerialNumber { get; set; }
string Description { get; set; }
double ResistanceLow { get; set; }
double ResistanceHigh { get; set; }
string ID { get; set; }
string SQMode { get; set; }
double SQDelay { get; set; }
double SQCurrent { get; set; }
double SQDuration { get; set; }
bool LimitDuration { get; set; }
string ModifiedBy { get; set; }
DateTime LastModified { get; set; }
bool Filter(string term);
bool Assigned { get; set; }
bool Online { get; set; }
string ISOCode { get; set; }
string ISOChannelName { get; set; }
string UserCode { get; set; }
string UserChannelName { get; set; }
SquibFireMode Mode { get; set; }
bool Broken { get; set; }
bool DoNotUse { get; set; }
}
```
**Behavior**: Represents a squib (explosive initiator) sensor for UI display with firing parameters, resistance ranges, and status flags.
---
### IAnalogSensor
```csharp
public interface IAnalogSensor
{
SensorConstants.BridgeType Bridge { get; set; }
bool IEPE { get; }
int DatabaseId { get; set; }
bool Included { get; set; }
string SerialNumber { get; set; }
string Description { get; set; }
string Manufacturer { get; set; }
string Model { get; set; }
double Capacity { get; set; }
double RangeHigh { get; set; }
double RangeMedium { get; set; }
double RangeLow { get; set; }
string Sensitivity { get; set; }
string AddedSensitivity { get; set; }
double Resistance { get; set; }
string Excitation { get; set; }
string Units { get; set; }
string EID { get; set; }
DateTime CalDate { get; set; }
DateTime CalDueDate { get; set; }
string ModifiedBy { get; set; }
DateTime LastModified { get; set; }
bool Filter(string term);
bool Assigned { get; set; }
bool Online { get; set; }
string ISOCode { get; set; }
string ISOChannelName { get; set; }
string UserCode { get; set; }
string UserChannelName { get; set; }
FilterClassType CFC { get; set; }
bool Polarity { get; set; }
string NonLinearCalculationType { get; set; }
NonLinearStyles NonLinearCalculationTypeEnum { get; set; }
ZeroMethodType ZeroMethod { get; set; }
double ZeroMethodStart { get; set; }
double ZeroMethodEnd { get; set; }
string UserValue1 { get; set; }
string UserValue2 { get; set; }
string UserValue3 { get; set; }
UIItemStatus SensorCalibrationOrUsageStatus { get; }
InitialOffset[] InitialOffsets { get; set; }
IFilterClass FilterClass { get; set; }
DateTime? FirstUseDate { get; set; }
int? LatestCalibrationId { get; set; }
bool UsingLatestCalibration { get; set; }
int SensorUsageCount { get; set; }
int MaximumUsage { get; set; }
string AssemblyName { get; set; }
}
```
**Behavior**: Primary interface for analog sensor representation in the UI. Includes calibration tracking, usage monitoring, and first-use date tracking (FB 13065). Supports dual-sensitivity sensors via `AddedSensitivity`.
---
### IDigitalInputSetting
```csharp
public interface IDigitalInputSetting
{
int DatabaseId { get; set; }
bool Included { get; set; }
string SerialNumber { get; set; }
string Description { get; set; }
string DIMode { get; set; }
string ModifiedBy { get; set; }
DateTime LastModified { get; set; }
bool Filter(string term);
bool Assigned { get; set; }
bool Online { get; set; }
string EID { get; set; }
string ISOCode { get; set; }
string ISOChannelName { get; set; }
string UserCode { get; set; }
string UserChannelName { get; set; }
string ActiveValue { get; set; }
string DefaultValue { get; set; }
DigitalInputModes Mode { get; set; }
bool Broken { get; set; }
bool DoNotUse { get; set; }
}
```
**Behavior**: Represents digital input configuration for UI display with active/idle state display values.
---
### IDigitalOutputSetting
```csharp
public interface IDigitalOutputSetting
{
int DatabaseId { get; set; }
bool Included { get; set; }
string SerialNumber { get; set; }
string Description { get; set; }
double DODelay { get; set; }
double DODuration { get; set; }
string ModifiedBy { get; set; }
DateTime LastModified { get; set; }
bool Filter(string term);
bool Assigned { get; set; }
bool Online { get; set; }
string ISOCode { get; set; }
string ISOChannelName { get; set; }
string UserCode { get; set; }
string UserChannelName { get; set; }
bool LimitDuration { get; set; }
DigitalOutputModes DOMode { get; set; }
bool Broken { get; set; }
bool DoNotUse { get; set; }
}
```
**Behavior**: Represents digital output configuration with timing parameters (delay, duration).
---
### IUartIOSetting
```csharp
public interface IUartIOSetting
{
int DatabaseId { get; set; }
bool Included { get; set; }
string SerialNumber { get; set; }
string Description { get; set; }
string LastModifiedBy { get; set; }
DateTime LastModified { get; set; }
bool Filter(string term);
bool Assigned { get; set; }
bool Online { get; set; }
string ISOCode { get; set; }
string ISOChannelName { get; set; }
string UserCode { get; set; }
string UserChannelName { get; set; }
bool Broken { get; set; }
bool DoNotUse { get; set; }
uint BaudRate { get; set; }
uint DataBits { get; set; }
StopBits StopBits { get; set; }
Parity Parity { get; set; }
Handshake FlowControl { get; } // Read-only per FB 30486
UartDataFormat DataFormat { get; set; }
}
```
**Behavior**: Represents UART I/O configuration with serial communication parameters. `FlowControl` is read-only and always `NONE` per FB 30486.
---
### ICanIOSetting
```csharp
public interface ICanIOSetting
{
int DatabaseId { get; set; }
bool Included { get; set; }
string SerialNumber { get; set; }
string Description { get; set; }
string LastModifiedBy { get; set; }
DateTime LastModified { get; set; }
bool Filter(string term);
bool Assigned { get; set; }
bool Online { get; set; }
string ISOCode { get; set; }
string ISOChannelName { get; set; }
string UserCode { get; set; }
string UserChannelName { get; set; }
bool Broken { get; set; }
bool DoNotUse { get; set; }
bool CanIsFD { get; set; }
int CanArbBaseBitrate { get; set; }
int CanArbBaseSJW { get; set; }
int CanDataBitrate { get; set; }
int CanDataSJW { get; set; }
string CanFileType { get; set; }
}
```
**Behavior**: Represents CAN bus I/O configuration with CAN FD support and bitrate parameters.
---
### IStreamInputSetting
```csharp
public interface IStreamInputSetting
{
int DatabaseId { get; set; }
bool Included { get; set; }
string SerialNumber { get; set; }
string Description { get; set; }
string LastModifiedBy { get; set; }
DateTime LastModified { get; set; }
bool Filter(string term);
bool Assigned { get; set; }
bool Online { get; set; }
string ISOCode { get; set; }
string ISOChannelName { get; set; }
string UserCode { get; set; }
string UserChannelName { get; set; }
bool Broken { get; set; }
bool DoNotUse { get; set; }
string UDPAddress { get; set; }
}
```
**Behavior**: Represents stream input configuration with UDP address support.
---
### IStreamOutputSetting
```csharp
public interface IStreamOutputSetting
{
int DatabaseId { get; set; }
bool Included { get; set; }
string SerialNumber { get; set; }
string Description { get; set; }
string LastModifiedBy { get; set; }
DateTime LastModified { get; set; }
bool Filter(string term);
bool Assigned { get; set; }
bool Online { get; set; }
string ISOCode { get; set; }
string ISOChannelName { get; set; }
string UserCode { get; set;

View File

@@ -0,0 +1,59 @@
---
source_files:
- Common/DTS.Common/Interface/Sensors/SoftwareFilters/ISoftwareFiltersView.cs
- Common/DTS.Common/Interface/Sensors/SoftwareFilters/ISoftwareFiltersViewModel.cs
generated_at: "2026-04-17T16:37:28.874617+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "3dee9bc406f144e0"
---
# Documentation: DTS.Common.Interface.Sensors.SoftwareFilters
## 1. Purpose
This module defines the contract for the Software Filters feature within the DTS system. It provides interfaces for both the view layer (`ISoftwareFiltersView`) and the view model layer (`ISoftwareFiltersViewModel`) following an MVVM pattern, as well as a separate `IFilterClass` interface for representing individual filter configurations. The module enables the display, sorting, filtering, and persistence of software filter settings, likely used in sensor data processing workflows.
---
## 2. Public Interface
### `ISoftwareFiltersView`
**Signature:** `public interface ISoftwareFiltersView : IBaseView { }`
A marker interface extending `IBaseView`. It defines no members of its own and serves as a type contract for view implementations in the MVVM architecture.
---
### `IFilterClass`
**Signature:** `public interface IFilterClass : IComparable`
Defines a filter class configuration with frequency and type properties. Marked with `System.ComponentModel.TypeConverter(typeof(System.ComponentModel.ExpandableObjectConverter))` for property grid expansion support.
| Member | Type | Access | Description |
|--------|------|--------|-------------|
| `FilterName` | `string` | get | Read-only name of the filter |
| `FClass` | `FilterClassType` | get/set | The filter class type enumeration value |
| `Frequency` | `double` | get/set | The frequency value for the filter |
| `GetFilterClassNumericValue()` | `int` | method | Returns a numeric representation of the filter class |
**Note:** Implements `IComparable`, implying instances can be sorted/ordered.
---
### `ISoftwareFiltersViewModel`
**Signature:** `public interface ISoftwareFiltersViewModel : IBaseViewModel, IFilterableListView`
The primary view model contract for managing a collection of software filters. Inherits from both `IBaseViewModel` and `IFilterableListView`.
| Member | Type | Description |
|--------|------|-------------|
| `View` | `ISoftwareFiltersView` (get/set) | Reference to the associated view instance |
| `SoftwareFilters` | `ObservableCollection<ISoftwareFilter>` (get/set) | Bindable collection of software filters |
| `CurrentUser` | `string` (get/set) | The current user context for the view model |
| `Sort(object sortBy, bool bColumnClick)` | `void` | Sorts the filter collection based on the provided parameter |
| `Unset()` | `void` | Clears or resets the view model state |
| `Filter(string currentFilter)` | `void` | Applies a text-based filter to the collection |
| `GetSoftwareFilters()` | `ISoftwareFilter[]` | Returns the filters as an array |
| `PopulateView()` | `void` | Initializes/populates the view with data |
| `Validate