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,126 @@
---
source_files:
- Common/DTS.CommonCore/Interface/BuildTestSetup/IBuildTestSetup.cs
generated_at: "2026-04-16T12:17:19.769596+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "5d29553a439a7fc1"
---
# Documentation: IBuildTestSetup
## 1. Purpose
The `IBuildTestSetup` interface defines a data contract for configuring a "Build Test Setup" within the DTS system. It appears to model the configuration state for a Data Acquisition System (DAS) test execution, encapsulating settings for hardware checks (voltage, squib resistance, sensors), data acquisition parameters (sampling rates, triggers), data export formats (CSV, HDF, ISO, etc.), and user interface behaviors. By inheriting from `INotifyPropertyChanged`, it is designed to support data-binding scenarios, likely for a configuration UI or view model where property changes must notify observers.
## 2. Public Interface
The interface contains the following members. All properties are read/write.
**Identification & Metadata**
* `string DASSerialNumber { get; set; }`: Serial number of the DAS unit.
* `string SetupName { get; set; }`: Name of the test setup configuration.
* `string SetupDescription { get; set; }`: Description of the test setup.
* `string LastModified { get; set; }`: Timestamp of the last modification.
* `string LastModifiedBy { get; set; }`: User who last modified the setup.
**Execution Modes & Timing**
* `string AutomaticMode { get; set; }`: Setting for automatic operation mode.
* `string AutomaticModeDelay { get; set; }`: Delay duration for automatic mode.
* `string RecordingMode { get; set; }`: Defines how recording is handled.
* `string SamplesPerSecond { get; set; }`: Sampling rate configuration.
* `string PreTriggerSeconds { get; set; }`: Duration of pre-trigger data capture.
* `string PostTriggerSeconds { get; set; }`: Duration of post-trigger data capture.
* `string NumberOfEvents { get; set; }`: Number of events to capture.
* `string WakeUpMotionTimeout { get; set; }`: Timeout setting for wake-up motion.
* `string Streaming { get; set; }`: Streaming configuration.
**User Interface & Behavior**
* `string ViewRealtime { get; set; }`: Flag/setting to view data in realtime.
* `string WarnOnBatteryFail { get; set; }`: Flag to warn if battery fails.
* `string StrictDiagnostics { get; set; }`: Enables strict diagnostic checks.
* `string RequireConfirmationOnErrors { get; set; }`: UI behavior for error handling.
* `string QuitTestWithoutWarning { get; set; }`: Flag to suppress quit warnings.
* `string CommonStatusLine { get; set; }`: Status line text.
* `string RealtimeCharts { get; set; }`: Configuration for realtime charts.
**Hardware Checks & Diagnostics**
* `string PerformArmChecklist { get; set; }`: Flag to perform arming checklist.
* `string CheckInputVoltage { get; set; }`: Enables input voltage check.
* `string CheckBatteryVoltage { get; set; }`: Enables battery voltage check.
* `string CheckSquibResistance { get; set; }`: Enables squib resistance check.
* `string MeasureSquibResistances { get; set; }`: Enables squib resistance measurement.
* `string CheckSensorIds { get; set; }`: Enables sensor ID verification.
* `string CheckStartEventLines { get; set; }`: Enables start event line checks.
* `string CheckTiltSensor { get; set; }`: Enables tilt sensor check.
* `string CheckTemperature { get; set; }`: Enables temperature check.
* `string RequireAllUnitsPassArmCheckList { get; set; }`: Validation rule for arming.
* `string PostTestDiagnostics { get; set; }`: Post-test diagnostic settings.
* `string CalibrationBehavior { get; set; }`: Defines calibration actions.
* `string TriggerCheckStep { get; set; }`: Trigger check configuration.
**Data Management (Download/ROI/Upload)**
* `string ROIDownload { get; set; }`: Region of Interest download setting.
* `string ViewROIDownload { get; set; }`: UI setting for viewing ROI downloads.
* `string DownloadAll { get; set; }`: Flag to download all data.
* `string ViewDownloadAll { get; set; }`: UI setting for viewing full downloads.
* `string ROIStart { get; set; }`: Start time/point for Region of Interest.
* `string ROIEnd { get; set; }`: End time/point for Region of Interest.
* `string DownloadFolder { get; set; }`: Target directory for downloads.
* `string UploadData { get; set; }`: Flag to enable data upload.
* `string UploadDataFolder { get; set; }`: Source directory for uploads.
**Export Configuration**
* `string Export { get; set; }`: General export setting.
* `string ExportFolder { get; set; }`: Destination directory for exports.
* `string ExportCh10FilteredEUDesired { get; set; }`: Export flag for filtered Ch10 EU data.
* `string ExportChryslerDDASDesired { get; set; }`: Export flag for Chrysler DDAS format.
* `string ExportCSVADCDesired { get; set; }`: Export flag for CSV ADC format.
* `string ExportCSVFilteredDesired { get; set; }`: Export flag for filtered CSV.
* `string ExportCSVMVDesired { get; set; }`: Export flag for CSV MV format.
* `string ExportCSVUnfilteredDesired { get; set; }`: Export flag for unfiltered CSV.
* `string ExportDiademADCDesired { get; set; }`: Export flag for Diadem ADC format.
* `string ExportHDFADCDesired { get; set; }`: Export flag for HDF ADC format.
* `string ExportHDFMVDesired { get; set; }`: Export flag for HDF MV format.
* `string ExportHDFUnfilteredDesired { get; set; }`: Export flag for unfiltered HDF.
* `string ExportISOFilteredDesired { get; set; }`: Export flag for filtered ISO format.
* `string ExportISOUnfilteredDesired { get; set; }`: Export flag for unfiltered ISO format.
* `string ExportRDFADCDesired { get; set; }`: Export flag for RDF ADC format.
* `string ExportTDASADCDesired { get; set; }`: Export flag for TDAS ADC format.
* `string ExportTDMSADCDesired { get; set; }`: Export flag for TDMS ADC format.
* `string ExportToyotaUnfilteredDesired { get; set; }`: Export flag for unfiltered Toyota format.
* `string ExportTSVFilteredDesired { get; set; }`: Export flag for filtered TSV.
* `string ExportTSVUnfilteredDesired { get; set; }`: Export flag for unfiltered TSV.
* `string ExportXLSXFilteredDesired { get; set; }`: Export flag for filtered XLSX.
* `string ExportXLSXUnfilteredDesired { get; set; }`: Export flag for unfiltered XLSX.
* `string ExportASCDesired { get; set; }`: Export flag for ASC format.
**Miscellaneous Configuration**
* `string AllowSensorIdToBlankChannel { get; set; }`: Permission setting for sensor IDs.
* `string ExcitationWarmupTimeMS { get; set; }`: Warmup time in milliseconds.
* `string UseLabDetails { get; set; }`: Flag to use lab details.
* `string UseCustomerDetails { get; set; }`: Flag to use customer details.
* `string UseTestEngineerDetails { get; set; }`: Flag to use test engineer details.
* `string AllowMissingSensors { get; set; }`: Permission to proceed with missing sensors.
* `string SuppressMissingSensorsWarning { get; set; }`: UI warning suppression.
* `string NotAllChannelsRealTime { get; set; }`: Setting regarding realtime channel limits.
* `string NotAllChannelsViewer { get; set; }`: Setting regarding viewer channel limits.
* `string UserTags { get; set; }`: User-defined tags for the setup.
* `string AutoArm { get; set; }`: Auto-arm feature setting.
**Complex Types**
* `List<GroupXMLClass> Groups { get; set; }`: A list of groups, presumably defining channel groups or sensor groupings, utilizing the `DTS.Common.XMLUtils.GroupXMLClass` type.
## 3. Invariants
* **INotifyPropertyChanged Contract:** Any class implementing `IBuildTestSetup` must implement the `PropertyChanged` event (from `System.ComponentModel`). Consumers expect this event to be raised when any of the string properties or the `Groups` list is modified.
* **String-based Values:** Despite many properties representing numeric values (e.g., `SamplesPerSecond`), boolean flags (e.g., `CheckInputVoltage`), or enumerations, the interface defines them strictly as `string`. Implementations may require parsing/validation logic to convert these to appropriate types for internal use.
## 4. Dependencies
* **System.ComponentModel:** Required for the `INotifyPropertyChanged` interface.
* **System.Collections.Generic:** Required for the `List` generic collection used by the `Groups` property.
* **DTS.Common.XMLUtils:** Required for the `GroupXMLClass` type used in the `Groups` property.
* **Consumers:** Unknown from the source alone, but likely includes ViewModels, Serializers (XML/JSON), and Test Configuration managers within the DTS ecosystem.
## 5. Gotchas
* **"Stringly-Typed" Configuration:** The interface uses `string` for almost all properties, including those that logically represent numbers (`ExcitationWarmupTimeMS`, `SamplesPerSecond`) or boolean flags (`AutoArm`, `CheckBatteryVoltage`). This suggests a lack of strong typing which could lead to runtime parsing errors or invalid state representation (e.g., setting `SamplesPerSecond` to "abc").
* **Commented-Out Properties:** The source contains several commented-out properties (e.g., `ExportFormat`, `ExportCh10UnfilteredEUDesired`, `ExportSomatFilteredDesired`). This indicates legacy features or deprecated export formats that were removed from the interface contract but not cleaned up, which may cause confusion regarding supported features.
* **Naming Inconsistencies:** Some export properties end in `Desired` (e.g., `ExportCSVADCDesired`), implying a request or preference, whereas others (like `Export`) do not. The semantic difference between `Export` and the specific `Export[Format]Desired` properties is not defined in the interface.

View File

@@ -0,0 +1,279 @@
---
source_files:
- Common/DTS.CommonCore/Interface/Channels/IChannelSettingRecord.cs
- Common/DTS.CommonCore/Interface/Channels/IGroupChannelSettingRecord.cs
- Common/DTS.CommonCore/Interface/Channels/IChannelCode.cs
- Common/DTS.CommonCore/Interface/Channels/IChannelSetting.cs
- Common/DTS.CommonCore/Interface/Channels/IChannelDbRecord.cs
- Common/DTS.CommonCore/Interface/Channels/IGroupChannel.cs
generated_at: "2026-04-16T12:23:05.212303+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "cbc4fb29d29bc466"
---
# Channel Interfaces Documentation
## 1. Purpose
This module defines the core abstraction layer for channel management in the DTS (Data Test System) application. It provides interfaces for channel configuration, settings persistence, and group channel operations. These interfaces serve as the contract between the database layer, business logic, and UI components for managing physical measurement channels, sensor assignments, hardware configurations, and various channel types (analog, digital, squib, UART, stream, etc.) within test setups.
---
## 2. Public Interface
### IChannelSettingRecord
Simple data contract for a channel setting type definition.
| Member | Type | Description |
|--------|------|-------------|
| `Id` | `int` | Unique identifier for the setting record. |
| `SettingName` | `string` | Name of the setting. |
| `DefaultValue` | `string` | Default value for the setting. |
---
### IGroupChannelSettingRecord
Associates a setting value with a specific channel.
| Member | Type | Description |
|--------|------|-------------|
| `ChannelId` | `long` | ID of the channel this setting applies to. |
| `SettingId` | `int` | ID of the setting type. |
| `SettingValue` | `string` | The value assigned to this setting. |
---
### IChannelCode
Represents a channel code with its metadata.
| Member | Type | Description |
|--------|------|-------------|
| `Id` | `int` | Unique identifier (read-only). |
| `Code` | `string` | The code string (read-only). |
| `Name` | `string` | Display name (read-only). |
| `CodeType` | `ChannelEnumsAndConstants.ChannelCodeType` | Type classification of the code (read-only). |
---
### IChannelSetting
Represents a configurable setting on a channel with typed value access.
| Member | Type | Description |
|--------|------|-------------|
| `ChannelId` | `long` | ID of the associated channel. |
| `SettingTypeId` | `int` | Type identifier for this setting (read-only). |
| `SettingName` | `string` | Name of the setting (read-only). |
| `DefaultValue` | `string` | Default value (read-only). |
| `Value` | `string` | Current string value. |
| `IntValue` | `int` | Integer representation of the value. |
| `DoubleValue` | `double` | Double representation of the value. |
| `BoolValue` | `bool` | Boolean representation of the value. |
| `Clone()` | `IChannelSetting` | Creates a copy of this setting. |
---
### IChannelDbRecord
Interface describing a Channel record as stored in the database. Includes Entity Framework data annotations.
| Member | Type | Description |
|--------|------|-------------|
| `Id` | `long` | Primary key, mapped to column "Id". |
| `GroupId` | `int` | ID of the group this channel belongs to. |
| `IsoCode` | `string` | ISO standard code for the channel. |
| `IsoChannelName` | `string` | ISO standard channel name. |
| `UserCode` | `string` | User-defined code. |
| `UserChannelName` | `string` | User-defined channel name. |
| `DASId` | `int` | Data Acquisition System ID. |
| `DASChannelIndex` | `int` | Physical channel index on the DAS. |
| `GroupChannelOrder` | `int` | Ordering within the group. |
| `TestSetupOrder` | `int` | Ordering within the test setup. |
| `SensorId` | `int` | ID of the assigned sensor. |
| `Disabled` | `bool` | Whether the channel is disabled. |
| `LastModified` | `DateTime` | Timestamp of last modification. |
| `LastModifiedBy` | `string` | User who last modified the record. |
---
### IGroupChannel
Primary interface for channel operations, extending `IChannelDbRecord` and `IComparable<IGroupChannel>`. Contains extensive properties and methods for channel configuration.
#### Key Properties
| Member | Type | Description |
|--------|------|-------------|
| `RangeLowG` | `SensorConstants.AvailableRangesLowG` | Low-G range setting. |
| `VoltageInsertionSensor` | `bool` | Indicates if channel has a calibration-less voltage measurement channel (read-only). |
| `RangeModifiableSensorLowG` | `bool` | Whether channel has an embedded range modifiable low-g sensor (read-only). |
| `RangeModifiableSensorARS` | `bool` | Whether channel has an embedded range modifiable ARS sensor (read-only). |
| `AvailableInitialOffsets` | `InitialOffset[]` | Available initial offsets (requires sensor with calibration). |
| `IEPESupport` | `string` | IEPE support status (read-only). |
| `Group` | `IGroup` | The group this channel belongs to. |
| `GroupName` | `string` | Display name of the group. |
| `GroupNameValid` | `bool` | Whether the group name is valid. |
| `IsoCodeValid` | `bool` | Whether ISO code is set. |
| `IsoChannelNameValid` | `bool` | Whether ISO channel name is set. |
| `UserCodeValid` | `bool` | Whether user code is set. |
| `UserChannelNameValid` | `bool` | Whether user channel name is set. |
| `HardwareValid` | `bool` | Whether hardware has been assigned (read-only). |
| `HardwareId` | `string` | Legacy hardware identifier in format `[das serial]:[channel index]`. |
| `TestSampleRate` | `double` | Sample rate of the associated DAS. |
| `SensorValid` | `bool` | Whether a sensor has been assigned (read-only). |
| `IsDisabled` | `bool` | Whether channel should be used for data collection. |
| `CanMoveUp` / `CanMoveDown` | `bool` | UI state for ordering controls. |
| `DeleteShouldBeEnabled` | `bool` | UI state for delete button. |
| `RemoveSensorVisibility` | `System.Windows.Visibility` | UI visibility state. |
| `PasteCommand` | `ICommand` | Command for paste operations. |
| `ChannelSettings` | `IChannelSetting[]` | Array of channel settings (range, polarity, etc.). |
| `Hardware` | `string` | UI display string for hardware. |
| `Sensor` | `string` | UI display string for sensor (read-only). |
| `SensorData` | `ISensorData` | Sensor data object (read-only). |
| `HardwareChannel` | `IHardwareChannel` | Assigned hardware channel (read-only). |
| `DragAndDropItem` | `IDragAndDropItem` | Drag-and-drop item (read-only). |
| `SensorCalibration` | `ISensorCalibration` | Sensor calibration data (read-only). |
| `HasEID` | `bool` | Whether channel has EID (read-only). |
| `Range` | `double` | Range setting value. |
| `Capacity` | `double` | Capacity of the sensor (read-only). |
| `FilterClass` | `IFilterClass` | Filter class setting (FB 13120). |
| `Polarity` | `string` | Polarity setting. |
| `Units` | `string` | Units (read-only). |
| `ZeroMethod` | `ZeroMethodType` | Zero method type. |
| `ZeroMethodStart` / `ZeroMethodEnd` | `double` | Zero method time range. |
| `Sensitivity` | `string` | Sensitivity (read-only). |
| `InitialOffset` | `InitialOffset` | Initial offset setting. |
#### Squib/Digital Output Properties
| Member | Type | Description |
|--------|------|-------------|
| `SquibLimitDuration` | `bool` | Whether squib duration is limited. |
| `SquibDuration` | `double` | Squib duration value. |
| `SquibDelay` | `double?` | Squib delay (nullable for UI purposes - FB 14623). |
| `SquibCurrent` | `double` | Squib current value. |
| `SquibFireMode` | `SquibFireMode` | Fire mode setting. |
| `DigitalOutLimitDuration` | `bool` | Whether digital out duration is limited. |
| `DigitalOutDuration` | `double` | Digital out duration. |
| `DigitalOutDurationMax` | `double` | Maximum allowed digital out duration (FB 28107). |
| `DigitalOutDelay` | `double` | Digital out delay. |
| `DigitalOutputMode` | `DigitalOutputModes` | Output mode setting. |
| `DigitalInputMode` | `DigitalInputModes` | Input mode setting. |
| `ActiveValue` | `string` | Active value setting. |
| `DefaultValue` | `string` | Default value setting. |
#### UART Properties
| Member | Type | Description |
|--------|------|-------------|
| `UartBaudRate` | `uint` | Baud rate. |
| `UartDataBits` | `uint` | Data bits. |
| `UartStopBits` | `StopBits` | Stop bits configuration. |
| `UartParity` | `Parity` | Parity configuration. |
| `UartFlowControl` | `Handshake` | Flow control (read-only, always NONE per FB 30486). |
| `UartDataFormat` | `UartDataFormat` | Data format. |
#### Stream Properties
| Member | Type | Description |
|--------|------|-------------|
| `StreamInUDPAddress` | `string` | UDP address for stream input. |
| `StreamOutUDPProfile` | `UDPStreamProfile` | UDP profile for stream output. |
| `StreamOutUDPAddress` | `string` | UDP address for stream output. |
| `StreamOutUDPTimeChannelId` | `ushort` | Time channel ID for UDP streaming. |
| `StreamOutUDPDataChannelId` | `ushort` | Data channel ID for UDP streaming. |
| `StreamOutUDPTmNSConfig` | `string` | TMNS configuration. |
| `StreamOutIRIGTimeDataPacketIntervalMs` | `ushort` | IRIG data packet interval in ms. |
| `StreamOutTMATSIntervalMs` | `ushort` | TMATS interval while streaming (FB 29987). |
#### Channel Type Detection Properties (all read-only)
| Member | Returns `true` when |
|--------|---------------------|
| `IsAnalog` | Channel has analog sensor assigned (or non-blank without sensor). |
| `IsSquib` | Channel has squib sensor assigned (or non-blank without sensor). |
| `IsDigitalIn` | Channel has digital input sensor assigned (or non-blank without sensor). |
| `IsDigitalOut` | Channel has digital output sensor assigned (or non-blank without sensor). |
| `IsClock` | Channel is from an RTC module. |
| `IsUart` | Channel is from a UART module. |
| `IsStreamIn` | Channel is from a stream-in module. |
| `IsStreamOut` | Channel is from a stream-out module. |
#### Difference Tracking Properties
| Member | Type | Purpose |
|--------|------|---------|
| `IsRangeDifferent` | `bool` | Tracks range differences. |
| `IsFilterClassDifferent` | `bool` | Tracks filter class differences. |
| `IsPolarityDifferent` | `bool` | Tracks polarity differences. |
| `IsZeroMethodDifferent` | `bool` | Tracks zero method differences. |
| `IsZeroMethodStartDifferent` | `bool` | Tracks zero method start differences. |
| `IsZeroMethodEndDifferent` | `bool` | Tracks zero method end differences. |
| `IsInitialOffsetDifferent` | `bool` | Tracks initial offset differences. |
| `IsSquibFireModeDifferent` | `bool` | Tracks squib fire mode differences. |
| `IsSquibDelayDifferent` | `bool` | Tracks squib delay differences. |
| `IsSquibLimitDurationDifferent` | `bool` | Tracks squib limit duration differences. |
| `IsSquibDurationDifferent` | `bool` | Tracks squib duration differences. |
| `IsSquibCurrentDifferent` | `bool` | Tracks squib current differences. |
| `IsDigitalOutputModeDifferent` | `bool` | Tracks digital output mode differences. |
| `IsDigitalOutDelayDifferent` | `bool` | Tracks digital out delay differences. |
| `IsDigitalOutLimitDurationDifferent` | `bool` | Tracks digital out limit duration differences. |
| `IsDigitalOutDurationDifferent` | `bool` | Tracks digital out duration differences. |
| `IsDigitalInputModeDifferent` | `bool` | Tracks digital input mode differences. |
| `IsDefaultValueDifferent` | `bool` | Tracks default value differences. |
| `IsActiveValueDifferent` | `bool` | Tracks active value differences. |
| `BorderShouldShowOutOfDate` | `bool` | UI state for out-of-date indicator. |
#### Methods
| Signature | Description |
|-----------|-------------|
| `void SetHardwareChannel(IHardwareChannel hardwareChannel)` | Assigns a hardware channel to this channel. |
| `void SetSensor(IDragAndDropItem sensor, IChannelSetting[] channelDefaults, bool applySensorDataToBlankChannels)` | Assigns a sensor with optional defaults application. |
| `bool CompareValue(string property)` | Compares a property value. |
| `bool SetDifferent(string property)` | Marks a property as different. |
| `void SetNotDifferent()` | Clears all difference flags. |
| `void SetRange(CACOption option)` | Sets the range based on an option. |
| `bool IsBlank()` | Returns `true` if channel is a new, non-edited channel. |
| `void Clear()` | Clears hardware and sensor assignments. |
| `bool Filter(string term)` | Returns `true` if channel contains the search term. |
| `string GetChannelName(IsoViewMode isoViewMode)` | Returns channel name based on view mode. |
| `string GetChannelCode(IsoViewMode isoViewMode)` | Returns channel code based on view mode. |
| `void Copy(IGroupChannel groupChannel)` | Creates a memory copy from another channel. |
| `void SetSensorCalibration(ISensorCalibration calibration)` | Sets the sensor calibration. |
| `void SetSensorData(ISensorData sensorData, IDragAndDropItem dragAndDropItem, bool decideSettings = false)` | Sets sensor data with optional settings decision. |
| `IFilterClass GetFilterClassFromISOCode(ISoftwareFilter[] filters, string isoCode)` | Gets filter class from ISO code (FB 15574, FB 13120). |
| `void SetSettingsFromSensor(ISensorData sd)` | Sets channel settings from sensor settings. |
| `string GetChangeList(ISensorData sensor)` | Returns list of parameter differences vs sensor. |
#### Other Members
| Member | Type | Description |
|--------|------|-------------|
| `CoerceISOCodeFunc` | `CoerceISOCodeDelegate` | Function for ISO code coercion. |
| `ChannelStatus` | `UIItemStatus` | Status considering completeness and sensor calibration. |
---
## 3. Invariants
1. **Comparability**: `IGroupChannel` implements `IComparable<IGroupChannel>`, implying ordering semantics must be defined (likely by `GroupChannelOrder` or `TestSetupOrder`).
2. **IEPE Support Logic**: `IEPESupport` follows a priority chain:
- If sensor assigned → depends on sensor bridge
- If no sensor but hardware assigned → depends on hardware channel support
- If neither assigned → IEPE is available
3. **Channel Type Detection Fallback**: Properties `IsAnalog`, `IsSquib`, `IsDigitalIn`, `IsDigitalOut` return `true` for non-blank channels even without a sensor assigned. They return `false` only for blank channels.
4. **Initial Offsets Dependency**: `AvailableInitialOffsets` requires a sensor with calibration to be assigned.
5. **Database Mapping**: `IChannelDbRecord` properties are explicitly mapped to database columns via `[Column("...")]` attributes.
6. **Primary Key**: `IChannelDbRecord.Id` is marked with `[Key]` attribute.
---
## 4. Dependencies
### This module depends on:
- `DTS.Common.Enums.Channels` - Channel-related enumerations
- `DTS.Common.Enums

View File

@@ -0,0 +1,69 @@
---
source_files:
- Common/DTS.CommonCore/Interface/CheckChannels/ICheckChannelsView.cs
- Common/DTS.CommonCore/Interface/CheckChannels/ICheckChannelsViewModel.cs
- Common/DTS.CommonCore/Interface/CheckChannels/ICheckChannelsMenuView.cs
- Common/DTS.CommonCore/Interface/CheckChannels/ICheckChannelsMenuViewModel.cs
generated_at: "2026-04-16T12:13:50.837632+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "3a5d65945568970d"
---
# Documentation: CheckChannels Interfaces
## 1. Purpose
This module defines four interfaces for the "CheckChannels" feature within the DTS system, following the Model-View-ViewModel (MVVM) architectural pattern. These interfaces establish contracts for the main CheckChannels view and its associated ribbon menu view, enabling loose coupling between UI components and facilitating dependency injection. The interfaces serve as type markers that extend base view and viewmodel abstractions, allowing the CheckChannels feature to integrate consistently with the broader application framework.
## 2. Public Interface
### ICheckChannelsView
```csharp
namespace DTS.Common.Interface
public interface ICheckChannelsView : IBaseView { }
```
A marker interface for the main CheckChannels view. Inherits from `IBaseView` (defined in `DTS.Common.Base`). No additional members are defined.
### ICheckChannelsViewModel
```csharp
namespace DTS.Common.Interface
public interface ICheckChannelsViewModel : IBaseViewModel { }
```
A marker interface for the CheckChannels viewmodel. Inherits from `IBaseViewModel` (defined in `DTS.Common.Base`). No additional members are defined.
### ICheckChannelsMenuView
```csharp
namespace DTS.Common.Interface
public interface ICheckChannelsMenuView : IRibbonView { }
```
A marker interface for the CheckChannels ribbon menu view. Inherits from `IRibbonView` (defined in `DTS.Common.RibbonControl`). No additional members are defined.
### ICheckChannelsMenuViewModel
```csharp
namespace DTS.Common.Interface
public interface ICheckChannelsMenuViewModel : IRibbonViewModel { }
```
A marker interface for the CheckChannels ribbon menu viewmodel. Inherits from `IRibbonViewModel` (defined in `DTS.Common.RibbonControl`). No additional members are defined.
## 3. Invariants
- All four interfaces are empty marker interfaces; they define no members beyond those inherited from their base interfaces.
- Each view interface has a corresponding viewmodel interface following the naming convention `ICheckChannels[Menu]View` / `ICheckChannels[Menu]ViewModel`.
- The main CheckChannels components inherit from base view/viewmodel types (`IBaseView`, `IBaseViewModel`), while the menu components inherit from ribbon-specific types (`IRibbonView`, `IRibbonViewModel`).
- All interfaces reside in the `DTS.Common.Interface` namespace.
## 4. Dependencies
### This module depends on:
- `DTS.Common.Base` — provides `IBaseView` and `IBaseViewModel` base interfaces
- `DTS.Common.RibbonControl` — provides `IRibbonView` and `IRibbonViewModel` base interfaces
### What depends on this module:
- **Unclear from source alone.** Concrete implementations of these interfaces would exist elsewhere in the codebase, likely in view and viewmodel classes within a CheckChannels feature module. The consumers would typically be dependency injection containers and navigation/routing systems.
## 5. Gotchas
- **Empty marker interfaces**: These interfaces define no custom members. All behavior contracts come from the parent interfaces (`IBaseView`, `IBaseViewModel`, `IRibbonView`, `IRibbonViewModel`). Developers implementing these interfaces must consult those base definitions to understand required members.
- **Separate menu hierarchy**: The `ICheckChannelsMenuView` and `ICheckChannelsMenuViewModel` inherit from ribbon-specific base types rather than the general base types used by the main view/viewmodel pair. This suggests the menu components integrate with a specialized ribbon control system.
- **Purpose unclear from source**: The specific functionality of the "CheckChannels" feature cannot be determined from these interface definitions alone. The name suggests channel verification or monitoring, but the actual behavior is not documented here.

View File

@@ -0,0 +1,47 @@
---
source_files:
- Common/DTS.CommonCore/Interface/CheckTrigger/ICheckTriggerView.cs
- Common/DTS.CommonCore/Interface/CheckTrigger/ICheckTriggerViewModel.cs
generated_at: "2026-04-16T12:07:28.882495+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "b59a55831fe5a086"
---
# Documentation: ICheckTriggerView and ICheckTriggerViewModel
## 1. Purpose
This module defines two marker interfaces, `ICheckTriggerView` and `ICheckTriggerViewModel`, which serve as contracts for the View and ViewModel components of a "CheckTrigger" feature within an MVVM (Model-View-ViewModel) architecture. These interfaces exist to establish type identity and hierarchy within the system, allowing components to be identified as belonging to the CheckTrigger subsystem while inheriting base behavior from core framework types.
## 2. Public Interface
### `ICheckTriggerView`
- **Namespace:** `DTS.Common.Interface`
- **Signature:** `public interface ICheckTriggerView : IBaseView { }`
- **Description:** An empty marker interface extending `IBaseView`. Declares no members of its own; its purpose is purely typological, allowing implementations to be identified as CheckTrigger-specific views.
### `ICheckTriggerViewModel`
- **Namespace:** `DTS.Common.Interface`
- **Signature:** `public interface ICheckTriggerViewModel : IBaseViewModel { }`
- **Description:** An empty marker interface extending `IBaseViewModel`. Declares no members of its own; its purpose is purely typological, allowing implementations to be identified as CheckTrigger-specific view models.
## 3. Invariants
- Any class implementing `ICheckTriggerView` must also fulfill the contract of `IBaseView` (the specifics of which are not visible in the provided source).
- Any class implementing `ICheckTriggerViewModel` must also fulfill the contract of `IBaseViewModel` (the specifics of which are not visible in the provided source).
- Both interfaces are sealed in the sense that they add no additional members beyond their base interfaces; implementers need only satisfy base interface requirements.
## 4. Dependencies
### This module depends on:
- `DTS.Common.Base` — provides `IBaseView` and `IBaseViewModel` base types
### What depends on this module:
- **Unknown from source alone.** No consumers of these interfaces are visible in the provided files.
## 5. Gotchas
- **Empty marker interfaces:** Both interfaces declare zero members. This is a common pattern for type discrimination, but developers should be aware that these interfaces provide no behavioral contracts beyond what their base interfaces define.
- **Base interface contracts unknown:** The actual requirements for implementing these interfaces depend entirely on `IBaseView` and `IBaseViewModel`, which are not included in the provided source. Developers will need to consult those base definitions to understand full implementation requirements.
- **Naming convention:** The "CheckTrigger" naming suggests a specific feature domain, but no documentation or comments in the source explain what "CheckTrigger" represents in the business logic.

View File

@@ -0,0 +1,100 @@
---
source_files:
- Common/DTS.CommonCore/Interface/Communication/ICommunicationReport.cs
- Common/DTS.CommonCore/Interface/Communication/IDASConnectedDevice.cs
- Common/DTS.CommonCore/Interface/Communication/ICommunication_DASInfo.cs
generated_at: "2026-04-16T12:19:03.859448+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "c40d100ec97fea56"
---
# Documentation: DTS.Common.Interface.Communication
## 1. Purpose
This module defines three interfaces for communication-related data structures within the DTS system. `ICommunicationReport` provides a standard contract for reporting communication operation results, including status, user state, and raw data. `IDASConnectedDevice` describes hardware devices connected to a Data Acquisition System (DAS), capturing physical and logical identification properties. `ICommunication_DASInfo` extends DAS communication capabilities to manage connected device discovery, serial/firmware tracking, first-use date tracking, and streaming support detection. These interfaces support auto-discovery and monitoring of DAS-connected hardware (e.g., S6 devices connected to S6DB).
---
## 2. Public Interface
### ICommunicationReport
**Properties:**
| Name | Type | Access | Description |
|------|------|--------|-------------|
| `UserState` | `object` | get/set | Arbitrary user state associated with the communication report. |
| `Result` | `CommunicationConstantsAndEnums.CommunicationResult` | get/set | The result status of the communication operation. |
| `Data` | `byte[]` | get/set | Raw byte data payload from the communication. |
---
### IDASConnectedDevice
**Properties (all read-only):**
| Name | Type | Description |
|------|------|-------------|
| `DeviceType` | `HardwareTypes` | The hardware type of the connected device. |
| `Port` | `int` | The port on the DAS where the device is connected (0-based index). |
| `SpotOnPort` | `int` | The position in the chain on the given port (0-based index). |
| `PhysicalAddress` | `PhysicalAddress` | The MAC address or physical address of the device. |
| `IPAddress` | `string` | The IP address of the device. |
| `SerialNumber` | `string` | The serial number of the device. |
| `Location` | `string` | The location descriptor of the device. |
| `Version` | `string` | The firmware/hardware version of the device. |
---
### ICommunication_DASInfo
**Properties:**
| Name | Type | Access | Description |
|------|------|--------|-------------|
| `ConnectedDevices` | `IDASConnectedDevice[]` | get only | Array of devices currently connected to the DAS. Currently only used by SLICE6DB. |
| `SerialNumbers` | `string[]` | get/set | Array of serial numbers. |
| `FirmwareVersions` | `string[]` | get/set | Array of firmware versions. |
| `FirstUseDate` | `DateTime?` | get/set | Date of first hardware use; `null` indicates hardware has not been used since calibration. Only valid when `IsFirstUseDateSupported` is `true`. |
| `IsFirstUseDateSupported` | `bool` | get/set | Indicates whether hardware supports first use date tracking. Requires firmware storage for user attributes and calibration by software supporting hardware first use. |
| `IsStreamingSupported` | `bool` | get/set | Indicates whether streaming is supported. TSR AIRs can enable/disable via `DISABLE_STREAMING_FEATURE` system attribute. |
**Methods:**
| Signature | Description |
|-----------|-------------|
| `void SetConnectedDevices(IDASConnectedDevice[] devices)` | Sets the `ConnectedDevices` array with devices connected to this DAS. |
| `string StackSerialNumber(int devid)` | Returns the stack serial number for the given device ID. |
---
## 3. Invariants
- **Port and SpotOnPort indexing**: Both `Port` and `SpotOnPort` on `IDASConnectedDevice` are 0-based indices.
- **FirstUseDate validity**: `FirstUseDate` is only meaningful when `IsFirstUseDateSupported` is `true`. A `null` value for `FirstUseDate` indicates the hardware has not been used since calibration.
- **ConnectedDevices mutability**: The `ConnectedDevices` property is read-only; modifications must go through `SetConnectedDevices(IDASConnectedDevice[])`.
- **Streaming support**: `IsStreamingSupported` reflects hardware capability; the actual feature can be controlled via the `DISABLE_STREAMING_FEATURE` system attribute on TSR AIRs.
---
## 4. Dependencies
### This module depends on:
- `DTS.Common.Enums.Communication` — provides `CommunicationConstantsAndEnums.CommunicationResult`
- `DTS.Common.Enums.Hardware` — provides `HardwareTypes` enum
- `System.Net.NetworkInformation` — provides `PhysicalAddress` class
- `System` — provides `DateTime` type
### What depends on this module:
- Not determinable from the provided source files alone. These are interface definitions likely consumed by DAS communication implementations and device discovery services.
---
## 5. Gotchas
- **FirstUseDate null semantics**: A `null` `FirstUseDate` has specific meaning (hardware not used since calibration), not just "unknown" or "uninitialized". Consumers should check `IsFirstUseDateSupported` before relying on `FirstUseDate`.
- **ConnectedDevices limited usage**: The XML comment indicates `ConnectedDevices` is "currently only used by SLICE6DB" — other DAS types may not populate this array.
- **Streaming feature control**: `IsStreamingSupported` indicates hardware capability, but the actual streaming feature can be disabled via the `DISABLE_STREAMING_FEATURE` system attribute on TSR AIRs. The relationship between this property and the system attribute is not fully specified in the source.
- **StackSerialNumber parameter meaning**: The `devid` parameter in `StackSerialNumber(int devid)` lacks documentation; its interpretation (whether 0-based index, hardware ID, or other identifier) is unclear from source alone.

View File

@@ -0,0 +1,206 @@
---
source_files:
- Common/DTS.CommonCore/Interface/Components/IAssemblyView.cs
- Common/DTS.CommonCore/Interface/Components/IAssemblyListView.cs
- Common/DTS.CommonCore/Interface/Components/ITileView.cs
- Common/DTS.CommonCore/Interface/Components/IGroupView.cs
- Common/DTS.CommonCore/Interface/Components/ITileListView.cs
- Common/DTS.CommonCore/Interface/Components/IGroupListView.cs
- Common/DTS.CommonCore/Interface/Components/IAssemblyViewModel.cs
- Common/DTS.CommonCore/Interface/Components/IAssemblyListViewModel.cs
- Common/DTS.CommonCore/Interface/Components/ITileViewModel.cs
- Common/DTS.CommonCore/Interface/Components/IGroupViewModel.cs
- Common/DTS.CommonCore/Interface/Components/ITileListViewModel.cs
- Common/DTS.CommonCore/Interface/Components/IGroupListViewModel.cs
generated_at: "2026-04-16T12:16:00.246337+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "9dfaf004748c958d"
---
# Documentation: View/ViewModel Component Interfaces
## 1. Purpose
This module defines a set of abstraction interfaces for a Model-View-ViewModel (MVVM) architecture, specifically for displaying and managing grouped assembly information in a UI. It provides two parallel interface hierarchies: one in the `DTS.Common.Interface` namespace for assembly-based views, and another in the `DataPro.Common.Interface` namespace for tile/group-based views. These interfaces enable decoupling of UI components from their concrete implementations, supporting view composition patterns where assemblies can be displayed as individual items or grouped lists.
---
## 2. Public Interface
### DTS.Common.Interface Namespace
#### `IAssemblyView`
```csharp
public interface IAssemblyView : IBaseView { }
```
Marker interface extending `IBaseView`. Represents a single assembly view component. No members defined.
#### `IAssemblyListView`
```csharp
public interface IAssemblyListView : IBaseView { }
```
Marker interface extending `IBaseView`. Represents a list container for assembly views. No members defined.
#### `IAssemblyViewModel`
```csharp
public interface IAssemblyViewModel : IBaseViewModel
{
IAssemblyView View { get; set; }
string GroupName { get; set; }
List<AssemblyNameImage> AssemblyList { get; set; }
}
```
ViewModel interface for a single assembly group. Properties:
- `View` - The associated view instance
- `GroupName` - Name identifier for the group
- `AssemblyList` - Collection of `AssemblyNameImage` objects
#### `IAssemblyListViewModel`
```csharp
public interface IAssemblyListViewModel : IBaseViewModel
{
IMainViewModel Parent { get; set; }
IAssemblyListView View { get; set; }
List<IAssemblyView> GroupList { get; set; }
}
```
ViewModel interface for a collection of assembly groups. Properties:
- `Parent` - Reference to the parent `IMainViewModel`
- `View` - The associated list view instance
- `GroupList` - Collection of `IAssemblyView` instances
---
### DataPro.Common.Interface Namespace
#### `ITileView`
```csharp
public interface ITileView : IBaseView { }
```
Marker interface extending `IBaseView`. Represents a tile-based view component. No members defined.
#### `IGroupView`
```csharp
public interface IGroupView : IBaseView { }
```
Marker interface extending `IBaseView`. Represents a group-based view component. No members defined.
#### `ITileListView`
```csharp
public interface ITileListView : IBaseView { }
```
Marker interface extending `IBaseView`. Represents a list container for tile views. No members defined.
#### `IGroupListView`
```csharp
public interface IGroupListView : IBaseView { }
```
Marker interface extending `IBaseView`. Represents a list container for group views. No members defined.
#### `ITileViewModel`
```csharp
public interface ITileViewModel : IBaseViewModel
{
ITileView View { get; set; }
string GroupName { get; set; }
List<AssemblyNameImage> AssemblyList { get; set; }
}
```
ViewModel interface for a tile-based assembly group. Properties:
- `View` - The associated tile view instance
- `GroupName` - Name identifier for the group
- `AssemblyList` - Collection of `AssemblyNameImage` objects
#### `IGroupViewModel`
```csharp
public interface IGroupViewModel : IBaseViewModel
{
IGroupView View { get; set; }
string GroupName { get; set; }
List<AssemblyNameImage> AssemblyList { get; set; }
}
```
ViewModel interface for a group-based assembly display. Properties:
- `View` - The associated group view instance
- `GroupName` - Name identifier for the group
- `AssemblyList` - Collection of `AssemblyNameImage` objects
#### `ITileListViewModel`
```csharp
public interface ITileListViewModel : IBaseViewModel
{
IMainViewModel Parent { get; set; }
ITileListView View { get; set; }
List<ITileView> GroupList { get; set; }
}
```
ViewModel interface for a collection of tile groups. Properties:
- `Parent` - Reference to the parent `IMainViewModel`
- `View` - The associated tile list view instance
- `GroupList` - Collection of `ITileView` instances
#### `IGroupListViewModel`
```csharp
public interface IGroupListViewModel : IBaseViewModel
{
IMainViewModel Parent { get; set; }
IGroupListView View { get; set; }
List<IGroupView> GroupList { get; set; }
}
```
ViewModel interface for a collection of groups. Properties:
- `Parent` - Reference to the parent `IMainViewModel`
- `View` - The associated group list view instance
- `GroupList` - Collection of `IGroupView` instances
---
## 3. Invariants
- All View interfaces (`IAssemblyView`, `IAssemblyListView`, `ITileView`, `IGroupView`, `ITileListView`, `IGroupListView`) must inherit from `IBaseView`.
- All ViewModel interfaces must inherit from `IBaseViewModel`.
- The `View` property on a ViewModel must reference an instance of its corresponding View interface type (e.g., `IAssemblyViewModel.View` must be of type `IAssemblyView`).
- List ViewModels maintain a parent-child relationship: `IAssemblyListViewModel`, `ITileListViewModel`, and `IGroupListViewModel` must have a valid `Parent` reference to `IMainViewModel`.
- The `GroupList` property on list ViewModels must contain elements of the corresponding single-item View interface type.
---
## 4. Dependencies
### External Dependencies (referenced but not defined in source):
- **`DTS.Common.Base.IBaseView`** - Base interface for all views in the DTS namespace
- **`DTS.Common.Base.IBaseViewModel`** - Base interface for all ViewModels in the DTS namespace
- **`DataPro.Common.Base.IBaseView`** - Base interface for all views in the DataPro namespace
- **`DataPro.Common.Base.IBaseViewModel`** - Base interface for all ViewModels in the DataPro namespace
- **`AssemblyNameImage`** - Data structure representing assembly information (type definition not provided)
- **`IMainViewModel`** - Parent ViewModel interface (type definition not provided)
### Namespace Dependencies:
- `System.Collections.Generic` - For `List<T>` usage
- `System.Collections.ObjectModel` - Imported in DataPro ViewModel files but not actively used
- `System.Reflection` - Imported in DataPro ViewModel files but not actively used
---
## 5. Gotchas
### Namespace Inconsistency
The codebase contains two parallel interface hierarchies with inconsistent namespace naming:
- `DTS.Common.Interface` vs `DataPro.Common.Interface`
- `DTS.Common.Base` vs `DataPro.Common.Base`
This suggests either an ongoing refactoring, a legacy migration, or intentional separation between two subsystems. **The relationship between these two namespace families is unclear from source alone.**
### Unused Imports
The following files import namespaces that are never used in the interface definitions:
- `ITileViewModel.cs` - imports `System.Collections.ObjectModel` and `System.Reflection`
- `IGroupViewModel.cs` - imports `System.Collections.ObjectModel` and `System.Reflection`
- `ITileListViewModel.cs` - imports `System.Collections.ObjectModel`, `System.Reflection`, and `System`
- `IGroupListViewModel.cs` - imports `System.Collections.ObjectModel`, `System.Reflection`, and `System`
### Structural Duplication
`ITileViewModel` and `IGroupViewModel` have identical member signatures, differing only in their View property types (`ITileView` vs `IGroupView`). Similarly, `ITileListViewModel` and `IGroupListViewModel` are structurally identical. This may indicate an opportunity for generic abstraction or consolidation.
### Missing Type Definitions
The types `AssemblyNameImage` and `IMainViewModel` are referenced but not defined in the provided source files. Their structure and contracts cannot be documented from the available information.

View File

@@ -0,0 +1,105 @@
---
source_files:
- Common/DTS.CommonCore/Interface/Connection/IConnection.cs
generated_at: "2026-04-16T12:12:24.920785+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "a6aead5143a016b8"
---
# Documentation: IConnection Interface
## 1. Purpose
The `IConnection` interface defines a comprehensive abstraction for network socket connections within the DTS system. It provides a unified API for both client and server-side connection management, supporting connection lifecycle operations (create, connect, disconnect, dispose), bidirectional data transfer, and a "soft disconnect" mechanism for temporarily releasing connections with the expectation of reconnecting. The interface implements the Asynchronous Programming Model (APM) pattern for most operations, with one Task-based async method (`SendAsync`), and includes keep-alive monitoring capabilities.
## 2. Public Interface
### Interface Declaration
```csharp
public interface IConnection : IDisposable
```
### Properties
| Property | Signature | Description |
|----------|-----------|-------------|
| `IsSoftDisconnected` | `bool IsSoftDisconnected { get; }` | Returns `true` if the unit is soft disconnected (connected then voluntarily disconnected with expectation of reconnecting). |
| `Flags` | `System.Net.Sockets.SocketFlags Flags { get; set; }` | Gets or sets socket flags for send/receive operations. |
| `ConnectString` | `string ConnectString { get; }` | Returns the connection string associated with this connection. |
| `Connected` | `bool Connected { get; }` | Returns the current connection state. |
### Events
| Event | Signature | Description |
|-------|-----------|-------------|
| `OnDisconnected` | `event EventHandler OnDisconnected` | Raised when the connection is disconnected. |
### Methods - Connection Lifecycle
| Method | Signature | Description |
|--------|-----------|-------------|
| `Create` | `void Create(string connectString)` | Initializes the connection using the specified connection string. |
| `Create` | `void Create(string connectString, string hostIPAddress)` | Initializes the connection using the specified connection string and host IP address. |
| `SoftDisconnect` | `void SoftDisconnect()` | Performs a voluntary disconnect with the intention of reconnecting later. |
| `SoftConnect` | `void SoftConnect()` | Reconnects a soft disconnected unit. |
| `KeepAliveErrorReceived` | `void KeepAliveErrorReceived()` | Indicates that the device has not received a timely response to keep-alive. |
| `GetConnectionData` | `string GetConnectionData()` | Returns connection data as a string. |
### Methods - Server Operations
| Method | Signature | Description |
|--------|-----------|-------------|
| `Bind` | `void Bind(int port)` | Binds the connection to a specific port. |
| `Listen` | `void Listen(int backlog)` | Starts listening for incoming connections with the specified backlog. |
| `BeginAccept` | `IAsyncResult BeginAccept(AsyncCallback callback, object state)` | Begins an asynchronous operation to accept an incoming connection. |
| `EndAccept` | `IConnection EndAccept(IAsyncResult asyncResult)` | Completes the asynchronous accept operation and returns the accepted `IConnection`. |
### Methods - Client Connection Operations
| Method | Signature | Description |
|--------|-----------|-------------|
| `BeginConnect` | `IAsyncResult BeginConnect(AsyncCallback callback, object callbackObject)` | Begins an asynchronous connection attempt. |
| `EndConnect` | `void EndConnect(IAsyncResult ar)` | Completes the asynchronous connect operation. |
| `BeginDisconnect` | `IAsyncResult BeginDisconnect(bool reuseSocket, AsyncCallback callback, object state)` | Begins an asynchronous disconnect operation. |
| `EndDisconnect` | `void EndDisconnect(IAsyncResult asyncResult)` | Completes the asynchronous disconnect operation. |
### Methods - Data Transfer
| Method | Signature | Description |
|--------|-----------|-------------|
| `SendAsync` | `Task<int> SendAsync(byte[] sendBuffer, int bufferStartOffset, int bufferSizeToSend)` | Asynchronously sends data and returns the number of bytes sent. Uses TAP pattern. |
| `BeginSend` | `IAsyncResult BeginSend(byte[] sendBuffer, int bufferStartOffset, int bufferSizeToSend, AsyncCallback callback, object callbackObject)` | Begins an asynchronous send operation. Uses APM pattern. |
| `EndSend` | `int EndSend(IAsyncResult ar)` | Completes the asynchronous send operation and returns the number of bytes sent. |
| `BeginReceive` | `IAsyncResult BeginReceive(byte[] receiveBuffer, int bufferStartOffset, int maxSizeToReceive, AsyncCallback callback, object callbackObject)` | Begins an asynchronous receive operation. |
| `EndReceive` | `int EndReceive(IAsyncResult ar)` | Completes the asynchronous receive operation and returns the number of bytes received. |
## 3. Invariants
- **Disposable Contract**: All implementations must properly implement `IDisposable`, ensuring resources (sockets, buffers, etc.) are released when disposed.
- **APM Pattern Pairing**: Every `Begin*` method must have a corresponding `End*` call to complete the operation and retrieve results. Calling `End*` without a preceding `Begin*`, or calling `End*` multiple times on the same `IAsyncResult`, is undefined behavior.
- **Soft Disconnect State Consistency**: `IsSoftDisconnected` should only return `true` after `SoftDisconnect()` has been called and before `SoftConnect()` is called. The soft disconnect state implies a prior successful connection.
- **Connection State Before Operations**: Data transfer methods (`SendAsync`, `BeginSend`, `BeginReceive`) require an active connection; behavior is undefined if called on a disconnected unit.
- **Create Before Use**: `Create()` must be called before connection operations (`BeginConnect`, `Bind`, etc.).
## 4. Dependencies
### External Dependencies (from imports)
- `System` - Core .NET types (`IAsyncResult`, `AsyncCallback`, `EventHandler`, `IDisposable`)
- `System.Threading.Tasks` - `Task<T>` for `SendAsync`
- `System.Net.Sockets.SocketFlags` - Socket configuration flags
### Dependents
- Unknown from this source file alone. Implementations of this interface and consumers would be defined elsewhere in the codebase.
## 5. Gotchas
1. **Mixed Async Patterns**: The interface uses both APM (`Begin*`/`End*` methods) and TAP (`SendAsync` returning `Task<int>`) patterns. This inconsistency may cause confusion when choosing which method to use. Note that `SendAsync` is the only TAP-style method; all other async operations use APM.
2. **Server and Client Methods in One Interface**: The interface combines server-side methods (`Bind`, `Listen`, `BeginAccept`, `EndAccept`) with client-side methods (`BeginConnect`, `EndConnect`). Implementations may need to handle scenarios where inappropriate methods are called (e.g., calling `Listen` on a client connection).
3. **Commented-Out Rate Methods**: The source contains commented-out methods `GetCurrentUploadRate()` and `GetCurrentDownloadRate()`, suggesting bandwidth monitoring was planned or removed. Do not assume these exist.
4. **Soft Disconnect vs. Regular Disconnect**: The interface provides `SoftDisconnect()`/`SoftConnect()` alongside `BeginDisconnect()`/`EndDisconnect()`. The relationship between these two disconnect mechanisms is not specified—whether `BeginDisconnect` affects `IsSoftDisconnected` state is unclear from the source alone.
5. **KeepAliveErrorReceived is a Method, Not an Event**: Despite the naming convention suggesting an event handler, `KeepAliveErrorReceived()` is a void method. Its intended usage (called by whom, when, and what it should do) is not specified in the source.

View File

@@ -0,0 +1,119 @@
---
source_files:
- Common/DTS.CommonCore/Interface/CustomChannels/ICustomChannelsView.cs
- Common/DTS.CommonCore/Interface/CustomChannels/ICustomChannelsExportView.cs
- Common/DTS.CommonCore/Interface/CustomChannels/ICustomChannelsImportView.cs
- Common/DTS.CommonCore/Interface/CustomChannels/ICustomChannelModel.cs
- Common/DTS.CommonCore/Interface/CustomChannels/ICustomChannelsViewModel.cs
generated_at: "2026-04-16T12:10:34.879323+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "d441dada7c96f903"
---
# Custom Channels Interface Module Documentation
## 1. Purpose
This module defines the contract interfaces for a Custom Channels feature, implementing a Model-View-ViewModel (MVVM) architecture. It provides abstractions for managing custom channel configurations, including the ability to import and export channel definitions. The interfaces decouple the presentation layer from business logic, enabling view models to orchestrate import/export operations while views remain passive implementations of `IBaseView` and `IBaseViewModel` contracts.
---
## 2. Public Interface
### `ICustomChannelsView`
**Namespace:** `DTS.Common.Interface`
**Inheritance:** `IBaseView`
A marker interface with no members. Identifies views responsible for displaying custom channels.
---
### `ICustomChannelsExportView`
**Namespace:** `DTS.Common.Interface.CustomChannels`
**Inheritance:** `IBaseView`
A marker interface with no members. Identifies views handling the export workflow for custom channels.
---
### `ICustomChannelsImportView`
**Namespace:** `DTS.Common.Interface.CustomChannels`
**Inheritance:** `IBaseView`
A marker interface with no members. Identifies views handling the import workflow for custom channels.
---
### `ICustomChannelModel`
**Namespace:** `DTS.Common.Interface.CustomChannels`
Represents a single custom channel item with selection state.
| Property | Type | Access | Description |
|----------|------|--------|-------------|
| `Name` | `string` | get | The identifier or display name of the custom channel. |
| `Included` | `bool` | get, set | Indicates whether this channel is selected for an operation (e.g., export). |
---
### `ICustomChannelsViewModel`
**Namespace:** `DTS.Common.Interface.CustomChannels`
**Inheritance:** `IBaseViewModel`
Orchestrates custom channel import/export operations.
**Properties:**
| Property | Type | Access | Description |
|----------|------|--------|-------------|
| `ImportView` | `ICustomChannelsImportView` | get, set | The view instance for import operations. |
| `ExportView` | `ICustomChannelsExportView` | get, set | The view instance for export operations. |
| `ExportFileName` | `string` | get, set | Target file path for export operations. |
| `ImportFileName` | `string` | get, set | Source file path for import operations. |
| `AllCustomChannels` | `ObservableCollection<ICustomChannelModel>` | get | Collection of all available custom channel models. |
**Methods:**
| Method | Signature | Description |
|--------|-----------|-------------|
| `Unset` | `void Unset()` | Clears or resets the view model state. |
| `OnSetActive` | `void OnSetActive(bool bImport)` | Called when the view becomes active; `bImport` indicates import mode (true) vs export mode (false). |
| `ReadImportFile` | `void ReadImportFile()` | Reads and parses the file specified by `ImportFileName`. |
| `SelectAll` | `void SelectAll()` | Sets `Included` to `true` for all items in `AllCustomChannels`. |
| `ClearSelection` | `void ClearSelection()` | Sets `Included` to `false` for all items in `AllCustomChannels`. |
| `Export` | `void Export()` | Executes the export operation using current selection and `ExportFileName`. |
| `Import` | `void Import()` | Executes the import operation using current selection and `ImportFileName`. |
---
## 3. Invariants
- `ICustomChannelModel.Name` is read-only; once set by the implementation, the name cannot be changed through this interface.
- `AllCustomChannels` is read-only at the interface level; consumers cannot replace the collection, only modify its contents or item properties.
- All view interfaces (`ICustomChannelsView`, `ICustomChannelsExportView`, `ICustomChannelsImportView`) must be assignable to `IBaseView`.
- `ICustomChannelsViewModel` must be assignable to `IBaseViewModel`.
- The `bImport` parameter in `OnSetActive` uses a boolean to distinguish between import (true) and export (false) modes.
---
## 4. Dependencies
**This module depends on:**
- `DTS.Common.Base` — Provides `IBaseView` and `IBaseViewModel` base contracts.
- `System.Collections.ObjectModel` — Provides `ObservableCollection<T>` used for `AllCustomChannels`.
**What depends on this module:**
- Cannot be determined from source alone. Concrete implementations of these interfaces, as well as consumers of `ICustomChannelsViewModel`, would exist elsewhere in the codebase.
---
## 5. Gotchas
1. **Namespace inconsistency:** `ICustomChannelsView` resides in `DTS.Common.Interface`, while all other interfaces in this feature set reside in `DTS.Common.Interface.CustomChannels`. This may cause confusion or require additional using directives.
2. **Marker interfaces:** `ICustomChannelsView`, `ICustomChannelsExportView`, and `ICustomChannelsImportView` define no members. Their utility appears to be type identification for view resolution or dependency injection—verify the actual usage pattern in the consuming codebase.
3. **Import/Export coupling:** The `ICustomChannelsViewModel` manages both import and export workflows. The `OnSetActive(bool bImport)` method toggles behavior based on a boolean flag, which may complicate testing or extension if the two workflows diverge.
4. **File I/O abstraction:** The interfaces expose file names as strings (`ImportFileName`, `ExportFileName`) with no validation hints. It is unclear whether implementations validate file existence, extensions, or permissions before `ReadImportFile()`, `Export()`, or `Import()` are called.

View File

@@ -0,0 +1,69 @@
---
source_files:
- Common/DTS.CommonCore/Interface/CustomerDetails/ICustomerDetailsView.cs
- Common/DTS.CommonCore/Interface/CustomerDetails/ICustomerDetailsViewModel.cs
generated_at: "2026-04-16T12:19:49.445469+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "b07af412c78e07b1"
---
# Documentation: Customer Details Interfaces
## 1. Purpose
This module defines two marker interfaces—`ICustomerDetailsView` and `ICustomerDetailsViewModel`—that establish type identity for customer details components within a Model-View-ViewModel (MVVM) architecture. These interfaces exist to provide a contract for customer-specific views and view models, enabling type-safe binding, dependency injection, and navigation patterns while inheriting core behaviors from base interfaces in the `DTS.Common.Base` namespace.
---
## 2. Public Interface
### `ICustomerDetailsView`
- **Namespace:** `DTS.Common.Interface`
- **Inheritance:** `IBaseView` (from `DTS.Common.Base`)
- **Signature:**
```csharp
public interface ICustomerDetailsView : IBaseView { }
```
- **Behavior:** Empty marker interface. Any concrete view implementing this interface signals that it represents a customer details screen. All actual behavior and members are inherited from `IBaseView`.
### `ICustomerDetailsViewModel`
- **Namespace:** `DTS.Common.Interface`
- **Inheritance:** `IBaseViewModel` (from `DTS.Common.Base`)
- **Signature:**
```csharp
public interface ICustomerDetailsViewModel : IBaseViewModel { }
```
- **Behavior:** Empty marker interface. Any concrete view model implementing this interface signals that it provides the presentation logic for a customer details view. All actual behavior and members are inherited from `IBaseViewModel`.
---
## 3. Invariants
- **Type identity guarantee:** Any class implementing `ICustomerDetailsView` or `ICustomerDetailsViewModel` must also satisfy the contracts of `IBaseView` or `IBaseViewModel` respectively.
- **No additional members:** Neither interface defines its own properties, methods, or events; they rely entirely on their base interfaces for functionality.
- **Naming convention:** The interfaces follow a naming pattern suggesting a 1:1 correspondence between `ICustomerDetailsView` and `ICustomerDetailsViewModel`.
**Note:** Specific invariants regarding `IBaseView` and `IBaseViewModel` cannot be determined from the provided source files.
---
## 4. Dependencies
### This module depends on:
- `DTS.Common.Base` — Provides `IBaseView` and `IBaseViewModel` base interfaces.
### What depends on this module:
- Cannot be determined from the provided source files alone. Likely consumers include:
- Concrete view implementations (e.g., WinForms, WPF, or web views displaying customer details)
- Concrete view model implementations for customer details
- Navigation or routing services that resolve views by interface type
- Dependency injection configurations
---
## 5. Gotchas
- **Empty marker interfaces:** Both interfaces define no members of their own. If `IBaseView` and `IBaseViewModel` also lack meaningful members, these interfaces serve purely as type markers. This design is intentional for type discrimination but may confuse developers expecting explicit contracts.
- **Base interface contracts unknown:** The actual capabilities and requirements of these interfaces are entirely determined by `IBaseView` and `IBaseViewModel`. Developers must consult those base definitions to understand what members must be implemented.
- **Potential tight coupling to base types:** Any changes to `IBaseView` or `IBaseViewModel` will ripple to all implementers of these customer details interfaces.

View File

@@ -0,0 +1,429 @@
---
source_files:
- Common/DTS.CommonCore/Interface/DASFactory/IAutoArmed.cs
- Common/DTS.CommonCore/Interface/DASFactory/ITiltSensorCalAware.cs
- Common/DTS.CommonCore/Interface/DASFactory/IRangeBandwidthLimited.cs
- Common/DTS.CommonCore/Interface/DASFactory/IAutoArmStatus.cs
- Common/DTS.CommonCore/Interface/DASFactory/ITimeSynchronization.cs
- Common/DTS.CommonCore/Interface/DASFactory/IConnectedEthernetDevice.cs
- Common/DTS.CommonCore/Interface/DASFactory/IDASConfigurationArg.cs
- Common/DTS.CommonCore/Interface/DASFactory/IRealtime.cs
- Common/DTS.CommonCore/Interface/DASFactory/IUDPQATSEntry.cs
- Common/DTS.CommonCore/Interface/DASFactory/IDASFactory.cs
- Common/DTS.CommonCore/Interface/DASFactory/ICommunication.cs
- Common/DTS.CommonCore/Interface/DASFactory/IDiscoveredDevice.cs
- Common/DTS.CommonCore/Interface/DASFactory/IAnalogInputDASChannel.cs
- Common/DTS.CommonCore/Interface/DASFactory/IDASCommunication.cs
generated_at: "2026-04-16T12:19:30.502497+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "5d1420792c49604c"
---
# DASFactory Interfaces Documentation
## 1. Purpose
This module defines the core abstraction layer for the Data Acquisition System (DAS) Factory pattern. It provides interfaces for device discovery, hardware communication, channel configuration, real-time data streaming, and diagnostics across multiple DAS hardware types (SLICE, TDAS, TSR, etc.). The interfaces enable polymorphic treatment of diverse hardware while exposing type-specific capabilities through optional interface implementation. This module serves as the contract layer between high-level application services and low-level hardware drivers.
---
## 2. Public Interface
### IAutoArmed
```csharp
bool AutoArmed { get; set; }
```
Simple marker interface for auto-arming capability.
### ITiltSensorCalAware
```csharp
double[] TiltSensorCals { get; }
```
Exposes tilt sensor calibration values. Returns an array of calibration coefficients.
### IRangeBandwidthLimited
```csharp
bool RangeBandwidthLimited { get; }
```
Read-only flag indicating if the device has range/bandwidth limitations applied.
### IAutoArmStatus
```csharp
DFConstantsAndEnums.CommandStatus AutoArmStatus { get; set; }
```
Tracks the command status of auto-arm operations using `DFConstantsAndEnums.CommandStatus` enum.
### ITimeSynchronization
```csharp
bool SupportsTimeSynchronization { get; }
DateTime SystemBaseTime { get; }
```
Indicates time synchronization support and provides the system base time reference.
### IConnectedEthernetDevice
```csharp
string MACAddress { get; }
int Port { get; }
string SerialNumber { get; set; }
```
Represents an ethernet-connected device with network identification properties.
### IDASConfigurationArg
```csharp
IDASCommunication DAS { get; }
bool BlankConfigurationRead { get; }
bool ConfigurationFailedValidation { get; }
```
Argument interface for configuration events. Used per comment "17872 Use DASConfig XMLs on disk when performing an emergency download with DAS that have blank filestore(s)".
### IRealTime
```csharp
List<int> RealtimeDASChannels { get; set; }
List<double> TiltAxisData { get; set; }
string UDPStreamAddress { get; }
```
Real-time data streaming interface. `TiltAxisData` provides Slice6 Axis 1/2/3 (X/Y/Z) tilt in degrees. `UDPStreamAddress` provides the S6/S6A realtime UDP stream endpoint.
### IUDPQATSEntry
Extensive interface for UDP QATS (Quick Acquisition and Telemetry System) entries:
```csharp
string ResponseHostMac { get; }
string ResponseClientMacAddress { get; }
string SerialNumber { get; }
byte ArmState { get; }
byte ArmMode { get; }
byte Started { get; }
byte Triggered { get; }
byte FaultFlags { get; }
uint SampleRate { get; }
ulong TotalSamples { get; }
ulong CurrentSample { get; }
ushort EventNumber { get; }
ulong FaultSampleNumber { get; }
ushort LegacyFaultFlags { get; }
float InputVoltage { get; }
float BackupVoltage { get; }
float BatterySOC { get; }
ulong EstimateMaxSamples { get; }
short TiltSensorCh1 { get; }
short TiltSensorCh2 { get; }
short TiltSensorCh3 { get; }
float SysTempC { get; }
byte SyncClockEnable { get; }
byte ADCExtClockSyncEnable { get; }
byte SyncClockStatus { get; }
byte ADCExtClockSyncStatus { get; }
ulong EventTriggerSample { get; }
float[] ChannelOffsetMV { get; }
float[] ShuntDeviationPercent { get; }
DateTime Timestamp { get; }
```
### IDASFactory
Primary factory interface for DAS device management:
```csharp
bool PingAll();
string Language { get; set; }
void TakeOwnership();
bool AllowSDBCommandPort { get; set; }
double S6ConnectNewTimeout { get; set; }
string[] SliceDBHostNames { get; set; }
string[] GetConnectedDevices();
string[] TDASHostNames { get; set; }
string[] TDASSerialPortNames { get; set; }
string TDASSerialRackSerialNumber { get; set; }
List<IDASCommunication> GetDASList();
List<IDASCommunication> GetSortedDASList();
List<ICommunication> GetDevList();
void DetachAllDevices(bool detachUSB = false);
void Refresh(ActionCompleteDelegate action);
int MultiCastAutoDiscoveryDefaultTimeoutMS { get; set; }
SortableBindingList<IDiscoveredDevice> AutoDiscoverMulticast(bool discoverParents = true);
```
### ICommunication
Low-level communication interface extending `IComparable<ICommunication>` and `IComparable<string>`:
```csharp
IConnection Transport { get; set; }
void SetupReader();
int ReceiveBufferSize { get; set; }
string SerialNumber { get; set; }
string FirmwareVersion { get; set; }
byte ProtocolVersion { get; set; }
ICommunication_DASInfo DASInfo { get; set; }
Dictionary<DFConstantsAndEnums.ProtocolLimitedCommands, byte> MinimumProtocols { get; set; }
void InitMinProto();
bool IsCommandSupported(DFConstantsAndEnums.ProtocolLimitedCommands command);
byte GetMinProto(DFConstantsAndEnums.ProtocolLimitedCommands command);
event EventHandler OnDisconnected;
string ConnectString { get; }
bool Connected { get; }
void Connect(string ConnectString, CommunicationConstantsAndEnums.CommunicationCallback Callback, object CallbackObject, int CallbackTimeout, string ipAddress);
void Disconnect(bool reuseSocket, CommunicationConstantsAndEnums.CommunicationCallback Callback, object CallbackObject, int CallbackTimeout);
void Close(int Timeout);
void Flush(int Timeout);
bool ExecuteIsBusy { get; set; }
void Execute(byte[] byteData, CommunicationConstantsAndEnums.CommunicationCallback Callback, object CallbackObject, int CallbackTimeout);
void PseudoExecute(byte[] byteData, CommunicationConstantsAndEnums.CommunicationCallback Callback, object CallbackObject, int CallbackTimeout);
byte[] SyncExecute(byte[] byteData, int Timeout);
void Cancel();
void ForceCancel();
bool IsCanceled();
void ClearCancel();
ManualResetEvent CancelEvent { get; }
```
### IDiscoveredDevice
Interface for multicast-discovered devices:
```csharp
string Serial { get; set; }
MultiCastDeviceClasses DevClass { get; set; }
string Mac { get; set; }
IDiscoveredDevice Parent { get; set; }
bool IsParent(IDiscoveredDevice possibleChild);
int GetPort(IDiscoveredDevice device);
int GetSlot(IDiscoveredDevice child, Dictionary<string, IDiscoveredDevice> lookup);
int GetSlotOnPort(IDiscoveredDevice child, Dictionary<string, IDiscoveredDevice> lookup);
bool IsModule { get; set; }
int Port { get; set; }
int PositionOnDistributor { get; set; }
int PositionOnChain { get; set; }
bool Dhcp { get; set; }
string Ip { get; set; }
string Subnet { get; set; }
string Gateway { get; set; }
string Dns { get; set; }
bool Connected { get; set; }
string ConnectedIp { get; set; }
string ConnectedHost { get; set; }
ushort SystemId { get; set; }
string Location { get; set; }
string FirmwareVersion { get; set; } // Format: [Product Name]-[FW/BL]-[REL/DBG]-[Board #]-[FW Ver Name]
string BuildId { get; set; }
IConnectedEthernetDevice[] Connections { get; set; }
```
### IAnalogInputDASChannel
Comprehensive interface for analog input channel configuration (100+ members). Key properties include:
**Bridge Configuration:**
```csharp
SensorConstants.BridgeType TypeOfBridge { get; set; }
SensorConstants.BridgeType[] SupportedBridges { get; set; }
double BridgeResistanceOhms { get; set; }
```
**Sensor Properties:**
```csharp
double SensorCapacityEU { get; set; }
double SensorCapacity { get; set; }
string SensorPolarity { get; set; }
double DesiredRangeWithHeadroomEU { get; set; }
double SensitivityMilliVoltsPerEU { get; set; }
double SensitivityMilliVoltsPerEUNormalized { get; }
bool IsProportionalToExcitation { get; set; }
bool IsInverted { get; set; }
```
**Channel Identification:**
```csharp
string OriginalChannelName { get; set; }
string ChannelName2 { get; set; }
string ChannelId { get; set; }
string ChannelGroupName { get; set; }
string HardwareChannelName { get; set; }
```
**Excitation:**
```csharp
ExcitationVoltageOptions.ExcitationVoltageOption Excitation { get; set; }
ExcitationVoltageOptions.ExcitationVoltageOption[] SupportedExcitation { get; set; }
bool IsSupported(ExcitationVoltageOptions.ExcitationVoltageOption o);
```
**Digital Input:**
```csharp
DigitalInputModes[] SupportedDigitalInputModes { get; set; }
DigitalInputModes DigitalMode { get; set; }
string DIUnits { get; set; }
bool DigitalInputChannel { get; set; }
```
**Zero Configuration:**
```csharp
ZeroMethodType ZeroMethod { get; set; }
double ZeroAverageStartSeconds { get; set; }
double ZeroAverageStopSeconds { get; set; }
double InitialEU { get; set; }
string InitialOffset { get; set; }
```
**Diagnostics:**
```csharp
bool ShuntIsEnabled { get; set; }
int ShuntTargetADC { get; set; }
bool VoltageInsertionCheckEnabled { get; set; }
bool RemoveOffset { get; set; }
bool VerifyOffset { get; set; }
double OffsetToleranceLowMilliVolts { get; set; }
double OffsetToleranceHighMilliVolts { get; set; }
IDiagnosticResult Diagnostics { get; }
IDiagnosticResult DiagnosticInformation { get; }
```
**Level Triggering:**
```csharp
double? TriggerBelowThresholdEu { get; set; }
double? TriggerAboveThresholdEu { get; set; }
bool AlreadyLevelTriggered { get; set; }
double MeasuredEULevelTriggerCheck { get; set; }
```
**XML Serialization:**
```csharp
void WriteElementEnd(XmlWriter writer);
void WriteXml(XmlWriter writer);
void WriteXmlCRC32(XmlWriter writer);
string GetSupportedExcitationSerialized();
string GetSupportedDigitalInputModesSerialized();
string GetSupportedBridgesSerialized();
```
### IDASCommunication
Primary interface for DAS unit interaction. Extends multiple capability interfaces:
- `IConfiguration`, `IDiagnos`, `ITriggerCheck`, `IRealTime`, `IArmStatus`, `IDownload`, `IInformation`
- `IComparable<IDASCommunication>`, `IDisposable`, `IAutoArmStatus`, `IAutoArmed`, `IRangeBandwidthLimited`, `ITimeSynchronization`
**Key Properties:**
```csharp
ExcitationStatus ExcitationStatus { get; set; }
DateTime? FirstUseDate { get; set; }
bool IsFirstUseDateSupported { get; set; }
bool IsStreamingSupported { get; set; }
HardwareTypes GetHardwareType();
int RecordId { get; set; }
string SerialNumber { get; set; }
string FirmwareVersion { get; }
bool DiagnosticsHasBeenRun { get; set; }
bool ConfigureHasBeenRun { get; set; }
string MACAddress { get; set; }
string[] DownstreamMACAddresses { get; set; }
```
**Voltage Thresholds:**
```csharp
float InputLowVoltage { get; set; }
float InputMediumVoltage { get; set; }
float InputHighVoltage { get; set; }
float BatteryLowVoltage { get; set; }
float BatteryMediumVoltage { get; set; }
float BatteryHighVoltage { get; set; }
double MinimumValidInputVoltage { get; set; }
double MaximumValidInputVoltage { get; set; }
double MinimumValidBatteryVoltage { get; set; }
double MaximumValidBatteryVoltage { get; set; }
```
**Channel & Memory:**
```csharp
int NumberOfConfiguredChannels();
int NumberOfChannels();
long MaxMemory();
int MaxModules { get; set; }
```
**Sample Rates:**
```csharp
uint MinSampleRate();
uint MaxSampleRate(int numberOfConfiguredChannels);
uint MaxAAFilterRate();
```
**Capability Queries:**
```csharp
bool SupportsAutoArm();
bool SupportsLevelTrigger();
bool SupportsRealtime();
bool SupportsMultipleEvents();
bool SupportsTriggerInversion();
bool SupportsStartInversion();
bool SupportsHardwareInputCheck();
bool SupportsMultipleSampleRealtime();
bool SupportsIndividualChannelRealtimeStreaming { get; }
bool InvertTrigger { set; }
bool InvertStart { get; set; }
bool IgnoreShortedStart { get; set; }
bool IgnoreShortedTrigger { get; set; }
```
**Hardware Type Checks:**
```csharp
bool IsEthernetDistributor();
bool IsSlice6Distributor();
bool IsBattery();
bool IsTSRAIR();
bool IsSlice6Air();
bool ControlsDAQ();
bool IsStreamingSupported { get; set; }
```
**Operations:**
```csharp
void ReadFirstUseDate();
void SetIsStreamingSupported(bool supported = false);
bool ConnectionCheck();
double[] GetNominalRanges(SensorConstants.BridgeType bridge);
bool CheckAAF(float rate);
bool RequireDiagnosticRateMatchSampleRate();
ulong GetPhaseShiftSamples(uint ModuleIndex, double ActualSampleRate, uint HardwareAAF, ulong originalT0);
bool GetCanCheckArmStatus();
```
---
## 3. Invariants
1. **Channel Configuration**: A channel is considered "configured" if and only if `SerialNumber` field is populated (per `IsConfigured()` contract in `IAnalogInputDASChannel`).
2. **First Use Date**: `FirstUseDate` is only valid when `IsFirstUseDateSupported` is `true`. A `null` value indicates the hardware has not been used since calibration.
3. **Protocol Versioning**: Commands must be checked via `IsCommandSupported()` before execution on `ICommunication` implementations, as protocol support varies by firmware version.
4. **SetupReader Requirement**: `SetupReader()` must be called whenever a socket is connected (per comment in `ICommunication`).
5. **Diagnostics/Configuration State**: `DiagnosticsHasBeenRun` and `ConfigureHasBeenRun` flags indicate whether these operations have been executed and should be checked before relying on diagnostic results.
6. **Phase Shift Calculation**: `GetPhaseShiftSamples()` returns 0 for most DAS types as phase delay is only known for specific hardware.
7. **Position Hierarchy**: For devices on a SLICE6DB, `PositionOnDistributor` and `PositionOnChain` track device location when individual SLICE6 devices are not shown in UI.
---
## 4. Dependencies
### This module depends on:
- `DTS.Common.Enums` - Core enumerations
- `DTS.Common.Enums.Communication` - Communication-specific enums
- `DTS.Common.Enums.DASFactory` - DAS factory enums including `DFConstantsAndEnums`, `MultiCastDeviceClasses`
- `DTS.Common.Enums.Hardware` - `HardwareTypes`, `ExcitationStatus`
- `DTS.Common.Enums.Sensors` - `SensorConstants.BridgeType`, `SensorConstants.CouplingModes`, `ExcitationVoltageOptions`, `DigitalInputModes`, `ZeroMethodType`
- `DTS.Common.Interface.Communication` - Communication interfaces
- `DTS.Common.Interface.Connection` - `IConnection` interface
- `DTS.Common.Interface.DASFactory.ARM` - ARM-related interfaces
- `DTS.Common.Interface.DASFactory.Config` - Configuration interfaces
- `DTS.Common.Interface.DASFactory.Diagnostics` - `IDiagnosticResult`, `IDiagnos`
- `DTS.Common.Interface.DASFactory.Download` - Download interfaces
- `DTS.Common.Interface.Sensors.SoftwareFilters` - `IFilterClass`
- `DTS.Common.Interface.StatusAndProgressBar` - `ActionCompleteDelegate`
- `DTS.Common.Utilities` - `SortableBindingList<T>`
- `System.Xml` - `XmlWriter` for serialization
### What depends on this module:
Cannot be determined from source alone, but `IDASCommunication` documentation states it is "the most used data structure in the API" with nearly all hardware services taking `List<IDASCommunication>` as a parameter.
---
## 5. Gotchas
1. **SoftwareFilterClass Refactoring** (IAnalog

View File

@@ -0,0 +1,38 @@
---
source_files:
- Common/DTS.CommonCore/Interface/DTS.Common.CPU/IcpuEngine.cs
generated_at: "2026-04-16T12:17:51.395302+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "920a09a2c868b9d9"
---
# Documentation: ICPUEngine Interface
## 1. Purpose
This module defines the `ICPUEngine` interface within the `DTS.Common.Interface` namespace. It serves as a specific contract for CPU engine components, deriving from a base system interface `IBaseClass`. Currently, the interface acts as a marker or placeholder, as it defines no custom members of its own, implying that all necessary behavior is currently inherited or that the implementation is pending extension.
## 2. Public Interface
### `ICPUEngine`
**Signature:**
```csharp
public interface ICPUEngine : IBaseClass
```
**Description:**
This is the primary public type defined in this file. It is an empty interface that inherits from `IBaseClass`. It exposes no methods, properties, or events directly; its public interface consists entirely of the members inherited from `IBaseClass`.
## 3. Invariants
* Any class implementing `ICPUEngine` must also implement `IBaseClass` (defined in `DTS.Common.Base`).
* As the interface currently defines no members, it functions strictly as a type definition or marker within the type hierarchy.
## 4. Dependencies
* **Depends on:**
* `DTS.Common.Base` (specifically the `IBaseClass` interface).
* **Dependents:**
* Unknown from this source file alone. Concrete CPU engine implementations would implement this interface.
## 5. Gotchas
* **Empty Interface:** The `ICPUEngine` interface defines no members. Developers should not expect CPU-specific methods (such as execution cycles or instruction handling) to be available on variables typed as `ICPUEngine` unless they are defined on `IBaseClass`.
* **Naming/Location Discrepancy:** The file path suggests a directory named `DTS.Common.CPU` (`.../Interface/DTS.Common.CPU/IcpuEngine.cs`), but the namespace declared in the code is `DTS.Common.Interface`. This may cause confusion when locating the file versus the namespace usage.
* **File Casing:** The filename is `IcpuEngine.cs` (lowercase 'cpu'), while the interface name is `ICPUEngine` (uppercase 'CPU'). This inconsistency in casing could lead to confusion or issues on case-sensitive file systems.

View File

@@ -0,0 +1,269 @@
---
source_files:
- Common/DTS.CommonCore/Interface/DTS.Viewer/ITabView.cs
- Common/DTS.CommonCore/Interface/DTS.Viewer/IDiagView.cs
- Common/DTS.CommonCore/Interface/DTS.Viewer/ITestsView.cs
- Common/DTS.CommonCore/Interface/DTS.Viewer/IStatsView.cs
- Common/DTS.CommonCore/Interface/DTS.Viewer/ICursorView.cs
- Common/DTS.CommonCore/Interface/DTS.Viewer/IViewerView.cs
- Common/DTS.CommonCore/Interface/DTS.Viewer/ITabItemView.cs
- Common/DTS.CommonCore/Interface/DTS.Viewer/IPropertyView.cs
- Common/DTS.CommonCore/Interface/DTS.Viewer/IViewerShellView.cs
- Common/DTS.CommonCore/Interface/DTS.Viewer/IGraphPropertyView.cs
- Common/DTS.CommonCore/Interface/DTS.Viewer/IDockPanelVerticalView.cs
- Common/DTS.CommonCore/Interface/DTS.Viewer/IDockPanelHorizontalView.cs
- Common/DTS.CommonCore/Interface/DTS.Viewer/GroupChannelReadCalcDelegate.cs
- Common/DTS.CommonCore/Interface/DTS.Viewer/ITabViewModel.cs
- Common/DTS.CommonCore/Interface/DTS.Viewer/IDiagViewModel.cs
- Common/DTS.CommonCore/Interface/DTS.Viewer/IStatsViewModel.cs
- Common/DTS.CommonCore/Interface/DTS.Viewer/ICursorViewModel.cs
- Common/DTS.CommonCore/Interface/DTS.Viewer/ITestsViewModel.cs
- Common/DTS.CommonCore/Interface/DTS.Viewer/IViewerViewModel.cs
- Common/DTS.CommonCore/Interface/DTS.Viewer/IPropertyViewModel.cs
- Common/DTS.CommonCore/Interface/DTS.Viewer/IViewerModule.cs
- Common/DTS.CommonCore/Interface/DTS.Viewer/IPSDReportModule .cs
- Common/DTS.CommonCore/Interface/DTS.Viewer/IGraphPropertyViewModel.cs
- Common/DTS.CommonCore/Interface/DTS.Viewer/IDockPanelVerticalViewModel.cs
- Common/DTS.CommonCore/Interface/DTS.Viewer/IDockPanelHorizontalViewModel.cs
- Common/DTS.CommonCore/Interface/DTS.Viewer/ITabItemViewModel.cs
- Common/DTS.CommonCore/Interface/DTS.Viewer/IViewerShellViewModel.cs
- Common/DTS.CommonCore/Interface/DTS.Viewer/IMainLiteView.cs
- Common/DTS.CommonCore/Interface/DTS.Viewer/IMainViewerView.cs
- Common/DTS.CommonCore/Interface/DTS.Viewer/ISelectedDataViewModel.cs
- Common/DTS.CommonCore/Interface/DTS.Viewer/IMainLiteViewModel.cs
- Common/DTS.CommonCore/Interface/DTS.Viewer/IMainViewModel.cs
generated_at: "2026-04-16T12:14:43.492195+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "fed47436f7c090f0"
---
# DTS.Common.Interface Viewer Module Documentation
## 1. Purpose
This module defines the contract layer for the DTS Viewer application's presentation components. It establishes a Model-View-ViewModel (MVVM) architecture through a comprehensive set of interfaces for views, view models, and modules. The interfaces enable loose coupling between UI components and their controllers, supporting a modular, plugin-based architecture built on Microsoft Prism. This abstraction layer allows different concrete implementations of views and view models to be swapped without affecting dependent code.
---
## 2. Public Interface
### View Interfaces
All view interfaces inherit from `IBaseView` (defined in `DTS.Common.Base`) and are currently marker interfaces with no additional members:
| Interface | Description |
|-----------|-------------|
| `ITabView` | Marker interface for tab views |
| `IDiagView` | Marker interface for diagnostic views |
| `ITestsView` | Marker interface for test views |
| `IStatsView` | Marker interface for statistics views |
| `ICursorView` | Marker interface for cursor views |
| `IViewerView` | Marker interface for viewer views |
| `ITabItemView` | Marker interface for individual tab item views |
| `IPropertyView` | Marker interface for property views |
| `IViewerShellView` | Marker interface for the main shell view |
| `IGraphPropertyView` | Marker interface for graph property views |
| `IDockPanelVerticalView` | Marker interface for vertical dock panel views |
| `IDockPanelHorizontalView` | Marker interface for horizontal dock panel views |
#### `IMainLiteView`
```csharp
public interface IMainLiteView : IBaseView
{
StackPanel MainShell { get; set; }
ContentControl MainRegion { get; set; }
ContentControl NavigationRegion { get; set; }
ContentControl HorizontalTabRegion { get; set; }
ContentControl VerticalTabRegion { get; set; }
}
```
Exposes WPF region controls for the "Lite" version of the main view.
#### `IMainViewerView`
```csharp
public interface IMainViewerView : IBaseView
{
// All members commented out in source
}
```
Marker interface for the main viewer view. Region properties are commented out in the source.
---
### ViewModel Interfaces
All view model interfaces inherit from `IBaseViewModel` (defined in `DTS.Common.Base`).
#### Standard ViewModel Interfaces
Each provides a `View` property returning its corresponding view interface:
| Interface | View Property Type |
|-----------|-------------------|
| `ITabViewModel` | `ITabView View { get; }` |
| `IDiagViewModel` | `IDiagView View { get; }` |
| `IStatsViewModel` | `IStatsView View { get; }` |
| `ICursorViewModel` | `ICursorView View { get; }` |
| `ITestsViewModel` | `ITestsView View { get; }` |
| `IViewerViewModel` | `IViewerView View { get; }` |
| `IPropertyViewModel` | `IPropertyView View { get; }` |
| `IGraphPropertyViewModel` | `IGraphPropertyView View { get; }` |
| `IDockPanelVerticalViewModel` | `IDockPanelVerticalView View { get; }` |
| `IDockPanelHorizontalViewModel` | `IDockPanelHorizontalView View { get; }` |
#### `ITabItemViewModel`
```csharp
public interface ITabItemViewModel : IBaseViewModel
{
ITabItemView View { get; }
ITabViewModel Parent { get; }
}
```
Represents a tab item with a reference to its parent `ITabViewModel`.
#### `IViewerShellViewModel`
```csharp
public interface IViewerShellViewModel : IBaseViewModel
{
IViewerShellView View { get; }
List<FrameworkElement> GetRegions();
object ContextMainRegion { get; set; }
}
```
The shell view model providing region management and main region context.
#### `IMainLiteViewModel`
```csharp
public interface IMainLiteViewModel : IBaseViewModel
{
IMainView View { get; }
object ContextMainRegion { get; set; }
object ContextNavigationRegion { get; set; }
object ContextHorizontalTabRegion { get; set; }
object ContextVerticalTabRegion { get; set; }
List<FrameworkElement> GetRegions();
}
```
**Note:** Returns `IMainView` (not `IMainLiteView`), which is not defined in the provided source files.
#### `IMainViewerViewModel`
```csharp
public interface IMainViewerViewModel : IBaseViewModel
{
IBaseView View { get; }
object ContextMainRegion { get; set; }
object ContextNavigationRegion { get; set; }
object ContextHorizontalTabRegion { get; set; }
object ContextVerticalTabRegion { get; set; }
List<FrameworkElement> GetRegions();
}
```
Returns `IBaseView` directly rather than a specific view interface.
---
### Module Interfaces
#### `IViewerModule`
```csharp
public interface IViewerModule : IModule
{
void StartSession(bool standalone, string pluginFolder = "");
}
```
Defines a Prism module for the viewer with session initialization capability.
#### `IPSDReportModule`
```csharp
public interface IPSDReportModule : IModule
{
void StartSession(bool standalone, string pluginFolder = "");
}
```
Defines a Prism module for PSD reporting with identical session initialization signature.
---
### Other Types
#### `SetReadCalcProgressValueDelegate`
```csharp
public delegate void SetReadCalcProgressValueDelegate(string message = "", double value = -1D);
```
A delegate type for reporting progress during read/calculation operations. Default parameters allow calling with no arguments.
#### `ISelectedDataViewModel`
```csharp
public interface ISelectedDataViewModel
{
string SelectedDataFolder { get; set; }
string SelectedDataFile { get; set; }
void SelectAndIncludeDataFile(string file);
}
```
**Does NOT inherit from `IBaseViewModel`.** Manages data file selection with a method to both select and include a file as a test. The XML comment references bug "16158 Browse button on View Data tab not functional."
---
## 3. Invariants
- All view interfaces (except `ISelectedDataViewModel`) must inherit from `IBaseView`.
- All view model interfaces (except `ISelectedDataViewModel`) must inherit from `IBaseViewModel`.
- Each standard view model interface must expose a read-only `View` property returning its corresponding view interface type.
- `ITabItemViewModel.Parent` must return a valid `ITabViewModel` instance (parent-child relationship is expected).
- `StartSession` on module interfaces must be called to initialize the module with explicit `standalone` mode specification.
- Region context properties (`ContextMainRegion`, `ContextNavigationRegion`, etc.) are expected to be set by the framework or controlling code before views are rendered.
---
## 4. Dependencies
### External Dependencies
| Dependency | Usage |
|------------|-------|
| `DTS.Common.Base` | Provides `IBaseView` and `IBaseViewModel` base interfaces |
| `Microsoft.Practices.Prism.Modularity` | Provides `IModule` interface for module definitions |
| `System.Windows` | Provides `FrameworkElement` for region management |
| `System.Windows.Controls` | Provides `StackPanel`, `ContentControl` for view composition |
### Downstream Dependencies
**Unclear from source alone.** These interfaces are contract definitions; concrete implementations and consumers are not present in the provided files. The naming convention suggests implementations exist in a `DTS.Viewer` assembly or namespace.
---
## 5. Gotchas
1. **`IMainLiteViewModel.View` returns `IMainView`** — This interface references `IMainView`, which is not defined in any of the provided source files. This may be a typo for `IMainLiteView` or a separate interface.
2. **`IMainViewerView` has all members commented out** — The interface exists but all its region properties are commented out. This may indicate incomplete refactoring or an abandoned change.
3. **`ISelectedDataViewModel` does not follow the pattern** — Unlike all other view model interfaces, this one does not inherit from `IBaseViewModel` and has no `View` property. It appears to be a utility interface rather than a true MVVM view model.
4. **Inconsistent XML comments** — Some interfaces have XML documentation (e.g., `ITabViewModel`, `ITabItemViewModel`), while others do not. Some comments are copy-pasted incorrectly (e.g., `IViewerViewModel` says "Gets the Tests View" but returns `IViewerView`).
5. **`SetReadCalcProgressValueDelegate` naming mismatch** — The filename is `GroupChannelReadCalcDelegate.cs` but the delegate is named `SetReadCalcProgressValueDelegate`.
6. **`IPSDReportModule` filename has trailing space** — The filename is `IPSDReportModule .cs` (note the space before the extension).

View File

@@ -0,0 +1,83 @@
---
source_files:
- Common/DTS.CommonCore/Interface/DTS.Viewer/CalculatedChannel/IAddCalculatedChannelView.cs
- Common/DTS.CommonCore/Interface/DTS.Viewer/CalculatedChannel/IAddCalculatedChannelViewModel.cs
generated_at: "2026-04-16T12:23:49.838372+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "720d768a9bb759bc"
---
# Documentation: IAddCalculatedChannelView & IAddCalculatedChannelViewModel
## 1. Purpose
This module defines the view and viewmodel interfaces for the "Add Calculated Channel" feature within a larger MVVM (Model-View-ViewModel) architecture. `IAddCalculatedChannelView` serves as a marker interface for the view component, while `IAddCalculatedChannelViewModel` defines the contract for the viewmodel, exposing commands and properties for managing calculated channel creation, ISO export settings, DTS encoding defaults, and search context regions.
---
## 2. Public Interface
### IAddCalculatedChannelView
**Declaration:**
```csharp
public interface IAddCalculatedChannelView : IBaseView { }
```
A marker interface extending `IBaseView`. Contains no members.
---
### IAddCalculatedChannelViewModel
**Declaration:**
```csharp
public interface IAddCalculatedChannelViewModel : IBaseViewModel
```
**Properties:**
| Name | Type | Access | Description |
|------|------|--------|-------------|
| `View` | `IBaseView` | get/set | The Search View associated with this viewmodel. |
| `Parent` | `IBaseViewModel` | get/set | Reference to the parent viewmodel in the hierarchy. |
| `IncludeGroupNameInISOExport` | `bool` | get/set | Controls whether group names are included in ISO export output. |
| `DefaultDTSEncoding` | `int` | get/set | The default DTS encoding value for calculated channels. |
| `AddCalculatedChannelCommand` | `ICommand` | get | Command to add a calculated channel. |
| `ContextSearchRegion` | `object` | get/set | Context object for the search region. |
**Methods:**
| Name | Return Type | Description |
|------|-------------|-------------|
| `PublishChanges()` | `void` | Publishes or commits pending changes. Behavior specifics not documented in source. |
---
## 3. Invariants
- `IAddCalculatedChannelView` must always be assignable to `IBaseView`.
- `IAddCalculatedChannelViewModel` must always be assignable to `IBaseViewModel`.
- `AddCalculatedChannelCommand` is read-only (getter only); it cannot be replaced after initialization, only executed.
- The presence of `Parent` property implies a hierarchical viewmodel structure that must be maintained.
---
## 4. Dependencies
**This module depends on:**
- `DTS.Common.Base` — Provides `IBaseView` and `IBaseViewModel` base interfaces.
- `System.Windows.Input` — Provides `ICommand` interface for the `AddCalculatedChannelCommand` property.
**Consumers:**
- Unknown from source alone. These interfaces are intended to be implemented by concrete view and viewmodel classes elsewhere in the codebase.
---
## 5. Gotchas
- **Namespace mismatch:** Both files include `// ReSharper disable CheckNamespace`, indicating the declared namespace (`DTS.Common.Interface`) may not match the folder structure (`Common/DTS.CommonCore/Interface/DTS.Viewer/CalculatedChannel/`). This could cause confusion when locating files or during refactoring.
- **Marker interface:** `IAddCalculatedChannelView` has no members and serves only as a type marker. Any view-specific behavior must come from `IBaseView` or be cast to a more specific type.
- **`ContextSearchRegion` type:** The property is typed as `object`, suggesting loose typing. The actual expected type and usage pattern is unclear from source alone.
- **`PublishChanges()` semantics:** The method name suggests an event-publishing or change-commit pattern, but the exact behavior (what changes are published, to whom, and when this should be called) is not documented in the source.

View File

@@ -0,0 +1,172 @@
---
source_files:
- Common/DTS.CommonCore/Interface/DTS.Viewer/ChartOptions/IChartOptionsView.cs
- Common/DTS.CommonCore/Interface/DTS.Viewer/ChartOptions/IChartOptionsViewModel.cs
- Common/DTS.CommonCore/Interface/DTS.Viewer/ChartOptions/IChartOptionsModel.cs
generated_at: "2026-04-16T12:25:32.635258+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "a0d576d041a71e53"
---
# Documentation: Chart Options Interfaces
## 1. Purpose
This module defines the contract for chart configuration and visualization options within the DTS system. It provides three interfaces (`IChartOptionsView`, `IChartOptionsViewModel`, `IChartOptionsModel`) that follow an MVVM (Model-View-ViewModel) pattern to manage chart display settings including axis scaling, cursors, unit types, filtering, and export functionality. These interfaces enable decoupled communication between UI components and business logic for chart rendering.
---
## 2. Public Interface
### IChartOptionsView
**Namespace:** `DTS.Common.Interface`
A marker interface extending `IBaseView` with no additional members.
```csharp
public interface IChartOptionsView : IBaseView { }
```
---
### IChartOptionsViewModel
**Namespace:** `DTS.Common.Interface`
Extends `IBaseViewModel` and coordinates between the view and model for chart options.
| Member | Type | Description |
|--------|------|-------------|
| `View` | `IBaseView` | Gets or sets the Search View. |
| `Parent` | `IBaseViewModel` | Gets or sets the parent view model. |
| `Model` | `IChartOptionsModel` | Gets or sets the associated chart options model. |
| `ContextSearchRegion` | `object` | Gets or sets a context search region object. |
**Methods:**
| Method | Signature | Description |
|--------|-----------|-------------|
| `PublishChanges` | `void PublishChanges()` | Publishes pending changes. |
| `ResetZoomMethod` | `void ResetZoomMethod()` | Resets the chart zoom. |
| `ResetTMethod` | `void ResetTMethod()` | Resets the time axis. |
| `SaveToPDFMethod` | `void SaveToPDFMethod()` | Saves the chart to PDF. |
| `ShowCusor` | `void ShowCusor(bool value)` | Shows or hides the cursor. |
| `ShowMinMaxCursor` | `void ShowMinMaxCursor(bool value)` | Shows or hides the min/max cursor. |
---
### IChartOptionsModel
**Namespace:** `DTS.Common.Interface`
Extends `IBaseModel` and holds all chart configuration state and commands.
**ADC/mV Display Properties:**
| Property | Type | Description |
|----------|------|-------------|
| `SupportsADC` | `bool` | True if all channels support ADC. |
| `SupportsMV` | `bool` | True if all channels support mV. |
| `DisplayingVolts` | `bool` | Indicates if current mV option is for Volts or mV. |
| `MVOrV` | `string` | Returns "mV" or "V" depending on `DisplayingVolts` value. |
**Y-Axis Properties:**
| Property | Type | Description |
|----------|------|-------------|
| `FullScaleValues` | `List<double>` | Available full scale values. |
| `SelectedFullScaleValue` | `double` | Currently selected full scale value. |
| `MinFixedY` | `double` | Minimum fixed Y value. |
| `MaxFixedY` | `double` | Maximum fixed Y value. |
| `LockedY` | `bool` | Indicates if Y-axis is locked. |
| `YRange` | `YRangeScaleEnum` | Y-axis range scale setting. |
| `UnitType` | `ChartUnitTypeEnum` | Chart unit type. |
| `UnitTypeDescription` | `string` | Description of the unit type (getter only). |
**Time Axis Properties:**
| Property | Type | Description |
|----------|------|-------------|
| `MinFixedT` | `double` | Minimum fixed T value. |
| `MaxFixedT` | `double` | Maximum fixed T value. |
| `LockedT` | `bool` | Indicates if T-axis is locked. |
| `TimeUnitType` | `TimeUnitTypeEnum` | Time unit type setting. |
**Cursor Properties:**
| Property | Type | Description |
|----------|------|-------------|
| `ShowCursor` | `bool` | Indicates if cursor is shown. |
| `CurrentCursorValues` | `string` | Current cursor values as string. |
| `IsCursorsAvailable` | `bool` | Indicates if cursors are available. |
**Filter Properties:**
| Property | Type | Description |
|----------|------|-------------|
| `Filter` | `FilterOptionEnum` | Filter option setting. |
| `SelectedFilter` | `IFilterClass` | Selected filter class instance. |
**Other Properties:**
| Property | Type | Description |
|----------|------|-------------|
| `Parent` | `IChartOptionsViewModel` | Parent view model reference. |
| `CanPublishChanges` | `bool` | Indicates if changes can be published. |
| `ReadData` | `bool` | Indicates if data should be read. |
| `IsDigitalChannel` | `bool` | Indicates if channel is digital. |
| `DecimateData` | `bool` | Indicates if data should be decimated. |
| `WidthPoints` | `long` | Width points value. |
**Commands:**
| Property | Type | Description |
|----------|------|-------------|
| `ResetZoomCommand` | `DelegateCommand` | Command to reset zoom. |
| `ResetTCommand` | `DelegateCommand` | Command to reset time axis. |
| `SaveToPDFCommand` | `DelegateCommand` | Command to save to PDF. |
---
## 3. Invariants
1. **Namespace Mismatch:** All three interfaces are declared in `DTS.Common.Interface` namespace, despite the file path suggesting `DTS.Viewer.ChartOptions`. The `// ReSharper disable CheckNamespace` directive indicates this is intentional.
2. **MVVM Hierarchy:**
- `IChartOptionsView` must implement `IBaseView`
- `IChartOptionsViewModel` must implement `IBaseViewModel`
- `IChartOptionsModel` must implement `IBaseModel`
3. **Parent-Child Relationships:**
- `IChartOptionsModel.Parent` must reference the `IChartOptionsViewModel` that owns it
- `IChartOptionsViewModel.Model` must reference the `IChartOptionsModel` it manages
4. **Unit Display Logic:** `MVOrV` property return value is determined by `DisplayingVolts` state.
5. **Command Availability:** The model exposes commands as `DelegateCommand` (Prism), implying they follow the `ICommand` pattern with execute/can-execute semantics.
---
## 4. Dependencies
### This module depends on:
- `DTS.Common.Base` - Provides `IBaseView`, `IBaseViewModel`, `IBaseModel`
- `DTS.Common.Enums.Viewer` - Provides `YRangeScaleEnum`, `ChartUnitTypeEnum`, `TimeUnitTypeEnum`, `FilterOptionEnum`
- `DTS.Common.Interface.Sensors.SoftwareFilters` - Provides `IFilterClass`
- `Microsoft.Practices.Prism.Commands` - Provides `DelegateCommand`
- `System.Collections.Generic` - Provides `List<T>`
- `System.Windows.Input` - Provides `ICommand` (indirectly via `DelegateCommand`)
### What depends on this module:
- **Unclear from source alone** - No consumers are shown in these files. Likely implementations exist in a viewer/charting module.
---
## 5. Gotchas
1. **Typo in Method Name:** `ShowCusor(bool value)` is misspelled (should be `ShowCursor`). This typo is part of the public API and must be used as-is.
2. **Namespace/Path Inconsistency:** Files are located in `Common/DTS.CommonCore/Interface/DTS.Viewer/ChartOptions/` but declare namespace `DTS.Common.Interface`. The ReSharper suppression confirms this is deliberate but may cause confusion during navigation.
3. **Command vs Method Duplication:** `IChartOptionsModel` exposes `ResetZoomCommand`, `ResetTCommand`, `SaveToPDFCommand` while `IChartOptionsViewModel` exposes corresponding methods `ResetZoomMethod()`, `ResetTMethod()`, `SaveToPDFMethod()`. The relationship between these is not documented in the source.
4. **Mixed Naming Conventions:** Some methods use `Method` suffix (e.g., `ResetZoomMethod`) while properties use `Command` suffix (e.g., `ResetZoomCommand`). The rationale is unclear from source alone.

View File

@@ -0,0 +1,67 @@
---
source_files:
- Common/DTS.CommonCore/Interface/DTS.Viewer/Filter/IFilterView.cs
- Common/DTS.CommonCore/Interface/DTS.Viewer/Filter/IFilterViewModel.cs
generated_at: "2026-04-16T12:24:10.338285+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "0d8966c24bd001af"
---
# Documentation: DTS.Common.Interface Filter Components
## 1. Purpose
This module defines the core interfaces for filter components within the DTS viewer system. It establishes a View-ViewModel contract for filter UI elements, following the MVVM (Model-View-ViewModel) pattern. The `IFilterView` and `IFilterViewModel` interfaces provide the abstraction layer that allows filter components to be integrated into the broader application architecture while maintaining separation between presentation and business logic.
---
## 2. Public Interface
### `IFilterView`
**Location:** `DTS.Common.Interface` namespace
**Inheritance:** `IBaseView`
A marker interface with no members. It extends `IBaseView` and serves to identify views that are specifically filter views within the type system.
---
### `IFilterViewModel`
**Location:** `DTS.Common.Interface` namespace
**Inheritance:** `IBaseViewModel`
| Property | Type | Accessor | Description |
|----------|------|----------|-------------|
| `View` | `IBaseView` | `get; set;` | Gets or sets the Search View associated with this filter view model. |
| `Parent` | `IBaseViewModel` | `get; set;` | Gets or sets the parent view model in the hierarchy. |
| `ContextSearchRegion` | `object` | `get; set;` | Gets or sets a context object for the search region. Purpose unclear from source alone. |
---
## 3. Invariants
- **Type Hierarchy:** `IFilterView` must always be assignable to `IBaseView`. `IFilterViewModel` must always be assignable to `IBaseViewModel`.
- **View Association:** The `View` property on `IFilterViewModel` is typed as `IBaseView` (not `IFilterView`), suggesting the view model may be associated with views broader than just filter views.
- **Parent-Child Relationship:** The `Parent` property establishes a hierarchical relationship between view models, though no validation or lifecycle management is defined at this interface level.
---
## 4. Dependencies
### This module depends on:
- `DTS.Common.Base` — Provides `IBaseView` and `IBaseViewModel` base interfaces
### What depends on this module:
- **Cannot be determined from source alone.** No imports or usages are visible in the provided files.
---
## 5. Gotchas
1. **Namespace suppression:** The file `IFilterViewModel.cs` contains a `// ReSharper disable CheckNamespace` directive, suggesting the declared namespace (`DTS.Common.Interface`) may not match the project's default namespace structure. This could indicate a historical refactoring or organizational inconsistency.
2. **Weakly-typed context:** The `ContextSearchRegion` property is typed as `object`, providing no compile-time type safety. Consumers must know the expected runtime type through external documentation or convention.
3. **Missing XML documentation:** Only the `View` property has XML documentation (`<summary>` comment). The `Parent` and `ContextSearchRegion` properties lack documentation, leaving their intended usage and semantics unclear.
4. **Marker interface with no contract:** `IFilterView` defines no members beyond inheriting `IBaseView`. Its purpose appears to be purely for type identification, but the specific behaviors or capabilities it signals are not documented in source.

View File

@@ -0,0 +1,224 @@
---
source_files:
- Common/DTS.CommonCore/Interface/DTS.Viewer/Graphs/IGraphMainView.cs
- Common/DTS.CommonCore/Interface/DTS.Viewer/Graphs/IGraphChannelView.cs
- Common/DTS.CommonCore/Interface/DTS.Viewer/Graphs/IGraphPropertyView.cs
- Common/DTS.CommonCore/Interface/DTS.Viewer/Graphs/ITestDataView.cs
- Common/DTS.CommonCore/Interface/DTS.Viewer/Graphs/IGraphPropertyViewModel.cs
- Common/DTS.CommonCore/Interface/DTS.Viewer/Graphs/ITestDataSeriesView.cs
- Common/DTS.CommonCore/Interface/DTS.Viewer/Graphs/IGraphView.cs
- Common/DTS.CommonCore/Interface/DTS.Viewer/Graphs/IGraphViewModel.cs
- Common/DTS.CommonCore/Interface/DTS.Viewer/Graphs/ITestDataViewModel.cs
- Common/DTS.CommonCore/Interface/DTS.Viewer/Graphs/ITestDataSeriesViewModel.cs
- Common/DTS.CommonCore/Interface/DTS.Viewer/Graphs/IGraphChannelViewModel.cs
- Common/DTS.CommonCore/Interface/DTS.Viewer/Graphs/IGraphMainViewModel.cs
- Common/DTS.CommonCore/Interface/DTS.Viewer/Graphs/ITestDataSeries.cs
generated_at: "2026-04-16T12:24:37.475119+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "99208da86b0faad5"
---
# Documentation: DTS.Common.Interface Graph Module
## 1. Purpose
This module defines the interface contracts for a graph visualization subsystem following the Model-View-ViewModel (MVVM) architectural pattern. It provides abstractions for rendering test data series, managing graph channels, editing graph properties, and coordinating channel selection/locking across the application. The interfaces serve as boundaries between UI components and business logic, enabling test-driven development and loose coupling between the graph visualization components and their consumers.
---
## 2. Public Interface
### View Interfaces
#### `IGraphMainView`
- **Signature:** `public interface IGraphMainView : IBaseView`
- **Behavior:** Marker interface for the main graph view container. No members defined; extends `IBaseView`.
#### `IGraphChannelView`
- **Signature:** `public interface IGraphChannelView : IBaseView`
- **Behavior:** Marker interface for the graph channel selection/configuration view. No members defined; extends `IBaseView`.
#### `IGraphPropertyView`
- **Signature:** `public interface IGraphPropertyView : IBaseView`
- **Behavior:** Marker interface for the graph property editing view. No members defined; extends `IBaseView`.
#### `ITestDataView`
- **Signature:** `public interface ITestDataView : IBaseView`
- **Behavior:** Marker interface for the test data view. No members defined; extends `IBaseView`.
#### `ITestDataSeriesView`
- **Signature:** `public interface ITestDataSeriesView : IBaseView`
- **Members:**
- `bool SaveReportToPDF(string directory)` — Exports the report to PDF format to the specified directory.
- `bool SaveReportToCSV(string directory)` — Exports the report to CSV format to the specified directory.
- **Behavior:** Provides export capabilities for test data series reports.
#### `IGraphView`
- **Signature:** `public interface IGraphView : IBaseView`
- **Members:**
- `//void SetGraphs(ObservableCollection<ITestDataSeries> graphs);` (commented out)
- **Behavior:** Marker interface for the graph rendering view. Contains one commented-out method for setting graph collections.
---
### ViewModel Interfaces
#### `IGraphPropertyViewModel`
- **Signature:** `public interface IGraphPropertyViewModel : IBaseViewModel`
- **Members:**
- `IGraphPropertyView View { get; }` — Gets the associated property view.
- **Behavior:** ViewModel contract for managing graph property view state.
#### `IGraphViewModel`
- **Signature:** `public interface IGraphViewModel : IBaseViewModel`
- **Members:**
- `IGraphView View { get; }` — Gets the associated graph view.
- `ITestDataSeriesView DataSeriesView { get; set; }` — Gets or sets the data series view.
- **Behavior:** ViewModel contract for the main graph view coordination.
#### `ITestDataViewModel`
- **Signature:** `public interface ITestDataViewModel : IBaseViewModel`
- **Members:**
- `ITestDataView View { get; set; }` — Gets or sets the associated test data view.
- `ITestDataSeries Model { get; set; }` — Gets or sets the underlying test data series model.
- **Behavior:** ViewModel contract for test data display and editing.
#### `ITestDataSeriesViewModel`
- **Signature:** `public interface ITestDataSeriesViewModel : IBaseViewModel`
- **Members:**
- `ITestDataSeriesView View { get; set; }` — Gets or sets the associated view.
- `ITestDataSeries Model { get; set; }` — Gets or sets the underlying test data series model.
- `void MoveCursor(object sender, KeyEventArgs e)` — Handles cursor movement events.
- `string CurrentCursorValues { get; set; }` — Gets or sets the current cursor position values for display.
- **Behavior:** ViewModel for test data series with interactive cursor functionality.
#### `IGraphChannelViewModel`
- **Signature:** `public interface IGraphChannelViewModel : IBaseViewModel`
- **Members:**
- `IGraphChannelView View { get; }` — Gets the associated channel view.
- `ObservableCollection<ITestChannel> GraphChannelList { get; set; }` — Collection of all available graph channels.
- `ObservableCollection<ITestChannel> SelectedGraphChannelList { get; set; }` — Collection of currently selected graph channels.
- `TestChannel SelectedGraphChannel { get; set; }` — The currently single-selected graph channel.
- **Behavior:** ViewModel for managing graph channel selection and display.
#### `IGraphMainViewModel`
- **Signature:** `public interface IGraphMainViewModel : IBaseViewModel`
- **Members:**
- `IGraphMainView View { get; set; }` — Gets or sets the main graph view.
- `IBaseViewModel Parent { get; set; }` — Gets or sets the parent ViewModel reference.
- `List<ITestChannel> LockedChannelList { get; set; }` — List of locked channels.
- `List<ITestChannel> SelectedChannelList { get; set; }` — List of selected channels.
- `string LockedGroupName { get; set; }` — Name of the locked group.
- `void PublishSelectedChannels()` — Publishes the current channel selection.
- `void AddSelectedChannel(ITestChannel channel)` — Adds a single channel to the selection.
- `void AddSelectedGroupChannels(string groupName, List<ITestChannel> channels)` — Adds multiple channels from a group to the selection.
- `void AddLockedChannel(ITestChannel channel, bool isLocked)` — Adds or updates a channel's locked state.
- `void AddLockedGroupChannels(string testName, string groupName, List<ITestChannel> channels, bool isLocked)` — Adds or updates multiple channels' locked state as a group.
- `void GraphList_CollectionChanged(object sender, NotifyCollectionChangedEventArgs e)` — Handler for graph list collection changes.
- **Behavior:** Primary ViewModel for graph coordination, managing channel selection and locking state.
---
### Model Interface
#### `ITestDataSeries`
- **Signature:** `public interface ITestDataSeries : IBaseModel`
- **Members (Identification):**
- `string TestGroup { get; set; }`
- `string TestSetupName { get; set; }`
- `string TestId { get; set; }`
- `string ChannelId { get; set; }`
- `string HardwareChannel { get; set; }`
- `string Bridge { get; set; }`
- `string GroupName { get; set; }`
- `string ChannelName { get; set; }`
- `string Description { get; }`
- **Members (Data):**
- `double[] Xvalue { get; set; }` — X-axis data points.
- `double[] Yvalue { get; set; }` — Y-axis data points.
- `Brush GraphColor { get; set; }` — Visual color for the graph line.
- **Members (Configuration):**
- `string SWAAF { get; set; }`
- `string HWAAF { get; set; }`
- `string SampleRate { get; set; }`
- `string ISOCode { get; set; }`
- `string ISOChannelName { get; set; }`
- `string UserCode { get; set; }`
- `string UserChannelName { get; set; }`
- `string EngineeringUnits { get; set; }`
- `string Excitation { get; set; }`
- `string Polarity { get; set; }`
- `string RecordingMode { get; set; }`
- **Members (Sensor):**
- `string SensorSN { get; }`
- `string SensorSNDisplay { get; }`
- **Members (Statistics - read-only):**
- `string MinY { get; }`
- `string MaxY { get; }`
- `string AvgY { get; }`
- `string StdDevY { get; }`
- `string T0EUValue { get; }`
- **Members (FFT Analysis):**
- `bool FFT { get; }` — Indicates if this series is an FFT of signal data.
- `double PeakFrequency { get; }` — Peak frequency by magnitude (only populated when `FFT` is true).
- `double PeakMagnitude { get; }` — Peak magnitude of frequencies (only populated when `FFT` is true).
- `double GRMS { get; set; }` — Root-mean-squared acceleration (calculated in PSD results graphs).
- **Members (HIC - Head Injury Criterion):**
- `bool HIC { get; }` — Indicates if HIC calculation applies.
- `string HICValue { get; }`
- `string T1Time { get; }`
- `string T2Time { get; }`
- **Behavior:** Data model representing a complete test data series with metadata, raw data, and computed statistics. Supports both time-domain and frequency-domain (FFT) data representations.
---
## 3. Invariants
1. **Inheritance Hierarchy:** All view interfaces (`IGraphMainView`, `IGraphChannelView`, `IGraphPropertyView`, `ITestDataView`, `ITestDataSeriesView`, `IGraphView`) must extend `IBaseView`.
2. **Inheritance Hierarchy:** All ViewModel interfaces (`IGraphPropertyViewModel`, `IGraphViewModel`, `ITestDataViewModel`, `ITestDataSeriesViewModel`, `IGraphChannelViewModel`, `IGraphMainViewModel`) must extend `IBaseViewModel`.
3. **Inheritance Hierarchy:** `ITestDataSeries` must extend `IBaseModel`.
4. **FFT Data Population:** `PeakFrequency` and `PeakMagnitude` are only valid when `FFT` is `true`. Consumers must check `FFT` before accessing these properties.
5. **GRMS Context:** `GRMS` is only calculated for PSD (Power Spectral Density) results graphs.
6. **Observable Collections:** `IGraphChannelViewModel` uses `ObservableCollection<ITestChannel>` for both `GraphChannelList` and `SelectedGraphChannelList`, implying UI binding expectations for collection change notifications.
7. **Read-Only Statistics:** Statistical properties (`MinY`, `MaxY`, `AvgY`, `StdDevY`, `T0EUValue`, `PeakFrequency`, `PeakMagnitude`) are read-only and presumably computed from `Xvalue` and `Yvalue` arrays.
---
## 4. Dependencies
### This Module Depends On:
| Dependency | Usage |
|------------|-------|
| `DTS.Common.Base` | `IBaseView`, `IBaseViewModel`, `IBaseModel` base interfaces |
| `DTS.Common.Classes.Viewer.TestMetadata` | `TestChannel`, `ITestChannel` types |
| `DTS.Common.Events` | Referenced in `ITestDataSeriesView.cs` (specific types not visible in source) |
| `System.Windows.Input` | `KeyEventArgs` in `ITestDataSeriesViewModel` |
| `System.Windows.Media` | `Brush` type in `ITestDataSeries` |
| `System.Collections.ObjectModel` | `ObservableCollection<T>` |
| `System.Collections.Specialized` | `NotifyCollectionChangedEventArgs` |
### What Depends On This Module:
**Cannot be determined from source alone.** This module defines only interfaces; consumers would be concrete implementations and other modules that reference these contracts.
---
## 5. Gotchas
1. **Namespace Inconsistency:** Four files (`ITestDataView.cs`, `ITestDataSeriesView.cs`, `IGraphView.cs`, `ITestDataSeriesViewModel.cs`, `IGraphMainViewModel.cs`, `ITestDataSeries.cs`) contain `// ReSharper disable CheckNamespace`, suggesting the declared namespace `DTS.Common.Interface` may not match the file path structure. This could cause confusion when locating types.
2. **Commented-Out Code:** `IGraphView` contains a commented-out method `SetGraphs(ObservableCollection<ITestDataSeries> graphs)`. The reason for its removal and whether it should be restored or permanently deleted is unclear from source.
3. **Malformed XML Comment:** In `ITestDataSeries.cs`, the XML comment for `PeakMagnitude` has a malformed closing tag (`</summary<` instead of `</summary>`), which may break documentation generation tools.
4. **Mixed Collection Types:** `IGraphChannelViewModel` uses `ObservableCollection<ITestChannel>` while `IGraphMainViewModel` uses `List<ITestChannel>`. This inconsistency in collection types across related ViewModels may indicate differing lifecycle or notification requirements, but could also be an oversight.
5. **Type Mismatch in `IGraphChannelViewModel`:** The `SelectedGraphChannel` property is typed as `TestChannel` (concrete class), while the collections use `ITestChannel` (interface). This breaks consistency with the interface-based design pattern used elsewhere.
6. **Setter Accessibility:** Several read-only properties in `ITestDataSeries` (e.g., `Description`, `SensorSN`, `MinY`, `MaxY`, etc.) have only getters, but it's unclear whether these are computed properties or set via constructor/mutable backing field. The implementation strategy is not specified.

View File

@@ -0,0 +1,74 @@
---
source_files:
- Common/DTS.CommonCore/Interface/DTS.Viewer/Legend/ILegendView.cs
- Common/DTS.CommonCore/Interface/DTS.Viewer/Legend/ILegendViewModel.cs
generated_at: "2026-04-16T12:22:08.946405+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "fa541836d2cec79b"
---
# Documentation: ILegendView / ILegendViewModel
## 1. Purpose
This module defines the core interfaces for a Legend component within a Viewer system, following the MVVM (Model-View-ViewModel) architectural pattern. `ILegendView` represents the view abstraction for legend visualization, while `ILegendViewModel` defines the contract for its corresponding ViewModel, establishing the relationship between the two layers. These interfaces enable decoupled communication between the legend's presentation logic and its UI rendering.
---
## 2. Public Interface
### `ILegendView`
**Namespace:** `DTS.Common.Interface`
**Inherits:** `IBaseView`
A marker interface representing a legend view component. No members are defined beyond those inherited from `IBaseView`.
```csharp
public interface ILegendView : IBaseView { }
```
---
### `ILegendViewModel`
**Namespace:** `DTS.Common.Interface`
**Inherits:** `IBaseViewModel`
Defines the contract for a legend ViewModel with access to its associated view.
| Member | Type | Access | Description |
|--------|------|--------|-------------|
| `View` | `ILegendView` | `get` | Returns the associated `ILegendView` instance for this ViewModel. |
```csharp
public interface ILegendViewModel : IBaseViewModel
{
ILegendView View { get; }
}
```
---
## 3. Invariants
- `ILegendViewModel.View` must return a non-null `ILegendView` instance when accessed (implied by the contract, though nullability annotations are not present in the source).
- Both interfaces must maintain their inheritance from `IBaseView` and `IBaseViewModel` respectively, ensuring consistency with the broader view/viewmodel hierarchy.
- The `View` property on `ILegendViewModel` is read-only (getter only), suggesting the view association is established at construction or through internal mechanisms, not via public setters.
---
## 4. Dependencies
### This module depends on:
- `DTS.Common.Base` — Provides `IBaseView` and `IBaseViewModel` base interfaces from which these interfaces inherit.
### What depends on this module:
- **Cannot be determined from source alone.** Consumers would include concrete implementations of `ILegendView` and `ILegendViewModel`, as well as any components that render or interact with legend functionality.
---
## 5. Gotchas
- **Marker Interface:** `ILegendView` defines no members of its own. All functionality comes from `IBaseView`. Developers should consult `IBaseView` to understand available members.
- **Tight Coupling via Property:** The `ILegendViewModel.View` property creates a direct reference from the ViewModel to the View, which is a deviation from pure MVVM where ViewModels are typically view-agnostic. The rationale for this design choice is not documented in the source.
- **Missing Nullability Annotations:** The source lacks C# 8.0+ nullable reference type annotations, making it unclear whether `View` is guaranteed to be non-null.

View File

@@ -0,0 +1,143 @@
---
source_files:
- Common/DTS.CommonCore/Interface/DTS.Viewer/MainView/IMainView.cs
- Common/DTS.CommonCore/Interface/DTS.Viewer/MainView/IViewerMainView.cs
- Common/DTS.CommonCore/Interface/DTS.Viewer/MainView/IViewerMainViewGrid.cs
- Common/DTS.CommonCore/Interface/DTS.Viewer/MainView/IMainViewModel.cs
- Common/DTS.CommonCore/Interface/DTS.Viewer/MainView/IViewerMainViewModel.cs
generated_at: "2026-04-16T12:24:51.311433+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "95ec9f6198f586ac"
---
# Documentation: DTS.Common.Interface MainView Interfaces
## 1. Purpose
This module defines the core view and ViewModel interfaces for the main window of a DTS Viewer application. It establishes the contract for a modular, region-based UI layout using what appears to be a MVVM (Model-View-ViewModel) architecture. The interfaces support multiple UI regions (navigation, graphs, tests, legends, diagnostics, statistics, cursor, and property panels) and provide keyboard interaction handling, zoom control, and configuration management for a data visualization and analysis tool.
---
## 2. Public Interface
### View Interfaces
#### `IMainView`
```csharp
public interface IMainView : IBaseView { }
```
Marker interface for a main view component. Extends `IBaseView`. No members defined.
#### `IViewerMainView`
```csharp
public interface IViewerMainView : IBaseView { }
```
Marker interface for a viewer main view component. Extends `IBaseView`. No members defined.
#### `IViewerMainViewGrid`
```csharp
public interface IViewerMainViewGrid : IBaseView { }
```
Marker interface for a viewer main view grid component. Extends `IBaseView`. No members defined.
---
### ViewModel Interfaces
#### `IMainViewModel`
```csharp
public interface IMainViewModel : IBaseViewModel
```
| Member | Type | Access | Description |
|--------|------|--------|-------------|
| `View` | `IBaseView` | `get` | Gets the Main View instance |
| `ContextNavigationRegion` | `object` | `get; set` | Navigation region context |
| `ContextGraphRegion` | `object` | `get; set` | Graph region context |
| `ContextTestsRegion` | `object` | `get; set` | Tests region context |
| `ContextGraphsRegion` | `object` | `get; set` | Graphs region context |
| `ContextLegendRegion` | `object` | `get; set` | Legend region context |
| `ContextDiagRegion` | `object` | `get; set` | Diagnostics region context |
| `ContextStatsRegion` | `object` | `get; set` | Statistics region context |
| `ContextCursorRegion` | `object` | `get; set` | Cursor region context |
| `ContextPropertyRegion` | `object` | `get; set` | Property region context |
| `GetRegions()` | `List<FrameworkElement>` | method | Returns a list of all region FrameworkElements |
---
#### `IViewerMainViewModel`
```csharp
public interface IViewerMainViewModel : IBaseViewModel, ISelectedDataViewModel
```
| Member | Type | Access | Description |
|--------|------|--------|-------------|
| `View` | `IBaseView` | `get; set` | Gets or sets the Main View instance |
| `Standalone` | `bool` | `get; set` | Indicates if viewer is running in standalone mode |
| `ContextNavigationRegion` | `object` | `get; set` | Navigation region context |
| `ContextGraphRegion` | `object` | `get; set` | Graph region context |
| `ContextTestsRegion` | `object` | `get; set` | Tests region context |
| `ContextGraphsRegion` | `object` | `get; set` | Graphs region context |
| `ContextLegendRegion` | `object` | `get; set` | Legend region context |
| `ContextDiagRegion` | `object` | `get; set` | Diagnostics region context |
| `ContextStatsRegion` | `object` | `get; set` | Statistics region context |
| `ContextCursorRegion` | `object` | `get; set` | Cursor region context |
| `ContextPropertyRegion` | `object` | `get; set` | Property region context |
| `GetRegions()` | `List<FrameworkElement>` | method | Returns a list of all region FrameworkElements |
| `ConfigPath` | `string` | `get; set` | Path to configuration file |
| `DoesUserHaveEditPermission` | `bool` | `get; set` | User edit permission flag |
| `ZoomReset()` | `void` | method | Resets zoom to default state |
| `LeftKeyPress()` | `void` | method | Handles left arrow key press notification |
| `RightKeyPress()` | `void` | method | Handles right arrow key press notification |
| `ChannelCodeViewMode` | `Common.Enums.IsoViewMode` | `get; set` | Channel code view mode setting |
| `CalibrationBehaviorSetting` | `Common.Enums.Sensors.CalibrationBehaviors` | `get; set` | Calibration behavior configuration |
| `CalibrationBehaviorSettableInViewer` | `bool` | `get; set` | Whether calibration behavior can be set in viewer |
| `SettingsVisibility` | `Visibility` | `get` | Visibility state of settings UI |
---
## 3. Invariants
1. **Namespace Mismatch**: All interfaces are declared in namespace `DTS.Common.Interface` despite file paths suggesting `DTS.Viewer.MainView` sub-namespaces. The ReSharper disable comments indicate this is intentional.
2. **Region Context Types**: All `Context*Region` properties are typed as `object`, suggesting late binding or multiple possible region types. Implementations must handle assignment of appropriate region types.
3. **View Property Mutability**: `IMainViewModel.View` is read-only (`get`), while `IViewerMainViewModel.View` is read-write (`get; set`). Implementations must respect this difference.
4. **Inheritance Chain**:
- All view interfaces must implement `IBaseView`
- `IMainViewModel` must implement `IBaseViewModel`
- `IViewerMainViewModel` must implement both `IBaseViewModel` and `ISelectedDataViewModel`
5. **GetRegions() Contract**: Must return a non-null `List<FrameworkElement>` containing the UI regions.
---
## 4. Dependencies
### External Dependencies (Imports)
| Namespace | Usage |
|-----------|-------|
| `DTS.Common.Base` | `IBaseView`, `IBaseViewModel`, `ISelectedDataViewModel` base types |
| `System.Collections.Generic` | `List<T>` for `GetRegions()` return type |
| `System.Windows` | `FrameworkElement`, `Visibility` types |
| `Common.Enums` | `IsoViewMode` enum |
| `Common.Enums.Sensors` | `CalibrationBehaviors` enum |
### Downstream Dependencies
**Unclear from source alone** - These are interface definitions; concrete implementations and consumers are not present in the provided files.
---
## 5. Gotchas
1. **Namespace Inconsistency**: The file paths suggest namespaces like `DTS.Viewer.MainView`, but all interfaces are declared in `DTS.Common.Interface`. The `// ReSharper disable CheckNamespace` directives indicate this mismatch is known and suppressed. New developers should be aware that file location does not match declared namespace.
2. **View Property Asymmetry**: `IMainViewModel.View` is read-only while `IViewerMainViewModel.View` is read-write. This inconsistency could cause confusion when implementing or consuming these interfaces.
3. **Magic Object Types**: All region context properties use `object` type rather than specific region interfaces. The actual types expected/returned are unclear from the source alone.
4. **Duplicate Region Definitions**: Both `IMainViewModel` and `IViewerMainViewModel` define identical region properties. This suggests either parallel evolution or a design that could benefit from a shared base interface for region management.
5. **Partial Enum Paths**: The types `Common.Enums.IsoViewMode` and `Common.Enums.Sensors.CalibrationBehaviors` are referenced but their definitions are not provided, making their exact values and usage unclear from this source alone.

View File

@@ -0,0 +1,81 @@
---
source_files:
- Common/DTS.CommonCore/Interface/DTS.Viewer/Menu/IMenuView.cs
- Common/DTS.CommonCore/Interface/DTS.Viewer/Menu/IMenuViewModel.cs
generated_at: "2026-04-16T12:23:31.714436+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "f8804451d31ebe71"
---
# Documentation: DTS.Common.Interface Menu Module
## 1. Purpose
This module defines the core interfaces for the Menu component within the DTS Viewer application, following the MVVM (Model-View-ViewModel) architectural pattern. It establishes the contract between a menu view and its corresponding view model, enabling loose coupling and testability. The module serves as an abstraction layer that allows concrete implementations of menu UI components to vary independently from their presentation logic.
---
## 2. Public Interface
### `IMenuView`
**Namespace:** `DTS.Common.Interface`
**Inheritance:** `IBaseView`
An empty marker interface that defines the view contract for menu components. It inherits from `IBaseView` (defined in `DTS.Common.Base`), presumably providing common view-related functionality.
```csharp
public interface IMenuView : IBaseView { }
```
---
### `IMenuViewModel`
**Namespace:** `DTS.Common.Interface`
**Inheritance:** `IBaseViewModel`
Defines the contract for a menu view model, providing access to its associated view.
```csharp
public interface IMenuViewModel : IBaseViewModel
{
/// <summary>
/// Gets the Shell View.
/// </summary>
IMenuView View { get; }
}
```
| Member | Type | Accessor | Description |
|--------|------|----------|-------------|
| `View` | `IMenuView` | get-only | Returns the associated menu view instance |
---
## 3. Invariants
1. **Type Compatibility**: `IMenuView` instances must be assignable to `IBaseView`. `IMenuViewModel` instances must be assignable to `IBaseViewModel`.
2. **Non-null View**: The `View` property on any `IMenuViewModel` implementation should reasonably be expected to return a non-null `IMenuView` instance after initialization (inferred from typical MVVM patterns, though not explicitly enforced by the interface).
3. **Read-only View Reference**: The `View` property is get-only; implementations must not expose a public setter through this interface.
---
## 4. Dependencies
### This module depends on:
- **`DTS.Common.Base`** — Provides `IBaseView` and `IBaseViewModel` base interfaces that `IMenuView` and `IMenuViewModel` extend respectively.
### What depends on this module:
- **Unknown from source alone.** Concrete implementations of `IMenuView` and `IMenuViewModel` would exist elsewhere in the codebase, likely in presentation/UI layers.
---
## 5. Gotchas
1. **Misleading XML Documentation**: The XML comment on `IMenuViewModel.View` states "Gets the Shell View," but the return type is `IMenuView`, not a shell view interface. This appears to be a copy-paste error from another component (possibly a shell-related view model). The actual behavior returns a Menu View, not a Shell View.
2. **Marker Interface**: `IMenuView` is an empty interface with no members beyond what it inherits. Its purpose appears to be purely for type identification/categorization within the view hierarchy. The actual view behavior must come from `IBaseView`, whose members are not visible in the provided source.
3. **Tight Coupling via Property**: The `IMenuViewModel` interface exposes `IMenuView` directly as a property rather than through a more abstract mechanism. This creates a compile-time dependency on the view type, which is somewhat atypical for MVVM patterns where view models often avoid direct references to view abstractions.

View File

@@ -0,0 +1,62 @@
---
source_files:
- Common/DTS.CommonCore/Interface/DTS.Viewer/Navigation/INavigationView.cs
- Common/DTS.CommonCore/Interface/DTS.Viewer/Navigation/INavigationViewModel.cs
generated_at: "2026-04-16T12:23:10.877701+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "3183c8a5d454e0e2"
---
# Documentation: Navigation Interfaces
## 1. Purpose
This module defines the core navigation interfaces for the DTS viewer system, establishing a contract between navigation views and their associated view models. It follows the MVVM (Model-View-ViewModel) pattern, providing `INavigationView` as a marker interface for navigation view components and `INavigationViewModel` as the interface that exposes access to the navigation view. This abstraction layer allows for decoupled navigation components within the larger DTS.CommonCore framework.
---
## 2. Public Interface
### `INavigationView`
**Namespace:** `DTS.Common.Interface`
**Inheritance:** `IBaseView`
An empty marker interface extending `IBaseView`. It defines no members of its own; its purpose is to provide type identity for navigation view implementations within the view hierarchy.
---
### `INavigationViewModel`
**Namespace:** `DTS.Common.Interface`
**Inheritance:** `IBaseViewModel`
| Member | Type | Access | Description |
|--------|------|--------|-------------|
| `NavigationView` | `INavigationView` | `get` | Returns the associated navigation view instance. |
---
## 3. Invariants
- `INavigationView` must always inherit from `IBaseView`.
- `INavigationViewModel` must always inherit from `IBaseViewModel`.
- The `NavigationView` property on any `INavigationViewModel` implementation must return an object that implements `INavigationView`.
- The inheritance chain implies that any `INavigationView` or `INavigationViewModel` implementation must also satisfy the contracts of their respective base interfaces (`IBaseView`, `IBaseViewModel`).
---
## 4. Dependencies
### This module depends on:
- `DTS.Common.Base` — provides `IBaseView` and `IBaseViewModel` base interfaces.
### What depends on this module:
- **Cannot be determined from source alone.** No downstream consumers are visible in the provided files.
---
## 5. Gotchas
1. **Documentation mismatch:** The XML summary comment for `INavigationViewModel.NavigationView` states "Gets the Shell View," but the property is named `NavigationView`. It is unclear whether this is a copy-paste error in documentation, a historical naming remnant, or if "Shell View" and "Navigation View" are intended to be synonymous in this context.
2. **Empty interface design:** `INavigationView` defines no members and serves only as a marker interface. Developers implementing this interface must consult `IBaseView` to understand the actual required members, which are not visible in these source files.

View File

@@ -0,0 +1,236 @@
---
source_files:
- Common/DTS.CommonCore/Interface/DTS.Viewer/TestDefinition/ITestMetadata.cs
- Common/DTS.CommonCore/Interface/DTS.Viewer/TestDefinition/ITestGraphs.cs
- Common/DTS.CommonCore/Interface/DTS.Viewer/TestDefinition/ITestSetupMetadata.cs
- Common/DTS.CommonCore/Interface/DTS.Viewer/TestDefinition/ITestSummary.cs
- Common/DTS.CommonCore/Interface/DTS.Viewer/TestDefinition/ITestRunMetadata.cs
- Common/DTS.CommonCore/Interface/DTS.Viewer/TestDefinition/ITestModule.cs
- Common/DTS.CommonCore/Interface/DTS.Viewer/TestDefinition/ITestCalculatedChannel.cs
- Common/DTS.CommonCore/Interface/DTS.Viewer/TestDefinition/ITestChannel.cs
generated_at: "2026-04-16T12:25:55.415422+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "2ef74d227b33f018"
---
# Test Definition Interfaces Documentation
## 1. Purpose
This module defines the core data contract interfaces for test definition and metadata within the DTS (Data Test System) viewer application. It provides the abstraction layer for representing test runs, test setups, hardware modules, channels (both physical and calculated), and graph configurations. These interfaces model complex data acquisition scenarios including sensor configurations, calibration parameters, sample data statistics, and test execution metadata, enabling decoupling between data models and their consumers.
---
## 2. Public Interface
### ITestMetadata
Container interface aggregating test run and setup metadata.
| Member | Type | Description |
|--------|------|-------------|
| `TestRun` | `ITestRunMetadata` | Reference to test run metadata |
| `TestSetup` | `ITestSetupMetadata` | Reference to test setup metadata |
---
### ITestGraphs
Represents a graph configuration grouping channels for visualization.
| Member | Type | Description |
|--------|------|-------------|
| `Name` | `string` | Graph name identifier |
| `HardwareChannelName` | `string` | Associated hardware channel name |
| `ChannelIds` | `List<string>` | List of channel IDs belonging to this graph |
| `Channels` | `List<ITestChannel>` | List of resolved test channel objects |
---
### ITestSetupMetadata
Defines metadata for a test setup configuration.
| Member | Type | Description |
|--------|------|-------------|
| `SetupName` | `string` | Name of the test setup |
| `TimeStamp` | `DateTime` | Timestamp when setup was created/modified |
| `TestGraphs` | `List<ITestGraphs>` | Collection of graph configurations |
| `CalibrationBehavior` | `CalibrationBehaviors` | Calibration behavior setting (from `DTS.Common.Enums.Sensors`) |
---
### ITestSummary : IBaseClass
Provides summary information about a test for listing/display purposes.
| Member | Type | Description |
|--------|------|-------------|
| `Id` | `string` | Unique test identifier |
| `Name` | `string` | Test name |
| `Description` | `string` | Test description |
| `ChannelCount` | `int` | Total number of channels |
| `TestDate` | `DateTime` | Date the test was executed |
| `DataType` | `string` | Data type identifier |
| `IsSelected` | `bool` | Selection state for UI |
| `Graphs` | `List<ITestGraphs>` | Collection of graphs |
| `Channels` | `List<ITestChannel>` | Collection of physical channels |
| `CalculatedChannels` | `List<ITestChannel>` | Collection of calculated channels |
| `Parent` | `IBaseViewModel` | Reference to parent view model |
---
### ITestRunMetadata : INotifyPropertyChanged
Defines metadata for a single test run execution.
| Member | Type | Description |
|--------|------|-------------|
| `Name` | `string` | Run name |
| `Id` | `string` | Run identifier |
| `Description` | `string` | Run description |
| `InlineSerializedData` | `bool` | Whether data is serialized inline |
| `TestGuid` | `string` | Globally unique test identifier |
| `FaultFlags` | `int` | Bitmask of fault flags |
| `Software` | `string` | Software name used for acquisition |
| `SoftwareVersion` | `string` | Software version |
| `DataType` | `string` | Data type identifier |
| `FileDate` | `DateTime` | File creation/modification date |
| `FilePath` | `string` | Path to the data file |
| `Modules` | `List<ITestModule>` | Collection of hardware modules |
| `Channels` | `List<ITestChannel>` | Collection of channels |
| `CalculatedChannels` | `List<ITestChannel>` | Collection of calculated channels |
---
### ITestModule : INotifyPropertyChanged
Represents a hardware module used during test acquisition.
| Member | Type | Description |
|--------|------|-------------|
| `SerialNumber` | `string` | Module serial number |
| `BaseSerialNumber` | `string` | Base serial number |
| `AaFilterRateHz` | `int` | Anti-aliasing filter rate in Hz |
| `Number` | `int` | Module number |
| `NumberOfSamples` | `int` | Total samples recorded |
| `UnsubsampledNumberOfSamples` | `int` | Sample count before subsampling |
| `RequestedPostTriggerSeconds` | `double` | Requested post-trigger duration |
| `RequestedPreTriggerSeconds` | `double` | Requested pre-trigger duration |
| `PostTriggerSeconds` | `double` | Actual post-trigger duration |
| `PreTriggerSeconds` | `double` | Actual pre-trigger duration |
| `RecordingMode` | `string` | Recording mode identifier |
| `SampleRateHz` | `int` | Sample rate in Hz |
| `StartRecordSampleNumber` | `int` | Sample number at recording start |
| `NumberOfChannels` | `int` | Number of channels on module |
| `InlineSerializedData` | `bool` | Whether data is inline serialized |
| `StartRecordTimestampSec` | `int` | Recording start timestamp (seconds) |
| `StartRecordTimestampNanoSec` | `int` | Recording start timestamp (nanoseconds) |
| `TriggerTimestampSec` | `int` | Trigger timestamp (seconds) |
| `TriggerTimestampNanoSec` | `int` | Trigger timestamp (nanoseconds) |
| `TriggerSampleNumbers` | `List<ulong>` | List of trigger sample numbers |
| `PTPMasterSync` | `bool` | PTP master sync status |
| `TiltSensorAxisXDegreesPre` | `int` | Pre-test X-axis tilt in degrees |
| `TiltSensorAxisYDegreesPre` | `int` | Pre-test Y-axis tilt in degrees |
| `TiltSensorAxisZDegreesPre` | `int` | Pre-test Z-axis tilt in degrees |
| `TiltSensorAxisXDegreesPost` | `int` | Post-test X-axis tilt in degrees |
| `TiltSensorAxisYDegreesPost` | `int` | Post-test Y-axis tilt in degrees |
| `TiltSensorAxisZDegreesPost` | `int` | Post-test Z-axis tilt in degrees |
| `TemperatureLocation1Pre` through `TemperatureLocation4Pre` | `int` | Pre-test temperatures at 4 locations |
| `TemperatureLocation1Post` through `TemperatureLocation4Post` | `int` | Post-test temperatures at 4 locations |
| `Channels` | `List<ITestChannel>` | Collection of channels |
| `CalculatedChannels` | `List<ITestChannel>` | Collection of calculated channels |
---
### ITestCalculatedChannel : INotifyPropertyChanged
Defines a calculated/virtual channel derived from other channels.
| Member | Type | Description |
|--------|------|-------------|
| `SerialNumber` | `string` | Serial number |
| `ChannelId` | `string` | Channel identifier |
| `Description` | `string` | Channel description |
| `ChannelGroupName` | `string` | Group name for channel |
| `ChannelType` | `string` | Channel type identifier |
| `Number` | `int` | Channel number |
| `DigitalMultiplier` | `string` | Digital multiplier setting |
| `DigitalMode` | `string` | Digital mode setting |
| `Start` | `DateTime` | Start timestamp |
| `Bridge` | `string` | Bridge configuration |
| `BridgeResistanceOhms` | `int` | Bridge resistance in ohms |
| `ZeroPoint` | `double` | Zero point value |
| `ChannelDescriptionString` | `string` | Formatted description string |
| `ChannelName2` | `string` | Secondary channel name |
| `HardwareChannelName` | `string` | Hardware channel name |
| `DesiredRange` | `double` | Desired measurement range |
| `Sensitivity` | `double` | Sensitivity value |
| `SoftwareFilter` | `string` | Software filter configuration |
| `ProportionalToExcitation` | `bool` | Whether proportional to excitation |
| `IsInverted` | `bool` | Whether signal is inverted |
| `LinearizationFormula` | `string` | Linearization formula |
| `IsSubsampled` | `bool` | Whether channel is subsampled |
| `AbsoluteDisplayOrder` | `int` | Display order index |
| `LastCalibrationDate` | `DateTime` | Last calibration date |
| `SensorId` | `string` | Sensor identifier |
| `OffsetToleranceLowMv` | `int` | Low offset tolerance in mV |
| `OffsetToleranceHighMv` | `int` | High offset tolerance in mV |
| `DataFlag` | `int` | Data flag value |
| `ExcitationVoltage` | `int` | Excitation voltage |
| `Eu` | `string` | Engineering units |
| `CalSignalEnabled` | `bool` | Calibration signal enabled |
| `ShuntEnabled` | `bool` | Shunt enabled |
| `VoltageInsertionCheckEnabled` | `bool` | Voltage insertion check enabled |
| `RemoveOffset` | `bool` | Whether to remove offset |
| `ZeroMethod` | `string` | Zero method identifier |
| `ZeroAverageWindowBegin` | `double` | Zero averaging window start |
| `ZeroAverageWindowEnd` | `double` | Zero averaging window end |
| `InitialEu` | `int` | Initial engineering units |
| `InitialOffset` | `string` | Initial offset value |
| `UnsubsampledSampleRateHz` | `int` | Sample rate before subsampling |
| `MeasuredShuntDeflectionMv` | `double` | Measured shunt deflection in mV |
| `TargetShuntDeflectionMv` | `double` | Target shunt deflection in mV |
| `MeasuredExcitationVoltage` | `double` | Measured excitation voltage |
| `FactoryExcitationVoltage` | `double` | Factory excitation voltage |
| `TimeOfFirstSample` | `double` | Timestamp of first sample |
| `Multiplier` | `int` | Multiplier value |
| `UserOffsetEu` | `int` | User-defined offset in EU |
| `UnitConversion` | `int` | Unit conversion flag |
| `AtCapacity` | `bool` | Whether at capacity |
| `CapacityOutputIsBasedOn` | `int` | Capacity output reference |
| `SourceChannelNumber` | `string` | Source channel number |
| `SourceModuleNumber` | `string` | Source module number |
| `SourceModuleSerialNumber` | `string` | Source module serial number |
| `Calculation` | `string` | Calculation formula/expression |
| `SampleRateHz` | `int` | Sample rate in Hz |
| `SensitivityUnits` | `string` | Sensitivity units |
| `SensorCapacity` | `int` | Sensor capacity |
---
### ITestChannel : INotifyPropertyChanged
Represents a physical measurement channel with full configuration and statistics.
**Identity & Hierarchy:**
| Member | Type | Description |
|--------|------|-------------|
| `Group` | `string` | Group identifier |
| `SubGroup` | `string` | Sub-group identifier |
| `TestId` | `string` | Test identifier |
| `TestSetupName` | `string` | Parent test setup name |
| `ModuleSerialNumber` | `string` | Parent module serial number |
| `SerialNumber` | `string` | Channel serial number |
| `ChannelId` | `string` | Channel identifier |
| `ChannelDisplayName` | `string` | Display name |
| `Description` | `string` | Channel description |
| `ChannelGroupName` | `string` | Channel group name |
| `ChannelType` | `string` | Channel type |
| `Number` | `int` | Channel number |
| `ChannelNumber` | `int` | Channel number (alternate) |
| `ParentTestSetup` | `ITestSetupMetadata` | Reference to parent test setup |
| `ParentModule` | `ITestModule` | Reference to parent module |
| `Parent` | `IBaseViewModel` | Reference to parent view model |
**Graph Configuration:**
| Member | Type | Description |
|--------|------|-------------|
| `IsGraphChannel` | `bool` | Whether this is a graph channel |
| `GraphName` | `string` | Associated graph name |
| `ChannelColor` | `Color` | Display color for channel |
| `Xmax` | `double` | Maximum X value |
| `

View File

@@ -0,0 +1,149 @@
---
source_files:
- Common/DTS.CommonCore/Interface/DTS.Viewer/TestModification/ITestModificationView.cs
- Common/DTS.CommonCore/Interface/DTS.Viewer/TestModification/ITestModificationViewModel.cs
- Common/DTS.CommonCore/Interface/DTS.Viewer/TestModification/ITestModificationModel.cs
generated_at: "2026-04-16T12:22:54.326019+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "a5f27c5a375dc7b6"
---
# Documentation: Test Modification Module
## 1. Purpose
This module defines the contract for a Test Modification feature following the Model-View-ViewModel (MVVM) pattern. It provides interfaces for modifying test channel parameters—including description, EU multiplier/offset, T0 timing, line fit boundaries, sensitivity, software filters, and data flags—within a DTS data acquisition or sensor testing system. The module tracks modification state for each parameter and supports publishing changes back to the underlying data.
---
## 2. Public Interface
### `ITestModificationView`
**Namespace:** `DTS.Common.Interface`
A marker interface representing the view component for test modification.
```
public interface ITestModificationView : IBaseView { }
```
- Inherits from `IBaseView`
- Defines no additional members
---
### `ITestModificationViewModel`
**Namespace:** `DTS.Common.Interface`
The view model interface coordinating the test modification view and managing ISO code filter mapping behavior.
```
public interface ITestModificationViewModel : IBaseViewModel
```
**Properties:**
| Name | Type | Access | Description |
|------|------|--------|-------------|
| `View` | `ITestModificationView` | get/set | The associated view instance |
| `Parent` | `IBaseViewModel` | get/set | Reference to the parent view model |
| `UseISOCodeFilterMapping` | `bool` | get/set | Controls whether ISO code should be modified when software filter is modified |
| `UseZeroForUnfiltered` | `bool` | get/set | Controls whether '0' or 'P' is used when ISO code is modified due to software filter change |
**Methods:**
| Name | Return Type | Description |
|------|-------------|-------------|
| `PublishChanges()` | `void` | Publishes/commits the modifications |
---
### `ITestModificationModel`
**Namespace:** `DTS.Common.Interface`
The model interface holding test modification state for a selected channel.
```
public interface ITestModificationModel : IBaseModel
```
**Properties:**
| Name | Type | Access | Description |
|------|------|--------|-------------|
| `Parent` | `ITestModificationViewModel` | get/set | Reference to the parent view model |
| `SelectedChannel` | `ITestChannel` | get/set | The channel on which modifications are based |
| `Description` | `string` | get/set | The `ChannelDescriptionString` of the selected channel |
| `EuMultiplier` | `double` | get/set | EU multiplier of the selected channel |
| `EuOffset` | `double` | get/set | EU offset of the selected channel |
| `T0` | `double` | get/set | Current T0 offset in milliseconds |
| `T1` | `double` | get/set | Line fit start time in milliseconds |
| `T2` | `double` | get/set | Line fit end time in milliseconds |
| `Sensitivity` | `double` | get/set | Sensitivity of the selected channel |
| `SelectedFilter` | `IFilterClass` | get/set | Software filter for the selected class |
| `T0Mode` | `T0Mode` | get/set | T0 adjustment mode |
| `SelectedDataFlag` | `DataFlag` | get/set | Data flag for the selected channel |
| `IsModified` | `bool` | get | Indicates whether any values have changed from default |
| `IsModifiedDescription` | `bool` | get | Indicates whether the Description field has been modified |
| `IsModifiedEuMultiplier` | `bool` | get | Indicates whether EuMultiplier has been modified |
| `IsModifiedEuOffset` | `bool` | get | Indicates whether EU offset has been modified |
| `IsModifiedT0` | `bool` | get | Indicates whether T0 has been modified |
| `IsModifiedLineFit` | `bool` | get/set | Indicates whether T1 or T2 has been modified |
| `IsModifiedSensitivity` | `bool` | get | Indicates whether sensitivity has been modified |
| `IsModifiedFilter` | `bool` | get | Indicates whether filter has been modified |
| `IsModifiedDataFlag` | `bool` | get | Indicates whether DataFlag has been modified |
**Methods:**
| Name | Return Type | Description |
|------|-------------|-------------|
| `ValidateT0()` | `bool` | Returns `true` if T0 is valid (within the dataset), `false` otherwise |
---
## 3. Invariants
1. **Parent-Child Hierarchy:** `ITestModificationModel.Parent` must reference an `ITestModificationViewModel`, and `ITestModificationViewModel.Parent` must reference an `IBaseViewModel`, establishing a three-level hierarchy (Model → ViewModel → Parent ViewModel).
2. **Channel Selection Required:** `SelectedChannel` must be set before modification properties (`Description`, `EuMultiplier`, `EuOffset`, `T0`, `T1`, `T2`, `Sensitivity`, `SelectedFilter`, `SelectedDataFlag`) can meaningfully be accessed or modified—they represent values "of the selected channel."
3. **Modification Tracking Consistency:** Each `IsModified*` property should reflect the actual modification state of its corresponding value property. The aggregate `IsModified` property should be `true` if any individual `IsModified*` flag is `true`.
4. **T0 Validation:** `ValidateT0()` must be called to confirm T0 is within the dataset bounds before relying on the T0 value.
5. **Line Fit Ordering:** While not explicitly enforced in the interface, `T1` (line fit start) and `T2` (line fit end) are expected to represent a valid time range—unclear from source whether T1 < T2 is enforced.
---
## 4. Dependencies
### This module depends on:
- **`DTS.Common.Base`** — Provides base interfaces:
- `IBaseView`
- `IBaseViewModel`
- `IBaseModel`
- **`DTS.Common.Interface.Sensors.SoftwareFilters`** — Provides:
- `IFilterClass` (referenced in comment as replacement for `CFCFilter` per FB 13120)
### External types referenced (definitions not in source):
- `ITestChannel` — Type of `SelectedChannel`; location unknown
- `T0Mode` — Enum or type for T0 adjustment mode; location unknown
- `DataFlag` — Enum or type for channel data flags; location unknown
### Dependents:
- Cannot be determined from source alone. Concrete implementations of these interfaces would exist elsewhere in the codebase.
---
## 5. Gotchas
1. **Namespace Discrepancy:** The file path suggests namespace `DTS.Viewer.TestModification`, but the actual namespace declared is `DTS.Common.Interface`. The `// ReSharper disable CheckNamespace` directive indicates this mismatch is intentional/suppressed.
2. **Filter Type Change (FB 13120):** The comment indicates `IFilterClass` replaced `CFCFilter` as the type for `SelectedFilter`. Code referencing the old type may exist elsewhere in the codebase.
3. **ISO Code Filter Mapping Behavior:** The interaction between `UseISOCodeFilterMapping` and `UseZeroForUnfiltered` is not defined in these interfaces. The behavior for when ISO code is modified due to filter changes depends on implementation details not present here.
4. **IsModifiedLineFit is Read/Write:** Unlike other `IsModified*` properties which are read-only, `IsModifiedLineFit` has both getter and setter. The reason for this inconsistency is unclear from source alone.
5. **T0 Validation Not Automatic:** The interface provides `ValidateT0()` as an explicit method rather than automatic validation on set. Callers must remember to invoke it.

View File

@@ -0,0 +1,77 @@
---
source_files:
- Common/DTS.CommonCore/Interface/DTS.Viewer/TestModule/ITestModuleView.cs
- Common/DTS.CommonCore/Interface/DTS.Viewer/TestModule/ITestModuleViewModel.cs
generated_at: "2026-04-16T12:22:30.959477+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "43e7cc3a0d236351"
---
# Documentation: ITestModuleView & ITestModuleViewModel
## 1. Purpose
This module defines the view and view model interfaces for a Test Module component within an MVVM (Model-View-ViewModel) architecture. It establishes contracts for a test module view (`ITestModuleView`) and its corresponding view model (`ITestModuleViewModel`), with the view model specifically exposing a collection of assemblies for test management purposes. These interfaces enable decoupled communication between the presentation layer and business logic for test module functionality.
---
## 2. Public Interface
### `ITestModuleView`
**Signature:**
```csharp
public interface ITestModuleView : IBaseView { }
```
**Description:** A marker interface extending `IBaseView`. It defines no members of its own, serving purely as a type contract for test module view implementations.
---
### `ITestModuleViewModel`
**Signature:**
```csharp
public interface ITestModuleViewModel : IBaseViewModel
{
List<Assembly> AssemblyList { get; set; }
}
```
**Description:** An interface extending `IBaseViewModel` that defines the contract for a test module view model. Exposes a single property:
| Property | Type | Access | Description |
|----------|------|--------|-------------|
| `AssemblyList` | `List<Assembly>` | get; set; | A mutable list of .NET assemblies, presumably for test discovery or execution purposes. |
---
## 3. Invariants
- `ITestModuleView` must always implement `IBaseView`.
- `ITestModuleViewModel` must always implement `IBaseViewModel`.
- The `AssemblyList` property must be a mutable `List<Assembly>` (both getter and setter are required).
- The namespace `DTS.Common.Interface` is declared for both interfaces regardless of file location.
---
## 4. Dependencies
### This module depends on:
| Dependency | Usage |
|------------|-------|
| `DTS.Common.Base` | Provides `IBaseView` and `IBaseViewModel` base interfaces |
| `System.Collections.Generic` | Provides `List<T>` for the `AssemblyList` property |
| `System.Reflection` | Provides the `Assembly` type |
### What depends on this module:
**Cannot be determined from source alone.** Consumers would be concrete implementations of `ITestModuleView` and `ITestModuleViewModel`, as well as any code that depends on these abstractions (e.g., test runners, navigation services, or dependency injection containers).
---
## 5. Gotchas
- **Namespace mismatch with file path:** The declared namespace `DTS.Common.Interface` does not match the folder structure `Common/DTS.CommonCore/Interface/DTS.Viewer/TestModule/`. The `// ReSharper disable CheckNamespace` directive suppresses IDE warnings about this discrepancy, suggesting this may be intentional or a historical artifact.
- **Marker interface with no members:** `ITestModuleView` is an empty interface that only inherits from `IBaseView`. Its purpose beyond type identification is unclear from the source alone.
- **Mutable property on interface:** `AssemblyList` exposes both a getter and setter, implying implementations must support full replacement of the list, not just modification of its contents. The implications of this design choice (e.g., notification requirements, thread safety) are not documented in the source.

View File

@@ -0,0 +1,102 @@
---
source_files:
- Common/DTS.CommonCore/Interface/DTS.Viewer/TestSummary/ITestSummaryListView.cs
- Common/DTS.CommonCore/Interface/DTS.Viewer/TestSummary/ITestSummaryListViewModel.cs
- Common/DTS.CommonCore/Interface/DTS.Viewer/TestSummary/ITestSummary.cs
generated_at: "2026-04-16T12:23:26.707020+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "b60d1a2f75a9d685"
---
# Documentation: Test Summary List View Interfaces
## 1. Purpose
This module defines the core interfaces for a Test Summary List feature within an MVVM (Model-View-ViewModel) architecture. It provides contracts for displaying collections of test summaries, managing user selections, and representing individual test summary data including channels, graphs, and metadata. The module serves as the abstraction layer between the view and view model for test summary presentation.
---
## 2. Public Interface
### `ITestSummaryListView`
**Namespace:** `DTS.Common.Interface`
**Extends:** `IBaseView`
A marker interface representing the view component for the test summary list. No members are defined beyond the inherited `IBaseView`.
---
### `ITestSummaryListViewModel`
**Namespace:** `DTS.Common.Interface`
**Extends:** `IBaseViewModel`
| Member | Type | Description |
|--------|------|-------------|
| `View` | `ITestSummaryListView` (read-only) | Gets the Shell View associated with this view model. |
| `TestSummaryList` | `ObservableCollection<ITestSummary>` | Observable collection of test summaries bound to the view. Supports get/set. |
| `SelectedTestSummaryList` | `List<ITestSummary>` | List of currently selected test summaries. Supports get/set. |
| `PublishSelectedTestSummaryList()` | `void` | Publishes the selected test summary list (destination/consumers not specified in source). |
| `TestSummaryList_CollectionChanged(object sender, NotifyCollectionChangedEventArgs e)` | `void` | Event handler for collection change notifications on `TestSummaryList`. |
---
### `ITestSummary`
**Namespace:** `DTS.Common.Interface.TestDefinition`
**Extends:** `IBaseClass`
| Property | Type | Access |
|----------|------|--------|
| `Id` | `string` | get/set |
| `SetupName` | `string` | get/set |
| `Description` | `string` | get/set |
| `ChannelCount` | `int` | get/set |
| `FileDate` | `DateTime` | get/set |
| `TimeStamp` | `DateTime` | get/set |
| `DataType` | `string` | get/set |
| `IsSelected` | `bool` | get/set |
| `Graphs` | `List<ITestGraphs>` | get/set |
| `Channels` | `List<ITestChannel>` | get/set |
| `CalculatedChannels` | `List<ITestChannel>` | get/set |
| `Parent` | `IBaseViewModel` | get/set |
| `TestMetadata` | `ITestMetadata` | get/set |
| `CalibrationBehavior` | `CalibrationBehaviors` | get/set |
---
## 3. Invariants
- `ITestSummaryListView` must always be assignable to `IBaseView`.
- `ITestSummaryListViewModel` must always be assignable to `IBaseViewModel`.
- `ITestSummary` must always be assignable to `IBaseClass`.
- `TestSummaryList_CollectionChanged` is designed to handle `NotifyCollectionChangedEventArgs`, implying it expects to be wired to an `ObservableCollection<T>.CollectionChanged` event.
- The `Parent` property on `ITestSummary` suggests a hierarchical relationship where a test summary has a reference back to its containing view model.
---
## 4. Dependencies
### This module depends on:
- **`DTS.Common.Base`** — Provides `IBaseView`, `IBaseViewModel`, and `IBaseClass` base interfaces.
- **`DTS.Common.Enums.Sensors`** — Provides the `CalibrationBehaviors` enum used in `ITestSummary`.
- **`System.Collections.Generic`** — For `List<T>`.
- **`System.Collections.ObjectModel`** — For `ObservableCollection<T>`.
- **`System.Collections.Specialized`** — For `NotifyCollectionChangedEventArgs`.
- **`System`** — For `DateTime`.
### External types referenced but not defined in this module:
- `ITestGraphs` — Referenced in `ITestSummary.Graphs`; definition not provided in source.
- `ITestChannel` — Referenced in `ITestSummary.Channels` and `CalculatedChannels`; definition not provided in source.
- `ITestMetadata` — Referenced in `ITestSummary.TestMetadata`; definition not provided in source.
---
## 5. Gotchas
1. **Namespace/Directory Mismatch:** All three files contain `// ReSharper disable CheckNamespace` directives. The physical file path (`DTS.Viewer/TestSummary/`) does not match the declared namespace (`DTS.Common.Interface` or `DTS.Common.Interface.TestDefinition`). This suggests either a deliberate namespace flattening strategy or a historical refactoring that left files in their original locations.
2. **`TestSummaryList_CollectionChanged` Naming Convention:** The method name follows an event handler naming pattern but is defined as a regular interface method rather than being wired via an event subscription. The caller is responsible for connecting this handler to the `CollectionChanged` event of `TestSummaryList`.
3. **Unknown Publish Behavior:** The `PublishSelectedTestSummaryList()` method's implementation details (event aggregator, message bus, direct callback, etc.) are not specified in these interfaces. Consumers should consult the implementing class for the actual publish mechanism.
4. **Nullable Collections Not Specified:** The interfaces do not indicate whether `Graphs`, `Channels`, `CalculatedChannels`, or `TestMetadata` can be null. Implementers should document their null-handling strategy.

View File

@@ -0,0 +1,82 @@
---
source_files:
- Common/DTS.CommonCore/Interface/DTS.Viewer/ViewerSettings/IViewerSettingsView.cs
- Common/DTS.CommonCore/Interface/DTS.Viewer/ViewerSettings/IViewerSettingsViewModel.cs
generated_at: "2026-04-16T12:22:53.517734+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "aacb0b18894c95e6"
---
# Documentation: IViewerSettingsView & IViewerSettingsViewModel
## 1. Purpose
This module defines the contract for a Viewer Settings UI component following the MVVM (Model-View-ViewModel) pattern. `IViewerSettingsView` represents the view abstraction, while `IViewerSettingsViewModel` defines the presentation logic and state for configuring viewer-related settings, specifically calibration behavior options. These interfaces enable decoupled communication between the UI layer and business logic, allowing for testability and separation of concerns within the DTS viewer settings subsystem.
---
## 2. Public Interface
### IViewerSettingsView
**Namespace:** `DTS.Common.Interface`
```csharp
public interface IViewerSettingsView : IBaseView { }
```
A marker interface extending `IBaseView` with no additional members. Serves as a type contract for viewer settings views.
---
### IViewerSettingsViewModel
**Namespace:** `DTS.Common.Interface`
```csharp
public interface IViewerSettingsViewModel : IBaseViewModel
```
| Member | Type | Access | Description |
|--------|------|--------|-------------|
| `View` | `IViewerSettingsView` | get/set | Reference to the associated view instance. |
| `Parent` | `IBaseViewModel` | get/set | Reference to the parent view model in the hierarchy. |
| `PublishChanges()` | `void` | method | Publishes/commits current settings changes. Implementation behavior not specified in source. |
| `CalibrationBehaviorSettingVisibility` | `Visibility` | get/set | Controls visibility of the calibration behavior setting UI element. |
| `OverallSettingsVisibility` | `Visibility` | get | Read-only visibility state for overall settings panel. |
| `AvailableCalibrationBehaviors` | `DisplayedCalibrationBehavior[]` | get | Array of available calibration behavior options for selection. |
| `CalibrationBehaviorSetting` | `DisplayedCalibrationBehavior` | get/set | Currently selected calibration behavior setting. |
---
## 3. Invariants
- `IViewerSettingsView` must always be assignable to `IBaseView` (inheritance constraint).
- `IViewerSettingsViewModel` must always be assignable to `IBaseViewModel` (inheritance constraint).
- `AvailableCalibrationBehaviors` is read-only; consumers cannot replace the array reference, though the source does not specify whether the array contents are mutable.
- `OverallSettingsVisibility` is read-only; its value is determined internally by the implementing class.
**Unclear from source:**
- Whether `View` and `Parent` must be non-null at any point in the lifecycle.
- Whether `PublishChanges()` validates state before publishing or throws on invalid state.
- The relationship between `CalibrationBehaviorSettingVisibility` and `OverallSettingsVisibility`.
---
## 4. Dependencies
### This module depends on:
- `DTS.Common.Base` — for `IBaseView` and `IBaseViewModel` base interfaces
- `DTS.Common.Classes.Sensors` — for `DisplayedCalibrationBehavior` type
- `System.Windows` — for `Visibility` enumeration (WPF-specific)
### What depends on this module:
**Cannot be determined from source alone.** No consumers are shown in the provided files.
---
## 5. Gotchas
- **WPF Coupling:** The use of `System.Windows.Visibility` ties this interface to WPF. Porting to other UI frameworks would require abstraction changes.
- **Mutable Array Exposure:** `AvailableCalibrationBehaviors` returns an array (`DisplayedCalibrationBehavior[]`), not an immutable collection. If the implementing class does not defensively copy, callers could potentially modify array contents.
- **Setter on View Property:** The `View` property has a public setter, which may indicate the view can be swapped at runtime. Thread-safety implications are unclear from source.
- **PublishChanges Semantics:** The method name suggests a publish/subscribe or event-sourcing pattern, but the actual behavior (synchronous vs. asynchronous, error handling, side effects) is not specified in the interface.

View File

@@ -0,0 +1,208 @@
---
source_files:
- Common/DTS.CommonCore/Interface/DataRecorders/IHardwareChannel.cs
- Common/DTS.CommonCore/Interface/DataRecorders/IDASDBRecord.cs
- Common/DTS.CommonCore/Interface/DataRecorders/IDASHardware.cs
- Common/DTS.CommonCore/Interface/DataRecorders/IDASChannelDBRecord.cs
generated_at: "2026-04-16T12:21:21.272442+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "bca3af738f7131f7"
---
# Documentation: DTS.Common.Interface.DataRecorders
## 1. Purpose
This module defines the core interfaces for Data Acquisition System (DAS) hardware abstraction within the DTS system. It provides contracts for representing hardware channels (`IHardwareChannel`), DAS devices (`IDASHardware`), and their corresponding database persistence records (`IDASDBRecord`, `IDASChannelDBRecord`). These interfaces enable the system to interact with various types of data recording hardware—ranging from individual channels to complete rack systems—in a uniform, decoupled manner, supporting capabilities queries, hardware identification, and configuration persistence.
---
## 2. Public Interface
### IHardwareChannel
Represents an individual hardware channel on a DAS device.
| Member | Signature | Description |
|--------|-----------|-------------|
| `Diagnostics` | `IDiagnosticResult { get; }` | Diagnostic results for this channel; returns `null` if unavailable. |
| `IsSupportedBridgeType` | `bool IsSupportedBridgeType(SensorConstants.BridgeType bridgeType)` | Returns whether the channel supports the specified bridge type. |
| `ChannelNumber` | `int { get; }` | The channel number. |
| `GetId` | `string GetId()` | Returns the channel identifier. |
| `IsAnalog` | `bool { get; }` | Returns `true` if the channel supports analog sensors. |
| `IsSquib` | `bool { get; }` | Returns `true` if the channel supports squibs. |
| `IsDigitalOut` | `bool { get; }` | Returns `true` if the channel supports digital outputs. |
| `IsDigitalIn` | `bool { get; }` | Returns `true` if the channel supports digital inputs. |
| `IsUart` | `bool { get; }` | Returns `true` if the channel supports UART I/O. |
| `IsStreamIn` | `bool { get; }` | Returns `true` if the channel supports stream input. |
| `IsStreamOut` | `bool { get; }` | Returns `true` if the channel supports stream output. |
| `IsClock` | `bool { get; }` | Returns `true` if the channel supports clocks. |
| `IsTSRAIR` | `bool { get; }` | (Undocumented in XML comments.) |
| `IsTSRAIRModule` | `bool { get; }` | (Undocumented in XML comments.) |
| `GetParentDAS` | `IDASHardware GetParentDAS()` | Returns the DAS this channel belongs to. |
| `ModuleSerialNumber` | `string { get; set; }` | The module serial number this channel belongs to. |
| `IsSupportedExcitation` | `bool IsSupportedExcitation(ExcitationVoltageOptions.ExcitationVoltageOption excitation)` | Returns whether a given excitation voltage is supported. |
| `IsG5` | `bool IsG5()` | Returns `true` if the serial number starts with `"5M"`. |
| `ToString` | `string ToString(IDASHardware[] hardwares)` | Returns a string representation given an array of hardware. |
---
### IDASHardware
Represents a DAS hardware device (e.g., a rack, module, or standalone unit).
| Member | Signature | Description |
|--------|-----------|-------------|
| `IsStandIn` | `bool IsStandIn()` | Returns `true` if this is a stand-in for real hardware, not physical hardware itself. |
| `IsFirstUseValid` | `bool { get; }` | Whether hardware supports and is using first use date (ref: 15524). |
| `FirstUseDate` | `DateTime? { get; }` | First date of use after calibration; only valid if `IsFirstUseValid` is `true`. `null` indicates not used since calibration. |
| `IsPseudoRack` | `bool IsPseudoRack()` | (Undocumented in XML comments.) |
| `DASId` | `int { get; }` | The DAS identifier. |
| `SerialNumber` | `string { get; set; }` | Serial number of the hardware. |
| `SerialNumberFamily` | `string { get; set; }` | Serial number family. |
| `EIDFound` | `string { get; set; }` | (Undocumented in XML comments.) |
| `BatteryVoltageStatus` | `string { get; set; }` | Battery voltage status string. |
| `BatteryVoltageColor` | `System.Windows.Media.SolidColorBrush { get; set; }` | Color for battery voltage display. |
| `InputVoltageStatus` | `string { get; set; }` | Input voltage status string. |
| `InputVoltageColor` | `System.Windows.Media.SolidColorBrush { get; set; }` | Color for input voltage display. |
| `ParentDAS` | `string { get; set; }` | Used to display DAS connectivity in Hardware Scan. |
| `Connection` | `string { get; set; }` | Used to determine DAS connectivity for Hardware Scan. |
| `GetIHardwareChannels` | `IHardwareChannel[] GetIHardwareChannels()` | Returns all hardware channels on this DAS. |
| `IsSLICEEthernetController` | `bool { get; }` | Returns whether DAS is a SLICE Ethernet Controller. |
| `IsTDASRack` | `bool IsTDASRack()` | Returns `true` if the DAS is a TDAS rack. |
| `IsG5` | `bool IsG5()` | (Undocumented in XML comments.) |
| `IsTSRAIR` | `bool IsTSRAIR()` | (Undocumented in XML comments.) |
| `IsTSRAIRModule` | `bool IsTSRAIRModule()` | (Undocumented in XML comments.) |
| `GetMinSampleRateDouble` | `double GetMinSampleRateDouble()` | Returns the minimum sample rate allowed on this DAS. |
| `GetMaxSampleRateDouble` | `double GetMaxSampleRateDouble()` | Returns the maximum sample rate allowed on this DAS. |
| `IsModule` | `bool IsModule()` | Returns `true` for modules which should not be displayed in Hardware Scan (SLICE bridges); `false` for modules which should be displayed (TDAS rack modules). |
| `LastModifiedBy` | `string { get; set; }` | User who last modified this record. |
| `LastModified` | `DateTime { get; set; }` | Timestamp of last modification. |
| `DASTypeEnum` | `HardwareTypes { get; set; }` | The hardware type enumeration value. |
---
### IDASDBRecord
Encapsulates a DAS record for database persistence.
| Member | Signature | Description |
|--------|-----------|-------------|
| `DASId` | `int { get; set; }` | Database ID of the DAS record. |
| `SerialNumber` | `string { get; set; }` | Serial number. |
| `DASType` | `int { get; set; }` | DAS type as integer. |
| `MaxModules` | `int { get; set; }` | Maximum number of modules supported. |
| `MaxMemory` | `long { get; set; }` | Maximum memory in bytes. |
| `MaxSampleRate` | `double { get; set; }` | Maximum sample rate. |
| `MinSampleRate` | `double { get; set; }` | Minimum sample rate. |
| `FirmwareVersion` | `string { get; set; }` | Firmware version string. |
| `CalDate` | `DateTime { get; set; }` | Calibration date. |
| `ProtocolVersion` | `int { get; set; }` | Protocol version. |
| `LastModified` | `DateTime { get; set; }` | Last modification timestamp. |
| `LastModifiedBy` | `string { get; set; }` | User who last modified. |
| `Version` | `int { get; set; }` | Record version. |
| `LocalOnly` | `bool { get; set; }` | Whether record is local-only. |
| `LastUsed` | `DateTime { get; set; }` | Last used timestamp. |
| `LastUsedBy` | `string { get; set; }` | User who last used. |
| `Connection` | `string { get; set; }` | Used to determine DAS connectivity for Hardware Scan. |
| `Channels` | `int { get; set; }` | Number of channels. |
| `Position` | `string { get; set; }` | Position identifier. |
| `ChannelTypes` | `int[] { get; set; }` | Array of channel types. |
| `IsProgrammable` | `bool { get; set; }` | Whether hardware is programmable. |
| `IsReconfigurable` | `bool { get; set; }` | Whether hardware is reconfigurable. |
| `IsModule` | `bool { get; set; }` | Whether hardware operates as a rack module (`true`) or standalone (`false`). |
| `PositionOnDistributor` | `int { get; set; }` | Position on distributor. |
| `PositionOnChain` | `int { get; set; }` | Position on chain. |
| `Port` | `int { get; set; }` | Port number. |
| `ParentDAS` | `string { get; set; }` | Parent DAS identifier. |
| `FirstUseDate` | `DateTime? { get; set; }` | First use date after calibration; only valid if `IsFirstUseValid` is `true`. `null` indicates not used since calibration. (Ref: 15524) |
| `TestId` | `int? { get; set; }` | Test ID for stand-in hardware existing in a test only. (Ref: 15727) |
| `GroupId` | `int? { get; set; }` | Group ID for stand-in hardware existing in a group only. |
| `StandIn` | `bool { get; set; }` | Whether this is stand-in/dummy hardware, not physical hardware. |
| `MaxAAFRate` | `double { get; set; }` | Maximum AAF rate. |
| `IsFirstUseValid` | `bool { get; set; }` | Whether hardware supports and is using first use date. (Ref: 15524) |
---
### IDASChannelDBRecord
Describes a DAS channel database record with detailed bitmask configuration.
| Member | Signature | Description |
|--------|-----------|-------------|
| `HardwareId` | `string { get; set; }` | String ID for the hardware (format: `serialnumber_dastype`). |
| `DaschannelId` | `int { get; set; }` | Primary key of the DAS channel record. Annotated with `[Key]` and `[Column("DASChannelId")]`. |
| `Dasid` | `int? { get; set; }` | DAS database ID of the parent hardware. Annotated with `[Column("DASId")]`. |
| `ChannelIdx` | `int { get; set; }` | Physical channel index among channels on the DAS. |
| `SupportedBridges` | `int { get; set; }` | Bitmask for supported bridges (see Invariants for bit meanings). |
| `SupportedExcitations` | `int { get; set; }` | Bitmask for supported excitation options (see Invariants for bit meanings). |
| `DASDisplayOrder` | `int { get; set; }` | Display order among channels; may differ from physical order. Annotated with `[Column("DASDisplayOrder")]`. |
| `LocalOnly` | `bool { get; set; }` | Indicates local-only storage (deprecated per XML comment). |
| `SupportedDigitalInputModes` | `int { get; set; }` | Bitmask for digital input modes (see Invariants for bit meanings). |
| `SupportedSquibFireModes` | `int { get; set; }` | Bitmask for squib fire modes (see Invariants for bit meanings). |
| `SupportedDigitalOutputModes` | `int { get; set; }` | Bitmask for digital output modes (see Invariants for bit meanings). |
| `ModuleSerialNumber` | `string { get; set; }` | Module serial number. |
| `SettingId` | `int { get; set; }` | Setting ID. |
| `ModuleArrayIndex` | `int { get; set; }` | Array index of the module among modules on the DAS. |
---
## 3. Invariants
### First Use Date Validity
- `FirstUseDate` (on both `IDASHardware` and `IDASDBRecord`) is **only valid** when `IsFirstUseValid` is `true`.
- A `null` value for `FirstUseDate` indicates the hardware has not been used since calibration (only meaningful when `IsFirstUseValid` is `true`).
### Hardware ID Format
- `IDASChannelDBRecord.HardwareId` follows the format: `"serialnumber_dastype"`.
### Channel Ordering
- Physical channel order (`ChannelIdx`) and display order (`DASDisplayOrder`) **may not match** for some hardware types.
### SupportedBridges Bitmask (IDASChannelDBRecord)
| Bit | Meaning |
|-----|---------|
| 0 | IEPE |
| 1 | Quarter bridge |
| 2 | Half bridge |
| 3 | Full bridge |
| 4 | Digital input |
| 5 | Squib fire |
| 6 | Digital output |
| 7 | Half bridge signal plus (G5 signal plus) |
| 8 | RealTime Clock |
| 9 | UART |
### SupportedExcitations Bitmask (IDASChannelDBRecord)
| Bit | Meaning |
|-----|---------|
| 0 | Invalid excitation (undefined) |
| 1 | 2V |
| 2 | 2.5V |
| 3 | 3V |
| 4 | 5V |
| 5 | 10V |
| 6 | 1V |
### SupportedDigitalInputModes Bitmask (IDASChannelDBRecord)
| Bit | Meaning |
|-----|---------|
| 0 | Invalid mode |
| 1 | Transition low to high (TLH) |
| 2 | Transition high to low (THL) |
| 3 | Contact closure normally open (CCNO) |
| 4 | Contact closure normally closed (CCNC) |
### SupportedSquibFireModes Bitmask (IDASChannelDBRecord)
| Bit | Meaning |
|-----|---------|
| 0 | Invalid mode (fire mode not set) |
| 1 | Capacitor discharge |
| 2 | Constant current |
| 3 | AC discharge |
### SupportedDigitalOutputModes Bitmask (IDASChannelDBRecord)
| Bit | Meaning |
|-----|---------|
| 0 |

View File

@@ -0,0 +1,181 @@
---
source_files:
- Common/DTS.CommonCore/Interface/Database/IDatabaseCopyView.cs
- Common/DTS.CommonCore/Interface/Database/IDatabaseSwitchView.cs
- Common/DTS.CommonCore/Interface/Database/IDatabaseStatusBarView.cs
- Common/DTS.CommonCore/Interface/Database/IDatabaseSwitchViewModel.cs
- Common/DTS.CommonCore/Interface/Database/IUserDbRecord.cs
- Common/DTS.CommonCore/Interface/Database/IDatabaseCopyViewModel.cs
- Common/DTS.CommonCore/Interface/Database/IDatabaseStatusBarViewModel.cs
generated_at: "2026-04-16T12:08:57.334036+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "142a1b67b74ee9e9"
---
# Documentation: DTS.Common.Interface.Database
## 1. Purpose
This module defines the contract layer for database-related UI operations within the DTS system. It provides interfaces for views and view models that handle database copying from remote to local databases, switching between remote and local database connections, displaying database connection status in a status bar, and representing user records stored in the database. The module follows a Model-View-ViewModel (MVVM) pattern, with all view models extending from `IBaseViewModel` and views extending from `IBaseView`.
---
## 2. Public Interface
### IDatabaseCopyView
```csharp
public interface IDatabaseCopyView : IBaseView { }
```
Marker interface for a view associated with database copy operations. No members defined.
---
### IDatabaseSwitchView
```csharp
public interface IDatabaseSwitchView : IBaseView { }
```
Marker interface for a view associated with database switching operations. No members defined.
---
### IDatabaseStatusBarView
```csharp
public interface IDatabaseStatusBarView : IBaseView { }
```
Marker interface for a view associated with the database status bar. No members defined.
---
### IDatabaseSwitchViewModel
```csharp
public interface IDatabaseSwitchViewModel : IBaseViewModel
```
ViewModel interface for transferring a remote database to a local database. Clears the local database and populates it with the remote database.
**Properties:**
| Signature | Description |
|-----------|-------------|
| `IDatabaseSwitchView View { get; set; }` | The view associated with the model |
| `bool RemoteIsActive { get; }` | Indicates whether remote database is currently active |
| `string DefaultDbName { get; }` | Gets the default database name |
| `string DbHost { get; }` | Gets the database host |
| `bool NTLMAuthentication { get; }` | Gets whether NTLM authentication is enabled |
| `string DbUser { get; }` | Gets the database user |
| `string DbPassword { get; }` | Gets the database password |
**Methods:**
| Signature | Description |
|-----------|-------------|
| `void Unset()` | Frees up any memory associated with the viewmodel |
| `void InitializeDbSettings(string defaultDbName, string dbHost, bool ntlmAuthentication, string dbUser, string dbPassword)` | Initializes database connection settings |
| `void SwitchRemote()` | Switches to the remote database |
| `void SwitchLocal()` | Switches to the local database |
---
### IUserDbRecord
```csharp
public interface IUserDbRecord
```
Interface representing a user record in the database.
**Properties:**
| Signature | Description |
|-----------|-------------|
| `int ID { get; set; }` | Database ID of the user |
| `string UserName { get; set; }` | User name of the user. **Must be unique** |
| `string DisplayName { get; set; }` | String to use when displaying user in UI |
| `string Password { get; set; }` | Hashed and salted password value (plain text passwords are not stored) |
| `short Role { get; set; }` | Role of the user |
| `DateTime LastModified { get; set; }` | DateTime the user was last modified |
| `string LastModifiedBy { get; set; }` | User that last modified this user record |
| `bool LocalOnly { get; set; }` | Whether user should be synchronized between local and remote databases. **Deprecated** |
---
### IDatabaseCopyViewModel
```csharp
public interface IDatabaseCopyViewModel : IBaseViewModel
```
ViewModel interface for transferring a remote database to a local database. Clears the local database and populates it with the remote database.
**Properties:**
| Signature | Description |
|-----------|-------------|
| `IDatabaseCopyView View { get; set; }` | The view associated with the model |
| `string DbName { get; }` | Gets the database name |
| `IStatusAndProgressBarView OverallProgressBarView { get; }` | The overall status/progress view |
| `IStatusAndProgressBarView CurrentTaskProgressBarView { get; }` | Current task status/progress view |
| `DbType DatabaseType { get; }` | Gets the database type |
| `bool CopyEnabled { get; }` | Gets whether copy operation is enabled |
| `bool IsCopyVisible { get; set; }` | Gets or sets copy visibility |
**Methods:**
| Signature | Description |
|-----------|-------------|
| `void Unset()` | Frees up any memory associated with the viewmodel |
| `void CopyDatabase()` | Copies from remote database to local database (uses `DTS.Common.Storage` to determine local and remote) |
| `void InitializeState(DbType dbType, string dbName)` | Initializes viewmodel state |
---
### IDatabaseStatusBarViewModel
```csharp
public interface IDatabaseStatusBarViewModel : IBaseViewModel
```
ViewModel interface handling the logic for database status in a UI, including current connection and status.
**Properties:**
| Signature | Description |
|-----------|-------------|
| `IDatabaseStatusBarView View { get; set; }` | The associated view for the model |
| `DbType DatabaseType { get; }` | Gets the database type (populated via `InitializeValues`) |
| `bool RemoteConnected { get; }` | Gets whether the remote database is connected (populated via `InitializeValues`) |
| `string ServerName { get; }` | Gets the server name, not database name (populated via `InitializeValues`) |
| `string ActiveDbName { get; }` | Returns the current active database name (either server name or local depending on db type and remote connection status) |
| `Brush BackgroundBrush { get; }` | Returns the background brush for the active database name |
**Methods:**
| Signature | Description |
|-----------|-------------|
| `void Unset()` | Frees up any memory associated with the viewmodel |
| `void InitializeValues(DbType dbType, string serverName, bool remoteConnected)` | Sets the initial values for database type, server name, and remote connection status |
---
## 3. Invariants
- **IUserDbRecord.UserName** must be unique across all user records.
- **IUserDbRecord.Password** must be a hashed and salted value; plain text passwords must never be stored in the database.
- **IDatabaseCopyViewModel** and **IDatabaseSwitchViewModel** require that the local database already has the correct tables and stored procedures before copy/switch operations can be performed.
- All ViewModels must have their initialization methods called (`InitializeState`, `InitializeDbSettings`, or `InitializeValues`) before their properties can be meaningfully accessed.
- `Unset()` should be called to clean up resources when a ViewModel is no longer needed.
---
## 4. Dependencies
### This module depends on:
- **DTS.Common.Base** — Provides `IBaseView`, `IBaseViewModel`, and `IStatusAndProgressBarView`
- **DTS.Common.Enums.Database** — Provides `DbType` enumeration
- **DTS.Common.Storage** — Referenced in documentation as the source for determining local and remote database locations (actual dependency not visible in imports)
- **System.Windows.Media** — Provides `Brush` class (used in `IDatabaseStatusBarViewModel`)
- **System** — Provides `DateTime` (used in `IUserDbRecord`)
### What depends on this module:
- Cannot be determined from source alone. Concrete implementations of these interfaces would exist elsewhere in the codebase.
---
## 5. Gotchas
1. **Deprecated Property**: `IUserDbRecord.LocalOnly` is marked as deprecated. New code should not rely on this property for synchronization logic between local and remote databases.
2. **Preconditions for Copy/Switch**: Both `IDatabaseCopyViewModel` and `IDatabaseSwitchViewModel` explicitly require that the local database already has the correct schema (tables and stored procedures) before operations can succeed. This is not validated by the interfaces themselves.
3. **ServerName vs Database Name**: `IDatabaseStatusBarViewModel.ServerName` returns the server name, not the database name. The actual active database name is available via `ActiveDbName`.
4. **Commented-Out Method**: `IDatabaseSwitchViewModel` has a commented-out method signature `//void SetDefaultDbName(string defaultDbName);` suggesting this functionality was removed or never implemented. The reason is unclear from source alone.
5. **WPF Dependency**: The use of `System.Windows.Media.Brush` in `IDatabaseStatusBarViewModel` indicates a WPF-specific dependency, which may limit portability to other UI frameworks.

View File

@@ -0,0 +1,47 @@
---
source_files:
- Common/DTS.CommonCore/Interface/DownloadData/IDownloadDataView.cs
- Common/DTS.CommonCore/Interface/DownloadData/IDownloadDataViewModel.cs
generated_at: "2026-04-16T12:17:08.936258+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "3467185c7a4c208b"
---
# Documentation: Download Data Interfaces
## 1. Purpose
This module defines the contractual interfaces for the View and ViewModel components within a "Download Data" feature, adhering to a Model-View-ViewModel (MVVM) architectural pattern. It establishes a type hierarchy for download-specific UI components by extending base view and viewModel interfaces, allowing for polymorphic handling of download views within the broader `DTS.Common` system.
## 2. Public Interface
### `IDownloadDataView`
* **Namespace:** `DTS.Common.Interface`
* **Inheritance:** `IBaseView`
* **Signature:**
```csharp
public interface IDownloadDataView : IBaseView
```
* **Description:** A marker interface intended to represent the View layer for a data download operation. It inherits from `IBaseView` but defines no additional members.
### `IDownloadDataViewModel`
* **Namespace:** `DTS.Common`
* **Inheritance:** `IBaseViewModel`
* **Signature:**
```csharp
public interface IDownloadDataViewModel : IBaseViewModel
```
* **Description:** A marker interface intended to represent the ViewModel layer for a data download operation. It inherits from `IBaseViewModel` but defines no additional members.
## 3. Invariants
* **Base Type Compliance:** Any class implementing `IDownloadDataView` must also implement `IBaseView`. Similarly, any class implementing `IDownloadDataViewModel` must also implement `IBaseViewModel`.
* **Member Expectations:** As both interfaces currently define no members, they rely entirely on the contracts defined by their parent interfaces (`IBaseView` and `IBaseViewModel`).
## 4. Dependencies
* **External Dependencies:**
* `DTS.Common.Base`: Both interfaces depend on this namespace for `IBaseView` and `IBaseViewModel`.
* **Dependents:** Unknown from source alone. It is expected that concrete View and ViewModel classes within the "Download Data" feature will implement these interfaces.
## 5. Gotchas
* **Empty Interfaces:** Both `IDownloadDataView` and `IDownloadDataViewModel` are currently empty (marker interfaces). They do not define properties such as `DownloadCommand`, `ProgressPercentage`, or `Cancel` methods that one might expect for a download feature. Functionality must be inferred from the base interfaces or implemented in concrete classes without interface enforcement.
* **Namespace Inconsistency:** The View interface (`IDownloadDataView`) resides in `DTS.Common.Interface`, while the ViewModel interface (`IDownloadDataViewModel`) resides in the root `DTS.Common` namespace. This discrepancy may cause confusion regarding file organization or referencing.

View File

@@ -0,0 +1,49 @@
---
source_files:
- Common/DTS.CommonCore/Interface/DownloadEvent/IDownloadEvent.cs
generated_at: "2026-04-16T12:13:29.485943+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "089f2c1bff740fce"
---
# Documentation: IDownloadEvent.cs
## 1. Purpose
This module defines the `IDownloadEvent` interface within the `DTS.Common.Interface.DownloadEvent` namespace. It serves as a data contract for representing a "Multiple download event" (as noted in source comments). The interface is designed for UI data-binding scenarios, indicated by its inheritance from `INotifyPropertyChanged`, and encapsulates properties regarding an event's identification, interactive state (enabled/readonly), duration, and display logic.
## 2. Public Interface
### Interface: `IDownloadEvent`
Inherits from: `INotifyPropertyChanged`
**Properties:**
* `int EventNumber { get; set; }`
* Gets or sets the numeric identifier for the download event.
* `string EventNumberDisplay { get; set; }`
* Gets or sets the string representation of the event number, intended for UI display purposes.
* `bool IsEnabled { get; set; }`
* Gets or sets a value indicating whether the download event is enabled.
* `bool IsReadonly { get; set; }`
* Gets or sets a value indicating whether the download event is read-only.
* `bool IsDefault { get; }`
* Gets a value indicating whether this instance is the default event. This property is read-only (has no setter).
* `TimeSpan EventLength { get; set; }`
* Gets or sets the total length available for the download event.
* `bool ShouldDisplayLength { get; set; }`
* Gets or sets a value indicating whether the event length should be displayed in the UI.
## 3. Invariants
* **INotifyPropertyChanged Contract:** Any class implementing `IDownloadEvent` must implement the `PropertyChanged` event from `INotifyPropertyChanged`. Implementations are expected to raise this event when property values change to support UI binding.
* **Read-Only State:** The `IsDefault` property is strictly read-only. Implementations must calculate or determine this state internally; it cannot be set externally via the interface.
## 4. Dependencies
* **System**: Required for the `TimeSpan` type.
* **System.ComponentModel**: Required for the `INotifyPropertyChanged` interface.
* **Consumers**: Unknown from this source file alone, though the namespace `DTS.Common.Interface.DownloadEvent` suggests it is consumed by UI components or ViewModels handling download logic within the DTS system.
## 5. Gotchas
* **Dual Event Number Properties:** The interface defines both `EventNumber` (int) and `EventNumberDisplay` (string). The source does not define the relationship between them (e.g., if setting one automatically updates the other). Developers should verify the synchronization logic in the concrete implementation.
* **IsDefault Logic:** Because `IsDefault` has no setter, the logic determining what makes an event "default" is encapsulated within the implementation. Developers cannot force an event to be default via this interface.
* **Comment Reference:** The comment `//FB 6399` references a specific issue tracking ID (likely FogBugz), suggesting this interface was created to address a specific requirement or bug regarding "Multiple download events."

View File

@@ -0,0 +1,64 @@
---
source_files:
- Common/DTS.CommonCore/Interface/EngineerDetails/IEngineerDetailsView.cs
- Common/DTS.CommonCore/Interface/EngineerDetails/IEngineerDetailsViewModel.cs
generated_at: "2026-04-16T12:11:30.697854+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "feca2337b3dd2d0e"
---
# Documentation: Engineer Details Interfaces
## 1. Purpose
This module defines two empty marker interfaces, `IEngineerDetailsView` and `IEngineerDetailsViewModel`, which establish the View and ViewModel contracts for an "Engineer Details" feature within the DTS application. These interfaces follow the MVVM (Model-View-ViewModel) architectural pattern and exist primarily to provide type-specific identification and dependency injection registration points by extending base view and view model interfaces.
---
## 2. Public Interface
### `IEngineerDetailsView`
- **Namespace:** `DTS.Common.Interface`
- **Inherits from:** `IBaseView` (from `DTS.Common.Base`)
- **Signature:**
```csharp
public interface IEngineerDetailsView : IBaseView { }
```
- **Behavior:** Empty marker interface. No members defined. Relies entirely on the contract defined by `IBaseView`.
---
### `IEngineerDetailsViewModel`
- **Namespace:** `DTS.Common.Interface`
- **Inherits from:** `IBaseViewModel` (from `DTS.Common.Base`)
- **Signature:**
```csharp
public interface IEngineerDetailsViewModel : IBaseViewModel { }
```
- **Behavior:** Empty marker interface. No members defined. Relies entirely on the contract defined by `IBaseViewModel`.
---
## 3. Invariants
- Both interfaces are empty and define no additional members beyond their base interfaces.
- Any invariants are inherited from `IBaseView` and `IBaseViewModel` respectively; the specific constraints of those base interfaces are not visible in the provided source.
- Implementations of these interfaces must fulfill the contracts of their respective base types.
---
## 4. Dependencies
### This module depends on:
- `DTS.Common.Base` — provides `IBaseView` and `IBaseViewModel` base interfaces.
### What depends on this module:
- **Cannot be determined from source alone.** Consumers would typically include concrete View and ViewModel implementations, dependency injection registration modules, or navigation/routing components within the DTS system.
---
## 5. Gotchas
- **Marker interfaces with no members:** Both interfaces are empty and serve only as type identifiers. They do not define any Engineer Details-specific properties, methods, or events. All functionality must come from the base interfaces or be added via extension methods elsewhere.
- **Base interface contracts unknown:** The actual capabilities and requirements of these interfaces depend entirely on `IBaseView` and `IBaseViewModel`, which are not included in the provided source. Developers should consult those base definitions to understand the full contract.

View File

@@ -0,0 +1,74 @@
---
source_files:
- Common/DTS.CommonCore/Interface/ExportData/IExportDataView.cs
- Common/DTS.CommonCore/Interface/ExportData/IExportDataViewModel.cs
- Common/DTS.CommonCore/Interface/ExportData/IExportHeader.cs
generated_at: "2026-04-16T12:19:27.871731+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "ccb8183959611900"
---
# Documentation: DTS.Common.Interface.ExportData
## 1. Purpose
This module defines core interfaces for the data export subsystem within the DTS application. It establishes contracts for the view/viewmodel pair in an MVVM architecture and provides a data structure interface for representing export column headers with selection state. The interfaces serve as integration points between the export functionality and the broader application framework.
---
## 2. Public Interface
### `IExportDataView`
**Namespace:** `DTS.Common.Interface`
**Inheritance:** `IBaseView`
A marker interface for export data views. Defines no members; exists to provide type identity for views that participate in data export operations.
---
### `IExportDataViewModel`
**Namespace:** `DTS.Common.Interface`
**Inheritance:** `IBaseViewModel`
A marker interface for export data view models. Defines no members; exists to provide type identity for view models that support data export operations.
---
### `IExportHeader`
**Namespace:** `DTS.Common.Interface.ExportData`
**Inheritance:** `INotifyPropertyChanged`
Defines a selectable header item for export column configuration.
| Property | Type | Access | Description |
|----------|------|--------|-------------|
| `HeaderName` | `string` | get/set | The display name of the export header/column |
| `IsSelected` | `bool` | get/set | Indicates whether this header/column is selected for export |
---
## 3. Invariants
- **Namespace inconsistency:** `IExportHeader` resides in `DTS.Common.Interface.ExportData`, while `IExportDataView` and `IExportDataViewModel` reside in `DTS.Common.Interface`. Consumers must reference the correct namespace for each type.
- **Property change notification:** Implementations of `IExportHeader` must raise `PropertyChanged` events when `HeaderName` or `IsSelected` changes, as required by `INotifyPropertyChanged` inheritance.
- **Base contract compliance:** All three interfaces inherit from framework base types (`IBaseView`, `IBaseViewModel`, `INotifyPropertyChanged`), implying implementations must satisfy those base contracts as well.
---
## 4. Dependencies
### This module depends on:
- `DTS.Common.Base` — provides `IBaseView` and `IBaseViewModel` base interfaces
- `System.ComponentModel` — provides `INotifyPropertyChanged` interface
### What depends on this module:
- **Cannot be determined from source alone.** Consumers would typically be concrete view/viewmodel implementations and export-related services.
---
## 5. Gotchas
- **Marker interfaces with no members:** `IExportDataView` and `IExportDataViewModel` define no members beyond their base interfaces. Their utility appears limited to type identification/constraint purposes. It is unclear from source alone whether this is intentional design or incomplete implementation.
- **Inconsistent namespace depth:** `IExportHeader` is placed in a more specific namespace (`ExportData` sub-namespace) while the view/viewmodel interfaces are not. The rationale for this inconsistency is not evident from the source.
- **No validation contracts:** `IExportHeader.HeaderName` has no nullability annotation or validation requirements defined in the interface. Implementations may handle null/empty strings differently.

View File

@@ -0,0 +1,89 @@
---
source_files:
- Common/DTS.CommonCore/Interface/Graphs/IGraph.cs
- Common/DTS.CommonCore/Interface/Graphs/IGraphRecord.cs
generated_at: "2026-04-16T12:18:31.651015+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "a5e5bc31a5802f38"
---
# Documentation: DTS.Common.Interface.Graphs
## 1. Purpose
This module defines the data contract for graph configuration within the DTS system. It provides two interfaces—`IGraphRecord` and `IGraph`—that model graph definitions persisted to a database, including axis bounds, channel assignments, and threshold markers. `IGraphRecord` represents the pure data shape of a database record, while `IGraph` extends it with runtime behaviors for channel management, XML serialization, and string synchronization. These interfaces serve as the abstraction layer between graph persistence and graph rendering/management components.
---
## 2. Public Interface
### IGraphRecord
Base interface describing a database record for a graph configuration.
| Property | Type | Access | Description |
|----------|------|--------|-------------|
| `GraphId` | `int` | get/set | Database primary key for the graph. |
| `TestSetupId` | `int` | get/set | Foreign key linking the graph to a test setup. |
| `GraphName` | `string` | get/set | Display name of the graph. Constrained to 50 characters via `[MaxLength(50)]`. |
| `GraphDescription` | `string` | get/set | Description text for the graph. Constrained to 50 characters via `[MaxLength(50)]`. |
| `ChannelsString` | `string` | get/set | Serialized representation of all channels in the graph. Constrained to 2048 characters via `[MaxLength(2048)]`. |
| `UseDomainMin` | `bool` | get/set | Flag indicating whether the domain (X) axis has a minimum bound. |
| `DomainMin` | `double` | get/set | Minimum value for the domain axis. Only meaningful when `UseDomainMin` is `true`. |
| `UseDomainMax` | `bool` | get/set | Flag indicating whether the domain (X) axis has a maximum bound. |
| `DomainMax` | `double` | get/set | Maximum value for the domain axis. Only meaningful when `UseDomainMax` is `true`. |
| `UseRangeMin` | `bool` | get/set | Flag indicating whether the range (Y) axis has a minimum bound. |
| `RangeMin` | `double` | get/set | Minimum value for the range axis. Only meaningful when `UseRangeMin` is `true`. |
| `UseRangeMax` | `bool` | get/set | Flag indicating whether the range (Y) axis has a maximum bound. |
| `RangeMax` | `double` | get/set | Maximum value for the range axis. Only meaningful when `UseRangeMax` is `true`. |
| `ThresholdsString` | `string` | get/set | Serialized representation of threshold lines to display on the graph. Constrained to 2048 characters via `[MaxLength(2048)]`. |
| `LocalOnly` | `bool` | get/set | Flag indicating whether to synchronize the record with a central database. **Marked as deprecated in XML documentation.** |
---
### IGraph
Extends `IGraphRecord` with runtime operations for channel management and serialization.
| Method | Signature | Description |
|--------|-----------|-------------|
| `AddChannel` | `void AddChannel(IGroupChannel groupChannel)` | Adds a group channel to the graph. |
| `RemoveChannel` | `void RemoveChannel(IGroupChannel groupChannel)` | Removes a group channel from the graph. |
| `ReadXML` | `void ReadXML(System.Xml.XmlElement root, IReadOnlyDictionary<long, IGroupChannel> channelLookup)` | Deserializes graph configuration from an XML element. Uses the provided `channelLookup` dictionary to resolve channel references by their `long` key. |
| `WriteXML` | `void WriteXML(ref System.Xml.XmlWriter writer)` | Serializes the graph configuration to XML using the provided `XmlWriter`. The writer is passed by reference. |
| `UpdateChannelAndThresholdStrings` | `void UpdateChannelAndThresholdStrings()` | Synchronizes the `ChannelsString` and `ThresholdsString` properties from the in-memory `GroupChannels` and `Thresholds` collections. |
---
## 3. Invariants
- **String Length Constraints**: `GraphName` and `GraphDescription` must not exceed 50 characters. `ChannelsString` and `ThresholdsString` must not exceed 2048 characters. These are enforced via `MaxLengthAttribute` annotations.
- **Conditional Axis Bounds**: `DomainMin`, `DomainMax`, `RangeMin`, and `RangeMax` values are only semantically valid when their corresponding `Use*` flags are `true`. The interface does not enforce this at compile time.
- **Channel Lookup Key Type**: The `ReadXML` method expects channel lookups to use `long` keys.
- **Inheritance Relationship**: All implementations of `IGraph` must also implement `IGraphRecord`.
---
## 4. Dependencies
### This module depends on:
- `DTS.Common.Interface.Channels` — for `IGroupChannel` type used in channel management methods
- `System.Collections.Generic` — for `IReadOnlyDictionary<long, IGroupChannel>` parameter
- `System.ComponentModel.DataAnnotations` — for `MaxLengthAttribute` on `IGraphRecord` properties
- `System.Xml` — for `XmlElement` and `XmlWriter` types in serialization methods
### What depends on this module:
- **Cannot be determined from source alone** — no consumers are shown in these files.
---
## 5. Gotchas
- **Deprecated Property**: `LocalOnly` is explicitly marked as deprecated in the XML documentation. Its purpose (controlling synchronization with a central database) suggests historical functionality that may no longer be in use or is planned for removal.
- **Asymmetric XML API**: `ReadXML` accepts an `XmlElement` (a node-oriented approach), while `WriteXML` accepts a `ref XmlWriter` (a streaming writer approach). This asymmetry may complicate round-trip serialization logic.
- **Hidden Properties Referenced**: The `UpdateChannelAndThresholdStrings` method documentation references `GroupChannels` and `Thresholds` properties that are **not defined in either interface**. These are presumably defined on concrete implementations or another partial interface not shown here. The relationship between these collections and the string properties is managed by this method.
- **String Serialization Format**: The format of `ChannelsString` and `ThresholdsString` is not specified in these interfaces. Implementations must define and document their own serialization scheme (e.g., comma-separated IDs, JSON, custom format).

View File

@@ -0,0 +1,276 @@
---
source_files:
- Common/DTS.CommonCore/Interface/GroupTemplate/IGroupTemplateListView.cs
- Common/DTS.CommonCore/Interface/GroupTemplate/IGroupTemplateExportView.cs
- Common/DTS.CommonCore/Interface/GroupTemplate/IGroupTemplateImportView.cs
- Common/DTS.CommonCore/Interface/GroupTemplate/ITemplateChannelListView.cs
- Common/DTS.CommonCore/Interface/GroupTemplate/IGroupTemplateInfoControlView.cs
- Common/DTS.CommonCore/Interface/GroupTemplate/IGroupTemplateViewModel.cs
- Common/DTS.CommonCore/Interface/GroupTemplate/IGroupTemplateInfoControlViewModel.cs
- Common/DTS.CommonCore/Interface/GroupTemplate/IGroupTemplate.cs
- Common/DTS.CommonCore/Interface/GroupTemplate/IGroupTemplateListViewModel.cs
- Common/DTS.CommonCore/Interface/GroupTemplate/ITemplateChannelListViewModel.cs
- Common/DTS.CommonCore/Interface/GroupTemplate/IGroupTemplateChannel.cs
- Common/DTS.CommonCore/Interface/GroupTemplate/ITestObjectTemplate.cs
generated_at: "2026-04-16T12:16:13.665831+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "7ad50e5b491c81bf"
---
# GroupTemplate Interface Module Documentation
## 1. Purpose
This module defines the contract layer for the Group Template subsystem within the DTS application. It provides interfaces for Views, ViewModels, and data models that manage group templates—entities that associate channels with groups and support import/export functionality. The module follows a Model-View-ViewModel (MVVM) architecture, separating presentation concerns from business logic. These interfaces enable testability and decoupling between concrete implementations and their consumers.
---
## 2. Public Interface
### View Interfaces (Marker Interfaces)
| Interface | Namespace | Base | Description |
|-----------|-----------|------|-------------|
| `IGroupTemplateListView` | `DTS.Common.Interface.GroupTemplate` | `IBaseView` | Marker interface for list view |
| `IGroupTemplateExportView` | `DTS.Common.Interface.GroupTemplate` | `IBaseView` | Marker interface for export view |
| `IGroupTemplateImportView` | `DTS.Common.Interface.GroupTemplate` | `IBaseView` | Marker interface for import view |
| `ITemplateChannelListView` | `DTS.Common.Interface.GroupTemplate` | `IBaseView` | Marker interface for channel list view |
| `IGroupTemplateInfoControlView` | `DataPro.Common.Interface` | `IBaseView` | Marker interface for info control view |
---
### `IGroupTemplateViewModel`
**Namespace:** `DTS.Common.Interface.GroupTemplate`
**Base:** `IBaseViewModel`
```csharp
IGroupTemplateImportView ImportView { get; set; }
IGroupTemplateExportView ExportView { get; set; }
void Unset();
```
- **ImportView/ExportView**: Properties for accessing import/export view implementations.
- **Unset()**: Clears or resets the view model state. Behavior implementation-specific.
---
### `IGroupTemplateInfoControlViewModel`
**Namespace:** `DataPro.Common.Interface`
**Base:** `IBaseViewModel`
```csharp
IGroupTemplateInfoView View { get; }
IGroupTemplateModel SelectedGroupTemplate { get; set; }
```
- **View**: Read-only property returning the associated Shell View.
- **SelectedGroupTemplate**: Gets or sets the currently selected group template model.
---
### `IGroupTemplate`
**Namespace:** `DTS.Common.Interface.GroupTemplate`
```csharp
bool Disabled { get; set; }
string Name { get; set; }
string Description { get; set; }
string Channels { get; set; }
string AssociatedGroups { get; set; }
string LastModifiedBy { get; set; }
DateTime LastModified { get; set; }
string SerialNumber { get; set; }
bool Filter(string term);
```
- **Disabled**: Flag indicating whether the template is disabled.
- **Name/Description**: Template identification and documentation.
- **Channels/AssociatedGroups**: String representations of related entities (format unclear from interface).
- **LastModifiedBy/LastModified**: Audit tracking fields.
- **SerialNumber**: Unique identifier for the template.
- **Filter(string term)**: Returns `true` if the template matches the search term; matching criteria implementation-specific.
---
### `IGroupTemplateListViewModel`
**Namespace:** `DTS.Common.Interface.GroupTemplate`
**Base:** `IBaseViewModel`, `IFilterableListView`
```csharp
IGroupTemplateListView View { get; set; }
void GetAllTemplates(bool bIncludeEmbedded, bool bISOMode);
void Unset();
void Sort(object o, bool columnClick);
IGroupTemplate[] Templates { get; set; }
void Filter(string term);
void MouseDoubleClick(int index);
```
- **View**: Associated list view instance.
- **GetAllTemplates(bool bIncludeEmbedded, bool bISOMode)**: Loads templates; `bIncludeEmbedded` controls whether embedded templates are included, `bISOMode` behavior unclear from interface.
- **Unset()**: Clears view model state.
- **Sort(object o, bool columnClick)**: Sorts the template list; `o` represents the sort criteria, `columnClick` indicates sort direction toggle behavior.
- **Templates**: Array of loaded templates.
- **Filter(string term)**: Filters the template list by search term.
- **MouseDoubleClick(int index)**: Handles double-click interaction on the template at the specified index.
---
### `ITemplateChannelListViewModel`
**Namespace:** `DTS.Common.Interface.GroupTemplate`
**Base:** `IBaseViewModel`
```csharp
ITemplateChannelListView View { get; set; }
void Unset();
void Sort(object o, bool columnClick);
void Filter(string term);
void SetAllChannels(IGroupTemplateChannel[] channels);
IGroupTemplateChannel[] GetAllChannels();
void MoveDown(IGroupTemplateChannel channel);
void MoveUp(IGroupTemplateChannel channel);
void SetParent(object o);
```
- **View**: Associated channel list view instance.
- **Unset()**: Clears view model state.
- **Sort(object o, bool columnClick)**: Sorts channels; parameters same as list view model.
- **Filter(string term)**: Filters channels by search term.
- **SetAllChannels(IGroupTemplateChannel[] channels)**: Replaces the channel collection.
- **GetAllChannels()**: Returns the current channel array.
- **MoveDown/MoveUp(IGroupTemplateChannel channel)**: Adjusts `DisplayOrder` of the specified channel relative to siblings.
- **SetParent(object o)**: Associates the channel list with a parent object; type of `o` unclear from interface.
---
### `IGroupTemplateChannel`
**Namespace:** `DTS.Common.Interface.GroupTemplate`
```csharp
bool Custom { get; }
int DisplayOrder { get; set; }
string NameOfTheChannel { get; set; }
string Name { get; }
bool Required { get; set; }
string ISOCode { get; }
bool Filter(string term);
```
- **Custom**: Read-only flag indicating whether the channel is user-defined.
- **DisplayOrder**: Sortable position index.
- **NameOfTheChannel**: Mutable channel name.
- **Name**: Read-only name property (relationship to `NameOfTheChannel` unclear).
- **Required**: Flag indicating whether the channel is mandatory.
- **ISOCode**: Read-only ISO code identifier.
- **Filter(string term)**: Returns `true` if the channel matches the search term.
---
### `GroupTemplateChannelComparer`
**Namespace:** `DTS.Common.Interface.GroupTemplate`
**Base:** `IComparer<IGroupTemplateChannel>`
```csharp
GroupTemplateChannelFields SortField { get; set; }
bool Ascending { get; set; }
int Compare(IGroupTemplateChannel x, IGroupTemplateChannel y);
```
- **SortField**: Enum value from `GroupTemplateChannelFields` determining sort criteria.
- **Ascending**: Direction flag; `true` for ascending, `false` for descending.
- **Compare(IGroupTemplateChannel x, IGroupTemplateChannel y)**: Compares two channels based on `SortField`. Handles nulls (null < non-null). Throws `ArgumentOutOfRangeException` for unrecognized `SortField` values.
---
### `ITestObjectTemplate`
**Namespace:** `DTS.Common.Interface.GroupTemplate`
```csharp
string TemplateName { get; set; }
string TemplateNameOrOriginalTemplateName { get; }
string Icon { get; set; }
string Description { get; set; }
bool LocalOnly { get; set; }
int Version { get; set; }
string LastModifiedBy { get; set; }
DateTime LastModified { get; set; }
int CRC32 { get; set; }
string TestObject { get; set; }
string TestObjectType { get; set; }
string TemplateParent { get; set; }
bool SysBuilt { get; set; }
string OriginalTemplateName { get; set; }
bool Embedded { get; set; }
bool IsISOMode();
```
- **TemplateName**: Identifier; may be a GUID for embedded templates.
- **TemplateNameOrOriginalTemplateName**: Read-only human-readable name.
- **Icon/Description**: UI display properties.
- **LocalOnly**: Restricts template to local use.
- **Version**: Version number (comment notes "not currently used").
- **CRC32**: Checksum value (comment notes "not currently used").
- **TestObject/TestObjectType**: ISO meta fields.
- **TemplateParent**: Parent template reference (usage unclear per comments).
- **SysBuilt**: System-generated flag.
- **OriginalTemplateName**: Preserved name when embedded (GUID assigned as new `TemplateName`).
- **Embedded**: Indicates whether template is embedded in a test setup.
- **IsISOMode()**: Returns ISO mode status; implementation-specific.
---
## 3. Invariants
1. **Null Handling in Comparer**: `GroupTemplateChannelComparer.Compare` treats `null` as less than any non-null value. Two nulls are equal (returns 0).
2. **DisplayOrder Consistency**: `MoveUp` and `MoveDown` operations on `ITemplateChannelListViewModel` must maintain consistent `DisplayOrder` values across the channel collection.
3. **Embedded Template Naming**: When `ITestObjectTemplate.Embedded` is `true`, `TemplateName` is expected to be a GUID, while `OriginalTemplateName` preserves the human-readable name.
4. **SortField Enum Coverage**: `GroupTemplateChannelComparer.Compare` supports `Required`, `Name`, `ISOCode`, `Custom`, and `DisplayOrder` fields only. Any other value throws `ArgumentOutOfRangeException`.
---
## 4. Dependencies
### This Module Depends On:
| Dependency | Usage |
|------------|-------|
| `DTS.Common.Base` | `IBaseView`, `IBaseViewModel` base interfaces |
| `DataPro.Common.Base` | Alternative namespace for `IBaseView`, `IBaseViewModel` |
| `DTS.Common.Interface.Pagination` | `IFilterableListView` for list filtering |
| `DTS.Common.Enums.GroupTemplates` | `GroupTemplateChannelFields` enum for sorting |
| `System` | `DateTime`, `IComparer<T>`, `StringComparison` |
### Consumers (Inferred):
Concrete implementations of Views, ViewModels, and Models in higher-level modules will implement these interfaces. Specific consumers cannot be determined from the provided source files.
---
## 5. Gotchas
1. **Mixed Namespaces**: The codebase uses both `DTS.Common.*` and `DataPro.Common.*` namespaces inconsistently. `IGroupTemplateInfoControlView` and `IGroupTemplateInfoControlViewModel` use `DataPro.Common` while all other interfaces use `DTS.Common`. This may indicate a refactoring in progress or historical naming inconsistency.
2. **Unused Properties**: `ITestObjectTemplate.Version` and `ITestObjectTemplate.CRC32` are explicitly documented as "not currently used" in the source comments. Implementers should be aware these may have no functional effect.
3. **Ambiguous Name Properties**: `IGroupTemplateChannel` has both `NameOfTheChannel` (read/write) and `Name` (read-only). The relationship between these is not documented in the interface.
4. **Parameter Naming Convention**: Methods like `GetAllTemplates(bool bIncludeEmbedded, bool bISOMode)` use Hungarian notation (`b` prefix for booleans), which is inconsistent with modern C# conventions.
5. **Unknown Types**: Several interfaces reference types not defined in the provided sources:
- `IGroupTemplateModel` (referenced in `IGroupTemplateInfoControlViewModel`)
- `IGroupTemplateInfoView` (referenced in `IGroupTemplateInfoControlViewModel`)
- `GroupTemplateChannelFields` enum (referenced in `GroupTemplateChannelComparer`)
6. **Channels/AssociatedGroups Format**: `IGroupTemplate.Channels` and `IGroupTemplate.AssociatedGroups` are typed as `string`, but the expected format (CSV, JSON, delimited) is unclear from the interface alone.

View File

@@ -0,0 +1,233 @@
---
source_files:
- Common/DTS.CommonCore/Interface/Groups/IGroupImportImportView.cs
- Common/DTS.CommonCore/Interface/Groups/IGroupHardwareDbRecord.cs
- Common/DTS.CommonCore/Interface/Groups/IGroupImportOptionsView.cs
- Common/DTS.CommonCore/Interface/Groups/IGroupImportPreviewView.cs
- Common/DTS.CommonCore/Interface/Groups/ITestSetupGroupRecord.cs
- Common/DTS.CommonCore/Interface/Groups/IGroupChannel.cs
- Common/DTS.CommonCore/Interface/Groups/ITestObject.cs
- Common/DTS.CommonCore/Interface/Groups/IGroupDbRecord.cs
- Common/DTS.CommonCore/Interface/Groups/IGroupImportViewModel.cs
generated_at: "2026-04-16T12:14:34.783297+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "0073692ccbf88d7d"
---
# Documentation: DTS.Common.Interface.Groups
## 1. Purpose
This module defines the core interfaces for the Groups subsystem within DTS, providing abstractions for group import workflows, database record structures, and channel/test object management. It serves as a contract layer between the group import UI views, view models, and the application core, enabling the parsing of `.GRP` files, validation of group configurations, and persistence of group and hardware records to the database. The module supports both legacy (pre-2.0) test object channels and ISO 13499-compliant metadata fields.
---
## 2. Public Interface
### Interfaces
#### `IGroupImportImportView`
Marker interface for views responsible for presenting progress feedback during group creation and commit operations.
- **Inherits:** `IBaseView`
- **Members:** None (marker interface)
---
#### `IGroupHardwareDbRecord`
Interface describing a GroupHardware record in the database.
| Property | Type | Attributes | Description |
|----------|------|------------|-------------|
| `Id` | `int` | `[Key]`, `[Column("Id")]` | Primary key of the GroupHardware record |
| `GroupId` | `int` | `[Column("GroupId")]` | Foreign key to the associated group |
| `DASId` | `int` | `[Column("DASId")]` | Data Acquisition System identifier |
| `SerialNumber` | `string` | `[Column("SerialNumber")]` | Serial number of the hardware |
---
#### `IGroupImportOptionsView`
Interface for views controlling file selection and validation.
- **Inherits:** `IBaseView`
| Method | Signature | Description |
|--------|-----------|-------------|
| `Validate` | `bool Validate(out List<string> errors, out List<string> warnings)` | Returns `true` if files have been selected; populates `errors` and `warnings` collections with validation issues |
---
#### `IGroupImportPreviewView`
Interface for views handling channel parsing from `.GRP` files, result display, and group selection/renaming.
- **Inherits:** `IBaseView`
| Method | Signature | Description |
|--------|-----------|-------------|
| `Validate` | `bool Validate(bool userIsAdmin, out List<string> errors, out List<string> warnings)` | Validates currently selected groups including channels and group names. Returns `true` if all selected groups are valid. Errors are fatal; warnings are non-blocking. |
---
#### `ITestSetupGroupRecord`
Interface describing a test setup group database record.
| Property | Type | Description |
|----------|------|-------------|
| `GroupId` | `int` | Database ID of the group |
| `DisplayOrder` | `int` | Display order of the group |
| `Position` | `string` | Position field (ISO 13499), if available; groups can have mixed position fields |
| `TestObjectType` | `string` | Test Object field (ISO 13499), if available; groups can have mixed test object fields |
| `TestSetupId` | `int` | Database ID of the test setup the group belongs to |
---
#### `IGroupChannel`
Interface representing a logical channel in a group, associated with physical hardware and/or sensors.
- **Inherits:** `IGroupTemplateChannel`, `IComparable<IGroupChannel>`
- **Note:** Marked as "FOR THE OLD (PRE 2.0) TESTOBJECT CHANNELS"
| Property | Type | Description |
|----------|------|-------------|
| `Disabled` | `bool` | Controls whether channel is used during data collection; disabled channels are excluded from run test |
| `ChannelIdx` | `int` | Channel index |
| `SensorSerialNumber` | `string` | Serial number of the associated sensor (if any) |
| `HardwareId` | `string` | Hardware channel identifier associated with this channel |
---
#### `ITestObject`
Interface representing a test object with channel management and metadata.
| Property | Type | Description |
|----------|------|-------------|
| `DisplaySerialNumber` | `string` | Read-only display-formatted serial number |
| `SerialNumberConverted` | `string` | Converted serial number |
| `SerialNumber` | `string` | Serial number |
| `SerialNumberOrOriginalSerialNumber` | `string` | Read-only fallback to original serial number |
| `TestObjectType` | `string` | Type of test object |
| `ParentObject` | `string` | Parent object reference |
| `SysBuilt` | `bool` | System-built flag |
| `TextL1` | `string` | Text line 1 |
| `HardwareIds` | `string[]` | Array of hardware IDs |
| `Template` | `string` | Template name |
| `LocalOnly` | `bool` | Local-only flag |
| `LastModifiedBy` | `string` | User who last modified the object |
| `LastModified` | `DateTime` | Timestamp of last modification |
| `Embedded` | `bool` | Embedded flag |
| `OriginalSerialNumber` | `string` | Original serial number before conversion |
| `OriginalTemplate` | `string` | Original template (before embedding in test setup) |
| Method | Signature | Description |
|--------|-----------|-------------|
| `SortChannels` | `void SortChannels()` | Sorts channels within the test object |
| `SetTemplateOnly` | `void SetTemplateOnly(string value)` | Sets template without triggering additional side effects |
---
#### `IGroupDbRecord`
Interface describing a Group record in the database.
| Property | Type | Attributes | Description |
|----------|------|------------|-------------|
| `Id` | `int` | `[Key]`, `[Column("Id")]` | Primary key |
| `SerialNumber` | `string` | `[Column("SerialNumber")]` | Serial number of the group |
| `Picture` | `string` | `[Column("Picture")]` | Picture path/identifier |
| `DisplayName` | `string` | `[Column("DisplayName")]` | Display name |
| `Description` | `string` | `[Column("Description")]` | Description text |
| `Embedded` | `bool` | `[Column("Embedded")]` | Whether the group is embedded |
| `LastModified` | `DateTime` | `[Column("LastModified")]` | Last modification timestamp |
| `LastModifiedBy` | `string` | `[Column("LastModifiedBy")]` | User who last modified |
| `StaticGroupId` | `int?` | `[Column("StaticGroupId")]` | Optional static group ID |
| `ExtraProperties` | `string` | `[Column("ExtraProperties")]` | Extra properties (serialized) |
---
#### `IGroupImportViewModel`
Interface for the group import view model, coordinating views, application logic, and intermediate data.
- **Inherits:** `IBaseViewModel`
| Property | Type | Description |
|----------|------|-------------|
| `ImportOptionsView` | `IGroupImportOptionsView` | View for file selection |
| `ImportPreviewView` | `IGroupImportPreviewView` | View for group selection and channel viewing |
| `ImportView` | `IGroupImportImportView` | View for commit progress display |
| `Logger` | `FileUtils.LogDelegate` | Logging facility |
| `SwitchNavSteps` | `SwitchNavStepsDelegate` | Callback to change navigation steps |
| `CheckGroupExists` | `CheckGroupExistsDelegate` | Callback to check if a group exists |
| `CheckSensorExists` | `CheckSensorExistsDelegate` | Callback to check if a sensor exists |
| `CreateGroup` | `CreateGroupDelegate` | Callback to create a group |
| `AddChannel` | `AddChannelToGroupDelegate` | Callback to add a channel to a group |
| `CommitGroups` | `CommitGroupsDelegate` | Callback to commit groups to database |
| `DisableUI` | `Disable_UIDelegate` | Callback to disable the UI |
| `EnableUI` | `Enable_UIDelegate` | Callback to enable the UI |
| `BrowseOk` | `bool` | Flag indicating browse operation status |
| Method | Signature | Description |
|--------|-----------|-------------|
| `SetStatus` | `void SetStatus(string message, Color color)` | Sets status message with color |
| `ParseSourceFiles` | `void ParseSourceFiles(string userTags)` | Reads source files and parses channels/groups |
| `Import` | `void Import()` | Commits groups and channels to application |
| `Reset` | `void Reset()` | Resets view model to initial values |
---
### Delegates
| Delegate | Signature | Description |
|----------|-----------|-------------|
| `SwitchNavStepsDelegate` | `void (GroupImportEnums.Steps step)` | Switches navigation to specified step |
| `CheckGroupExistsDelegate` | `bool (string name)` | Checks if a group exists by serial number |
| `CheckSensorExistsDelegate` | `bool (string serialNumber)` | Checks if a sensor exists by serial number |
| `CreateGroupDelegate` | `void (string serialNumber, string tags)` | Creates a new group with tags |
| `AddChannelToGroupDelegate` | `void (string groupSerialNumber, string displayName, string sensorSerialNumber, double? capacity, bool? invert, string isoCode, IChannelSetting[] channelDefaults)` | Adds a channel to the end of a group's existing channels; `capacity`/`invert` use sensor defaults when `null` |
| `CommitGroupsDelegate` | `void (string[] serialNumbers)` | Commits specified groups to database |
| `Disable_UIDelegate` | `void ()` | Disables the UI |
| `Enable_UIDelegate` | `void ()` | Enables the UI |
---
## 3. Invariants
1. **Database Column Mapping:** All `IGroupDbRecord` and `IGroupHardwareDbRecord` properties are explicitly mapped to database columns via `[Column]` attributes; implementations must preserve these mappings.
2. **Primary Keys:** `Id` properties on `IGroupDbRecord` and `IGroupHardwareDbRecord` are marked with `[Key]` attribute and must be unique.
3. **Validation Pattern:** Both `IGroupImportOptionsView.Validate` and `IGroupImportPreviewView.Validate` follow the pattern of returning a boolean success indicator while populating `out` parameters for errors (fatal) and warnings (non-fatal).
4. **Channel Ordering:** `IGroupChannel` implements `IComparable<IGroupChannel>`, implying a defined sort order for channels.
5. **Channel Append Semantics:** Per `AddChannelToGroupDelegate` documentation, channels are appended to the end of a group's existing channels.
6. **Nullable Foreign Keys:** `StaticGroupId` on `IGroupDbRecord` is nullable (`int?`), indicating optional relationships.
---
## 4. Dependencies
### This module depends on:
- **DTS.Common.Base** - `IBaseView`, `IBaseViewModel` base interfaces
- **DTS.Common.Enums.Groups** - `GroupImportEnums.Steps` enumeration
- **DTS.Common.Interface.Channels** - `IChannelSetting` interface
- **DTS.Common.Interface.GroupTemplate** - `IGroupTemplateChannel` interface
- **DTS.Common.Utils** - `FileUtils.LogDelegate` delegate type
- **System.ComponentModel.DataAnnotations** - `[Key]`, `[Column]` attributes
- **System.Windows.Media** - `Color` type for status display
### What depends on this module:
- **Unclear from source alone** - No downstream consumers are visible in these interface definitions. The delegate patterns (`CreateGroupDelegate`, `CommitGroupsDelegate`, etc.) indicate that an application layer provides implementations, but specific consumers cannot be determined from these files.
---
## 5. Gotchas
1. **Legacy Channel Interface:** `IGroupChannel` is explicitly marked as "FOR THE OLD (PRE 2.0) TESTOBJECT CHANNELS" in the source comments. New implementations should investigate whether a newer channel interface exists.
2. **ViewModel Reuse Pattern:** The `Reset()` method documentation states: *"we are currently not creating a new viewmodel in the page, but re-using an existing one so everytime we re-visit the page we must re-initialize the vm"*. This singleton-like reuse pattern requires explicit cleanup via `Reset()` to avoid stale state.
3. **Mixed ISO 13499 Fields:** `ITestSetupGroupRecord.Position` and `TestObjectType` comments note that groups can be composed of mixed position and test object fields, which may complicate validation or display logic.
4. **Template Mutation on Embedding:** `ITestObject.OriginalTemplate` documentation indicates that the template changes when embedded in a test setup, suggesting template mutation side effects that may not be obvious.
5. **Null Parameter Semantics:** In `AddChannelToGroupDelegate`, `capacity` and `invert` parameters use `null` to signal "use sensor defaults" rather than "no value" — implementations must explicitly handle this convention.

View File

@@ -0,0 +1,153 @@
---
source_files:
- Common/DTS.CommonCore/Interface/Groups/GroupChannelList/IGroupChannelListView.cs
- Common/DTS.CommonCore/Interface/Groups/GroupChannelList/IGroupChannelSettingsListView.cs
- Common/DTS.CommonCore/Interface/Groups/GroupChannelList/IGroupChannelListViewModel.cs
generated_at: "2026-04-16T12:21:49.528154+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "b48152996c8c8c44"
---
# Documentation: Group Channel List Interfaces
## 1. Purpose
This module defines the contract for the Group Channel List feature using a Model-View-ViewModel (MVVM) pattern. It provides three interfaces—`IGroupChannelListView`, `IGroupChannelSettingsListView`, and `IGroupChannelListViewModel`—that govern the display, filtering, sorting, and manipulation of channel data within groups and test setups. The module serves as the abstraction layer between the UI layer and the business logic for managing sensor channels, their configurations, and their presentation modes.
---
## 2. Public Interface
### IGroupChannelListView
**Inherits from:** `IBaseView`
| Member | Signature | Description |
|--------|-----------|-------------|
| `HandleColumns` | `void HandleColumns(IsoViewMode viewMode)` | Configures which columns are displayed based on the provided ISO view mode. |
---
### IGroupChannelSettingsListView
**Inherits from:** `IBaseView`
| Member | Signature | Description |
|--------|-----------|-------------|
| `SetOrderMode` | `void SetOrderMode(bool bUseTestSetupOrder)` | Sets whether columns should reflect group order or test setup order. |
| `SetDisplayOptions` | `void SetDisplayOptions(bool bShowSensorChannelUserValues)` | Controls visibility of User Value X columns. |
| `HandleColumns` | `void HandleColumns(IsoViewMode viewMode)` | Sets which columns to display based on an ISO view mode. |
| `SetFilterMode` | `void SetFilterMode(PossibleFilters filterMode)` | Sets which columns to display based on a sensor type filter. |
| `ViewDbVersion` | `int ViewDbVersion { get; set; }` | Stores the minimum client database version associated with view data; used to hide or disable properties/features. |
---
### IGroupChannelListViewModel
**Inherits from:** `IBaseViewModel`, `IFilterableListView`
#### Properties
| Property | Type | Description |
|----------|------|-------------|
| `View` | `IGroupChannelListView` | The associated main view. |
| `SettingsView` | `IGroupChannelSettingsListView` | The associated settings view. |
| `CreateVoltageInputChannels` | `bool` | Controls whether voltage insertion channels are created when dragging an analog hardware channel onto a blank channel with no sensor set. |
| `CapacityFormat` | `string` | Format string for double values (typically "N2"). |
| `AllChannels` | `List<Channels.IGroupChannel>` | All available channels prior to filtering/searching/sorting. |
| `ChannelCodesFunc` | `Func<IList<IChannelCode>>` | Function returning available channel codes. |
| `Channels` | `ObservableCollection<Channels.IGroupChannel>` | Channels displayed in the channel list view. |
| `SettingChannels` | `ObservableCollection<Channels.IGroupChannel>` | Channels displayed in settings view; snapshot from `OnSetActive` with blank channels removed. |
| `SettingsViewLoaded` | `bool` | Indicates whether the attached `SettingsView` has loaded. |
| `SettingChannelsLoaded` | `bool` | Indicates whether `SettingChannel` UI elements were created. |
| `Group` | `IGroup` | The group being viewed (when editing a group). |
| `TestSetup` | `ITestSetup` | The test setup being viewed (when editing a test setup). |
| `UseISOCodeFilterMapping` | `bool` | Whether to always match the CFC to the ISO code and vice versa. |
| `ShowISOCodes` | `bool` | Indicates whether to show ISO codes. |
| `ShowUserCodes` | `bool` | Indicates whether to show user codes. |
| `ShowDallasIdColumn` | `bool` | Indicates whether to show Dallas ID column. |
| `ISOViewMode` | `IsoViewMode` | Gets/sets the ISO view mode. |
| `ShowISOStringBuilder` | `bool` | Controls visibility of ISO string builder. |
| `UniqueISOCodesRequired` | `bool` | Gets/sets whether complete and unique ISO codes are required. |
| `ShowChannelCodeLookupHelper` | `bool` | Controls visibility of channel code lookup helper. |
| `UseTestSetupOrder` | `bool` | Indicates whether test setup order is being used. |
| `ShowSensorChannelUserValues` | `bool` | Controls visibility of sensor channel user values. |
| `ApplySensorDataToBlankChannels` | `bool` | Modifies how meta data is handled when sensors are dragged onto channels without sensors. |
| `AllowChannelDeletionByNonAdminUser` | `bool` | Controls whether non-admin users can delete channels. |
| `UserIsAdmin` | `bool` | Indicates whether the current user is an admin. |
| `AllowSensorPushAndPull` | `bool` | Controls sensor push/pull functionality. |
| `ReadOnlyParametersMode` | `bool` | Enables read-only mode for parameters. |
| `ReadOnlyChannelsMode` | `bool` | Enables read-only mode for channels. |
| `UserID` | `int` | The current user ID. |
#### Methods
| Method | Signature | Description |
|--------|-----------|-------------|
| `PopulateChannels` | `IDictionary<IGroup, Channels.IGroupChannel[]> PopulateChannels(object page, IDictionary<int, ISensorData> sensorLookup, IDictionary<int, IDASHardware> hardwareLookup, IChannelSetting[] channelDefaults, bool allowChannelDeletionByNonAdminUser = true, bool userIsAdmin = true, bool allowSensorPushAndPull = false, bool keepExistingChannels = false, bool allowChannelDeletionFromFixedGroup = true)` | Populates channels to be displayed in views. Returns a dictionary mapping groups to their channels. |
| `CompareAndMarkChannelParameters` | `bool CompareAndMarkChannelParameters(Channels.IGroupChannel ch)` | Checks if any modifiable channel parameter values differ from the sensor database values; used for decoration in the Parameters step. |
| `OnSetActive` | `void OnSetActive()` | Called when a view is loaded. |
| `Unset` | `void Unset()` | Called when a view is unloaded. |
| `Filter` | `void Filter(string term)` | Filters content by a string search term. |
| `Filter` | `void Filter(PossibleFilters filter)` | Filters channels by sensor type. |
| `SetFilter` | `void SetFilter(PossibleFilters bridgeFilter)` | Sets which channel types are displayed by sensor type. |
| `MoveDown` | `void MoveDown(Channels.IGroupChannel[] channel)` | Moves the specified channels down in the list. |
| `MoveBottom` | `void MoveBottom(Channels.IGroupChannel[] channel)` | Moves the specified channels to the bottom of the list. |
| `MoveUp` | `void MoveUp(Channels.IGroupChannel[] channel)` | Moves the specified channels up in the list. |
| `MoveTop` | `void MoveTop(Channels.IGroupChannel[] channel)` | Moves the specified channels to the top of the list. |
| `AddChannels` | `void AddChannels(DTS.Common.Interface.Sensors.SensorsList.IDragAndDropItem[] sensors)` | Adds channels from drag-and-drop sensor items. |
| `AddChannels` | `void AddChannels(IHardwareChannel[] hardwareChannels)` | Adds channels from hardware channels. |
| `AddChannels` | `void AddChannels(Channels.IGroupChannel[] groupChannels)` | Adds existing group channels. |
| `Remove` | `void Remove(Channels.IGroupChannel channel, bool notifyChanged = true)` | Removes a channel from the list. |
| `CreateGroupIfNeeded` | `IGroup CreateGroupIfNeeded(ITestSetup testSetup, string groupName)` | Creates a group if one does not already exist. |
| `SetIncludedHardware` | `void SetIncludedHardware(IDASHardware[] hardwares)` | Sets included hardware; used to count channels for the view label. |
| `SetRange` | `void SetRange(CACOption option)` | Sets the range of all analog sensors according to the input option. |
| `Sort` | `void Sort(object columnTag, bool bUserClick)` | Sorts the view by the specified column. |
---
## 3. Invariants
- `IGroupChannelListView` and `IGroupChannelSettingsListView` must always inherit from `IBaseView`.
- `IGroupChannelListViewModel` must always inherit from both `IBaseViewModel` and `IFilterableListView`.
- `Channels` and `SettingChannels` must be of type `ObservableCollection<Channels.IGroupChannel>` to support UI binding.
- `SettingChannels` is a snapshot of `Channels` taken during `OnSetActive` with blank channels removed; it does not automatically update when `Channels` changes.
- `ViewDbVersion` on `IGroupChannelSettingsListView` must be set to the minimum client database version to ensure proper feature availability.
- The `PopulateChannels` method requires valid lookups (`sensorLookup`, `hardwareLookup`) to properly populate channel data.
---
## 4. Dependencies
### This module depends on:
- `DTS.Common.Base` (`IBaseView`, `IBaseViewModel`)
- `DTS.Common.Enums` (`IsoViewMode`, `CACOption`)
- `DTS.Common.Enums.Sensors` (`PossibleFilters`)
- `DTS.Common.Enums.Sensors.SensorsList` (used in `IDragAndDropItem`)
- `DTS.Common.Interface.Channels` (`IGroupChannel`, `IHardwareChannel`)
- `DTS.Common.Interface.Channels.ChannelCodes` (`IChannelCode`)
- `DTS.Common.Interface.DataRecorders` (`IDASHardware`)
- `DTS.Common.Interface.Groups.GroupList` (`IGroup`)
- `DTS.Common.Interface.Pagination` (`IFilterableListView`)
- `DTS.Common.Interface.Sensors` (`ISensorData`, `IChannelSetting`)
- `DTS.Common.Interface.Sensors.SensorsList` (`IDragAndDropItem`)
- `DTS.Common.Interface.TestSetups.TestSetupsList` (`ITestSetup`)
- `System.Collections.Generic`
- `System.Collections.ObjectModel`
### What depends on this module:
- Not determinable from the provided source files alone.
---
## 5. Gotchas
1. **Two separate channel collections:** `Channels` and `SettingChannels` are both `ObservableCollection<Channels.IGroupChannel>`, but `SettingChannels` is a snapshot taken during `OnSetActive` with blank channels removed. Changes to one do not automatically reflect in the other.
2. **Multiple `AddChannels` overloads:** There are three overloads of `AddChannels` accepting different types (`IDragAndDropItem[]`, `IHardwareChannel[]`, `IGroupChannel[]`). Ensure the correct overload is called for the source data type.
3. **Two `Filter` overloads with different semantics:** `Filter(string term)` performs text-based filtering, while `Filter(PossibleFilters filter)` performs sensor-type-based filtering. These are distinct operations.
4. **`CreateVoltageInputChannels` behavior:** This property controls automatic creation of voltage insertion channels when dragging an analog hardware channel onto a blank channel. This behavior may be unexpected if not explicitly configured.
5. **`CompareAndMarkChannelParameters` side effects:** This method not only compares values but also "marks" them (presumably for UI decoration). It should be called when channel parameter modifications need to be highlighted.
6. **`Remove` method notification parameter:** The `Remove` method has a `notifyChanged` parameter defaulting to `true`. Setting this to `false` may suppress necessary UI updates.

View File

@@ -0,0 +1,240 @@
---
source_files:
- Common/DTS.CommonCore/Interface/Groups/GroupList/IGroupListView.cs
- Common/DTS.CommonCore/Interface/Groups/GroupList/TestSetupParentHelper.cs
- Common/DTS.CommonCore/Interface/Groups/GroupList/IGroupListViewModel.cs
- Common/DTS.CommonCore/Interface/Groups/GroupList/IGroup.cs
generated_at: "2026-04-16T12:22:13.797964+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "a5d3249cf1dc850d"
---
# Documentation: DTS.Common.Interface.Groups.GroupList
## 1. Purpose
This module defines the core interfaces and a helper class for managing Groups within the DTS system. Groups appear to be configurable entities that associate hardware, channels, sensors, and test setups together. The module provides the view-model contract (`IGroupListViewModel`), the view contract (`IGroupListView`), the domain entity interface (`IGroup`), and a helper class (`TestSetupParentHelper`) for tracking test setup associations. This abstraction layer enables separation between the UI layer and business logic for group management operations including creation, deletion, filtering, sorting, and XML serialization.
---
## 2. Public Interface
### `IGroupListView`
**File:** `IGroupListView.cs`
**Namespace:** `DTS.Common.Interface.Groups.GroupTemplateList`
```csharp
public interface IGroupListView : IBaseView { }
```
A marker interface extending `IBaseView`. No members are defined; it serves as a contract identifier for views that display group lists.
---
### `TestSetupParentHelper`
**File:** `TestSetupParentHelper.cs`
**Namespace:** `DTS.Common.Interface.Groups.GroupList`
```csharp
public class TestSetupParentHelper
{
public int Id;
public string Name { get; set; }
public bool Modified { get; set; }
public override string ToString()
}
```
A POCO class used to represent associated test setups within a group.
| Member | Type | Description |
|--------|------|-------------|
| `Id` | `int` (public field) | Identifier for the test setup |
| `Name` | `string` | Display name of the test setup |
| `Modified` | `bool` | Flag indicating whether the test setup has been modified |
| `ToString()` | `string` | Returns the `Name` property |
---
### `IGroupListViewModel`
**File:** `IGroupListViewModel.cs`
**Namespace:** `DTS.Common.Interface.Groups.GroupList`
```csharp
public interface IGroupListViewModel : IBaseViewModel, IFilterableListView
```
Defines the contract for a view model that manages a list of groups.
#### Properties
| Signature | Description |
|-----------|-------------|
| `IGroupListView View { get; set; }` | Gets or sets the associated view |
| `IGroup[] Groups { get; set; }` | Gets or sets the array of groups |
#### Methods
| Signature | Description |
|-----------|-------------|
| `void Unset()` | Purpose unclear from source alone |
| `void Sort(object o, bool columnClick)` | Sorts the group list; parameters' specific meanings unclear from source |
| `void OnSetActive(object page, bool groupTile, object currentUser)` | Called when the view becomes active; parameter purposes unclear from source |
| `void MouseDoubleClick(int index)` | Handles mouse double-click on a group at the specified index |
| `void Filter(string term)` | Filters the group list by the given search term |
| `IGroup GetGroup(int? id, bool updateTags = true)` | Retrieves a group by ID; optionally updates tags |
| `IGroup GetGroup(string displayName)` | Retrieves a group by display name |
| `IGroup[] GetGroups(int[] ids)` | Retrieves multiple groups by an array of IDs |
| `IGroup[] GetAllGroups()` | Retrieves all groups |
| `void DeleteGroups(int[] ids)` | Deletes groups specified by the array of IDs |
| `IGroup CreateGroup()` | Creates a new group with default parameters |
| `IGroup CreateGroup(List<string> includedHardwareStringList)` | Creates a new group with specified hardware string identifiers |
| `IGroup CreateGroup(SqlDataReader reader, List<string> includedHardwareStringList, List<int> dasIdList)` | Creates a group from a database reader |
| `IGroup CreateGroup(IGroupDbRecord groupRecord, List<string> includedHardwareStringList, List<int> dasIdList)` | Creates a group from a database record |
---
### `IGroup`
**File:** `IGroup.cs`
**Namespace:** `DTS.Common.Interface.Groups.GroupList`
```csharp
public interface IGroup : IComparable<IGroup>
```
Defines the contract for a Group entity, supporting comparison, hardware/channel management, XML serialization, and test setup associations.
#### Identity & Metadata Properties
| Signature | Description |
|-----------|-------------|
| `int Id { get; set; }` | Unique identifier for the group |
| `string Name { get; set; }` | Internal name of the group |
| `string DisplayName { get; set; }` | User-facing display name |
| `int? StaticGroupId { get; set; }` | Optional reference to a static group |
| `string Description { get; set; }` | Group description |
| `bool Embedded { get; set; }` | Indicates if the group is embedded |
| `DateTime LastModified { get; set; }` | Timestamp of last modification |
| `string LastModifiedBy { get; set; }` | User who last modified the group |
| `int DisplayOrder { get; set; }` | Order in which the group appears in lists |
#### Hardware Properties
| Signature | Description |
|-----------|-------------|
| `int[] IncludedHardware { get; set; }` | Array of hardware IDs included in the group |
| `string[] IncludedHardwareStringList { get; set; }` | Legacy hardware identifiers using old SerialNumber_type scheme (primarily for import) |
| `int ChannelCount { get; set; }` | Number of channels in the group |
#### Position & Test Object Properties
| Signature | Description |
|-----------|-------------|
| `bool PositionIsMixed { get; set; }` | Indicates if position values are mixed across channels |
| `bool PositionIsTextbox { get; set; }` | Indicates if position is represented as a textbox |
| `bool PositionIsCombobox { get; set; }` | Indicates if position is represented as a combobox |
| `string Position { get; set; }` | Position value |
| `bool TestObjectIsMixed { get; set; }` | Indicates if test object values are mixed across channels |
| `string TestObject { get; set; }` | Test object value |
| `List<string> AvailableTestObjects { get; set; }` | List of available test object options |
| `string SelectedTestObjectItem { get; set; }` | Currently selected test object item |
| `List<string> AvailablePositions { get; set; }` | List of available position options |
| `string SelectedPositionItem { get; set; }` | Currently selected position item |
#### Channel & Sensor Methods
| Signature | Description |
|-----------|-------------|
| `List<IGroupChannel> GroupChannelList { get; set; }` | List of channels associated with the group |
| `bool Save(IGroupChannel[] groupChannels, bool canUserCommitChannelCodes)` | Saves the group with the specified channels |
| `void ClearGroupChannelSettingCache(long groupId)` | Clears cached channel settings for the group |
| `IGroupChannel[] GetAllChannels(bool bEditable, IDictionary<int, ISensorData> sensorLookup, IDictionary<int, IDASHardware> hardwareLookup, IChannelSetting[] channelDefaults, bool allowSensorPushAndPull = false)` | Retrieves all channels with lookups for sensors and hardware |
| `void LoadHardware()` | Loads hardware for the group |
| `void ConvertToEmbedded(IGroupChannel[] groupChannels)` | Converts the group to embedded using the specified channels |
| `void DeterminePositionAndTestObject(IGroupChannel[] channels)` | Determines position and test object from channels |
| `ISensorData GetSensor(IGroupChannel channel, ISensorData sensorData, bool bUseIsoFilter)` | Retrieves sensor data for a channel |
| `void SetSensor(IGroupChannel channel, ISensorData sensorData)` | Sets sensor data for a channel |
#### XML Serialization Methods
| Signature | Description |
|-----------|-------------|
| `void WriteXML(ref XmlWriter writer)` | Writes the group to XML |
| `IGroup ReadXML(XmlElement node, Dictionary<long, IGroupChannel> channelLookup, List<ISensorData> sensors)` | Reads group from XML; returns the group instance |
#### Test Setup & Tag Methods
| Signature | Description |
|-----------|-------------|
| `List<TestSetupParentHelper> AssociatedTestSetups { get; set; }` | List of associated test setups |
| `void SetTestSetupLists()` | Populates the associated test setups list |
| `bool StaticGroupIsEqual()` | Compares group to its static counterpart |
| `bool IsDifferentThanStaticGroup { get; set; }` | Indicates if group differs from its static version |
| `bool TagCompatible(int[] tags)` | Checks if the group is compatible with the given tags |
| `int[] TagIDs { get; set; }` | Array of tag IDs associated with the group |
| `string GetTagsAsCommaSeparatedString(TagsGetDelegate tagsGet)` | Gets tags as a comma-separated string using the provided delegate |
| `string Tags { get; set; }` | Tags as a string |
#### Other Methods
| Signature | Description |
|-----------|-------------|
| `bool Filter(string term)` | Returns true if the group matches the search term |
| `void SetIncludedHardware(int[] hardware)` | Sets included hardware and updates internal loaded state |
| `IGroupDbRecord GetIGroupDbRecord()` | Retrieves the database record representation of the group |
---
## 3. Invariants
1. **Comparability**: All `IGroup` implementations must support comparison via `IComparable<IGroup>` for sorting operations.
2. **Hardware Dual Representation**: Groups maintain hardware references in two forms:
- `IncludedHardware` as `int[]` (current scheme)
- `IncludedHardwareStringList` as `string[]` (legacy SerialNumber_type scheme)
3. **Position/Test Object State Exclusivity**: The properties `PositionIsMixed`, `PositionIsTextbox`, and `PositionIsCombobox` appear to represent mutually exclusive states, though this is not explicitly enforced in the interface.
4. **Static Group Relationship**: When `StaticGroupId` is set, the group has a relationship with a static group that can be compared via `StaticGroupIsEqual()`.
5. **Channel Setting Cache**: Channel settings may be cached and must be explicitly cleared via `ClearGroupChannelSettingCache()` when needed.
---
## 4. Dependencies
### This module depends on:
| Dependency | Usage |
|------------|-------|
| `DTS.Common.Base` | Provides `IBaseView`, `IBaseViewModel` base interfaces |
| `DTS.Common.Interface.Pagination` | Provides `IFilterableListView` for filtering capability |
| `DTS.Common.Interface.Channels` | Provides `IGroupChannel`, `IChannelSetting` for channel management |
| `DTS.Common.Interface.DataRecorders` | Provides `IDASHardware` for hardware lookups |
| `DTS.Common.Interface.Sensors` | Provides `ISensorData` for sensor data operations |
| `DTS.Common.Interface.TestSetups.TestSetupsList` | Referenced in comments; relationship unclear from source |
| `System.Collections.Generic` | For `List<T>`, `IDictionary<TKey, TValue>` |
| `System.Data.SqlClient` | For `SqlDataReader` used in `CreateGroup` |
| `System.Xml` | For `XmlWriter`, `XmlElement` in XML serialization |
| `Classes.Tags.TagsInstance.TagsGetDelegate` | Delegate type for tag retrieval (fully qualified in source) |
### What depends on this module:
Cannot be determined from the provided source files alone.
---
## 5. Gotchas
1. **Namespace Mismatch**: `IGroupListView` is defined in namespace `DTS.Common.Interface.Groups.GroupTemplateList`, while all other types in this module are in `DTS.Common.Interface.Groups.GroupList`. This inconsistency may cause confusion or require additional using directives.
2. **Legacy Hardware Identification**: The `IncludedHardwareStringList` property uses the "old SerialNumber_type id scheme" and is "primarily for import purposes" per the source comment. New code should prefer `IncludedHardware`.
3. **Mixed State Indicators**: The `PositionIsMixed` and `TestObjectIsMixed` properties indicate that values vary across channels within a group. Code consuming these values should handle the "mixed" state appropriately.
4. **Public Field in TestSetupParentHelper**: The `Id` member is a public field rather than a property, unlike `Name` and `Modified`. This inconsistency may affect serialization or data binding scenarios.
5. **XML Writer Passed by Reference**: The `WriteXML` method takes `ref XmlWriter writer`, which is unusual. The reason for passing by reference is unclear from the source alone.
6. **Overloaded CreateGroup with SqlDataReader**: Direct use of `SqlDataReader` in the interface suggests tight coupling to SQL Server data access patterns, which may limit flexibility for alternative data sources.

View File

@@ -0,0 +1,122 @@
---
source_files:
- Common/DTS.CommonCore/Interface/Hardware/IDASMonitorInfo.cs
- Common/DTS.CommonCore/Interface/Hardware/IISOHardware.cs
- Common/DTS.CommonCore/Interface/Hardware/IATDArmStatus.cs
- Common/DTS.CommonCore/Interface/Hardware/IDiagnosticResult.cs
generated_at: "2026-04-16T12:11:59.143193+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "706013fcdffb7c0e"
---
# Hardware Interface Module Documentation
## 1. Purpose
This module defines the core contracts for hardware abstraction within the DTS (Data Acquisition System) ecosystem. It provides interfaces for managing monitor calibration data (`IDASMonitorInfo`), persisting hardware configuration records (`IISOHardware`), tracking the hierarchical connection and arming status of devices (`IATDArmStatus` and related types), and reporting detailed per-channel diagnostic results (`IDiagnosticResult`). These interfaces decouple the system logic from specific hardware implementations, enabling consistent data handling across different device types.
## 2. Public Interface
### `IDASMonitorInfo`
Defines accessors for monitor hardware configuration and calibration data, specifically for tilt sensors and channel offsets.
* **Properties**:
* `string SerialNumber`: The hardware serial number.
* `double[] TiltSensorCals`: Calibration data for tilt sensors.
* `short[] TiltSensorDataPre`: Pre-calibration tilt sensor data.
* `DFConstantsAndEnums.TiltAxes TiltAxes`: The tilt axes configuration.
* `int AxisIgnored`: Identifier for which axis is ignored.
* `double MountOffsetAxisOne` / `MountOffsetAxisTwo`: Mounting offset values.
* **Methods**:
* `string GetChannelName(int index)`: Retrieves the name of a channel by index.
* `double GetOffsetTolerancemVLow(int index)` / `GetOffsetTolerancemVHigh(int index)`: Retrieves voltage offset tolerances.
* `void ReadFromFile(string path)`: Populates the object from a file.
* `void WriteToFile(string path)`: Persists the object state to a file.
### `IISOHardware` (inherits `IDASDBRecord`)
Defines behavior for hardware entities that interact with a database and network configuration.
* **Properties**:
* `HardwareTypes DASTypeEnum`: The specific hardware type enumeration.
* `string IPAddress`: The network IP address of the hardware.
* **Methods**:
* `void GetChannelsString(...)`: Returns counts of various channel types (analog, digital, squib, UART, stream) via out parameters.
* `bool IsPseudoRackModule()`: Indicates if the hardware is capable of being a pseudo-rack module (e.g., SLICE slabs).
* `bool IsTSRAIR()`: Indicates specific hardware capability.
* `bool ValidateSerialNumber(ref List<string> errors)` / `ValidateIPAddress(...)`: Validates configuration, appending errors to the provided list.
* `void Insert()` / `Update()` / `Delete()`: Database CRUD operations.
### `IATDArmStatus` Hierarchy
A set of interfaces and enums defining the status of Arm/Trigger Devices (ATD) in a hierarchy: `IAllATDStatus` -> `IATDStatus` -> `IDistributorArmStatus` -> `IDeviceArmStatus`.
* **`IAllATDStatus`**: Root container for ATD statuses.
* `IATDStatus[] ATDs`: Array of ATD devices.
* `AllATDStatuses OverallStatus`: Aggregate status enum (NotConnected, Connecting, AllConnected, AllArmed, Errors).
* **`IATDStatus`**: Represents a single ATD unit.
* `IPAddress IP`: The IP address of the ATD.
* `IDistributorArmStatus[] Distributors`: Child distributors.
* `void UpdateAggregateStatus()`: Recalculates status based on children.
* **`IDistributorArmStatus`**: Represents a distributor device.
* `DistributorStatuses DistributorStatus`: Enum (NotConnected, Connected, Armed, NotArmed, Errored).
* `IDeviceArmStatus[] Devices`: Child devices.
* `DateTime? LastSeen`, `float? InputVoltage`, `float? BackupVoltage`: Status metrics.
* `void UpdateStatusFromQATS(IUDPQATSEntry qats)`: Updates status from a QATS entry.
* **`IDeviceArmStatus`**: Represents a specific data acquisition device.
* `DASStatuses DASStatus`: Enum (MissingNotBooted, BootedNotArmedYet, ArmedReady, etc.).
* `DiagStatuses DiagStatus`: Flags enum (Passed, NoResults, FailedShunt, FailedOffset, etc.).
* `IDASHardware Hardware`: Reference to the hardware interface.
* `string ShuntResults`, `OffsetResults`: Diagnostic result strings.
* `double? TiltX`, `TiltY`, `TiltZ`: Tilt sensor readings.
* `bool Triggered`: Indicates if the device triggered.
### `IDiagnosticResult`
Defines a data contract for the results of a channel diagnostic or calibration run.
* **Identification**:
* `int DASChannelNumber`, `int EventNumber`.
* **Scaling & Excitation**:
* `double ScalefactorMilliVoltsPerADC`: Mandatory factor to convert raw ADC data to voltage.
* `double ExpectedExcitationMilliVolts`, `double? MeasuredExcitationMilliVolts`.
* `bool NegativeExcitation`: Flag for legacy negative excitation handling.
* **Offsets**:
* `double? MeasuredOffsetMilliVolts`, `double? MeasuredInternalOffsetMilliVolts`.
* `short? FinalOffsetADC`: Remaining offset after a removal attempt.
* `short WindowAverageADC`: Average ADC over a window.
* **Shunt & Calibration**:
* `bool ShuntDeflectionFailed`, `bool CalSignalCheckFailed`.
* `double? MeasuredShuntDeflectionMv`, `double? TargetShuntDeflectionMv`.
* `double? BridgeResistance`: Measured sensor resistance.
* **Squib (Explosive/Firing) Data**:
* `bool? SquibFirePassed`, `SquibDurationPassed`, `SquibDelayPassed`.
* `double[] SquibFireCurrentData`, `SquibFireVoltageData`, `SquibFireTimeAxis`.
* **Methods**:
* `short GetExpectedDataZeroLevelADC(ZeroMethodType zeroMethod)`: Calculates expected zero level.
## 3. Invariants
* **`IDiagnosticResult.WindowAverageADC`**: The value `short.MinValue` explicitly indicates an uninitialized or invalid state.
* **`IDiagnosticResult` Nullability**: When reading specific properties (`MeasuredExcitationMilliVolts`, `MeasuredOffsetMilliVolts`, `NoisePercentFullScale`, `MeasuredShuntDeflectionMv`, `TargetShuntDeflectionMv`, `BridgeResistance`) from event attributes, a value of `0.0` may represent `null` (i.e., the value was not measured), rather than a literal zero measurement.
* **`DiagStatuses`**: This is a `[Flags]` enum, meaning multiple failure conditions (e.g., `FailedShunt | FailedOffset`) can be set simultaneously.
* **`IISOHardware.IsPseudoRackModule`**: This method indicates *capability* (e.g., SLICE slabs), not whether the hardware is currently serving that role.
## 4. Dependencies
* **Internal Dependencies**:
* `DTS.Common.Enums.DASFactory` (for `DFConstantsAndEnums.TiltAxes`)
* `DTS.Common.Enums.Hardware` (for `HardwareTypes`)
* `DTS.Common.Enums.Sensors` (for `ZeroMethodType`)
* `DTS.Common.Converters` (for `EnumDescriptionTypeConverter`)
* `DTS.Common.Interface.DataRecorders` (for `IDASDBRecord`)
* `DTS.Common.Interface.DASFactory` (for `IDASHardware`, `IDASCommunication`)
* `DTS.Common.Interface.DASFactory.Diagnostics.HardwareList` (implied by namespace usage)
* **External Dependencies**:
* `System`
* `System.Collections.Generic`
* `System.ComponentModel`
* `System.Net`
## 5. Gotchas
* **Ambiguous Zero Values**: In `IDiagnosticResult`, developers must be aware that `0.0` does not always mean "zero volts"; it often serves as a sentinel for "not measured" when read from event attributes. Logic checking for `> 0` may need to handle this distinction.
* **Legacy Excitation Handling**: The `NegativeExcitation` boolean in `IDiagnosticResult` exists specifically to handle legacy TDC/TDAS hardware behavior regarding broken sensor/wire warnings. This suggests newer implementations should not rely on sign checks alone for error detection without consulting this flag.
* **Pseudo-Rack Definition**: The comment in `IISOHardware` clarifies that "Pseudo racks" are collections of hardware like SLICE slabs. The method `IsPseudoRackModule()` returns true based on hardware type capability, regardless of its current configuration context.

View File

@@ -0,0 +1,131 @@
---
source_files:
- Common/DTS.CommonCore/Interface/Hardware/AddEditHardware/IAddEditHardwareView.cs
- Common/DTS.CommonCore/Interface/Hardware/AddEditHardware/IAddEditHardwareDASModule.cs
- Common/DTS.CommonCore/Interface/Hardware/AddEditHardware/IAddEditHardwareViewModel.cs
- Common/DTS.CommonCore/Interface/Hardware/AddEditHardware/IAddEditHardwareHardware.cs
generated_at: "2026-04-16T12:24:47.346735+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "8c9d2e027679c71f"
---
# Documentation: DTS.Common.Interface.Hardware.AddEditHardware
## 1. Purpose
This module defines the contract layer for the Add/Edit Hardware feature within the DTS system. It provides four interfaces that establish the boundaries between the view layer (`IAddEditHardwareView`), presentation logic (`IAddEditHardwareViewModel`), hardware domain model (`IAddEditHardwareHardware`), and modular hardware components (`IAddEditHardwareDASModule`). These interfaces enable the creation, modification, validation, and persistence of Data Acquisition System (DAS) hardware configurations, including support for modular hardware components like SLICE bridges.
---
## 2. Public Interface
### IAddEditHardwareView
**Inherits from:** `IBaseView`
| Member | Signature | Description |
|--------|-----------|-------------|
| `Activated` | `void Activated()` | Notifies the view that it has been activated and should handle any post-activation work. |
| `ViewDbVersion` | `int ViewDbVersion { get; set; }` | Gets or sets the database version associated with the view. |
---
### IAddEditHardwareDASModule
**Inherits from:** None
| Member | Signature | Description |
|--------|-----------|-------------|
| `ModuleType` | `HardwareTypes ModuleType { get; set; }` | Gets or sets the type of the DAS module. |
| `SerialNumber` | `string SerialNumber { get; set; }` | Gets or sets the serial number for the DAS module. |
| `DASImage` | `ImageSource DASImage { get; }` | Gets an image representing the DAS (read-only). |
| `OwningHardware` | `IAddEditHardwareHardware OwningHardware { get; set; }` | Gets or sets a reference to the parent hardware that owns this module. |
| `SLICEBridgeType` | `SLICEBridgeTypes SLICEBridgeType { get; set; }` | Gets or sets the SLICE bridge type for this module. |
| `GetSerialNumberPrefix` | `string GetSerialNumberPrefix()` | Returns the prefix for any modules of this `ModuleType`. |
---
### IAddEditHardwareHardware
**Inherits from:** None
| Member | Signature | Description |
|--------|-----------|-------------|
| `HardwareType` | `HardwareTypes HardwareType { get; set; }` | Gets or sets the DAS hardware type. |
| `SerialNumber` | `string SerialNumber { get; set; }` | Gets or sets the serial number for the DAS. |
| `FirmwareVersion` | `string FirmwareVersion { get; set; }` | Gets or sets the firmware version of the DAS. |
| `IPAddress` | `string IPAddress { get; set; }` | Gets or sets the IP address of the DAS (if supported). |
| `SupportsIPAddress` | `bool SupportsIPAddress { get; }` | Indicates whether the DAS supports an IP address (read-only). |
| `SupportsRackSize` | `bool SupportsRackSize { get; }` | Indicates whether the DAS supports rack sizes (read-only). |
| `SupportsConfiguration` | `bool SupportsConfiguration { get; }` | Indicates whether the DAS supports configuration (read-only). |
| `SLICEConfiguration` | `SLICEConfigurations SLICEConfiguration { get; set; }` | Gets or sets the SLICE configuration of the DAS. |
| `RackSize` | `RackSizes RackSize { get; set; }` | Gets or sets the size of the rack (if supported). |
| `DASImage` | `ImageSource DASImage { get; }` | Gets an image representing the DAS (read-only). |
| `Modules` | `ObservableCollection<IAddEditHardwareDASModule> Modules { get; set; }` | Gets or sets the collection of DAS modules attached to this hardware. |
| `StandIn` | `bool StandIn { get; set; }` | Indicates whether this is actual physical hardware or stand-in/placeholder hardware. |
| `IsModule` | `bool IsModule { get; set; }` | Indicates whether this hardware is a module. |
| `IsAdd` | `bool IsAdd { get; set; }` | Indicates whether this record already exists in the database (`false`) or is a new entry (`true`). |
| `RemoveModule` | `void RemoveModule(IAddEditHardwareDASModule module)` | Removes the specified module from the hardware. |
| `AddModule` | `void AddModule()` | Adds a new module to the hardware. |
| `ToISOHardware` | `IISOHardware ToISOHardware()` | Returns a new `IISOHardware` representation of the hardware. |
---
### IAddEditHardwareViewModel
**Inherits from:** `IBaseViewModel`
| Member | Signature | Description |
|--------|-----------|-------------|
| `View` | `IAddEditHardwareView View { get; set; }` | Gets or sets the associated view instance. |
| `Hardware` | `IAddEditHardwareHardware Hardware { get; set; }` | Gets or sets the hardware being operated on in the viewmodel. |
| `TestId` | `int? TestId { get; set; }` | Gets or sets an optional test identifier. |
| `NotificationsOn` | `bool NotificationsOn { get; set; }` | Controls whether change notifications are sent. Can be disabled during initialization to avoid spurious notifications. |
| `AllowStandin` | `bool AllowStandin { get; set; }` | Indicates whether stand-in hardware is supported by the current model. |
| `SLICE6TreeView` | `ISLICE6TreeView SLICE6TreeView { get; }` | Provides access to the current SLICE6 tree view (read-only). |
| `Unset` | `void Unset()` | Clears or resets the viewmodel state. |
| `SetHardware` | `void SetHardware(IDASHardware hw, IISOHardware isoHW)` | Initializes the viewmodel with the given hardware. |
| `Validate` | `bool Validate(IISOHardware isoHW, ref List<string> errors, ref List<string> warnings, bool displayWindow, bool IsAdd)` | Validates the hardware. Returns `true` if the hardware can be committed. Populates `errors` and `warnings` lists. |
| `Save` | `void Save()` | Commits any changes present. |
| `GetISOHardware` | `IISOHardware GetISOHardware()` | Returns the `IISOHardware` representation. |
| `SetSLICE6TreeView` | `void SetSLICE6TreeView(ISLICE6TreeView treeView, IHardwareListViewModel treeViewModel)` | Allows access to the SLICE6 treeview module. |
---
## 3. Invariants
1. **Module Ownership:** An `IAddEditHardwareDASModule` must have a valid `OwningHardware` reference to function properly within the module hierarchy.
2. **Support Capability Flags:** The boolean support properties (`SupportsIPAddress`, `SupportsRackSize`, `SupportsConfiguration`) on `IAddEditHardwareHardware` are read-only and their values are determined by the `HardwareType`. Consumers should check these before attempting to set related properties.
3. **Validation Before Save:** The `Validate` method on `IAddEditHardwareViewModel` should be called and return `true` before calling `Save()` to ensure data integrity.
4. **Notifications Control:** `NotificationsOn` should be set to `false` during programmatic initialization to prevent unwanted change notification events, then set back to `true` for normal operation.
5. **IsAdd State:** The `IsAdd` property on `IAddEditHardwareHardware` must accurately reflect whether the hardware record is new (`true`) or existing (`false`) to ensure correct database operations.
---
## 4. Dependencies
### This module depends on:
- `DTS.Common.Base` — Provides `IBaseView` and `IBaseViewModel` base interfaces
- `DTS.Common.Enums.Hardware` — Provides `HardwareTypes`, `SLICEBridgeTypes`, `SLICEConfigurations`, `RackSizes` enums
- `DTS.Common.Interface.DASFactory.Diagnostics` — Provides `IDASHardware`
- `DTS.Common.Interface.DASFactory.Diagnostics.HardwareList` — Provides `IHardwareListViewModel`, `ISLICE6TreeView`
- `DTS.Common.Interface.DataRecorders` — Provides `IISOHardware`
- `System.Collections.Generic` — For `List<T>`
- `System.Collections.ObjectModel` — For `ObservableCollection<T>`
- `System.Windows.Media` — For `ImageSource`
### What depends on this module:
- Not determinable from the provided source files alone. Implementations of these interfaces would exist elsewhere in the codebase.
---
## 5. Gotchas
1. **XML Documentation Issue:** In `IAddEditHardwareViewModel`, the `NotificationsOn` property has a malformed XML comment — the closing tag is `<summary>` instead of `</summary>`. This may cause documentation generation warnings or incorrect IntelliSense output.
2. **ref Parameters in Validate:** The `Validate` method uses `ref` parameters for `errors` and `warnings` lists rather than `out`. Callers must initialize these lists before calling the method, or the behavior is undefined.
3. **AddModule Parameterless:** The `AddModule()` method on `IAddEditHardwareHardware` takes no parameters, suggesting the implementation is responsible for constructing and configuring the new module internally. The exact mechanism for how the new module is initialized is unclear from the interface alone.
4. **ViewDbVersion Purpose:** The purpose and usage of `ViewDbVersion` on `IAddEditHardwareView` is not documented in the source; its relationship to database versioning or migration is unclear.

View File

@@ -0,0 +1,230 @@
---
source_files:
- Common/DTS.CommonCore/Interface/Hardware/HardwareList/ISLICE6TreeView.cs
- Common/DTS.CommonCore/Interface/Hardware/HardwareList/IHardwareListView.cs
- Common/DTS.CommonCore/Interface/Hardware/HardwareList/IHardwareListSelectView.cs
- Common/DTS.CommonCore/Interface/Hardware/HardwareList/IHardwareListOverdueView.cs
- Common/DTS.CommonCore/Interface/Hardware/HardwareList/IHardwareListReplaceView.cs
- Common/DTS.CommonCore/Interface/Hardware/HardwareList/ISLICE6TreeNode.cs
- Common/DTS.CommonCore/Interface/Hardware/HardwareList/IHardware.cs
- Common/DTS.CommonCore/Interface/Hardware/HardwareList/IHardwareListViewModel.cs
generated_at: "2026-04-16T12:25:52.763260+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "0b794dc751ea2075"
---
# Hardware List Interfaces Documentation
## 1. Purpose
This module defines the contract layer for the Hardware List subsystem within the DTS (Data Acquisition System) diagnostics framework. It provides interfaces for managing hardware inventory, calibration tracking, and SLICE6/SLICE6DB device associations. The module follows the Model-View-ViewModel (MVVM) pattern, separating view concerns (`IHardwareListView`, `ISLICE6TreeView`, etc.) from business logic (`IHardwareListViewModel`) and domain entities (`IHardware`, `ISLICE6TreeNode`).
---
## 2. Public Interface
### View Interfaces (Markers)
All view interfaces extend `IBaseView` and serve as view contracts in the MVVM architecture:
| Interface | Namespace |
|-----------|-----------|
| `IHardwareListView` | `DTS.Common.Interface.DASFactory.Diagnostics.HardwareList` |
| `IHardwareListSelectView` | `DTS.Common.Interface.DASFactory.Diagnostics.HardwareList` |
| `IHardwareListOverdueView` | `DTS.Common.Interface.DASFactory.Diagnostics.HardwareList` |
| `IHardwareListReplaceView` | `DTS.Common.Interface.DASFactory.Diagnostics.HardwareList` |
| `ISLICE6TreeView` | `DTS.Common.Interface.DASFactory.Diagnostics.HardwareList` |
These interfaces define no additional members beyond inheriting `IBaseView`.
---
### `ISLICE6TreeNode`
Represents a node in the SLICE6 device tree hierarchy.
**Properties:**
| Name | Type | Access |
|------|------|--------|
| `DASId` | `int` | get/set |
| `SerialNumber` | `string` | get/set |
| `Port` | `int` | get/set |
| `PortString` | `string` | get only |
| `Number` | `int` | get/set |
| `PositionOnChain` | `int` | get/set |
| `PositionOnChainString` | `string` | get only |
---
### `IHardware`
Represents a hardware device in the inventory system.
**Properties:**
| Name | Type | Access |
|------|------|--------|
| `DASId` | `int` | get/set |
| `Disabled` | `bool` | get/set |
| `Included` | `bool` | get/set |
| `TestSampleRate` | `double` | get/set |
| `SerialNumber` | `string` | get/set |
| `HardwareType` | `string` | get/set |
| `ChannelCount` | `string` | get/set |
| `Firmware` | `string` | get/set |
| `MaxSampleRate` | `double?` | get/set |
| `CalDate` | `DateTime?` | get/set |
| `CalDueDate` | `DateTime?` | get/set |
| `Hardware` | `object` | get/set |
| `ParentDAS` | `string` | get/set |
| `PositionOnChain` | `int` | get/set |
| `PositionOnDistributor` | `int` | get/set |
| `Port` | `int` | get/set |
| `AnalogChannels` | `int` | get/set |
| `SquibChannels` | `int` | get/set |
| `DigitalInChannels` | `int` | get/set |
| `DigitalOutChannels` | `int` | get/set |
| `UartChannels` | `int` | get/set |
| `StreamOutChannels` | `int` | get/set |
| `StreamInChannels` | `int` | get/set |
| `IPAddress` | `string` | get/set |
| `FirstUseDate` | `DateTime?` | get/set |
| `IsFirstUseValid` | `bool` | get/set |
| `IsTSRAIR` | `bool` | get only |
| `PTPDomainID` | `byte` | get/set |
**Methods:**
| Signature | Description |
|-----------|-------------|
| `void SetIncluded(bool bIncluded)` | Sets the included state of the hardware |
| `void SetMixedRates(bool mixed)` | Sets mixed rate configuration |
| `bool Filter(string term)` | Filters hardware based on search term; returns match status |
| `void DetermineChannelCount(bool showCompact, IHardware[] allHardware)` | Determines channel count display text; `showCompact` controls whether SLICEPro units connected to ECMs are shown |
---
### `IHardwareListViewModel`
Main view model interface for hardware list management. Extends `IBaseViewModel` and `IFilterableListView`.
**Properties:**
| Name | Type | Access |
|------|------|--------|
| `SelectedSLICE6` | `ISLICE6TreeNode` | get/set |
| `AvailableSLICE6` | `ISLICE6TreeNode[]` | get/set |
| `SelectedSLICE6DB` | `IHardware` | get/set |
| `AvailableSLICE6DB` | `IHardware[]` | get/set |
| `IsEdit` | `bool` | get/set |
| `TDASCalPeriod` | `int` | get/set |
| `G5CalPeriod` | `int` | get/set |
| `SLICE1CalPeriod` | `int` | get/set |
| `SLICE1_5CalPeriod` | `int` | get/set |
| `SLICE2_CalPeriod` | `int` | get/set |
| `SLICE6_CalPeriod` | `int` | get/set |
| `POWERPRO_CalPeriod` | `int` | get/set |
| `SLICE6Air_CalPeriod` | `int` | get/set |
| `SLICE6DB_CalPeriod` | `int` | get/set |
| `TSRAir_CalPeriod` | `int` | get/set |
| `ReplaceView` | `IHardwareListReplaceView` | get/set |
| `View` | `IHardwareListView` | get/set |
| `OverdueView` | `IHardwareListOverdueView` | get/set |
| `SelectView` | `IHardwareListSelectView` | get/set |
| `SLICE6TreeView` | `ISLICE6TreeView` | get/set |
| `Hardware` | `IHardware[]` | get/set |
| `OverdueHardware` | `IHardware[]` | get/set |
| `HardwareInTest` | `IHardware[]` | get/set |
| `HardwareToReplace` | `IHardware` | get/set |
| `AvailableHardware` | `IHardware[]` | get/set |
| `ReplacementHardware` | `IHardware` | get/set |
| `TestAAFRateHzColumnWidth` | `int` | get/set |
| `TestSampleRateColumnWidth` | `int` | get/set |
| `TestClockMasterColumnWidth` | `int` | get/set |
| `PTPDomainColumnWidth` | `int` | get/set |
| `GetAAFForHardwareFunc` | `Func<SerializableAAF.DAS_TYPE, int, float>` | get/set |
| `ShowCompact` | `bool` | get/set |
| `SLICE6TreeNodes` | `ISLICE6TreeNode[]` | get/set |
**Methods:**
| Signature | Description |
|-----------|-------------|
| `void InitializeReplace(ITestSetup setup, IsoViewMode viewMode)` | Initializes replacement view for a given test setup |
| `void GetHardware(bool bIncludeModules, bool bIncludeOverdue, bool bIncludeBridges, int? testId, int? groupId)` | Retrieves hardware based on filter criteria |
| `void GetAvailableSampleRates(int[] availableSampleRates)` | Populates available sample rates |
| `void SetTestSampleRates(Dictionary<string, double> testSampleRates)` | Sets test sample rates by serial number |
| `void SetHasIncludedChildren()` | Updates included children state |
| `void UpdateTestSampleRate(string childSerialNumber, double testSampleRate)` | Updates sample rate for specific hardware |
| `void SetTestAAFRates(Dictionary<string, float> testAAFRates)` | Sets anti-alias filter rates |
| `void UpdateTestAAFilterRate(string childSerialNumber, float testAAFilterRate)` | Updates AAF rate for specific hardware |
| `void CheckForMixedDAS(string nonParentSerialNumber, double testSampleRate)` | Checks for mixed DAS configuration |
| `void SetParentMixedRates(string parentDAS, bool mixedRates)` | Sets mixed rate flag on parent DAS |
| `void SetTestClockProfiles(ClockSyncProfile masterProfile, ClockSyncProfile slaveProfile)` | Sets clock synchronization profiles |
| `void SetTestClockMasters(Dictionary<string, bool> testClockMasters)` | Sets clock master assignments |
| `void UpdateTestClockMaster(string childSerialNumber, bool testClockMaster)` | Updates clock master for specific hardware |
| `void SetTestPTPDomainIDs(Dictionary<string, byte> testPTPDomainIDs)` | Sets PTP domain IDs |
| `void UpdateTestPTPDomainID(string childSerialNumber, byte ptpDomainId)` | Updates PTP domain ID for specific hardware |
| `void Unset()` | Clears/resets view model state |
| `void Sort(object o, bool columnClick)` | Sorts hardware list |
| `void SortOverdue(object o, bool columnClick)` | Sorts overdue hardware list |
| `void SetIncluded(string[] serialNumbers, bool included)` | Sets included state for multiple hardware items |
| `void SetIncluded(int[] dasId)` | Sets included state by DAS ID array |
| `void Filter(string term)` | Filters the hardware list |
| `void MouseDoubleClick(int index)` | Handles double-click on hardware item |
| `void SetCache(IISOHardware[] hardware)` | Sets hardware cache |
| `void LoadTreeView(string serialNumber)` | Loads SLICE6 tree for given hardware serial number |
| `void Associate(ISLICE6TreeNode node)` | Associates SLICE6 with SLICE6DB (does not commit) |
| `void Associate(IHardware node)` | Associates units from one SLICE6DB with another (does not commit) |
| `void UnAssociate(ISLICE6TreeNode node)` | Removes SLICE6 association from SLICE6DB (does not commit) |
| `void SaveSLICE6Associations(string serialNumber)` | Commits SLICE6 association changes |
| `IHardware[] GetSelectedItems()` | Returns currently selected hardware items |
| `void Replace()` | Replaces `HardwareToReplace` with `ReplacementHardware` |
| `void SetCalPeriods(int g5CalPeriod, int slice1CalPeriod, int slice1_5CalPeriod, int slice2_CalPeriod, int slice6_CalPeriod, int tdasCalPeriod, int powerpro_CalPeriod, int slice6Air_CalPeriod, int slice6DB_CalPeriod, int tsrAir_CalPeriod, int slice6AirBridge_CalPeriod)` | Sets calibration periods for all hardware types |
---
## 3. Invariants
1. **FirstUseDate Validity**: `IHardware.FirstUseDate` is only meaningful when `IHardware.IsFirstUseValid` is `true`. A `null` `FirstUseDate` when `IsFirstUseValid` is `true` indicates the hardware has not been used since calibration.
2. **Association Operations**: The methods `Associate(ISLICE6TreeNode)`, `Associate(IHardware)`, and `UnAssociate(ISLICE6TreeNode)` perform in-memory modifications only. Changes must be persisted via `SaveSLICE6Associations(string serialNumber)`.
3. **Hardware Replacement**: The `Replace()` method requires both `HardwareToReplace` and `ReplacementHardware` to be set prior to invocation.
4. **View Mode Requirement**: `InitializeReplace` requires both a valid `ITestSetup` and `IsoViewMode` parameter.
---
## 4. Dependencies
### This module depends on:
- `DTS.Common.Base` - Provides `IBaseView`, `IBaseViewModel`
- `DTS.Common.Classes.Hardware` - Referenced in imports (specific types not visible in these files)
- `DTS.Common.Enums` - Provides `IsoViewMode` enum
- `DTS.Common.Interface.Pagination` - Provides `IFilterableListView`
- `DTS.Common.Interface.TestSetups.TestSetupsList` - Provides `ITestSetup`
- `System` - Core .NET types (`DateTime`, `Func`, `byte`)
- `System.Collections.Generic` - `Dictionary<>`
- `System.Collections.ObjectModel` - `ObservableCollection<>` (imported but not directly used in visible interfaces)
### Consumers of this module:
Cannot be determined from source alone. These are interface definitions; concrete implementations and consumers exist elsewhere in the codebase.
---
## 5. Gotchas
1. **Association Methods Don't Commit**: The `Associate` and `UnAssociate` methods explicitly state in their XML documentation that they "[do not commit]" changes. Developers must call `SaveSLICE6Associations` to persist changes.
2. **FirstUseDate Conditional Validity**: The `FirstUseDate` property has complex validity semantics tied to `IsFirstUseValid`. Code referencing 15524 DAS "First Use Date" feature should check `IsFirstUseValid` before relying on `FirstUseDate` values.
3. **SerializableAAF.DAS_TYPE Reference**: The `GetAAFForHardwareFunc` property references `SerializableAAF.DAS_TYPE`, which is not defined in these files. The location of this type is unclear from source alone.
4. **ClockSyncProfile Type Location**: The `SetTestClockProfiles` method uses `DTS.Common.ClockSyncProfile`, but the full namespace resolution and type definition are not visible in these files.
5. **IISOHardware vs IHardware**: The `SetCache` method accepts `IISOHardware[]`, which appears to be a different interface than `IHardware`. The relationship between these types is not defined in the provided source.

View File

@@ -0,0 +1,109 @@
---
source_files:
- Common/DTS.CommonCore/Interface/ISO/ExtraProperties/IExtraPropertiesListView.cs
- Common/DTS.CommonCore/Interface/ISO/ExtraProperties/IExtraPropertiesListViewModel.cs
- Common/DTS.CommonCore/Interface/ISO/ExtraProperties/IExtraProperty.cs
generated_at: "2026-04-16T12:25:39.988114+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "785426dcfee2c243"
---
# Documentation: DTS.Common.Interface.ISO.ExtraProperties
## 1. Purpose
This module defines the contract for a Model-View-ViewModel (MVVM) pattern implementation for managing a collection of "extra properties" — key-value pairs with UI status tracking. It provides interfaces for the view (`IExtraPropertiesListView`), view model (`IExtraPropertiesListViewModel`), and the individual property model (`IExtraProperty`). This abstraction layer allows for testable, decoupled management of dynamic property data within the broader DTS system, likely used for ISO-related metadata handling.
---
## 2. Public Interface
### IExtraPropertiesListView
A marker interface extending `IBaseView` with no additional members.
```csharp
public interface IExtraPropertiesListView : IBaseView { }
```
---
### IExtraPropertiesListViewModel
Defines the view model contract for managing a collection of extra properties.
```csharp
public interface IExtraPropertiesListViewModel : IBaseViewModel
```
**Properties:**
| Signature | Description |
|-----------|-------------|
| `IExtraPropertiesListView View { get; set; }` | Gets or sets the associated view instance. |
| `ObservableCollection<IExtraProperty> ExtraProperties { get; set; }` | The bindable collection of extra properties. |
| `bool IsReadOnly { get; set; }` | Controls whether the collection is in read-only mode. |
| `IExtraProperty[] SelectedProperties { get; }` | Returns an array of currently selected property items. |
**Methods:**
| Signature | Description |
|-----------|-------------|
| `void SetPage(IDataPROPage page)` | Injects a reference to the hosting page context. |
| `void SetParent(object parent)` | Sets a parent object reference (purpose unclear from source). |
| `void CopySelected()` | Copies the currently selected properties. |
| `void DeleteSelected()` | Deletes the currently selected properties. |
| `void SetExtraProperties(IList<IExtraProperty> properties)` | Replaces the collection with the provided list of properties. |
| `void Filter(object tag, string term)` | Filters the displayed properties based on a tag and search term. |
| `void Sort(object o, bool columnClick)` | Sorts the properties; parameters' specific meanings unclear from source. |
| `bool Validate(ref List<string> errors)` | Validates the collection; returns `true` if valid, populates `errors` with validation messages otherwise. |
---
### IExtraProperty
Defines the contract for an individual key-value property with UI state.
```csharp
public interface IExtraProperty : INotifyPropertyChanged
```
**Properties:**
| Signature | Description |
|-----------|-------------|
| `string Key { get; set; }` | The name/identifier of the property. |
| `string Value { get; set; }` | The value associated with the property. |
| `ICommand PasteCommand { get; set; }` | Command handler for paste operations; supports pasting multi-row data (e.g., CSV) into a single field. |
| `UIItemStatus ItemStatus { get; set; }` | The UI status of the item (e.g., failed, success). |
---
## 3. Invariants
- **INotifyPropertyChanged contract:** `IExtraProperty` extends `INotifyPropertyChanged`, so implementations must raise `PropertyChanged` events when `Key`, `Value`, or `ItemStatus` change.
- **Observable collection binding:** `ExtraProperties` uses `ObservableCollection<IExtraProperty>`, implying UI binding expectations where collection changes (add/remove) must notify observers.
- **Validation contract:** The `Validate` method must populate the `errors` list (passed by reference) with human-readable error messages when returning `false`.
- **Selection state:** `SelectedProperties` returns an array (not a collection), suggesting a snapshot of selection state at call time.
---
## 4. Dependencies
**This module depends on:**
- `DTS.Common.Base` — Provides `IBaseView`, `IBaseViewModel`, and `IDataPROPage`.
- `DTS.Common.Enums` — Provides `UIItemStatus` enum.
- `System.Collections.ObjectModel` — For `ObservableCollection<T>`.
- `System.ComponentModel` — For `INotifyPropertyChanged`.
- `System.Windows.Input` — For `ICommand`.
**Consumers:**
- Unknown from source alone. Concrete implementations of these interfaces would exist elsewhere in the codebase.
---
## 5. Gotchas
- **`PasteCommand` handles multi-row paste:** The XML comment explicitly states this command is designed to handle pasting multiple rows (e.g., CSV data) into a single field. Implementations must parse and handle this case.
- **`Sort` parameters are ambiguous:** The `Sort(object o, bool columnClick)` method signature does not clearly indicate what `object o` represents or how `columnClick` affects behavior. Purpose unclear from source alone.
- **`Filter` tag parameter is ambiguous:** The `object tag` parameter in `Filter(object tag, string term)` lacks documentation; its purpose is unclear from source alone.
- **`SetParent` purpose is unclear:** The method accepts a generic `object parent` without type constraints or documentation; its usage pattern cannot be determined from source alone.
- **`Validate` uses ref parameter:** The `ref List<string> errors` pattern requires callers to instantiate the list before calling; the method will populate it rather than replace it.

View File

@@ -0,0 +1,101 @@
---
source_files:
- Common/DTS.CommonCore/Interface/LabDetails/ILabDetailsView.cs
- Common/DTS.CommonCore/Interface/LabDetails/ILabDetailsViewModel.cs
- Common/DTS.CommonCore/Interface/LabDetails/ILabDetailsMenuView.cs
- Common/DTS.CommonCore/Interface/LabDetails/ILabDetailsMenuViewModel.cs
generated_at: "2026-04-16T12:09:23.345708+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "9b8d7157407e874e"
---
# Documentation: ILabDetails Interfaces
## 1. Purpose
This module defines four marker interfaces for the "Lab Details" feature within the DTS application, following the Model-View-ViewModel (MVVM) architectural pattern. These interfaces establish contracts for views and view models—both for the main lab details display and for an associated ribbon menu—enabling decoupled UI components that can be referenced abstractly throughout the codebase. The interfaces themselves define no members, serving purely as type identifiers that inherit from base view/viewmodel contracts.
---
## 2. Public Interface
### ILabDetailsView
**Signature:**
```csharp
namespace DTS.Common.Interface
{
public interface ILabDetailsView : IBaseView { }
}
```
**Behavior:** A marker interface for lab details views. Inherits from `IBaseView`. Defines no additional members beyond its base interface contract.
---
### ILabDetailsViewModel
**Signature:**
```csharp
namespace DTS.Common.Interface
{
public interface ILabDetailsViewModel : IBaseViewModel { }
}
```
**Behavior:** A marker interface for lab details view models. Inherits from `IBaseViewModel`. Defines no additional members beyond its base interface contract.
---
### ILabDetailsMenuView
**Signature:**
```csharp
namespace DTS.Common.Interface
{
public interface ILabDetailsMenuView : IRibbonView { }
}
```
**Behavior:** A marker interface for lab details ribbon menu views. Inherits from `IRibbonView`. Defines no additional members beyond its base interface contract.
---
### ILabDetailsMenuViewModel
**Signature:**
```csharp
namespace DTS.Common.Interface
{
public interface ILabDetailsMenuViewModel : IRibbonViewModel { }
}
```
**Behavior:** A marker interface for lab details ribbon menu view models. Inherits from `IRibbonViewModel`. Defines no additional members beyond its base interface contract.
---
## 3. Invariants
- All four interfaces are marker interfaces with no members; they rely entirely on their parent interfaces for any contractual requirements.
- `ILabDetailsView` and `ILabDetailsViewModel` form a paired View/ViewModel set.
- `ILabDetailsMenuView` and `ILabDetailsMenuViewModel` form a paired View/ViewModel set for ribbon-specific functionality.
- All interfaces reside in the `DTS.Common.Interface` namespace.
- The View interfaces (`ILabDetailsView`, `ILabDetailsMenuView`) inherit from view-specific base interfaces (`IBaseView`, `IRibbonView` respectively).
- The ViewModel interfaces (`ILabDetailsViewModel`, `ILabDetailsMenuViewModel`) inherit from viewmodel-specific base interfaces (`IBaseViewModel`, `IRibbonViewModel` respectively).
---
## 4. Dependencies
### This module depends on:
| Dependency | Namespace | Source File |
|------------|-----------|-------------|
| `IBaseView` | `DTS.Common.Base` | ILabDetailsView.cs |
| `IBaseViewModel` | `DTS.Common.Base` | ILabDetailsViewModel.cs |
| `IRibbonView` | `DTS.Common.RibbonControl` | ILabDetailsMenuView.cs |
| `IRibbonViewModel` | `DTS.Common.RibbonControl` | ILabDetailsMenuViewModel.cs |
### What depends on this module:
**Cannot be determined from source alone.** The source files contain no references to other modules importing or implementing these interfaces.
---
## 5. Gotchas
- **Empty interfaces:** All four interfaces define no members. Any behavior or properties must come from the base interfaces (`IBaseView`, `IBaseViewModel`, `IRibbonView`, `IRibbonViewModel`). Developers implementing these interfaces should consult those base interfaces for required members.
- **Purpose unclear from source:** The specific domain purpose of "Lab Details" (e.g., what data it represents, what operations it supports) cannot be determined from these interface definitions alone.
- **Ribbon vs. Base distinction:** The menu interfaces inherit from `IRibbonView`/`IRibbonViewModel` rather than `IBaseView`/`IBaseViewModel`, suggesting a different behavioral contract for ribbon-based UI components. The relationship between `IRibbonView` and `IBaseView` (if any) is not visible in these files.

View File

@@ -0,0 +1,73 @@
---
source_files:
- Common/DTS.CommonCore/Interface/ManageUsers/IManageUsersView.cs
- Common/DTS.CommonCore/Interface/ManageUsers/IManageUsersViewModel.cs
generated_at: "2026-04-16T12:21:41.903357+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "ca53759ac42ae06f"
---
# Documentation: IManageUsersView and IManageUsersViewModel Interfaces
## 1. Purpose
This module defines two empty marker interfaces, `IManageUsersView` and `IManageUsersViewModel`, which appear to be part of a Model-View-ViewModel (MVVM) architecture for a user management feature. These interfaces serve as type identifiers within the `DTS.Common.Interface` namespace, establishing a contract that ties specific View and ViewModel implementations to the "Manage Users" functionality while inheriting base behavior from core framework types.
---
## 2. Public Interface
### `IManageUsersView`
- **Namespace:** `DTS.Common.Interface`
- **Inherits from:** `IBaseView` (defined in `DTS.Common.Base`)
- **Signature:**
```csharp
public interface IManageUsersView : IBaseView
{
}
```
- **Behavior:** Defines no members of its own. Any behavior or contract is inherited from `IBaseView`. The specific contract of `IBaseView` is not visible in the provided source.
### `IManageUsersViewModel`
- **Namespace:** `DTS.Common.Interface`
- **Inherits from:** `IBaseViewModel` (defined in `DTS.Common.Base`)
- **Signature:**
```csharp
public interface IManageUsersViewModel : IBaseViewModel
{
}
```
- **Behavior:** Defines no members of its own. Any behavior or contract is inherited from `IBaseViewModel`. The specific contract of `IBaseViewModel` is not visible in the provided source.
---
## 3. Invariants
- Any class implementing `IManageUsersView` must also satisfy the contract of `IBaseView`.
- Any class implementing `IManageUsersViewModel` must also satisfy the contract of `IBaseViewModel`.
- The interfaces themselves define no additional invariants beyond their base type requirements.
- **Note:** The specific invariants enforced by `IBaseView` and `IBaseViewModel` cannot be determined from the provided source.
---
## 4. Dependencies
### This module depends on:
- `DTS.Common.Base` — Provides the base interfaces `IBaseView` and `IBaseViewModel`.
### What depends on this module:
- **Cannot be determined from source alone.** Consumers would be any concrete View or ViewModel classes implementing these interfaces, or any factory/service code that references these types for dependency injection or navigation purposes.
---
## 5. Gotchas
- **Empty interface definitions:** Both `IManageUsersView` and `IManageUsersViewModel` declare no members. This could indicate:
- They are intended as marker interfaces for type discrimination.
- They are placeholder/stub implementations awaiting future expansion.
- All required functionality is expected to come from the base interfaces.
- **Base interface contracts unknown:** Without visibility into `IBaseView` and `IBaseViewModel`, the actual obligations of implementers cannot be fully documented.
- **Naming convention inconsistency:** The file path references `ManageUsers` as a subdirectory (`Interface/ManageUsers/`), but the namespace remains flat (`DTS.Common.Interface`). This may cause confusion when locating types.

View File

@@ -0,0 +1,99 @@
---
source_files:
- Common/DTS.CommonCore/Interface/Networking/INetworkingView.cs
- Common/DTS.CommonCore/Interface/Networking/INetworkAdapterView.cs
- Common/DTS.CommonCore/Interface/Networking/INetworkAdapterViewModel.cs
- Common/DTS.CommonCore/Interface/Networking/INetworkingViewModel.cs
generated_at: "2026-04-16T12:12:55.166080+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "9f8faed114584889"
---
# Documentation: Networking Interfaces
## 1. Purpose
This module defines the core interfaces for networking-related Views and ViewModels within the DTS application framework. It establishes the contract for a Model-View-ViewModel (MVVM) architecture concerning network configuration, specifically providing abstractions for network adapter selection and SLICE6 multicast communication settings. These interfaces enable decoupling between UI components and networking logic, allowing for testability and separation of concerns.
---
## 2. Public Interface
### `INetworkingView`
**Namespace:** `DTS.Common.Interface`
**Inherits:** `IBaseView`
A marker interface with no additional members. Serves as a type contract for networking-related view components.
---
### `INetworkAdapterView`
**Namespace:** `DTS.Common.Interface`
**Inherits:** `IBaseView`
A marker interface with no additional members. Serves as a type contract for network adapter selection view components.
---
### `INetworkAdapterViewModel`
**Namespace:** `DTS.Common.Interface`
**Inherits:** `IBaseViewModel`
| Member | Type | Access | Description |
|--------|------|--------|-------------|
| `SelectedNetworkInterface` | `NetworkInterface` | get/set | Represents the currently selected network interface from `System.Net.NetworkInformation`. |
---
### `INetworkingViewModel`
**Namespace:** `DTS.Common.Interface`
**Inherits:** `IBaseViewModel`
| Member | Type | Access | Description |
|--------|------|--------|-------------|
| `View` | `INetworkingView` | get/set | Reference to the associated view instance. |
| `SLICE6MulticastAddress` | `string` | get/set | The multicast address string for SLICE6 communication. |
| `SLICE6MulticastAddressHasError` | `bool` | get | Indicates whether the multicast address has a validation error. |
| `SLICE6MulticastCommandPort` | `int` | get/set | The port number for SLICE6 multicast commands. |
| `SLICE6MulticastResponsePort` | `int` | get/set | The port number for SLICE6 multicast responses. |
**Methods:**
```csharp
void SetStatus(StatusInfo.StatusState status, string message = "", decimal percentage = -1, int processId = 0)
```
Sets the operational status with an optional message, completion percentage, and process identifier. Default values are provided for `message` (empty string), `percentage` (-1), and `processId` (0).
---
## 3. Invariants
- `INetworkingView` and `INetworkAdapterView` must be assignable to `IBaseView` (inheritance constraint).
- `INetworkAdapterViewModel` and `INetworkingViewModel` must be assignable to `IBaseViewModel` (inheritance constraint).
- `SLICE6MulticastAddressHasError` is a read-only property; its value is determined internally by the implementing class, likely based on the validity of `SLICE6MulticastAddress`.
- The `SetStatus` method has defined default parameters; callers may omit `message`, `percentage`, and `processId` arguments.
- The semantic meaning of `percentage = -1` as a default is unspecified in the source (possibly indicates "no percentage" or "indeterminate").
---
## 4. Dependencies
**This module depends on:**
- `DTS.Common.Base` — Provides `IBaseView` and `IBaseViewModel` base interfaces.
- `DTS.Common.Events` — Provides `StatusInfo` class used in `SetStatus` method signature.
- `System.Net.NetworkInformation` — Provides `NetworkInterface` type used in `INetworkAdapterViewModel`.
- `System.Collections.Generic` — Imported in `INetworkingViewModel.cs` but not directly used in the visible interface definition (may be used by `IBaseViewModel` or reserved for future use).
- `System.Threading.Tasks` — Imported in `INetworkingViewModel.cs` but not directly used in the visible interface definition (may be used by `IBaseViewModel` or reserved for future use).
**What depends on this module:**
- Cannot be determined from the provided source alone. Concrete implementations of these interfaces and consumers of these interfaces are not present in the provided files.
---
## 5. Gotchas
- **Unused imports:** The `INetworkingViewModel.cs` file imports `System.Collections.Generic` and `System.Threading.Tasks`, but neither namespace appears to be used in the interface definition. This may indicate dead code, refactoring remnants, or types used by inherited members from `IBaseViewModel`.
- **SLICE6 naming:** The "SLICE6" prefix on multicast-related properties suggests a specific protocol or device integration. The significance of this naming is not documented in the source.
- **Marker interfaces:** `INetworkingView` and `INetworkAdapterView` are empty marker interfaces. Their purpose beyond type identification is unclear from the source alone.
- **Validation coupling:** The presence of `SLICE6MulticastAddressHasError` implies validation logic tied to `SLICE6MulticastAddress`, but the validation rules (e.g., valid IP multicast format, acceptable range) are not defined in these interfaces.

View File

@@ -0,0 +1,75 @@
---
source_files:
- Common/DTS.CommonCore/Interface/Pagination/IPaginationView.cs
- Common/DTS.CommonCore/Interface/Pagination/IPaginationViewModel.cs
- Common/DTS.CommonCore/Interface/Pagination/IFilterableListView.cs
generated_at: "2026-04-16T12:09:07.697429+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "17272f9179ee1d83"
---
# Documentation: Pagination Interfaces
## 1. Purpose
This module defines core interfaces for pagination and filtering functionality within a view/view-model architecture. It provides marker interfaces for pagination-capable views and view models (`IPaginationView`, `IPaginationViewModel`) that integrate with a base view system, as well as a behavioral interface (`IFilterableListView`) for list views that support dynamic filtering. These interfaces establish contracts for UI components that need to handle paginated data and user-driven filter operations.
---
## 2. Public Interface
### `IPaginationView`
**Namespace:** `DTS.Common.Interface`
**Inheritance:** `IBaseView`
A marker interface for views that support pagination. Defines no members of its own; its contract is purely type identity, indicating that a view participates in pagination workflows.
---
### `IPaginationViewModel`
**Namespace:** `DTS.Common.Interface`
**Inheritance:** `IBaseViewModel`
A marker interface for view models that support pagination. Like `IPaginationView`, it defines no members and serves as a type marker for pagination-capable view models within the system.
---
### `IFilterableListView`
**Namespace:** `DTS.Common.Interface.Pagination`
An interface for views that support filterable list functionality.
| Member | Signature | Description |
|--------|-----------|-------------|
| `Filter` | `void Filter(object tag, string term)` | Applies a filter to the list view using the provided tag and search term. |
| `ClearAllFilters` | `void ClearAllFilters()` | Removes all active filters from the list view. |
| `ListViewId` | `string ListViewId { get; }` | Read-only property returning the identifier for this list view. |
---
## 3. Invariants
- `IPaginationView` and `IPaginationViewModel` must be assignable to `IBaseView` and `IBaseViewModel` respectively (enforced by inheritance).
- `IFilterableListView.ListViewId` must return a valid string identifier; whether null or empty strings are permitted is not specified in the source.
- The `Filter` method's `tag` parameter is of type `object`, implying any reference or value type may be passed; the semantic contract for this parameter is not defined in the source.
---
## 4. Dependencies
### This module depends on:
- `DTS.Common.Base` — provides `IBaseView` and `IBaseViewModel` base interfaces that `IPaginationView` and `IPaginationViewModel` extend.
### What depends on this module:
- Cannot be determined from the provided source files alone. These interfaces are likely consumed by concrete view/view model implementations and any framework code that handles pagination or filtering logic.
---
## 5. Gotchas
1. **Inconsistent namespace structure**: `IPaginationView` and `IPaginationViewModel` reside in `DTS.Common.Interface`, while `IFilterableListView` resides in `DTS.Common.Interface.Pagination`. This may cause confusion when importing or organizing related types.
2. **Marker interfaces with no members**: `IPaginationView` and `IPaginationViewModel` define no members, suggesting they may be used for type checking, dependency injection registration, or convention-based wiring. Their actual utility depends on framework-level code not shown here.
3. **Ambiguous `tag` parameter**: The `Filter(object tag, string term)` method accepts an untyped `object` parameter. Without additional documentation or implementation code, the intended use of this parameter (e.g., column identifier, filter type enum, or other metadata) is unclear.

View File

@@ -0,0 +1,119 @@
---
source_files:
- Common/DTS.CommonCore/Interface/Realtime/IRealtimeChannelSelectView.cs
- Common/DTS.CommonCore/Interface/Realtime/IRealtimeChannelSelectViewModel.cs
- Common/DTS.CommonCore/Interface/Realtime/IRealtimeChannel.cs
generated_at: "2026-04-16T12:15:17.411122+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "1785995e6227da9e"
---
# Documentation: DTS.Common.Interface.Realtime
## 1. Purpose
This module defines the contract for a realtime channel selection feature within a Model-View-ViewModel (MVVM) architecture. It provides three interfaces that together enable the display and selection of realtime data channels: `IRealtimeChannel` models channel metadata (sensor information, hardware identifiers, capacity), `IRealtimeChannelSelectView` represents the view abstraction, and `IRealtimeChannelSelectViewModel` defines the controller logic for managing available channels and user selection. This abstraction layer allows the realtime channel selection UI to be decoupled from concrete implementations.
---
## 2. Public Interface
### `IRealtimeChannelSelectView`
**Namespace:** `DTS.Common.Interface.Realtime`
**Signature:**
```csharp
public interface IRealtimeChannelSelectView : IBaseView { }
```
A marker interface extending `IBaseView`. Defines no members of its own; exists to establish a type hierarchy for view abstraction.
---
### `IRealtimeChannelSelectViewModel`
**Namespace:** `DTS.Common.Interface.Realtime`
**Signature:**
```csharp
public interface IRealtimeChannelSelectViewModel : IBaseViewModel
```
**Properties:**
| Property | Type | Access |
|----------|------|--------|
| `ChannelSelectView` | `IRealtimeChannelSelectView` | get; set; |
**Methods:**
| Method | Signature | Description |
|--------|-----------|-------------|
| `SetAvailableChannels` | `void SetAvailableChannels(IRealtimeChannel[] channels)` | Accepts an array of channels to populate the selection list. |
| `SetSearchText` | `void SetSearchText(string searchText)` | Sets the current search/filter text for channel filtering. |
| `SetRealtimeChannel` | `void SetRealtimeChannel(IRealtimeChannel channel)` | Sets the currently selected channel. |
---
### `IRealtimeChannel`
**Namespace:** `DTS.Common.Interface.Realtime`
**Signature:**
```csharp
public interface IRealtimeChannel
```
**Properties (all read-only):**
| Property | Type | Description |
|----------|------|-------------|
| `Capacity` | `double` | Numeric capacity value for the channel. |
| `DisplayOrder` | `int` | Sort order for UI display. |
| `SensorName` | `string` | Name of the sensor. |
| `ChannelName` | `string` | Name of the channel. |
| `DasNames` | `string[]` | Array of DAS (Data Acquisition System) names. |
| `SensorSerial` | `string` | Serial identifier for the sensor. |
| `Units` | `string` | Unit of measurement. |
| `UserValue1` | `string` | User-defined custom value. |
| `GroupName` | `string` | Group/category name for the channel. |
| `DisplayUnit` | `string` | Unit string for UI display purposes. |
| `HardwareChannelString` | `string` | Hardware identifier string. |
| `ISOCode` | `string` | ISO standard code. |
| `SensorsString` | `string` | String representation of sensor(s). |
| `DasName` | `string` | Single DAS name (singular form). |
| `Name` | `string` | General name identifier. |
| `HasPassedLevelTrigger` | `bool` | Flag indicating if a level trigger threshold has been exceeded. |
**Methods:**
| Method | Signature | Description |
|--------|-----------|-------------|
| `GetId` | `string GetId()` | Returns a unique identifier string for the channel. |
---
## 3. Invariants
- **View-ViewModel Binding:** `IRealtimeChannelSelectViewModel.ChannelSelectView` must reference a valid `IRealtimeChannelSelectView` instance when the view model is in use.
- **Channel Array Handling:** `SetAvailableChannels` accepts an array; callers should handle null or empty arrays appropriately. The behavior for null arrays is not specified in the interface.
- **Immutable Channel Data:** All properties on `IRealtimeChannel` are read-only (getters only). Implementations must provide values at construction or through other means not defined in this interface.
- **Identifier Consistency:** The relationship between `GetId()` and `Name` is not defined by the interface; they may or may not return the same value depending on implementation.
---
## 4. Dependencies
**This module depends on:**
- `DTS.Common.Base` — Provides `IBaseView` and `IBaseViewModel` base interfaces that `IRealtimeChannelSelectView` and `IRealtimeChannelSelectViewModel` extend, respectively.
**What depends on this module:**
- Unknown from source alone. Concrete implementations of these interfaces, as well as consumers of the channel selection feature, would depend on this module.
---
## 5. Gotchas
- **Singular vs. Plural DAS Names:** The interface defines both `DasName` (singular `string`) and `DasNames` (plural `string[]`). The semantic difference between these two properties is not documented in the interface; implementers and consumers should clarify whether they represent the same data in different forms or serve distinct purposes.
- **Marker Interface:** `IRealtimeChannelSelectView` is an empty interface with no members. Its purpose appears to be purely for type identification within the `IBaseView` hierarchy.
- **Method vs. Property for ID:** `GetId()` is defined as a method rather than a property (e.g., `Id`), which is inconsistent with the other identifier-like properties (`Name`, `ChannelName`, `SensorName`). The rationale for this design choice is not evident from the source.
- **Search Text Behavior:** The `SetSearchText` method implies filtering capability, but the interface does not define how search text affects the available channels or whether it triggers immediate UI updates.

View File

@@ -0,0 +1,56 @@
---
source_files:
- Common/DTS.CommonCore/Interface/RegionOfInterest/IRegionOfInterest.cs
generated_at: "2026-04-16T12:08:15.186938+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "59ff4edea9524aba"
---
# Documentation: IRegionOfInterest
## 1. Purpose
This module defines the `IRegionOfInterest` interface within the `DTS.Common.Interface.RegionOfInterest` namespace. It establishes a contract for representing a specific bounded interval (defined by `Start` and `End`) that can be toggled, marked as default, and associated with specific data channels. By inheriting from `INotifyPropertyChanged`, this interface is designed to support data-binding scenarios, typically in UI or reactive environments, allowing consumers to react to changes in the region's state.
## 2. Public Interface
### Interface: `IRegionOfInterest`
**Namespace:** `DTS.Common.Interface.RegionOfInterest`
**Inherits:** `INotifyPropertyChanged`
#### Properties
* **`string Suffix { get; set; }`**
* Gets or sets a string suffix associated with the region.
* **`double Start { get; set; }`**
* Gets or sets the starting boundary of the region.
* **`double End { get; set; }`**
* Gets or sets the ending boundary of the region.
* **`bool IsEnabled { get; set; }`**
* Gets or sets a value indicating whether the region is currently active.
* **`bool IsDefault { get; set; }**
* Gets or sets a value indicating whether this region is the default selection.
* **`string[] ChannelNames { get; set; }`**
* Gets or sets an array of strings representing the names of channels associated with this region.
#### Methods
* **`void SetChannelNamesNoNotify(string[] names)`**
* Sets the `ChannelNames` property without raising the `PropertyChanged` event. This is likely used for bulk updates or initialization where UI notification overhead is unnecessary or undesirable.
* **`void ResetSuffix()`**
* Resets the `Suffix` property to a default value. The specific default value is determined by the implementation and is not defined in the interface.
## 3. Invariants
* **Notification Contract:** Implementations must raise the `PropertyChanged` event (from the inherited `INotifyPropertyChanged` interface) when the value of any property changes, with the specific exception of changes made via the `SetChannelNamesNoNotify` method.
* **Boundary Types:** The `Start` and `End` properties are defined as `double`, implying the region operates over a continuous numeric domain (e.g., time, distance, or index).
## 4. Dependencies
* **External Dependencies:**
* `System.ComponentModel`: Required for the `INotifyPropertyChanged` interface.
* **Downstream Dependencies:**
* Unknown from this source file alone. However, classes implementing this interface and ViewModels consuming these regions will depend on this contract.
## 5. Gotchas
* **Silent Updates via `SetChannelNamesNoNotify`:** Consumers listening to `PropertyChanged` events will not be notified when `SetChannelNamesNoNotify` is invoked. Logic that relies on event propagation to validate or synchronize state must account for this silent update path.
* **Array Mutability:** The `ChannelNames` property exposes a `string[]` array. Depending on the implementation, the array itself may be mutable, meaning modifying the array elements after retrieval might bypass the setter and its potential side effects or notifications.
* **Undefined Reset Logic:** The behavior of `ResetSuffix()` is implementation-specific. Developers must inspect the concrete class to determine what string the suffix is reset to.

View File

@@ -0,0 +1,104 @@
---
source_files:
- Common/DTS.CommonCore/Interface/RegionOfInterest/RegionOfInterestChannels/IRegionOfInterestChannelsView.cs
- Common/DTS.CommonCore/Interface/RegionOfInterest/RegionOfInterestChannels/IRegionOfInterestChannelsViewModel.cs
generated_at: "2026-04-16T12:22:46.294400+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "3255d2bc1a28f8fd"
---
# Documentation: RegionOfInterestChannels Module
## 1. Purpose
This module defines the View and ViewModel interfaces for managing Regions of Interest (ROI) channels within the DTS system. It follows a Model-View-ViewModel (MVVM) pattern, where `IRegionOfInterestChannelsView` represents the view contract and `IRegionOfInterestChannelsViewModel` defines the presentation logic for filtering, sorting, selecting, and validating ROI channel data. This module appears to be part of a larger test setup or data acquisition system where hardware channels are organized into regions of interest for monitoring or analysis.
---
## 2. Public Interface
### IRegionOfInterestChannelsView
**Declaration:**
```csharp
public interface IRegionOfInterestChannelsView : IBaseView { }
```
A marker interface extending `IBaseView`. No members are defined beyond the inherited contract.
---
### IRegionOfInterestChannelsViewModel
**Declaration:**
```csharp
public interface IRegionOfInterestChannelsViewModel : IBaseViewModel
```
**Properties:**
| Name | Type | Description |
|------|------|-------------|
| `View` | `IRegionOfInterestChannelsView` | Gets or sets the associated view instance. |
| `RegionsOfInterest` | `BindingList<IRegionOfInterest>` | Gets or sets the collection of regions of interest being managed. |
| `AllChannelSSNs` | `string[]` | Gets an array of all channel SSNs (presumably Serial Numbers). |
| `ISOViewMode` | `IsoViewMode` | Gets or sets the current ISO view mode. |
**Methods:**
| Signature | Description |
|-----------|-------------|
| `void SetParent(object o)` | Sets a parent object reference (purpose unclear from source alone). |
| `void SetGroups(ITestSetup testSetup, Dictionary<string, IDASHardware> serialNumberToHardware, IsoViewMode viewMode)` | Configures groups using a test setup, hardware lookup dictionary, and view mode. |
| `void SetTest(string path, IsoViewMode viewMode)` | Sets a test context using a file path and view mode. |
| `void Filter(object tag, string term)` | Filters channels based on a tag and search term. |
| `void Filter(string term)` | Filters in (searches for) a term among all channels. |
| `void Sort(object o, bool columnClick)` | Sorts the data; parameters suggest sorting by column interaction. |
| `void SelectAll(int roiIndex, bool selection)` | Selects or deselects all items within a specific region of interest identified by `roiIndex`. |
| `bool Validate(ref List<string> errors)` | Validates the current state; populates the `errors` list with validation messages and returns a boolean success indicator. |
---
## 3. Invariants
1. **MVVM Contract**: `IRegionOfInterestChannelsViewModel` must always have an associated `IRegionOfInterestChannelsView` via the `View` property.
2. **BindingList Usage**: `RegionsOfInterest` uses `BindingList<IRegionOfInterest>`, implying the collection must support change notification for UI binding.
3. **Validation Contract**: The `Validate` method must populate the `errors` list (passed by reference) when returning `false`.
4. **ROI Index Bounds**: The `roiIndex` parameter in `SelectAll` must correspond to a valid index within `RegionsOfInterest` (not enforced at interface level, but implied).
---
## 4. Dependencies
**This module depends on:**
- `DTS.Common.Base` — Provides `IBaseView` and `IBaseViewModel` base interfaces.
- `System.Collections.Generic` — For `List<T>` and `Dictionary<TKey, TValue>`.
- `System.Collections.ObjectModel` — For collection types.
- `System.ComponentModel` — For `BindingList<T>`.
- `DTS.Common.Interface.DataRecorders` — Provides `IDASHardware`.
- `DTS.Common.Interface.TestSetups.TestSetupsList` — Provides `ITestSetup`.
- `DTS.Common.Enums` — Provides `IsoViewMode` enum.
**Referenced but not actively used (commented code):**
- `DTS.Common.Interface.Groups``ITestObject` (in commented `SetGroups` overload).
- `DTS.Common.Interface.GroupTemplate``ITestObjectTemplate` (in commented `SetGroups` overload).
**Dependents:**
- Cannot be determined from these source files alone.
---
## 5. Gotchas
1. **Commented Method Signature**: There is a commented-out overload of `SetGroups`:
```csharp
//void SetGroups(ITestObject[] groups, Dictionary<string, IDASHardware> hardwareLookup, ITestObjectTemplate[] groupTemplates);
```
This suggests a refactoring occurred where the method signature changed to accept `ITestSetup` instead of individual arrays. The active `SetGroups` method has different semantics—callers should not assume the old signature is still supported.
2. **Ambiguous `SetParent` Purpose**: The `SetParent(object o)` method accepts a generic `object` type without documentation. The intended parent type and usage context are unclear from the source alone.
3. **Ambiguous `Sort` Parameters**: The `Sort(object o, bool columnClick)` method uses non-descriptive parameter names. The meaning of `o` and the `columnClick` flag's effect on sorting behavior are unclear from the source alone.
4. **SSN Terminology**: `AllChannelSSNs` uses the abbreviation "SSN" without definition. This likely means "Serial Number" but should be confirmed against system documentation.

View File

@@ -0,0 +1,42 @@
---
source_files:
- Common/DTS.CommonCore/Interface/RunTest/IRunTestView.cs
- Common/DTS.CommonCore/Interface/RunTest/IRunTestViewModel.cs
generated_at: "2026-04-16T12:21:57.874851+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "e490e1c23959cb19"
---
# Documentation: DTS.Common.Interface.RunTest
## 1. Purpose
This module defines the abstract contracts for the "Run Test" feature within the system. It provides two marker interfaces, `IRunTestView` and `IRunTestViewModel`, which establish a specific View-ViewModel relationship intended for test execution workflows. These interfaces likely serve as registration points for dependency injection containers or for identifying specific view types within an MVVM (Model-View-ViewModel) architecture.
## 2. Public Interface
### `IRunTestView`
* **Signature:** `public interface IRunTestView : IBaseView`
* **Namespace:** `DTS.Common.Interface`
* **Description:** Defines the contract for the View component in the Run Test feature. It inherits from `IBaseView` but adds no additional members, functioning as a specific type identifier for the View layer.
### `IRunTestViewModel`
* **Signature:** `public interface IRunTestViewModel : IBaseViewModel`
* **Namespace:** `DTS.Common.Interface`
* **Description:** Defines the contract for the ViewModel component in the Run Test feature. It inherits from `IBaseViewModel` but adds no additional members, functioning as a specific type identifier for the ViewModel layer.
## 3. Invariants
* **Hierarchy Enforcement:** Any class implementing `IRunTestView` must also implement `IBaseView`. Any class implementing `IRunTestViewModel` must also implement `IBaseViewModel`.
* **Contract Emptiness:** Neither `IRunTestView` nor `IRunTestViewModel` define any methods, properties, or events of their own. Their behavior is entirely derived from their base interfaces (`IBaseView` and `IBaseViewModel` respectively).
## 4. Dependencies
* **Internal Dependencies:**
* `DTS.Common.Base`: Both source files import this namespace. It is the location of the base interfaces `IBaseView` and `IBaseViewModel`.
* **External Consumers:**
* Concrete View classes (intended to implement `IRunTestView`).
* Concrete ViewModel classes (intended to implement `IRunTestViewModel`).
* Navigation or DI registration logic that resolves views based on these specific interface types.
## 5. Gotchas
* **Marker Interfaces:** Both interfaces are empty (marker interfaces). Developers should not expect specific properties or methods (such as `RunTest()` or `TestResults`) to be defined at this level. The actual logic for "Run Test" functionality is not enforced by these contracts and must be looked for in the concrete implementations or base classes.
* **Base Implementation Unknown:** The specific members provided by `IBaseView` and `IBaseViewModel` are not visible in the provided source code. Understanding the full capabilities of these interfaces requires inspecting `DTS.Common.Base`.

View File

@@ -0,0 +1,58 @@
---
source_files:
- Common/DTS.CommonCore/Interface/SensorDatabase/ISensorDatabaseView.cs
- Common/DTS.CommonCore/Interface/SensorDatabase/ISensorDatabaseViewModel.cs
generated_at: "2026-04-16T12:22:13.865366+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "9059966d6baab89c"
---
# Documentation: ISensorDatabaseView and ISensorDatabaseViewModel
## 1. Purpose
This module defines two marker interfaces—`ISensorDatabaseView` and `ISensorDatabaseViewModel`—that establish type identity for components within a sensor database feature area. These interfaces follow the Model-View-ViewModel (MVVM) pattern by inheriting from base view and view model contracts. They exist to provide type discrimination and potential future extension points for sensor database-related UI components without prescribing any specific members or behaviors at this level.
---
## 2. Public Interface
### `ISensorDatabaseView`
- **Namespace:** `DTS.Common.Interface`
- **Declaration:** `public interface ISensorDatabaseView : IBaseView`
- **Members:** None defined.
- **Behavior:** Serves as a marker interface for view components associated with sensor database functionality. Inherits from `IBaseView` but adds no additional contracts.
### `ISensorDatabaseViewModel`
- **Namespace:** `DTS.Common.Interface`
- **Declaration:** `public interface ISensorDatabaseViewModel : IBaseViewModel`
- **Members:** None defined.
- **Behavior:** Serves as a marker interface for view model components associated with sensor database functionality. Inherits from `IBaseViewModel` but adds no additional contracts.
---
## 3. Invariants
- `ISensorDatabaseView` must always inherit from `IBaseView`.
- `ISensorDatabaseViewModel` must always inherit from `IBaseViewModel`.
- Both interfaces currently define no members, so any implementation must satisfy only the contracts of their respective base interfaces (`IBaseView` and `IBaseViewModel`).
**Note:** The specific invariants of `IBaseView` and `IBaseViewModel` are not visible in the provided source and cannot be documented here.
---
## 4. Dependencies
### This module depends on:
- `DTS.Common.Base` — Provides `IBaseView` and `IBaseViewModel` base interfaces.
### What depends on this module:
- **Unknown from source alone.** No consumers of `ISensorDatabaseView` or `ISensorDatabaseViewModel` are present in the provided files.
---
## 5. Gotchas
- **Empty interfaces:** Both `ISensorDatabaseView` and `ISensorDatabaseViewModel` are currently empty marker interfaces. They provide type identity but no behavioral contract. Developers should not expect any sensor-database-specific methods or properties from these interfaces alone; any such members must be defined in derived interfaces or concrete implementations.
- **Base interface contracts unknown:** The actual requirements for implementers are determined by `IBaseView` and `IBaseViewModel`, which are not included in the provided source. Consult those definitions to understand full implementation obligations.

View File

@@ -0,0 +1,54 @@
---
source_files:
- Common/DTS.CommonCore/Interface/SensorTemplates/ISensorTemplatesView.cs
- Common/DTS.CommonCore/Interface/SensorTemplates/ISensorTemplatesViewModel.cs
generated_at: "2026-04-16T12:19:45.208798+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "d4eff855657fe005"
---
# Documentation: ISensorTemplatesView and ISensorTemplatesViewModel
## 1. Purpose
This module defines two marker interfaces for the Sensor Templates feature within an MVVM (Model-View-ViewModel) architecture. `ISensorTemplatesView` and `ISensorTemplatesViewModel` establish the contractual boundaries between the view and view model layers, both inheriting from base interfaces in `DTS.Common.Base`. They appear to serve as extension points or type identifiers for dependency injection and navigation purposes.
## 2. Public Interface
### `ISensorTemplatesView`
- **Namespace:** `DTS.Common.Interface`
- **Inheritance:** `IBaseView`
- **Signature:**
```csharp
public interface ISensorTemplatesView : IBaseView
```
- **Behavior:** Empty interface with no members. Inherits from `IBaseView`. Likely used as a marker interface for view registration or type constraints.
### `ISensorTemplatesViewModel`
- **Namespace:** `DTS.Common.Interface`
- **Inheritance:** `IBaseViewModel`
- **Signature:**
```csharp
public interface ISensorTemplatesViewModel : IBaseViewModel
```
- **Behavior:** Empty interface with no members. Inherits from `IBaseViewModel`. Likely used as a marker interface for view model registration or type constraints.
## 3. Invariants
- Both interfaces must always inherit from their respective base interfaces (`IBaseView` and `IBaseViewModel`).
- The interfaces define no members of their own; any behavior is inherited from the base interfaces or expected to be added by implementers.
- The naming convention implies a 1:1 pairing between `ISensorTemplatesView` and `ISensorTemplatesViewModel` within the Sensor Templates feature area.
## 4. Dependencies
### This module depends on:
- `DTS.Common.Base` — provides `IBaseView` and `IBaseViewModel` base interfaces
### What depends on this module:
- **Cannot be determined from source alone.** Concrete implementations of these interfaces would exist elsewhere in the codebase, likely in view and view model classes related to sensor template management.
## 5. Gotchas
- **Empty marker interfaces:** Both interfaces are empty, which may confuse developers expecting explicit member definitions. The actual contract is inherited from `IBaseView` and `IBaseViewModel`. The purpose of these empty interfaces (type identification, DI registration, future extensibility) is not documented in the source.
- **Base interface contracts unknown:** Without visibility into `IBaseView` and `IBaseViewModel`, the full contract that implementers must satisfy cannot be determined from these files alone.

View File

@@ -0,0 +1,38 @@
---
source_files:
- Common/DTS.CommonCore/Interface/Sensors/IZeroMethods.cs
- Common/DTS.CommonCore/Interface/Sensors/IInitialOffsets.cs
- Common/DTS.CommonCore/Interface/Sensors/ISensorDbRecord.cs
- Common/DTS.CommonCore/Interface/Sensors/IStreamInputSettingDefaults.cs
- Common/DTS.CommonCore/Interface/Sensors/ISoftwareFilter.cs
- Common/DTS.CommonCore/Interface/Sensors/IDigitalOutDbRecord.cs
- Common/DTS.CommonCore/Interface/Sensors/IStreamInputRecord.cs
- Common/DTS.CommonCore/Interface/Sensors/IDigitalOutDefaults.cs
- Common/DTS.CommonCore/Interface/Sensors/IDigitalInputDefaults.cs
- Common/DTS.CommonCore/Interface/Sensors/IDigitalInputScaleMultiplier.cs
- Common/DTS.CommonCore/Interface/Sensors/IUartSettingDefaults.cs
- Common/DTS.CommonCore/Interface/Sensors/IAnalogDefaults.cs
- Common/DTS.CommonCore/Interface/Sensors/ISensorCalDbRecord.cs
- Common/DTS.CommonCore/Interface/Sensors/ISensorChange.cs
- Common/DTS.CommonCore/Interface/Sensors/IUARTRecord.cs
- Common/DTS.CommonCore/Interface/Sensors/IStreamOutputSettingDefaults.cs
- Common/DTS.CommonCore/Interface/Sensors/ISensorCalibration.cs
- Common/DTS.CommonCore/Interface/Sensors/IStreamOutputRecord.cs
- Common/DTS.CommonCore/Interface/Sensors/ICalibrationRecord.cs
- Common/DTS.CommonCore/Interface/Sensors/IIEPESensorDefaults.cs
- Common/DTS.CommonCore/Interface/Sensors/ISquibDbRecord.cs
- Common/DTS.CommonCore/Interface/Sensors/ISensorBase.cs
- Common/DTS.CommonCore/Interface/Sensors/ISquibSettingDefaults.cs
- Common/DTS.CommonCore/Interface/Sensors/IDigitalInDbRecord.cs
- Common/DTS.CommonCore/Interface/Sensors/ISensorData.cs
- Common/DTS.CommonCore/Interface/Sensors/IAnalogDbRecord.cs
generated_at: "2026-04-16T12:10:25.976382+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "f478d329c262291c"
---
# Documentation: DTS.Common.Interface.Sensors
## 1. Purpose
This module defines the data contracts (interfaces) for the sensor management subsystem within the DTS application. It provides abstractions for database persistence records (e.g., `IAnalogDbRecord`, `ISquibDbRecord`), runtime configuration (`ISensorData`), calibration data (`ISensorCalibration`), and default settings for various hardware types (Digital I/O, UART, Stream, IEPE).

View File

@@ -0,0 +1,82 @@
---
source_files:
- Common/DTS.CommonCore/Interface/Sensors/SensorSettingsModule/ISensorSettingsView.cs
- Common/DTS.CommonCore/Interface/Sensors/SensorSettingsModule/ICalibrationPolicy.cs
- Common/DTS.CommonCore/Interface/Sensors/SensorSettingsModule/ISensorSettingsViewModel.cs
generated_at: "2026-04-16T12:23:47.884836+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "1a993886a7ce02c0"
---
# Documentation: Sensor Settings Module Interfaces
## 1. Purpose
This module defines the core contracts for the Sensor Settings configuration UI within the DTS application. It establishes a Model-View-ViewModel (MVVM) architecture for managing sensor-related defaults, specifically handling calibration policies, digital I/O, squib settings, and analog/IEPE sensor configurations. The module provides the interface layer for persisting these settings to a database (associated with a specific user) and for importing/exporting calibration data via XML.
## 2. Public Interface
### `ISensorSettingsView`
* **Namespace:** `DTS.Common.Interface.Sensors.SensorSettingsModule`
* **Inheritance:** `DTS.Common.Base.IBaseView`
* **Description:** A marker interface representing the View in the MVVM pattern. It defines no specific members beyond those inherited from `IBaseView`.
### `ICalibrationPolicy`
* **Namespace:** `DTS.Common.Interface.Sensors.SensorSettingsModule`
* **Description:** Defines the contract for managing sensor calibration settings, including policy selection and XML serialization.
* **Properties:**
* `SensorConstants.SensorCalPolicy SelectedCalPolicy { get; set; }`: Gets or sets the currently active calibration policy.
* `SensorConstants.SensorCalPolicy[] AvailableSensorCalPolicies { get; }`: Gets an array of all valid calibration policies available for selection.
* `int WarningPeriod { get; set; }`: Gets or sets the warning period (in days) before calibration is due.
* `bool UseSensorFirstUseDate { get; set; }`: Gets or sets a flag indicating if the calibration interval starts from the first use date rather than the calibration date.
* **Methods:**
* `void ReadXML(System.Xml.XmlElement root)`: Imports calibration settings from an XML element.
* `void WriteXML(ref System.Xml.XmlWriter writer)`: Exports calibration settings using an XML writer.
### `ISensorSettingsViewModel`
* **Namespace:** `DTS.Common.Interface.Sensors.SensorSettingsModule`
* **Inheritance:** `DTS.Common.Base.IBaseViewModel`
* **Description:** Defines the behavior and state management for the Sensor Settings view, acting as the bridge between the UI and the data model.
* **Properties:**
* `string User { get; set; }`: The username context for saving/reading settings.
* `int UserID { get; set; }`: The user ID context for saving/reading settings.
* `ISensorSettingsView View { get; set; }`: The associated View instance.
* `ISquibSettingDefaults SquibSettings { get; set; }`: Accessor for squib setting defaults.
* `IDigitalOutDefaults DigitalOutSettings { get; set; }`: Accessor for digital output defaults.
* `IDigitalInputDefaults DigitalInputDefaults { get; set; }`: Accessor for digital input defaults.
* `IIEPESensorDefaults IEPESensorDefaults { get; set; }`: Accessor for IEPE sensor defaults.
* `ICalibrationPolicy SensorCalibrationDefaults { get; set; }`: Accessor for calibration policy defaults.
* `IAnalogDefaults AnalogDefaults { get; set; }`: Accessor for analog defaults (referenced as FB 13120).
* **Methods:**
* `void RestoreOriginalSettings()`: Reverts all settings to their original state.
* `void Unset()`: Uninitializes the display and frees resources.
* `void OnSetActive()`: Initializes the display when the view becomes active.
* `bool ValidateAndSave()`: Validates current settings and persists them if valid. Returns `true` if successful, `false` otherwise.
## 3. Invariants
* **Validation Guarantees:** The `ValidateAndSave()` method on `ISensorSettingsViewModel` must return `false` if settings are invalid, and it must *not* persist invalid settings.
* **Unit Consistency:** The `WarningPeriod` in `ICalibrationPolicy` is explicitly defined in **days**.
* **Lifecycle:** `OnSetActive()` is intended for initialization, while `Unset()` is intended for cleanup/resource freeing.
* **Context Requirement:** Database operations rely on `User` and `UserID` properties being set correctly within the `ISensorSettingsViewModel`.
## 4. Dependencies
### Internal Dependencies
* **`DTS.Common.Base`**: Required for `IBaseView` and `IBaseViewModel` interfaces.
* **`DTS.Common.Enums.Sensors`**: Required for the `SensorConstants.SensorCalPolicy` enum used in `ICalibrationPolicy`.
### External Dependencies
* **`System.Xml`**: Used for XML serialization features (`XmlElement`, `XmlWriter`) in `ICalibrationPolicy`.
### Referenced Types (Definitions not provided in source)
The following interfaces are referenced as properties in `ISensorSettingsViewModel` but their definitions are not included in the provided source files:
* `ISquibSettingDefaults`
* `IDigitalOutDefaults`
* `IDigitalInputDefaults`
* `IIEPESensorDefaults`
* `IAnalogDefaults`
## 5. Gotchas
* **`ref` keyword in `WriteXML`:** The `WriteXML` method in `ICalibrationPolicy` passes `System.Xml.XmlWriter` by reference (`ref`). This is unusual for a writer object (which is a reference type) and implies the method might replace the writer instance or is adhering to a legacy signature constraint.
* **Empty View Interface:** `ISensorSettingsView` defines no members. Developers should expect all specific view capabilities to be defined by the `IBaseView` parent or the concrete implementation.
* **Mixed Responsibilities in `ValidateAndSave`:** The `ValidateAndSave` method combines validation logic with persistence logic (side effects). Callers should be aware that calling this method triggers a database write operation upon success; it is not a pure validation check.

View File

@@ -0,0 +1,304 @@
---
source_files:
- Common/DTS.CommonCore/Interface/Sensors/SensorsList/ISensorsListOverdueView.cs
- Common/DTS.CommonCore/Interface/Sensors/SensorsList/ISensorTemplatesExportView.cs
- Common/DTS.CommonCore/Interface/Sensors/SensorsList/ISensorsTemplatesImportView.cs
- Common/DTS.CommonCore/Interface/Sensors/SensorsList/ISensorTemplatesViewModel.cs
- Common/DTS.CommonCore/Interface/Sensors/SensorsList/ISensorsListView.cs
- Common/DTS.CommonCore/Interface/Sensors/SensorsList/ISensorsListEditGroupView.cs
- Common/DTS.CommonCore/Interface/Sensors/SensorsList/IDragAndDropItem.cs
- Common/DTS.CommonCore/Interface/Sensors/SensorsList/ISquib.cs
- Common/DTS.CommonCore/Interface/Sensors/SensorsList/ISensorsListEditGroupViewModel.cs
- Common/DTS.CommonCore/Interface/Sensors/SensorsList/IStreamInputSetting.cs
- Common/DTS.CommonCore/Interface/Sensors/SensorsList/ISensorsListViewModel.cs
- Common/DTS.CommonCore/Interface/Sensors/SensorsList/IUartIOSetting.cs
- Common/DTS.CommonCore/Interface/Sensors/SensorsList/IDigitalInputSetting.cs
- Common/DTS.CommonCore/Interface/Sensors/SensorsList/IDigitalOutputSetting.cs
- Common/DTS.CommonCore/Interface/Sensors/SensorsList/IStreamOutputSetting.cs
- Common/DTS.CommonCore/Interface/Sensors/SensorsList/IAnalogSensor.cs
generated_at: "2026-04-16T12:25:06.358541+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "843b21a9981849bf"
---
# Documentation: DTS.Common.Interface.Sensors.SensorsList
## 1. Purpose
This module defines the contract layer for the sensor management subsystem within DTS. It provides interfaces for various sensor types (Analog, Squib, Digital I/O, UART, Stream I/O) used in UI presentation, along with View and ViewModel interfaces following an MVP/MVC pattern. The module enables sensor listing, editing, filtering, import/export functionality, and drag-and-drop operations between sensor lists. These abstractions decouple the presentation layer from concrete sensor implementations.
---
## 2. Public Interface
### View Interfaces
#### `ISensorsListView : IBaseView`
- `void HandleColumns(CalibrationBehaviors calibrationBehavior)` — Configures columns based on calibration behavior.
- `void SetIncludedVisible(bool bUsesIncludeColumn)` — Controls visibility of the "Included" column.
#### `ISensorsListEditGroupView : IBaseView`
- `void HandleColumns()` — Handles adding/removing columns before view display. (Reference: Case 13065 - Sensor "First Use" Date)
#### `ISensorsListOverdueView : IBaseView`
- Marker interface with no members.
#### `ISensorTemplatesExportView : IBaseView`
- Marker interface with no members.
#### `ISensorsTemplatesImportView : IBaseView`
- Marker interface with no members.
---
### ViewModel Interfaces
#### `ISensorsListViewModel : IBaseViewModel, IFilterableListView`
- **Properties:**
- `ISensorsListView View { get; set; }`
- `IAnalogSensor[] AnalogSensors { get; set; }`
- `ISquib[] Squibs { get; set; }`
- `IDigitalInputSetting[] DigitalInputSettings { get; set; }`
- `IDigitalOutputSetting[] DigitalOutputSettings { get; set; }`
- `IUartIOSetting[] UartIOSettings { get; set; }`
- `IStreamOutputSetting[] StreamOutputSettings { get; set; }`
- `CalibrationBehaviors CalibrationBehavior { get; set; }`
- `string CapacityFormat { get; set; }`
- `bool ShowOnlyTDCSensors { set; }`
- `bool ShowOnlySlicewareSensors { set; }`
- **Methods:**
- `void GetSensors(int sensorCalWarningPeriodDays, bool included)`
- `void GetSensors(int sensorCalWarningPeriodDays, int[] sensorsAllowed, IReadOnlyDictionary<int, ISensorData> sensors)` — Retrieves sensors matching allowed list.
- `void SetSelectedSerial(string serialNumber)`
- `void Sort(object sortBy, bool bColumnClick)`
- `void SortOverdue(object sortBy, bool bColumnClick)`
- `void Unset()`
- `void Filter(string currentFilter)`
- `void FilterSquib(object columnTag, string searchTerm)`
- `void FilterDigitalIn(object columnTag, string searchTerm)`
- `void FilterDigitalOut(object columnTag, string searchTerm)`
- `void FilterUartIO(object columnTag, string searchTerm)`
- `void FilterStreamIn(object columnTag, string searchTerm)`
- `void FilterStreamOut(object columnTag, string searchTerm)`
- `void SetCachedSensors(ISensorData[] cachedSensors)`
- `void SetCachedCalibrations(ISensorCalibration[] sensorCalibrations)`
- `void UseIncludedColumn(bool bUsesIncludedColumn)`
- `void SetIncludedAll(bool bIncluded)`
- `IDragAndDropItem[] GetIncludedSensors()` — Returns all sensors marked as included.
#### `ISensorsListEditGroupViewModel : IBaseViewModel, IFilterableListView`
- **Properties:**
- `ISensorsListEditGroupView View { get; set; }`
- `IAnalogSensor[] AnalogSensors { get; set; }`
- `ISquib[] Squibs { get; set; }`
- `IDigitalInputSetting[] DigitalInputSettings { get; set; }`
- `IDigitalOutputSetting[] DigitalOutputSettings { get; set; }`
- `IUartIOSetting[] UartSettings { get; set; }`
- `IStreamOutputSetting[] StreamOutputSettings { get; set; }`
- **Methods:**
- `void GetSensors(int sensorCalWarningPeriodDays, bool included)`
- `void SetCapacityFormat(string format)`
- `void Sort(object sortBy, bool bColumnClick)`
- `void Unset()`
- `void Filter(string currentFilter)`
- `void FilterSquib(object columnTag, string searchTerm)`
- `void FilterDigitalIn(object columnTag, string searchTerm)`
- `void FilterDigitalOut(object columnTag, string searchTerm)`
- `void FilterUartIO(object columnTag, string searchTerm)`
- `void FilterStreamOut(object columnTag, string searchTerm)`
- `void FilterStreamIn(object columnTag, string searchTerm)`
- `void SetShowAssigned(bool showAssigned, bool showUnassigned, IReadOnlyDictionary<string, bool> assignedSensors)`
- `void SetShowOnline(bool showOnline)`
- `void SetAssignedSensors(IReadOnlyDictionary<string, bool> serialNumbers)`
- `void SetOnline(Dictionary<string, bool> serialNumbersToOnline)`
- `bool IsSensorOnline(string serialNumber)`
- `void SetCachedSensors(ISensorData[] cachedSensors)`
- `void SetCachedCalibrations(ISensorCalibration[] calibrations)`
- `void SetActiveTab(PossibleFilters filter)` — Sets active tab to sensor type.
#### `ISensorTemplatesViewModel : IBaseViewModel`
- Marker interface with no members.
---
### Sensor Data Interfaces
#### `IAnalogSensor`
Represents analog sensors for UI display.
| Property | Type | Description |
|----------|------|-------------|
| `Bridge` | `SensorConstants.BridgeType` | Bridge mode of sensor |
| `IEPE` | `bool` | Integrated Electronics Piezo-Electric indicator |
| `DatabaseId` | `int` | Database ID (positive values valid) |
| `Included` | `bool` | Checkbox state in lists |
| `SerialNumber` | `string` | Sensor serial number |
| `Description` | `string` | Description/comment |
| `Manufacturer` | `string` | Sensor manufacturer |
| `Model` | `string` | Sensor model |
| `Capacity` | `double` | Maximum capacity or desired range in EU |
| `RangeHigh` | `double` | High range EU value |
| `RangeMedium` | `double` | Medium range EU value |
| `RangeLow` | `double` | Low range EU value |
| `Sensitivity` | `string` | User-friendly sensitivity string |
| `AddedSensitivity` | `string` | Second calibration for dual-sensitivity sensors |
| `Resistance` | `double` | Resistance in ohms |
| `Excitation` | `string` | Supported excitations display string |
| `Units` | `string` | Engineering units from calibration |
| `EID` | `string` | Electronic ID |
| `CalDate` | `DateTime` | Last calibration date |
| `CalDueDate` | `DateTime` | Calibration due date |
| `ModifiedBy` | `string` | Last modifying user |
| `LastModified` | `DateTime` | Last modification date |
| `Assigned` | `bool` | Channel assignment status |
| `Online` | `bool` | Online status |
| `ISOCode` | `string` | Default ISO code for new channel |
| `ISOChannelName` | `string` | Default ISO channel name |
| `UserCode` | `string` | Default user code |
| `UserChannelName` | `string` | Default user channel name |
| `CFC` | `FilterClassType` | Channel filter class |
| `Polarity` | `bool` | Output inversion flag |
| `NonLinearCalculationType` | `string` | Nonlinear calculation type (string) |
| `NonLinearCalculationTypeEnum` | `NonLinearStyles` | Nonlinear calculation type (enum) |
| `ZeroMethod` | `ZeroMethodType` | Software zero method |
| `ZeroMethodStart` | `double` | Zero method start time (if Average over Time) |
| `ZeroMethodEnd` | `double` | Zero method end time (if Average over Time) |
| `UserValue1/2/3` | `string` | User-defined values |
| `SensorCalibrationStatus` | `UIItemStatus` | Calibration status |
| `InitialOffsets` | `InitialOffset[]` | Initial offsets array |
| `FilterClass` | `IFilterClass` | Filter class definition (FB 13120) |
| `FirstUseDate` | `DateTime?` | First use date (nullable, Case 13065) |
| `LatestCalibrationId` | `int?` | Latest calibration ID (nullable) |
| `UsingLatestCalibration` | `bool` | Whether using latest calibration |
- `bool Filter(string term)` — Returns true if sensor matches filter criteria.
#### `ISquib`
Represents squib/pyrotechnic devices.
| Property | Type | Description |
|----------|------|-------------|
| `DatabaseId` | `int` | Database ID (>0 valid) |
| `Included` | `bool` | Checkbox state |
| `SerialNumber` | `string` | Serial/setting name |
| `Description` | `string` | Description |
| `ResistanceLow` | `double` | Low resistance value |
| `ResistanceHigh` | `double` | High resistance value |
| `ID` | `string` | Identifier |
| `SQMode` | `string` | Squib mode string |
| `SQDelay` | `double` | Delay value |
| `SQCurrent` | `double` | Current value |
| `SQDuration` | `double` | Duration value |
| `LimitDuration` | `bool` | Duration limit flag |
| `ModifiedBy` | `string` | Last modifying user |
| `LastModified` | `DateTime` | Last modification date |
| `Assigned` | `bool` | Channel assignment status |
| `Online` | `bool` | Online status |
| `ISOCode` | `string` | ISO code |
| `ISOChannelName` | `string` | ISO channel name |
| `UserCode` | `string` | User code |
| `UserChannelName` | `string` | User channel name |
| `Mode` | `SquibFireMode` | Fire mode enum |
| `Broken` | `bool` | Broken flag (excludes from selectable lists) |
| `DoNotUse` | `bool` | Do-not-use flag (excludes from selectable lists) |
- `bool Filter(string term)` — Returns true if squib matches filter criteria.
#### `IDigitalInputSetting`
Represents digital input configurations.
| Property | Type | Description |
|----------|------|-------------|
| `DatabaseId` | `int` | Database ID (positive valid) |
| `Included` | `bool` | Checkbox state |
| `SerialNumber` | `string` | Serial/setting name |
| `Description` | `string` | Description |
| `DIMode` | `string` | Digital Input Mode string |
| `ModifiedBy` | `string` | Last modifying user |
| `LastModified` | `DateTime` | Last modification date |
| `Assigned` | `bool` | Channel assignment status |
| `Online` | `bool` | Online status |
| `EID` | `string` | Electronic ID |
| `ISOCode` | `string` | ISO code |
| `ISOChannelName` | `string` | ISO channel name |
| `UserCode` | `string` | User code |
| `UserChannelName` | `string` | User channel name |
| `ActiveValue` | `string` | Display value for active state |
| `DefaultValue` | `string` | Display value for default/idle state |
| `Mode` | `DigitalInputModes` | DI mode enum |
| `Broken` | `bool` | Broken flag |
| `DoNotUse` | `bool` | Do-not-use flag |
- `bool Filter(string term)` — Returns true if matches filter criteria.
#### `IDigitalOutputSetting`
Represents digital output configurations.
| Property | Type | Description |
|----------|------|-------------|
| `DatabaseId` | `int` | Database ID (>0 valid) |
| `Included` | `bool` | Checkbox state |
| `SerialNumber` | `string` | Serial/setting name |
| `Description` | `string` | Description |
| `DODelay` | `double` | Delay before output (ms) |
| `DODuration` | `double` | Output duration (ms) |
| `ModifiedBy` | `string` | Last modifying user |
| `LastModified` | `DateTime` | Last modification date |
| `Assigned` | `bool` | Channel assignment status |
| `Online` | `bool` | Online status (note: no real detection method) |
| `ISOCode` | `string` | ISO code (limited usefulness) |
| `ISOChannelName` | `string` | ISO channel name (limited usefulness) |
| `UserCode` | `string` | User code (limited usefulness) |
| `UserChannelName` | `string` | User channel name (limited usefulness) |
| `LimitDuration` | `bool` | Duration limit flag |
| `DOMode` | `DigitalOutputModes` | Output mode enum |
| `Broken` | `bool` | Broken flag |
| `DoNotUse` | `bool` | Do-not-use flag |
- `bool Filter(string term)` — Returns true if matches filter criteria.
#### `IUartIOSetting`
Represents UART I/O configurations.
| Property | Type | Description |
|----------|------|-------------|
| `DatabaseId` | `int` | Database ID (positive valid) |
| `Included` | `bool` | Checkbox state |
| `SerialNumber` | `string` | Serial/setting name |
| `Description` | `string` | Description |
| `LastModifiedBy` | `string` | Last modifying user |
| `LastModified` | `DateTime` | Last modification date |
| `Assigned` | `bool` | Channel assignment status |
| `Online` | `bool` | Online status |
| `ISOCode` | `string` | ISO code |
| `ISOChannelName` | `string` | ISO channel name |
| `UserCode` | `string` | User code |
| `UserChannelName` | `string` | User channel name |
| `Broken` | `bool` | Broken flag |
| `DoNotUse` | `bool` | Do-not-use flag |
| `BaudRate` | `uint` | UART baud rate |
| `DataBits` | `uint` | UART data bits |
| `StopBits` | `StopBits` | UART stop bits |
| `Parity` | `Parity` | UART parity |
| `FlowControl` | `Handshake` | UART flow control (always NONE per FB 30486) |
| `DataFormat` | `UartDataFormat` | Incoming data format |
- `bool Filter(string term)` — Returns true if matches filter criteria.
#### `IStreamInputSetting`
Represents stream input configurations.
| Property | Type | Description |
|----------|------|-------------|
| `DatabaseId` | `int` | Database ID (positive valid) |
| `Included` | `bool` | Checkbox state |
| `SerialNumber` | `string` | Serial/setting name |
| `Description` | `string` | Description |
| `LastModifiedBy` | `string` | Last modifying user |
| `LastModified` | `DateTime` | Last modification date |
| `Assigned` | `bool` | Channel assignment status |
| `Online` | `bool` | Online status |
| `ISOCode` | `string` | ISO code |
| `ISOChannelName` | `string` | ISO channel name |
| `UserCode` | `string` |

View File

@@ -0,0 +1,70 @@
---
source_files:
- Common/DTS.CommonCore/Interface/Sensors/SoftwareFilters/ISoftwareFiltersView.cs
- Common/DTS.CommonCore/Interface/Sensors/SoftwareFilters/ISoftwareFiltersViewModel.cs
generated_at: "2026-04-16T12:23:58.149333+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "c132999d4e5c3d51"
---
# Documentation: DTS.Common.Interface.Sensors.SoftwareFilters
## 1. Purpose
This module defines the core interfaces for the Software Filters subsystem within the DTS sensor framework. It establishes the contracts for the View and ViewModel in an MVVM (Model-View-ViewModel) architecture, enabling the management, sorting, and filtering of software filter configurations. Additionally, it defines `IFilterClass`, a contract for individual filter parameters (frequency and type), intended to support UI property grid editing and comparison operations.
## 2. Public Interface
### `ISoftwareFiltersView`
Inherits from: `DTS.Common.Base.IBaseView`
* **Description:** A marker interface defining the view contract for the Software Filters module. It imposes no specific members beyond those in `IBaseView`.
### `IFilterClass`
Inherits from: `System.IComparable`
Attributes: `System.ComponentModel.TypeConverter(typeof(System.ComponentModel.ExpandableObjectConverter))`
* **Description:** Defines a specific software filter configuration. The `ExpandableObjectConverter` attribute suggests this object is intended to be displayed and edited within a visual property grid.
* **Properties:**
* `string FilterName { get; }`: Gets the name of the filter.
* `DTS.Common.Enums.Sensors.FilterClassType FClass { get; set; }`: Gets or sets the classification type of the filter.
* `double Frequency { get; set; }`: Gets or sets the frequency value of the filter.
* **Methods:**
* `int GetFilterClassNumericValue()`: Returns a numeric representation of the filter class.
### `ISoftwareFiltersViewModel`
Inherits from: `DTS.Common.Base.IBaseViewModel`, `DTS.Common.Interface.Pagination.IFilterableListView`
* **Description:** Defines the behavior and state management for the Software Filters view.
* **Properties:**
* `ISoftwareFiltersView View { get; set; }`: Gets or sets the associated view instance.
* `System.Collections.ObjectModel.ObservableCollection<ISoftwareFilter> SoftwareFilters { get; set; }`: Gets or sets the bindable collection of software filters.
* `string CurrentUser { get; set; }`: Gets or sets the current user context.
* **Methods:**
* `void Sort(object sortBy, bool bColumnClick)`: Sorts the collection of software filters based on the provided criteria.
* `void Unset()`: Resets the state of the view model (specific implementation details not defined in interface).
* `void Filter(string currentFilter)`: Applies a string-based filter to the collection.
* `ISoftwareFilter[] GetSoftwareFilters()`: Retrieves the current software filters as an array.
* `void PopulateView()`: Initiates the loading or refreshing of data into the view.
* `bool ValidateAndSave()`: Validates the current state and persists changes; returns `true` if successful.
## 3. Invariants
* **Comparable Filter Classes:** Any implementation of `IFilterClass` must implement `IComparable`, guaranteeing that filter objects can be sorted or ordered relative to one another.
* **UI Compatibility:** `IFilterClass` implementations must be compatible with `System.ComponentModel.ExpandableObjectConverter`, implying they likely expose complex properties intended for expansion in a UI property browser.
* **Collection Type:** The `SoftwareFilters` property in `ISoftwareFiltersViewModel` must utilize `ObservableCollection<T>`, indicating the collection provides change notification events (likely for UI binding).
## 4. Dependencies
**Internal Dependencies (Referenced in Source):**
* `DTS.Common.Base`: Required for `IBaseView` and `IBaseViewModel`.
* `DTS.Common.Enums.Sensors`: Required for the `FilterClassType` enum used in `IFilterClass`.
* `DTS.Common.Interface.Pagination`: Required for `IFilterableListView` interface inheritance.
* `ISoftwareFilter`: Referenced as the generic type for collections in `ISoftwareFiltersViewModel`. **Note:** The definition for `ISoftwareFilter` is not present in the provided source files.
**External/System Dependencies:**
* `System`: For `IComparable` and basic types.
* `System.ComponentModel`: For `TypeConverter` and `ExpandableObjectConverter` attributes.
* `System.Collections.ObjectModel`: For `ObservableCollection`.
## 5. Gotchas
* **Missing Interface Definition:** The interface `ISoftwareFilter` is referenced as the primary data type within `ISoftwareFiltersViewModel` (in both the `ObservableCollection` and the return array of `GetSoftwareFilters`), but its definition is not included in the provided source files. The behavior of the ViewModel depends entirely on this missing contract.
* **Ambiguous `Unset` Behavior:** The method `Unset()` in `ISoftwareFiltersViewModel` has an unclear name. It is not immediately obvious if this clears the list, resets user selections, or disposes of resources without seeing the implementation.
* **Loosely Typed Sort:** The `Sort` method accepts `object sortBy`. This implies the implementation must perform runtime type checking or casting to determine the sort key, which could lead to runtime errors if an unexpected type is passed.
* **Historical Reference:** The `IFilterClass` interface contains a documentation comment referencing "FB 13120". This appears to be a reference to a bug tracking or feature request ticket (e.g., FogBugz), indicating historical context for the creation of this interface.

View File

@@ -0,0 +1,112 @@
---
source_files:
- Common/DTS.CommonCore/Interface/StatusAndProgressBar/IStatusAndProgressBarView.cs
- Common/DTS.CommonCore/Interface/StatusAndProgressBar/IStatusAndProgressFooterView.cs
- Common/DTS.CommonCore/Interface/StatusAndProgressBar/IStatusAndProgressBarFooterViewModel.cs
- Common/DTS.CommonCore/Interface/StatusAndProgressBar/IStatusAndProgressBarViewModel.cs
- Common/DTS.CommonCore/Interface/StatusAndProgressBar/StatusAndProgressDelegates.cs
generated_at: "2026-04-16T12:18:12.505284+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "329090afc20c7c34"
---
# Documentation: DTS.Common.Interface.StatusAndProgressBar
## 1. Purpose
This module defines the contract layer for status and progress bar UI components within the DTS application. It provides interfaces for views and view models following a Model-View-ViewModel (MVVM) pattern, along with a set of delegate types used for progress reporting, status updates, and error handling callbacks. The module serves as an abstraction layer that decouples UI implementation from business logic, enabling consistent progress tracking and status communication across the application.
---
## 2. Public Interface
### Interfaces
#### `IStatusAndProgressBarView`
**Namespace:** `DTS.Common.Interface`
**Inheritance:** `IBaseView`
An empty marker interface extending `IBaseView`. No members defined.
---
#### `IStatusAndProgressFooterView`
**Namespace:** `DTS.Common.Interface`
**Inheritance:** `IBaseView`
An empty marker interface extending `IBaseView`. No members defined.
---
#### `IStatusAndProgressBarFooterViewModel`
**Namespace:** `DTS.Common.Interface`
**Inheritance:** `IBaseViewModel`
| Property | Type | Accessor | Description |
|----------|------|----------|-------------|
| `View` | `IStatusAndProgressFooterView` | get; set; | Holds reference to the associated footer view |
---
#### `IStatusAndProgressBarViewModel`
**Namespace:** `DTS.Common.Interface`
**Inheritance:** `IBaseViewModel`
| Property | Type | Accessor | Description |
|----------|------|----------|-------------|
| `View` | `IBaseView` | get; set; | Gets the Search View (per XML comment) |
| `Parent` | `IBaseViewModel` | get; set; | Reference to parent view model |
| `ProgressBarName` | `string` | get; set; | Name identifier for the progress bar |
| `ContextSearchRegion` | `object` | get; set; | Context object for search region (purpose unclear from source) |
---
### Delegates
**Namespace:** `DTS.Common.Interface.StatusAndProgressBar`
| Delegate | Signature | Description |
|----------|-----------|-------------|
| `SetProgressValueDelegate` | `void (double value)` | Callback for setting a progress bar value |
| `SetStatusTextDelegate` | `void (string text)` | Callback for setting status text |
| `SetProgressVisibilityDelegate` | `void (bool bVisible)` | Callback for toggling progress bar visibility |
| `SetStatusColorDelegate` | `void (Color color)` | Callback for setting status color |
| `ActionCompleteDelegate` | `void ()` | Callback signaling action completion |
| `StatusIntDelegate` | `void (int status)` | Callback for reporting integer status |
| `StatusExIntDelegate` | `void (int status, params object[] extra)` | Callback for reporting integer status with additional parameters |
| `ErrorCallback` | `DialogResult (string errorString, string unit)` | Callback for error handling that returns a dialog result |
---
## 3. Invariants
- All view interfaces (`IStatusAndProgressBarView`, `IStatusAndProgressFooterView`) must inherit from `IBaseView`.
- All view model interfaces (`IStatusAndProgressBarFooterViewModel`, `IStatusAndProgressBarViewModel`) must inherit from `IBaseViewModel`.
- `IStatusAndProgressBarFooterViewModel.View` must be assignable to `IStatusAndProgressFooterView`, not just `IBaseView`.
- The `SetStatusColorDelegate` uses `System.Windows.Media.Color` (WPF color type), not `System.Drawing.Color`.
- The `ErrorCallback` delegate returns `System.Windows.Forms.DialogResult`, indicating Windows Forms interop.
---
## 4. Dependencies
### This module depends on:
- **`DTS.Common.Base`** - Provides `IBaseView` and `IBaseViewModel` base interfaces
- **`System.Windows.Forms`** - Provides `DialogResult` enum used in `ErrorCallback`
- **`System.Windows.Media`** - Provides `Color` struct used in `SetStatusColorDelegate`
### What depends on this module:
- Cannot be determined from source alone. Implementations of these interfaces would exist elsewhere in the codebase.
---
## 5. Gotchas
1. **Mixed UI Framework References:** The delegates reference both `System.Windows.Media.Color` (WPF) and `System.Windows.Forms.DialogResult` (WinForms). This suggests either hybrid UI usage or legacy interop. Developers should be aware of the correct `Color` type when implementing `SetStatusColorDelegate`.
2. **Misleading XML Comment:** The `View` property in `IStatusAndProgressBarViewModel` has an XML comment stating "Gets the Search View", which appears unrelated to the interface's purpose (status/progress bar). This may be a copy-paste error from another interface.
3. **Empty Marker Interfaces:** Both `IStatusAndProgressBarView` and `IStatusAndProgressFooterView` define no members beyond their base interface. Their purpose as separate types (rather than using `IBaseView` directly) is unclear from source alone—possibly for DI container registration or type discrimination.
4. **Vague `ContextSearchRegion` Property:** The purpose and expected type of `ContextSearchRegion` (typed as `object`) is not documented. Its relationship to "Search" in a progress bar context is unclear from source alone.

View File

@@ -0,0 +1,71 @@
---
source_files:
- Common/DTS.CommonCore/Interface/SystemSettings/ISystemSettingsView.cs
- Common/DTS.CommonCore/Interface/SystemSettings/ISystemSettingsViewModel.cs
generated_at: "2026-04-16T12:13:27.974060+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "409fbccc02533644"
---
# Documentation: System Settings View Interfaces
## 1. Purpose
This module defines the contract for the System Settings feature within an MVVM (Model-View-ViewModel) architecture. It provides two interfaces—`ISystemSettingsView` and `ISystemSettingsViewModel`—that establish the separation between the view layer and its corresponding view model. The `ISystemSettingsViewModel` interface defines region management capabilities for context menus, main content, and navigation areas, suggesting this module supports a modular, region-based UI composition system for system configuration screens.
---
## 2. Public Interface
### `ISystemSettingsView`
**Namespace:** `DTS.Common.Interface`
**Inherits from:** `IBaseView`
A marker interface with no additional members. It serves as a typed contract for System Settings views, enabling type-safe association between views and view models.
---
### `ISystemSettingsViewModel`
**Namespace:** `DTS.Common.Interface`
**Inherits from:** `IBaseViewModel`
| Member | Signature | Description |
|--------|-----------|-------------|
| `View` | `ISystemSettingsView View { get; }` | Read-only property that provides access to the associated Shell View. |
| `GetRegions()` | `List<FrameworkElement> GetRegions()` | Method that returns a collection of `FrameworkElement` objects representing UI regions. |
| `ContextMenuRegion` | `Object ContextMenuRegion { get; set; }` | Read-write property for the context menu region context. |
| `ContextMainRegion` | `Object ContextMainRegion { get; set; }` | Read-write property for the main content region context. |
| `ContextNavigationRegion` | `Object ContextNavigationRegion { get; set; }` | Read-write property for the navigation region context. |
---
## 3. Invariants
- `ISystemSettingsView` must always be assignable to `IBaseView` (inheritance constraint).
- `ISystemSettingsViewModel` must always be assignable to `IBaseViewModel` (inheritance constraint).
- The `View` property on `ISystemSettingsViewModel` must return an instance that implements `ISystemSettingsView`.
- `GetRegions()` must return a `List<FrameworkElement>` (the list may be empty, but the return type is non-nullable in the signature).
- The three region context properties (`ContextMenuRegion`, `ContextMainRegion`, `ContextNavigationRegion`) are typed as `Object`, implying they can accept any reference type; no compile-time type constraints are enforced.
---
## 4. Dependencies
### This module depends on:
- **`DTS.Common.Base`** — Provides `IBaseView` and `IBaseViewModel` base interfaces.
- **`System`** — Core .NET types (`Object`).
- **`System.Collections.Generic`** — Provides `List<T>` used by `GetRegions()`.
- **`System.Windows`** — WPF framework providing `FrameworkElement` for region elements.
### What depends on this module:
- **Cannot be determined from source alone.** Concrete implementations of `ISystemSettingsView` and `ISystemSettingsViewModel` exist elsewhere in the codebase, but their locations are not visible in the provided files.
---
## 5. Gotchas
- **Region properties are untyped:** `ContextMenuRegion`, `ContextMainRegion`, and `ContextNavigationRegion` are all declared as `Object`. The actual expected types and their usage patterns are unclear from the interface alone—consumers must refer to implementations or documentation to understand what types should be assigned.
- **No nullability annotations:** The signatures lack nullability annotations (e.g., nullable reference types). Whether `GetRegions()` can return `null` or if region properties accept/return `null` is unspecified.
- **`ISystemSettingsView` is empty:** This interface adds no members beyond `IBaseView`. Its purpose appears to be purely for type discrimination, but the architectural rationale is not evident from the source.
- **WPF coupling:** The use of `FrameworkElement` in `GetRegions()` ties this interface to WPF, limiting portability to other UI frameworks.

View File

@@ -0,0 +1,88 @@
---
source_files:
- Common/DTS.CommonCore/Interface/SystemSettings/DB/IDBImportView.cs
- Common/DTS.CommonCore/Interface/SystemSettings/DB/IDBExportView.cs
- Common/DTS.CommonCore/Interface/SystemSettings/DB/IDBViewModel.cs
generated_at: "2026-04-16T12:20:53.510446+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "7e29e0cdd222a5b1"
---
# Documentation: DTS.Common.Interface (DB Import/Export Views)
## 1. Purpose
This module defines the contract for database import and export functionality within the system settings domain. It provides three interfaces—`IDBImportView`, `IDBExportView`, and `IDBViewModel`—that establish the structure for view models handling file-based data transfer operations. The module abstracts the import/export workflow, allowing views to be swapped or mocked while maintaining a consistent interface for XML-based data serialization.
---
## 2. Public Interface
### `IDBImportView`
**Signature:** `public interface IDBImportView : IBaseView { }`
A marker interface extending `IBaseView`. Defines no members of its own; exists to identify views responsible for import operations.
---
### `IDBExportView`
**Signature:** `public interface IDBExportView : IBaseView { }`
A marker interface extending `IBaseView`. Defines no members of its own; exists to identify views responsible for export operations.
---
### `IDBViewModel`
**Signature:** `public interface IDBViewModel : IBaseViewModel`
Defines the contract for a view model that orchestrates database import/export operations.
**Properties:**
| Name | Type | Access | Description |
|------|------|--------|-------------|
| `ImportView` | `IDBImportView` | get/set | Reference to the import view instance |
| `ExportView` | `IDBExportView` | get/set | Reference to the export view instance |
| `ImportFileName` | `string` | get/set | File path to import from |
| `ImportStatusText` | `string` | get/set | Status message for import operations |
| `ExportFileName` | `string` | get/set | File path to export to |
| `ExportData` | `string` | get/set | Formatted XML string to write to the export file |
| `ImportData` | `string` | get/set | Formatted XML string read from the import file |
**Methods:**
| Name | Return Type | Description |
|------|-------------|-------------|
| `Export()` | `void` | Exports the contents of `ExportData` to the file specified by `ExportFileName` |
---
## 3. Invariants
- `IDBImportView` and `IDBExportView` must always be assignable to `IBaseView`.
- `IDBViewModel` must always be assignable to `IBaseViewModel`.
- `ExportData` and `ImportData` are expected to contain formatted XML strings (as stated in source comments).
- The `Export()` method is expected to use the current values of `ExportFileName` and `ExportData` at the time of invocation.
---
## 4. Dependencies
**This module depends on:**
- `DTS.Common.Base` — Provides `IBaseView` and `IBaseViewModel` base interfaces.
**What depends on this module:**
- Cannot be determined from the provided source files alone. Consumers would be concrete implementations of these interfaces and any code that references `IDBViewModel`, `IDBImportView`, or `IDBExportView`.
---
## 5. Gotchas
1. **Asymmetric API:** There is an `Export()` method defined, but no corresponding `Import()` method is present in `IDBViewModel`. Import logic must be handled elsewhere or through property binding alone.
2. **Placement uncertainty:** Source comments indicate that `ImportFileName` and `ExportFileName` properties may not belong in the view model long-term: *"we may not need this in the viewmodel if the viewmodel is capable of doing all the operations it needs to do."* This suggests potential refactoring.
3. **XML coupling:** The `ExportData` and `ImportData` properties are explicitly documented as "formatted xml string." Any implementation changing this format would break the documented contract.
4. **No validation hooks:** The interfaces define no validation methods or error handling patterns for file I/O operations. Implementers must define their own error handling strategy.

View File

@@ -0,0 +1,100 @@
---
source_files:
- Common/DTS.CommonCore/Interface/SystemSettings/ISOSettings/IisoSettingsView.cs
- Common/DTS.CommonCore/Interface/SystemSettings/ISOSettings/IISOSettingsModel.cs
- Common/DTS.CommonCore/Interface/SystemSettings/ISOSettings/IISOSettingsViewModel.cs
- Common/DTS.CommonCore/Interface/SystemSettings/ISOSettings/IISOSettingsData.cs
generated_at: "2026-04-16T12:20:35.290001+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "7b8cfe6060429ed5"
---
# ISO Settings Module Documentation
## 1. Purpose
This module defines the contract for ISO (International Organization for Standardization) settings management within the DTS system. It establishes a Model-View-ViewModel (MVVM) architecture through four interfaces that govern how ISO-related configuration data is stored, displayed, and manipulated. The module provides a decoupled interface layer allowing implementations to vary without affecting dependent components.
---
## 2. Public Interface
### `IISOSettingsView`
**Namespace:** `DTS.Common.Interface`
**Inherits:** `IBaseView`
A marker interface representing the view component in the MVVM pattern. Contains no members beyond those inherited from `IBaseView`.
---
### `IISOSettingsModel`
**Namespace:** `DTS.Common.Interface`
**Inherits:** `IBaseModel`
Defines the data persistence contract for ISO settings.
| Method | Signature | Description |
|--------|-----------|-------------|
| `SaveData` | `void SaveData(IISOSettingsData data)` | Persists the provided ISO settings data. |
| `LoadData` | `IISOSettingsData LoadData()` | Retrieves and returns the stored ISO settings data. |
---
### `IISOSettingsViewModel`
**Namespace:** `DTS.Common.Interface`
**Inherits:** `IBaseViewModel`
Defines the coordinator between view and model for ISO settings.
| Property | Type | Access | Description |
|----------|------|--------|-------------|
| `View` | `IISOSettingsView` | get/set | Reference to the associated view instance. |
| `ISOData` | `IISOSettingsData` | get/set | The ISO settings data being managed. |
| `Model` | `IISOSettingsModel` | get/set | Reference to the model for data operations. |
---
### `IISOSettingsData`
**Namespace:** `DTS.Common.Interface`
**Inherits:** `IBaseClass`
Defines the data structure for ISO configuration settings.
| Property | Type | Access | Description |
|----------|------|--------|-------------|
| `UniqueISOCodesRequired` | `bool` | get/set | Controls whether ISO codes must be unique. |
| `ISOViewMode` | `IsoViewMode` | get/set | Determines the view mode for ISO display. |
| `ShowISOStringBuilder` | `bool` | get/set | Controls visibility of ISO string builder UI. |
| `ShowChannelCodeLookupHelper` | `bool` | get/set | Controls visibility of channel code lookup helper. |
| `UseISOCodeFilterMapping` | `bool` | get/set | Enables/disables ISO code filter mapping. |
| `ShowISOCodes` | `bool` | get only | Indicates whether ISO codes should be displayed. |
| `ShowUserCodes` | `bool` | get only | Indicates whether user codes should be displayed. |
| `ChannelNamesOnly` | `bool` | get only | Indicates whether only channel names are shown. |
---
## 3. Invariants
- **Inheritance Hierarchy:** All interfaces in this module inherit from base interfaces in `DTS.Common.Base` (`IBaseView`, `IBaseModel`, `IBaseViewModel`, `IBaseClass`). Implementations must satisfy these base contracts.
- **Read-only Properties:** The properties `ShowISOCodes`, `ShowUserCodes`, and `ChannelNamesOnly` on `IISOSettingsData` are read-only. Their values must be derived from other state (likely computed from `ISOViewMode` or other properties), but the derivation logic is not specified in these interfaces.
- **ViewModel Composition:** `IISOSettingsViewModel` requires non-null references to `View`, `Model`, and `ISOData` for proper operation (implied by the architecture, though not enforced at interface level).
---
## 4. Dependencies
### This module depends on:
- **`DTS.Common.Base`** — Provides base interfaces (`IBaseView`, `IBaseModel`, `IBaseViewModel`, `IBaseClass`) that all ISO settings interfaces extend.
- **`DTS.Common.Enums`** — Provides the `IsoViewMode` enum used in `IISOSettingsData.ISOViewMode`.
### What depends on this module:
- **Unclear from source alone.** Concrete implementations of these interfaces and any consumers of `IISOSettingsView`, `IISOSettingsModel`, `IISOSettingsViewModel`, or `IISOSettingsData` are not present in the provided files.
---
## 5. Gotchas
- **Naming Inconsistency:** The file name `IisoSettingsView.cs` uses lowercase "iso" while the interface name is `IISOSettingsView` (uppercase). The file includes a `// ReSharper disable InconsistentNaming` directive in `IISOSettingsViewModel.cs`, suggesting naming conventions around "ISO" have been a point of friction.
- **Read-only Property Derivation:** The three read-only properties on `IISOSettingsData` (`ShowISOCodes`, `ShowUserCodes`, `ChannelNamesOnly`) have no visible implementation. Their relationship to `ISOViewMode` or other writable properties is not documented in these interfaces—implementers must consult concrete implementations or other documentation.
- **Empty View Interface:** `IISOSettingsView` defines no members beyond its base interface. This may indicate either a placeholder for future expansion or that all view behavior is defined in `IBaseView`.

View File

@@ -0,0 +1,67 @@
---
source_files:
- Common/DTS.CommonCore/Interface/SystemSettings/PowerAndBattery/IPowerAndBatteryView.cs
- Common/DTS.CommonCore/Interface/SystemSettings/PowerAndBattery/IPowerAndBatteryViewModel.cs
generated_at: "2026-04-16T12:26:11.956445+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "a788360f54c0a8e6"
---
# Documentation: Power and Battery View/ViewModel Interfaces
## 1. Purpose
This module defines two marker interfaces, `IPowerAndBatteryView` and `IPowerAndBatteryViewModel`, which serve as type contracts for the Power and Battery settings feature within the system. These interfaces follow the Model-View-ViewModel (MVVM) architectural pattern, providing type identity and polymorphic compatibility with the base view/viewmodel infrastructure while remaining empty to allow implementation-specific flexibility.
---
## 2. Public Interface
### `IPowerAndBatteryView`
**Signature:**
```csharp
public interface IPowerAndBatteryView : IBaseView { }
```
**Location:** `DTS.Common.Interface` namespace
**Behavior:** An empty marker interface that extends `IBaseView`. It imposes no additional members beyond those inherited from `IBaseView`. Implementations represent the UI layer for power and battery configuration.
---
### `IPowerAndBatteryViewModel`
**Signature:**
```csharp
public interface IPowerAndBatteryViewModel : IBaseViewModel { }
```
**Location:** `DTS.Common.Interface` namespace
**Behavior:** An empty marker interface that extends `IBaseViewModel`. It imposes no additional members beyond those inherited from `IBaseViewModel`. Implementations represent the presentation logic and state for power and battery configuration.
---
## 3. Invariants
- Both interfaces must always inherit from their respective base types (`IBaseView` and `IBaseViewModel`).
- The contracts defined by `IBaseView` and `IBaseViewModel` (not visible in these source files) must be fulfilled by any implementing class.
- The namespace `DTS.Common.Interface` groups these interfaces with other system interfaces.
**Note:** Specific invariants regarding member requirements cannot be determined from these source files alone, as both interfaces are empty marker interfaces delegating all contracts to their parent types.
---
## 4. Dependencies
### This module depends on:
- `DTS.Common.Base` — Provides `IBaseView` and `IBaseViewModel` base interfaces
### What depends on this module:
**Cannot be determined from source alone.** Consumers would include concrete View and ViewModel implementations for the Power and Battery settings feature, as well as any registration, navigation, or dependency injection configuration that references these interfaces.
---
## 5. Gotchas
- **Empty marker interfaces:** Both interfaces define no members of their own. All behavior contracts come from `IBaseView` and `IBaseViewModel`. Developers implementing these interfaces must consult the base interface definitions to understand required members.
- **Naming inconsistency:** The folder path (`SystemSettings/PowerAndBattery/`) suggests a hierarchical organization, but the namespace flattens to `DTS.Common.Interface`. This may cause confusion when locating related types.
- **No explicit coupling:** There is no compile-time enforcement linking `IPowerAndBatteryView` to `IPowerAndBatteryViewModel`. The relationship is implied by naming convention only.

View File

@@ -0,0 +1,62 @@
---
source_files:
- Common/DTS.CommonCore/Interface/SystemSettings/QASettings/IQASettingsView.cs
- Common/DTS.CommonCore/Interface/SystemSettings/QASettings/IQASettingsViewModel.cs
generated_at: "2026-04-16T12:19:52.577676+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "5199e3039d0bb459"
---
# Documentation: IQASettingsView and IQASettingsViewModel Interfaces
## 1. Purpose
This module defines two empty marker interfaces, `IQASettingsView` and `IQASettingsViewModel`, which represent the View and ViewModel contracts for a QA (Quality Assurance) Settings feature within an MVVM (Model-View-ViewModel) architecture. These interfaces exist to establish type hierarchy and enable polymorphic treatment of QA Settings components alongside other system settings views and view models through their base interface inheritance.
---
## 2. Public Interface
### `IQASettingsView`
- **Namespace:** `DTS.Common.Interface`
- **Inheritance:** `IBaseView`
- **Signature:**
```csharp
public interface IQASettingsView : IBaseView { }
```
- **Behavior:** Empty marker interface. Provides no members beyond those inherited from `IBaseView`. Used to identify views that implement QA Settings functionality.
### `IQASettingsViewModel`
- **Namespace:** `DTS.Common.Interface`
- **Inheritance:** `IBaseViewModel`
- **Signature:**
```csharp
public interface IQASettingsViewModel : IBaseViewModel { }
```
- **Behavior:** Empty marker interface. Provides no members beyond those inherited from `IBaseViewModel`. Used to identify view models that implement QA Settings functionality.
---
## 3. Invariants
- Any class implementing `IQASettingsView` must also satisfy the contract of `IBaseView`.
- Any class implementing `IQASettingsViewModel` must also satisfy the contract of `IBaseViewModel`.
- The specific invariants of `IBaseView` and `IBaseViewModel` are not visible in the provided source; their contracts must be consulted for complete invariant requirements.
---
## 4. Dependencies
### This module depends on:
- `DTS.Common.Base` — Provides `IBaseView` and `IBaseViewModel` base interfaces.
### What depends on this module:
- **Unknown from source alone.** Concrete view and view model classes implementing these interfaces, as well as any navigation or registration systems that reference these types, would be consumers, but they are not present in the provided files.
---
## 5. Gotchas
- **Empty interfaces:** Both interfaces define no members of their own. This is either intentional (marker interfaces for type discrimination, registration, or dependency injection) or indicative of incomplete implementation. The actual behavior and responsibilities of QA Settings views/view models must be inferred from the base interfaces (`IBaseView`, `IBaseViewModel`) or from concrete implementations not shown here.
- **Base interface contracts unknown:** Without visibility into `IBaseView` and `IBaseViewModel`, the full contract requirements for implementers cannot be documented.

View File

@@ -0,0 +1,62 @@
---
source_files:
- Common/DTS.CommonCore/Interface/SystemSettings/RealtimeSettings/IRealtimeSettingsView.cs
- Common/DTS.CommonCore/Interface/SystemSettings/RealtimeSettings/IRealtimeSettingsViewModel.cs
generated_at: "2026-04-16T12:20:24.412229+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "0ef736bfba716a64"
---
# Documentation: IRealtimeSettingsView & IRealtimeSettingsViewModel
## 1. Purpose
This module defines two marker interfaces—`IRealtimeSettingsView` and `IRealtimeSettingsViewModel`—for the RealtimeSettings feature within an MVVM (Model-View-ViewModel) architecture. These interfaces serve as extension points for real-time system settings configuration, allowing concrete implementations to be identified, registered, and resolved through dependency injection or convention-based wiring. The interfaces themselves are empty, indicating they rely entirely on their base contracts for behavior.
---
## 2. Public Interface
### `IRealtimeSettingsView`
- **Namespace:** `DTS.Common.Interface`
- **Inheritance:** `IBaseView`
- **Signature:**
```csharp
public interface IRealtimeSettingsView : IBaseView { }
```
- **Behavior:** Marker interface with no members. Any contract behavior is inherited from `IBaseView` (defined in `DTS.Common.Base`).
### `IRealtimeSettingsViewModel`
- **Namespace:** `DTS.Common.Interface`
- **Inheritance:** `IBaseViewModel`
- **Signature:**
```csharp
public interface IRealtimeSettingsViewModel : IBaseViewModel { }
```
- **Behavior:** Marker interface with no members. Any contract behavior is inherited from `IBaseViewModel` (defined in `DTS.Common.Base`).
---
## 3. Invariants
- **Type hierarchy:** `IRealtimeSettingsView` must always be assignable to `IBaseView`. `IRealtimeSettingsViewModel` must always be assignable to `IBaseViewModel`.
- **No additional contracts:** Neither interface defines additional members beyond their base interfaces. Any invariants are inherited from `IBaseView` and `IBaseViewModel`, but **these are not visible in the provided source**.
---
## 4. Dependencies
### This module depends on:
- `DTS.Common.Base` — Provides `IBaseView` and `IBaseViewModel` base interfaces.
### What depends on this module:
- **Unknown from source alone.** Concrete View and ViewModel implementations for RealtimeSettings would implement these interfaces, and DI containers or navigation frameworks would consume them, but no such consumers are visible in the provided files.
---
## 5. Gotchas
- **Marker interfaces:** Both interfaces are empty marker interfaces. Developers should not expect any RealtimeSettings-specific members here; all functionality comes from the base interfaces (`IBaseView`, `IBaseViewModel`), which are not included in the provided source.
- **Naming suggests pairing:** The naming convention (`IRealtimeSettingsView` + `IRealtimeSettingsViewModel`) strongly implies an MVVM pairing, but the relationship is not enforced at the type level.
- **Purpose unclear without context:** The specific behavior or data associated with "RealtimeSettings" is not documented in these interfaces. The actual settings, validation rules, or real-time update mechanisms must be defined in implementing classes or related modules not provided here.

View File

@@ -0,0 +1,57 @@
---
source_files:
- Common/DTS.CommonCore/Interface/SystemSettings/TablesSettings/ITablesSettingsView.cs
- Common/DTS.CommonCore/Interface/SystemSettings/TablesSettings/ITablesSettingsModel.cs
generated_at: "2026-04-16T12:19:50.242418+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "9b85701d1358796f"
---
# Documentation: Tables Settings Interfaces
## 1. Purpose
This module defines two marker interfaces for the "Tables Settings" feature within the System Settings subsystem. These interfaces establish type contracts for the View and ViewModel components in an MVVM (Model-View-ViewModel) architecture, allowing components to be identified and potentially resolved via dependency injection or reflection without exposing any domain-specific members at this interface level.
---
## 2. Public Interface
### `ITablesSettingsView`
- **Namespace:** `DTS.Common.Interface`
- **Declaration:** `public interface ITablesSettingsView : IBaseView { }`
- **Inheritance:** Extends `IBaseView` (from `DTS.Common.Base`)
- **Members:** None defined (marker interface)
### `ITablesSettingsViewModel`
- **Namespace:** `DTS.Common.Interface`
- **Declaration:** `public interface ITablesSettingsViewModel : IBaseViewModel { }`
- **Inheritance:** Extends `IBaseViewModel` (from `DTS.Common.Base`)
- **Members:** None defined (marker interface)
---
## 3. Invariants
- Any class implementing `ITablesSettingsView` must also satisfy the contract of `IBaseView`.
- Any class implementing `ITablesSettingsViewModel` must also satisfy the contract of `IBaseViewModel`.
- The specific behavioral contracts of `IBaseView` and `IBaseViewModel` are not visible in the provided source; their requirements are inherited but unspecified here.
---
## 4. Dependencies
### This module depends on:
- `DTS.Common.Base` — provides `IBaseView` and `IBaseViewModel` base interfaces.
### Consumers:
- Not determinable from the provided source alone. These interfaces are likely consumed by concrete View/ViewModel implementations and possibly a dependency injection container or navigation system.
---
## 5. Gotchas
- **Filename/Interface name mismatch:** The file `ITablesSettingsModel.cs` contains the interface `ITablesSettingsViewModel`, not `ITablesSettingsModel`. This naming inconsistency may cause confusion when locating types by filename.
- **Empty interfaces:** Both interfaces are marker interfaces with no members. Any functionality must be provided by the base interfaces (`IBaseView`, `IBaseViewModel`) or by casting to concrete types, which is not visible in this source.
- **Purpose unclear from source alone:** The specific behavior or data associated with "Tables Settings" is not defined at this interface level; the interfaces serve only as type identifiers.

View File

@@ -0,0 +1,42 @@
---
source_files:
- Common/DTS.CommonCore/Interface/SystemSettings/TestSettings/ITestSettingsView.cs
- Common/DTS.CommonCore/Interface/SystemSettings/TestSettings/ITestSettingsViewModel.cs
generated_at: "2026-04-16T12:21:08.427147+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "5e0dfcfe8f8e6976"
---
# Documentation: Test Settings Interfaces
## 1. Purpose
This module defines the contractual interfaces for the "Test Settings" feature within an MVVM (Model-View-ViewModel) architecture. It provides `ITestSettingsView` and `ITestSettingsViewModel` to decouple the UI layer from the business logic layer. These interfaces serve as markers for dependency injection and view resolution, ensuring that specific Test Settings components can be identified and managed by the system's core infrastructure.
## 2. Public Interface
### `ITestSettingsView`
* **Signature:** `public interface ITestSettingsView : IBaseView`
* **Namespace:** `DTS.Common.Interface`
* **Description:** Represents the View component for Test Settings. It inherits from `IBaseView` but defines no additional members, functioning as a specific marker interface for the system's view resolution mechanism.
### `ITestSettingsViewModel`
* **Signature:** `public interface ITestSettingsViewModel : IBaseViewModel`
* **Namespace:** `DTS.Common.Interface`
* **Description:** Represents the ViewModel component for Test Settings. It inherits from `IBaseViewModel` but defines no additional members, functioning as a specific marker interface for the system's logic layer.
## 3. Invariants
* **Hierarchy:** Any class implementing `ITestSettingsView` must also implement `IBaseView`. Any class implementing `ITestSettingsViewModel` must also implement `IBaseViewModel`.
* **Structure:** These interfaces are currently empty (marker interfaces). Therefore, they do not enforce specific method signatures or properties beyond those inherited from their base types.
## 4. Dependencies
* **External Dependencies:**
* `DTS.Common.Base`: Required for the definitions of `IBaseView` and `IBaseViewModel`.
* **Consumers:**
* Concrete View implementations (e.g., WPF Windows/Pages) needing to register as the Test Settings UI.
* Concrete ViewModel implementations handling the logic for Test Settings.
* Dependency injection containers or navigation services that resolve these specific interfaces.
## 5. Gotchas
* **Marker Interfaces:** Both interfaces are empty. While they likely facilitate type-safe navigation or injection, they expose no specific API surface (e.g., `LoadSettings()` or `SaveCommand`) themselves. Developers must cast to the concrete implementation or a more specific base type to access actual functionality, or rely on members exposed by `IBaseView`/`IBaseViewModel`.
* **Base Behavior Unknown:** The actual capabilities of these interfaces depend entirely on the definitions of `IBaseView` and `IBaseViewModel` found in `DTS.Common.Base`, which are not included in the provided source.

View File

@@ -0,0 +1,56 @@
---
source_files:
- Common/DTS.CommonCore/Interface/SystemSettings/UISettings/IUISettingsView.cs
- Common/DTS.CommonCore/Interface/SystemSettings/UISettings/IUISettingsViewModel.cs
generated_at: "2026-04-16T12:25:58.608548+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "2585d1c5e565105e"
---
# Documentation: IUISettingsView & IUISettingsViewModel
## 1. Purpose
This module defines two marker interfaces, `IUISettingsView` and `IUISettingsViewModel`, which serve as type identifiers for UI settings-related components within a Model-View-ViewModel (MVVM) architecture. These interfaces exist to establish a type hierarchy for UI settings screens, allowing components to be identified, registered, or resolved generically as settings-related views and view models without defining any additional members beyond their base contracts.
---
## 2. Public Interface
### `IUISettingsView`
- **Namespace:** `DTS.Common.Interface`
- **Signature:** `public interface IUISettingsView : IBaseView`
- **Description:** A marker interface for UI settings views. Inherits from `IBaseView` (defined in `DTS.Common.Base`). Declares no additional members.
### `IUISettingsViewModel`
- **Namespace:** `DTS.Common.Interface`
- **Signature:** `public interface IUISettingsViewModel : IBaseViewModel`
- **Description:** A marker interface for UI settings view models. Inherits from `IBaseViewModel` (defined in `DTS.Common.Base`). Declares no additional members.
---
## 3. Invariants
- `IUISettingsView` must always be assignable to `IBaseView`.
- `IUISettingsViewModel` must always be assignable to `IBaseViewModel`.
- The actual contracts (properties, methods, events) for these interfaces are defined entirely by their base interfaces (`IBaseView` and `IBaseViewModel`), not by these interfaces themselves.
- **Unclear from source:** The specific invariants enforced by `IBaseView` and `IBaseViewModel` cannot be determined without access to `DTS.Common.Base`.
---
## 4. Dependencies
### This module depends on:
- `DTS.Common.Base` — provides `IBaseView` and `IBaseViewModel` base interfaces.
### What depends on this module:
- **Unclear from source alone.** Consumers would be any concrete view or view model classes implementing `IUISettingsView` or `IUISettingsViewModel`, as well as any registration/resolution logic (e.g., dependency injection containers, navigation services) that handles UI settings components by these types.
---
## 5. Gotchas
- **Empty marker interfaces:** Both interfaces define no members. All functionality comes from their respective base interfaces. Developers implementing these should consult `IBaseView` and `IBaseViewModel` to understand required members.
- **Naming collision risk:** The namespace `DTS.Common.Interface` is generic; if other modules use the same namespace, type resolution conflicts could occur.
- **Unclear from source:** The reason for having separate marker interfaces (rather than using the base interfaces directly) is not documented in the source. This may relate to type discrimination for navigation, DI registration, or feature-specific handling, but this cannot be confirmed without additional context.

View File

@@ -0,0 +1,48 @@
---
source_files:
- Common/DTS.CommonCore/Interface/TSRAIRGo/INavigationButtonInfo.cs
generated_at: "2026-04-16T12:08:44.958885+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "9b7d291a6a236da0"
---
# Documentation: INavigationButtonInfo
## 1. Purpose
This module defines the `INavigationButtonInfo` interface, which specifies a contract for navigation button configuration objects within the TSRAIRGo subsystem. It provides a standardized abstraction for button metadata—including identity, display text, tooltip, enabled state, and border visibility—allowing consumers to interact with navigation buttons polymorphically without depending on concrete implementations.
## 2. Public Interface
### Interface: `INavigationButtonInfo`
**Namespace:** `DTS.Common.Interface.TSRAIRGo`
| Property | Type | Access | Description |
|----------|------|--------|-------------|
| `Id` | `NavigationButtonId` | Read-only | Returns the unique identifier for the navigation button. |
| `Text` | `string` | Read/Write | Gets or sets the display text for the button. |
| `Tooltip` | `string` | Read/Write | Gets or sets the tooltip text shown on hover. |
| `Enabled` | `bool` | Read/Write | Gets or sets whether the button is interactive. |
| `ShowBorder` | `bool` | Read/Write | Gets or sets whether the button border is visible. |
## 3. Invariants
- `Id` is immutable after construction (read-only accessor only).
- No null validation or constraint enforcement is visible in the interface definition; implementations may impose additional constraints.
- The relationship between `Id` and other properties (e.g., whether `Id` determines default `Text`) is not specified in this interface.
## 4. Dependencies
### This module depends on:
- `DTS.Common.Enums.TSRAIRGo.NavigationButtonId` — An enumeration type used to identify navigation buttons. The actual enum values are defined externally.
### What depends on this module:
- **Unknown from source alone.** No consumers or implementations are visible in this file.
## 5. Gotchas
- **No null constraints visible:** The interface does not indicate whether `Text` or `Tooltip` may be null or empty. Implementations may handle these cases differently.
- **Mutable state:** All properties except `Id` are read/write, implying implementations are expected to support runtime modification of button state.
- **Enum dependency:** The `NavigationButtonId` enum is imported but not defined here; its values and structure must be located in `DTS.Common.Enums.TSRAIRGo`.

View File

@@ -0,0 +1,61 @@
---
source_files:
- Common/DTS.CommonCore/Interface/Tags/ITagAssignment.cs
- Common/DTS.CommonCore/Interface/Tags/ITagAware.cs
- Common/DTS.CommonCore/Interface/Tags/ITag.cs
generated_at: "2026-04-16T12:15:17.023700+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "8ded8eec16b04840"
---
# Documentation: DTS.Common.Interface.Tags
## 1. Purpose
This module defines the core contracts for the tagging system within the DTS application. It provides interfaces for defining tag entities (`ITag`), assigning tags to specific domain objects (`ITagAssignment`), and implementing tag-aware behavior on business objects (`ITagAware`). The module supports categorization and filtering for entities such as Users, Groups, Templates, TestSetups, Sensors, and SensorModels.
## 2. Public Interface
### Enum: `TagTypes`
Defines the categories of objects that can be associated with tags.
* `User`
* `Group`
* `Template`
* `TestSetup`
* `Sensors`
* `SensorModels`
### Interface: `ITag`
Represents a tag entity, typically mapping to a database record. Inherits from `System.ICloneable`.
* `int ID { get; set; }`: The database identifier for the tag.
* `string Text { get; set; }`: The display text or label of the tag.
* `bool IsObsolete { get; set; }`: Flag indicating whether the tag is deprecated.
### Interface: `ITagAssignment`
Represents the association between a tag and a specific object.
* `int ObjectID { get; set; }`: The identifier of the object being tagged.
* `int TagID { get; set; }`: The identifier of the tag being assigned.
* `TagTypes ObjectType { get; set; }`: The type of the object being tagged (defined by `TagTypes` enum).
### Interface: `ITagAware`
Defines the contract for classes that manage a collection of tags.
* `void SetTags(string[] tagsText)`: Assigns tags to the object based on an array of text strings.
* `string[] GetTagsArray()`: Retrieves the text representation of all assigned tags.
* `int[] GetTagIDs()`: Retrieves the database IDs of all assigned tags.
* `void RemoveTags(string[] tagsText)`: Removes specific tags from the object based on text strings.
* `bool ContainsAnyTag(int[] tags)`: Checks if the object is associated with any of the provided tag IDs.
## 3. Invariants
* **Cloning:** Any implementation of `ITag` must support cloning via the `ICloneable` interface.
* **Type Consistency:** An `ITagAssignment` instance must map a `TagID` to an `ObjectID` of a specific `ObjectType` defined in the `TagTypes` enum.
* **ID vs. Text Duality:** Implementations of `ITagAware` must maintain consistency between the text representation of tags (accessed via `GetTagsArray`) and the ID representation (accessed via `GetTagIDs`).
## 4. Dependencies
* **System Namespace:** `ITag` depends on `System.ICloneable`.
* **Internal Dependencies:** All interfaces reside within the `DTS.Common.Interface.Tags` namespace. No other internal modules are imported in these files.
* **Consumers:** Unknown from the source alone, but intended consumers include business entities that can be tagged (e.g., User, Sensor models) and data access layers managing tag persistence.
## 5. Gotchas
* **ICloneable Implementation:** The `ITag` interface inherits `ICloneable`, but the source does not define a strongly-typed `Clone` method. Implementers must implement `object Clone()` and handle the casting logic manually.
* **Tag Identification:** The `ITagAware` interface implies a dual mechanism for identifying tags (by text string vs. by integer ID). It is unclear from the interface alone how an implementation resolves a text string to an ID in `SetTags` or `RemoveTags` (e.g., whether it requires a database lookup or an in-memory cache).
* **Obsolescence:** `ITag` includes an `IsObsolete` flag. The interface does not enforce logic regarding whether obsolete tags can be newly assigned or if they are filtered out during retrieval.

View File

@@ -0,0 +1,83 @@
---
source_files:
- Common/DTS.CommonCore/Interface/TestMetaData/ITestEngineerDetailsDbRecord.cs
- Common/DTS.CommonCore/Interface/TestMetaData/ICustomerDetailsDbRecord.cs
- Common/DTS.CommonCore/Interface/TestMetaData/ILabratoryDetailsDbRecord.cs
generated_at: "2026-04-16T12:13:05.880610+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "adb5cdc8cb4cf74e"
---
# Documentation: DTS.Common.Core Test Metadata Interfaces
## 1. Purpose
This module defines three data contract interfaces—`ITestEngineerDetailsDbRecord`, `ICustomerDetailsDbRecord`, and `ILabratoryDetailsDbRecord`—within the `DTS.Common.Interface.TestMetaData` namespace. These interfaces abstract the database schema for test metadata entities, mapping properties to specific database columns using `System.ComponentModel.DataAnnotations` attributes. They serve as the data access layer contracts for Test Engineer, Customer, and Laboratory records, likely supporting an ORM framework such as Entity Framework.
## 2. Public Interface
### `ITestEngineerDetailsDbRecord`
Defines the contract for a record in the `TestEngineerDetails` database table.
**Properties:**
* `int TestEngineerId { get; set; }`: The primary key for the record. Mapped to the column `TestEngineerId`.
* `string Name { get; set; }`: Mapped to the column `Name`.
* `string TestEngineerName { get; set; }`: Mapped to the column `TestEngineerName`.
* `string TestEngineerPhone { get; set; }`: Mapped to the column `TestEngineerPhone`.
* `string TestEngineerFax { get; set; }`: Mapped to the column `TestEngineerFax`.
* `string TestEngineerEmail { get; set; }`: Mapped to the column `TestEngineerEmail`.
* `bool LocalOnly { get; set; }`: Mapped to the column `LocalOnly`.
* `DateTime LastModified { get; set; }`: Mapped to the column `LastModified`.
* `string LastModifiedBy { get; set; }`: Mapped to the column `LastModifiedBy`.
* `int Version { get; set; }`: Mapped to the column `Version`.
### `ICustomerDetailsDbRecord`
Defines the contract for a record in the `CustomerDetails` database table.
**Properties:**
* `int CustomerId { get; set; }`: The primary key for the record. Mapped to the column `CustomerId`.
* `string Name { get; set; }`: Mapped to the column `Name`.
* `string CustomerName { get; set; }`: Mapped to the column `CustomerName`.
* `string CustomerTestRefNumber { get; set; }`: Mapped to the column `CustomerTestRefNumber`.
* `string ProjectRefNumber { get; set; }`: Mapped to the column `ProjectRefNumber`.
* `string CustomerOrderNumber { get; set; }`: Mapped to the column `CustomerOrderNumber`.
* `string CustomerCostUnit { get; set; }`: Mapped to the column `CustomerCostUnit`.
* `bool LocalOnly { get; set; }`: Mapped to the column `LocalOnly`.
* `DateTime LastModified { get; set; }`: Mapped to the column `LastModified`.
* `string LastModifiedBy { get; set; }`: Mapped to the column `LastModifiedBy`.
* `int Version { get; set; }`: Mapped to the column `Version`.
### `ILabratoryDetailsDbRecord`
Defines the contract for a record in the `LabratoryDetails` database table.
**Properties:**
* `int LabratoryId { get; set; }`: The primary key for the record. Mapped to the column `LabratoryId`.
* `string Name { get; set; }`: Mapped to the column `Name`.
* `string LabratoryName { get; set; }`: Mapped to the column `LabratoryName`.
* `string LabratoryContactName { get; set; }`: Mapped to the column `LabratoryContactName`.
* `string LabratoryContactPhone { get; set; }`: Mapped to the column `LabratoryContactPhone`.
* `string LabratoryContactFax { get; set; }`: Mapped to the column `LabratoryContactFax`.
* `string LabratoryContactEmail { get; set; }`: Mapped to the column `LabratoryContactEmail`.
* `string LabratoryTestRefNumber { get; set; }`: Mapped to the column `LabratoryTestRefNumber`.
* `string LabratoryProjectRefNumber { get; set; }`: Mapped to the column `LabratoryProjectRefNumber`.
* `DateTime LastModified { get; set; }`: Mapped to the column `LastModified`.
* `string LastModifiedBy { get; set; }`: Mapped to the column `LastModifiedBy`.
* `bool LocalOnly { get; set; }`: Mapped to the column `LocalOnly`.
* `int Version { get; set; }`: Mapped to the column `Version`.
## 3. Invariants
* **Primary Keys**: Each interface requires an integer-based primary key property (`TestEngineerId`, `CustomerId`, `LabratoryId`) decorated with the `[Key]` attribute.
* **Column Mapping**: All properties are explicitly mapped to database columns using the `[Column("...")]` attribute.
* **Audit Trail**: All three interfaces guarantee the existence of `LastModified` (DateTime), `LastModifiedBy` (string), and `Version` (int) properties.
* **Locality**: All three interfaces guarantee a `LocalOnly` boolean flag.
## 4. Dependencies
* **System.ComponentModel.DataAnnotations**: Used for the `[Key]` attribute.
* **System.ComponentModel.DataAnnotations.Schema**: Used for the `[Column]` attribute.
* **System**: Used for basic types (`String`, `Int32`, `DateTime`, `Boolean`).
* **Consumers**: Unknown from source alone, but these interfaces are likely implemented by concrete entity classes consumed by a database context (e.g., Entity Framework `DbContext`).
## 5. Gotchas
* **Spelling Error**: The interface `ILabratoryDetailsDbRecord` and its associated properties/columns (e.g., `LabratoryId`, `LabratoryName`) misspell "Laboratory" as "Labratory". This typo appears to be embedded in the codebase and likely mirrors a typo in the underlying database schema.
* **Redundant Name Fields**: Both `ITestEngineerDetailsDbRecord` and `ICustomerDetailsDbRecord` define a generic `Name` property alongside a more specific `TestEngineerName` or `CustomerName` property. The semantic difference between these two fields is unclear from the source code alone.
* **Nullable Reference Types**: The source code does not enable nullable reference types (no `#nullable enable` directive or `?` annotations on string properties). Consumers should assume strings are nullable or verify data integrity at runtime.

View File

@@ -0,0 +1,47 @@
---
source_files:
- Common/DTS.CommonCore/Interface/TestModule/ITestModuleView.cs
- Common/DTS.CommonCore/Interface/TestModule/ITestModuleViewModel.cs
generated_at: "2026-04-16T12:09:58.780725+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "20d420d686cdf3c6"
---
# Documentation: DTS.Common.Interface.TestModule
## 1. Purpose
This module defines the core interface contracts for the "Test Module" component within the DTS system. It establishes a View-ViewModel abstraction (likely following an MVVM pattern) where `ITestModuleView` represents the display layer and `ITestModuleViewModel` manages the state, specifically exposing a list of loaded assemblies. This separation allows the test module logic to inspect and interact with application assemblies independent of the specific UI framework implementation.
## 2. Public Interface
### `ITestModuleView`
Defined in `DTS.Common.Interface`. Inherits from `DTS.Common.Base.IBaseView`.
* **Signature:** `public interface ITestModuleView : IBaseView`
* **Behavior:** This is a marker interface that extends `IBaseView`. It defines no additional members of its own. It serves to identify a specific view type intended for the Test Module.
### `ITestModuleViewModel`
Defined in `DTS.Common.Interface`. Inherits from `DTS.Common.Base.IBaseViewModel`.
* **Signature:** `public interface ITestModuleViewModel : IBaseViewModel`
* **Behavior:** Defines the data context and state management for the Test Module view.
* **Members:**
* `List<Assembly> AssemblyList { get; set; }`
* A property used to get or set a list of `System.Reflection.Assembly` objects. This implies the view model is responsible for holding references to specific code assemblies, likely for test discovery or execution purposes.
## 3. Invariants
* **Type Hierarchy:** Any class implementing `ITestModuleView` must also implement `IBaseView`. Any class implementing `ITestModuleViewModel` must also implement `IBaseViewModel`.
* **Nullability:** The source does not enforce null checks. `AssemblyList` may theoretically be `null` or empty depending on the implementation logic (not defined in these interfaces).
* **Mutability:** The `AssemblyList` property is mutable (has both `get` and `set`), implying the entire list reference can be swapped out at runtime.
## 4. Dependencies
* **Internal Dependencies:**
* `DTS.Common.Base`: Both interfaces inherit from base types (`IBaseView`, `IBaseViewModel`) defined in this namespace.
* **External Dependencies:**
* `System.Collections.Generic`: Required for the use of `List`.
* `System.Reflection`: Required for the use of the `Assembly` type.
* **Consumers:** Unknown from the source alone. However, concrete classes implementing these interfaces (likely a View and a ViewModel for the Test Module) and any DI container or navigation service resolving these types would depend on this module.
## 5. Gotchas
* **Empty View Interface:** `ITestModuleView` defines no members. Its utility relies entirely on the members inherited from `IBaseView`. Developers should check the definition of `IBaseView` to understand what functionality is actually available to the view.
* **Mutable Collection Property:** `AssemblyList` exposes a `List` rather than an interface (like `IList` or `IEnumerable`) or a read-only collection. This allows consumers to modify the list contents directly or replace the list reference entirely, which could lead to unexpected side effects if not managed carefully in the concrete implementation.
* **Missing Implementation Details:** The source does not indicate how `AssemblyList` is populated (e.g., via dependency injection, service locator, or manual assignment).

View File

@@ -0,0 +1,233 @@
---
source_files:
- Common/DTS.CommonCore/Interface/TestSetups/ITestSetupsView.cs
- Common/DTS.CommonCore/Interface/TestSetups/ITestSetupsViewModel.cs
- Common/DTS.CommonCore/Interface/TestSetups/ITestDASOrder.cs
- Common/DTS.CommonCore/Interface/TestSetups/IROIPeriodChannelRecord.cs
- Common/DTS.CommonCore/Interface/TestSetups/ITestSetupHardwareRecord.cs
- Common/DTS.CommonCore/Interface/TestSetups/ITestSetupROIRecord.cs
- Common/DTS.CommonCore/Interface/TestSetups/ICalculatedChannelRecord.cs
- Common/DTS.CommonCore/Interface/TestSetups/IISFFile.cs
generated_at: "2026-04-16T12:21:25.334372+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "f7166919537b0724"
---
# Documentation: DTS.Common.Interface.TestSetups
## 1. Purpose
This module defines the interface contracts for the TestSetups domain within the DTS (Data Test System) application. It provides abstractions for test configuration data including hardware setup records, Region of Interest (ROI) definitions, calculated channel configurations, and ISF (Instrument Setup File) file format handling. The module supports the MVVM architectural pattern through view/view model interfaces and establishes data contracts for database records and legacy file format interoperability.
---
## 2. Public Interface
### ITestSetupsView
**Namespace:** `DTS.Common.Interface`
**Inheritance:** `IBaseView`
Marker interface for test setups view. No members defined.
---
### ITestSetupsViewModel
**Namespace:** `DTS.Common.Interface`
**Inheritance:** `IBaseViewModel`
Marker interface for test setups view model. No members defined.
---
### ITestDASOrder
**Namespace:** `DTS.Common.Interface.TestSetups`
Allows DAS (Data Acquisition System) ordering within a test setup.
| Property | Type | Access |
|----------|------|--------|
| `DASIndex` | `int` | get/set |
---
### IROIPeriodChannelRecord
**Namespace:** `DTS.Common.Interface.TestSetups`
Describes a record in the ROIPeriodChannels table.
| Property | Type | Access |
|----------|------|--------|
| `TestSetupROIId` | `int` | get/set |
| `ChannelName` | `string` | get/set |
---
### ITestSetupHardwareRecord
**Namespace:** `DTS.Common.Interface.TestSetups`
Describes hardware records for test setup configuration.
| Property | Type | Access |
|----------|------|--------|
| `DASId` | `int` | get/set |
| `TestSetupId` | `int` | get/set |
| `AddDAS` | `bool` | get/set |
| `SamplesPerSecond` | `int` | get/set |
| `IsClockMaster` | `bool` | get/set |
| `AntiAliasFilterRate` | `int` | get/set |
| `PTPDomainId` | `byte` | get/set |
---
### ITestSetupROIRecord
**Namespace:** `DTS.Common.Interface.TestSetups`
Describes a record in the TestSetupROIs table.
| Property | Type | Access |
|----------|------|--------|
| `TestSetupROIId` | `int` | get/set |
| `TestSetupId` | `int` | get/set |
| `Suffix` | `string` | get/set |
| `ROIStart` | `double` | get/set |
| `ROIEnd` | `double` | get/set |
| `IsEnabled` | `bool` | get/set |
| `IsDefault` | `bool` | get/set |
---
### Operations (Enum)
**Namespace:** `DTS.Common.Interface.TestSetups`
Defines calculation operations for calculated channels. Uses `EnumDescriptionTypeConverter` for localized descriptions via `DescriptionResource` attributes.
| Member | Value | Description Resource Key |
|--------|-------|--------------------------|
| `SUM` | 1 | "CalculatedChannel_Sum" |
| `AVERAGE` | 2 | "CalculatedChannel_Average" |
| `IRTRACC3D` | 3 | "CalculatedChannel_IRTRACC3D_Thorax" |
| `IRTRACC3D_ABDOMEN` | 4 | "CalculatedChannel_IRTRACC3D_Abdomen" |
| `IRTRACC3D_LOWERTHORAX` | 5 | "CalculatedChannel_IRTRACC3D_LowerThorax" |
| `Resultant` | 6 | "CalculatedChannel_Resultant" |
| `HIC` | 7 | "HIC" |
---
### ICalculatedChannelRecord
**Namespace:** `DTS.Common.Interface.TestSetups`
Describes a calculated channel record in the database.
| Property | Type | Access | Description |
|----------|------|--------|-------------|
| `Name` | `string` | get/set | Channel name |
| `TestSetupName` | `string` | get/set | Test setup name |
| `Id` | `int` | get/set | Database record ID |
| `Operation` | `Operations` | get/set | Operation to apply to input channels |
| `CalculatedValueCode` | `string` | get/set | ISO or user code for calculated channel |
| `InputChannelIds` | `string[]` | get/set | Array of channel IDs that are inputs for calculation |
| `CFCForInputChannels` | `string` | get/set | CFC (Channel Filter Class) to apply to inputs prior to calculation |
| `ChannelFilterClassForOutput` | `string` | get/set | CFC to apply to output of calculation |
| `TestSetupId` | `int` | get/set | Database ID for test setup record |
| `ViewInRealtime` | `bool` | get/set | Whether channel can be viewed in realtime |
| `ClipLength` | `int` | get/set | Clip length for calculations (e.g., max over clip) |
---
### IISFFile
**Namespace:** `DTS.Common.Interface.TestSetups`
Defines the ISF (Instrument Setup File) file structure with fixed-width records.
| Property | Type | Access | Position/Length |
|----------|------|--------|-----------------|
| `HeaderLine1` | `char[]` | get/set | 80 bytes (RECORD_LENGTH) |
| `TestSetupName` | `char[]` | get/set | 8 characters, starting at character 7 |
| `NumberOfRecords` | `short` | get | 5 characters, starting at character 15 |
| `TestType` | `char[]` | get/set | 22 characters, starting at character 20 |
| `TestDivision` | `char[]` | get/set | 30 characters, starting at character 42 |
| `TCFile` | `char[]` | get/set | 8 characters, starting at character 72 (without .TCF extension) |
| `HeaderLine2` | `char[]` | get/set | 80 bytes (currently unused) |
| `HeaderLine3` | `char[]` | get/set | 80 bytes (currently unused) |
| `Records` | `IISFSensorRecord[]` | get | Sensor records array |
| Method | Signature | Description |
|--------|-----------|-------------|
| `AddRecord` | `void AddRecord(IISFSensorRecord record)` | Adds a record and updates record count |
| `WriteToFile` | `void WriteToFile(string pathToFile)` | Writes the ISF file to disk |
| `AddSensors` | `void AddSensors(ISensorData[] sensors)` | Adds sensors to the file |
---
### IISFSensorRecord
**Namespace:** `DTS.Common.Interface.TestSetups`
Defines a sensor record within an ISF file (4 records of 80 bytes each).
| Property | Type | Position/Length |
|----------|------|-----------------|
| `Record1` | `char[]` | 80 bytes (RECORD_LENGTH) |
| `Tag` | `char[]` | 2 characters, starting at character 75 |
| `DataChannelNumber` | `char[]` | 5 characters, starting at character 7 |
| `UserIdSensorIDIsNotSpecified` | `bool` | 1 character, starting at character 15 |
| `CapacityCharacters` | `char[]` | 11 characters, starting at character 19 |
| `SerialNumber` | `char[]` | 12 characters, starting at character 30 |
| `Sensitivity` | `char[]` | 11 characters, starting at character 42 (Sensitivity/1000 V, or c0 for polynomial) |
| `BridgeResistance` | `char[]` | 11 characters, starting at character 53 |
| `Record2` | `char[]` | 80 bytes (RECORD_LENGTH) |
| `EngineeringUnits` | `char[]` | 12 characters, starting at character 7 of record 2 |
| `C1` | `char[]` | 11 characters, starting at character 20 of record 2 |
| `EID` | `char[]` | 17 characters, starting at character 31 of record 2 |
| `Unknown1` | `char[]` | 4 characters, starting at character 49 of record 2 |
| `Unknown2` | `char[]` | 2 characters, starting at character 53 of record 2 |
| `FireDelay` | `char[]` | 11 characters, starting at character 55 (TOM only, sensor type TI) |
| `TOMConfigurationName` | `char[]` | 8 characters, starting at character 66 |
| `Record3` | `char[]` | 80 bytes (RECORD_LENGTH) |
| `CommentPart1` | `char[]` | 15 characters, starting at character 14 of record 3 |
| `CommentPart2` | `char[]` | 40 characters, starting at character 33 of record 3 |
| `Record4` | `char[]` | 80 bytes (RECORD_LENGTH) |
| `CommentPart3` | `char[]` | 15 characters, starting at character 12 of record 4 |
| `SensorType` | `char[]` | 20 characters, starting at character 30 of record 4 (checked for N/O or N/C for digital inputs) |
| `C2` | `char[]` | 11 characters, starting at character 50 of record 4 |
| `C3` | `char[]` | 11 characters, starting at character 61 of record 4 |
| Method | Signature |
|--------|-----------|
| `SetDataChannelNumber` | `void SetDataChannelNumber(short value)` |
| `SetCapacity` | `void SetCapacity(double capacity)` |
| `GetCapacity` | `double GetCapacity()` |
| `SetSensitivity` | `void SetSensitivity(double sensitivity)` |
| `GetSensitivity` | `double GetSensitivity()` |
| `SetBridgeResistance` | `void SetBridgeResistance(double resistance)` |
| `SetC1` | `void SetC1(double c1)` |
| `GetC1` | `double GetC1()` |
| `SetSensorComment` | `void SetSensorComment(string s)` |
| `SetC2` | `void SetC2(double c2)` |
| `SetC3` | `void SetC3(double c3)` |
| `Write` | `void Write(System.IO.BinaryWriter writer)` |
| `SetSensor` | `void SetSensor(ISensorData sensor)` |
---
### ConstantsAndEnums (Abstract Class)
**Namespace:** `DTS.Common.Interface.TestSetups`
| Constant | Value | Description |
|----------|-------|-------------|
| `RECORD_LENGTH` | 80 | Fixed record length for ISF files |
**ISFKnownChannelTypes Enum:**
| Member | Notes |
|--------|-------|
| `VS` | - |
| `VU` | - |
| `SB` | - |
| `TI` | Not analog (TOM) |
| `TC` | Not analog (TOM) |
| `CT` | Digital |
| `XP` | - |
| `P4` | - |
| `VF` | - |
| `NB` | - |

View File

@@ -0,0 +1,40 @@
---
source_files:
- Common/DTS.CommonCore/Interface/ViewData/IViewDataView.cs
- Common/DTS.CommonCore/Interface/ViewData/IViewDataViewModel.cs
generated_at: "2026-04-16T12:11:08.439419+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "820bab209e8d1b8f"
---
# Documentation: ViewData Interfaces
## 1. Purpose
This module defines two marker interfaces, `IViewDataView` and `IViewDataViewModel`, within the `DTS.Common.Interface` namespace. It exists to establish a specific contract for "ViewData" components within the system, deriving from base architectural components (`IBaseView` and `IBaseViewModel`). This allows for type discrimination of specific views and view models without enforcing additional members beyond those defined in the base interfaces.
## 2. Public Interface
### `IViewDataView`
* **Signature:** `public interface IViewDataView : IBaseView`
* **Namespace:** `DTS.Common.Interface`
* **Description:** An empty interface that extends `IBaseView`. It acts as a marker for view components associated with ViewData logic. It defines no additional methods or properties of its own.
### `IViewDataViewModel`
* **Signature:** `public interface IViewDataViewModel : IBaseViewModel`
* **Namespace:** `DTS.Common.Interface`
* **Description:** An empty interface that extends `IBaseViewModel`. It acts as a marker for view model components associated with ViewData logic. It defines no additional methods or properties of its own.
## 3. Invariants
* **Inheritance Hierarchy:** Any class implementing `IViewDataView` must also implement `IBaseView` (defined in `DTS.Common.Base`).
* **Inheritance Hierarchy:** Any class implementing `IViewDataViewModel` must also implement `IBaseViewModel` (defined in `DTS.Common.Base`).
* **Member Contract:** Since both interfaces are empty (contain no members), the behavioral contract is entirely defined by the base interfaces they inherit from.
## 4. Dependencies
* **Internal Dependencies:**
* `DTS.Common.Base`: Both source files import this namespace to access `IBaseView` and `IBaseViewModel`.
* **Consumers:** Unknown from source alone. It is expected that concrete View and ViewModel classes within the codebase will implement these interfaces to participate in ViewData-specific workflows.
## 5. Gotchas
* **Marker Interfaces:** Both `IViewDataView` and `IViewDataViewModel` are marker interfaces; they define no members. Developers implementing these interfaces should refer to `IBaseView` and `IBaseViewModel` to satisfy the actual structural requirements.
* **Missing Context:** The specific functionality that distinguishes a "ViewData" view/viewmodel from a standard one is not defined in these files. The distinction is purely nominal/type-based at this level.

View File

@@ -0,0 +1,173 @@
---
source_files:
- Common/DTS.CommonCore/Interface/Viewer/IMainView.cs
- Common/DTS.CommonCore/Interface/Viewer/IMenuView.cs
- Common/DTS.CommonCore/Interface/Viewer/IFilterView.cs
- Common/DTS.CommonCore/Interface/Viewer/INavigationView.cs
- Common/DTS.CommonCore/Interface/Viewer/ITestDefinitionListView.cs
- Common/DTS.CommonCore/Interface/Viewer/IMenuViewModel.cs
- Common/DTS.CommonCore/Interface/Viewer/INavigationViewModel.cs
- Common/DTS.CommonCore/Interface/Viewer/IFilterViewModel.cs
- Common/DTS.CommonCore/Interface/Viewer/ITestDefinitionListViewModel.cs
- Common/DTS.CommonCore/Interface/Viewer/IMainViewModel.cs
generated_at: "2026-04-16T12:16:35.672388+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "d625778ef337fcd6"
---
# Documentation: DTS.Common.Interface Viewer Interfaces
## 1. Purpose
This module defines a set of view and view model interfaces for the DTS application's viewer components, implementing a Model-View-ViewModel (MVVM) architecture. These interfaces establish contracts for UI composition using a region-based pattern, where views are injected into named context regions (navigation, graphs, tests, legends, etc.). The module serves as the abstraction layer between concrete view implementations and the presentation logic, enabling loose coupling and testability of the viewer subsystem.
---
## 2. Public Interface
### View Interfaces
All view interfaces inherit from `IBaseView` (defined in `DTS.Common.Base`) and currently declare no additional members.
| Interface | File | Description |
|-----------|------|-------------|
| `IMainView` | `IMainView.cs` | Marker interface for the main view. |
| `IMenuView` | `IMenuView.cs` | Marker interface for menu view components. |
| `IFilterView` | `IFilterView.cs` | Marker interface for filter view components. |
| `INavigationView` | `INavigationView.cs` | Marker interface for navigation view components. |
| `ITestSummaryListView` | `ITestDefinitionListView.cs` | Marker interface for test summary list display. |
### ViewModel Interfaces
#### `IMenuViewModel` (`IMenuViewModel.cs`)
```csharp
public interface IMenuViewModel : IBaseViewModel
{
IMenuView View { get; }
}
```
Provides access to the associated `IMenuView` instance.
---
#### `INavigationViewModel` (`INavigationViewModel.cs`)
```csharp
public interface INavigationViewModel : IBaseViewModel
{
INavigationView NavigationView { get; }
}
```
Provides access to the associated `INavigationView` instance.
---
#### `IFilterViewModel` (`IFilterViewModel.cs`)
```csharp
public interface IFilterViewModel : IBaseViewModel
{
IBaseView View { get; }
IBaseViewModel Parent { get; }
object ContextSearchRegion { get; set; }
}
```
Manages filter/search functionality with:
- `View`: The associated view (typed as `IBaseView`, not `IFilterView`)
- `Parent`: Reference to the parent view model in the hierarchy
- `ContextSearchRegion`: A region context for search-related UI composition
---
#### `ITestSummaryListViewModel` (`ITestDefinitionListViewModel.cs`)
```csharp
public interface ITestSummaryListViewModel : IBaseViewModel
{
ITestSummaryListView TestSummaryListView { get; }
ObservableCollection<ITestSummary> TestSummaryList { get; set; }
List<ITestSummary> SelectedTestSummaryList { get; set; }
void PublishSelectedTestSummaryList();
}
```
Manages a collection of test summaries with:
- `TestSummaryListView`: The associated view
- `TestSummaryList`: Bindable collection of `ITestSummary` objects
- `SelectedTestSummaryList`: Tracks user-selected test summaries
- `PublishSelectedTestSummaryList()`: Notifies subscribers of selection changes
---
#### `IMainViewModel` (`IMainViewModel.cs`)
```csharp
public interface IMainViewModel : IBaseViewModel
{
IBaseView View { get; }
object ContextNavigationRegion { get; set; }
object ContextGraphRegion { get; set; }
object ContextTestsRegion { get; set; }
object ContextGraphsRegion { get; set; }
object ContextLegendRegion { get; set; }
object ContextDiagRegion { get; set; }
object ContextStatsRegion { get; set; }
object ContextCursorRegion { get; set; }
object ContextPropertyRegion { get; set; }
List<FrameworkElement> GetRegions();
}
```
The primary shell view model with:
- `View`: The main view instance
- Nine region context properties for UI composition (all typed as `object`)
- `GetRegions()`: Returns a list of all `FrameworkElement` regions
---
## 3. Invariants
1. **Inheritance Hierarchy**: All view interfaces must inherit from `IBaseView`. All view model interfaces must inherit from `IBaseViewModel`.
2. **Region Context Types**: All region context properties in `IMainViewModel` and `IFilterViewModel` are typed as `object`, suggesting late binding or dynamic region assignment.
3. **Observable Collection Requirement**: `TestSummaryList` uses `ObservableCollection<ITestSummary>`, implying it must support property change notification for UI binding.
4. **WPF Dependency**: `IMainViewModel.GetRegions()` returns `List<FrameworkElement>`, indicating a hard dependency on WPF presentation elements.
---
## 4. Dependencies
### External Dependencies (inferred from imports)
- `DTS.Common.Base` — Provides `IBaseView` and `IBaseViewModel` base interfaces
- `DTS.Common.Interface.TestDefinition` — Provides `ITestSummary` interface
- `System.Collections.Generic` — For `List<T>`
- `System.Collections.ObjectModel` — For `ObservableCollection<T>`
- `System.Windows` — For `FrameworkElement` (WPF)
### Consumers
Unknown from source alone. These interfaces are likely consumed by:
- Concrete view implementations (WinForms/WPF user controls)
- Concrete view model classes
- DI container registrations
- Region navigation services
---
## 5. Gotchas
1. **File/Interface Name Mismatch**:
- File `ITestDefinitionListView.cs` contains interface `ITestSummaryListView`
- File `ITestDefinitionListViewModel.cs` contains interface `ITestSummaryListViewModel`
This naming inconsistency may cause confusion when locating types. The terms "TestDefinition" and "TestSummary" appear to be used interchangeably, which may indicate a historical rename or unclear domain terminology.
2. **Inconsistent View Property Types**:
- `IMenuViewModel.View` returns `IMenuView` (specific type)
- `INavigationViewModel.NavigationView` returns `INavigationView` (specific type)
- `IFilterViewModel.View` returns `IBaseView` (base type, not `IFilterView`)
- `IMainViewModel.View` returns `IBaseView` (base type, not `IMainView`)
This inconsistency suggests either incomplete refactoring or intentional abstraction at certain levels.
3. **Suppressed Namespace Check**: `IFilterViewModel.cs` contains `// ReSharper disable CheckNamespace`, indicating possible namespace misalignment that was silenced rather than fixed.
4. **Region Naming Inconsistency**: `IMainViewModel` has both `ContextGraphRegion` (singular) and `ContextGraphsRegion` (plural). The semantic difference between these is unclear from source alone.

View File

@@ -0,0 +1,48 @@
---
source_files:
- Common/DTS.CommonCore/Interface/_GenericModule/IGenericModuleView.cs
- Common/DTS.CommonCore/Interface/_GenericModule/IGenericModuleViewModel.cs
generated_at: "2026-04-16T12:17:41.765515+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "857aa9f92afca967"
---
# Documentation: DTS.Common.Interface (Generic Module)
## 1. Purpose
This module defines the core abstraction layer for "Generic Modules" within the system, adhering to a View/ViewModel separation pattern. It provides two marker interfaces, `IGenericModuleView` and `IGenericModuleViewModel`, which establish a standard contract for module implementations. These interfaces ensure that generic modules derive from the application's foundational base types (`IBaseView` and `IBaseViewModel`), enabling polymorphic handling and consistent architecture across the codebase.
## 2. Public Interface
### `IGenericModuleView`
* **Namespace:** `DTS.Common.Interface`
* **Inheritance:** `IBaseView`
* **Signature:**
```csharp
public interface IGenericModuleView : IBaseView { }
```
* **Description:** A marker interface intended for View components within a Generic Module. It inherits from `IBaseView` but defines no additional members.
### `IGenericModuleViewModel`
* **Namespace:** `DTS.Common.Interface`
* **Inheritance:** `IBaseViewModel`
* **Signature:**
```csharp
public interface IGenericModuleViewModel : IBaseViewModel { }
```
* **Description:** A marker interface intended for ViewModel components within a Generic Module. It inherits from `IBaseViewModel` but defines no additional members.
## 3. Invariants
* **Type Hierarchy:** Any class implementing `IGenericModuleView` must also implement `IBaseView` (defined in `DTS.Common.Base`).
* **Type Hierarchy:** Any class implementing `IGenericModuleViewModel` must also implement `IBaseViewModel` (defined in `DTS.Common.Base`).
* **Behavioral Contract:** Since neither interface defines methods or properties, the behavioral contract is entirely defined by the parent interfaces (`IBaseView` and `IBaseViewModel`).
## 4. Dependencies
* **Internal Dependencies:**
* `DTS.Common.Base`: Both source files import this namespace to access `IBaseView` and `IBaseViewModel`.
* **Consumers:** Unknown from the source alone. These interfaces are likely consumed by classes implementing specific module views and viewmodels, or by navigation/dependency injection infrastructure that resolves generic module types.
## 5. Gotchas
* **Marker Interfaces:** Both `IGenericModuleView` and `IGenericModuleViewModel` are empty "marker" interfaces. They do not expose any specific functionality (properties, methods, or events) themselves. Developers must inspect `IBaseView` and `IBaseViewModel` to understand the actual API surface area required for implementation.
* **Usage Ambiguity:** The source does not specify what constitutes a "Generic Module" versus a standard module. The distinction is likely defined by convention or usage in other parts of the codebase (e.g., specific registration logic or base classes).