init
This commit is contained in:
@@ -0,0 +1,182 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.CommonCore/Interface/BuildTestSetup/IBuildTestSetup.cs
|
||||
generated_at: "2026-04-16T02:22:58.506403+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "5d29553a439a7fc1"
|
||||
---
|
||||
|
||||
# BuildTestSetup
|
||||
|
||||
### **Purpose**
|
||||
This module defines the `IBuildTestSetup` interface, which serves as the contract for build/test configuration data in the DTS (Data Acquisition and Test System) framework. It encapsulates a comprehensive set of user-configurable parameters governing test execution behavior—such as device identification, acquisition settings, diagnostic checks, export formats, and upload/download behavior—enabling serialization, UI binding, and runtime configuration of test setups. As it extends `INotifyPropertyChanged`, it is designed for data-binding scenarios (e.g., UI forms) where real-time updates to configuration changes are required.
|
||||
|
||||
---
|
||||
|
||||
### **Public Interface**
|
||||
All members are properties; no methods are declared in this interface.
|
||||
|
||||
#### **Core Metadata Properties**
|
||||
- `string DASSerialNumber { get; set; }`
|
||||
Serial number of the DAS (Data Acquisition System) unit under test.
|
||||
- `string SetupName { get; set; }`
|
||||
Human-readable name for the test setup instance.
|
||||
- `string SetupDescription { get; set; }`
|
||||
Optional descriptive text for the setup.
|
||||
- `string LastModified { get; set; }`
|
||||
Timestamp (as string) of the last modification to the setup.
|
||||
- `string LastModifiedBy { get; set; }`
|
||||
Identifier (e.g., username) of the last modifier.
|
||||
|
||||
#### **Test Execution Control Properties**
|
||||
- `string AutomaticMode { get; set; }`
|
||||
Enables/disables automatic test mode.
|
||||
- `string AutomaticModeDelay { get; set; }`
|
||||
Delay (as string) before automatic mode starts.
|
||||
- `string AutoArm { get; set; }`
|
||||
Enables/disables automatic arming of the test.
|
||||
- `string QuitTestWithoutWarning { get; set; }`
|
||||
If true, permits exiting the test without user confirmation.
|
||||
- `string Streaming { get; set; }`
|
||||
Enables/disables streaming mode (continuous data acquisition).
|
||||
- `string UploadData { get; set; }`
|
||||
Enables/disables post-test data upload.
|
||||
- `string UploadDataFolder { get; set; }`
|
||||
Target folder path for uploaded data.
|
||||
- `string DownloadFolder { get; set; }`
|
||||
Folder path for downloading test data.
|
||||
|
||||
#### **Diagnostic & Safety Checks**
|
||||
- `string WarnOnBatteryFail { get; set; }`
|
||||
Triggers warning if battery check fails.
|
||||
- `string StrictDiagnostics { get; set; }`
|
||||
Enforces strict diagnostic compliance (e.g., abort on minor failures).
|
||||
- `string RequireConfirmationOnErrors { get; set; }`
|
||||
Requires user confirmation before proceeding after an error.
|
||||
- `string PerformArmChecklist { get; set; }`
|
||||
Enables/disables the pre-arm checklist.
|
||||
- `string RequireAllUnitsPassArmCheckList { get; set; }`
|
||||
If true, *all* units must pass the checklist before arming.
|
||||
- `string CheckInputVoltage { get; set; }`
|
||||
Enables input voltage check during diagnostics.
|
||||
- `string CheckBatteryVoltage { get; set; }`
|
||||
Enables battery voltage check.
|
||||
- `string CheckSquibResistance { get; set; }`
|
||||
Enables squib (pyro) resistance check.
|
||||
- `string MeasureSquibResistances { get; set; }`
|
||||
Explicitly enables squib resistance *measurement* (distinct from check).
|
||||
- `string CheckSensorIds { get; set; }`
|
||||
Enables sensor ID validation.
|
||||
- `string CheckStartEventLines { get; set; }`
|
||||
Validates start event line states.
|
||||
- `string CheckTiltSensor { get; set; }`
|
||||
Enables tilt sensor diagnostics.
|
||||
- `string CheckTemperature { get; set; }`
|
||||
Enables temperature sensor diagnostics.
|
||||
- `string TriggerCheckStep { get; set; }`
|
||||
Enables/disables a dedicated trigger verification step.
|
||||
- `string PostTestDiagnostics { get; set; }`
|
||||
Enables diagnostics run after test completion.
|
||||
|
||||
#### **Data Acquisition Configuration**
|
||||
- `string ViewRealtime { get; set; }`
|
||||
Enables/disables real-time data visualization.
|
||||
- `string RecordingMode { get; set; }`
|
||||
Specifies recording mode (e.g., continuous, event-triggered).
|
||||
- `string SamplesPerSecond { get; set; }`
|
||||
Sampling rate (as string).
|
||||
- `string PreTriggerSeconds { get; set; }`
|
||||
Duration of pre-trigger buffer (seconds).
|
||||
- `string PostTriggerSeconds { get; set; }`
|
||||
Duration of post-trigger buffer (seconds).
|
||||
- `string NumberOfEvents { get; set; }`
|
||||
Maximum number of events to record.
|
||||
- `string WakeUpMotionTimeout { get; set; }`
|
||||
Timeout (seconds) for motion-based wake-up detection.
|
||||
- `string AllowSensorIdToBlankChannel { get; set; }`
|
||||
If true, permits mapping sensor IDs to blank/unconfigured channels.
|
||||
- `string ExcitationWarmupTimeMS { get; set; }`
|
||||
Warm-up delay (ms) for sensor excitation before acquisition.
|
||||
- `string UseTestEngineerDetails { get; set; }`
|
||||
If true, embeds test engineer identity in output data.
|
||||
|
||||
#### **ROI (Region of Interest) & Download Settings**
|
||||
- `string ROIDownload { get; set; }`
|
||||
Enables ROI-based data download.
|
||||
- `string ViewROIDownload { get; set; }`
|
||||
Enables ROI download visualization.
|
||||
- `string ROIStart { get; set; }`
|
||||
Start time (as string, likely seconds) for ROI.
|
||||
- `string ROIEnd { get; set; }`
|
||||
End time (as string) for ROI.
|
||||
|
||||
#### **Export Configuration**
|
||||
- `string Export { get; set; }`
|
||||
Enables/disables data export.
|
||||
- `string ExportFolder { get; set; }`
|
||||
Output directory for exported files.
|
||||
- `string UseLabDetails { get; set; }`
|
||||
If true, includes lab-specific metadata in exports.
|
||||
- `string UseCustomerDetails { get; set; }`
|
||||
If true, includes customer-specific metadata in exports.
|
||||
- `string UserTags { get; set; }`
|
||||
Custom tags to embed in exported data.
|
||||
- `string CalibrationBehavior { get; set; }`
|
||||
Controls calibration application during export (e.g., raw, calibrated).
|
||||
- `string SuppressMissingSensorsWarning { get; set; }`
|
||||
Suppresses warnings for missing sensors during export.
|
||||
- `string NotAllChannelsRealTime { get; set; }`
|
||||
Indicates not all channels are available in real-time (affects UI/logic).
|
||||
- `string NotAllChannelsViewer { get; set; }`
|
||||
Indicates not all channels are available in post-processing viewer.
|
||||
- `string AllowMissingSensors { get; set; }`
|
||||
Permits test completion despite missing sensors.
|
||||
|
||||
##### **Export Format Flags**
|
||||
*Each `Export*Desired` property is a string flag indicating whether a specific export format is requested.*
|
||||
- `ExportCh10FilteredEUDesired`, `ExportChryslerDDASDesired`, `ExportCSVADCDesired`, `ExportCSVFilteredDesired`, `ExportCSVMVDesired`, `ExportCSVUnfilteredDesired`, `ExportDiademADCDesired`, `ExportHDFADCDesired`, `ExportHDFMVDesired`, `ExportHDFUnfilteredDesired`, `ExportISOFilteredDesired`, `ExportISOUnfilteredDesired`, `ExportRDFADCDesired`, `ExportTDASADCDesired`, `ExportTDMSADCDesired`, `ExportToyotaUnfilteredDesired`, `ExportTSVFilteredDesired`, `ExportTSVUnfilteredDesired`, `ExportXLSXFilteredDesired`, `ExportXLSXUnfilteredDesired`, `ExportASCDesired`
|
||||
Boolean-like string values (e.g., `"True"`/`"False"`) indicating inclusion of the respective export format.
|
||||
*Note: Several commented-out properties (e.g., `ExportCh10UnfilteredEUDesired`, `ExportHDFFilteredDesired`) suggest historical or deprecated formats.*
|
||||
|
||||
#### **Grouping & UI**
|
||||
- `List<GroupXMLClass> Groups { get; set; }`
|
||||
Collection of `GroupXMLClass` objects defining logical groupings of channels or tests.
|
||||
- `string CommonStatusLine { get; set; }`
|
||||
Shared status message displayed across UI components.
|
||||
|
||||
---
|
||||
|
||||
### **Invariants**
|
||||
- **All properties are `string`-typed**, even those logically representing booleans (e.g., `"True"`/`"False"`) or numbers (e.g., `"1000"` for `SamplesPerSecond`). Parsing is deferred to consumers.
|
||||
- **`Groups` must be non-null** when accessed; implementations must initialize it (e.g., in constructor) to avoid `NullReferenceException`.
|
||||
- **`INotifyPropertyChanged` compliance**: Any change to a property must raise `PropertyChanged` with the correct property name.
|
||||
- **No validation is enforced by the interface itself**; validation rules (e.g., numeric range checks) are implemented externally.
|
||||
- **Commented-out properties are not part of the interface** and must not be assumed to exist.
|
||||
|
||||
---
|
||||
|
||||
### **Dependencies**
|
||||
- **Direct Dependencies**:
|
||||
- `System.ComponentModel` (for `INotifyPropertyChanged`).
|
||||
- `System.Collections.Generic` (for `List<T>`).
|
||||
- `DTS.Common.XMLUtils` (specifically `GroupXMLClass`, used in the `Groups` property).
|
||||
- **Inferred Consumers**:
|
||||
- UI layers (e.g., WPF/WinForms) binding to this interface for configuration forms.
|
||||
- Serialization/deserialization modules (e.g., XML/JSON converters) that persist/load `IBuildTestSetup` instances.
|
||||
- Test execution engine that reads properties to configure acquisition, diagnostics, and export pipelines.
|
||||
- **Inferred Dependents**:
|
||||
- Implementations (e.g., `BuildTestSetup` class) in the same or related modules.
|
||||
- XML serialization utilities (via `GroupXMLClass` dependency) for saving/loading setups.
|
||||
|
||||
---
|
||||
|
||||
### **Gotchas**
|
||||
- **String-based booleans/numbers**: Consumers must parse values (e.g., `bool.Parse(Export)`) and handle format exceptions—no built-in type safety.
|
||||
- **Deprecated export formats**: Commented-out properties (e.g., `ExportSomatFilteredDesired`) indicate legacy formats no longer supported; avoid referencing them.
|
||||
- **Ambiguous semantics**: Properties like `AutomaticMode` and `RecordingMode` lack documentation on valid values (e.g., `"On"`, `"Auto"`, `"Manual"`); these must be inferred from implementation or external docs.
|
||||
- **No validation guarantees**: The interface does not enforce constraints (e.g., `SamplesPerSecond` must be numeric), leading to potential runtime errors if consumers assume validity.
|
||||
- **`CommonStatusLine` purpose unclear**: Its role as a shared status string suggests UI coordination, but its lifecycle (e.g., who sets/updates it) is not defined here.
|
||||
- **Missing `ExportFormat` property**: The commented-out `ExportFormat` suggests a previous unified format selector, now replaced by per-format flags—potential source of confusion during migration.
|
||||
|
||||
*None identified beyond the above.*
|
||||
@@ -0,0 +1,342 @@
|
||||
---
|
||||
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-16T02:30:03.492567+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "cbc4fb29d29bc466"
|
||||
---
|
||||
|
||||
# Channels
|
||||
|
||||
### **Purpose**
|
||||
This module defines a set of interfaces that model channel-related data and behavior within the DTS (Data Acquisition and Test System) platform. It establishes contracts for representing physical and logical channels—both as database records (`IChannelDbRecord`) and as runtime objects (`IGroupChannel`)—alongside associated settings (`IChannelSetting`, `IChannelSettingRecord`, `IGroupChannelSettingRecord`) and channel identification codes (`IChannelCode`). These interfaces collectively support configuration, data acquisition, UI binding, and persistence of measurement channels, including support for analog, digital, squib, clock, UART, and stream modules, as well as sensor/hardware assignment, calibration, and filtering.
|
||||
|
||||
---
|
||||
|
||||
### **Public Interface**
|
||||
|
||||
#### **`IChannelSettingRecord`**
|
||||
- **`int Id { get; set; }`**
|
||||
Unique identifier for the setting definition.
|
||||
- **`string SettingName { get; set; }`**
|
||||
Human-readable name of the setting (e.g., `"Range"`, `"Polarity"`).
|
||||
- **`string DefaultValue { get; set; }`**
|
||||
Default value (as a string) for this setting type.
|
||||
|
||||
#### **`IGroupChannelSettingRecord`**
|
||||
- **`long ChannelId { get; set; }`**
|
||||
Foreign key referencing the channel (`IChannelDbRecord.Id`).
|
||||
- **`int SettingId { get; set; }`**
|
||||
Reference to the setting definition (`IChannelSettingRecord.Id`).
|
||||
- **`string SettingValue { get; set; }`**
|
||||
Actual value assigned to this setting on the channel.
|
||||
|
||||
#### **`IChannelCode`**
|
||||
- **`int Id { get; }`**
|
||||
Unique identifier for the channel code.
|
||||
- **`string Code { get; }`**
|
||||
Machine-readable code (e.g., ISO code fragment).
|
||||
- **`string Name { get; }`**
|
||||
Human-readable description of the code.
|
||||
- **`ChannelEnumsAndConstants.ChannelCodeType CodeType { get; }`**
|
||||
Enumerated type of the code (e.g., `Range`, `Filter`, `Polarity`).
|
||||
|
||||
#### **`IChannelSetting`**
|
||||
- **`long ChannelId { get; set; }`**
|
||||
ID of the channel this setting belongs to.
|
||||
- **`int SettingTypeId { get; }`**
|
||||
ID of the setting type (corresponds to `IChannelSettingRecord.Id`).
|
||||
- **`string SettingName { get; }`**
|
||||
Name of the setting (e.g., `"Range"`).
|
||||
- **`string DefaultValue { get; }`**
|
||||
Default value for this setting type.
|
||||
- **`string Value { get; set; }`**
|
||||
Current value stored as a string.
|
||||
- **`int IntValue { get; set; }`**
|
||||
Typed value (int) for numeric settings.
|
||||
- **`double DoubleValue { get; set; }`**
|
||||
Typed value (double) for floating-point settings.
|
||||
- **`bool BoolValue { get; set; }`**
|
||||
Typed value (bool) for boolean settings.
|
||||
- **`IChannelSetting Clone()`**
|
||||
Creates a deep copy of the setting.
|
||||
|
||||
#### **`IChannelDbRecord`**
|
||||
- **`long Id { get; set; }`**
|
||||
Primary key in the database.
|
||||
- **`int GroupId { get; set; }`**
|
||||
Foreign key to the group (`IGroup.Id`).
|
||||
- **`string IsoCode { get; set; }`**
|
||||
ISO-standard code for the channel (e.g., `"A1.1"`).
|
||||
- **`string IsoChannelName { get; set; }`**
|
||||
ISO-standard name of the channel.
|
||||
- **`string UserCode { get; set; }`**
|
||||
User-defined code.
|
||||
- **`string UserChannelName { get; set; }`**
|
||||
User-defined name of the channel.
|
||||
- **`int DASId { get; set; }`**
|
||||
ID of the data acquisition system (DAS) device.
|
||||
- **`int DASChannelIndex { get; set; }`**
|
||||
Physical channel index on the DAS device.
|
||||
- **`int GroupChannelOrder { get; set; }`**
|
||||
Order of the channel within its group.
|
||||
- **`int TestSetupOrder { get; set; }`**
|
||||
Order of the channel in the test setup.
|
||||
- **`int SensorId { get; set; }`**
|
||||
ID of the assigned sensor.
|
||||
- **`bool Disabled { get; set; }`**
|
||||
Whether the channel is disabled.
|
||||
- **`DateTime LastModified { get; set; }`**
|
||||
Timestamp of last modification.
|
||||
- **`string LastModifiedBy { get; set; }`**
|
||||
User who last modified the record.
|
||||
|
||||
#### **`IGroupChannel`** *(Extends `IChannelDbRecord`)*
|
||||
All members of `IChannelDbRecord` are inherited. Additional members:
|
||||
|
||||
- **`SensorConstants.AvailableRangesLowG RangeLowG { get; set; }`**
|
||||
Low-G sensor range setting.
|
||||
- **`bool VoltageInsertionSensor { get; }`**
|
||||
Indicates presence of a calibration-less voltage measurement channel.
|
||||
- **`bool RangeModifiableSensorLowG { get; }`**
|
||||
Indicates embedded low-G sensor with modifiable range.
|
||||
- **`bool RangeModifiableSensorARS { get; }`**
|
||||
Indicates embedded ARS sensor with modifiable range.
|
||||
- **`InitialOffset[] AvailableInitialOffsets { get; set; }`**
|
||||
Available initial offset options (depends on assigned sensor calibration).
|
||||
- **`string IEPESupport { get; }`**
|
||||
IEPE support status (e.g., `"Supported"`, `"N/A"`).
|
||||
- **`IGroup Group { get; set; }`**
|
||||
Parent group object.
|
||||
- **`string GroupName { get; set; }`**
|
||||
Display name of the parent group.
|
||||
- **`bool GroupNameValid { get; set; }`**
|
||||
Whether `GroupName` is set (not validated for correctness).
|
||||
- **`bool IsoCodeValid { get; set; }`**
|
||||
Whether `IsoCode` is set (not validated for correctness).
|
||||
- **`bool IsoChannelNameValid { get; set; }`**
|
||||
Whether `IsoChannelName` is set.
|
||||
- **`bool UserCodeValid { get; set; }`**
|
||||
Whether `UserCode` is set.
|
||||
- **`bool UserChannelNameValid { get; set; }`**
|
||||
Whether `UserChannelName` is set.
|
||||
- **`bool HardwareValid { get; }`**
|
||||
Whether hardware has been assigned.
|
||||
- **`string HardwareId { get; set; }`**
|
||||
Legacy hardware identifier (format: `"[das serial]:[channel index]"`).
|
||||
- **`double TestSampleRate { get; set; }`**
|
||||
Sample rate of the associated DAS.
|
||||
- **`bool SensorValid { get; }`**
|
||||
Whether a sensor has been assigned.
|
||||
- **`bool IsDisabled { get; set; }`**
|
||||
Whether the channel is disabled for data collection.
|
||||
- **`void SetHardwareChannel(IHardwareChannel hardwareChannel)`**
|
||||
Assigns a hardware channel object.
|
||||
- **`void SetSensor(IDragAndDropItem sensor, IChannelSetting[] channelDefaults, bool applySensorDataToBlankChannels)`**
|
||||
Assigns a sensor and optionally applies its default settings.
|
||||
- **`bool CompareValue(string property)`**
|
||||
Compares current value of a property to its original (e.g., for change tracking).
|
||||
- **`bool SetDifferent(string property)`**
|
||||
Marks a property as having been changed from its original value.
|
||||
- **`void SetNotDifferent()`**
|
||||
Clears all "different" flags.
|
||||
- **`void SetRange(CACOption option)`**
|
||||
Sets range based on a CAC option.
|
||||
- **`bool CanMoveUp { get; set; }`**
|
||||
Whether the channel can be moved up in the list.
|
||||
- **`bool CanMoveDown { get; set; }`**
|
||||
Whether the channel can be moved down in the list.
|
||||
- **`bool DeleteShouldBeEnabled { get; set; }`**
|
||||
Whether delete action should be enabled in UI.
|
||||
- **`System.Windows.Visibility RemoveSensorVisibility { get; set; }`**
|
||||
UI visibility for sensor removal control.
|
||||
- **`bool IsBlank()`**
|
||||
Returns `true` if the channel is new and unedited.
|
||||
- **`void Clear()`**
|
||||
Clears hardware and sensor assignments.
|
||||
- **`bool Filter(string term)`**
|
||||
Returns `true` if the channel matches the given search term.
|
||||
- **`ICommand PasteCommand { get; set; }`**
|
||||
Command executed on paste operation.
|
||||
- **`IChannelSetting[] ChannelSettings { get; set; }`**
|
||||
Array of channel-specific settings.
|
||||
- **`string GetChannelName(IsoViewMode isoViewMode)`**
|
||||
Returns channel name based on ISO view mode.
|
||||
- **`string GetChannelCode(IsoViewMode isoViewMode)`**
|
||||
Returns channel code based on ISO view mode.
|
||||
- **`void Copy(IGroupChannel groupChannel)`**
|
||||
Copies state from another channel.
|
||||
- **`string Hardware { get; set; }`**
|
||||
UI display string for hardware.
|
||||
- **`string Sensor { get; }`**
|
||||
UI display string for sensor.
|
||||
- **`ISensorData SensorData { get; }`**
|
||||
Sensor metadata and configuration.
|
||||
- **`IHardwareChannel HardwareChannel { get; }`**
|
||||
Hardware channel object.
|
||||
- **`IDragAndDropItem DragAndDropItem { get; }`**
|
||||
Drag-and-drop representation of the channel.
|
||||
- **`ISensorCalibration SensorCalibration { get; }`**
|
||||
Sensor calibration data.
|
||||
- **`void SetSensorCalibration(ISensorCalibration calibration)`**
|
||||
Assigns sensor calibration.
|
||||
- **`void SetSensorData(ISensorData sensorData, IDragAndDropItem dragAndDropItem, bool decideSettings = false)`**
|
||||
Assigns sensor data and optionally updates settings.
|
||||
- **`bool HasEID { get; }`**
|
||||
Whether the channel has an EID (Embedded ID).
|
||||
- **`bool IsAnalog { get; }`**
|
||||
Whether channel has an analog sensor assigned (or is non-blank).
|
||||
- **`bool IsSquib { get; }`**
|
||||
Whether channel has a squib sensor assigned (or is non-blank).
|
||||
- **`bool IsDigitalIn { get; }`**
|
||||
Whether channel has a digital input sensor assigned (or is non-blank).
|
||||
- **`bool IsDigitalOut { get; }`**
|
||||
Whether channel has a digital output sensor assigned (or is non-blank).
|
||||
- **`bool IsClock { get; }`**
|
||||
Whether channel is from an RTC module.
|
||||
- **`bool IsUart { get; }`**
|
||||
Whether channel is from a UART module.
|
||||
- **`bool IsStreamIn { get; }`**
|
||||
Whether channel is from a stream-in module.
|
||||
- **`bool IsStreamOut { get; }`**
|
||||
Whether channel is from a stream-out module.
|
||||
- **`double Range { get; set; }`**
|
||||
Current range setting.
|
||||
- **`double Capacity { get; }`**
|
||||
Sensor capacity.
|
||||
- **`IFilterClass FilterClass { get; set; }`**
|
||||
Filter class setting.
|
||||
- **`string Polarity { get; set; }`**
|
||||
Polarity setting.
|
||||
- **`string Units { get; }`**
|
||||
Units of measurement.
|
||||
- **`ZeroMethodType ZeroMethod { get; set; }`**
|
||||
Zeroing method.
|
||||
- **`double ZeroMethodStart { get; set; }`**
|
||||
Start time for zeroing.
|
||||
- **`double ZeroMethodEnd { get; set; }`**
|
||||
End time for zeroing.
|
||||
- **`string Sensitivity { get; }`**
|
||||
Sensor sensitivity.
|
||||
- **`InitialOffset InitialOffset { get; set; }`**
|
||||
Initial offset value.
|
||||
- **`bool SquibLimitDuration { get; set; }`**
|
||||
Whether squib duration is limited.
|
||||
- **`double SquibDuration { get; set; }`**
|
||||
Squib duration.
|
||||
- **`double? SquibDelay { get; set; }`**
|
||||
Nullable squib delay (nullable for UI purposes).
|
||||
- **`double SquibCurrent { get; set; }`**
|
||||
Squib current.
|
||||
- **`bool DigitalOutLimitDuration { get; set; }`**
|
||||
Whether digital output duration is limited.
|
||||
- **`double DigitalOutDuration { get; set; }`**
|
||||
Digital output duration.
|
||||
- **`double DigitalOutDurationMax { get; set; }`**
|
||||
Maximum allowed digital output duration (FB 28107).
|
||||
- **`double DigitalOutDelay { get; set; }`**
|
||||
Digital output delay.
|
||||
- **`DigitalOutputModes DigitalOutputMode { get; set; }`**
|
||||
Digital output mode.
|
||||
- **`SquibFireMode SquibFireMode { get; set; }`**
|
||||
Squib fire mode.
|
||||
- **`DigitalInputModes DigitalInputMode { get; set; }`**
|
||||
Digital input mode.
|
||||
- **`string ActiveValue { get; set; }`**
|
||||
Active value for digital inputs/outputs.
|
||||
- **`string DefaultValue { get; set; }`**
|
||||
Default value for digital inputs/outputs.
|
||||
- **`uint UartBaudRate { get; set; }`**
|
||||
UART baud rate.
|
||||
- **`uint UartDataBits { get; set; }`**
|
||||
UART data bits.
|
||||
- **`StopBits UartStopBits { get; set; }`**
|
||||
UART stop bits.
|
||||
- **`Parity UartParity { get; set; }`**
|
||||
UART parity.
|
||||
- **`Handshake UartFlowControl { get; }`**
|
||||
UART flow control (always `NONE`; FB 30486).
|
||||
- **`UartDataFormat UartDataFormat { get; set; }`**
|
||||
UART data format.
|
||||
- **`string StreamInUDPAddress { get; set; }`**
|
||||
UDP address for stream-in.
|
||||
- **`UDPStreamProfile StreamOutUDPProfile { get; set; }`**
|
||||
UDP profile for stream-out.
|
||||
- **`string StreamOutUDPAddress { get; set; }`**
|
||||
UDP address for stream-out.
|
||||
- **`ushort StreamOutUDPTimeChannelId { get; set; }`**
|
||||
Time channel ID for stream-out UDP.
|
||||
- **`ushort StreamOutUDPDataChannelId { get; set; }`**
|
||||
Data channel ID for stream-out UDP.
|
||||
- **`string StreamOutUDPTmNSConfig { get; set; }`**
|
||||
TMATS configuration for stream-out.
|
||||
- **`ushort StreamOutIRIGTimeDataPacketIntervalMs { get; set; }`**
|
||||
IRIG packet interval (ms).
|
||||
- **`ushort StreamOutTMATSIntervalMs { get; set; }`**
|
||||
TMATS interval (ms; per FB 29987).
|
||||
- **`IFilterClass GetFilterClassFromISOCode(ISoftwareFilter[] filters, string isoCode)`**
|
||||
Retrieves filter class based on ISO code.
|
||||
- **`CoerceISOCodeDelegate CoerceISOCodeFunc { get; }`**
|
||||
Function to coerce/normalize ISO codes.
|
||||
- **`UIItemStatus ChannelStatus { get; }`**
|
||||
Combined status of channel (e.g., incomplete, error).
|
||||
- **`void SetSettingsFromSensor(ISensorData sd)`**
|
||||
Applies sensor settings to channel.
|
||||
- **`string GetChangeList(ISensorData sensor)`**
|
||||
Returns list of differences between sensor and channel settings.
|
||||
- **`bool IsRangeDifferent { get; set; }`**
|
||||
Whether range differs from original.
|
||||
- **`bool IsFilterClassDifferent { get; set; }`**
|
||||
Whether filter class differs from original.
|
||||
- **`bool IsPolarityDifferent { get; set; }`**
|
||||
Whether polarity differs from original.
|
||||
- **`bool IsZeroMethodDifferent { get; set; }`**
|
||||
Whether zero method differs from original.
|
||||
- **`bool IsZeroMethodStartDifferent { get; set; }`**
|
||||
Whether zero start time differs.
|
||||
- **`bool IsZeroMethodEndDifferent { get; set; }`**
|
||||
Whether zero end time differs.
|
||||
- **`bool IsInitialOffsetDifferent { get; set; }`**
|
||||
Whether initial offset differs.
|
||||
- **`bool IsSquibFireModeDifferent { get; set; }`**
|
||||
Whether squib fire mode differs.
|
||||
- **`bool IsSquibDelayDifferent { get; set; }`**
|
||||
Whether squib delay differs.
|
||||
- **`bool IsSquibLimitDurationDifferent { get; set; }`**
|
||||
Whether squib duration limit differs.
|
||||
- **`bool IsSquibDurationDifferent { get; set; }`**
|
||||
Whether squib duration differs.
|
||||
- **`bool IsSquibCurrentDifferent { get; set; }`**
|
||||
Whether squib current differs.
|
||||
- **`bool IsDigitalOutputModeDifferent { get; set; }`**
|
||||
Whether digital output mode differs.
|
||||
- **`bool IsDigitalOutDelayDifferent { get; set; }`**
|
||||
Whether digital output delay differs.
|
||||
- **`bool IsDigitalOutLimitDurationDifferent { get; set; }`**
|
||||
Whether digital output duration limit differs.
|
||||
- **`bool IsDigitalOutDurationDifferent { get; set; }`**
|
||||
Whether digital output duration differs.
|
||||
- **`bool IsDigitalInputModeDifferent { get; set; }`**
|
||||
Whether digital input mode differs.
|
||||
- **`bool IsDefaultValueDifferent { get; set; }`**
|
||||
Whether default value differs.
|
||||
- **`bool IsActiveValueDifferent { get; set; }`**
|
||||
Whether active value differs.
|
||||
- **`bool BorderShouldShowOutOfDate { get; set; }`**
|
||||
Whether UI border should indicate stale data.
|
||||
|
||||
---
|
||||
|
||||
### **Invariants**
|
||||
- `IChannelDbRecord.Id` must be unique per record and non-negative.
|
||||
- `IChannelDbRecord.GroupId` must reference a valid group.
|
||||
- `IChannelDbRecord.DASChannelIndex` must be ≥ 0 and consistent with the DAS device’s channel count.
|
||||
- `IChannelDbRecord.SensorId` must be ≥ 0 if a sensor is assigned; otherwise, may be 0 or -1 depending on implementation.
|
||||
- `IGroupChannel.IsBlank()` returns `true` only if the channel has never been edited (i.e., no hardware/sensor assigned and all fields at defaults).
|
||||
- `IGroupChannel.SensorValid` and
|
||||
@@ -0,0 +1,88 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.CommonCore/Interface/Channels/ChannelCodes/IChannelCodesListView.cs
|
||||
- Common/DTS.CommonCore/Interface/Channels/ChannelCodes/IChannelCodesListViewModel.cs
|
||||
- Common/DTS.CommonCore/Interface/Channels/ChannelCodes/IChannelCode.cs
|
||||
generated_at: "2026-04-16T02:38:26.071478+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "0d6003b6ee26589a"
|
||||
---
|
||||
|
||||
# ChannelCodes
|
||||
|
||||
### **Purpose**
|
||||
This module defines the core interfaces for a channel codes management UI component within the DTS system. It establishes a standardized contract between the view, view model, and individual channel code entities, enabling consistent handling of both ISO-standard and user-defined channel codes. The module supports operations such as loading, editing, filtering, sorting, saving, and validating channel codes, while abstracting UI-specific concerns (e.g., paste handling, status indication) through well-defined interfaces.
|
||||
|
||||
---
|
||||
|
||||
### **Public Interface**
|
||||
|
||||
#### **`IChannelCodesListView`**
|
||||
- **Inherits**: `IBaseView`
|
||||
- **Description**: A marker interface representing the view layer for the channel codes list UI. No additional members beyond base view functionality.
|
||||
|
||||
#### **`IChannelCodesListViewModel`**
|
||||
- **Inherits**: `IBaseViewModel`
|
||||
- **Properties**:
|
||||
- `IChannelCodesListView View { get; set; }` — Reference to the associated view instance.
|
||||
- `ObservableCollection<IChannelCode> ISOChannelCodes { get; set; }` — Collection of ISO-standard channel codes.
|
||||
- `ObservableCollection<IChannelCode> UserChannelCodes { get; set; }` — Collection of user-defined channel codes.
|
||||
- `Func<IList<IChannelCode>> ChannelCodesFunc { get; }` — A delegate returning the full list of channel codes (likely used for persistence or validation).
|
||||
- `bool ShowISOStringBuilder { get; set; }` — Controls visibility of the ISO channel code builder UI.
|
||||
- `bool UniqueISOCodesRequired { get; set; }` — Enforces uniqueness constraint on ISO codes.
|
||||
- `bool ShowChannelCodeLookupHelper { get; set; }` — Toggles visibility of a lookup helper UI.
|
||||
- `bool IsReadOnly { get; set; }` — If `true`, disables editing operations.
|
||||
- `IChannelCode[] SelectedCodes { get; }` — Returns the currently selected channel codes.
|
||||
- **Methods**:
|
||||
- `void Unset()` — Cleans up view model state, likely detaching from the view.
|
||||
- `void SetPage(object page)` — Associates the view model with a specific UI page (e.g., for navigation context).
|
||||
- `void OnSetActive()` — Invoked when the view becomes active (e.g., on navigation to the page).
|
||||
- `bool Save()` — Persists changes to the channel codes; returns `true` on success.
|
||||
- `bool Validate(bool bDisplayWindow)` — Validates the channel codes; if `bDisplayWindow` is `true`, shows validation errors in a dialog.
|
||||
- `void CopySelected()` — Copies selected channel codes to the clipboard.
|
||||
- `void DeleteSelected()` — Deletes the selected channel codes.
|
||||
- `void Filter(object columnTag, string searchTerm)` — Filters the displayed codes by `searchTerm` on the column identified by `columnTag`.
|
||||
- `void Sort(object columnTag, bool bColumnClick)` — Sorts the displayed codes by the column identified by `columnTag`; `bColumnClick` indicates if triggered by user column click.
|
||||
|
||||
#### **`IChannelCode`**
|
||||
- **Properties**:
|
||||
- `int Id { get; }` — Database identifier of the channel code.
|
||||
- `string Code { get; set; }` — The code value (ISO or user-defined).
|
||||
- `string Name { get; set; }` — Human-readable name for the channel code.
|
||||
- `ChannelEnumsAndConstants.ChannelCodeType CodeType { get; }` — Indicates whether the code is `ISO` or `USER` (from `DTS.Common.Enums.Channels`).
|
||||
- `ICommand PasteCommand { get; set; }` — Command invoked when pasting multi-row data (e.g., CSV) into a field.
|
||||
- `UIItemStatus ItemStatus { get; set; }` — UI status (e.g., success, error) for the item.
|
||||
|
||||
---
|
||||
|
||||
### **Invariants**
|
||||
- `ISOChannelCodes` and `UserChannelCodes` are mutually exclusive collections (per `CodeType`).
|
||||
- If `UniqueISOCodesRequired` is `true`, duplicate `Code` values in `ISOChannelCodes` must be rejected during validation or save.
|
||||
- `IsReadOnly` mode must prevent modification of `Code`, `Name`, and deletion/copy operations (though `CopySelected` may still be allowed depending on implementation).
|
||||
- `SelectedCodes` must reflect the current selection state in the view at all times.
|
||||
- `ChannelCodesFunc` must return a consistent, up-to-date list of all channel codes (both ISO and user) when invoked.
|
||||
|
||||
---
|
||||
|
||||
### **Dependencies**
|
||||
- **Internal Dependencies**:
|
||||
- `DTS.Common.Base` (provides `IBaseView`, `IBaseViewModel`).
|
||||
- `DTS.Common.Enums` (provides `UIItemStatus`, `ChannelEnumsAndConstants.ChannelCodeType`).
|
||||
- **External Dependencies**:
|
||||
- WPF (`System.Windows.Input.ICommand`, `ObservableCollection<T>`).
|
||||
- **Depended Upon By**:
|
||||
- UI layers implementing `IChannelCodesListView` (e.g., XAML views).
|
||||
- View model implementations for channel codes management (e.g., `ChannelCodesListViewModel`).
|
||||
- Persistence or domain services that consume `ChannelCodesFunc` to serialize or validate codes.
|
||||
|
||||
---
|
||||
|
||||
### **Gotchas**
|
||||
- **`PasteCommand` behavior is UI-specific**: While the interface exposes `PasteCommand`, the actual parsing logic for multi-row pastes (e.g., CSV) is not defined here and must be implemented by concrete types.
|
||||
- **`ChannelCodesFunc` is a delegate, not a property**: Its value may be lazily evaluated or change over time; callers should not cache its result.
|
||||
- **`ShowISOStringBuilder`, `ShowChannelCodeLookupHelper`, and `IsReadOnly` are mutable properties**: Their values may change at runtime, and implementations must react appropriately (e.g., re-enabling/disabling UI controls).
|
||||
- **`Validate` behavior depends on `bDisplayWindow`**: When `false`, validation may only return a boolean without user feedback—callers must handle error reporting if needed.
|
||||
- **No explicit thread-safety guarantees**: `ObservableCollection<T>` is not thread-safe; modifications to `ISOChannelCodes`/`UserChannelCodes` must occur on the UI thread.
|
||||
- **`SelectedCodes` is an array, not a collection**: Its contents may be stale if selection changes between calls; callers should use it immediately after selection operations.
|
||||
- **None identified from source alone.**
|
||||
@@ -0,0 +1,60 @@
|
||||
---
|
||||
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-16T02:20:12.180878+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "3a5d65945568970d"
|
||||
---
|
||||
|
||||
# CheckChannels
|
||||
|
||||
## Documentation: CheckChannels Module Interfaces
|
||||
|
||||
### 1. Purpose
|
||||
This module defines the core interface contracts for the *CheckChannels* feature within the application’s UI architecture. It establishes a separation of concerns between view and view model layers for both the main content area and its associated ribbon menu, following the MVVM pattern. The interfaces `ICheckChannelsView`, `ICheckChannelsViewModel`, `ICheckChannelsMenuView`, and `ICheckChannelsMenuViewModel` collectively enable modular UI composition—allowing implementations to be swapped or extended while adhering to a consistent contract for integration with the broader system.
|
||||
|
||||
### 2. Public Interface
|
||||
All interfaces are *marker interfaces* with no additional members declared. Their purpose is purely to categorize and type-check components within the UI framework.
|
||||
|
||||
- **`ICheckChannelsView`**
|
||||
*Signature:* `public interface ICheckChannelsView : IBaseView`
|
||||
*Behavior:* Serves as the contract for the view component responsible for displaying the primary CheckChannels UI content. Inherits from `IBaseView`, implying it participates in a base view lifecycle or infrastructure (e.g., initialization, data binding setup).
|
||||
|
||||
- **`ICheckChannelsViewModel`**
|
||||
*Signature:* `public interface ICheckChannelsViewModel : IBaseViewModel`
|
||||
*Behavior:* Serves as the contract for the view model backing `ICheckChannelsView`. Inherits from `IBaseViewModel`, indicating it likely exposes properties, commands, and state management for the main CheckChannels content.
|
||||
|
||||
- **`ICheckChannelsMenuView`**
|
||||
*Signature:* `public interface ICheckChannelsMenuView : IRibbonView`
|
||||
*Behavior:* Serves as the contract for the ribbon menu view associated with CheckChannels. Inherits from `IRibbonView`, implying integration with a ribbon-based UI control system (e.g., a tabbed toolbar with groups and buttons).
|
||||
|
||||
- **`ICheckChannelsMenuViewModel`**
|
||||
*Signature:* `public interface ICheckChannelsMenuViewModel : IRibbonViewModel`
|
||||
*Behavior:* Serves as the view model for `ICheckChannelsMenuView`. Inherits from `IRibbonViewModel`, indicating it manages ribbon-specific state (e.g., button visibility, command execution for ribbon items).
|
||||
|
||||
### 3. Invariants
|
||||
- All four interfaces are *purely marker interfaces*—they carry no additional properties, methods, or events beyond their base interface contracts.
|
||||
- `ICheckChannelsView` and `ICheckChannelsViewModel` must be used in conjunction (e.g., via dependency injection or view-model-first patterns) to form a valid view/view-model pair for the main content area.
|
||||
- Similarly, `ICheckChannelsMenuView` and `ICheckChannelsMenuViewModel` must be paired for the ribbon menu component.
|
||||
- Since they inherit from `IBaseView`, `IBaseViewModel`, `IRibbonView`, and `IRibbonViewModel` respectively, they inherit all invariants and contracts defined in those base interfaces (e.g., lifecycle events, binding requirements), though those are not detailed in this module’s source.
|
||||
|
||||
### 4. Dependencies
|
||||
- **Depends on:**
|
||||
- `DTS.Common.Base` namespace (for `IBaseView`, `IBaseViewModel`)
|
||||
- `DTS.Common.RibbonControl` namespace (for `IRibbonView`, `IRibbonViewModel`)
|
||||
- **Depended on by:**
|
||||
- UI framework components that resolve or validate view/view-model types by interface (e.g., a DI container, view factory, or navigation service).
|
||||
- Concrete implementations (not present in this source) for `ICheckChannelsView`, `ICheckChannelsViewModel`, `ICheckChannelsMenuView`, and `ICheckChannelsMenuViewModel`.
|
||||
- Likely consumed by modules responsible for UI composition (e.g., shell layout, ribbon registration, or module initialization logic in a modular application architecture).
|
||||
|
||||
### 5. Gotchas
|
||||
- **No behavior defined:** These interfaces convey *no operational semantics*—all functionality resides in their implementations. Developers must inspect concrete classes to understand actual behavior.
|
||||
- **Ambiguous scope:** The term “CheckChannels” is not defined here; its functional meaning (e.g., channel validation, configuration, monitoring) is external to this module.
|
||||
- **Inheritance chain opacity:** Since `IBaseView`, `IBaseViewModel`, `IRibbonView`, and `IRibbonViewModel` are defined elsewhere, their contracts (e.g., required properties like `DataContext`, event handlers, or initialization methods) must be referenced separately to fully understand the obligations of these interfaces.
|
||||
- **No versioning or deprecation markers:** No attributes (e.g., `[Obsolete]`) or versioning hints are present, suggesting these are stable but potentially low-level abstractions.
|
||||
|
||||
None identified from source alone beyond the above.
|
||||
@@ -0,0 +1,49 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.CommonCore/Interface/CheckTrigger/ICheckTriggerView.cs
|
||||
- Common/DTS.CommonCore/Interface/CheckTrigger/ICheckTriggerViewModel.cs
|
||||
generated_at: "2026-04-16T02:17:32.566868+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "b59a55831fe5a086"
|
||||
---
|
||||
|
||||
# CheckTrigger
|
||||
|
||||
## 1. Purpose
|
||||
This module defines the core interfaces for the *Check Trigger* feature within the DTS (likely *Data Tracking System*) architecture. It establishes the contract between the view and view model layers for components responsible for triggering and managing check operations—likely periodic or event-driven validation/sync tasks—within a MVVM (Model-View-ViewModel) pattern. The interfaces `ICheckTriggerView` and `ICheckTriggerViewModel` serve as base abstractions that concrete implementations must fulfill, enabling decoupled UI and business logic for check-triggering functionality.
|
||||
|
||||
## 2. Public Interface
|
||||
No public *functions*, *methods*, or *properties* are defined directly in these interfaces. Both interfaces are marker interfaces inheriting from base interfaces in the `DTS.Common.Base` namespace:
|
||||
|
||||
- **`ICheckTriggerView`**
|
||||
- *Signature*: `public interface ICheckTriggerView : IBaseView`
|
||||
- *Behavior*: Represents the view layer contract for a check-trigger UI component. It inherits from `IBaseView`, implying it adheres to a common view contract (e.g., lifecycle, binding context, or UI state management), but no additional API surface is exposed here.
|
||||
|
||||
- **`ICheckTriggerViewModel`**
|
||||
- *Signature*: `public interface ICheckTriggerViewModel : IBaseViewModel`
|
||||
- *Behavior*: Represents the view model layer contract for managing check-trigger state and logic. It inherits from `IBaseViewModel`, implying standard view model capabilities (e.g., property change notification, command handling), but no additional API surface is exposed here.
|
||||
|
||||
> **Note**: All meaningful behavior (e.g., commands, properties like `IsTriggerEnabled`, `LastCheckTime`) must be defined in concrete implementations or in `IBaseView`/`IBaseViewModel`. This file only declares the *type roles*.
|
||||
|
||||
## 3. Invariants
|
||||
- `ICheckTriggerView` must be implemented by a UI component (e.g., XAML view, control, or page) that participates in the check-trigger workflow.
|
||||
- `ICheckTriggerViewModel` must be implemented by a view model that coordinates check-trigger logic and binds to an `ICheckTriggerView`.
|
||||
- The pair (`ICheckTriggerView`, `ICheckTriggerViewModel`) must be used in a standard MVVM binding relationship (e.g., view sets its `BindingContext` to an instance of `ICheckTriggerViewModel`).
|
||||
- Both interfaces are *marker interfaces*—they carry no behavioral contract beyond their type identity and base inheritance.
|
||||
|
||||
## 4. Dependencies
|
||||
- **Depends on**:
|
||||
- `DTS.Common.Base` (specifically `IBaseView` and `IBaseViewModel`).
|
||||
- **Depended on by**:
|
||||
- Concrete view classes (e.g., `CheckTriggerPage : Page, ICheckTriggerView`) and view model classes (e.g., `CheckTriggerViewModel : ICheckTriggerViewModel`) in the UI layer.
|
||||
- Dependency injection or composition containers likely register types against these interfaces.
|
||||
- Other modules (e.g., `DTS.Common.Core.CheckTrigger`) likely consume these interfaces to bind or wire up check-trigger components.
|
||||
|
||||
## 5. Gotchas
|
||||
- **No behavior defined here**: Developers may mistakenly expect methods/properties in these interfaces; all logic resides in implementations or base interfaces.
|
||||
- **Ambiguity in `IBaseView`/`IBaseViewModel`**: Behavior of `ICheckTriggerView` and `ICheckTriggerViewModel` is entirely contingent on the contracts of `IBaseView` and `IBaseViewModel`, which are not provided here. Their semantics (e.g., required lifecycle methods, binding patterns) must be consulted separately.
|
||||
- **No versioning or extensibility signals**: The interfaces are empty—adding future functionality may require breaking changes or new derived interfaces (e.g., `ICheckTriggerView2`).
|
||||
- **Namespace reuse**: Both interfaces reside in `DTS.Common.Interface`, but no other types in this namespace are shown; ensure no naming conflicts exist with other `*Trigger` interfaces (e.g., `IScheduleTriggerView`).
|
||||
|
||||
None identified beyond the above.
|
||||
@@ -0,0 +1,103 @@
|
||||
---
|
||||
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-16T02:23:54.710439+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "c40d100ec97fea56"
|
||||
---
|
||||
|
||||
# Communication
|
||||
|
||||
### **Purpose**
|
||||
This module defines core interfaces for representing communication results, connected devices in a DAS (Data Acquisition System) network, and DAS-specific metadata. It serves as the foundational abstraction layer for device discovery, status monitoring, and communication state reporting—specifically supporting the auto-discovery and monitoring of DAS-connected hardware (e.g., SLICE6 devices connected to an SLICE6DB base station). These interfaces decouple communication logic from implementation details, enabling consistent handling of device properties, communication outcomes, and DAS-level state across the system.
|
||||
|
||||
---
|
||||
|
||||
### **Public Interface**
|
||||
|
||||
#### **`ICommunicationReport`**
|
||||
- **`object UserState { get; set; }`**
|
||||
A user-defined object for associating custom state with a communication operation (e.g., tracking request context or correlation ID).
|
||||
- **`CommunicationConstantsAndEnums.CommunicationResult Result { get; set; }`**
|
||||
The outcome of a communication operation (e.g., success, timeout, error). *Note: `CommunicationResult` is defined in an external enum namespace (`DTS.Common.Enums.Communication`), not included here.*
|
||||
- **`byte[] Data { get; set; }`**
|
||||
Raw payload data received or transmitted during the communication. May be `null` or empty depending on the operation type and result.
|
||||
|
||||
#### **`IDASConnectedDevice`**
|
||||
- **`HardwareTypes DeviceType { get; }`**
|
||||
The hardware type of the connected device (e.g., sensor, actuator), per the `HardwareTypes` enum (defined externally in `DTS.Common.Enums.Hardware`).
|
||||
- **`int Port { get; }`**
|
||||
Zero-based port index on the DAS to which the device is physically connected.
|
||||
- **`int SpotOnPort { get; }`**
|
||||
Zero-based position of the device on its port’s daisy chain (e.g., `0` = first device on the port).
|
||||
- **`PhysicalAddress PhysicalAddress { get; }`**
|
||||
The device’s MAC address (from `System.Net.NetworkInformation`).
|
||||
- **`string IPAddress { get; }`**
|
||||
The IPv4/IPv6 address assigned to the device (as a string).
|
||||
- **`string SerialNumber { get; }`**
|
||||
Unique hardware serial number of the device.
|
||||
- **`string Location { get; }`**
|
||||
Human-readable location descriptor (e.g., "Lab A, Rack 2").
|
||||
- **`string Version { get; }`**
|
||||
Firmware version string of the device.
|
||||
|
||||
#### **`ICommunication_DASInfo`**
|
||||
- **`IDASConnectedDevice[] ConnectedDevices { get; }`**
|
||||
Immutable array of devices currently connected to this DAS (read-only). *Currently only populated for SLICE6DB.*
|
||||
- **`void SetConnectedDevices(IDASConnectedDevice[] devices)`**
|
||||
Updates the `ConnectedDevices` array. Intended for internal use by DAS implementations during discovery.
|
||||
- **`string[] SerialNumbers { get; set; }`**
|
||||
Parallel array of serial numbers for connected devices (order matches `ConnectedDevices`).
|
||||
- **`string[] FirmwareVersions { get; set; }`**
|
||||
Parallel array of firmware versions for connected devices (order matches `ConnectedDevices`).
|
||||
- **`string StackSerialNumber(int devid)`**
|
||||
Returns the serial number of the device at index `devid` in the `ConnectedDevices` array. *Behavior for invalid `devid` is unspecified.*
|
||||
- **`DateTime? FirstUseDate { get; set; }`**
|
||||
Date of the device’s first operational use. `null` indicates the hardware has never been used since calibration. Only valid when `IsFirstUseDateSupported` is `true`.
|
||||
- **`bool IsFirstUseDateSupported { get; set; }`**
|
||||
Indicates whether the DAS hardware supports tracking first-use date (requires firmware/user-attribute storage and calibration support per ticket 15524).
|
||||
- **`bool IsStreamingSupported { get; set; }`**
|
||||
Indicates whether the DAS supports streaming data (e.g., via ticket 30429, controllable via the `DISABLE_STREAMING_FEATURE` system attribute).
|
||||
|
||||
---
|
||||
|
||||
### **Invariants**
|
||||
- **`ICommunicationReport`**:
|
||||
- `Data` may be `null` or non-empty only if `Result` indicates success or partial success (implementation-dependent).
|
||||
- `UserState` is not interpreted by the interface; its lifecycle is managed by the caller.
|
||||
- **`IDASConnectedDevice`**:
|
||||
- `Port` and `SpotOnPort` are zero-based indices.
|
||||
- `PhysicalAddress` is guaranteed non-null (as `PhysicalAddress` is a struct in .NET, but the interface implies it is initialized).
|
||||
- `SerialNumber`, `Location`, and `Version` are non-null strings (no explicit nullability annotation, but context implies required fields).
|
||||
- **`ICommunication_DASInfo`**:
|
||||
- `ConnectedDevices`, `SerialNumbers`, and `FirmwareVersions` must have identical lengths when populated.
|
||||
- `FirstUseDate` is only meaningful when `IsFirstUseDateSupported` is `true`; otherwise, it should be ignored.
|
||||
- `StackSerialNumber(devid)` assumes `devid` is a valid index into `ConnectedDevices`; out-of-bounds behavior is undefined.
|
||||
|
||||
---
|
||||
|
||||
### **Dependencies**
|
||||
- **External Dependencies**:
|
||||
- `DTS.Common.Enums.Communication.CommunicationResult` (for `ICommunicationReport.Result`)
|
||||
- `DTS.Common.Enums.Hardware.HardwareTypes` (for `IDASConnectedDevice.DeviceType`)
|
||||
- `System.Net.NetworkInformation.PhysicalAddress` (for `IDASConnectedDevice.PhysicalAddress`)
|
||||
- **Internal Dependencies**:
|
||||
- `ICommunication_DASInfo` is used by DAS implementations (e.g., SLICE6DB) to expose device metadata.
|
||||
- `IDASConnectedDevice` is consumed by higher-level discovery/monitoring logic (e.g., auto-discovery services).
|
||||
- **Consumers**:
|
||||
- Likely used by DAS-specific communication layers (e.g., `DASCommunicationManager`) and device monitoring services.
|
||||
- `ICommunicationReport` is probably returned by asynchronous communication operations (e.g., `SendAsync`, `ReceiveAsync`).
|
||||
|
||||
---
|
||||
|
||||
### **Gotchas**
|
||||
- **`StackSerialNumber(int devid)`**: No validation or exception behavior is specified for invalid `devid` (e.g., negative or ≥ `ConnectedDevices.Length`). Implementations may throw `ArgumentOutOfRangeException` or return `null`—behavior is implementation-defined.
|
||||
- **`ConnectedDevices` mutability**: While `ConnectedDevices` is read-only (`get` only), `SetConnectedDevices()` allows external mutation. Callers must ensure thread-safety if used concurrently.
|
||||
- **`FirstUseDate` semantics**: A `null` value does *not* imply "never calibrated"—it means "never used since calibration." A calibrated but unused device may still have `FirstUseDate == null`.
|
||||
- **`IsStreamingSupported`**: Support is hardware/firmware-dependent and may be toggled via system attributes (e.g., `DISABLE_STREAMING_FEATURE`). The interface does not enforce consistency with actual runtime streaming capability.
|
||||
- **No error details**: `ICommunicationReport` lacks error codes, messages, or stack traces—only a high-level `Result` enum. Debugging requires correlating with logs or `UserState`.
|
||||
- **Missing nullability annotations**: Properties like `Data`, `SerialNumber`, and `IPAddress` lack `?` for nullability despite potential `null` values in practice. This may cause confusion in nullable-enabled contexts.
|
||||
- **No versioning guarantees**: Arrays (`SerialNumbers`, `FirmwareVersions`) are parallel to `ConnectedDevices` but have no explicit synchronization mechanism—out-of-sync arrays could occur if `SetConnectedDevices` is called without updating these arrays.
|
||||
@@ -0,0 +1,109 @@
|
||||
---
|
||||
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-16T02:22:29.046640+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "9dfaf004748c958d"
|
||||
---
|
||||
|
||||
# Documentation: View and ViewModel Interfaces for Assembly/Tile/Group Hierarchies
|
||||
|
||||
---
|
||||
|
||||
## 1. Purpose
|
||||
|
||||
This module defines a set of interfaces that establish a consistent MVVM (Model-View-ViewModel) pattern for hierarchical UI components representing assemblies, tiles, and groups. It provides abstract contracts for *view* interfaces (`I*View`) and *view model* interfaces (`I*ViewModel`) across two distinct namespace hierarchies (`DTS.Common.Interface` and `DataPro.Common.Interface`), likely supporting different UI frameworks or product lines. The interfaces enable decoupling of UI rendering logic (views) from data presentation logic (view models), with view models exposing strongly-typed references to their associated views and managing collections of child items (e.g., `AssemblyList`, `GroupList`). The structure supports nested groupings—e.g., a list of groups, each group containing assemblies or tiles.
|
||||
|
||||
---
|
||||
|
||||
## 2. Public Interface
|
||||
|
||||
### View Interfaces (All inherit `IBaseView`)
|
||||
|
||||
| Interface | Namespace | Description |
|
||||
|---------|-----------|-------------|
|
||||
| `IAssemblyView` | `DTS.Common.Interface` | Marker interface for views displaying a single assembly. |
|
||||
| `IAssemblyListView` | `DTS.Common.Interface` | Marker interface for views displaying a list of assembly groups. |
|
||||
| `ITileView` | `DataPro.Common.Interface` | Marker interface for views displaying a single tile. |
|
||||
| `IGroupView` | `DataPro.Common.Interface` | Marker interface for views displaying a single group. |
|
||||
| `ITileListView` | `DataPro.Common.Interface` | Marker interface for views displaying a list of tile groups. |
|
||||
| `IGroupListView` | `DataPro.Common.Interface` | Marker interface for views displaying a list of groups. |
|
||||
|
||||
> **Note**: All view interfaces are *empty* (no members beyond inheritance). They serve as type-safe markers to associate view models with concrete view implementations.
|
||||
|
||||
### ViewModel Interfaces (All inherit `IBaseViewModel`)
|
||||
|
||||
| Interface | Namespace | Key Members | Description |
|
||||
|---------|-----------|-------------|-------------|
|
||||
| `IAssemblyViewModel` | `DTS.Common.Interface` | `IAssemblyView View { get; set; }`<br>`string GroupName { get; set; }`<br>`List<AssemblyNameImage> AssemblyList { get; set; }` | Represents a single assembly group’s data and behavior. Contains a list of `AssemblyNameImage` items. |
|
||||
| `IAssemblyListViewModel` | `DTS.Common.Interface` | `IMainViewModel Parent { get; set; }`<br>`IAssemblyListView View { get; set; }`<br>`List<IAssemblyView> GroupList { get; set; }` | Represents a list of assembly groups. Holds references to child `IAssemblyView`s (not view models). |
|
||||
| `ITileViewModel` | `DataPro.Common.Interface` | `ITileView View { get; set; }`<br>`string GroupName { get; set; }`<br>`List<AssemblyNameImage> AssemblyList { get; set; }` | Represents a single tile group’s data. Structurally identical to `IAssemblyViewModel`. |
|
||||
| `IGroupViewModel` | `DataPro.Common.Interface` | `IGroupView View { get; set; }`<br>`string GroupName { get; set; }`<br>`List<AssemblyNameImage> AssemblyList { get; set; }` | Represents a single group’s data. Structurally identical to `IAssemblyViewModel`. |
|
||||
| `ITileListViewModel` | `DataPro.Common.Interface` | `IMainViewModel Parent { get; set; }`<br>`ITileListView View { get; set; }`<br>`List<ITileView> GroupList { get; set; }` | Represents a list of tile groups. Holds references to child `ITileView`s. |
|
||||
| `IGroupListViewModel` | `DataPro.Common.Interface` | `IMainViewModel Parent { get; set; }`<br>`IGroupListView View { get; set; }`<br>`List<IGroupView> GroupList { get; set; }` | Represents a list of groups. Holds references to child `IGroupView`s. |
|
||||
|
||||
> **Note**:
|
||||
> - `AssemblyNameImage` is used in multiple view models but is not defined in this source set; its definition must be found elsewhere.
|
||||
> - `IMainViewModel` is referenced as a parent but not defined here.
|
||||
> - `List<T>` is used for collections (not `ObservableCollection<T>`), despite `System.Collections.ObjectModel` being imported in some files.
|
||||
|
||||
---
|
||||
|
||||
## 3. Invariants
|
||||
|
||||
- **View-ViewModel Pairing**: Each `I*ViewModel` interface declares a `View` property typed to its corresponding `I*View` interface (e.g., `IAssemblyViewModel` ↔ `IAssemblyView`). This implies a strict 1:1 pairing between view and view model.
|
||||
- **Hierarchical Consistency**:
|
||||
- `IAssemblyListViewModel.GroupList` holds `IAssemblyView` instances (not `IAssemblyViewModel`), suggesting the list is view-centric.
|
||||
- Conversely, `IAssemblyViewModel.AssemblyList` holds `AssemblyNameImage` objects, indicating data content.
|
||||
- The same pattern holds for `Tile` and `Group` variants.
|
||||
- **Namespace Separation**: Two disjoint sets of interfaces exist:
|
||||
- `DTS.*` namespace for *Assembly*-centric components.
|
||||
- `DataPro.*` namespace for *Tile/Group*-centric components.
|
||||
This suggests parallel UI architectures for different subsystems or product lines.
|
||||
- **No Validation Rules**: No explicit validation or constraint logic is present in the interfaces themselves.
|
||||
|
||||
---
|
||||
|
||||
## 4. Dependencies
|
||||
|
||||
### Internal Dependencies (from imports)
|
||||
- `DTS.Common.Base` → Defines `IBaseView` and `IBaseViewModel` (not included here).
|
||||
- `DataPro.Common.Base` → Defines `IBaseView` and `IBaseViewModel` (not included here).
|
||||
- `System.Collections.Generic`, `System.Collections.ObjectModel`, `System.Reflection` → Standard .NET collections and reflection APIs.
|
||||
|
||||
### External Dependencies (inferred)
|
||||
- **Consumers**: Any UI layer (e.g., WPF, WinForms, or custom framework) implementing MVVM must implement these interfaces to bind views and view models.
|
||||
- **Dependents**: Concrete implementations of these interfaces (e.g., `AssemblyViewModel : IAssemblyViewModel`) will depend on:
|
||||
- `AssemblyNameImage` type (for `AssemblyList`)
|
||||
- `IMainViewModel` (for `Parent` reference)
|
||||
- Concrete view classes implementing `I*View` interfaces.
|
||||
|
||||
---
|
||||
|
||||
## 5. Gotchas
|
||||
|
||||
- **Namespace Splitting**: The duplication of nearly identical interfaces across `DTS.Common.Interface` and `DataPro.Common.Interface` (e.g., `IAssemblyViewModel` vs. `ITileViewModel`) suggests legacy or parallel development paths. Developers must ensure correct namespace usage to avoid type conflicts or accidental mixing of subsystems.
|
||||
- **View vs. ViewModel Collections**:
|
||||
- `IAssemblyListViewModel.GroupList` stores `IAssemblyView` (not `IAssemblyViewModel`).
|
||||
- This implies the *view layer* is responsible for managing child view instances, which is unconventional in MVVM (typically, view models manage child view models). This may indicate a design where views are composed manually or via a custom framework.
|
||||
- **Missing Collection Type Consistency**:
|
||||
- `ITileViewModel` and `IGroupViewModel` import `System.Collections.ObjectModel` but use `List<T>` for `AssemblyList`. If observable notifications are needed, `ObservableCollection<T>` would be expected—this mismatch may cause issues if data binding relies on change notifications.
|
||||
- **No Method Signatures**: All interfaces are property-only. Behavior (e.g., initialization, command binding) must be defined in base interfaces (`IBaseViewModel`, `IBaseView`) or concrete implementations.
|
||||
- **Ambiguous `GroupName` Semantics**: The `GroupName` property appears in `IAssemblyViewModel`, `ITileViewModel`, and `IGroupViewModel`, but its meaning is unclear:
|
||||
- Is it the *name of the group containing the assemblies/tiles*?
|
||||
- Or the *name of the assembly/tile itself*?
|
||||
Context from `AssemblyList` suggests the former, but this is not explicit.
|
||||
|
||||
> **None identified from source alone** for other areas (e.g., thread safety, lifecycle, nullability), as these are not specified in the interfaces.
|
||||
@@ -0,0 +1,121 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.CommonCore/Interface/Connection/IConnection.cs
|
||||
generated_at: "2026-04-16T02:19:32.551940+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "a6aead5143a016b8"
|
||||
---
|
||||
|
||||
# Connection
|
||||
|
||||
## Documentation: `IConnection` Interface
|
||||
|
||||
### 1. Purpose
|
||||
The `IConnection` interface defines a standardized abstraction for network connection management within the DTS system, supporting both synchronous and asynchronous send/receive operations, connection lifecycle control (including soft disconnect/reconnect semantics), and socket-level configuration. It serves as the foundational contract for all connection implementations (e.g., TCP, UDP, custom transports), enabling decoupled communication logic across the system while preserving consistent behavior for connection state, data transfer, and error handling.
|
||||
|
||||
### 2. Public Interface
|
||||
|
||||
- **`Task<int> SendAsync(byte[] sendBuffer, int bufferStartOffset, int bufferSizeToSend)`**
|
||||
Asynchronously sends data from `sendBuffer`, starting at `bufferStartOffset`, for `bufferSizeToSend` bytes. Returns the number of bytes sent.
|
||||
|
||||
- **`bool IsSoftDisconnected { get; }`**
|
||||
Indicates whether the connection is in a *soft disconnected* state—i.e., previously connected, then voluntarily disconnected with the expectation of reconnection.
|
||||
|
||||
- **`void SoftDisconnect()`**
|
||||
Voluntarily disconnects the connection *without* fully closing underlying resources, preserving state for later reconnection.
|
||||
|
||||
- **`void SoftConnect()`**
|
||||
Re-establishes a connection previously soft-disconnected, restoring communication capability.
|
||||
|
||||
- **`System.Net.Sockets.SocketFlags Flags { get; set; }`**
|
||||
Gets or sets the socket flags used for send/receive operations (e.g., `DontRoute`, `OutOfBand`).
|
||||
|
||||
- **`event EventHandler OnDisconnected`**
|
||||
Raised when the connection is fully disconnected (not soft-disconnected).
|
||||
|
||||
- **`void KeepAliveErrorReceived()`**
|
||||
Explicitly signals that a keep-alive timeout/error occurred (e.g., no timely response received). Implementation likely triggers disconnection or retry logic.
|
||||
|
||||
- **`string ConnectString { get; }`**
|
||||
Returns the connection string used to establish the connection (e.g., `"tcp://192.168.1.10:5000"`).
|
||||
|
||||
- **`bool Connected { get; }`**
|
||||
Indicates whether the connection is currently active (i.e., not disconnected or soft-disconnected).
|
||||
|
||||
- **`void Create(string connectString)`**
|
||||
Initializes the connection using the provided `connectString`.
|
||||
|
||||
- **`void Create(string connectString, string hostIPAddress)`**
|
||||
Initializes the connection using `connectString` and an explicit `hostIPAddress` (likely for override or validation).
|
||||
|
||||
- **`string GetConnectionData()`**
|
||||
Returns diagnostic or metadata information about the current connection state (e.g., remote endpoint, protocol details).
|
||||
|
||||
- **`IAsyncResult BeginConnect(AsyncCallback callback, object callbackObject)`**
|
||||
Initiates an asynchronous connection attempt.
|
||||
|
||||
- **`void EndConnect(IAsyncResult ar)`**
|
||||
Completes an asynchronous connection attempt.
|
||||
|
||||
- **`IAsyncResult BeginDisconnect(bool reuseSocket, AsyncCallback callback, object state)`**
|
||||
Initiates an asynchronous disconnection. If `reuseSocket` is `true`, the underlying socket may be reused.
|
||||
|
||||
- **`void EndDisconnect(IAsyncResult asyncResult)`**
|
||||
Completes an asynchronous disconnection.
|
||||
|
||||
- **`IAsyncResult BeginAccept(AsyncCallback callback, object state)`**
|
||||
Initiates an asynchronous accept operation (for server-side connections).
|
||||
|
||||
- **`IConnection EndAccept(IAsyncResult asyncResult)`**
|
||||
Completes an asynchronous accept operation and returns a new `IConnection` representing the accepted client connection.
|
||||
|
||||
- **`void Bind(int port)`**
|
||||
Binds the connection to a local port (typically used for server-side listening).
|
||||
|
||||
- **`void Listen(int backlog)`**
|
||||
Begins listening for incoming connections with the specified `backlog` queue size.
|
||||
|
||||
- **`IAsyncResult BeginSend(byte[] sendBuffer, int bufferStartOffset, int bufferSizeToSend, AsyncCallback callback, object callbackObject)`**
|
||||
Initiates an asynchronous send operation.
|
||||
|
||||
- **`int EndSend(IAsyncResult ar)`**
|
||||
Completes an asynchronous send operation and returns the number of bytes sent.
|
||||
|
||||
- **`IAsyncResult BeginReceive(byte[] receiveBuffer, int bufferStartOffset, int maxSizeToReceive, AsyncCallback callback, object state)`**
|
||||
Initiates an asynchronous receive operation.
|
||||
|
||||
- **`int EndReceive(IAsyncResult ar)`**
|
||||
Completes an asynchronous receive operation and returns the number of bytes received.
|
||||
|
||||
> **Note**: Two methods—`GetCurrentUploadRate()` and `GetCurrentDownloadRate()`—are commented out and not part of the active interface.
|
||||
|
||||
### 3. Invariants
|
||||
- `Connected` must be `true` only when the underlying socket is actively connected (excluding soft-disconnected state).
|
||||
- `IsSoftDisconnected` must be `true` only after `SoftDisconnect()` is called and before `SoftConnect()` is called.
|
||||
- `OnDisconnected` must be raised only when the connection transitions to a *non-recoverable* (hard) disconnect state, not during soft disconnects.
|
||||
- `SendAsync`, `BeginSend`, `EndSend`, `BeginReceive`, `EndReceive` must only be invoked when `Connected` is `true` (behavior on violation is undefined per interface—implementation-dependent).
|
||||
- `SoftConnect()` must succeed only if `IsSoftDisconnected` is `true`.
|
||||
- `Flags` must be applied consistently to all socket operations (send/receive/connect/accept).
|
||||
- `KeepAliveErrorReceived()` must be called only when a keep-alive failure is detected (e.g., timeout without response).
|
||||
|
||||
### 4. Dependencies
|
||||
- **Depends on**:
|
||||
- `System` (core types: `Task`, `EventHandler`, `IAsyncResult`, `AsyncCallback`, `object`)
|
||||
- `System.Threading.Tasks` (for `Task<int>`)
|
||||
- `System.Net.Sockets` (for `SocketFlags`)
|
||||
- **Implemented by**: Concrete connection classes (e.g., `TcpConnection`, `UdpConnection`)—not visible in this file but implied by usage.
|
||||
- **Used by**: Higher-level components requiring network communication (e.g., protocol handlers, device managers, session controllers).
|
||||
- **No direct dependency on other DTS modules** is visible in this interface, though `ConnectString` format and `GetConnectionData()` output likely conform to internal conventions.
|
||||
|
||||
### 5. Gotchas
|
||||
- **Soft vs. Hard Disconnect**: `SoftDisconnect()` does *not* raise `OnDisconnected`; only full disconnections do. Confusing these can lead to incorrect state management.
|
||||
- **`Connected` vs. `IsSoftDisconnected`**: `Connected` is `false` when `IsSoftDisconnected` is `true`. Code must check both states explicitly if distinguishing soft-disconnect is required.
|
||||
- **`BeginAccept`/`EndAccept`**: Returns a *new* `IConnection` instance—consumers must manage its lifecycle (including disposal).
|
||||
- **`reuseSocket` in `BeginDisconnect`**: If `true`, the socket may be reused; if `false`, it may be closed. Behavior depends on implementation.
|
||||
- **No rate-limiting API**: The commented-out `GetCurrentUploadRate()`/`GetCurrentDownloadRate()` suggest rate monitoring was considered but not implemented—do not assume rate data is available.
|
||||
- **`Create` overloads**: The two `Create` methods differ only by `hostIPAddress`; the purpose of the second parameter is unclear without implementation—likely for override or validation.
|
||||
- **No timeout parameters**: All async operations lack explicit timeout configuration—timeouts are likely handled internally or via `KeepAliveErrorReceived()`.
|
||||
- **No exception contract**: The interface does not specify exceptions (e.g., `ObjectDisposedException` after `SoftDisconnect`/`SoftConnect`), leaving error handling implementation-defined.
|
||||
|
||||
None identified beyond those above.
|
||||
@@ -0,0 +1,86 @@
|
||||
---
|
||||
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-16T02:18:35.414312+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "d441dada7c96f903"
|
||||
---
|
||||
|
||||
# CustomChannels
|
||||
|
||||
## Documentation: Custom Channels Module
|
||||
|
||||
### 1. Purpose
|
||||
This module defines the core interfaces for a *Custom Channels* feature, enabling users to manage user-defined channel configurations through import/export workflows. It provides a separation of concerns between view layers (`ICustomChannelsView`, `ICustomChannelsImportView`, `ICustomChannelsExportView`), data models (`ICustomChannelModel`), and view-model logic (`ICustomChannelsViewModel`). The module serves as the contract layer for a UI-driven workflow where users can select, import from files, export to files, and toggle inclusion status of custom channels—likely in a data acquisition, signal processing, or configuration context.
|
||||
|
||||
### 2. Public Interface
|
||||
|
||||
#### Interfaces
|
||||
- **`ICustomChannelsView`**
|
||||
*Namespace:* `DTS.Common.Interface`
|
||||
*Inherits:* `IBaseView`
|
||||
*Description:* Marker interface for the main custom channels view. No additional members beyond base view contract.
|
||||
|
||||
- **`ICustomChannelsExportView`**
|
||||
*Namespace:* `DTS.Common.Interface.CustomChannels`
|
||||
*Inherits:* `IBaseView`
|
||||
*Description:* Marker interface for the export-specific view component.
|
||||
|
||||
- **`ICustomChannelsImportView`**
|
||||
*Namespace:* `DTS.Common.Interface.CustomChannels`
|
||||
*Inherits:* `IBaseView`
|
||||
*Description:* Marker interface for the import-specific view component.
|
||||
|
||||
- **`ICustomChannelModel`**
|
||||
*Namespace:* `DTS.Common.Interface.CustomChannels`
|
||||
*Properties:*
|
||||
- `string Name { get; }` — Immutable identifier/name of the custom channel.
|
||||
- `bool Included { get; set; }` — Read-write flag indicating whether the channel is included in current operations (e.g., import/export).
|
||||
|
||||
- **`ICustomChannelsViewModel`**
|
||||
*Namespace:* `DTS.Common.Interface.CustomChannels`
|
||||
*Inherits:* `IBaseViewModel`
|
||||
*Properties:*
|
||||
- `ICustomChannelsImportView ImportView { get; set; }` — Reference to the import view instance.
|
||||
- `ICustomChannelsExportView ExportView { get; set; }` — Reference to the export view instance.
|
||||
- `string ExportFileName { get; set; }` — Path/filename for export operations.
|
||||
- `string ImportFileName { get; set; }` — Path/filename for import operations.
|
||||
- `ObservableCollection<ICustomChannelModel> AllCustomChannels { get; }` — Collection of all available custom channel models; bound to UI for selection.
|
||||
*Methods:*
|
||||
- `void Unset()` — Likely clears references or resets state (e.g., view bindings).
|
||||
- `void OnSetActive(bool bImport)` — Activates the view for either import (`bImport == true`) or export (`bImport == false`) mode.
|
||||
- `void ReadImportFile()` — Reads and parses the file specified in `ImportFileName`, populating `AllCustomChannels`.
|
||||
- `void SelectAll()` — Sets `Included = true` for all items in `AllCustomChannels`.
|
||||
- `void ClearSelection()` — Sets `Included = false` for all items in `AllCustomChannels`.
|
||||
- `void Export()` — Executes export of selected (included) channels to `ExportFileName`.
|
||||
- `void Import()` — Executes import of selected (included) channels from `ImportFileName`.
|
||||
|
||||
### 3. Invariants
|
||||
- `AllCustomChannels` is an `ObservableCollection<ICustomChannelModel>`—UI must be notified of changes via collection change events.
|
||||
- `Included` property on each `ICustomChannelModel` is mutable and controls inclusion state for import/export operations.
|
||||
- `ImportFileName` and `ExportFileName` must be set *before* calling `ReadImportFile()`, `Import()`, or `Export()`; otherwise, behavior is undefined.
|
||||
- `OnSetActive(bool)` must be called to switch between import/export modes before invoking import/export operations.
|
||||
- `Unset()` is expected to be called during view lifecycle teardown (e.g., view disposal), though exact semantics are not specified beyond resetting state.
|
||||
|
||||
### 4. Dependencies
|
||||
- **Depends on:**
|
||||
- `DTS.Common.Base` (specifically `IBaseView`, `IBaseViewModel`)
|
||||
- `System.Collections.ObjectModel` (for `ObservableCollection<T>`)
|
||||
- **Depended on by (inferred):**
|
||||
- UI layers (e.g., WPF/WinForms views) implementing `ICustomChannelsView`, `ICustomChannelsImportView`, `ICustomChannelsExportView`.
|
||||
- View-model implementations (e.g., concrete `ICustomChannelsViewModel` classes) that consume file I/O, channel parsing, and export logic.
|
||||
- Likely used by a higher-level controller or shell module that orchestrates custom channel workflows.
|
||||
|
||||
### 5. Gotchas
|
||||
- **No file format specification**: The interfaces do not define the expected format for import/export files—implementation details (e.g., CSV, XML, JSON) are not visible here.
|
||||
- **Ambiguous `ReadImportFile()` semantics**: Does it *replace* `AllCustomChannels`, *append*, or *merge*? The interface does not clarify.
|
||||
- **No error handling in interface**: Methods like `Import()`, `Export()`, and `ReadImportFile()` have no declared exception behavior—consumers must infer or document error paths separately.
|
||||
- **`Unset()` is underspecified**: Its purpose (e.g., nulling view references, clearing collections) is not defined.
|
||||
- **No validation on `Name` or `Included`**: No constraints on `Name` (e.g., null/empty rules) or `Included` default value are specified.
|
||||
- **No thread-safety guarantees**: `ObservableCollection<T>` is not thread-safe; concurrent access (e.g., async import) may require synchronization.
|
||||
- **None identified from source alone** for file I/O behavior, error handling, and lifecycle management—these require implementation context.
|
||||
@@ -0,0 +1,47 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.CommonCore/Interface/CustomerDetails/ICustomerDetailsView.cs
|
||||
- Common/DTS.CommonCore/Interface/CustomerDetails/ICustomerDetailsViewModel.cs
|
||||
generated_at: "2026-04-16T02:25:10.730477+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "b07af412c78e07b1"
|
||||
---
|
||||
|
||||
# CustomerDetails
|
||||
|
||||
## 1. Purpose
|
||||
This module defines the foundational interfaces for the customer details view layer within the DTS Common Core library. Specifically, it establishes `ICustomerDetailsView` and `ICustomerDetailsViewModel` as contract interfaces that enable separation of concerns between UI presentation (view) and business logic/data binding (view model) in a MVVM (Model-View-ViewModel) architecture. These interfaces extend base abstractions (`IBaseView` and `IBaseViewModel`) to provide type-safe, extensible hooks for customer-specific UI components without prescribing implementation details—allowing platform-specific or feature-specific consumers to implement or consume them consistently.
|
||||
|
||||
## 2. Public Interface
|
||||
- **`ICustomerDetailsView`**
|
||||
```csharp
|
||||
public interface ICustomerDetailsView : IBaseView
|
||||
```
|
||||
Represents the view layer for customer details UI. It inherits from `IBaseView`, implying it adheres to a common base contract for all views (e.g., lifecycle events, navigation participation, or platform-specific view behaviors), though the exact members of `IBaseView` are not visible in this source. No additional members are declared here.
|
||||
|
||||
- **`ICustomerDetailsViewModel`**
|
||||
```csharp
|
||||
public interface ICustomerDetailsViewModel : IBaseViewModel
|
||||
```
|
||||
Represents the view model layer for customer details. It inherits from `IBaseViewModel`, implying it conforms to a shared base contract for view models (e.g., property change notification, command handling, or state management), though the concrete members of `IBaseViewModel` are not visible here. No additional members are declared here.
|
||||
|
||||
## 3. Invariants
|
||||
- Both interfaces are *marker interfaces*—they carry no explicit members and serve only to categorize types within the type hierarchy.
|
||||
- `ICustomerDetailsView` must be implemented by types that serve as the *view* for customer details functionality.
|
||||
- `ICustomerDetailsViewModel` must be implemented by types that serve as the *view model* for customer details functionality.
|
||||
- Neither interface defines runtime guarantees beyond those inherited from `IBaseView`/`IBaseViewModel`. Any invariants (e.g., thread-safety, initialization order, data validity) are assumed to be defined in the base interfaces or by consumers of these interfaces.
|
||||
|
||||
## 4. Dependencies
|
||||
- **Internal dependencies**:
|
||||
- `DTS.Common.Base` namespace (specifically `IBaseView` and `IBaseViewModel`), implying a shared base layer for UI abstractions.
|
||||
- **Consumers (inferred)**:
|
||||
- Any UI module or platform-specific project (e.g., WPF, MAUI, or Blazor) implementing or consuming customer details UI components.
|
||||
- Dependency injection containers or navigation frameworks that rely on these interfaces to resolve or bind view/view model pairs.
|
||||
- **No external dependencies** (e.g., no third-party libraries, database, or service references) are declared in this source.
|
||||
|
||||
## 5. Gotchas
|
||||
- **Ambiguity in base contracts**: Since `IBaseView` and `IBaseViewModel` are not defined in this source, their exact contract (methods, events, properties) is unknown. This may lead to confusion if consumers assume behaviors not present in the base interfaces.
|
||||
- **No explicit data contract**: Neither interface exposes properties (e.g., `Customer`, `IsLoading`) or commands (e.g., `SaveCommand`), so consumers must rely on implementation details or additional interfaces to define customer-specific data. This could indicate incomplete design or intentional minimalism for extensibility.
|
||||
- **Namespace co-location**: Both interfaces reside in `DTS.Common.Interface`, but the lack of a dedicated `CustomerDetails` sub-namespace for implementations (e.g., `DTS.Common.Interface.CustomerDetails`) may cause naming collisions or unclear ownership if more view/view model pairs are added later.
|
||||
- **None identified from source alone** regarding behavioral quirks, deprecations, or anti-patterns—only structural observations.
|
||||
@@ -0,0 +1,294 @@
|
||||
---
|
||||
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-16T02:25:03.434505+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "5d1420792c49604c"
|
||||
---
|
||||
|
||||
# DASFactory Interface Documentation
|
||||
|
||||
## 1. Purpose
|
||||
This module defines a set of C# interfaces that collectively represent the contract for interacting with Data Acquisition Systems (DAS) in the DASFactory subsystem. These interfaces abstract hardware-specific behaviors—such as configuration, diagnostics, real-time data streaming, arming, time synchronization, and communication transport—into a unified API layer. They enable decoupling of core business logic from hardware implementation details, supporting multiple DAS device types (e.g., SLICE, TDAS, g5, S6) and facilitating operations like device discovery, configuration, diagnostics, and data acquisition. The interfaces are designed to be consumed by higher-level services (e.g., `ConfigurationService`, `DiagnosticsService`, `DownloadService`) and are central to the factory pattern used for device management.
|
||||
|
||||
## 2. Public Interface
|
||||
|
||||
### Interfaces (No implementation classes provided; only interface definitions)
|
||||
|
||||
#### `IAutoArmed`
|
||||
- **Property**: `bool AutoArmed { get; set; }`
|
||||
Indicates whether the DAS unit is currently in an auto-armed state.
|
||||
|
||||
#### `ITiltSensorCalAware`
|
||||
- **Property**: `double[] TiltSensorCals { get; }`
|
||||
Provides calibration coefficients for tilt sensors (e.g., for converting raw ADC values to degrees).
|
||||
|
||||
#### `IRangeBandwidthLimited`
|
||||
- **Property**: `bool RangeBandwidthLimited { get; }`
|
||||
Indicates whether the DAS unit’s analog input range is constrained by bandwidth limitations.
|
||||
|
||||
#### `IAutoArmStatus`
|
||||
- **Property**: `DFConstantsAndEnums.CommandStatus AutoArmStatus { get; set; }`
|
||||
Represents the current status of the auto-arm command (e.g., pending, success, failure).
|
||||
|
||||
#### `ITimeSynchronization`
|
||||
- **Property**: `bool SupportsTimeSynchronization { get; }`
|
||||
Indicates whether the device supports time synchronization.
|
||||
- **Property**: `DateTime SystemBaseTime { get; }`
|
||||
Returns the base system time used for time-synchronized acquisition.
|
||||
|
||||
#### `IConnectedEthernetDevice`
|
||||
- **Property**: `string MACAddress { get; }`
|
||||
MAC address of the connected Ethernet device.
|
||||
- **Property**: `int Port { get; }`
|
||||
Port number on the parent device (e.g., SLICE6DB) to which this device is connected.
|
||||
- **Property**: `string SerialNumber { get; set; }`
|
||||
Serial number of the connected Ethernet device.
|
||||
|
||||
#### `IDASConfigurationArg`
|
||||
- **Property**: `IDASCommunication DAS { get; }`
|
||||
Reference to the DAS unit being configured.
|
||||
- **Property**: `bool BlankConfigurationRead { get; }`
|
||||
Indicates whether the configuration was read from a blank (uninitialized) configuration storage.
|
||||
- **Property**: `bool ConfigurationFailedValidation { get; }`
|
||||
Indicates whether the configuration failed validation during a configuration event.
|
||||
|
||||
#### `IRealTime`
|
||||
- **Property**: `List<int> RealtimeDASChannels { get; set; }`
|
||||
List of channel indices from which real-time data is streamed.
|
||||
- **Property**: `List<double> TiltAxisData { get; set; }`
|
||||
Tilt sensor axis data (X, Y, Z) in degrees for Slice6.
|
||||
- **Property**: `string UDPStreamAddress { get; }`
|
||||
UDP stream address for Slice6/Slice6A real-time data.
|
||||
|
||||
#### `IUDPQATSEntry`
|
||||
- **Properties**:
|
||||
- `string ResponseHostMac`, `ResponseClientMacAddress`, `SerialNumber`
|
||||
- `byte ArmState`, `ArmMode`, `Started`, `Triggered`, `FaultFlags`, `LegacyFaultFlags`
|
||||
- `uint SampleRate`, `ulong TotalSamples`, `CurrentSample`, `EventNumber`, `FaultSampleNumber`
|
||||
- `ulong EventTriggerSample`, `EstimateMaxSamples`
|
||||
- `short TiltSensorCh1`, `TiltSensorCh2`, `TiltSensorCh3`
|
||||
- `float InputVoltage`, `BackupVoltage`, `BatterySOC`, `SysTempC`
|
||||
- `byte SyncClockEnable`, `ADCExtClockSyncEnable`, `SyncClockStatus`, `ADCExtClockSyncStatus`
|
||||
- `float[] ChannelOffsetMV`, `ShuntDeviationPercent`
|
||||
- `DateTime Timestamp`
|
||||
Encapsulates a single UDP packet’s worth of QATS (Quick Arm/Trigger Status) telemetry data from a DAS unit.
|
||||
|
||||
#### `IDASFactory`
|
||||
- **Properties**:
|
||||
- `bool AllowSDBCommandPort { get; set; }`
|
||||
- `double S6ConnectNewTimeout { get; set; }`
|
||||
- `string[] SliceDBHostNames { get; set; }`
|
||||
- `string[] TDASHostNames { get; set; }`
|
||||
- `string[] TDASSerialPortNames { get; set; }`
|
||||
- `string TDASSerialRackSerialNumber { get; set; }`
|
||||
- `int MultiCastAutoDiscoveryDefaultTimeoutMS { get; set; }`
|
||||
- `string Language { get; set; }`
|
||||
- **Methods**:
|
||||
- `bool PingAll()`
|
||||
- `void TakeOwnership()`
|
||||
- `string[] GetConnectedDevices()`
|
||||
- `List<IDASCommunication> GetDASList()`
|
||||
- `List<IDASCommunication> GetSortedDASList()`
|
||||
- `List<ICommunication> GetDevList()`
|
||||
- `void DetachAllDevices(bool detachUSB = false)`
|
||||
- `void Refresh(ActionCompleteDelegate action)`
|
||||
- `SortableBindingList<IDiscoveredDevice> AutoDiscoverMulticast(bool discoverParents = true)`
|
||||
|
||||
#### `ICommunication`
|
||||
- **Properties**:
|
||||
- `IConnection Transport { get; set; }`
|
||||
- `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; }`
|
||||
- `bool ExecuteIsBusy { get; set; }`
|
||||
- `string ConnectString { get; }`
|
||||
- `bool Connected { get; }`
|
||||
- **Methods**:
|
||||
- `void SetupReader()`
|
||||
- `void InitMinProto()`
|
||||
- `bool IsCommandSupported(ProtocolLimitedCommands command)`
|
||||
- `byte GetMinProto(ProtocolLimitedCommands command)`
|
||||
- `void Connect(string ConnectString, CommunicationCallback Callback, object CallbackObject, int CallbackTimeout, string ipAddress)`
|
||||
- `void Disconnect(bool reuseSocket, CommunicationCallback Callback, object CallbackObject, int CallbackTimeout)`
|
||||
- `void Close(int Timeout)`
|
||||
- `void Flush(int Timeout)`
|
||||
- `void Execute(byte[] byteData, CommunicationCallback Callback, object CallbackObject, int CallbackTimeout)`
|
||||
- `void PseudoExecute(byte[] byteData, CommunicationCallback Callback, object CallbackObject, int CallbackTimeout)`
|
||||
- `byte[] SyncExecute(byte[] byteData, int Timeout)`
|
||||
- `void Cancel()`, `ForceCancel()`, `IsCanceled()`, `ClearCancel()`
|
||||
- `ManualResetEvent CancelEvent { get; }`
|
||||
- **Events**:
|
||||
- `event EventHandler OnDisconnected`
|
||||
|
||||
#### `IDiscoveredDevice`
|
||||
- **Properties**:
|
||||
- `string Serial { get; set; }`
|
||||
- `MultiCastDeviceClasses DevClass { get; set; }`
|
||||
- `string Mac { get; set; }`
|
||||
- `IDiscoveredDevice Parent { get; set; }`
|
||||
- `bool IsModule { get; set; }`
|
||||
- `int Port { get; set; }`
|
||||
- `int PositionOnDistributor { get; set; }`
|
||||
- `int PositionOnChain { get; set; }`
|
||||
- `bool Dhcp { get; set; }`
|
||||
- `string Ip`, `Subnet`, `Gateway`, `Dns`
|
||||
- `bool Connected { get; set; }`
|
||||
- `string ConnectedIp`, `ConnectedHost`
|
||||
- `ushort SystemId`, `string Location`
|
||||
- `string FirmwareVersion`, `BuildId`
|
||||
- `IConnectedEthernetDevice[] Connections { get; set; }`
|
||||
- **Methods**:
|
||||
- `bool IsParent(IDiscoveredDevice possibleChild)`
|
||||
- `int GetPort(IDiscoveredDevice device)`
|
||||
- `int GetSlot(IDiscoveredDevice child, Dictionary<string, IDiscoveredDevice> lookup)`
|
||||
- `int GetSlotOnPort(IDiscoveredDevice child, Dictionary<string, IDiscoveredDevice> lookup)`
|
||||
|
||||
#### `IAnalogInputDASChannel`
|
||||
- **Properties**:
|
||||
- `SensorConstants.BridgeType TypeOfBridge { get; set; }`
|
||||
- `SensorConstants.BridgeType[] SupportedBridges { get; set; }`
|
||||
- `DigitalInputModes[] SupportedDigitalInputModes { get; set; }`
|
||||
- `SensorConstants.CouplingModes CouplingMode { get; set; }`
|
||||
- `double BridgeResistanceOhms { get; set; }`
|
||||
- `double ZeroPoint { get; set; }`
|
||||
- `double SensorCapacityEU`, `SensorCapacity { get; set; }`
|
||||
- `string SensorPolarity { get; set; }`
|
||||
- `double DesiredRangeWithHeadroomEU { get; set; }`
|
||||
- `double SensitivityMilliVoltsPerEU { get; set; }`
|
||||
- `double SensitivityMilliVoltsPerEUNormalized { get; }`
|
||||
- `bool IsProportionalToExcitation { get; set; }`
|
||||
- `bool IsSupported(ExcitationVoltageOptions.ExcitationVoltageOption o)`
|
||||
- `bool IsInverted { get; set; }`
|
||||
- `string OriginalChannelName`, `ChannelName2 { get; set; }`
|
||||
- `string ChannelId`, `ChannelGroupName { get; set; }`
|
||||
- `string HardwareChannelName { get; set; }`
|
||||
- `string DIUnits { get; set; }`
|
||||
- `DigitalInputModes DigitalMode { get; set; }`
|
||||
- `LinearizationFormula LinearizationFormula { get; set; }`
|
||||
- `ExcitationVoltageOptions.ExcitationVoltageOption Excitation { get; set; }`
|
||||
- `ExcitationVoltageOptions.ExcitationVoltageOption[] SupportedExcitation { get; set; }`
|
||||
- `string EngineeringUnits { get; set; }`
|
||||
- `string SerialNumber`, `Manufacturer`, `Model`, `Description { get; set; }`
|
||||
- `ZeroMethodType ZeroMethod { get; set; }`
|
||||
- `double ZeroAverageStartSeconds`, `ZeroAverageStopSeconds { get; set; }`
|
||||
- `double InitialEU { get; set; }`
|
||||
- `string InitialOffset { get; set; }`
|
||||
- `bool Unipolar { get; set; }`
|
||||
- `bool ShuntIsEnabled { get; set; }`
|
||||
- `short ZeromVInADC { get; set; }`
|
||||
- `bool VoltageInsertionCheckEnabled { get; set; }`
|
||||
- `bool IEPEChannel`, `DigitalInputChannel`, `CalSignalIsEnabled { get; set; }`
|
||||
- `bool RemoveOffset`, `VerifyOffset { get; set; }`
|
||||
- `double OffsetToleranceLowMilliVolts`, `OffsetToleranceHighMilliVolts { get; set; }`
|
||||
- `DateTime LastCalibrationDate`, `CalDueDate { get; set; }`
|
||||
- `string ISOCode { get; set; }`
|
||||
- `bool BypassAAFilter { get; set; }`
|
||||
- `string SensorID { get; set; }`
|
||||
- `IDiagnosticResult Diagnostics { get; }`
|
||||
- `bool UpdateChannelFromDatabase { get; set; }`
|
||||
- `double? TriggerBelowThresholdEu`, `TriggerAboveThresholdEu { get; set; }`
|
||||
- `bool AlreadyLevelTriggered { get; set; }`
|
||||
- `double MeasuredEULevelTriggerCheck { get; set; }`
|
||||
- `double SoftwareFilterFrequency { get; set; }`
|
||||
- `IFilterClass SoftwareFilterClass { get; set; }`
|
||||
- `IDiagnosticResult DiagnosticInformation { get; }`
|
||||
- `double? MeasuredExcitationVolts`, `FactoryExcitationVolts { get; }`
|
||||
- `double ScalefactorMilliVoltsPerADC`, `ScalefactorEngineeringUnitsPerADC { get; set; }`
|
||||
- `double NoiseAsPercentOfFullScale { get; set; }`
|
||||
- `double UnsupersampledSampleRate { get; set; }`
|
||||
- `bool IsConfigured()`
|
||||
- **Methods**:
|
||||
- `void WriteElementEnd(XmlWriter writer)`
|
||||
- `void WriteXml(XmlWriter writer)`
|
||||
- `string GetSupportedExcitationSerialized()`
|
||||
- `string GetSupportedDigitalInputModesSerialized()`
|
||||
- `string GetSupportedBridgesSerialized()`
|
||||
- `void WriteXmlCRC32(XmlWriter writer)`
|
||||
|
||||
#### `IDASCommunication`
|
||||
- **Inherits from**: `IConfiguration`, `IDiagnos`, `ITriggerCheck`, `IRealTime`, `IArmStatus`, `IDownload`, `IInformation`, `IAutoArmStatus`, `IAutoArmed`, `IRangeBandwidthLimited`, `ITimeSynchronization`
|
||||
- **Properties**:
|
||||
- `ExcitationStatus ExcitationStatus { get; set; }`
|
||||
- `DateTime? FirstUseDate { get; set; }`
|
||||
- `bool IsFirstUseDateSupported { get; set; }`
|
||||
- `bool IsStreamingSupported { get; set; }`
|
||||
- `bool DiagnosticsHasBeenRun { get; set; }`
|
||||
- `bool ConfigureHasBeenRun { get; set; }`
|
||||
- `int RecordId { get; set; }`
|
||||
- `float InputLowVoltage`, `InputMediumVoltage`, `InputHighVoltage`
|
||||
- `float BatteryLowVoltage`, `BatteryMediumVoltage`, `BatteryHighVoltage`
|
||||
- `double MinimumValidInputVoltage`, `MaximumValidInputVoltage`
|
||||
- `double MinimumValidBatteryVoltage`, `MaximumValidBatteryVoltage`
|
||||
- `string SerialNumber { get; set; }`
|
||||
- `string FirmwareVersion { get; }`
|
||||
- `int MaxModules { get; set; }`
|
||||
- `bool InvertTrigger { set; }`
|
||||
- `bool InvertStart { get; set; }`
|
||||
- `bool IgnoreShortedStart`, `IgnoreShortedTrigger { get; set; }`
|
||||
- `string MACAddress { get; set; }`
|
||||
- `string[] DownstreamMACAddresses { get; set; }`
|
||||
- `bool SupportsIndividualChannelRealtimeStreaming { get; }`
|
||||
- **Methods**:
|
||||
- `void ReadFirstUseDate()`
|
||||
- `void SetIsStreamingSupported(bool supported = false)`
|
||||
- `bool ConnectionCheck()`
|
||||
- `HardwareTypes GetHardwareType()`
|
||||
- `double[] GetNominalRanges(SensorConstants.BridgeType bridge)`
|
||||
- `int NumberOfConfiguredChannels()`
|
||||
- `int NumberOfChannels()`
|
||||
- `long MaxMemory()`
|
||||
- `uint MinSampleRate()`
|
||||
- `uint MaxSampleRate(int numberOfConfiguredChannels)`
|
||||
- `uint MaxAAFilterRate()`
|
||||
- `bool SupportsAutoArm()`
|
||||
- `bool SupportsLevelTrigger()`
|
||||
- `bool SupportsRealtime()`
|
||||
- `bool SupportsMultipleEvents()`
|
||||
- `bool SupportsTriggerInversion()`
|
||||
- `bool SupportsStartInversion()`
|
||||
- `bool SupportsHardwareInputCheck()`
|
||||
- `bool SupportsMultipleSampleRealtime()`
|
||||
- `bool ControlsDAQ()`
|
||||
- `bool CheckAAF(float rate)`
|
||||
- `bool RequireDiagnosticRateMatchSampleRate()`
|
||||
- `ulong GetPhaseShiftSamples(uint ModuleIndex, double ActualSampleRate, uint HardwareAAF, ulong originalT0)`
|
||||
- `bool IsEthernetDistributor()`
|
||||
- `bool GetCanCheckArmStatus()`
|
||||
- `bool IsSlice6Distributor()`
|
||||
- `bool IsBattery()`
|
||||
- `bool IsTSRAIR()`
|
||||
- `bool IsSlice6Air()`
|
||||
|
||||
## 3. Invariants
|
||||
- **`IDASCommunication`** must implement all inherited interfaces (`IConfiguration`, `IDiagnos`, `ITriggerCheck`, `IRealTime`, `IArmStatus`, `IDownload`, `IInformation`, `IAutoArmStatus`, `IAutoArmed`, `IRangeBandwidthLimited`, `ITimeSynchronization`).
|
||||
- **`ICommunication`** must support `ConnectString`-based connection establishment and `Execute`/`SyncExecute` for command dispatch.
|
||||
- **`ICommunication.CancelEvent`** is a `ManualResetEvent` that signals cancellation state; `Cancel()` and `ForceCancel()` must set this event.
|
||||
- **`IDiscoveredDevice`** must accurately reflect physical topology (e.g., `Port`, `PositionOnChain`, `PositionOnDistributor`) for hierarchical devices like SLICE6DB.
|
||||
- **`IAnalogInputDASChannel`** must ensure `IsConfigured()` returns `true` only if `SerialNumber` is non-null/non-empty.
|
||||
- **`IDASCommunication`** must expose `FirmwareVersion` as read-only, while `SerialNumber` is read-write.
|
||||
- **`ITimeSynchronization.SystemBaseTime`** must be valid only if `SupportsTimeSynchronization` is `true`.
|
||||
- **`IUDPQATSEntry.Timestamp`** must represent the time the UDP packet was received or generated (implementation-dependent but must be non-null).
|
||||
- **`IDASFactory.Refresh(...)`** must update `GetDASList()` to reflect current hardware state before invoking the `action` callback.
|
||||
|
||||
## 4. Dependencies
|
||||
- **External Dependencies**:
|
||||
- `DTS.Common.Enums.*` (e.g., `DFConstantsAndEnums`, `CommunicationConstantsAndEnums`, `HardwareTypes`, `SensorConstants`, `DigitalInputModes`, `ZeroMethodType`, `ExcitationVoltageOptions`)
|
||||
- `DTS.Common.Interface.*` (e.g., `IConnection`, `ICommunication_DASInfo`, `IDiagnosticResult`, `IFilter
|
||||
@@ -0,0 +1,105 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.CommonCore/Interface/DASFactory/ARM/IArmStatus.cs
|
||||
- Common/DTS.CommonCore/Interface/DASFactory/ARM/IArmStatusData.cs
|
||||
generated_at: "2026-04-16T02:36:19.293285+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "cab749a0c8a2b813"
|
||||
---
|
||||
|
||||
# ARM
|
||||
|
||||
## Documentation: `IArmStatus` and `IArmStatusData` Interfaces
|
||||
|
||||
---
|
||||
|
||||
### 1. **Purpose**
|
||||
|
||||
This module defines the contract for tracking and managing the operational state of a DAS (Data Acquisition System) unit within the DASFactory ARM (Armed) subsystem. It provides a state abstraction layer—*not* a direct hardware interface—by exposing flags and metadata about the unit’s current mode (e.g., Arm, Realtime, Streaming), trigger status, fault conditions, and recording progress. The interfaces enable consistent state reporting and propagation (including optional persistence to a database) across higher-level components (e.g., test sequencers, UI, diagnostics), decoupling state logic from hardware-specific implementations.
|
||||
|
||||
---
|
||||
|
||||
### 2. **Public Interface**
|
||||
|
||||
#### `IArmStatus` Interface
|
||||
|
||||
| Member | Signature | Behavior |
|
||||
|--------|-----------|----------|
|
||||
| `SetInArm` | `void SetInArm(bool WriteToDb)` | Marks the unit as being in *Arm* mode. If `WriteToDb` is `true`, persists the state change to the database. |
|
||||
| `SetInRealtime` | `void SetInRealtime(bool WriteToDb, bool ExitRealtimeIfPossible)` | Marks the unit as being in *Realtime* mode. If `WriteToDb` is `true`, persists the state change. If `ExitRealtimeIfPossible` is `true`, may transition out of Realtime if conditions allow (e.g., post-test). |
|
||||
| `GetIsInArm` | `bool GetIsInArm()` | Returns `true` if the unit’s *Arm* flag is set (based on internal state, *not* hardware query). |
|
||||
| `GetIsInRealtime` | `bool GetIsInRealtime()` | Returns `true` if the unit’s *Realtime* flag is set (based on internal state, *not* hardware query). |
|
||||
| `GetIsStreaming` | `bool GetIsStreaming()` | Returns `true` if the unit is known to be *streaming* (based on internal state, *not* hardware query). |
|
||||
| `DASArmStatus` | `IArmStatusData DASArmStatus { get; set; }` | Gets or sets the current `IArmStatusData` instance holding detailed status fields. |
|
||||
| `SetDASArmStatus` (overload 1) | `void SetDASArmStatus(IArmStatusData status, bool bSetInDb)` | Replaces the current `DASArmStatus` with `status`. If `bSetInDb` is `true`, persists the new status to the database. |
|
||||
| `SetDASArmStatus` (overload 2) | `void SetDASArmStatus()` | Persists the *current* `DASArmStatus` to the database (if connected). Does *not* modify the in-memory status object. |
|
||||
|
||||
#### `IArmStatusData` Interface
|
||||
|
||||
| Member | Type | Description |
|
||||
|--------|------|-------------|
|
||||
| `ReceivedInvalidModeDuringSetup` | `bool` | `true` if the unit received an `InvalidMode` error during initial setup (used as a heuristic to infer streaming state in some code paths). |
|
||||
| `ClearTriggerCheckStatus()` | `void` | Clears flags related to trigger checks (e.g., `IsTriggerShorted`, `IsStartShorted`). |
|
||||
| `IsArmed` | `bool` | Whether the DAS is currently armed. |
|
||||
| `IsTriggered` | `bool` | Whether the DAS has sensed a trigger (set in many contexts, not limited to trigger checks). |
|
||||
| `IsTriggerShorted` | `bool` | Whether the trigger was shorted *during a trigger check*. Distinct from `IsTriggered`. |
|
||||
| `IsStartShorted` | `bool` | Whether the start signal was shorted *during a trigger check*. Only set during trigger checks. |
|
||||
| `IsRecording` | `bool` | Whether the DAS is currently recording sample data. |
|
||||
| `IsFaulted` | `bool` | Whether the DAS has faulted. |
|
||||
| `IsInRealtime` | `bool` | Whether the DAS is in real-time mode. |
|
||||
| `IsInFlashWrite` | `bool` | Whether the DAS is in flash write mode (G5). |
|
||||
| `IsUndefined` | `bool` | Used when `TDAS ARM STAT READ` returns no data (fallback state). |
|
||||
| `IsInPostTestDiagnostics` | `bool` | Whether the DAS is in post-test diagnostics. |
|
||||
| `TimeRemainingSeconds` | `double` | Estimated seconds remaining in recording. |
|
||||
| `PercentComplete` | `double` | Percentage complete for flash write operations. |
|
||||
| `TotalSamples` | `ulong` | Total number of samples to be recorded in the current test. |
|
||||
| `CurrentSample` | `ulong` | Current sample index being recorded. |
|
||||
| `SampleRate` | `uint` | Current sample rate (samples/sec). |
|
||||
| `InputMilliVolts` | `double?` | Current input voltage (mV), or `null` if unavailable. |
|
||||
| `BatteryMilliVolts` | `double?` | Current battery voltage (mV), or `null` if no battery present. |
|
||||
| `EventNumber` | `int?` | Current event number being recorded, or `null` if none. |
|
||||
| `MaxEventsPossible` | `ushort?` | Maximum number of events supported by the device (per issue FB 26817). |
|
||||
| `RecordingMode` | `int` | Numeric recording mode identifier (semantic meaning not documented in interface). |
|
||||
| `FaultMessage` | `string` | Optional human-readable fault description (e.g., for software-detected faults). |
|
||||
| `IsRearming` | `bool` | Whether the DAS is currently rearming. |
|
||||
| `HasBeenRecording` | `bool` | Whether the DAS has ever recorded in the current session. |
|
||||
| `TimeLeftInArm` | `double?` | Estimated time remaining in the *Arm* state (seconds), or `null`. |
|
||||
|
||||
---
|
||||
|
||||
### 3. **Invariants**
|
||||
|
||||
- **State Flags Are Software-Only**: Methods like `GetIsInArm()`, `GetIsInRealtime()`, and `GetIsStreaming()` return *software-tracked flags* only. They do *not* query hardware directly.
|
||||
- **`DASArmStatus` Is Mutable and Optional to Persist**: The `DASArmStatus` property can be replaced or updated, and persistence to the database is *explicitly opt-in* via `WriteToDb`/`bSetInDb` parameters.
|
||||
- **Trigger Check Flags Are Scoped**: `IsTriggerShorted` and `IsStartShorted` are *only* set during trigger checks and must be cleared via `ClearTriggerCheckStatus()` to avoid stale state.
|
||||
- **`ReceivedInvalidModeDuringSetup` Is a Heuristic**: This flag is used as a proxy for streaming state in some legacy code paths (see *Gotchas*), but is not a definitive indicator.
|
||||
- **Nullable Fields May Be Uninitialized**: All `double?`, `int?`, and `ushort?` properties may be `null` if the corresponding data is unavailable or not yet computed.
|
||||
|
||||
---
|
||||
|
||||
### 4. **Dependencies**
|
||||
|
||||
- **Depends On**:
|
||||
- `DTS.Common.Interface.DASFactory.ARM` namespace (inferred from `namespace` declaration).
|
||||
- Likely depends on database connectivity (via `WriteToDb`/`bSetInDb` parameters implying a persistence layer).
|
||||
- Likely depends on hardware communication layers (e.g., `TDAS ARM STAT READ` mentioned in `IsUndefined` comment), though not directly visible here.
|
||||
|
||||
- **Depended On By**:
|
||||
- Any component managing DAS state transitions (e.g., test sequencers, ARM state machines).
|
||||
- UI components displaying DAS status.
|
||||
- Diagnostics or logging modules that consume `IArmStatusData` for telemetry.
|
||||
- Hardware abstraction layers (implementations of `IArmStatus`).
|
||||
|
||||
---
|
||||
|
||||
### 5. **Gotchas**
|
||||
|
||||
- **`IsTriggered` vs. `IsTriggerShorted`**: `IsTriggered` is set broadly (e.g., after any trigger event), while `IsTriggerShorted` is *exclusively* set during trigger checks. Confusing these may lead to incorrect logic (e.g., assuming a physical trigger occurred when only a short was simulated).
|
||||
- **`ReceivedInvalidModeDuringSetup` as Streaming Proxy**: This flag is explicitly used *in some places* to infer streaming state when direct indicators (e.g., `IsRecording`) are unavailable. Relying on this heuristic outside its intended scope may cause incorrect behavior.
|
||||
- **`IsUndefined` Is a Fallback State**: When `TDAS ARM STAT READ` returns no data, `IsUndefined` should be set—but implementations may not consistently handle this case.
|
||||
- **`SetDASArmStatus()` Overload Ambiguity**: The parameterless `SetDASArmStatus()` persists the *current* in-memory status but does *not* update it. This may cause stale data to be persisted if the in-memory object was modified after the last explicit `SetDASArmStatus(status, ...)` call.
|
||||
- **`TimeLeftInArm` Semantics Unclear**: The meaning of `TimeLeftInArm` (e.g., time until disarm, time until test end) is not documented. Its relationship to `TimeRemainingSeconds` is ambiguous.
|
||||
- **`RecordingMode` Is Undocumented**: The integer value of `RecordingMode` has no documented mapping (e.g., enum or constants), making interpretation difficult without external context.
|
||||
|
||||
*None identified from source alone.*
|
||||
@@ -0,0 +1,190 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.CommonCore/Interface/DASFactory/Config/IEID.cs
|
||||
- Common/DTS.CommonCore/Interface/DASFactory/Config/IVoltageInsertionEnabled.cs
|
||||
- Common/DTS.CommonCore/Interface/DASFactory/Config/IInformation.cs
|
||||
- Common/DTS.CommonCore/Interface/DASFactory/Config/IConfigurationData.cs
|
||||
- Common/DTS.CommonCore/Interface/DASFactory/Config/IConfiguration.cs
|
||||
- Common/DTS.CommonCore/Interface/DASFactory/Config/IInfoResultModule.cs
|
||||
- Common/DTS.CommonCore/Interface/DASFactory/Config/IDASChannel.cs
|
||||
- Common/DTS.CommonCore/Interface/DASFactory/Config/IInfoResult.cs
|
||||
- Common/DTS.CommonCore/Interface/DASFactory/Config/IDASModule.cs
|
||||
generated_at: "2026-04-16T02:35:36.435465+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "126041a8d3394f8b"
|
||||
---
|
||||
|
||||
# DAS Factory Configuration Interfaces Documentation
|
||||
|
||||
## 1. Purpose
|
||||
|
||||
This module defines a set of core interfaces that establish the contract for configuration, metadata, and state management within the DAS (Data Acquisition System) factory framework. It provides abstractions for representing hardware configuration (`IConfiguration`, `IConfigurationData`), module/channel metadata (`IDASModule`, `IDASChannel`, `IInfoResult`, `IInfoResultModule`), identification (`IEID`), voltage insertion status (`IVoltageInsertionEnabled`), and serialization support. These interfaces decouple configuration logic from concrete implementations, enabling flexible hardware interaction, test setup management, and UI display ordering—particularly critical for multi-DAS, multi-channel systems where precise channel/module mapping and ordering are required.
|
||||
|
||||
## 2. Public Interface
|
||||
|
||||
### `IEID`
|
||||
- `string ID { get; set; }` – Identifier string for the EID (e.g., serial, UUID).
|
||||
- `byte[] Blob { get; set; }` – Binary payload associated with the EID.
|
||||
- `bool IsValid()` – Returns `true` if the EID data is considered valid.
|
||||
|
||||
### `IVoltageInsertionEnabled`
|
||||
- `bool VoltageInsertionEnabled { get; }` – Indicates whether voltage insertion was detected as enabled on the hardware (see internal case 34284).
|
||||
|
||||
### `IInformation`
|
||||
- `IInfoResult DASInfo { get; set; }` – Gets or sets the hardware-derived information object.
|
||||
- `void SetDASInfo(IInfoResult dasInfo, bool bSetInDb = true)` – Sets `DASInfo`, optionally persisting to a database.
|
||||
- `void SetDASInfo()` – Overload that sets `DASInfo` with default persistence (`bSetInDb = true`).
|
||||
|
||||
### `IConfigurationData`
|
||||
- `IDASModule[] Modules { get; set; }` – Array of modules in the DAS.
|
||||
- `IEID[] IDs { get; set; }` – Array of EIDs for the entire DAS.
|
||||
- `string TestID { get; set; }` – Current test/event identifier.
|
||||
- `string TestSetupUniqueId { get; set; }` – Unique identifier for the test setup.
|
||||
- `string Description { get; set; }` – Human-readable description of the test/event.
|
||||
- `bool ClearSetup { get; set; }` – Flag indicating whether to clear existing setup.
|
||||
- `int NumberOfConfiguredChannels()` – Returns count of channels where `IsConfigured()` is `true`.
|
||||
- `int NumberOfChannels()` – Returns total number of channels (configured or not).
|
||||
- `int NumberOfDownloadChannels()` – Returns count of downloadable channels (excludes UART/StreamOut).
|
||||
- `int[] DisplayOrder { get; set; }` – Channel display order array.
|
||||
- `int DasDisplayOrder { get; set; }` – DAS-level display order.
|
||||
- `int GetDisplayOrder(uint channelIdx)` – Returns display order for a given channel index.
|
||||
- `string UDPReceiveAddress { get; set; }` – UDP address for OBR-DDR control.
|
||||
- `void WriteXml(XmlWriter writer)` – Serializes configuration to XML.
|
||||
- `void ReadXml(XmlReader reader)` – Deserializes configuration from XML.
|
||||
- `XmlSchema GetSchema()` – Returns XML schema for validation.
|
||||
|
||||
### `IConfiguration`
|
||||
- `string TestDirectory { get; set; }` – Path on PC where test data is stored.
|
||||
- `bool SupportsAutoDetect { get; }` – Indicates support for auto-detecting channel type (bridge/IEPE).
|
||||
- `void QueryConnectedDevices()` – Queries hardware for connected devices.
|
||||
- `IConfigurationData ConfigData { get; set; }` – Pre-test configuration data (updated by `ConfigurationService.Configure(...)`).
|
||||
- `ClockSyncProfile DASClockSyncProfile { get; set; }` – Clock synchronization profile (updated on configure, applied only to compatible units).
|
||||
- `int GetDASDisplayOrder()` – Returns DAS display order (default `-1`).
|
||||
- `int[] GetChannelDisplayOrder()` – Returns channel display order array.
|
||||
- `void SetDASDisplayOrder(int order)` – Sets DAS display order (intended for use by FWTU only).
|
||||
- `void SetChannelDisplayOrder(int[] order)` – Sets channel display order (intended for use by FWTU only).
|
||||
|
||||
### `IInfoResultModule`
|
||||
- `string SerialNumber { get; set; }` – Module serial number.
|
||||
- `string FirmwareVersion { get; set; }` – Firmware version string.
|
||||
- `int ModuleArrayIndex { get; set; }` – Index in the module array.
|
||||
- `uint NumberOfChannels { get; set; }` – Number of channels on this module.
|
||||
- `uint[] SupportedSampleRates { get; set; }` – Supported sample rates (Hz).
|
||||
- `Dictionary<uint, float> SampleRate2AAFrequency { get; set; }` – Mapping of sample rate to anti-aliasing filter frequency.
|
||||
- `ulong? MaxEventStorageSpaceInBytes { get; set; }` – Max storage per module (null if DAS-level).
|
||||
- `uint? NumberOfBytesPerSampleClock { get; set; }` – Bytes per sample per module (null if DAS-level).
|
||||
- `double MaxRecordingSamples { get; set; }` – Max samples this module can record.
|
||||
- `DateTime? CalibrationDate { get; set; }` – Last calibration date (null if invalid/NA).
|
||||
- `bool RackIsUnreadable { get; set; }` – `true` if TDAS rack is armed and unresponsive.
|
||||
- `DFConstantsAndEnums.ModuleType TypeOfModule { get; set; }` – Module type.
|
||||
- `DFConstantsAndEnums.RecordingMode[] SupportedModes { get; set; }` – Supported recording modes.
|
||||
- `bool IsProgrammable { get; set; }` – Indicates if module is programmable.
|
||||
|
||||
### `IDASChannel`
|
||||
- `DFConstantsAndEnums.ConfigMode ConfigurationMode { get; set; }` – Configuration mode.
|
||||
- `bool DiagnosticsMode { get; set; }` – Whether channel is in diagnostics mode.
|
||||
- `int ModuleChannelNumber { get; set; }` – Channel index within its module.
|
||||
- `int AbsoluteDisplayOrder { get; set; }` – Global display order.
|
||||
- `double UnitConverision { get; set; }` – Unit conversion factor (note: typo in property name).
|
||||
- `bool AtCapacity { get; set; }` – Whether channel is at capacity.
|
||||
- `double CapacityOutputIsBasedOn { get; set; }` – Output value capacity is based on.
|
||||
- `SensorConstants.SensUnits SensitivityUnits { get; set; }` – Sensitivity units.
|
||||
- `byte Number { get; }` – DAS-wide channel number (0-based).
|
||||
- `IEID[] IDs { get; set; }` – EIDs associated with this channel.
|
||||
- `DateTime EventStartTime { get; set; }` – Timestamp of event start.
|
||||
- `bool LevelTriggerSeen { get; set; }` – Whether level trigger was detected.
|
||||
- `string IsoChannelName { get; set; }`, `string ChannelGroupName { get; set; }`, `string UserCode { get; set; }`, `string UserChannelName { get; set; }`, `string LinearSensorCalibration { get; set; }` – User-configurable metadata fields.
|
||||
- `int QualificationSamples { get; set; }` – Number of samples for trigger qualification.
|
||||
- `int? LevelTriggerT0AdjustmentSamples { get; set; }` – Sample shift for time alignment (null if not directly triggered).
|
||||
- `bool IsConfigured()` – Returns `true` if channel is configured (sensor connected + config present).
|
||||
- `void WriteXml(XmlWriter writer)`, `void ReadXml(XmlReader reader)`, `XmlSchema GetSchema()` – XML serialization.
|
||||
- `int IdType { get; set; }`, `string UserValue1 { get; set; }`, `string UserValue2 { get; set; }`, `string UserValue3 { get; set; }` – Extensibility fields.
|
||||
|
||||
### `IInfoResult`
|
||||
- `string MACAddress { get; set; }` – MAC address of the DAS.
|
||||
- `IInfoResultModule[] Modules { get; set; }` – Array of modules in the DAS.
|
||||
- `List<Common.Classes.Hardware.ExternalTilt> ActiveExternalTilts { get; set; }` – List of active external tilt sensors.
|
||||
- `uint MaxNumberOfModules { get; set; }` – Max modules supported.
|
||||
- `ulong? MaxEventStorageSpaceInBytes { get; set; }` – DAS-level max storage (null if per-module).
|
||||
- `uint? NumberOfBytesPerSampleClock { get; set; }` – DAS-level bytes per sample (null if per-module).
|
||||
- `bool? DeviceStreamingOnly { get; set; }` – Hardware streaming-only flag (null if unsupported).
|
||||
- `int NumberOfBridgeChannels { get; set; }` – Count of bridge channels (temporary constant).
|
||||
- `IEID BatteryID { get; set; }` – Battery EID.
|
||||
- `bool HasBattery { get; }` – Whether hardware has a battery.
|
||||
- `byte MapDASChannelNumber2RealtimeChannelNumber(int channelNumber)` – Maps DAS channel to real-time channel number.
|
||||
- `byte MapDASChannelNumber2ModuleArrayIndex(int channelNumber)` – Maps DAS channel to module array index.
|
||||
- `byte MapDASChannelNumber2ModuleDeviceID(int channelNumber)` – Maps DAS channel to module device ID (1-based).
|
||||
- `byte MapDASChannelNumber2ModuleChannelNumber(int channelNumber)` – Maps DAS channel to module channel number (0-based).
|
||||
- `byte MapModuleArrayIndexAndChannelNum2DASChannel(int moduleArrayIdx, int channelNumber)` – Inverse mapping.
|
||||
- `DateTime? CalibrationDate { get; set; }` – DAS calibration date (returns `1970-01-01` if invalid/NA).
|
||||
|
||||
### `IDASModule`
|
||||
- `IDASChannel[] Channels { get; set; }` – Array of channels, indexed by `ModuleChannelNumber`.
|
||||
- `IEID[] IDs { get; set; }` – Module-level EIDs.
|
||||
- `int ModuleArrayIndex { get; set; }` – Index in module array.
|
||||
- `double RequestedPreTriggerSeconds { get; set; }`, `double RequestedPostTriggerSeconds { get; set; }` – Requested trigger timing.
|
||||
- `double PreTriggerSeconds { get; set; }`, `double PostTriggerSeconds { get; set; }` – Actual trigger timing.
|
||||
- `int NumberOfEvents { get; set; }` – Events to collect before disarming.
|
||||
- `int WakeUpMotionTimeout { get; set; }` – Inactivity timeout before sleep.
|
||||
- `string FirmwareVersion { get; set; }` – Module firmware version.
|
||||
- `string Description { get; set; }` – Module description.
|
||||
- `ulong? MaxEventStorageSpaceInBytes { get; set; }` – Module storage capacity.
|
||||
- `ulong NumberOfSamples { get; set; }` – Samples captured in last run.
|
||||
- `ulong[] TriggerSampleNumbers { get; set; }` – Array of trigger sample numbers.
|
||||
- `int GetLevelTriggerT0AdjustmentSamplesAutoApplied()` – Returns auto-applied T0 adjustment.
|
||||
- `ulong StartRecordSampleNumber { get; set; }` – Sample number where recording started.
|
||||
- `uint StartRecordTimestampSec`, `uint TriggerTimestampSec`, `uint StartRecordTimestampNanoSec`, `uint TriggerTimestampNanoSec` – Timestamps for start/trigger.
|
||||
- `bool PTPMasterSync { get; set; }` – Precision Time Protocol master sync status.
|
||||
- `double TiltSensorAxisX/Y/ZDegreesPre/Post { get; set; }` – Tilt angles before/after event.
|
||||
- `float TemperatureLocation1/2/3/4Pre/Post { get; set; }` – Temperatures before/after event.
|
||||
- `uint SampleRateHz { get; set; }`, `uint ActualSampleRateHz { get; set; }` – Nominal and actual sample rates.
|
||||
- `float AAFilterRateHz { get; set; }` – Anti-aliasing filter rate.
|
||||
- `DFConstantsAndEnums.RecordingMode RecordingMode { get; set; }` – Recording mode.
|
||||
- `DateTime ScheduledStartTime { get; set; }`, `int RecordingInterval { get; set; }` – Scheduling info.
|
||||
- `UDPStreamProfile StreamProfile { get; set; }` – UDP streaming profile.
|
||||
- `DFConstantsAndEnums.TiltAxes TiltAxes { get; set; }`, `double TargetAxisOne/Two { get; set; }`, `float TargetAngleAxisX/Y/Z { get; set; }`, `double MountOffsetAxisOne/Two { get; set; }`, `string SystemLocation { get; set; }`, `string SystemID { get; set; }`, `int AxisIgnored { get; set; }`, `double LevelTolerance { get; set; }`, `bool UseForTiltCalculation { get; set; }`, `double InputVoltage { get; set; }`, `double BatteryVoltage { get; set; }`, `byte TiltID { get; set; }`, `string TiltSerialNumber { get; set; }` – Slice 6 tilt feature fields.
|
||||
- `int NumberOfConfiguredChannels()`, `int NumberOfConfiguredTOMChannels()` – Channel counts.
|
||||
- `bool IsDummyArmed()` – Whether module is dummy-armed.
|
||||
- `int NumberOfChannels()` – Total channel count.
|
||||
- `string SerialNumber()`, `DFConstantsAndEnums.ModuleType ModuleType()` – Metadata getters.
|
||||
- `bool IsStreamIn()`, `bool IsStreamOut()`, `bool IsUart()`, `bool IsClock()`, `bool IsEmbedded()` – Module type checks.
|
||||
- `void WriteXml(XmlWriter writer)`, `void ReadXml(XmlReader reader)`, `XmlSchema GetSchema()`, `void WriteXmlCRC32(XmlWriter writer)`, `ushort GetCRC32()` – Serialization and checksum.
|
||||
|
||||
## 3. Invariants
|
||||
|
||||
- **Channel numbering**: `IDASChannel.Number` is a DAS-wide 0-based index (0..29). `IDASModule.ModuleArrayIndex` is 0-based (0..9). `IDASChannel.ModuleChannelNumber` is 0-based within a module (0..2). Mapping functions (`Map*`) enforce consistent conversion between these spaces.
|
||||
- **Configuration state**: A channel is considered *configured* only if `IsConfigured()` returns `true`, which requires both a sensor connection and configuration data populated via `ConfigurationService.Configure(...)`.
|
||||
- **Display ordering**: `DisplayOrder` (array) and `DasDisplayOrder` (scalar) in `IConfigurationData` control UI rendering order. Default `DasDisplayOrder` is `-1`. Channel display order is managed via `GetChannelDisplayOrder()`/`SetChannelDisplayOrder()`.
|
||||
- **Storage hierarchy**: Storage capacity (`MaxEventStorageSpaceInBytes`, `NumberOfBytesPerSampleClock`) may be defined at either the DAS or module level (indicated by `null` values).
|
||||
- **Calibration date**: `IInfoResult.CalibrationDate` and `IInfoResultModule.CalibrationDate` return `DateTime?`. An invalid/NA date is represented as `1970-01-01` (Unix epoch).
|
||||
- **EID validity**: `IEID.IsValid()` must be called to validate EID data before use; no automatic validation is implied by property access.
|
||||
|
||||
## 4. Dependencies
|
||||
|
||||
### Dependencies *of* this module (interfaces):
|
||||
- **`DTS.Common.Enums.DASFactory`**: Used via `DFConstantsAndEnums.ModuleType`, `RecordingMode`, `ConfigMode`, `TiltAxes`.
|
||||
- **`DTS.Common.Enums.Sensors`**: Used via `SensorConstants.SensUnits`.
|
||||
- **`System.Xml`**: Required for `XmlWriter`, `XmlReader`, `XmlSchema`.
|
||||
- **`System.Collections.Generic`**: Required for `Dictionary<uint, float>`, `List<ExternalTilt>`.
|
||||
- **`System`**: Required for `DateTime`, `byte`, `string`, `double`, `float`, `uint`, `ulong`, `int`, `bool`.
|
||||
|
||||
### Dependencies *on* this module:
|
||||
- **`ConfigurationService`**: Updates `IConfiguration.ConfigData` and `IConfiguration.DASClockSyncProfile` via `Configure(...)` (referenced in `IConfiguration` XML docs).
|
||||
- **`ClockSyncProfile`**: Used as a property type in `IConfiguration`; assumed to be defined elsewhere.
|
||||
- **`UDPStreamProfile`**: Used as a property type in `IDASModule`; assumed to be defined elsewhere.
|
||||
- **`Common.Classes.Hardware.ExternalTilt`**: Used in `IInfoResult.ActiveExternalTilts`; assumed to be defined elsewhere.
|
||||
- **`DTS.Common.Interface.DASFactory.Config` namespace**: All interfaces co-reside in this namespace and reference each other.
|
||||
|
||||
## 5. Gotchas
|
||||
|
||||
- **Typo in property name**: `IDASChannel.UnitConverision` is misspelled (should be `UnitConversion`). This is preserved as-is per source.
|
||||
- **`SetDASInfo` overloads**: `IInformation.SetDASInfo()` has two overloads; the parameterless version defaults `bSetInDb = true`. Ensure callers understand persistence behavior.
|
||||
- **`NumberOfDownloadChannels` semantics**: Excludes UART and StreamOut modules; does *not* imply channels are active—only that they are of a downloadable type.
|
||||
- **`IsDummyArmed()`**: Specific to `IDASModule`; behavior and implications are not documented in source—assumed to relate to a test/diagnostic mode.
|
||||
- **`LevelTriggerT0AdjustmentSamples`**: A nullable `int?` in `IDASChannel`; `null` indicates no direct trigger. In `IInfoResult`, `MapDASChannelNumber2ModuleChannelNumber` assumes valid channel numbers (0..29); out-of-range inputs may cause undefined behavior (not validated in interface).
|
||||
- **`DeviceStreamingOnly`**: Nullable `bool?`; `null` means the device doesn’t support a streaming-only configuration, not that streaming is disabled.
|
||||
- **`ActualSampleRateHz`**: Comment notes it is currently used only for TSR AIR type hardware (FB 25558); behavior on other hardware is undefined.
|
||||
- **Display order mutability**: `SetDASDisplayOrder` and `SetChannelDisplayOrder` are documented as “should only be called really from FWTU”—suggesting external tools manage UI ordering, not core logic.
|
||||
- **`CalibrationDate` invalid representation**: `1970-01-01` is used as a sentinel for invalid dates in `IInfoResult.CalibrationDate`, but `IInfoResultModule.CalibrationDate` is `DateTime?` (nullable), so `null` is the canonical invalid value there. Inconsistent handling.
|
||||
- **`IDASChannel.Number` is read-only**: Unlike `Module
|
||||
@@ -0,0 +1,295 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.CommonCore/Interface/DASFactory/Diagnostics/ITriggerCheck.cs
|
||||
- Common/DTS.CommonCore/Interface/DASFactory/Diagnostics/IOptimizationValues.cs
|
||||
- Common/DTS.CommonCore/Interface/DASFactory/Diagnostics/IArmCheckActions.cs
|
||||
- Common/DTS.CommonCore/Interface/DASFactory/Diagnostics/IModuleDiagnosticsResult.cs
|
||||
- Common/DTS.CommonCore/Interface/DASFactory/Diagnostics/ITriggerCheckResult.cs
|
||||
- Common/DTS.CommonCore/Interface/DASFactory/Diagnostics/IDiagnos.cs
|
||||
- Common/DTS.CommonCore/Interface/DASFactory/Diagnostics/IArmCheckResults.cs
|
||||
- Common/DTS.CommonCore/Interface/DASFactory/Diagnostics/IDiagnosticActions.cs
|
||||
- Common/DTS.CommonCore/Interface/DASFactory/Diagnostics/IBaseInputValues.cs
|
||||
- Common/DTS.CommonCore/Interface/DASFactory/Diagnostics/IDiagnosticResult.cs
|
||||
generated_at: "2026-04-16T02:36:25.319043+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "030f7186b5eb008c"
|
||||
---
|
||||
|
||||
# DAS Factory Diagnostics Interface Module Documentation
|
||||
|
||||
## 1. Purpose
|
||||
This module defines a set of interfaces that collectively represent the diagnostic subsystem for DAS (Data Acquisition System) devices within the DASFactory framework. It provides a standardized contract for capturing, configuring, and reporting diagnostic checks—including channel-level diagnostics (e.g., offset, noise, shunt checks), module-level diagnostics (e.g., temperature, battery voltage), arm-stage checks (e.g., sensor ID, squib resistance), and trigger/status monitoring (e.g., start record line, trigger line activity). The interfaces enable decoupling of diagnostic logic from implementation, supporting both real-time diagnostics and post-event analysis by standardizing how diagnostic actions are requested, results are collected, and metadata (e.g., calibration scale factors, clock sync status) is exposed.
|
||||
|
||||
## 2. Public Interface
|
||||
|
||||
### `ITriggerCheck`
|
||||
- **`ITriggerCheckResult TriggerResult { get; set; }`**
|
||||
Gets or sets the result object containing trigger and start-record line status information.
|
||||
|
||||
### `IOptimizationValues`
|
||||
- **`float TransferSpeed { get; set; }`**
|
||||
Gets or sets the transfer speed used for real-time optimization (commented as “FB 6416 Keep the optimizations settings used for real-time optimization” in `IDiagnos`).
|
||||
|
||||
### `IArmCheckActions`
|
||||
- **`bool PerformBatteryVoltageCheck { get; set; }`**
|
||||
- **`bool PerformInputVoltageCheck { get; set; }`**
|
||||
- **`bool PerformSensorIdCheck { get; set; }`**
|
||||
- **`bool PerformEventLineCheck { get; set; }`**
|
||||
- **`bool PerformSquibResistanceCheck { get; set; }`**
|
||||
- **`bool PerformTiltSensorCheck { get; set; }`**
|
||||
- **`bool PerformTemperatureCheck { get; set; }`**
|
||||
- **`bool PerformClockSyncCheck { get; set; }`**
|
||||
Boolean flags indicating which arm-stage diagnostic checks should be performed.
|
||||
|
||||
### `IModuleDiagnosticsResult`
|
||||
- **`float TemperatureLocation1Pre/Post { get; set; }`**
|
||||
- **`float TemperatureLocation2Pre/Post { get; set; }`**
|
||||
- **`float TemperatureLocation3Pre/Post { get; set; }`**
|
||||
- **`float TemperatureLocation4Pre/Post { get; set; }`**
|
||||
Pre- and post-arm temperature readings at four physical locations on the module.
|
||||
|
||||
### `ITriggerCheckResult`
|
||||
- **`bool IsStatusGood { get; set; }`**
|
||||
Overall DAS status health (true = good).
|
||||
- **`bool IsStartRecordActive { get; set; }`**
|
||||
Whether the start record line is currently active.
|
||||
- **`bool HasStartRecordBeenActive { get; set; }`**
|
||||
Whether the start record line was active *at any time* after arming.
|
||||
- **`bool IsTriggered { get; set; }`**
|
||||
Whether the trigger line is currently active.
|
||||
- **`bool HasTriggered { get; set; }`**
|
||||
Whether the trigger line was active *at any time* after arming.
|
||||
|
||||
### `IDiagnos`
|
||||
- **`IDiagnosticActions[] ChannelDiagnostics { get; set; }`**
|
||||
Array of diagnostic action configurations, one per DAS channel.
|
||||
- **`void SetChannelDiagnosticActions(IDiagnosticActions[] actions, bool setInDb=true)`**
|
||||
Sets the diagnostic action configurations; optionally persists to database.
|
||||
- **`IDiagnosticResult[] ChannelDiagnosticsResults { get; set; }`**
|
||||
Array of diagnostic results, one per DAS channel.
|
||||
- **`void ClearChannelDiagnosticsResults(bool bClearDb = true)`**
|
||||
Clears channel diagnostic results; optionally clears from database.
|
||||
- **`void SetChannelDiagnosticsResults(IDiagnosticResult[] results, bool setInDb)`**
|
||||
Sets channel diagnostic results; optionally persists to database.
|
||||
- **`IModuleDiagnosticsResult[] ModuleDiagnosticsResults { get; set; }`**
|
||||
Array of module-level diagnostic results (e.g., temperature).
|
||||
- **`IBaseInputValues BaseInput { get; set; }`**
|
||||
Base input power and environmental diagnostics (voltage, battery, temperature).
|
||||
- **`IDictionary<InputClockSource, bool> DASClockSyncStatus { get; set; }`**
|
||||
Clock synchronization status per input clock source.
|
||||
- **`byte PTPDomainID { get; set; }`**
|
||||
Precision Time Protocol (PTP) domain ID.
|
||||
- **`IArmCheckActions ArmCheckActions { get; set; }`**
|
||||
Configuration for arm-stage diagnostic checks.
|
||||
- **`IArmCheckResults ArmCheckResults { get; set; }`**
|
||||
Results from arm-stage diagnostic checks.
|
||||
- **`IOptimizationValues OptimizationValues { get; set; }`**
|
||||
Real-time optimization settings (e.g., transfer speed).
|
||||
|
||||
### `IArmCheckResults`
|
||||
- **`Dictionary<int, string[]> SensorIds { get; set; }`**
|
||||
Mapped sensor IDs per module/channel.
|
||||
- **`Dictionary<int, double> SquibResistances { get; set; }`**
|
||||
Squib resistance values per module/channel.
|
||||
- **`double?[] BatteryVoltage { get; set; }`**
|
||||
Battery voltage readings (nullable, supports multiple batteries per module, e.g., TDAS Pro rack).
|
||||
- **`double? InputVoltage { get; set; }`**
|
||||
Input voltage (nullable).
|
||||
- **`bool? StartLineShorted { get; set; }`**
|
||||
Whether the start line is shorted (nullable).
|
||||
- **`bool? EventLineShorted { get; set; }`**
|
||||
Whether the event line is shorted (nullable).
|
||||
- **`short[] TiltSensorDataPre { get; set; }`**
|
||||
Raw tilt sensor data (pre-arm).
|
||||
- **`double[] TiltDegrees { get; set; }`**
|
||||
Tilt angle in degrees (derived from tilt sensor data).
|
||||
- **`Dictionary<byte, short[]> IndexedTiltSensorDataPre { get; set; }`**
|
||||
Indexed raw tilt sensor data (keyed by module ID).
|
||||
- **`Dictionary<byte, double[]> IndexedTiltDegrees { get; set; }`**
|
||||
Indexed tilt angles in degrees (keyed by module ID).
|
||||
- **`float[] TemperaturesPre { get; set; }`**
|
||||
Pre-arm temperature readings.
|
||||
- **`double[] Gains { get; set; }`**
|
||||
Gain values (e.g., from calibration).
|
||||
- **`double[] ZeroData { get; set; }`**
|
||||
Zero-level data (e.g., offset reference).
|
||||
- **`IDictionary<InputClockSource, bool> InputClockLocks { get; set; }`**
|
||||
Clock lock status per input clock source.
|
||||
|
||||
### `IDiagnosticActions`
|
||||
- **`int DASChannelNumber { get; set; }`**
|
||||
DAS channel number (0-indexed or 1-indexed relative to entire DAS unit).
|
||||
- **`bool MeasureExcitation { get; set; }`**
|
||||
Whether to measure excitation voltage applied to the sensor.
|
||||
- **`bool MeasureOffset { get; set; }`**
|
||||
Whether to measure sensor offset from 0.
|
||||
- **`bool CheckDigitalState { get; set; }`**
|
||||
Whether to check digital input state (open/closed/low/high).
|
||||
- **`bool MeasureInternalOffset { get; set; }`**
|
||||
Whether to measure internal offset.
|
||||
- **`bool RemoveOffset { get; set; }`**
|
||||
Whether firmware should compensate for offset (move base reading to 0).
|
||||
- **`bool MeasureNoise { get; set; }`**
|
||||
Whether to measure noise floor as % of full scale.
|
||||
- **`bool PerformShuntCheck { get; set; }`**
|
||||
Whether to perform emulated shunt check.
|
||||
- **`bool SquibFireCheck { get; set; }`**
|
||||
Whether to perform squib fire check.
|
||||
- **`bool PerformVoltageInsertCheck { get; set; }`**
|
||||
Whether to perform voltage insertion gain check (SLICE Pro).
|
||||
- **`bool PerformCalSignalCheck { get; set; }`**
|
||||
Whether to perform calibration signal check.
|
||||
- **`bool MeasureBridgeResistance { get; set; }`**
|
||||
Whether to measure bridge resistance.
|
||||
- **`bool AllActionsDisabled()`**
|
||||
Returns `true` if *all* diagnostic actions are disabled (i.e., no checks requested).
|
||||
|
||||
### `IBaseInputValues`
|
||||
- **`double InputMilliVolts { get; set; }`**
|
||||
Current input voltage in millivolts.
|
||||
- **`bool InputMilliVoltsValid { get; }`**
|
||||
Whether `InputMilliVolts` is valid.
|
||||
- **`double InputVoltage { get; set; }`**
|
||||
Current input voltage (same as `InputMilliVolts`, likely in volts).
|
||||
- **`double MinimumValidInputVoltage { get; set; }`**
|
||||
Minimum valid input voltage threshold.
|
||||
- **`double MaximumValidInputVoltage { get; set; }`**
|
||||
Maximum valid input voltage threshold.
|
||||
- **`bool BatteryMilliVoltsValid { get; }`**
|
||||
Whether `BatteryMilliVolts` is valid.
|
||||
- **`double BatteryMilliVolts { get; set; }`**
|
||||
Current battery voltage in millivolts.
|
||||
- **`double BatteryVoltage { get; set; }`**
|
||||
Current battery voltage (same as `BatteryMilliVolts`, likely in volts).
|
||||
- **`double MinimumValidBatteryVoltage { get; set; }`**
|
||||
Minimum valid battery voltage threshold.
|
||||
- **`double MaximumValidBatteryVoltage { get; set; }`**
|
||||
Maximum valid battery voltage threshold.
|
||||
- **`bool BatteryIsCharging { get; set; }`**
|
||||
Whether battery is currently charging.
|
||||
- **`double TemperatureC { get; set; }`**
|
||||
Hardware-logged temperature in °C.
|
||||
- **`string BatteryVoltageStatus { get; set; }`**
|
||||
Human-readable battery voltage status (e.g., “OK”, “LOW”).
|
||||
- **`string InputVoltageStatus { get; set; }`**
|
||||
Human-readable input voltage status.
|
||||
- **`string StatusDisplayBattery { get; set; }`**
|
||||
Display string for battery status.
|
||||
- **`string StatusDisplayInput { get; set; }`**
|
||||
Display string for input voltage status.
|
||||
- **`DFConstantsAndEnums.VoltageStatusColor BatteryVoltageStatusColor { get; set; }`**
|
||||
Color code for battery voltage status (e.g., green/yellow/red).
|
||||
- **`DFConstantsAndEnums.VoltageStatusColor InputVoltageStatusColor { get; set; }`**
|
||||
Color code for input voltage status.
|
||||
- **`double ChargeCapacity { get; set; }`**
|
||||
Battery charge capacity.
|
||||
- **`bool ChargeCapacityValid { get; }`**
|
||||
Whether `ChargeCapacity` is valid.
|
||||
|
||||
### `IDiagnosticResult`
|
||||
- **`int DASChannelNumber { get; set; }`**
|
||||
DAS channel number for this result.
|
||||
- **`int EventNumber { get; set; }`**
|
||||
Event number associated with this diagnostic.
|
||||
- **`double ScalefactorMilliVoltsPerADC { get; set; }`**
|
||||
Scale factor to convert ADC counts to millivolts (mandatory for data scaling).
|
||||
- **`double ScalefactorEngineeringUnitsPerADC { get; set; }`**
|
||||
Scale factor to convert ADC counts to engineering units.
|
||||
- **`double ExpectedExcitationMilliVolts { get; set; }`**
|
||||
Factory-calibrated excitation voltage (mandatory).
|
||||
- **`short GetExpectedDataZeroLevelADC(ZeroMethodType zeroMethod)`**
|
||||
Returns expected zero-level ADC for given zeroing method.
|
||||
- **`double? MeasuredExcitationMilliVolts { get; set; }`**
|
||||
Measured excitation voltage (nullable; 0.0 may mean null/unmeasured).
|
||||
- **`bool NegativeExcitation { get; set; }`**
|
||||
Whether `MeasuredExcitationMilliVolts` was negative at initial read (legacy handling).
|
||||
- **`double? MeasuredOffsetMilliVolts { get; set; }`**
|
||||
Measured offset in millivolts (nullable).
|
||||
- **`double? MeasuredInternalOffsetMilliVolts { get; set; }`**
|
||||
Measured internal offset in millivolts (nullable).
|
||||
- **`double? MeasuredOffsetEngineeringUnits { get; set; }`**
|
||||
Measured offset in engineering units (nullable).
|
||||
- **`double? AutoZeroPercentDeviation { get; set; }`**
|
||||
Deviation from 0 (in counts) after auto-zero (±5% check).
|
||||
- **`short? FinalOffsetADC { get; set; }`**
|
||||
Offset remaining after offset removal (nullable).
|
||||
- **`int? RemovedOffsetADC { get; set; }`**
|
||||
Amount of offset removed (nullable).
|
||||
- **`int? RemovedInternalOffsetADC { get; set; }`**
|
||||
Amount of internal offset removed (nullable).
|
||||
- **`double? NoisePercentFullScale { get; set; }`**
|
||||
Noise floor as % of full scale (nullable).
|
||||
- **`bool ShuntDeflectionFailed { get; set; }`**
|
||||
Whether shunt deflection check failed.
|
||||
- **`bool CalSignalCheckFailed { get; set; }`**
|
||||
Whether calibration signal check failed.
|
||||
- **`double? MeasuredShuntDeflectionMv { get; set; }`**
|
||||
Measured shunt deflection in mV (nullable).
|
||||
- **`double? MeasuredCalSignalMv { get; set; }`**
|
||||
Measured calibration signal in mV (nullable).
|
||||
- **`double? TargetCalSignalMv { get; set; }`**
|
||||
Target calibration signal in mV (nullable).
|
||||
- **`double? MeasuredDurationMS { get; set; }`**
|
||||
Measured duration in ms (e.g., for squib/fire checks).
|
||||
- **`double? MeasuredDelayMS { get; set; }`**
|
||||
Measured delay in ms.
|
||||
- **`bool? SquibFirePassed { get; set; }`**
|
||||
Whether squib fire check passed.
|
||||
- **`bool? SquibDurationPassed { get; set; }`**
|
||||
Whether squib duration check passed.
|
||||
- **`bool? SquibDelayPassed { get; set; }`**
|
||||
Whether squib delay check passed.
|
||||
- **`double[] SquibFireCurrentData { get; set; }`**
|
||||
Squib fire current trace.
|
||||
- **`double[] SquibFireVoltageData { get; set; }`**
|
||||
Squib fire voltage trace.
|
||||
- **`double[] SquibFireTimeAxis { get; set; }`**
|
||||
Time axis for squib fire traces.
|
||||
- **`double SquibThreshold { get; set; }`**
|
||||
Squib fire threshold.
|
||||
- **`double SquibVoltageScaler { get; set; }`**
|
||||
Scaler for squib voltage data.
|
||||
- **`double SquibCurrentScaler { get; set; }`**
|
||||
Scaler for squib current data.
|
||||
- **`double? TargetGain { get; set; }`**
|
||||
Target gain value (nullable).
|
||||
- **`double? MeasuredGain { get; set; }`**
|
||||
Measured gain value (nullable).
|
||||
- **`double? QueriedGain { get; set; }`**
|
||||
Gain value queried from hardware (nullable).
|
||||
- **`double? TargetShuntDeflectionMv { get; set; }`**
|
||||
Target shunt deflection in mV (nullable).
|
||||
- **`double? BridgeResistance { get; set; }`**
|
||||
Measured bridge resistance in ohms (nullable).
|
||||
- **`short ZeroMVInADC { get; set; }`**
|
||||
Zero voltage in ADC counts.
|
||||
- **`short WindowAverageADC { get; set; }`**
|
||||
Average ADC over window; `short.MinValue` indicates uninitialized/invalid.
|
||||
- **`bool DigitalInputActiveState { get; set; }`**
|
||||
Current state of digital input (active/inactive).
|
||||
|
||||
## 3. Invariants
|
||||
- **`IDiagnosticResult.ScalefactorMilliVoltsPerADC` and `ScalefactorEngineeringUnitsPerADC` are mandatory** for scaling raw ADC data to real-world values (per XML comment).
|
||||
- **`IDiagnosticResult.WindowAverageADC` uses `short.MinValue` to indicate uninitialized or invalid values**.
|
||||
- **`double?` properties in `IDiagnosticResult` and `IArmCheckResults` may use `0.0` to represent null/unmeasured values** (explicitly noted in comments).
|
||||
- **`IBaseInputValues.InputMilliVoltsValid`, `BatteryMilliVoltsValid`, and `ChargeCapacityValid` are read-only flags indicating validity of corresponding values**.
|
||||
- **`IArmCheckActions` and `IDiagnosticActions` use boolean flags to *enable* specific checks; `AllActionsDisabled()` returns `true` only if *all* flags are `false`**.
|
||||
- **`ITriggerCheckResult.HasStartRecordBeenActive` and `HasTriggered` track *cumulative* activity since arming, not just current state**.
|
||||
|
||||
## 4. Dependencies
|
||||
- **Depends on**:
|
||||
- `DTS.Common.Enums.DASFactory` (for `InputClockSource`, `DFConstantsAndEnums.VoltageStatusColor`)
|
||||
- `DTS.Common.Enums.Sensors` (for `ZeroMethodType`)
|
||||
- `System.Collections.Generic`, `System` (via `using` directives)
|
||||
- **Used by**:
|
||||
- `DTS.DASLib.Service.DiagnosticsService` (referenced in `IDiagnosticResult` comments for `Calibrate` method)
|
||||
- `DiagnosticsActions` (referenced in `IDiagnosticResult` comments for `PerformShuntCheck`, `MeasureBridgeResistance`)
|
||||
- `AnalogInputDasChannel` (referenced in `IDiagnosticResult` comments for offset limits)
|
||||
- **Implied consumers**:
|
||||
- Diagnostic UI components (via `IBaseInputValues.StatusDisplay*` and color enums)
|
||||
- Post-processing tools (via `IDiagnosticResult` scale factors and traces)
|
||||
- Arm/trigger logic (via `ITriggerCheck`, `IArmCheckActions/Results`)
|
||||
|
||||
## 5. Gotchas
|
||||
- **`double?` values may be `0.0` instead of `null` to indicate unmeasured data** (explicitly documented in `IDiagnosticResult`
|
||||
@@ -0,0 +1,228 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.CommonCore/Interface/DASFactory/Download/IDownloadReport.cs
|
||||
- Common/DTS.CommonCore/Interface/DASFactory/Download/IEventInfoAggregate.cs
|
||||
- Common/DTS.CommonCore/Interface/DASFactory/Download/IUARTDownload.cs
|
||||
- Common/DTS.CommonCore/Interface/DASFactory/Download/IUARTDownloadRequest.cs
|
||||
- Common/DTS.CommonCore/Interface/DASFactory/Download/IUARTEventInfo.cs
|
||||
- Common/DTS.CommonCore/Interface/DASFactory/Download/IDownloadRequest.cs
|
||||
- Common/DTS.CommonCore/Interface/DASFactory/Download/IDownload.cs
|
||||
- Common/DTS.CommonCore/Interface/DASFactory/Download/IEventInfo.cs
|
||||
generated_at: "2026-04-16T02:35:54.395482+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "efc5c7e5b438d0a3"
|
||||
---
|
||||
|
||||
# Download
|
||||
|
||||
## Documentation: DAS Factory Download Interfaces
|
||||
|
||||
### 1. Purpose
|
||||
This module defines a set of interfaces for interacting with DAS (Distributed Acoustic Sensing) devices to retrieve event data and UART stream data. It provides a standardized contract for querying stored events, specifying download requests (including sub-sampling and timestamp ranges), and managing metadata such as download status, GUIDs, fault flags, and arm attempts. The interfaces support both analog channel data (`IDownload`, `IEventInfo`) and serial UART data (`IUARTDownload`, `IUARTEventInfo`), enabling modular and consistent data retrieval workflows within the DASFactory system.
|
||||
|
||||
---
|
||||
|
||||
### 2. Public Interface
|
||||
|
||||
#### Interfaces (no concrete implementations provided in source)
|
||||
|
||||
##### `IDownloadReport`
|
||||
- **`IEventInfo[] Events { get; set; }`**
|
||||
Array of all standard (analog) events stored on the DAS. Index corresponds to event numbers (0-based or 1-based indexing not specified).
|
||||
- **`IUARTEventInfo[] UARTEvents { get; set; }`**
|
||||
Array of all UART events stored on the DAS. Index corresponds to event numbers.
|
||||
|
||||
##### `IEventInfoAggregate`
|
||||
- **`string EventId { get; set; }`**
|
||||
Identifier for the event.
|
||||
- **`string EventDescription { get; set; }`**
|
||||
Human-readable description of the event.
|
||||
- **`double DurationSeconds { get; set; }`**
|
||||
Duration of the event in seconds.
|
||||
- **`string GUID { get; set; }`**
|
||||
Globally unique identifier for the event.
|
||||
- **`bool HasBeenDownloaded { get; set; }`**
|
||||
Flag indicating whether the event has been downloaded.
|
||||
- **`bool WasTriggered { get; set; }`**
|
||||
Flag indicating whether the event was triggered.
|
||||
- **`int NumberOfChannels { get; set; }`**
|
||||
Number of channels recorded in the event.
|
||||
- **`ulong NumberOfSamples { get; set; }`**
|
||||
Total number of samples across all channels.
|
||||
- **`ulong NumberOfBytes { get; set; }`**
|
||||
Total size of the event data in bytes.
|
||||
- **`bool Faulted { get; set; }`**
|
||||
Flag indicating whether the event ended in a faulted state.
|
||||
- **`int EventNumber { get; set; }`**
|
||||
Event number.
|
||||
- **`void Add(IEventInfo newEvent)`**
|
||||
Adds an `IEventInfo` instance to this aggregate (likely for building a composite view).
|
||||
|
||||
##### `IUARTDownload`
|
||||
- **`uint BaudRate { get; }`**
|
||||
Current UART baud rate (read-only; populated by DASFactory).
|
||||
- **`uint DataBits { get; }`**
|
||||
UART data bits configuration.
|
||||
- **`StopBits StopBits { get; }`**
|
||||
UART stop bits configuration (from `System.IO.Ports`).
|
||||
- **`Parity Parity { get; }`**
|
||||
UART parity configuration.
|
||||
- **`Handshake FlowControl { get; }`**
|
||||
UART flow control configuration.
|
||||
- **`UartDataFormat DataFormat { get; }`**
|
||||
UART data format (from `DTS.Common.Enums`).
|
||||
- **`IUARTDownloadRequest WhatUARTToDownload { get; set; }`**
|
||||
Request specifying which UART event and data range to download.
|
||||
- **`void SetWhatUARTToDownload(IUARTDownloadRequest request, bool bSetInDb = true)`**
|
||||
Sets the UART download request; optionally persists to database.
|
||||
|
||||
##### `IUARTDownloadRequest`
|
||||
- **`ushort EventNumber { get; set; }`**
|
||||
Event number from which to download UART data.
|
||||
- **`ulong TotalByteCount { get; set; }`**
|
||||
Total number of bytes in the UART stream for this event.
|
||||
- **`ulong TriggerByteCount { get; set; }`**
|
||||
Byte offset where the trigger occurred in the UART stream.
|
||||
- **`ulong FaultByteCount { get; set; }`**
|
||||
Byte offset where a fault occurred (if any).
|
||||
- **`ulong StartTimestamp { get; set; }`**
|
||||
Start timestamp of the UART stream (units not specified; likely microseconds or nanoseconds).
|
||||
- **`ulong EndTimestamp { get; set; }`**
|
||||
End timestamp of the UART stream.
|
||||
- **`int BaudRate { get; set; }`**
|
||||
Baud rate used during UART recording.
|
||||
|
||||
##### `IUARTEventInfo`
|
||||
- **`ushort EventNumber { get; set; }`**
|
||||
Event number.
|
||||
- **`bool DataPresent { get; set; }`**
|
||||
Flag indicating whether UART data exists for this event.
|
||||
- **`bool DataDownloaded { get; set; }`**
|
||||
Flag indicating whether UART data has been downloaded.
|
||||
- **`ulong TotalByteCount { get; set; }`**
|
||||
Total bytes in UART stream.
|
||||
- **`ulong TriggerByteCount { get; set; }`**
|
||||
Byte offset of trigger.
|
||||
- **`ulong FaultByteCount { get; set; }`**
|
||||
Byte offset of fault (if any).
|
||||
- **`ulong StartTimestamp { get; set; }`**
|
||||
Start timestamp.
|
||||
- **`ulong EndTimestamp { get; set; }`**
|
||||
End timestamp.
|
||||
- **`uint BaudRate { get; set; }`**
|
||||
Baud rate during recording.
|
||||
|
||||
##### `IDownloadRequest`
|
||||
- **`ushort EventNumber { get; set; }`**
|
||||
Event number to download.
|
||||
- **`byte DASChannelNumber { get; set; }`**
|
||||
Channel number; `ALL_CHANNELS` constant implied (value not provided).
|
||||
- **`ulong StartSample { get; set; }`**
|
||||
First sample index to download.
|
||||
- **`ulong EndSample { get; set; }`**
|
||||
Last sample index to download.
|
||||
- **`ulong SamplesToSkip { get; set; }`**
|
||||
Sub-sampling factor: `0` or `1` = no sub-sampling; `n > 1` = keep every *n*th sample.
|
||||
**Constraint**: `(EndSample - StartSample + 1)` must be divisible by `SamplesToSkip`.
|
||||
- **`double StartRecordTimestampSec { get; set; }`**
|
||||
Start timestamp in seconds (integer part).
|
||||
- **`double TriggerTimestampSec { get; set; }`**
|
||||
Trigger timestamp in seconds (integer part).
|
||||
- **`double StartRecordTimestampNanoSec { get; set; }`**
|
||||
Fractional part of start timestamp in nanoseconds.
|
||||
- **`double TriggerTimestampNanoSec { get; set; }`**
|
||||
Fractional part of trigger timestamp in nanoseconds.
|
||||
- **`bool PTPMasterSync { get; set; }`**
|
||||
Flag indicating whether PTP (Precision Time Protocol) master sync was used.
|
||||
|
||||
##### `IDownload`
|
||||
- **`IDownloadRequest WhatToDownload { get; set; }`**
|
||||
Request specifying what data to download.
|
||||
- **`void SetWhatToDownload(IDownloadRequest request, bool bSetInDb = true)`**
|
||||
Sets the download request; optionally persists to database.
|
||||
- **`IDownloadReport EventInfo { get; set; }`**
|
||||
Metadata about stored events (populated by DASFactory).
|
||||
- **`void SetEventInfo(IDownloadReport eventInfo, bool bSetInDb = true)`**
|
||||
Sets event metadata; optionally persists to database.
|
||||
- **`bool[] EventDownloadedStatus { get; set; }`**
|
||||
Array (indexed by event number) indicating whether each event has been downloaded.
|
||||
- **`void SetEventDownloadStatus(bool[] status, bool storeInDb = true)`**
|
||||
Sets download status array; optionally persists to database.
|
||||
- **`Guid[] EventGuids { get; set; }`**
|
||||
Array (indexed by event number) of event GUIDs.
|
||||
- **`void SetEventGuids(Guid[] guids, bool storeInDb = true)`**
|
||||
Sets GUID array; optionally persists to database.
|
||||
- **`ushort[] FaultFlags { get; set; }`**
|
||||
Array (indexed by event number) of fault flags.
|
||||
- **`void SetEventFaultFlags(ushort[] flags, bool storeInDb = true)`**
|
||||
Sets fault flags array; optionally persists to database.
|
||||
- **`byte[] ArmAttempts { get; set; }`**
|
||||
Array (indexed by event number) of arm attempt counts.
|
||||
- **`void SetEventArmAttemps(byte[] armAttempts, bool storeInDb = true)`**
|
||||
Sets arm attempts array; optionally persists to database.
|
||||
|
||||
##### `IEventInfo`
|
||||
- **`IDASModule[] Modules { get; set; }`**
|
||||
Array of modules involved in the event, indexed by `ModuleArrayIndex`.
|
||||
- **`int EventNumber { get; set; }`**
|
||||
Event number.
|
||||
- **`Guid TestGUID { get; set; }`**
|
||||
GUID of the event.
|
||||
- **`ushort FaultFlags { get; set; }`**
|
||||
Fault flags for the event.
|
||||
- **`ushort FaultFlagsEx { get; set; }`**
|
||||
Extended fault flags.
|
||||
- **`byte ArmAttempts { get; set; }`**
|
||||
Number of arm attempts.
|
||||
- **`DateTime TestTime { get; set; }`**
|
||||
Timestamp of the event.
|
||||
- **`string TestID { get; set; }`**
|
||||
Event ID string.
|
||||
- **`string Description { get; set; }`**
|
||||
Human-readable description.
|
||||
- **`bool HasBeenDownloaded { get; set; }`**
|
||||
Download status flag.
|
||||
- **`bool WasTriggered { get; set; }`**
|
||||
Trigger status flag.
|
||||
- **`void ClearFaults()`**
|
||||
Clears fault flags on the event.
|
||||
|
||||
---
|
||||
|
||||
### 3. Invariants
|
||||
- **`IDownloadRequest.SamplesToSkip` constraint**: `(EndSample - StartSample + 1) % SamplesToSkip == 0`.
|
||||
- **Indexing convention**: Arrays like `Events`, `UARTEvents`, `EventDownloadedStatus`, `EventGuids`, `FaultFlags`, and `ArmAttempts` are indexed by event number (type `int` or `ushort`), though exact offset (0-based vs. 1-based) is not specified.
|
||||
- **`IUARTEventInfo.BaudRate` vs `IUARTDownloadRequest.BaudRate`**:前者 is `uint`, latter is `int`. This may indicate a design inconsistency or domain-specific constraint (e.g., baud rates ≥ 0).
|
||||
- **`IDownloadRequest` timestamp decomposition**: `StartRecordTimestampSec` and `StartRecordTimestampNanoSec` together form a full timestamp; similarly for `TriggerTimestampSec`/`TriggerTimestampNanoSec`.
|
||||
- **`IEventInfo.Modules` indexing**: Must be accessed via `ModuleArrayIndex` of corresponding `IDASModule` instances.
|
||||
- **`IDownloadRequest.DASChannelNumber`**: Value `ALL_CHANNELS` (not defined here) implies download all channels.
|
||||
|
||||
---
|
||||
|
||||
### 4. Dependencies
|
||||
- **Imports/Usings**:
|
||||
- `DTS.Common.Interface.DownloadEvent` (for `IEventInfo`, `IUARTEventInfo` interfaces—*not defined in provided source*).
|
||||
- `DTS.Common.Enums` (for `UartDataFormat`, `StopBits`, `Parity`, `Handshake`—*not defined in provided source*).
|
||||
- `System.IO.Ports` (for `StopBits`, `Parity`, `Handshake` enums).
|
||||
- `System` (for `Guid`, `DateTime`, `Array`, etc.).
|
||||
- **Depended upon by**:
|
||||
- Likely consumed by `DASFactory` components (e.g., download logic, UI, database sync).
|
||||
- `IEventInfoAggregate` suggests aggregation logic (e.g., event grouping or summary generation).
|
||||
- **Assumed dependencies**:
|
||||
- `IDASModule` (referenced in `IEventInfo.Modules`) is defined elsewhere (not provided).
|
||||
- `ALL_CHANNELS` constant (referenced in `IDownloadRequest`) is defined elsewhere.
|
||||
|
||||
---
|
||||
|
||||
### 5. Gotchas
|
||||
- **`SetEventArmAttemps` typo**: Method name is `SetEventArmAttemps` (missing "t" in "Attempts") in `IDownload`. Likely a legacy typo.
|
||||
- **`IUARTDownloadRequest.BaudRate` vs `IUARTEventInfo.BaudRate`**: Type mismatch (`int` vs `uint`) may cause conversion issues or indicate inconsistent design.
|
||||
- **Timestamp units**: `StartTimestamp`, `EndTimestamp`, `TriggerByteCount`, etc., in `IUARTDownloadRequest` and `IUARTEventInfo` are `ulong` but units (e.g., µs, ns, ticks) are not documented.
|
||||
- **`SamplesToSkip` edge case**: `SamplesToSkip = 0` is explicitly disallowed by the constraint (division by zero risk), but documentation says "0 (or 1)"—likely a documentation error.
|
||||
- **Array indexing ambiguity**: No guarantee that event numbers map directly to array indices (e.g., sparse event numbering).
|
||||
- **`DataFormat` enum**: `UartDataFormat` is imported but not defined; its structure and valid values are unknown.
|
||||
- **`IDownloadRequest` timestamp precision**: Splitting timestamps into `Sec` and `NanoSec` fields may introduce rounding or overflow issues if not handled carefully.
|
||||
- **`ClearFaults()` behavior**: No documentation on whether clearing faults affects `FaultFlags`, `FaultFlagsEx`, or persistent state.
|
||||
|
||||
None identified beyond the above.
|
||||
@@ -0,0 +1,36 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.CommonCore/Interface/DTS.Common.CPU/IcpuEngine.cs
|
||||
generated_at: "2026-04-16T02:23:04.056121+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "920a09a2c868b9d9"
|
||||
---
|
||||
|
||||
# DTS.Common.CPU
|
||||
|
||||
1. **Purpose**
|
||||
This file defines the `ICPUEngine` interface, which serves as the foundational contract for CPU engine implementations within the DTS.CommonCore module. As it extends `IBaseClass`, it inherits base functionality (presumably common to all core components), but the interface itself currently carries no additional members—its purpose is likely to act as a marker or placeholder interface for future extensibility, or to establish a consistent type hierarchy for CPU-related engine components in the system.
|
||||
|
||||
2. **Public Interface**
|
||||
No public methods, properties, or events are declared directly on `ICPUEngine`. As an interface inheriting from `IBaseClass`, its public surface is limited to whatever members `IBaseClass` defines (not shown in this source file). Therefore, the only public type is:
|
||||
|
||||
- **`interface ICPUEngine : IBaseClass`**
|
||||
A marker/contract interface for CPU engine implementations. No behavior is specified in this file.
|
||||
|
||||
3. **Invariants**
|
||||
- `ICPUEngine` must be implemented by any class intended to represent a CPU engine in the system.
|
||||
- Any implementation must also satisfy the contract of `IBaseClass` (though its members are not visible here).
|
||||
- No additional runtime or structural invariants are expressible from this source alone.
|
||||
|
||||
4. **Dependencies**
|
||||
- **Depends on**:
|
||||
- `DTS.Common.Base` namespace (specifically, `IBaseClass`).
|
||||
- **Depended on by**:
|
||||
- Not determinable from this file alone. Likely consumed by higher-level CPU management or orchestration components (e.g., engine factories, scheduler modules), but concrete consumers are not visible here.
|
||||
|
||||
5. **Gotchas**
|
||||
- The interface is currently empty beyond inheritance—this may indicate incomplete development, intentional extensibility, or reliance on convention/attributes for behavior.
|
||||
- Developers may mistakenly assume `ICPUEngine` provides CPU-specific functionality; in reality, it conveys only type identity at this stage.
|
||||
- Behavior expectations (e.g., lifecycle, threading model, initialization requirements) are undefined in this file and must be inferred from `IBaseClass` or implementation classes.
|
||||
- None identified from source alone.
|
||||
@@ -0,0 +1,147 @@
|
||||
---
|
||||
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-16T02:21:13.869650+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "fed47436f7c090f0"
|
||||
---
|
||||
|
||||
# DTS.Viewer
|
||||
|
||||
## Documentation: Viewer Interface Module (`DTS.Common.Interface` – Viewer Subspace)
|
||||
|
||||
---
|
||||
|
||||
### 1. **Purpose**
|
||||
|
||||
This module defines a set of interfaces that collectively establish the contract for the *view layer* of the DTS Viewer application, following a MVVM (Model-View-ViewModel) pattern. It provides strongly-typed abstractions for UI components (e.g., tabs, panels, properties, diagnostics, statistics), their corresponding view models, and shell-level hosting structures. These interfaces serve as the foundational abstraction layer between UI implementation (e.g., WPF views) and business logic (view models and modules), enabling modular composition, testability, and decoupled development. The interfaces are grouped into *view* and *view model* pairs (e.g., `ITabView`/`ITabViewModel`) and are used by Prism-based modules (`IViewerModule`, `IPSDReportModule`) to manage application lifecycle and region context.
|
||||
|
||||
---
|
||||
|
||||
### 2. **Public Interface**
|
||||
|
||||
#### **View Interfaces (all inherit `IBaseView`)**
|
||||
|
||||
| Interface | Description |
|
||||
|-----------|-------------|
|
||||
| `ITabView` | Represents a tab container view. |
|
||||
| `IDiagView` | Represents a diagnostics view. |
|
||||
| `ITestsView` | Represents a tests view. |
|
||||
| `IStatsView` | Represents a statistics view. |
|
||||
| `ICursorView` | Represents a cursor view (likely for time/frequency cursor markers). |
|
||||
| `IViewerView` | Represents the main viewer view (note: `IViewerViewModel` incorrectly documents its view as `ITestsView` in summary; actual property is `IViewerView`). |
|
||||
| `ITabItemView` | Represents an individual tab item within a tab container. |
|
||||
| `IPropertyView` | Represents a property display/edit view. |
|
||||
| `IViewerShellView` | Represents the top-level shell/container view for the viewer application. |
|
||||
| `IGraphPropertyView` | Represents a graph-specific property view. |
|
||||
| `IDockPanelVerticalView` | Represents a vertically-oriented dock panel view. |
|
||||
| `IDockPanelHorizontalView` | Represents a horizontally-oriented dock panel view. |
|
||||
| `IMainLiteView` | Extends `IBaseView` and exposes named WPF regions (`MainShell`, `MainRegion`, `NavigationRegion`, `HorizontalTabRegion`, `VerticalTabRegion`) for layout composition. |
|
||||
| `IMainViewerView` | Extends `IBaseView`; currently has no members (commented-out region properties suggest possible future or legacy use). |
|
||||
|
||||
#### **ViewModel Interfaces (all inherit `IBaseViewModel`)**
|
||||
|
||||
| Interface | Description |
|
||||
|-----------|-------------|
|
||||
| `ITabViewModel` | ViewModel for `ITabView`; exposes `View` property of type `ITabView`. |
|
||||
| `IDiagViewModel` | ViewModel for `IDiagView`; exposes `View` property of type `IDiagView`. |
|
||||
| `ITestsViewModel` | ViewModel for `ITestsView`; exposes `View` property of type `ITestsView`. |
|
||||
| `IStatsViewModel` | ViewModel for `IStatsView`; exposes `View` property of type `IStatsView`. |
|
||||
| `ICursorViewModel` | ViewModel for `ICursorView`; exposes `View` property of type `ICursorView`. |
|
||||
| `IViewerViewModel` | ViewModel for `IViewerView`; exposes `View` property of type `IViewerView`. |
|
||||
| `IPropertyViewModel` | ViewModel for `IPropertyView`; exposes `View` property of type `IPropertyView`. |
|
||||
| `IGraphPropertyViewModel` | ViewModel for `IGraphPropertyView`; exposes `View` property of type `IGraphPropertyView`. |
|
||||
| `IDockPanelVerticalViewModel` | ViewModel for `IDockPanelVerticalView`; exposes `View` property of type `IDockPanelVerticalView`. |
|
||||
| `IDockPanelHorizontalViewModel` | ViewModel for `IDockPanelHorizontalView`; exposes `View` property of type `IDockPanelHorizontalView`. |
|
||||
| `ITabItemViewModel` | ViewModel for `ITabItemView`; exposes `View` (`ITabItemView`) and `Parent` (`ITabViewModel`). |
|
||||
| `IViewerShellViewModel` | ViewModel for `IViewerShellView`; exposes `View`, `ContextMainRegion`, and `GetRegions()` (returns `List<FrameworkElement>`). |
|
||||
| `IMainLiteViewModel` | ViewModel for `IMainView` (note: interface declares `IMainView`, but no `IMainView` interface is defined in this file set); exposes `View`, region contexts (`ContextMainRegion`, etc.), and `GetRegions()`. |
|
||||
| `IMainViewerViewModel` | ViewModel for `IBaseView`; exposes `View`, region contexts, and `GetRegions()`. |
|
||||
| `ISelectedDataViewModel` | Manages selected data file/folder state; exposes `SelectedDataFolder`, `SelectedDataFile`, and `SelectAndIncludeDataFile(string file)`. |
|
||||
|
||||
#### **Delegate**
|
||||
|
||||
| Delegate | Signature | Description |
|
||||
|----------|-----------|-------------|
|
||||
| `SetReadCalcProgressValueDelegate` | `delegate void(string message = "", double value = -1D)` | Used to report progress during read/calculation operations. |
|
||||
|
||||
#### **Module Interfaces (Prism `IModule`)**
|
||||
|
||||
| Interface | Description |
|
||||
|-----------|-------------|
|
||||
| `IViewerModule` | Extends `IModule`; defines `StartSession(bool standalone, string pluginFolder = "")` for initializing the viewer module. |
|
||||
| `IPSDReportModule` | Extends `IModule`; defines `StartSession(bool standalone, string pluginFolder = "")` for initializing the PSD report module. |
|
||||
|
||||
---
|
||||
|
||||
### 3. **Invariants**
|
||||
|
||||
- **All view interfaces inherit `IBaseView`** — implies a common base contract for UI components (though `IBaseView` itself is not defined here).
|
||||
- **All view model interfaces inherit `IBaseViewModel`** — implies a common base contract for view models.
|
||||
- **Each `IXXXViewModel` interface exposes a read-only `View` property of type `IXXXView`** — enforcing a strict one-to-one pairing between view and view model.
|
||||
- **`ITabItemViewModel` is the only interface with a non-`View` property (`Parent: ITabViewModel`)** — indicating hierarchical containment.
|
||||
- **Region context properties (`ContextMainRegion`, `ContextNavigationRegion`, etc.) are of type `object`** — allowing flexible assignment of arbitrary view instances or data contexts.
|
||||
- **`GetRegions()` returns `List<FrameworkElement>`** — used to register or query WPF UI regions (e.g., for Prism region management).
|
||||
- **`ISelectedDataViewModel` is *not* tied to a view/view model pair** — it is a standalone interface for data selection state, likely consumed by multiple view models.
|
||||
|
||||
---
|
||||
|
||||
### 4. **Dependencies**
|
||||
|
||||
#### **Internal Dependencies**
|
||||
- **`DTS.Common.Base`**: All interfaces depend on `IBaseView` and `IBaseViewModel` (defined elsewhere in `DTS.Common.Base`).
|
||||
- **`Microsoft.Practices.Prism.Modularity`**: `IViewerModule` and `IPSDReportModule` depend on Prism’s `IModule` interface.
|
||||
|
||||
#### **External Dependencies**
|
||||
- **WPF (`System.Windows`, `System.Windows.Controls`)**: Used in `IMainLiteView`, `IMainViewerView`, `IViewerShellViewModel`, `IMainLiteViewModel`, and `IMainViewerViewModel` via `FrameworkElement`, `StackPanel`, `ContentControl`.
|
||||
|
||||
#### **Consumers (Inferred)**
|
||||
- **Prism-based modules** (`IViewerModule`, `IPSDReportModule`) likely implement these interfaces to register views and view models with the shell.
|
||||
- **View implementations** (e.g., WPF `UserControl`s) will implement the `I*View` interfaces.
|
||||
- **ViewModel implementations** will implement the `I*ViewModel` interfaces and bind to their corresponding views.
|
||||
- **`ISelectedDataViewModel`** is likely injected into or consumed by multiple view models (e.g., `ITestsViewModel`, `IViewerViewModel`) to manage data selection state.
|
||||
|
||||
---
|
||||
|
||||
### 5. **Gotchas**
|
||||
|
||||
- **`IViewerViewModel` summary comment is misleading**: The XML doc says `/// Gets the Tests View.`, but the property is `IViewerView View { get; }`. This is likely a copy-paste error in documentation.
|
||||
- **`IMainLiteViewModel` references `IMainView`**, but no `IMainView` interface is defined in this file set — only `IMainLiteView` and `IMainViewerView` exist. This may indicate an incomplete or missing interface definition.
|
||||
- **`IMainViewerView` has no members**: Its region properties are commented out, suggesting it may be a placeholder or legacy artifact.
|
||||
- **No explicit validation or ordering guarantees**: Interfaces define *what* is exposed, not *how* or *when* (e.g., no guarantees about `SelectAndIncludeDataFile` atomicity or thread-safety).
|
||||
- **Delegate `SetReadCalcProgressValueDelegate` has no documented usage context**: Its purpose is clear (progress reporting), but its integration point (e.g., which view model exposes it) is not specified here.
|
||||
- **No `using` directives for `System.Collections.Generic` or `System.Windows` in some files** — implies reliance on global aliases or implicit usings (e.g., via `DTS.Common.Base`), but this is not visible in the source.
|
||||
|
||||
None identified beyond the above.
|
||||
@@ -0,0 +1,84 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.CommonCore/Interface/DTS.Viewer/CalculatedChannel/IAddCalculatedChannelView.cs
|
||||
- Common/DTS.CommonCore/Interface/DTS.Viewer/CalculatedChannel/IAddCalculatedChannelViewModel.cs
|
||||
generated_at: "2026-04-16T02:33:14.120126+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "720d768a9bb759bc"
|
||||
---
|
||||
|
||||
# CalculatedChannel
|
||||
|
||||
## Documentation: `IAddCalculatedChannelView` and `IAddCalculatedChannelViewModel`
|
||||
|
||||
---
|
||||
|
||||
### 1. **Purpose**
|
||||
|
||||
This module defines the MVVM (Model-View-ViewModel) interface contract for a UI component used to *add a new calculated channel* in the DTS Viewer application. It enables user interaction to configure and submit a new calculated channel definition, with support for grouping, encoding settings, and integration with a search region (likely for channel/channel-group discovery). The interfaces serve as decoupled abstractions between the view (UI layer) and view model (business logic layer), following the project’s base interface hierarchy (`IBaseView`, `IBaseViewModel`).
|
||||
|
||||
---
|
||||
|
||||
### 2. **Public Interface**
|
||||
|
||||
#### `IAddCalculatedChannelView`
|
||||
- **Type**: `interface`
|
||||
- **Inherits**: `IBaseView`
|
||||
- **Behavior**: Represents the *view* (e.g., XAML user control) for the add-calculated-channel dialog. No additional members beyond the base view contract are declared—implementation details are expected in the concrete view class.
|
||||
|
||||
#### `IAddCalculatedChannelViewModel`
|
||||
- **Type**: `interface`
|
||||
- **Inherits**: `IBaseViewModel`
|
||||
- **Members**:
|
||||
- `IBaseView View { get; set; }`
|
||||
Gets or sets the associated view instance (the concrete implementation of `IAddCalculatedChannelView`). Enables bidirectional linkage between view and view model.
|
||||
- `IBaseViewModel Parent { get; set; }`
|
||||
Gets or sets the parent view model (e.g., the main channel management view), allowing hierarchical navigation or coordination.
|
||||
- `void PublishChanges();`
|
||||
Commits or submits the current configuration (e.g., channel name, expression, group, encoding) to the underlying system or model. Likely triggers validation and persistence logic.
|
||||
- `bool IncludeGroupNameInISOExport { get; set; }`
|
||||
Gets or sets a flag indicating whether the group name should be included when exporting the calculated channel to ISO format (e.g., for interoperability or metadata preservation).
|
||||
- `int DefaultDTSEncoding { get; set; }`
|
||||
Gets or sets the default encoding (as an integer code, e.g., `0 = UTF8`, `1 = ASCII`, etc.) used for the new channel. Exact encoding semantics are defined elsewhere (e.g., in `DTS.Common.Base` or a related enum).
|
||||
- `ICommand AddCalculatedChannelCommand { get; }`
|
||||
Returns a command (e.g., bound to a “Save” button) that, when executed, invokes the logic to add the calculated channel (likely calls `PublishChanges()` internally).
|
||||
- `object ContextSearchRegion { get; set; }`
|
||||
Gets or sets a region/context object used for channel/channel-group search operations (e.g., a container or scope for search results). Type is `object`, suggesting flexibility but low type safety.
|
||||
|
||||
---
|
||||
|
||||
### 3. **Invariants**
|
||||
|
||||
- `View` and `Parent` must be non-null after initialization and before `PublishChanges()` is called (implied by typical MVVM patterns, though not explicitly enforced in the interface).
|
||||
- `AddCalculatedChannelCommand` must be non-null and executable (i.e., `CanExecute` returns `true` when the input is valid).
|
||||
- `DefaultDTSEncoding` must be a valid encoding identifier recognized by the DTS system (e.g., matching values in a known `DTSEncoding` enum or constant set).
|
||||
- `IncludeGroupNameInISOExport` must be respected during export operations (e.g., if `true`, group metadata must appear in the ISO output).
|
||||
- `ContextSearchRegion` must be compatible with the search logic used by the view (e.g., if the view expects a `SearchRegionContext`, assigning an incompatible type will cause runtime failure).
|
||||
|
||||
---
|
||||
|
||||
### 4. **Dependencies**
|
||||
|
||||
- **Internal Dependencies**:
|
||||
- `DTS.Common.Base.IBaseView` and `DTS.Common.Base.IBaseViewModel` — base interfaces for view/view model layers.
|
||||
- `System.Windows.Input.ICommand` — WPF command infrastructure.
|
||||
- **Inferred Consumers**:
|
||||
- A concrete implementation of `IAddCalculatedChannelView` (e.g., `AddCalculatedChannelView.xaml.cs`).
|
||||
- A concrete implementation of `IAddCalculatedChannelViewModel` (e.g., `AddCalculatedChannelViewModel`).
|
||||
- Likely used by a parent view model (e.g., `ChannelManagerViewModel`) that instantiates and hosts this dialog/view model.
|
||||
- **External Dependencies**:
|
||||
- WPF (via `ICommand` and likely XAML binding).
|
||||
- `DTS.Common.Base` assembly (for base interfaces).
|
||||
|
||||
---
|
||||
|
||||
### 5. **Gotchas**
|
||||
|
||||
- **Ambiguous `ContextSearchRegion` type**: The property is typed as `object`, making it unclear what concrete types are expected or supported. Consumers must rely on documentation or implementation details to avoid runtime type mismatches.
|
||||
- **No explicit validation or error reporting**: The interface does not define properties like `IsValid` or `ErrorMessage`, suggesting error handling may be implicit (e.g., via command `CanExecute` state or side effects of `PublishChanges()`).
|
||||
- **`DefaultDTSEncoding` is an `int`**: Using a raw integer instead of an enum or strongly-typed constant increases risk of invalid values (e.g., `-1`, `999`). Validation must occur at runtime.
|
||||
- **No cancellation support**: The interface lacks a `CancelCommand` or `IsCancellationRequested` flag—users may assume cancellation is possible, but it is not surfaced here.
|
||||
- **No documentation for `PublishChanges()` semantics**: It is unclear whether this method performs validation, throws exceptions on failure, or returns status. Implementation-specific behavior must be consulted.
|
||||
|
||||
*None identified beyond the above.*
|
||||
@@ -0,0 +1,107 @@
|
||||
---
|
||||
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-16T02:34:12.071463+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "a0d576d041a71e53"
|
||||
---
|
||||
|
||||
# ChartOptions
|
||||
|
||||
## Documentation Page: Chart Options Module
|
||||
|
||||
### 1. Purpose
|
||||
This module defines the core interfaces for the chart options UI layer in the DTS Viewer subsystem. It establishes the MVVM (Model-View-ViewModel) contract for configuring chart display parameters—such as timebase, voltage range, filtering, cursor visibility, and data export—within a charting context. The interfaces `IChartOptionsView`, `IChartOptionsViewModel`, and `IChartOptionsModel` collectively enable separation of concerns between UI presentation, state management, and business logic, supporting features like zoom/t-scale resets, PDF export, and dynamic unit display (e.g., V vs. mV).
|
||||
|
||||
---
|
||||
|
||||
### 2. Public Interface
|
||||
|
||||
#### `IChartOptionsView`
|
||||
- **Inherits**: `IBaseView`
|
||||
- **Description**: Marker interface for the view (UI) component of the chart options panel. No additional members beyond base view contract.
|
||||
|
||||
#### `IChartOptionsViewModel`
|
||||
- **Inherits**: `IBaseViewModel`
|
||||
- **Properties**:
|
||||
- `IBaseView View { get; set; }` – Reference to the associated view instance.
|
||||
- `IBaseViewModel Parent { get; set; }` – Reference to the parent view model (e.g., main chart view model).
|
||||
- `IChartOptionsModel Model { get; set; }` – Reference to the underlying data model.
|
||||
- `object ContextSearchRegion { get; set; }` – Context object for search/region operations (type not specified; likely used for interop or region selection).
|
||||
- **Methods**:
|
||||
- `void PublishChanges()` – Commits pending configuration changes (e.g., updated filters, scale, units).
|
||||
- `void ResetZoomMethod()` – Resets Y-axis zoom to default/full scale.
|
||||
- `void ResetTMethod()` – Resets T-axis (timebase) zoom/limits to default.
|
||||
- `void SaveToPDFMethod()` – Triggers export of the current chart view to PDF.
|
||||
- `void ShowCusor(bool value)` – Controls visibility of the primary cursor (note: typo in method name—`Cusor` instead of `Cursor`).
|
||||
- `void ShowMinMaxCursor(bool value)` – Controls visibility of min/max cursor indicators.
|
||||
|
||||
#### `IChartOptionsModel`
|
||||
- **Inherits**: `IBaseModel`
|
||||
- **Properties**:
|
||||
- `bool SupportsADC { get; set; }` – True if all channels support analog-to-digital conversion.
|
||||
- `bool SupportsMV { get; set; }` – True if all channels support millivolt measurements.
|
||||
- `bool DisplayingVolts { get; set; }` – True if units are displayed in Volts; false implies mV.
|
||||
- `string MVOrV { get; }` – Returns `"V"` or `"mV"` based on `DisplayingVolts`.
|
||||
- `List<double> FullScaleValues { get; set; }` – Available full-scale range options (e.g., [1, 5, 10] for Volts).
|
||||
- `double SelectedFullScaleValue { get; set; }` – Currently selected full-scale value.
|
||||
- `double MinFixedY { get; set; }` / `MaxFixedY { get; set; }` – Fixed Y-axis range limits.
|
||||
- `double MinFixedT { get; set; }` / `MaxFixedT { get; set; }` – Fixed T-axis (time) range limits.
|
||||
- `bool LockedT { get; set; }` – True if T-axis range is locked (immutable).
|
||||
- `bool LockedY { get; set; }` – True if Y-axis range is locked.
|
||||
- `bool ShowCursor { get; set; }` – Controls primary cursor visibility.
|
||||
- `string CurrentCursorValues { get; set; }` – String representation of current cursor positions (e.g., "t=1.23s, y=4.56mV").
|
||||
- `YRangeScaleEnum YRange { get; set; }` – Enumerated Y-axis scaling mode (e.g., Auto, Fixed, Full).
|
||||
- `ChartUnitTypeEnum UnitType { get; set; }` – Enumerated unit type for Y-axis (e.g., Voltage, Current).
|
||||
- `TimeUnitTypeEnum TimeUnitType { get; set; }` – Enumerated unit type for T-axis (e.g., Seconds, Milliseconds).
|
||||
- `string UnitTypeDescription { get; }` – Human-readable description of `UnitType` (e.g., "Voltage (mV)").
|
||||
- `FilterOptionEnum Filter { get; set; }` – Selected filter option (e.g., None, Lowpass, Highpass).
|
||||
- `IFilterClass SelectedFilter { get; set; }` – Concrete filter instance corresponding to `Filter`.
|
||||
- `bool IsCursorsAvailable { get; set; }` – True if cursor functionality is enabled for the current chart.
|
||||
- `bool CanPublishChanges { get; set; }` – Indicates whether `PublishChanges()` should be allowed (e.g., after validation).
|
||||
- `bool ReadData { get; set; }` – Controls whether live data acquisition is active.
|
||||
- `bool IsDigitalChannel { get; set; }` – True if the chart displays digital (logic) channel data.
|
||||
- `bool DecimateData { get; set; }` – True if data decimation is applied for performance.
|
||||
- `long WidthPoints { get; set; }` – Number of data points displayed horizontally (resolution).
|
||||
- **Commands (Prism `DelegateCommand`)**:
|
||||
- `DelegateCommand ResetZoomCommand { get; }` – Binds to `ResetZoomMethod()` (via ViewModel).
|
||||
- `DelegateCommand ResetTCommand { get; }` – Binds to `ResetTMethod()` (via ViewModel).
|
||||
- `DelegateCommand SaveToPDFCommand { get; }` – Binds to `SaveToPDFMethod()` (via ViewModel).
|
||||
- **Relationships**:
|
||||
- `IChartOptionsViewModel Parent { get; set; }` – Back-reference to the owning view model.
|
||||
|
||||
---
|
||||
|
||||
### 3. Invariants
|
||||
- `IChartOptionsModel.MVOrV` is derived from `DisplayingVolts` and must return `"V"` when `DisplayingVolts == true`, otherwise `"mV"`.
|
||||
- `IChartOptionsModel.UnitTypeDescription` is derived from `UnitType` and must reflect the current unit type’s human-readable form.
|
||||
- `IChartOptionsModel.Filter` and `SelectedFilter` must be kept in sync: setting `Filter` should update `SelectedFilter` to a corresponding `IFilterClass` instance.
|
||||
- `IChartOptionsModel.IsCursorsAvailable` must be `false` for digital channels (`IsDigitalChannel == true`), as cursors are typically analog-only.
|
||||
- `IChartOptionsModel.LockedT` and `LockedY` imply that `MinFixedT/MaxFixedT` and `MinFixedY/MaxFixedY` are immutable during the lock period.
|
||||
- `IChartOptionsViewModel.Model` must be non-null and consistent with `IChartOptionsModel.Parent`.
|
||||
|
||||
---
|
||||
|
||||
### 4. Dependencies
|
||||
- **Dependencies *of* this module**:
|
||||
- `DTS.Common.Base` (provides `IBaseView`, `IBaseViewModel`, `IBaseModel`).
|
||||
- `DTS.Common.Enums.Viewer` (provides `YRangeScaleEnum`, `ChartUnitTypeEnum`, `TimeUnitTypeEnum`).
|
||||
- `DTS.Common.Interface.Sensors.SoftwareFilters` (provides `IFilterClass`).
|
||||
- `Microsoft.Practices.Prism.Commands` (provides `DelegateCommand`).
|
||||
- **Dependencies *on* this module**:
|
||||
- Any charting UI component requiring configuration (e.g., `IChartView`/`IChartViewModel`) likely consumes `IChartOptionsViewModel` and/or `IChartOptionsModel`.
|
||||
- Data acquisition or rendering logic may depend on `IChartOptionsModel` properties (e.g., `DecimateData`, `ReadData`, `SelectedFilter`).
|
||||
|
||||
---
|
||||
|
||||
### 5. Gotchas
|
||||
- **Typo in method name**: `ShowCusor(bool)` (should be `ShowCursor`). This is consistent across the source and likely reflects legacy naming.
|
||||
- **Ambiguous `ContextSearchRegion`**: Type is `object` with no documentation—consumers must infer contract (e.g., likely expects a region object from a parent view model or chart control).
|
||||
- **`MVOrV` and `UnitTypeDescription` are read-only**: Their values are computed from other properties; direct assignment is impossible.
|
||||
- **`SelectedFilter` is of type `IFilterClass`**: Implementation must ensure the selected filter instance matches the `Filter` enum value (per comment: "FB 13120 Updated to use IFilterClass").
|
||||
- **No validation rules exposed**: `CanPublishChanges` is a boolean flag but its update logic (e.g., when it becomes `true`) is not defined in this interface.
|
||||
- **No thread-safety guarantees**: All methods/properties assume single-threaded access (common in WPF MVVM but not explicit here).
|
||||
- **None identified from source alone** for digital channel behavior beyond `IsCursorsAvailable`.
|
||||
@@ -0,0 +1,53 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.CommonCore/Interface/DTS.Viewer/Filter/IFilterView.cs
|
||||
- Common/DTS.CommonCore/Interface/DTS.Viewer/Filter/IFilterViewModel.cs
|
||||
generated_at: "2026-04-16T02:33:25.462939+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "0d8966c24bd001af"
|
||||
---
|
||||
|
||||
# Filter
|
||||
|
||||
## 1. Purpose
|
||||
This module defines foundational interfaces for the filtering subsystem within the DTS Viewer component. Specifically, `IFilterView` and `IFilterViewModel` establish the contract for a filter UI layer that adheres to the standard View/ViewModel pattern used across the DTS codebase. `IFilterView` represents the UI presentation layer (likely a control or window), while `IFilterViewModel` encapsulates the state and logic for filter operations—including search context and parent-child relationships—enabling separation of concerns and testability in the viewer’s filtering functionality.
|
||||
|
||||
## 2. Public Interface
|
||||
|
||||
### `IFilterView`
|
||||
- **Signature**: `public interface IFilterView : IBaseView`
|
||||
- **Behavior**: Represents the view (UI) component for the filter. Inherits from `IBaseView`, implying it participates in the base view hierarchy (e.g., supports initialization, lifecycle, or binding contracts defined in `DTS.Common.Base`). No additional members are declared—its purpose is purely to tag/filter-specific views within the type system.
|
||||
|
||||
### `IFilterViewModel`
|
||||
- **Signature**: `public interface IFilterViewModel : IBaseViewModel`
|
||||
- **Behavior**: Represents the ViewModel for the filter UI. Inherits from `IBaseViewModel`, implying it participates in the base ViewModel contract (e.g., property change notification, command handling). It exposes:
|
||||
- `View`: Gets or sets the associated `IBaseView` instance (the corresponding UI view).
|
||||
- `Parent`: Gets or sets the parent `IBaseViewModel` (enabling hierarchical navigation or context propagation).
|
||||
- `ContextSearchRegion`: Gets or sets an `object` representing the scope or region in which search/filter operations apply (e.g., a data container, grid, or document region).
|
||||
|
||||
## 3. Invariants
|
||||
- `IFilterView` must be implemented by classes that serve as the *view* for filter UI (e.g., a `UserControl` or window subclass).
|
||||
- `IFilterViewModel` must be implemented by classes that serve as the *ViewModel* for filter logic.
|
||||
- For any valid `IFilterViewModel` instance:
|
||||
- `View` must be non-null and assignable to an `IFilterView` (though not enforced by the interface itself—this is a *de facto* expectation).
|
||||
- `Parent` may be null (no constraint specified), but if non-null, must be an `IBaseViewModel`.
|
||||
- `ContextSearchRegion` may be null or any object; its semantics are application-specific (e.g., could be a `ICollectionView`, `IEnumerable`, or custom context object).
|
||||
- No ordering, initialization, or lifecycle guarantees are defined beyond those inherited from `IBaseViewModel`/`IBaseView`.
|
||||
|
||||
## 4. Dependencies
|
||||
- **Depends on**:
|
||||
- `DTS.Common.Base` (specifically `IBaseView` and `IBaseViewModel`).
|
||||
- **Depended upon by**:
|
||||
- *Not directly inferable from the source files alone*. However, given the naming and structure, implementations of `IFilterView`/`IFilterViewModel` are likely consumed by:
|
||||
- The DTS Viewer’s main shell or navigation system (to instantiate/filter UI regions).
|
||||
- DI containers or view-model factories (to resolve/filter-related components).
|
||||
- Other modules in `DTS.Common.Interface` (e.g., `IDocumentView`, `IViewerViewModel`) that integrate filtering.
|
||||
- **No external third-party dependencies** are evident from these files.
|
||||
|
||||
## 5. Gotchas
|
||||
- **Ambiguity in `ContextSearchRegion`**: Its type is `object`, with no documentation on expected concrete types or lifecycle (e.g., ownership, disposal). Consumers must infer or document expected usage (e.g., is it a `SearchContext`? A `FrameworkElement`? A `List<object>`?).
|
||||
- **No explicit binding contract**: While `IFilterView`/`IFilterViewModel` imply MVVM binding, the interface itself does not enforce or specify binding paths, command names, or event contracts (e.g., how search is triggered). This is likely handled by convention or base classes.
|
||||
- **Namespace quirk**: `IFilterViewModel` includes `// ReSharper disable CheckNamespace`, suggesting the namespace was intentionally preserved (possibly for legacy compatibility), but this does not affect runtime behavior.
|
||||
- **No versioning or extensibility hooks**: Interfaces are minimal and non-extensible (no methods/events beyond inherited base members). Adding new functionality would require breaking changes or new interfaces.
|
||||
- **None identified from source alone.**
|
||||
@@ -0,0 +1,126 @@
|
||||
---
|
||||
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-16T02:33:34.206978+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "99208da86b0faad5"
|
||||
---
|
||||
|
||||
# Graph View Module Documentation
|
||||
|
||||
## 1. Purpose
|
||||
This module defines the interface contracts for the graphing subsystem within the DTS Viewer, enabling separation of concerns between UI views and their corresponding view models in a MVVM pattern. It provides a structured set of interfaces for managing graph displays, channel selection, test data series, and property views—supporting both time-domain and frequency-domain (FFT/PSD) visualization of test data. The interfaces collectively enable modular UI composition where graph-related functionality (e.g., channel grouping, cursor tracking, report export) is decoupled from implementation details.
|
||||
|
||||
## 2. Public Interface
|
||||
|
||||
### Interfaces (View Layer)
|
||||
- **`IGraphMainView`**
|
||||
Represents the main graph tab view. Inherits `IBaseView`. No additional members defined.
|
||||
|
||||
- **`IGraphChannelView`**
|
||||
Represents the channel selection/view tab. Inherits `IBaseView`. No additional members defined.
|
||||
|
||||
- **`IGraphPropertyView`**
|
||||
Represents the property display tab. Inherits `IBaseView`. No additional members defined.
|
||||
|
||||
- **`ITestDataView`**
|
||||
Represents the test data tab. Inherits `IBaseView`. No additional members defined.
|
||||
|
||||
- **`ITestDataSeriesView`**
|
||||
Represents the view for a single test data series. Inherits `IBaseView`.
|
||||
- `bool SaveReportToPDF(string directory)` – Saves the series report to PDF in the specified directory.
|
||||
- `bool SaveReportToCSV(string directory)` – Saves the series report to CSV in the specified directory.
|
||||
|
||||
- **`IGraphView`**
|
||||
Represents the main graph display view. Inherits `IBaseView`.
|
||||
- *Commented-out method*: `void SetGraphs(ObservableCollection<ITestDataSeries> graphs);` — Not active in current interface.
|
||||
|
||||
### Interfaces (ViewModel Layer)
|
||||
- **`IGraphMainViewModel`**
|
||||
Manages the main graph view and channel/group selection logic. Inherits `IBaseViewModel`.
|
||||
- `IGraphMainView View { get; set; }`
|
||||
- `IBaseViewModel Parent { get; set; }`
|
||||
- `List<ITestChannel> LockedChannelList { get; set; }`
|
||||
- `List<ITestChannel> SelectedChannelList { get; set; }`
|
||||
- `string LockedGroupName { get; set; }`
|
||||
- `void PublishSelectedChannels()` – Commits selected channels for display.
|
||||
- `void AddSelectedChannel(ITestChannel channel)` – Adds a single channel to the selected list.
|
||||
- `void AddSelectedGroupChannels(string groupName, List<ITestChannel> channels)` – Adds a group of channels to the selected list.
|
||||
- `void AddLockedChannel(ITestChannel channel, bool isLocked)` – Adds a channel to the locked list; `isLocked` indicates lock status.
|
||||
- `void AddLockedGroupChannels(string testName, string groupName, List<ITestChannel> channels, bool isLocked)` – Adds a group of channels to the locked list.
|
||||
- `void GraphList_CollectionChanged(object sender, NotifyCollectionChangedEventArgs e)` – Handles collection change events for the graph list.
|
||||
|
||||
- **`IGraphChannelViewModel`**
|
||||
Manages channel selection and grouping for graphing. Inherits `IBaseViewModel`.
|
||||
- `IGraphChannelView View { get; }`
|
||||
- `ObservableCollection<ITestChannel> GraphChannelList { get; set; }`
|
||||
- `ObservableCollection<ITestChannel> SelectedGraphChannelList { get; set; }`
|
||||
- `TestChannel SelectedGraphChannel { get; set; }`
|
||||
|
||||
- **`IGraphPropertyViewModel`**
|
||||
Manages property view. Inherits `IBaseViewModel`.
|
||||
- `IGraphPropertyView View { get; }`
|
||||
|
||||
- **`IGraphViewModel`**
|
||||
Coordinates the main graph view and its data series view. Inherits `IBaseViewModel`.
|
||||
- `IGraphView View { get; }`
|
||||
- `ITestDataSeriesView DataSeriesView { get; set; }`
|
||||
|
||||
- **`ITestDataViewModel`**
|
||||
Manages a single test data series view. Inherits `IBaseViewModel`.
|
||||
- `ITestDataView View { get; set; }`
|
||||
- `ITestDataSeries Model { get; set; }`
|
||||
|
||||
- **`ITestDataSeriesViewModel`**
|
||||
Manages a single test data series view and cursor interaction. Inherits `IBaseViewModel`.
|
||||
- `ITestDataSeriesView View { get; set; }`
|
||||
- `ITestDataSeries Model { get; set; }`
|
||||
- `void MoveCursor(object sender, KeyEventArgs e)` – Handles cursor movement (e.g., keyboard navigation).
|
||||
- `string CurrentCursorValues { get; set; }` – Holds the current cursor position values (e.g., X/Y coordinates).
|
||||
|
||||
## 3. Invariants
|
||||
- All view interfaces (`IGraph*View`, `ITestData*View`) inherit `IBaseView`, implying a consistent base contract for UI components.
|
||||
- All view model interfaces (`IGraph*ViewModel`, `ITestData*ViewModel`) inherit `IBaseViewModel`, implying a consistent base contract for view models.
|
||||
- Each view model exposes a strongly-typed `View` property (e.g., `IGraphView`, `ITestDataSeriesView`)—ensuring one-to-one view/viewmodel pairing.
|
||||
- `ITestDataSeries` implements metadata properties (e.g., `TestGroup`, `ChannelName`, `EngineeringUnits`) and computed statistics (`MinY`, `MaxY`, `AvgY`, `StdDevY`, `PeakFrequency`, `PeakMagnitude`, `GRMS`)—some conditional on `FFT` or `PSD` mode.
|
||||
- `ITestDataSeries.FFT` indicates whether the series is frequency-domain data; `PeakFrequency` and `PeakMagnitude` are only populated when `FFT == true`.
|
||||
- `ITestDataSeries.HIC` is a boolean flag; `HICValue` is a string (likely formatted value).
|
||||
- `ITestDataSeries.GRMS` is only calculated in PSD results graphs (per documentation).
|
||||
- `ITestDataSeries.Description`, `SensorSNDisplay`, `MinY`, `MaxY`, `AvgY`, `StdDevY`, `T1Time`, `T2Time`, `RecordingMode` are read-only (`get;` only).
|
||||
- `ITestDataSeriesViewModel.MoveCursor` uses WPF’s `KeyEventArgs`, implying keyboard-based cursor interaction.
|
||||
|
||||
## 4. Dependencies
|
||||
### Internal Dependencies
|
||||
- **`DTS.Common.Base`** – All interfaces depend on `IBaseView` and `IBaseViewModel` from this namespace.
|
||||
- **`DTS.Common.Events`** – `ITestDataSeriesView` depends on this (though no event types are used in the provided snippet).
|
||||
- **`DTS.Common.Classes.Viewer.TestMetadata`** – `IGraphChannelViewModel` depends on `TestChannel` (imported from this namespace).
|
||||
- **`System.Collections.Generic`**, **`System.Collections.ObjectModel`**, **`System.Collections.Specialized`**, **`System.Windows.Input`**, **`System.Windows.Media`** – Used for collections, commands, and UI types.
|
||||
|
||||
### External Dependencies
|
||||
- **WPF** – Indicated by use of `KeyEventArgs`, `ObservableCollection<T>`, and `Brush`.
|
||||
- **Unknown types**: `ITestChannel`, `ITestDataSeries`, `TestChannel` — referenced but not defined in this module; must be defined elsewhere (likely in `DTS.Common.Classes.Viewer.TestMetadata` or similar).
|
||||
|
||||
## 5. Gotchas
|
||||
- **`IGraphView.SetGraphs(...)` is commented out** — The method signature exists only as a comment, suggesting incomplete or deprecated functionality. Do not assume this method is implemented or callable.
|
||||
- **`ITestDataSeries` metadata is mixed**: Some properties are read-only (`Description`, `SensorSNDisplay`, `MinY`, etc.), others are read-write (`TestGroup`, `ChannelName`, etc.). Ensure consumers respect mutability.
|
||||
- **`ITestDataSeriesViewModel.MoveCursor` uses WPF types** — This implies tight coupling to WPF; non-WPF UI implementations may require adaptation or stubbing.
|
||||
- **`ITestDataSeriesViewModel.CurrentCursorValues` is a string** — Its format is not specified; consumers must agree on parsing/formatting (e.g., `"X: 1.23, Y: 4.56"`).
|
||||
- **`ITestDataSeriesViewModel.Model` is of type `ITestDataSeries`** — The interface name matches the model type, but the property is named `Model`, not `TestDataSeries`. Ensure consistency in naming.
|
||||
- **Namespace consistency via `// ReSharper disable CheckNamespace`** — Indicates intentional namespace alignment across files; do not assume additional namespace nesting.
|
||||
- **No explicit validation or error handling** — Interfaces do not define exception behavior or validation rules; these are likely implementation-specific.
|
||||
- **`ITestDataSeriesView.SaveReportToPDF` and `SaveReportToCSV` return `bool`** — Success/failure semantics are not documented; callers must infer meaning (e.g., `true` = success, `false` = failure or cancellation).
|
||||
- **`IGraphMainViewModel` uses `List<ITestChannel>` for locked/selected lists** — Not thread-safe; concurrent modifications may cause issues if not externally synchronized.
|
||||
- **`LockedGroupName` and `TestName` parameters in `AddLockedGroupChannels`** — Ambiguity: `testName` is used in locked group context but `groupName` is used elsewhere for grouping; ensure naming consistency across consumers.
|
||||
@@ -0,0 +1,41 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.CommonCore/Interface/DTS.Viewer/Legend/ILegendView.cs
|
||||
- Common/DTS.CommonCore/Interface/DTS.Viewer/Legend/ILegendViewModel.cs
|
||||
generated_at: "2026-04-16T02:32:30.081859+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "fa541836d2cec79b"
|
||||
---
|
||||
|
||||
# Legend
|
||||
|
||||
## 1. Purpose
|
||||
This module defines the foundational interfaces for a legend view component within the DTS viewer subsystem. It establishes a contract for separating view and view model concerns for legend UI elements, leveraging the existing `IBaseView` and `IBaseViewModel` base abstractions. The interfaces are minimal and serve as markers or contracts to ensure consistent architectural alignment with the broader DTS framework—likely part of a larger MVVM (Model-View-ViewModel) pattern implementation for visualization components.
|
||||
|
||||
## 2. Public Interface
|
||||
- **`ILegendView`**
|
||||
- *Signature*: `public interface ILegendView : IBaseView`
|
||||
- *Behavior*: Represents the view layer for a legend component. As it inherits `IBaseView`, it is expected to conform to the base view contract (e.g., lifecycle, binding context, or UI rendering responsibilities), though the exact details of `IBaseView` are not provided here. This interface itself carries no additional members.
|
||||
|
||||
- **`ILegendViewModel`**
|
||||
- *Signature*: `public interface ILegendViewModel : IBaseViewModel`
|
||||
- *Behavior*: Represents the view model for a legend component. It exposes a single read-only property `View` of type `ILegendView`, providing access to the associated view instance. As it inherits `IBaseViewModel`, it is expected to support standard view model responsibilities (e.g., data binding, command handling), though specifics depend on `IBaseViewModel`.
|
||||
|
||||
## 3. Invariants
|
||||
- `ILegendView` must be implemented by a concrete view class that adheres to the contract of `IBaseView`.
|
||||
- `ILegendViewModel` must be implemented by a concrete view model class that adheres to `IBaseViewModel` and ensures its `View` property returns a non-null instance of a type implementing `ILegendView`.
|
||||
- The `View` property in `ILegendViewModel` is expected to be set once (likely during initialization) and remain stable—though nullability is not explicitly constrained in the interface, its documentation ("Gets the Tab View") implies a required, non-optional association.
|
||||
|
||||
## 4. Dependencies
|
||||
- **Depends on**:
|
||||
- `DTS.Common.Base` namespace (specifically `IBaseView` and `IBaseViewModel`, though their definitions are external to this module).
|
||||
- **Depended on by**:
|
||||
- Concrete implementations of `ILegendView` and `ILegendViewModel` (not visible in source).
|
||||
- Likely consumed by higher-level viewer components (e.g., a main view or legend manager) that coordinate legend display—though no direct usage is visible in the provided files.
|
||||
|
||||
## 5. Gotchas
|
||||
- **Ambiguity in `IBaseView`/`IBaseViewModel` semantics**: The behavior and contract of the base interfaces (`IBaseView`, `IBaseViewModel`) are not defined here, so assumptions about lifecycle, threading, or binding behavior must be inferred from external context.
|
||||
- **No explicit initialization contract**: The `View` property in `ILegendViewModel` lacks documentation on when it must be set (e.g., constructor, setter-only, or via injection), potentially leading to runtime null reference issues if misused.
|
||||
- **Minimal surface area**: The interfaces are intentionally sparse—this may indicate they are placeholders for future extension or that legend-specific logic resides elsewhere (e.g., in a concrete implementation or a separate service).
|
||||
- **Namespace naming inconsistency**: The namespace `DTS.Common.Interface` (singular "Interface") may be a typo or legacy artifact; the project may also use `DTS.Common.Interfaces` elsewhere.
|
||||
@@ -0,0 +1,125 @@
|
||||
---
|
||||
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-16T02:33:47.869826+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "95ec9f6198f586ac"
|
||||
---
|
||||
|
||||
# MainView
|
||||
|
||||
## Documentation: Main View & ViewModel Interfaces (`DTS.Common.Interface`)
|
||||
|
||||
---
|
||||
|
||||
### 1. Purpose
|
||||
This module defines the core interfaces for the main view and view model layers of the DTS viewer application. It establishes a contract between the UI (views) and the presentation logic (view models), enabling separation of concerns and testability. The interfaces `IMainView`, `IViewerMainView`, and `IViewerMainViewGrid` represent distinct view roles, while `IMainViewModel` and `IViewerMainViewModel` encapsulate shared and viewer-specific presentation state and behavior—particularly around region management, navigation context, and user interaction (e.g., keyboard input, zoom, calibration settings). This module exists to standardize how the main application shell and viewer components interact with their view models, especially in contexts involving graphing, diagnostics, and test data.
|
||||
|
||||
---
|
||||
|
||||
### 2. Public Interface
|
||||
|
||||
#### Interfaces (all in `DTS.Common.Interface` namespace)
|
||||
|
||||
| Interface | Inheritance | Description |
|
||||
|----------|-------------|-------------|
|
||||
| `IMainView` | `IBaseView` | Marker interface for the main application view. No additional members defined. |
|
||||
| `IViewerMainView` | `IBaseView` | Marker interface for the viewer-specific main view. No additional members defined. |
|
||||
| `IViewerMainViewGrid` | `IBaseView` | Marker interface for a grid-based variant of the viewer main view. No additional members defined. |
|
||||
| `IMainViewModel` | `IBaseViewModel` | Base view model for the main application. Manages shared region contexts and exposes a read-only `View` reference. |
|
||||
| `IViewerMainViewModel` | `IBaseViewModel`, `ISelectedDataViewModel` | Extended view model for the viewer. Adds viewer-specific state (e.g., `Standalone`, `ConfigPath`, permissions), region context management, zoom/keyboard controls, and calibration/view-mode settings. |
|
||||
|
||||
##### `IMainViewModel` Members
|
||||
- `IBaseView View { get; }`
|
||||
Gets the associated main view instance.
|
||||
- `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; }`
|
||||
Gets or sets the region object for a named UI region (e.g., for Prism region injection). Each corresponds to a distinct visual area in the main view.
|
||||
- `List<FrameworkElement> GetRegions()`
|
||||
Returns a list of all region `FrameworkElement`s currently assigned to the view model’s context properties.
|
||||
|
||||
##### `IViewerMainViewModel` Members
|
||||
- `IBaseView View { get; set; }`
|
||||
Gets or sets the associated viewer main view instance. *(Note: Setter differs from `IMainViewModel`)*
|
||||
- `bool Standalone { get; set; }`
|
||||
Indicates whether the viewer is running in standalone mode.
|
||||
- `string ConfigPath { get; set; }`
|
||||
Path to the configuration file used by the viewer.
|
||||
- `bool DoesUserHaveEditPermission { get; set; }`
|
||||
Indicates whether the current user has edit permissions in the viewer.
|
||||
- `Common.Enums.IsoViewMode ChannelCodeViewMode { get; set; }`
|
||||
Gets or sets the view mode for channel code display (e.g., raw, decoded, etc.).
|
||||
- `Common.Enums.Sensors.CalibrationBehaviors CalibrationBehaviorSetting { get; set; }`
|
||||
Gets or sets the calibration behavior setting (e.g., auto, manual, disabled).
|
||||
- `bool CalibrationBehaviorSettableInViewer { get; set; }`
|
||||
Indicates whether the user can change `CalibrationBehaviorSetting` in the viewer UI.
|
||||
- `Visibility SettingsVisibility { get; }`
|
||||
Gets the visibility state of the settings panel (e.g., `Visible`, `Collapsed`).
|
||||
- `void ZoomReset()`
|
||||
Resets zoom level(s) in the viewer to default.
|
||||
- `void LeftKeyPress()`
|
||||
Notifies the view model that the left arrow key was pressed (e.g., for timeline navigation).
|
||||
- `void RightKeyPress()`
|
||||
Notifies the view model that the right arrow key was pressed.
|
||||
- `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; }`
|
||||
Identical to `IMainViewModel`; manages region contexts for viewer-specific UI areas.
|
||||
- `List<FrameworkElement> GetRegions()`
|
||||
Identical to `IMainViewModel`; returns all region `FrameworkElement`s.
|
||||
|
||||
---
|
||||
|
||||
### 3. Invariants
|
||||
- All view interfaces (`IMainView`, `IViewerMainView`, `IViewerMainViewGrid`) must be implemented by concrete WPF `View` classes (e.g., `UserControl` or `Window` subclasses).
|
||||
- All view model interfaces (`IMainViewModel`, `IViewerMainViewModel`) must be implemented by concrete view models that:
|
||||
- Implement `IBaseViewModel` (implied by inheritance).
|
||||
- Maintain non-null `View` references (for `IMainViewModel`) or allow `View` assignment (for `IViewerMainViewModel`).
|
||||
- Ensure `GetRegions()` returns a list containing exactly the `FrameworkElement`s assigned to the 9 `Context*Region` properties.
|
||||
- `IViewerMainViewModel` extends `ISelectedDataViewModel` (not shown here), implying it must also satisfy that interface’s contract (e.g., data selection state).
|
||||
- `Context*Region` properties are expected to hold region objects (e.g., Prism `IRegion` instances or `FrameworkElement` instances) used for UI composition.
|
||||
|
||||
---
|
||||
|
||||
### 4. Dependencies
|
||||
|
||||
#### Dependencies *of* this module:
|
||||
- `DTS.Common.Base` (provides `IBaseView`, `IBaseViewModel`, `ISelectedDataViewModel`).
|
||||
- `System.Windows` (for `FrameworkElement`, `Visibility`).
|
||||
- `System.Collections.Generic` (for `List<T>`).
|
||||
- `Common.Enums.IsoViewMode`, `Common.Enums.Sensors.CalibrationBehaviors`, `Visibility` (from `System.Windows`).
|
||||
|
||||
#### Dependencies *on* this module:
|
||||
- Any module implementing or consuming main/viewer views/view models (e.g., `DTS.Viewer`, `DTS.App`, or Prism region navigation logic).
|
||||
- Likely used by view model factories, region managers, or shell layout controllers to wire up UI components.
|
||||
|
||||
---
|
||||
|
||||
### 5. Gotchas
|
||||
- **Setter visibility mismatch**: `IMainViewModel.View` is read-only (`get;`), while `IViewerMainViewModel.View` is read-write (`get; set;`). This implies `IViewerMainViewModel` may support late view binding (e.g., for dynamic view swapping), whereas `IMainViewModel` assumes fixed view assignment.
|
||||
- **Region naming ambiguity**: The 9 `Context*Region` properties share identical signatures but no documentation on expected types or lifecycle. Consumers must infer semantics from naming (e.g., `ContextDiagRegion` → diagnostics panel).
|
||||
- **No explicit region validation**: `GetRegions()` returns `List<FrameworkElement>`, but there is no guarantee of uniqueness, ordering, or completeness. Implementations must ensure consistency with the `Context*Region` properties.
|
||||
- **Enum dependencies**: `ChannelCodeViewMode` and `CalibrationBehaviorSetting` depend on external enums (`Common.Enums.*`) not included in the source—behavior is undefined without those definitions.
|
||||
- **`Standalone` semantics unclear**: The `Standalone` property exists but its behavioral impact (e.g., feature toggling, UI simplification) is not documented here.
|
||||
- **Key press methods**: `LeftKeyPress()`/`RightKeyPress()` are named descriptively but provide no context (e.g., modifier keys, repeat count). Likely tied to specific timeline navigation behavior.
|
||||
- **No versioning or deprecation markers**: Interfaces are minimal and lack attributes (e.g., `[Obsolete]`) or versioning hints, making evolution tracking difficult.
|
||||
|
||||
None identified beyond the above.
|
||||
@@ -0,0 +1,44 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.CommonCore/Interface/DTS.Viewer/Menu/IMenuView.cs
|
||||
- Common/DTS.CommonCore/Interface/DTS.Viewer/Menu/IMenuViewModel.cs
|
||||
generated_at: "2026-04-16T02:32:59.510070+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "f8804451d31ebe71"
|
||||
---
|
||||
|
||||
# Menu
|
||||
|
||||
## 1. Purpose
|
||||
This module defines the core interfaces for the menu layer in the DTS Viewer component, establishing a contract between the view and view model following the MVVM (Model-View-ViewModel) pattern. It extends base abstractions (`IBaseView`, `IBaseViewModel`) to provide a minimal, focused interface hierarchy specifically for menu-related UI concerns—enabling separation of concerns, testability, and decoupled UI implementation while maintaining consistency with the broader codebase’s architectural patterns.
|
||||
|
||||
## 2. Public Interface
|
||||
- **`IMenuView`**
|
||||
*Signature:* `public interface IMenuView : IBaseView`
|
||||
*Behavior:* Represents the view layer for menu UI. It inherits from `IBaseView`, implying it adheres to the base view contract (e.g., lifecycle, binding context), but contains no additional members beyond inheritance. Its purpose is to serve as a typed marker interface for menu-specific views.
|
||||
|
||||
- **`IMenuViewModel`**
|
||||
*Signature:* `public interface IMenuViewModel : IBaseViewModel`
|
||||
*Behavior:* Represents the view model for menu logic. It exposes a single read-only property `View` of type `IMenuView`, providing access to the associated view instance. This enables the view model to interact with or query the view when necessary (e.g., for coordination, state synchronization, or view-specific operations), while still maintaining separation of concerns.
|
||||
|
||||
## 3. Invariants
|
||||
- `IMenuView` must be implemented by any concrete class serving as the menu UI view.
|
||||
- `IMenuViewModel` implementations must provide a non-null `View` property referencing an instance of a type that implements `IMenuView`.
|
||||
- The `View` property in `IMenuViewModel` is expected to be set during initialization and remain stable for the lifetime of the view model (though not explicitly enforced by the interface).
|
||||
- Both interfaces extend `IBaseView` and `IBaseViewModel` respectively, inheriting all invariants and contracts defined in those base interfaces (not shown here, but assumed to be part of the `DTS.Common.Base` namespace).
|
||||
|
||||
## 4. Dependencies
|
||||
- **Depends on:**
|
||||
- `DTS.Common.Base` (specifically `IBaseView` and `IBaseViewModel`)
|
||||
- **Depended on by (inferred):**
|
||||
- Concrete implementations of `IMenuView` (e.g., WPF/WinForms/Xamarin UI controls)
|
||||
- Concrete implementations of `IMenuViewModel` (e.g., menu logic classes)
|
||||
- Framework or DI containers that resolve menu-related view/view model pairs
|
||||
- Higher-level components (e.g., shell or navigation services) that coordinate menu UI with other parts of the viewer
|
||||
|
||||
## 5. Gotchas
|
||||
- The interfaces are intentionally minimal—`IMenuView` has no members beyond inheritance, and `IMenuViewModel` only exposes the `View` property. Developers should not expect built-in command, data binding, or event handling contracts here; those would be defined in derived interfaces or concrete classes.
|
||||
- The `View` property in `IMenuViewModel` is not initialized by the interface itself; implementations must ensure it is set (likely via constructor or property injection) to avoid `NullReferenceException` at runtime.
|
||||
- No guidance is provided on how view/view model pairing is established (e.g., via DI, factory, or manual wiring), which may lead to inconsistency across implementations.
|
||||
- None identified from source alone.
|
||||
@@ -0,0 +1,49 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.CommonCore/Interface/DTS.Viewer/Navigation/INavigationView.cs
|
||||
- Common/DTS.CommonCore/Interface/DTS.Viewer/Navigation/INavigationViewModel.cs
|
||||
generated_at: "2026-04-16T02:32:50.807752+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "3183c8a5d454e0e2"
|
||||
---
|
||||
|
||||
# Navigation
|
||||
|
||||
## 1. Purpose
|
||||
This module defines foundational interfaces for navigation-related view and view model components within the `DTS.Common.Interface` namespace. Specifically, it establishes `INavigationView` as a marker interface extending `IBaseView`, and `INavigationViewModel` as a view model interface that enforces a contract for accessing its associated shell view via the `NavigationView` property. These interfaces serve as abstractions to decouple navigation logic from concrete UI implementations, likely supporting MVVM (Model-View-ViewModel) patterns in a viewer application.
|
||||
|
||||
## 2. Public Interface
|
||||
|
||||
### `INavigationView`
|
||||
- **Signature**: `public interface INavigationView : IBaseView`
|
||||
- **Behavior**: A marker interface indicating that a concrete view class participates in the navigation system. It inherits from `IBaseView`, implying it adheres to the base view contract (e.g., lifecycle, data context, or rendering responsibilities defined elsewhere). No additional members are declared in this interface.
|
||||
|
||||
### `INavigationViewModel`
|
||||
- **Signature**: `public interface INavigationViewModel : IBaseViewModel`
|
||||
- **Behavior**: Extends `IBaseViewModel` and requires implementers to expose a read-only property `NavigationView` of type `INavigationView`. This property provides access to the *Shell View*—the top-level navigation container (e.g., a window or master layout) that hosts navigation content.
|
||||
- **Property**:
|
||||
- `INavigationView NavigationView { get; }`
|
||||
- **Purpose**: Retrieves the associated navigation shell view.
|
||||
- **Constraints**: Must not be `null` (implied by documentation and typical usage, though not explicitly stated in source).
|
||||
|
||||
## 3. Invariants
|
||||
- `INavigationView` must be implemented by a class that also satisfies `IBaseView` (inherited contract).
|
||||
- `INavigationViewModel` must be implemented by a class that also satisfies `IBaseViewModel` (inherited contract).
|
||||
- For any valid instance of `INavigationViewModel`, the `NavigationView` property must return a non-null reference to an object implementing `INavigationView`.
|
||||
- The `NavigationView` property is read-only; no setter is defined, implying the association is established at construction and immutable thereafter.
|
||||
|
||||
## 4. Dependencies
|
||||
- **Depends on**:
|
||||
- `DTS.Common.Base.IBaseView` (via `INavigationView`)
|
||||
- `DTS.Common.Base.IBaseViewModel` (via `INavigationViewModel`)
|
||||
- **Depended on by**:
|
||||
- *Not explicitly stated in the provided source*, but any concrete navigation view/view model implementations (e.g., `ShellView`, `ShellViewModel`) would depend on these interfaces.
|
||||
- Likely consumed by navigation infrastructure (e.g., a navigation service or router) to bind views and view models, though such consumers are not visible in this file.
|
||||
|
||||
## 5. Gotchas
|
||||
- **Ambiguity in "Shell View"**: The XML documentation states `NavigationView` "Gets the Shell View," but the term *Shell View* is not defined here. Its semantics (e.g., whether it is the root window, a navigation frame, or a specific UI container) are not clarified in the source and must be inferred from context or other modules.
|
||||
- **No validation guarantees**: While `NavigationView` is expected to be non-null, the interface does not enforce this via contracts or attributes (e.g., `[NotNull]`). Implementers must ensure null-safety.
|
||||
- **No navigation operations defined**: The interfaces themselves contain no methods for navigation (e.g., `NavigateTo`, `GoBack`). Navigation logic is likely handled by separate services or view model methods outside this scope.
|
||||
- **No versioning or extensibility hooks**: As minimal marker interfaces, future enhancements (e.g., adding lifecycle callbacks) would require breaking changes unless new interfaces are introduced.
|
||||
- **None identified from source alone.**
|
||||
@@ -0,0 +1,133 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.CommonCore/Interface/DTS.Viewer/Reports/PowerSpectralDensity/IPSDReportMainViewGrid.cs
|
||||
- Common/DTS.CommonCore/Interface/DTS.Viewer/Reports/PowerSpectralDensity/IPSDReportResultsView.cs
|
||||
- Common/DTS.CommonCore/Interface/DTS.Viewer/Reports/PowerSpectralDensity/IPSDReportSettingsView.cs
|
||||
- Common/DTS.CommonCore/Interface/DTS.Viewer/Reports/PowerSpectralDensity/IPSDReportMainView.cs
|
||||
- Common/DTS.CommonCore/Interface/DTS.Viewer/Reports/PowerSpectralDensity/IChannelGRMSSummary.cs
|
||||
- Common/DTS.CommonCore/Interface/DTS.Viewer/Reports/PowerSpectralDensity/IPSDReportSettingsViewModel.cs
|
||||
- Common/DTS.CommonCore/Interface/DTS.Viewer/Reports/PowerSpectralDensity/IPSDReportResultsViewModel.cs
|
||||
- Common/DTS.CommonCore/Interface/DTS.Viewer/Reports/PowerSpectralDensity/IPSDReportSettingsModel.cs
|
||||
- Common/DTS.CommonCore/Interface/DTS.Viewer/Reports/PowerSpectralDensity/IPSDReportMainViewModel.cs
|
||||
generated_at: "2026-04-16T02:34:33.465391+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "51ec830c696b3994"
|
||||
---
|
||||
|
||||
# PowerSpectralDensity
|
||||
|
||||
## Documentation: Power Spectral Density (PSD) Report Module Interfaces
|
||||
|
||||
---
|
||||
|
||||
### 1. **Purpose**
|
||||
|
||||
This module defines the interface layer for the Power Spectral Density (PSD) report functionality within the DTS Viewer application. It establishes contracts for views, view models, and models that support configuration of signal processing parameters (e.g., filtering, windowing), display of computed results (e.g., channel GRMS summaries), and main view orchestration. The interfaces follow a layered architecture (View → ViewModel → Model) aligned with Prism/MVVM patterns, enabling separation of concerns and testability. The module serves as the contract surface for implementing PSD-specific reporting features, including export capabilities and interactive navigation.
|
||||
|
||||
---
|
||||
|
||||
### 2. **Public Interface**
|
||||
|
||||
#### **Interfaces (View Layer)**
|
||||
- `IPSDReportMainView : IBaseView`
|
||||
Marker interface for the main view container of the PSD report UI.
|
||||
|
||||
- `IPSDReportMainViewGrid : IBaseView`
|
||||
Marker interface for the grid-specific sub-view within the main PSD report view.
|
||||
|
||||
- `IPSDReportResultsView : IBaseView`
|
||||
Marker interface for the view responsible for displaying PSD analysis results.
|
||||
|
||||
- `IPSDReportSettingsView : IBaseView`
|
||||
Marker interface for the view used to configure PSD analysis settings.
|
||||
|
||||
#### **Interfaces (Model Layer)**
|
||||
- `IChannelGRMSSummary : IBaseClass`
|
||||
Represents a summary of GRMS (Gaussian Root Mean Square) for a single channel.
|
||||
- `string ChannelName { get; set; }`
|
||||
- `int SampleRate { get; set; }`
|
||||
- `double GRMS { get; set; }`
|
||||
|
||||
- `IPSDReportSettingsModel : IBaseModel`
|
||||
Encapsulates configurable parameters for PSD analysis.
|
||||
- `IPSDReportSettingsViewModel Parent { get; set; }`
|
||||
- `bool LowPassFilterEnabled`, `double LowPassFilterFrequency`, `PassFilterType LowPassFilterType`, `int LowPassFilterOrder`
|
||||
- `bool HighPassFilterEnabled`, `double HighPassFilterFrequency`, `PassFilterType HighPassFilterType`, `int HighPassFilterOrder`
|
||||
- `WindowWidth WindowWidth`, `WindowType WindowType`, `WindowAveragingType WindowAveragingType`, `double WindowOverlappingPercent`
|
||||
- `bool ShowEnvelope`
|
||||
- `bool CanPublishChanges`, `bool ReadData`, `double DataStart`, `double DataEnd`
|
||||
|
||||
#### **Interfaces (ViewModel Layer)**
|
||||
- `IPSDReportSettingsViewModel : IBaseViewModel`
|
||||
ViewModel for settings view.
|
||||
- `IBaseView View { get; set; }`
|
||||
- `IBaseViewModel Parent { get; set; }`
|
||||
- `IPSDReportSettingsModel Model { get; set; }`
|
||||
- `void PublishChanges()` — Commits pending setting changes.
|
||||
|
||||
- `IPSDReportResultsViewModel : IBaseViewModel`
|
||||
ViewModel for results view.
|
||||
- `IBaseView View { get; set; }`
|
||||
- `IBaseViewModel Parent { get; set; }`
|
||||
- `DelegateCommand ExportToPDFCommand { get; }`
|
||||
- `DelegateCommand ExportToCSVCommand { get; }`
|
||||
- `ObservableCollection<IChannelGRMSSummary> Results { get; set; }`
|
||||
|
||||
- `IPSDReportMainViewModel : IBaseViewModel, ISelectedDataViewModel`
|
||||
Orchestrates the entire PSD report view.
|
||||
- `IBaseView View { get; set; }`
|
||||
- `object ContextNavigationRegion`, `ContextGraphRegion`, `ContextTestsRegion`, `ContextGraphsRegion`, `ContextLegendRegion`, `ContextPropertyRegion { get; set; }`
|
||||
- `List<FrameworkElement> GetRegions()` — Returns UI regions for region management.
|
||||
- `string ConfigPath { get; set; }`
|
||||
- `bool DoesUserHaveEditPermission { get; set; }`
|
||||
- `void ZoomReset()`, `void LeftKeyPress()`, `void RightKeyPress()` — Navigation/interaction handlers.
|
||||
- `Common.Enums.IsoViewMode ChannelCodeViewMode { get; set; }`
|
||||
- `Common.Enums.Sensors.CalibrationBehaviors CalibrationBehaviorSetting { get; set; }`
|
||||
- `bool CalibrationBehaviorSettableInViewer { get; set; }`
|
||||
- `Visibility SettingsVisibility { get; }` — Read-only visibility state for settings panel.
|
||||
|
||||
---
|
||||
|
||||
### 3. **Invariants**
|
||||
|
||||
- All view interfaces (`IPSDReport*View`) inherit from `IBaseView`, implying they must conform to the base view contract (e.g., lifetime management, region registration).
|
||||
- All view model interfaces (`IPSDReport*ViewModel`) inherit from `IBaseViewModel`, implying they must support parent-child relationships and view binding.
|
||||
- All model interfaces (`IPSDReport*Model`) inherit from `IBaseModel`, implying they must support data binding and change notification.
|
||||
- `IPSDReportSettingsModel` properties are mutually consistent: e.g., filter enable flags must align with associated frequency/type/order properties.
|
||||
- `IPSDReportSettingsViewModel.PublishChanges()` must be called to persist changes to `IPSDReportSettingsModel`.
|
||||
- `IPSDReportResultsViewModel.Results` is an `ObservableCollection<IChannelGRMSSummary>`, implying UI binding to dynamic result lists.
|
||||
- `IPSDReportMainViewModel` implements `ISelectedDataViewModel`, implying it manages selected data context (e.g., test, channel, or time range).
|
||||
- `GetRegions()` must return a non-null list of `FrameworkElement`s corresponding to named regions used by the navigation or region manager.
|
||||
|
||||
---
|
||||
|
||||
### 4. **Dependencies**
|
||||
|
||||
#### **Internal Dependencies**
|
||||
- `DTS.Common.Base` — Base contracts (`IBaseView`, `IBaseViewModel`, `IBaseModel`, `IBaseClass`).
|
||||
- `DTS.Common.Enums.Viewer.Reports` — Enumerations: `PassFilterType`, `WindowWidth`, `WindowType`, `WindowAveragingType`.
|
||||
- `DTS.Common.Enums` — Additional enums: `IsoViewMode`, `Sensors.CalibrationBehaviors`.
|
||||
- `System.Collections.ObjectModel` — For `ObservableCollection<T>`.
|
||||
- `Microsoft.Practices.Prism.Commands` — For `DelegateCommand`.
|
||||
|
||||
#### **External Dependencies**
|
||||
- **Prism Library** — Used for command infrastructure (`DelegateCommand`).
|
||||
- **WPF** — `System.Windows.FrameworkElement` used in `GetRegions()`.
|
||||
|
||||
#### **Dependents**
|
||||
- Concrete implementations of these interfaces (e.g., `PSDReportMainView.xaml.cs`, `PSDReportSettingsViewModel.cs`) are expected to reside in the viewer module (`DTS.Viewer.*`) or reporting module.
|
||||
- Likely consumed by a main report controller or region manager to instantiate and wire views/view models.
|
||||
|
||||
---
|
||||
|
||||
### 5. **Gotchas**
|
||||
|
||||
- **No implementation details exposed**: All interfaces are empty markers except for `IChannelGRMSSummary`, `IPSDReportSettingsModel`, and the two view models — no logic, validation, or default behavior is defined here.
|
||||
- **Missing `Standalone` property**: `IPSDReportMainViewModel` has a commented-out `bool Standalone { get; set; }` — this may indicate incomplete or deprecated functionality.
|
||||
- **Ambiguous region semantics**: `Context*Region` properties are typed as `object`; their expected usage (e.g., `RegionManager.RegisterViewWithRegion`) is not specified in the interface.
|
||||
- **No error handling or async patterns**: `PublishChanges()` and `GetRegions()` have no documented exceptions or async variants — callers may assume synchronous behavior.
|
||||
- **Enum dependencies not detailed**: Types like `PassFilterType`, `WindowWidth`, etc., are referenced but not defined here — their valid values and semantics must be verified in `DTS.Common.Enums.Viewer.Reports`.
|
||||
- **No documentation for `ReadData`, `DataStart`, `DataEnd` semantics**: It is unclear whether these represent time-domain indices, sample indices, or absolute timestamps.
|
||||
|
||||
None identified beyond the above.
|
||||
@@ -0,0 +1,150 @@
|
||||
---
|
||||
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-16T02:34:18.141479+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "2ef74d227b33f018"
|
||||
---
|
||||
|
||||
# Documentation: Test Definition Interfaces
|
||||
|
||||
## 1. Purpose
|
||||
|
||||
This module defines a set of interfaces that collectively model metadata and structural information for test data in the DTS (Data Transfer System) viewer. These interfaces (`ITestMetadata`, `ITestRunMetadata`, `ITestSetupMetadata`, `ITestSummary`, `ITestModule`, `ITestChannel`, `ITestCalculatedChannel`, `ITestGraphs`) provide a standardized contract for representing hierarchical test metadata—including run-level, setup-level, module-level, and channel-level details—enabling consistent data binding, serialization, and UI rendering across the viewer application. The interfaces are designed to support both raw and derived (calculated) channels, with rich metadata for calibration, configuration, and signal processing.
|
||||
|
||||
## 2. Public Interface
|
||||
|
||||
### `ITestMetadata`
|
||||
- **Namespace**: `DTS.Common.Interface.TestDefinition`
|
||||
- **Properties**:
|
||||
- `ITestRunMetadata TestRun { get; set; }` – Top-level metadata for a single test run.
|
||||
- `ITestSetupMetadata TestSetup { get; set; }` – Metadata describing the physical test setup (e.g., hardware configuration, timestamps).
|
||||
|
||||
### `ITestGraphs`
|
||||
- **Namespace**: `DTS.Common.Interface`
|
||||
- **Properties**:
|
||||
- `string Name { get; set; }` – Graph name.
|
||||
- `string HardwareChannelName { get; set; }` – Hardware channel name associated with the graph.
|
||||
- `List<string> ChannelIds { get; set; }` – List of channel IDs included in the graph.
|
||||
- `List<ITestChannel> Channels { get; set; }` – List of `ITestChannel` instances associated with the graph.
|
||||
|
||||
### `ITestSetupMetadata`
|
||||
- **Namespace**: `DTS.Common.Interface`
|
||||
- **Properties**:
|
||||
- `string SetupName { get; set; }` – Human-readable name of the setup.
|
||||
- `DateTime TimeStamp { get; set; }` – Timestamp when the setup was created/configured.
|
||||
- `List<ITestGraphs> TestGraphs { get; set; }` – Collection of graphs defined for this setup.
|
||||
- `CalibrationBehaviors CalibrationBehavior { get; set; }` – Enumerated calibration behavior settings (type defined in `DTS.Common.Enums.Sensors`).
|
||||
|
||||
### `ITestSummary`
|
||||
- **Namespace**: `DTS.Common.Interface.TestDefinition`
|
||||
- **Inherits**: `IBaseClass`
|
||||
- **Properties**:
|
||||
- `string Id { get; set; }`, `string Name { get; set; }`, `string Description { get; set; }` – Identifying and descriptive metadata.
|
||||
- `int ChannelCount { get; set; }` – Total number of channels.
|
||||
- `DateTime TestDate { get; set; }` – Date/time of the test.
|
||||
- `string DataType { get; set; }` – Type of data (e.g., “Raw”, “Processed”).
|
||||
- `bool IsSelected { get; set; }` – UI selection state.
|
||||
- `List<ITestGraphs> Graphs { get; set; }`, `List<ITestChannel> Channels { get; set; }`, `List<ITestChannel> CalculatedChannels { get; set; }` – Collections of graphs, raw channels, and calculated channels.
|
||||
- `IBaseViewModel Parent { get; set; }` – Parent view model for UI binding.
|
||||
|
||||
### `ITestRunMetadata`
|
||||
- **Namespace**: `DTS.Common.Interface`
|
||||
- **Inherits**: `INotifyPropertyChanged`
|
||||
- **Properties**:
|
||||
- `string Name`, `string Id`, `string Description` – Run-level identifiers and description.
|
||||
- `bool InlineSerializedData { get; set; }` – Indicates whether binary data is embedded inline.
|
||||
- `string TestGuid { get; set; }` – Unique GUID for the test.
|
||||
- `int FaultFlags { get; set; }` – Bitmask of fault conditions.
|
||||
- `string Software`, `string SoftwareVersion` – Software and version used during test.
|
||||
- `string DataType { get; set; }` – Data type (e.g., “Raw”, “Processed”).
|
||||
- `DateTime FileDate { get; set; }`, `string FilePath { get; set; }` – File timestamp and path.
|
||||
- `List<ITestModule> Modules { get; set; }`, `List<ITestChannel> Channels { get; set; }`, `List<ITestChannel> CalculatedChannels { get; set; }` – Collections of modules, raw channels, and calculated channels.
|
||||
|
||||
### `ITestModule`
|
||||
- **Namespace**: `DTS.Common.Interface`
|
||||
- **Inherits**: `INotifyPropertyChanged`
|
||||
- **Properties**:
|
||||
- `string SerialNumber`, `string BaseSerialNumber` – Module serial identifiers.
|
||||
- `int AaFilterRateHz { get; set; }` – Anti-aliasing filter rate.
|
||||
- `int Number { get; set; }`, `int NumberOfChannels { get; set; }` – Module number and channel count.
|
||||
- `int NumberOfSamples`, `int UnsubsampledNumberOfSamples` – Sample counts (subsampled/unsubsampled).
|
||||
- `double RequestedPostTriggerSeconds`, `double RequestedPreTriggerSeconds`, `double PostTriggerSeconds`, `double PreTriggerSeconds` – Trigger timing parameters.
|
||||
- `string RecordingMode { get; set; }` – e.g., “Continuous”, “Triggered”.
|
||||
- `int SampleRateHz { get; set; }` – Actual sample rate.
|
||||
- `int StartRecordSampleNumber { get; set; }` – Sample index where recording started.
|
||||
- `int StartRecordTimestampSec`, `int StartRecordTimestampNanoSec` – Start timestamp (seconds + nanoseconds).
|
||||
- `int TriggerTimestampSec`, `int TriggerTimestampNanoSec` – Trigger timestamp.
|
||||
- `List<ulong> TriggerSampleNumbers { get; set; }` – Sample numbers where triggers occurred.
|
||||
- `bool PTPMasterSync { get; set; }` – Precision Time Protocol master sync status.
|
||||
- Tilt sensor angles (pre/post) for X/Y/Z axes (e.g., `TiltSensorAxisXDegreesPre`, `TiltSensorAxisZDegreesPost`).
|
||||
- Temperature readings (pre/post) for 4 locations (e.g., `TemperatureLocation1Pre`, `TemperatureLocation4Post`).
|
||||
- `List<ITestChannel> Channels { get; set; }`, `List<ITestChannel> CalculatedChannels { get; set; }` – Channels associated with this module.
|
||||
|
||||
### `ITestCalculatedChannel`
|
||||
- **Namespace**: `DTS.Common.Interface`
|
||||
- **Inherits**: `INotifyPropertyChanged`
|
||||
- **Properties**: (All properties are read-write unless otherwise noted)
|
||||
- `string SerialNumber`, `string ChannelId`, `string Description`, `string ChannelGroupName`, `string ChannelType`, `int Number`, `string DigitalMultiplier`, `string DigitalMode`, `DateTime Start`, `string Bridge`, `int BridgeResistanceOhms`, `double ZeroPoint`, `string ChannelDescriptionString`, `string ChannelName2`, `string HardwareChannelName`, `double DesiredRange`, `double Sensitivity`, `string SoftwareFilter`, `bool ProportionalToExcitation`, `bool IsInverted`, `string LinearizationFormula`, `bool IsSubsampled`, `int AbsoluteDisplayOrder`, `DateTime LastCalibrationDate`, `string SensorId`, `int OffsetToleranceLowMv`, `int OffsetToleranceHighMv`, `int DataFlag`, `int ExcitationVoltage`, `string Eu`, `bool CalSignalEnabled`, `bool ShuntEnabled`, `bool VoltageInsertionCheckEnabled`, `bool RemoveOffset`, `string ZeroMethod`, `double ZeroAverageWindowBegin`, `double ZeroAverageWindowEnd`, `int InitialEu`, `string InitialOffset`, `int UnsubsampledSampleRateHz`, `double MeasuredShuntDeflectionMv`, `double TargetShuntDeflectionMv`, `double MeasuredExcitationVoltage`, `double FactoryExcitationVoltage`, `double TimeOfFirstSample`, `int Multiplier`, `int UserOffsetEu`, `int UnitConversion`, `bool AtCapacity`, `int CapacityOutputIsBasedOn`, `string SourceChannelNumber`, `string SourceModuleNumber`, `string SourceModuleSerialNumber`, `string Calculation`, `int SampleRateHz`, `string SensitivityUnits`, `int SensorCapacity`.
|
||||
|
||||
### `ITestChannel`
|
||||
- **Namespace**: `DTS.Common.Interface`
|
||||
- **Inherits**: `INotifyPropertyChanged`
|
||||
- **Properties**:
|
||||
- **Identification & Context**:
|
||||
- `string Group`, `string SubGroup`, `string TestId`, `string TestSetupName`, `string ModuleSerialNumber`, `string SerialNumber`, `string ChannelId`, `string ChannelDisplayName`, `string Description`, `string IsoCode`, `string IsoChannelName`, `string UserCode`, `string UserChannelName`, `string ChannelGroupName`, `string ChannelType`, `bool IsCalculatedChannel`, `int Number`, `string DigitalMultiplier`, `string DigitalMode`, `DateTime Start`, `string Bridge`, `double BridgeResistanceOhms`, `double ZeroPoint`, `string ChannelDescriptionString`, `string ChannelName2`, `string HardwareChannelName`, `string ExcitationVoltage`, `string Eu`, `string SensitivityUnits`, `int SensorCapacity`, `string SensorPolarity`, `int ChannelNumber`, `string BinaryFileName`, `string BinaryFilePath`.
|
||||
- **Calibration & Configuration**:
|
||||
- `double DesiredRange`, `double ActualMaxRangeEu`, `double ActualMinRangeEu`, `double ActualMaxRangeAdc { get; }`, `double ActualMinRangeAdc { get; }`, `double ActualMaxRangeMv`, `double ActualMinRangeMv`, `double Sensitivity`, `string SoftwareFilter`, `bool ProportionalToExcitation`, `bool IsInverted`, `string LinearizationFormula`, `bool IsSubsampled`, `int AbsoluteDisplayOrder`, `DateTime LastCalibrationDate`, `string SensorId`, `int OffsetToleranceLowMv`, `int OffsetToleranceHighMv`, `int DataFlag`, `bool CalSignalEnabled`, `bool ShuntEnabled`, `bool VoltageInsertionCheckEnabled`, `bool RemoveOffset`, `string ZeroMethod`, `double ZeroAverageWindowBegin`, `double ZeroAverageWindowEnd`, `int InitialEu`, `string InitialOffset`, `int UnsubsampledSampleRateHz`, `double MeasuredShuntDeflectionMv`, `double TargetShuntDeflectionMv`, `double MeasuredExcitationVoltage`, `double FactoryExcitationVoltage`, `double TimeOfFirstSample`, `double Multiplier`, `double UserOffsetEu`, `int UnitConversion`, `bool AtCapacity`, `int CapacityOutputIsBasedOn`, `string SourceChannelNumber`, `string SourceModuleNumber`, `string SourceModuleSerialNumber`, `string Calculation`, `int SampleRateHz`.
|
||||
- **Statistics & Display**:
|
||||
- `double MinADC`, `double MaxADC`, `double AveADC`, `double StdDevADC`, `double T0ADC`, `double MinMV`, `double MaxMV`, `double AveMV`, `double StdDevMV`, `double T0MV`, `double MinEU`, `double MaxEU`, `double AveEU`, `double StdDevEU`, `double T0EU`, `double MinY`, `double MaxY`, `double AveY`, `double StdDevY`, `double T0Value`.
|
||||
- **UI & State**:
|
||||
- `string GraphName`, `bool IsGraphChannel`, `IBaseViewModel Parent`, `Color ChannelColor`, `string ErrorMessage`, `bool IsError`, `Color? ErrorColor`, `bool IsSelected`, `bool CanSelectChannel`, `bool IsLocked`, `bool CanLock`.
|
||||
- **Parent References**:
|
||||
- `ITestSetupMetadata ParentTestSetup { get; set; }`, `ITestModule ParentModule { get; set; }`.
|
||||
- **Methods**:
|
||||
- `void SetChannelDescriptionAndDisplayName(string channelDescriptionString)` – Updates `ChannelDescriptionString` and `ChannelDisplayName`.
|
||||
- `ITestChannel Copy()` – Returns a copy of the channel.
|
||||
- **Trigger/Timing**:
|
||||
- `ulong T1Sample { get; set; }`, `ulong T2Sample { get; set; }`, `double HIC { get; set; }`.
|
||||
- **EU Scaling**:
|
||||
- `bool UseEUScaler { get; set; }`, `double ScaleFactorEU { get; set; }`.
|
||||
|
||||
## 3. Invariants
|
||||
|
||||
- **Hierarchical Consistency**: `ITestRunMetadata` contains `Modules`, `Channels`, and `CalculatedChannels`. Each `ITestModule` contains its own `Channels` and `CalculatedChannels`. Each `ITestChannel` has `ParentModule` and `ParentTestSetup` references, implying a tree structure: `TestRun → Modules → Channels`.
|
||||
- **Channel Type Distinction**: `ITestChannel.IsCalculatedChannel` distinguishes raw vs. derived channels. `ITestSummary` and `ITestRunMetadata` maintain separate lists for `Channels` (raw) and `CalculatedChannels`.
|
||||
- **Metadata Completeness**: `ITestSetupMetadata.TestGraphs` and `ITestSummary.Graphs` contain `ITestGraphs` instances, each referencing a list of `ChannelIds` and `ITestChannel` instances. This implies that graphs are derived views over channel collections.
|
||||
- **Timestamps**: All `DateTime` fields (e.g., `TimeStamp`, `FileDate`, `Start`, `LastCalibrationDate`) are expected to be non-null and represent UTC or local time consistently (source does not specify, so assume caller must enforce).
|
||||
- **INotifyPropertyChanged**: All interfaces (`ITestRunMetadata`, `ITestModule`, `ITestChannel`, `ITestCalculatedChannel`) implement `INotifyPropertyChanged`, indicating they are intended for data binding and must raise change notifications on property updates.
|
||||
- **Range Calculations**: `ITestChannel` exposes both raw (`Adc`, `Mv`) and engineering (`EU`, `Y`) unit ranges. The `ActualMaxRangeAdc`/`ActualMinRangeAdc` are read-only, suggesting they are computed from data, not user-configurable.
|
||||
|
||||
## 4. Dependencies
|
||||
|
||||
### External Dependencies
|
||||
- `System.Collections.Generic`, `System.ComponentModel`, `System` – Core .NET namespaces.
|
||||
- `DTS.Common.Base` – Provides `IBaseClass` and `IBaseViewModel`.
|
||||
- `DTS.Common.Enums.Sensors` – Defines `CalibrationBehaviors` enum used in `ITestSetupMetadata`.
|
||||
|
||||
### Internal Dependencies
|
||||
- **Consumers**: This module is consumed by UI/view layer components (e.g., viewers, exporters, analyzers) that rely on `ITestSummary`, `ITestRunMetadata`, `ITestChannel`, etc., for binding and rendering test data.
|
||||
- **Implementations**: Concrete types implementing these interfaces are not included in the source, but are likely in data loading/serialization modules (e.g., binary file parsers, database mappers).
|
||||
|
||||
## 5. Gotchas
|
||||
|
||||
- **Redundant Channel Lists**: `ITestRunMetadata`, `ITestModule`, `ITestSummary`, and `ITestGraphs` all contain `Channels` and `CalculatedChannels`. These may be redundant or represent different subsets (e.g., flattened vs. module-scoped). No guarantee of consistency across lists is implied.
|
||||
- **`ActualMaxRangeAdc`/`ActualMinRangeAdc` are read-only**: These properties are `get;` only in `ITestChannel`, but all others are `get; set;`. This suggests they are computed post-data-load and should not be set directly.
|
||||
- **`ExcitationVoltage` vs. `MeasuredExcitationVoltage`/`FactoryExcitationVoltage`**: `ITestChannel` has `string ExcitationVoltage` (likely a display string), while `ITestCalculatedChannel` and `ITestChannel` also have `double MeasuredExcitationVoltage` and `double FactoryExcitationVoltage`. Confusing naming may lead to misuse.
|
||||
- **`ChannelColor` and `ErrorMessage`**: UI-specific properties (`ChannelColor`, `ErrorMessage`, `IsError`, `ErrorColor`, `IsSelected`, `CanSelectChannel`, etc.) are included in `ITestChannel`, implying tight coupling between data model and UI state—potentially violating separation of concerns.
|
||||
- **`CalculatedChannels` vs `ITestCalculatedChannel`**: `ITestChannel` has `IsCalculatedChannel` flag, but `ITestCalculatedChannel` is a separate interface. Implementations must ensure that channels marked `IsCalculatedChannel == true` are either castable to `ITestCalculatedChannel` or contain equivalent data.
|
||||
- **`ITestGraphs.ChannelIds` vs `Channels`**: `ITestGraphs` has both `List<string> ChannelIds` and `List<ITestChannel> Channels`. The relationship between them (e.g., whether `ChannelIds` is derived from `Channels`) is not specified.
|
||||
- **No Validation Rules**: None of the interfaces enforce non-null constraints (e.g., `Name`, `Id`, `SerialNumber`), which may lead to runtime errors if consumers assume non-nullability.
|
||||
|
||||
None identified beyond the above.
|
||||
@@ -0,0 +1,98 @@
|
||||
---
|
||||
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-16T02:32:49.562747+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "a5f27c5a375dc7b6"
|
||||
---
|
||||
|
||||
# TestModification
|
||||
|
||||
## Documentation: Test Modification Module Interfaces
|
||||
|
||||
---
|
||||
|
||||
### 1. Purpose
|
||||
This module defines the core interfaces for the *Test Modification* feature, which enables users to modify properties of a selected test channel (e.g., description, Eu multiplier/offset, T0/T1/T2 timing, sensitivity, software filter, and data flag). It follows the MVVM pattern, with `ITestModificationView`, `ITestModificationViewModel`, and `ITestModificationModel` forming the view, view model, and model layers respectively. The module exists to encapsulate state and behavior related to channel-specific modifications, supporting features such as ISO code synchronization when software filters change and configurable representation of unfiltered states (e.g., `"0"` vs `"P"`).
|
||||
|
||||
---
|
||||
|
||||
### 2. Public Interface
|
||||
|
||||
#### `ITestModificationView`
|
||||
- **Inherits**: `IBaseView`
|
||||
- **Description**: Marker interface for the view layer of the test modification UI. No additional members defined beyond base view contract.
|
||||
|
||||
#### `ITestModificationViewModel`
|
||||
- **Inherits**: `IBaseViewModel`
|
||||
- **Properties**:
|
||||
- `ITestModificationView View { get; set; }` – Binds to the associated view instance.
|
||||
- `IBaseViewModel Parent { get; set; }` – Reference to the parent view model (e.g., containing test configuration).
|
||||
- `bool UseISOCodeFilterMapping { get; set; }` – Controls whether modifying the software filter should trigger automatic ISO code updates.
|
||||
- `bool UseZeroForUnfiltered { get; set; }` – Controls whether `"0"` or `"P"` is used when the ISO code is auto-updated due to filter change (i.e., for unfiltered state).
|
||||
- **Methods**:
|
||||
- `void PublishChanges()` – Commits pending modifications (e.g., to the selected channel or underlying data model). Behavior not specified beyond this; implementation-dependent.
|
||||
|
||||
#### `ITestModificationModel`
|
||||
- **Inherits**: `IBaseModel`
|
||||
- **Properties**:
|
||||
- `ITestModificationViewModel Parent { get; set; }` – Back-reference to the associated view model.
|
||||
- `ITestChannel SelectedChannel { get; set; }` – The channel whose properties are being modified.
|
||||
- `string Description { get; set; }` – The `ChannelDescriptionString` of `SelectedChannel`.
|
||||
- `bool IsModifiedDescription { get; }` – `true` if `Description` differs from the channel’s original value.
|
||||
- `double EuMultiplier { get; set; }` – Eu multiplier of `SelectedChannel`.
|
||||
- `bool IsModifiedEuMultiplier { get; }` – `true` if `EuMultiplier` differs from original.
|
||||
- `double EuOffset { get; set; }` – Eu offset of `SelectedChannel`.
|
||||
- `bool IsModifiedEuOffset { get; }` – `true` if `EuOffset` differs from original.
|
||||
- `double T0 { get; set; }` – T0 offset in milliseconds.
|
||||
- `bool IsModifiedT0 { get; }` – `true` if `T0` differs from original.
|
||||
- `bool IsModifiedLineFit { get; set; }` – `true` if `T1` or `T2` has been modified.
|
||||
- `double T1 { get; set; }` – Start time (ms) for line fit.
|
||||
- `double T2 { get; set; }` – End time (ms) for line fit.
|
||||
- `bool IsModifiedSensitivity { get; }` – `true` if `Sensitivity` differs from original.
|
||||
- `double Sensitivity { get; set; }` – Sensitivity of `SelectedChannel`.
|
||||
- `bool IsModifiedFilter { get; }` – `true` if `SelectedFilter` differs from original.
|
||||
- `IFilterClass SelectedFilter { get; set; }` – Software filter applied to `SelectedChannel`.
|
||||
- `T0Mode T0Mode { get; set; }` – Adjustment mode for T0 (type `T0Mode` not defined in provided sources).
|
||||
- `DataFlag SelectedDataFlag { get; set; }` – Data flag for `SelectedChannel`.
|
||||
- `bool IsModifiedDataFlag { get; }` – `true` if `SelectedDataFlag` differs from original.
|
||||
- `bool IsModified { get; }` – `true` if *any* channel property has been modified.
|
||||
- **Methods**:
|
||||
- `bool ValidateT0()` – Returns `true` if `T0` is within the valid time range of the dataset; `false` otherwise.
|
||||
|
||||
---
|
||||
|
||||
### 3. Invariants
|
||||
- `SelectedChannel` must be non-null for `ITestModificationModel` to function meaningfully (all `IsModified*` properties and value getters depend on it).
|
||||
- `IsModified*` properties are read-only indicators of whether the corresponding property differs from the *original* value of `SelectedChannel` (not necessarily the current in-memory value).
|
||||
- `IsModified` is a logical OR of all `IsModified*` properties (inferred from documentation).
|
||||
- `ValidateT0()` must evaluate `T0` against the dataset’s time bounds (exact bounds unspecified).
|
||||
- `UseISOCodeFilterMapping` and `UseZeroForUnfiltered` only affect behavior when `SelectedFilter` is modified *and* ISO code synchronization is enabled (implementation detail not specified).
|
||||
|
||||
---
|
||||
|
||||
### 4. Dependencies
|
||||
|
||||
#### This Module Depends On:
|
||||
- `DTS.Common.Base` namespace: Provides `IBaseView`, `IBaseViewModel`, `IBaseModel`.
|
||||
- `DTS.Common.Interface.Sensors.SoftwareFilters`: Provides `IFilterClass`.
|
||||
- `DTS.Common.Interface`: Contains `ITestChannel`, `DataFlag`, and `T0Mode` (not shown in source but referenced).
|
||||
|
||||
#### This Module Is Used By:
|
||||
- Likely consumed by higher-level modules (e.g., test configuration UI, channel editor) that instantiate and wire `ITestModificationViewModel` and `ITestModificationModel`.
|
||||
- `ITestModificationView` implies integration with a UI framework (e.g., WPF) via `IBaseView`.
|
||||
|
||||
---
|
||||
|
||||
### 5. Gotchas
|
||||
- `IsModifiedLineFit` is the only `IsModified*` property defined as `get; set;` (others are `get;` only). This suggests it may be settable externally (e.g., to force marking line fit as modified without changing `T1`/`T2`), which is inconsistent with other flags.
|
||||
- `SelectedFilter` uses `IFilterClass` (comment notes: *"FB 13120 Use IFilterClass instead of CFCFilter"*), indicating a refactor history. Ensure no legacy code still assumes `CFCFilter`.
|
||||
- `T0Mode` and `DataFlag` types are referenced but not defined in the provided sources; their semantics and valid values are unknown here.
|
||||
- `ValidateT0()`’s behavior is underspecified: "within the dataset" is ambiguous (e.g., dataset start/end? sample timestamps? configuration bounds?).
|
||||
- No explicit event or notification mechanism is defined for change tracking (e.g., `INotifyPropertyChanged`). Assumed to be provided via `IBaseViewModel`/`IBaseModel` or external mechanisms.
|
||||
- None of the `IsModified*` properties are resettable—once `true`, they remain `true` unless the value is reverted to the original (implementation-dependent).
|
||||
|
||||
None identified beyond the above.
|
||||
@@ -0,0 +1,46 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.CommonCore/Interface/DTS.Viewer/TestModule/ITestModuleView.cs
|
||||
- Common/DTS.CommonCore/Interface/DTS.Viewer/TestModule/ITestModuleViewModel.cs
|
||||
generated_at: "2026-04-16T02:32:30.110646+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "43e7cc3a0d236351"
|
||||
---
|
||||
|
||||
# TestModule
|
||||
|
||||
## 1. Purpose
|
||||
This module defines the foundational view and view-model interfaces for a *Test Module* within the DTS Viewer subsystem. Its role is to establish a contract for UI components responsible for displaying or managing test-related functionality—specifically, operations involving .NET `Assembly` inspection or manipulation—by extending the common base interfaces (`IBaseView` and `IBaseViewModel`) and exposing a list of assemblies (`AssemblyList`) as its core data payload.
|
||||
|
||||
## 2. Public Interface
|
||||
|
||||
### `ITestModuleView`
|
||||
- **Signature**: `public interface ITestModuleView : IBaseView`
|
||||
- **Behavior**: A marker interface for the *view* layer of the Test Module. It inherits from `IBaseView`, implying it adheres to the standard view contract (e.g., binding context, lifecycle hooks) defined elsewhere in `DTS.Common.Base`. No additional members are declared here.
|
||||
|
||||
### `ITestModuleViewModel`
|
||||
- **Signature**: `public interface ITestModuleViewModel : IBaseViewModel`
|
||||
- **Behavior**: A view-model interface for the Test Module. It extends `IBaseViewModel` and exposes a single property:
|
||||
- `AssemblyList`: A `List<Assembly>` (read-write) intended to hold the collection of .NET assemblies relevant to the test module’s functionality (e.g., loaded test assemblies, plugin assemblies, or candidate assemblies for execution).
|
||||
|
||||
## 3. Invariants
|
||||
- `ITestModuleView` and `ITestModuleViewModel` must be used in conjunction per the standard MVVM pattern (view ↔ view-model binding), though the source does not enforce this directly.
|
||||
- `AssemblyList` is nullable by default (as it is a read-write property of a reference type); implementations must ensure it is initialized before use to avoid `NullReferenceException`.
|
||||
- No explicit validation rules or ordering constraints are defined for `AssemblyList` (e.g., no requirement for uniqueness, null-safety, or sortedness).
|
||||
|
||||
## 4. Dependencies
|
||||
- **Depends on**:
|
||||
- `DTS.Common.Base` (for `IBaseView`, `IBaseViewModel`)
|
||||
- `System.Collections.Generic` (for `List<T>`)
|
||||
- `System.Reflection` (for `Assembly`)
|
||||
- **Depended on by**:
|
||||
- Unknown from source alone. Concretions (e.g., `TestModuleView : ITestModuleView`, `TestModuleViewModel : ITestModuleViewModel`) and consumers (e.g., DI containers, view-resolution logic) are not visible here.
|
||||
|
||||
## 5. Gotchas
|
||||
- **Ambiguous scope of `AssemblyList`**: The interface does not clarify whether `AssemblyList` represents *all* assemblies, *selected* assemblies, *loaded* assemblies, or *candidate* assemblies. Its semantics are implementation-defined.
|
||||
- **No immutability or change notification**: The property is read-write with no indication of reactive updates (e.g., `INotifyCollectionChanged`). Consumers may need to manually handle synchronization if the list is modified externally.
|
||||
- **No null-safety contract**: While `List<Assembly>` is non-nullable as a type, the property itself may be `null` at initialization. Implementers must decide whether to auto-initialize or require callers to do so.
|
||||
- **Namespace quirk**: The `// ReSharper disable CheckNamespace` directive suggests intentional namespace flattening (likely to avoid deep nesting), but this is a tooling hint—not a runtime behavior—and does not affect semantics.
|
||||
|
||||
None identified beyond the above.
|
||||
@@ -0,0 +1,110 @@
|
||||
---
|
||||
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-16T02:33:09.531156+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "b60d1a2f75a9d685"
|
||||
---
|
||||
|
||||
# TestSummary
|
||||
|
||||
## Documentation: Test Summary List Module
|
||||
|
||||
### 1. Purpose
|
||||
This module defines the interface contracts for a *Test Summary List* view and its associated ViewModel in a test data visualization system. It enables the display, selection, and management of test summary items—each representing a test run with associated metadata, channels, and graphs—within a list-based UI (e.g., a grid or list view). The module serves as the abstraction layer between the UI (via `ITestSummaryListView`) and the data/logic layer (via `ITestSummaryListViewModel`), supporting selection tracking, dynamic list updates (via `ObservableCollection`), and publishing of selected items for downstream processing.
|
||||
|
||||
---
|
||||
|
||||
### 2. Public Interface
|
||||
|
||||
#### `ITestSummaryListView`
|
||||
- **Inherits**: `IBaseView`
|
||||
- **Description**: A marker interface representing the *view* component for the test summary list UI. It has no additional members beyond inheritance, implying the view implementation is expected to conform to the base view contract (e.g., binding context, lifecycle hooks) but does not expose further view-specific APIs in this interface.
|
||||
|
||||
#### `ITestSummaryListViewModel`
|
||||
- **Inherits**: `IBaseViewModel`
|
||||
- **Properties**:
|
||||
- `ITestSummaryListView View { get; }`
|
||||
Gets the associated Shell View instance (the concrete UI control bound to this ViewModel).
|
||||
- `ObservableCollection<ITestSummary> TestSummaryList { get; set; }`
|
||||
The primary collection of test summary items displayed in the list. Supports change notifications via `ObservableCollection<T>`.
|
||||
- `List<ITestSummary> SelectedTestSummaryList { get; set; }`
|
||||
A *separate* list tracking currently selected `ITestSummary` items (distinct from `TestSummaryList`). Not observable—changes must be explicitly managed.
|
||||
|
||||
- **Methods**:
|
||||
- `void PublishSelectedTestSummaryList()`
|
||||
Triggers publication (e.g., event, message, or command) of the current `SelectedTestSummaryList` to other parts of the system (e.g., for analysis, export, or visualization).
|
||||
- `void TestSummaryList_CollectionChanged(object sender, NotifyCollectionChangedEventArgs e)`
|
||||
Handles `CollectionChanged` events from `TestSummaryList` (e.g., item added/removed/moved). Likely updates internal state (e.g., syncs selection, refreshes UI).
|
||||
|
||||
#### `ITestSummary`
|
||||
- **Inherits**: `IBaseClass`
|
||||
- **Properties**:
|
||||
- `string Id { get; set; }`
|
||||
Unique identifier for the test summary.
|
||||
- `string SetupName { get; set; }`
|
||||
Name of the test setup/configuration used.
|
||||
- `string Description { get; set; }`
|
||||
Human-readable description of the test.
|
||||
- `int ChannelCount { get; set; }`
|
||||
Number of raw channels in the test.
|
||||
- `DateTime FileDate { get; set; }`
|
||||
Date the test data file was created/modified.
|
||||
- `DateTime TimeStamp { get; set; }`
|
||||
Timestamp of the test run (possibly when started or completed).
|
||||
- `string DataType { get; set; }`
|
||||
Type/classification of the test data (e.g., "Vibration", "Temperature").
|
||||
- `bool IsSelected { get; set; }`
|
||||
Indicates whether this item is currently selected in the UI.
|
||||
- `List<ITestGraphs> Graphs { get; set; }`
|
||||
Collection of graph definitions associated with this test.
|
||||
- `List<ITestChannel> Channels { get; set; }`
|
||||
List of raw measurement channels.
|
||||
- `List<ITestChannel> CalculatedChannels { get; set; }`
|
||||
List of derived/calculated channels (e.g., computed from raw channels).
|
||||
- `IBaseViewModel Parent { get; set; }`
|
||||
Reference to the parent ViewModel (e.g., for navigation or context).
|
||||
- `ITestMetadata TestMetadata { get; set; }`
|
||||
Structured metadata (e.g., test conditions, operator, equipment).
|
||||
- `CalibrationBehaviors CalibrationBehavior { get; set; }`
|
||||
Enumerated calibration behavior flags (from `DTS.Common.Enums.Sensors`).
|
||||
|
||||
---
|
||||
|
||||
### 3. Invariants
|
||||
- `TestSummaryList` must be an `ObservableCollection<ITestSummary>`; direct replacement (e.g., assigning a `List<T>`) is allowed by the property setter but may require manual event subscription for change notifications.
|
||||
- `SelectedTestSummaryList` is a plain `List<ITestSummary>`—no automatic synchronization with `TestSummaryList` or `IsSelected` flags is implied. Updates to selection must be handled explicitly (e.g., via `TestSummaryList_CollectionChanged`).
|
||||
- `ITestSummaryListViewModel.TestSummaryList_CollectionChanged` is expected to be subscribed to `TestSummaryList.CollectionChanged` events; failure to do so may result in stale selection state.
|
||||
- `IsSelected` on an `ITestSummary` instance is *not* guaranteed to reflect its presence in `SelectedTestSummaryList` unless explicitly synchronized (e.g., in `TestSummaryList_CollectionChanged`).
|
||||
- `Parent` on `ITestSummary` must be non-null if the item is part of a ViewModel-managed list (as `Parent` is used for context).
|
||||
|
||||
---
|
||||
|
||||
### 4. Dependencies
|
||||
|
||||
#### This module depends on:
|
||||
- `DTS.Common.Base` (for `IBaseView`, `IBaseViewModel`, `IBaseClass`).
|
||||
- `System.Collections.Generic`, `System.Collections.ObjectModel`, `System.Collections.Specialized` (for collection types).
|
||||
- `DTS.Common.Interface.TestDefinition` (for `ITestSummary`, `ITestGraphs`, `ITestChannel`, `ITestMetadata`).
|
||||
- `DTS.Common.Enums.Sensors` (for `CalibrationBehaviors` enum).
|
||||
|
||||
#### This module is depended upon by:
|
||||
- Concrete implementations of `ITestSummaryListView` (e.g., WPF `UserControl` or `Window` hosting the list).
|
||||
- Concrete implementations of `ITestSummaryListViewModel` (e.g., a ViewModel class managing test data display).
|
||||
- Any consumer of `PublishSelectedTestSummaryList()` (e.g., a command handler, event listener, or service that processes selected tests).
|
||||
- Code that constructs or manipulates `ITestSummary` instances (e.g., test data loaders, parsers).
|
||||
|
||||
---
|
||||
|
||||
### 5. Gotchas
|
||||
- **Selection Synchronization Risk**: `SelectedTestSummaryList` and `IsSelected` are *not* automatically kept in sync. Implementations must manually update both (e.g., in `TestSummaryList_CollectionChanged`) to avoid inconsistencies.
|
||||
- **`TestSummaryList_CollectionChanged` is a method, not an event**: It must be *called* explicitly (e.g., from `TestSummaryList.CollectionChanged += viewModel.TestSummaryList_CollectionChanged`). It is not an event handler itself.
|
||||
- **`TestSummaryList` setter allows reassignment**: Assigning a new `ObservableCollection<ITestSummary>` will require re-subscribing to its `CollectionChanged` event; the old collection’s subscription is lost.
|
||||
- **`IsSelected` is a property on `ITestSummary` but not used in the interface contract**: Its purpose is unclear without seeing implementations—likely used by the *view* for UI highlighting, but not enforced by the ViewModel interface.
|
||||
- **No explicit ordering guarantees**: `TestSummaryList` order is determined by the underlying `ObservableCollection<T>`; no sorting or ordering logic is defined in this interface.
|
||||
- **`CalibrationBehaviors` enum usage**: Its meaning and valid values are defined externally (`DTS.Common.Enums.Sensors`); behavior changes based on this property are not described here.
|
||||
|
||||
None identified beyond the above.
|
||||
@@ -0,0 +1,61 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.CommonCore/Interface/DTS.Viewer/ViewerSettings/IViewerSettingsView.cs
|
||||
- Common/DTS.CommonCore/Interface/DTS.Viewer/ViewerSettings/IViewerSettingsViewModel.cs
|
||||
generated_at: "2026-04-16T02:32:41.267985+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "aacb0b18894c95e6"
|
||||
---
|
||||
|
||||
# ViewerSettings
|
||||
|
||||
## Documentation: Viewer Settings Module Interfaces
|
||||
|
||||
### 1. Purpose
|
||||
This module defines the contract interfaces for the viewer settings UI layer, implementing the Model-View-ViewModel (MVVM) pattern. It provides a standardized abstraction between the view (UI) and view model (logic/data) for configuring viewer-specific settings—specifically calibration behavior and visibility of settings sections. The interfaces `IViewerSettingsView` and `IViewerSettingsViewModel` enable decoupled development and testing of the viewer settings UI, ensuring separation of concerns while integrating into the broader `DTS.Common` framework.
|
||||
|
||||
### 2. Public Interface
|
||||
|
||||
#### `IViewerSettingsView`
|
||||
- **Inherits**: `IBaseView`
|
||||
- **Description**: A marker interface representing the view (e.g., a WPF `UserControl`) responsible for rendering viewer settings. It carries no additional members beyond those defined in `IBaseView`, implying it relies on base view conventions (e.g., binding context, lifecycle hooks) defined elsewhere.
|
||||
|
||||
#### `IViewerSettingsViewModel`
|
||||
- **Inherits**: `IBaseViewModel`
|
||||
- **Properties**:
|
||||
- `IViewerSettingsView View { get; set; }`
|
||||
Gets or sets the associated view instance. Enables two-way binding and view-model-to-view coordination.
|
||||
- `IBaseViewModel Parent { get; set; }`
|
||||
Gets or sets the parent view model, supporting hierarchical view model composition (e.g., for navigation or context propagation).
|
||||
- `Visibility CalibrationBehaviorSettingVisibility { get; set; }`
|
||||
Controls the visibility of the calibration behavior setting UI element (e.g., a dropdown or group box). Read-write, allowing runtime toggling.
|
||||
- `Visibility OverallSettingsVisibility { get; }`
|
||||
Read-only visibility flag for the entire settings section (e.g., to hide/show the whole panel). Likely derived from application state or permissions.
|
||||
- `DisplayedCalibrationBehavior[] AvailableCalibrationBehaviors { get; }`
|
||||
Returns an array of available calibration behavior options, represented as `DisplayedCalibrationBehavior` objects (defined in `DTS.Common.Classes.Sensors`). Used to populate a selection UI.
|
||||
- **Methods**:
|
||||
- `void PublishChanges()`
|
||||
Commits or broadcasts any pending changes made in the settings UI (e.g., to a sensor configuration service or settings store). Behavior is implementation-defined but implies persistence or notification.
|
||||
|
||||
### 3. Invariants
|
||||
- `View` must be assigned to an instance implementing `IViewerSettingsView` before the view model is used (enforced by MVVM framework conventions, though not explicitly validated in the interface).
|
||||
- `CalibrationBehaviorSetting` must be one of the values in `AvailableCalibrationBehaviors` at all times; invalid assignments are expected to be rejected by the implementation (not enforced by interface).
|
||||
- `OverallSettingsVisibility` is read-only and must remain consistent with higher-level application state (e.g., user role, active sensor type).
|
||||
- `AvailableCalibrationBehaviors` must be non-null and immutable once set; modifications require reassignment.
|
||||
|
||||
### 4. Dependencies
|
||||
- **Depends on**:
|
||||
- `DTS.Common.Base` (provides `IBaseView`, `IBaseViewModel`)
|
||||
- `System.Windows` (for `Visibility` type)
|
||||
- `DTS.Common.Classes.Sensors` (for `DisplayedCalibrationBehavior` type)
|
||||
- **Depended on by**:
|
||||
- Likely consumed by a WPF UI project (via `IViewerSettingsView`) and a core logic/service layer (via `IViewerSettingsViewModel`).
|
||||
- Implementation classes (e.g., `ViewerSettingsViewModel`, `ViewerSettingsView`) would depend on this interface for decoupled instantiation and testing.
|
||||
|
||||
### 5. Gotchas
|
||||
- `DisplayedCalibrationBehavior` is referenced but not defined in this source; its structure (e.g., properties like `Name`, `Value`) is unknown here and must be verified in `DTS.Common.Classes.Sensors`.
|
||||
- `PublishChanges()` has no documented error handling or rollback semantics—implementation may throw or silently fail.
|
||||
- `OverallSettingsVisibility` is read-only; callers cannot directly control it, which may limit flexibility if dynamic reconfiguration is needed.
|
||||
- No validation or null-safety guarantees are specified for `View` or `Parent`; implementations must handle null references.
|
||||
- None identified from source alone.
|
||||
@@ -0,0 +1,410 @@
|
||||
---
|
||||
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-16T02:27:19.835700+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "bca3af738f7131f7"
|
||||
---
|
||||
|
||||
# Documentation: Data Recorder Interfaces Module
|
||||
|
||||
## 1. Purpose
|
||||
|
||||
This module defines core interfaces for representing hardware data acquisition systems (DAS), their channels, and their database-backed metadata in the TTS (Test Tracking System) ecosystem. It serves as the foundational abstraction layer between the application logic and physical hardware or database records, enabling consistent handling of diverse hardware types (e.g., TDAS racks, G5 modules, TSRAIR devices, SLICE controllers) and their capabilities (e.g., analog sensing, squib firing, digital I/O, UART, clocks). The interfaces decouple hardware discovery, configuration, and diagnostics from implementation details, supporting both runtime hardware interaction (`IDASHardware`, `IHardwareChannel`) and persistent storage (`IDASDBRecord`, `IDASChannelDBRecord`).
|
||||
|
||||
## 2. Public Interface
|
||||
|
||||
### `IHardwareChannel`
|
||||
Represents a single physical channel on a DAS device.
|
||||
|
||||
- **`IDiagnosticResult Diagnostics { get; }`**
|
||||
Returns diagnostic results for this channel if available; `null` otherwise.
|
||||
|
||||
- **`bool IsSupportedBridgeType(SensorConstants.BridgeType bridgeType)`**
|
||||
Returns `true` if the channel supports the specified bridge type (e.g., IEPE, quarter, half, full bridge).
|
||||
|
||||
- **`int ChannelNumber { get; }`**
|
||||
Gets the physical channel index (0-based or 1-based depending on hardware).
|
||||
|
||||
- **`string GetId()`**
|
||||
Returns a unique identifier string for this channel (implementation-specific format).
|
||||
|
||||
- **`bool IsAnalog { get; }`**
|
||||
Returns `true` if the channel supports analog sensors.
|
||||
|
||||
- **`bool IsSquib { get; }`**
|
||||
Returns `true` if the channel supports squib firing.
|
||||
|
||||
- **`bool IsDigitalOut { get; }`**
|
||||
Returns `true` if the channel supports digital outputs.
|
||||
|
||||
- **`bool IsDigitalIn { get; }`**
|
||||
Returns `true` if the channel supports digital inputs.
|
||||
|
||||
- **`bool IsUart { get; }`**
|
||||
Returns `true` if the channel supports UART I/O.
|
||||
|
||||
- **`bool IsStreamIn { get; }`**
|
||||
Returns `true` if the channel supports stream input.
|
||||
|
||||
- **`bool IsStreamOut { get; }`**
|
||||
Returns `true` if the channel supports stream output.
|
||||
|
||||
- **`bool IsClock { get; }`**
|
||||
Returns `true` if the channel supports real-time clock functionality.
|
||||
|
||||
- **`bool IsTSRAIR { get; }`**
|
||||
Returns `true` if this channel belongs to a TSRAIR device.
|
||||
|
||||
- **`bool IsTSRAIRModule { get; }`**
|
||||
Returns `true` if this channel belongs to a TSRAIR module.
|
||||
|
||||
- **`IDASHardware GetParentDAS()`**
|
||||
Returns the parent DAS device (`IDASHardware`) this channel is part of.
|
||||
|
||||
- **`string ModuleSerialNumber { get; set; }`**
|
||||
Gets or sets the serial number of the module this channel resides on.
|
||||
|
||||
- **`bool IsSupportedExcitation(ExcitationVoltageOptions.ExcitationVoltageOption excitation)`**
|
||||
Returns `true` if the specified excitation voltage (e.g., 2V, 5V, 10V) is supported.
|
||||
|
||||
- **`bool IsG5()`**
|
||||
Returns `true` if the channel’s module serial number starts with `"5M"`.
|
||||
|
||||
- **`string ToString(IDASHardware[] hardwares)`**
|
||||
Returns a human-readable string representation of the channel, potentially using the provided `hardwares` array for context.
|
||||
|
||||
---
|
||||
|
||||
### `IDASDBRecord`
|
||||
Represents a DAS device record in the database.
|
||||
|
||||
- **`int DASId { get; set; }`**
|
||||
Primary key ID of the DAS record.
|
||||
|
||||
- **`string SerialNumber { get; set; }`**
|
||||
Hardware serial number.
|
||||
|
||||
- **`int DASType { get; set; }`**
|
||||
Numeric type identifier for the DAS (e.g., 1 = TDAS, 2 = G5).
|
||||
|
||||
- **`int MaxModules { get; set; }`**
|
||||
Maximum number of modules supported by this DAS.
|
||||
|
||||
- **`long MaxMemory { get; set; }`**
|
||||
Maximum storage capacity in bytes.
|
||||
|
||||
- **`double MaxSampleRate { get; set; }`**
|
||||
Maximum supported sample rate (Hz).
|
||||
|
||||
- **`double MinSampleRate { get; set; }`**
|
||||
Minimum supported sample rate (Hz).
|
||||
|
||||
- **`string FirmwareVersion { get; set; }`**
|
||||
Firmware version string.
|
||||
|
||||
- **`DateTime CalDate { get; set; }`**
|
||||
Calibration date.
|
||||
|
||||
- **`int ProtocolVersion { get; set; }`**
|
||||
Protocol version used by the hardware.
|
||||
|
||||
- **`DateTime LastModified { get; set; }`**
|
||||
Timestamp of last database modification.
|
||||
|
||||
- **`string LastModifiedBy { get; set; }`**
|
||||
User who last modified the record.
|
||||
|
||||
- **`int Version { get; set; }`**
|
||||
Record version number (for concurrency control).
|
||||
|
||||
- **`bool LocalOnly { get; set; }`**
|
||||
Deprecated; indicates if record should remain local only.
|
||||
|
||||
- **`DateTime LastUsed { get; set; }`**
|
||||
Timestamp of last use.
|
||||
|
||||
- **`string LastUsedBy { get; set; }`**
|
||||
User who last used the hardware.
|
||||
|
||||
- **`string Connection { get; set; }`**
|
||||
Connectivity status for Hardware Scan (e.g., `"Ethernet"`, `"Serial"`).
|
||||
|
||||
- **`int Channels { get; set; }`**
|
||||
Total number of channels on this DAS.
|
||||
|
||||
- **`string Position { get; set; }`**
|
||||
Physical location string (e.g., `"Rack A, Slot 3"`).
|
||||
|
||||
- **`int[] ChannelTypes { get; set; }`**
|
||||
Array of channel type identifiers (e.g., `0` = analog, `1` = digital).
|
||||
|
||||
- **`bool IsProgrammable { get; set; }`**
|
||||
Indicates if the DAS is programmable.
|
||||
|
||||
- **`bool IsReconfigurable { get; set; }`**
|
||||
Indicates if the DAS can be reconfigured.
|
||||
|
||||
- **`bool IsModule { get; set; }`**
|
||||
Indicates if this hardware is a standalone unit (`false`) or a rack/module (`true`).
|
||||
|
||||
- **`int PositionOnDistributor { get; set; }`**
|
||||
Position index on a distributor bus.
|
||||
|
||||
- **`int PositionOnChain { get; set; }`**
|
||||
Position index in a daisy-chain.
|
||||
|
||||
- **`int Port { get; set; }`**
|
||||
Communication port number.
|
||||
|
||||
- **`string ParentDAS { get; set; }`**
|
||||
Serial number of parent DAS (for modules).
|
||||
|
||||
- **`DateTime? FirstUseDate { get; set; }`**
|
||||
First use date after calibration; `null` if unused since calibration or `IsFirstUseValid == false`.
|
||||
|
||||
- **`int? TestId { get; set; }`**
|
||||
Test ID if this is stand-in hardware used only in a test.
|
||||
|
||||
- **`int? GroupId { get; set; }`**
|
||||
Group ID if this is stand-in hardware used only in a group.
|
||||
|
||||
- **`bool StandIn { get; set; }`**
|
||||
`true` if this is dummy/stand-in hardware (no real data collection).
|
||||
|
||||
- **`double MaxAAFRate { get; set; }`**
|
||||
Maximum anti-aliasing filter rate (Hz).
|
||||
|
||||
- **`bool IsFirstUseValid { get; set; }`**
|
||||
`true` if `FirstUseDate` is tracked and valid for this hardware.
|
||||
|
||||
---
|
||||
|
||||
### `IDASHardware`
|
||||
Represents a live DAS hardware instance in the application (e.g., during Hardware Scan).
|
||||
|
||||
- **`bool IsStandIn()`**
|
||||
Returns `true` if this is a stand-in (dummy) DAS.
|
||||
|
||||
- **`bool IsFirstUseValid { get; }`**
|
||||
Returns `true` if `FirstUseDate` is tracked.
|
||||
|
||||
- **`DateTime? FirstUseDate { get; }`**
|
||||
First use date after calibration; `null` if unused or `IsFirstUseValid == false`.
|
||||
|
||||
- **`bool IsPseudoRack()`**
|
||||
Returns `true` if this DAS is a pseudo-rack (likely a logical grouping).
|
||||
|
||||
- **`int DASId { get; }`**
|
||||
Database ID of the DAS.
|
||||
|
||||
- **`string SerialNumber { get; set; }`**
|
||||
Hardware serial number.
|
||||
|
||||
- **`string SerialNumberFamily { get; set; }`**
|
||||
Family name or prefix of the serial number.
|
||||
|
||||
- **`string EIDFound { get; set; }`**
|
||||
EID (Electronic ID) status or value.
|
||||
|
||||
- **`string BatteryVoltageStatus { get; set; }`**
|
||||
Battery voltage status string (e.g., `"OK"`, `"Low"`).
|
||||
|
||||
- **`System.Windows.Media.SolidColorBrush BatteryVoltageColor { get; set; }`**
|
||||
UI color for battery status.
|
||||
|
||||
- **`string InputVoltageStatus { get; set; }`**
|
||||
Input voltage status string.
|
||||
|
||||
- **`System.Windows.Media.SolidColorBrush InputVoltageColor { get; set; }`**
|
||||
UI color for input voltage status.
|
||||
|
||||
- **`string ParentDAS { get; set; }`**
|
||||
Serial number of parent DAS (for modules).
|
||||
|
||||
- **`string Connection { get; set; }`**
|
||||
Connectivity status for Hardware Scan.
|
||||
|
||||
- **`IHardwareChannel[] GetIHardwareChannels()`**
|
||||
Returns all channels on this DAS.
|
||||
|
||||
- **`bool IsSLICEEthernetController { get; }`**
|
||||
Returns `true` if this DAS is a SLICE Ethernet Controller.
|
||||
|
||||
- **`bool IsTDASRack()`**
|
||||
Returns `true` if this DAS is a TDAS rack.
|
||||
|
||||
- **`bool IsG5()`**
|
||||
Returns `true` if this DAS is a G5 device (serial starts with `"5M"`).
|
||||
|
||||
- **`bool IsTSRAIR()`**
|
||||
Returns `true` if this DAS is a TSRAIR device.
|
||||
|
||||
- **`bool IsTSRAIRModule()`**
|
||||
Returns `true` if this DAS is a TSRAIR module.
|
||||
|
||||
- **`double GetMinSampleRateDouble()`**
|
||||
Returns the minimum sample rate supported by this DAS.
|
||||
|
||||
- **`double GetMaxSampleRateDouble()`**
|
||||
Returns the maximum sample rate supported by this DAS.
|
||||
|
||||
- **`bool IsModule()`**
|
||||
Returns `true` if this hardware is a module (not standalone). Used to control visibility in Hardware Scan.
|
||||
|
||||
- **`string LastModifiedBy { get; set; }`**
|
||||
User who last modified the hardware record.
|
||||
|
||||
- **`DateTime LastModified { get; set; }`**
|
||||
Timestamp of last modification.
|
||||
|
||||
- **`HardwareTypes DASTypeEnum { get; set; }`**
|
||||
Enumerated type of the DAS (e.g., `HardwareTypes.TDAS`, `HardwareTypes.G5`).
|
||||
|
||||
---
|
||||
|
||||
### `IDASChannelDBRecord`
|
||||
Represents a channel record in the database.
|
||||
|
||||
- **`string HardwareId { get; set; }`**
|
||||
Composite ID for the parent hardware (`serialnumber_dastype`).
|
||||
|
||||
- **`int DaschannelId { get; set; }`**
|
||||
Primary key of the channel record.
|
||||
|
||||
- **`int? Dasid { get; set; }`**
|
||||
Foreign key to `IDASDBRecord.DASId`.
|
||||
|
||||
- **`int ChannelIdx { get; set; }`**
|
||||
Physical channel index on the DAS.
|
||||
|
||||
- **`int SupportedBridges { get; set; }`**
|
||||
Bitmask of supported bridge types:
|
||||
- Bit 0: IEPE
|
||||
- Bit 1: Quarter bridge
|
||||
- Bit 2: Half bridge
|
||||
- Bit 3: Full bridge
|
||||
- Bit 4: Digital input
|
||||
- Bit 5: Squib fire
|
||||
- Bit 6: Digital output
|
||||
- Bit 7: Half bridge signal plus (G5)
|
||||
- Bit 8: Real-time clock
|
||||
- Bit 9: UART
|
||||
|
||||
- **`int SupportedExcitations { get; set; }`**
|
||||
Bitmask of supported excitation voltages:
|
||||
- Bit 0: Invalid/undefined
|
||||
- Bit 1: 2V
|
||||
- Bit 2: 2.5V
|
||||
- Bit 3: 3V
|
||||
- Bit 4: 5V
|
||||
- Bit 5: 10V
|
||||
- Bit 6: 1V
|
||||
|
||||
- **`int DASDisplayOrder { get; set; }`**
|
||||
Logical display order (may differ from `ChannelIdx`).
|
||||
|
||||
- **`bool LocalOnly { get; set; }`**
|
||||
Deprecated; indicates if record should remain local.
|
||||
|
||||
- **`int SupportedDigitalInputModes { get; set; }`**
|
||||
Bitmask for digital input modes (if `SupportedBridges` includes digital input):
|
||||
- Bit 0: Invalid
|
||||
- Bit 1: TLH (Transition low-to-high)
|
||||
- Bit 2: THL (Transition high-to-low)
|
||||
- Bit 3: CCNO (Contact closure, normally open)
|
||||
- Bit 4: CCNC (Contact closure, normally closed)
|
||||
|
||||
- **`int SupportedSquibFireModes { get; set; }`**
|
||||
Bitmask for squib fire modes (if `SupportedBridges` includes squib fire):
|
||||
- Bit 0: Invalid
|
||||
- Bit 1: Capacitor discharge
|
||||
- Bit 2: Constant current
|
||||
- Bit 3: AC discharge
|
||||
|
||||
- **`int SupportedDigitalOutputModes { get; set; }`**
|
||||
Bitmask for digital output modes (if `SupportedBridges` includes digital output):
|
||||
- Bit 0: 5V low-to-high (FVLH)
|
||||
- Bit 1: 5V high-to-low (FVHL)
|
||||
- Bit 2: CCNO
|
||||
- Bit 3: CCNC
|
||||
|
||||
- **`string ModuleSerialNumber { get; set; }`**
|
||||
Serial number of the module this channel belongs to.
|
||||
|
||||
- **`int SettingId { get; set; }`**
|
||||
ID of the channel configuration setting.
|
||||
|
||||
- **`int ModuleArrayIndex { get; set; }`**
|
||||
Index of the module among modules on the DAS.
|
||||
|
||||
---
|
||||
|
||||
## 3. Invariants
|
||||
|
||||
- **Channel Type Consistency**:
|
||||
For `IHardwareChannel`, the boolean flags (`IsAnalog`, `IsSquib`, etc.) must be mutually consistent with `IsSupportedBridgeType()` results. For example, if `IsSquib == true`, then `IsSupportedBridgeType(SensorConstants.BridgeType.Squib)` must return `true`.
|
||||
|
||||
- **Excitation Support Consistency**:
|
||||
`IsSupportedExcitation()` must align with the `SupportedExcitations` bitmask in `IDASChannelDBRecord`. For instance, if `SupportedExcitations` has bit 4 (5V) set, then `IsSupportedExcitation(ExcitationVoltageOptions.ExcitationVoltageOption.V5)` must return `true`.
|
||||
|
||||
- **Bridge Type Bitmask Semantics**:
|
||||
`SupportedBridges` in `IDASChannelDBRecord` and `IsSupportedBridgeType()` in `IHardwareChannel` must use the same bridge type definitions (`SensorConstants.BridgeType` enum).
|
||||
|
||||
- **G5 Detection Consistency**:
|
||||
`IsG5()` in `IHardwareChannel` and `IDASHardware` both check for serial number prefix `"5M"`; this behavior must be consistent across implementations.
|
||||
|
||||
- **First Use Date Validity**:
|
||||
`FirstUseDate` is only meaningful if `IsFirstUseValid == true`. If `IsFirstUseValid == false`, `FirstUseDate` must be `null`.
|
||||
|
||||
- **Module Hierarchy**:
|
||||
`IDASHardware.IsModule()` and `IDASDBRecord.IsModule` must agree on whether the hardware is a module. `IDASHardware.ParentDAS` and `IDASDBRecord.ParentDAS` must refer to the same parent.
|
||||
|
||||
- **Channel Indexing**:
|
||||
`ChannelIdx` in `IDASChannelDBRecord` and `ChannelNumber` in `IHardwareChannel` refer to the same physical channel index on the hardware.
|
||||
|
||||
---
|
||||
|
||||
## 4. Dependencies
|
||||
|
||||
### This Module Depends On:
|
||||
- **`DTS.Common.Enums`**
|
||||
- `SensorConstants.BridgeType` (for `IsSupportedBridgeType`)
|
||||
- `ExcitationVoltageOptions.ExcitationVoltageOption` (for `IsSupportedExcitation`)
|
||||
- `HardwareTypes` (for `IDASHardware.DASTypeEnum`)
|
||||
|
||||
- **`DTS.Common.Interface.DASFactory.Diagnostics`**
|
||||
- `IDiagnosticResult` (for `IHardwareChannel.Diagnostics`)
|
||||
|
||||
- **`System`**
|
||||
- `DateTime`, `Array`, `Attribute` classes (`[Key]`, `[Column]`)
|
||||
|
||||
- **`System.ComponentModel.DataAnnotations`**
|
||||
- `[Key]`, `[Column]` attributes for `IDASChannelDBRecord`
|
||||
|
||||
- **`System.Windows.Media`**
|
||||
- `SolidColorBrush` (for `IDASHardware` battery/input voltage colors)
|
||||
|
||||
### This Module Is Used By:
|
||||
- **Hardware discovery/scanning logic** (e.g., `IDASHardware`, `IHardwareChannel`)
|
||||
- **Database persistence layers** (e.g., `IDASDBRecord`, `IDASChannelDBRecord`)
|
||||
- **Configuration and setup UIs** (e.g., `DASDisplayOrder`, `Connection`, `Position`)
|
||||
- **Diagnostics and validation tools** (e.g., `Diagnostics`, `IsFirstUseValid`, `FirstUseDate`)
|
||||
- **Test setup and channel mapping logic** (e.g., `ChannelIdx`, `ModuleArrayIndex`, `SettingId`)
|
||||
|
||||
---
|
||||
|
||||
## 5. Gotchas
|
||||
|
||||
- **`LocalOnly` is deprecated**:
|
||||
Both `IDASDBRecord` and `IDASChannelDBRecord` include `LocalOnly`, but the documentation explicitly states it is deprecated. Do not rely on this property for new logic.
|
||||
|
||||
- **`DASDisplayOrder` may differ from `ChannelIdx`**:
|
||||
The documentation warns that display order and physical channel order may not match for some hardware (e.g., channel interleaving). Always use `DASDisplayOrder` for UI ordering.
|
||||
|
||||
- **`IsModule()` semantics differ between `IDASHardware` and `IDASDBRecord`**:
|
||||
In `IDASHardware`, `IsModule()` controls visibility in Hardware Scan (e.g., hides Slice bridges). In `IDASDBRecord`, `IsModule` indicates whether the hardware is a module vs
|
||||
@@ -0,0 +1,153 @@
|
||||
---
|
||||
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-16T02:17:57.680551+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "142a1b67b74ee9e9"
|
||||
---
|
||||
|
||||
# Database
|
||||
|
||||
## Documentation: Database View/ViewModel Interfaces
|
||||
|
||||
### 1. Purpose
|
||||
This module defines a set of interfaces for database-related UI components in a Model-View-ViewModel (MVVM) architecture. It provides contracts for views and viewmodels that manage database connection status, database switching (local ↔ remote), and database copying operations. These interfaces decouple UI presentation logic from implementation details, enabling modular UI development and testability. The interfaces are part of the `DTS.Common.Interface.Database` namespace and extend base contracts (`IBaseView`, `IBaseViewModel`) to integrate with the broader DTS framework.
|
||||
|
||||
---
|
||||
|
||||
### 2. Public Interface
|
||||
|
||||
#### **Interfaces (View Contracts)**
|
||||
- **`IDatabaseCopyView : IBaseView`**
|
||||
Marker interface for the view associated with `IDatabaseCopyViewModel`. Represents the UI layer for database copy operations.
|
||||
|
||||
- **`IDatabaseSwitchView : IBaseView`**
|
||||
Marker interface for the view associated with `IDatabaseSwitchViewModel`. Represents the UI layer for switching between local and remote databases.
|
||||
|
||||
- **`IDatabaseStatusBarView : IBaseView`**
|
||||
Marker interface for the view associated with `IDatabaseStatusBarViewModel`. Represents the UI layer for displaying database connection status (e.g., active database name, connection state).
|
||||
|
||||
#### **Interfaces (ViewModel Contracts)**
|
||||
- **`IDatabaseSwitchViewModel : IBaseViewModel`**
|
||||
Manages state and logic for switching between local and remote databases.
|
||||
- `IDatabaseSwitchView View { get; set; }`
|
||||
Gets/sets the associated view.
|
||||
- `void Unset()`
|
||||
Releases resources (e.g., event handlers, view references).
|
||||
- `bool RemoteIsActive { get; }`
|
||||
Indicates whether the remote database is currently active.
|
||||
- `string DefaultDbName { get; }`
|
||||
Gets the default database name.
|
||||
- `void InitializeDbSettings(string defaultDbName, string dbHost, bool ntlmAuthentication, string dbUser, string dbPassword)`
|
||||
Initializes database connection settings (note: `SetDefaultDbName` is commented out and unused).
|
||||
- `void SwitchRemote()` / `void SwitchLocal()`
|
||||
Initiates switching to the remote or local database, respectively.
|
||||
- `string DbHost { get; }`, `bool NTLMAuthentication { get; }`, `string DbUser { get; }`, `string DbPassword { get; }`
|
||||
Exposes current database connection configuration.
|
||||
|
||||
- **`IDatabaseCopyViewModel : IBaseViewModel`**
|
||||
Manages state and logic for copying data from a remote database to a local database.
|
||||
- `IDatabaseCopyView View { get; set; }`
|
||||
Gets/sets the associated view.
|
||||
- `void Unset()`
|
||||
Releases resources.
|
||||
- `void CopyDatabase()`
|
||||
Performs the copy operation (clears local DB, populates from remote). Uses `DTS.Common.Storage` to resolve local/remote locations.
|
||||
- `void InitializeState(DbType dbType, string dbName)`
|
||||
Initializes viewmodel state with database type and name.
|
||||
- `string DbName { get; }`
|
||||
Gets the target database name.
|
||||
- `IStatusAndProgressBarView OverallProgressBarView { get; }`
|
||||
Gets progress view for the overall copy operation.
|
||||
- `IStatusAndProgressBarView CurrentTaskProgressBarView { get; }`
|
||||
Gets progress view for the current subtask.
|
||||
- `DbType DatabaseType { get; }`
|
||||
Gets the type of database being copied.
|
||||
- `bool CopyEnabled { get; }`
|
||||
Indicates whether the copy operation is enabled.
|
||||
- `bool IsCopyVisible { get; set; }`
|
||||
Controls visibility of the copy UI.
|
||||
|
||||
- **`IDatabaseStatusBarViewModel : IBaseViewModel`**
|
||||
Manages state and logic for displaying database connection status in the UI.
|
||||
- `IDatabaseStatusBarView View { get; set; }`
|
||||
Gets/sets the associated view.
|
||||
- `void Unset()`
|
||||
Releases resources.
|
||||
- `DbType DatabaseType { get; }`
|
||||
Gets the database type (e.g., local, remote).
|
||||
- `bool RemoteConnected { get; }`
|
||||
Indicates whether the remote database is connected.
|
||||
- `string ServerName { get; }`
|
||||
Gets the server name (not database name).
|
||||
- `void InitializeValues(DbType dbType, string serverName, bool remoteConnected)`
|
||||
Sets initial values for status display.
|
||||
- `string ActiveDbName { get; }`
|
||||
Gets the currently active database name (e.g., local or remote, depending on state).
|
||||
- `Brush BackgroundBrush { get; }`
|
||||
Gets the background color brush for the active database name display.
|
||||
|
||||
#### **Data Interface**
|
||||
- **`IUserDbRecord`**
|
||||
Represents a user record in the database.
|
||||
- `int ID { get; set; }`
|
||||
Database ID of the user.
|
||||
- `string UserName { get; set; }`
|
||||
Unique username.
|
||||
- `string DisplayName { get; set; }`
|
||||
User-friendly display name.
|
||||
- `string Password { get; set; }`
|
||||
Hashed and salted password (never stored in plaintext).
|
||||
- `short Role { get; set; }`
|
||||
User role (numeric code).
|
||||
- `DateTime LastModified { get; set; }`
|
||||
Timestamp of last modification.
|
||||
- `string LastModifiedBy { get; set; }`
|
||||
Username of the modifier.
|
||||
- `bool LocalOnly { get; set; }`
|
||||
*Deprecated* flag indicating whether the user should be local-only (not synchronized).
|
||||
|
||||
---
|
||||
|
||||
### 3. Invariants
|
||||
- All view interfaces (`IDatabaseCopyView`, `IDatabaseSwitchView`, `IDatabaseStatusBarView`) extend `IBaseView`, implying they are part of a consistent UI abstraction layer.
|
||||
- All viewmodel interfaces (`IDatabaseSwitchViewModel`, `IDatabaseCopyViewModel`, `IDatabaseStatusBarViewModel`) extend `IBaseViewModel`, implying they follow the MVVM pattern and require `Unset()` for resource cleanup.
|
||||
- `IDatabaseSwitchViewModel` and `IDatabaseCopyViewModel` share overlapping functionality (e.g., clearing and repopulating local DB), but `IDatabaseCopyViewModel` includes progress tracking via `IStatusAndProgressBarView`.
|
||||
- `IUserDbRecord.Password` is explicitly documented as *hashed and salted*; implementations must never store plaintext passwords.
|
||||
- `IUserDbRecord.LocalOnly` is marked *deprecated*; its usage should be avoided.
|
||||
- `IDatabaseStatusBarViewModel.ActiveDbName` dynamically reflects the active database (local/remote) based on `DatabaseType` and `RemoteConnected` state.
|
||||
|
||||
---
|
||||
|
||||
### 4. Dependencies
|
||||
- **Internal Dependencies**:
|
||||
- `DTS.Common.Base`: All interfaces inherit from `IBaseView` or `IBaseViewModel`.
|
||||
- `DTS.Common.Enums.Database`: `IDatabaseCopyViewModel` and `IDatabaseStatusBarViewModel` use `DbType` (enum not shown; assumed to define database types like `Local`, `Remote`).
|
||||
- `System.Windows.Media`: `IDatabaseStatusBarViewModel` uses `Brush` (WPF-specific), indicating this module targets WPF UI.
|
||||
- `DTS.Common.Storage`: Referenced in `IDatabaseCopyViewModel.CopyDatabase()` documentation as the source for resolving local/remote database locations.
|
||||
|
||||
- **External Dependencies**:
|
||||
- WPF (`System.Windows.Media`) for `Brush` type.
|
||||
- `System` (via `DateTime`, `string`).
|
||||
|
||||
- **Depended Upon**:
|
||||
- Concrete implementations of these interfaces are expected in UI-layer projects (e.g., WPF views/viewmodels).
|
||||
- Likely consumed by UI controllers or services that manage database operations (e.g., a main window or database manager module).
|
||||
|
||||
---
|
||||
|
||||
### 5. Gotchas
|
||||
- **`SetDefaultDbName` is commented out** in `IDatabaseSwitchViewModel`; the property `DefaultDbName` is read-only, and initialization relies solely on `InitializeDbSettings`.
|
||||
- **`LocalOnly` is deprecated** in `IUserDbRecord` but not removed; implementations should ignore this property.
|
||||
- **`IDatabaseStatusBarViewModel.BackgroundBrush`** has no documentation on how it is computed (e.g., based on connection state). Its value is implementation-defined.
|
||||
- **`CopyDatabase()` assumes pre-existing schema**: Both `IDatabaseSwitchViewModel` and `IDatabaseCopyViewModel` require the local database to have tables and stored procedures already created.
|
||||
- **`IStatusAndProgressBarView` is used but not defined here**: Its contract is assumed to be defined elsewhere (likely in `DTS.Common.Base` or a related module).
|
||||
- **No async methods**: All operations (`SwitchRemote`, `CopyDatabase`) are synchronous; implementations may need to offload work to background threads to avoid UI blocking.
|
||||
- **`DbPassword` is exposed directly**: The `IDatabaseSwitchViewModel` exposes the plaintext password via `DbPassword { get; }`, which may be a security risk if not handled carefully.
|
||||
@@ -0,0 +1,48 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.CommonCore/Interface/DownloadData/IDownloadDataView.cs
|
||||
- Common/DTS.CommonCore/Interface/DownloadData/IDownloadDataViewModel.cs
|
||||
generated_at: "2026-04-16T02:22:52.860963+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "3467185c7a4c208b"
|
||||
---
|
||||
|
||||
# DownloadData
|
||||
|
||||
## 1. Purpose
|
||||
This module defines the core view and view model interfaces for the download data feature within the DTS (Data Transfer System) architecture. It establishes the contract between the UI layer (`IDownloadDataView`) and the presentation logic layer (`IDownloadDataViewModel`) by inheriting from the base view and view model interfaces (`IBaseView`, `IBaseViewModel`). Its role is to provide a standardized, extensible foundation for implementing download data functionality—though the interfaces themselves are currently empty, indicating they are placeholders for future feature-specific members or intended to be used in conjunction with generic UI patterns.
|
||||
|
||||
## 2. Public Interface
|
||||
No public functions, properties, or events are defined in these interfaces beyond those inherited from their base interfaces.
|
||||
|
||||
- **`IDownloadDataView`**
|
||||
- *Signature*: `public interface IDownloadDataView : IBaseView`
|
||||
- *Behavior*: Serves as the contract for the view component in the download data feature. Inherits from `IBaseView` (defined in `DTS.Common.Base`), which presumably defines standard view lifecycle or binding behavior (e.g., `DataContext`, `Initialize()`, or similar—though specifics are not visible here).
|
||||
|
||||
- **`IDownloadDataViewModel`**
|
||||
- *Signature*: `public interface IDownloadDataViewModel : IBaseViewModel`
|
||||
- *Behavior*: Serves as the contract for the view model component in the download data feature. Inherits from `IBaseViewModel` (defined in `DTS.Common.Base`), which likely defines standard view model responsibilities (e.g., `OnPropertyChanged`, `ExecuteCommand`, or data state management—though specifics are not visible here).
|
||||
|
||||
## 3. Invariants
|
||||
- `IDownloadDataView` must be implemented by a class that satisfies the contract of `IBaseView`.
|
||||
- `IDownloadDataViewModel` must be implemented by a class that satisfies the contract of `IBaseViewModel`.
|
||||
- No additional validation rules, state constraints, or ordering guarantees are specified in the source.
|
||||
- The interfaces are *marker interfaces*—they carry no explicit behavior, so invariants are limited to type hierarchy compliance.
|
||||
|
||||
## 4. Dependencies
|
||||
- **Depends on**:
|
||||
- `DTS.Common.Base.IBaseView` (via `IDownloadDataView`)
|
||||
- `DTS.Common.Base.IBaseViewModel` (via `IDownloadDataViewModel`)
|
||||
- The `DTS.Common.Base` namespace/module (not shown in source; assumed to be a core shared library).
|
||||
|
||||
- **Depended on by**:
|
||||
- Unknown from source alone. Likely consumed by concrete implementations (e.g., `DownloadDataView : IDownloadDataView`, `DownloadDataViewModel : IDownloadDataViewModel`) and potentially by DI containers, UI frameworks (e.g., MVVM frameworks), or navigation/routing logic.
|
||||
- No direct usages are visible in the provided files.
|
||||
|
||||
## 5. Gotchas
|
||||
- **Empty interfaces**: Both interfaces are currently empty. Developers may incorrectly assume they define behavior; in reality, all functionality must come from `IBaseView`/`IBaseViewModel` or future extensions.
|
||||
- **Namespace inconsistency**: `IDownloadDataView` resides in `DTS.Common.Interface`, while `IDownloadDataViewModel` resides in `DTS.Common`. This may cause confusion about intended layering or module boundaries.
|
||||
- **No versioning or deprecation markers**: No attributes or comments indicate whether these interfaces are stable, experimental, or deprecated.
|
||||
- **No documentation comments**: XML documentation is absent, making it harder to infer intended usage beyond naming.
|
||||
- **None identified from source alone.** (Note: The above points are *inferred* from structural observations, not explicit source behavior.)
|
||||
@@ -0,0 +1,72 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.CommonCore/Interface/DownloadEvent/IDownloadEvent.cs
|
||||
generated_at: "2026-04-16T02:20:00.100876+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "089f2c1bff740fce"
|
||||
---
|
||||
|
||||
# DownloadEvent
|
||||
|
||||
### **Purpose**
|
||||
This module defines the `IDownloadEvent` interface, which represents a single download event in a multiple-download system. It serves as a contract for objects that model downloadable content units (e.g., media segments, files, or tasks), exposing metadata and state necessary for UI binding and orchestration—such as identification, enablement status, defaultness, and duration—while supporting data binding via `INotifyPropertyChanged`.
|
||||
|
||||
---
|
||||
|
||||
### **Public Interface**
|
||||
|
||||
- **`int EventNumber { get; set; }`**
|
||||
Gets or sets a numeric identifier for the download event. Used for ordering or referencing the event programmatically.
|
||||
|
||||
- **`string EventNumberDisplay { get; set; }`**
|
||||
Gets or sets a user-facing string representation of the event number (e.g., `"1"`, `"A"`, `"001"`), allowing formatting distinct from `EventNumber`.
|
||||
|
||||
- **`bool IsEnabled { get; set; }`**
|
||||
Gets or sets whether the event is active and可 downloaded. When `false`, the event should be skipped or ignored during download operations.
|
||||
|
||||
- **`bool IsReadonly { get; set; }`**
|
||||
Gets or sets whether the event’s properties (e.g., `EventNumber`, `IsEnabled`) are immutable in the UI or via programmatic modification. A `true` value indicates the event is locked for editing.
|
||||
|
||||
- **`bool IsDefault { get; }`**
|
||||
Gets a read-only flag indicating whether this event is the default selection (e.g., pre-selected for download). *Cannot be set*—implementation-determined.
|
||||
|
||||
- **`TimeSpan EventLength { get; set; }`**
|
||||
Gets or sets the total duration of the downloadable content for this event (e.g., video/audio length). Represents *available* content length, not necessarily downloaded.
|
||||
|
||||
- **`bool ShouldDisplayLength { get; set; }`**
|
||||
Gets or sets whether the `EventLength` should be rendered in the UI. Allows conditional visibility of duration (e.g., hide for non-time-based downloads).
|
||||
|
||||
*All properties raise `PropertyChanged` notifications via `INotifyPropertyChanged` when modified (as required by the interface inheritance).*
|
||||
|
||||
---
|
||||
|
||||
### **Invariants**
|
||||
- `IsDefault` is read-only (`get` only); its value must be determined and fixed by the implementing type and cannot be altered externally.
|
||||
- `EventLength` represents *available* content duration, not actual downloaded bytes or progress—its semantics are temporal, not volumetric.
|
||||
- `IsReadonly` and `IsEnabled` may be set independently, but UI behavior should ensure `IsReadonly = true` implies `IsEnabled` cannot be toggled by user action (though programmatic changes remain possible).
|
||||
- `EventNumberDisplay` is *not* required to match `EventNumber.ToString()`; implementations may format it arbitrarily (e.g., localized, padded, or symbolic).
|
||||
|
||||
---
|
||||
|
||||
### **Dependencies**
|
||||
- **Depends on**:
|
||||
- `System` (core types like `TimeSpan`, `EventHandler`)
|
||||
- `System.ComponentModel` (`INotifyPropertyChanged`)
|
||||
- **Depended on by**:
|
||||
- UI layers (e.g., WPF/WinForms view models) that bind to download event lists
|
||||
- Download orchestration logic that filters or prioritizes events based on `IsEnabled`, `IsDefault`, or `EventNumber`
|
||||
- Serialization/deserialization logic (e.g., for persisting download configurations)
|
||||
|
||||
*No other internal module dependencies are visible in this file.*
|
||||
|
||||
---
|
||||
|
||||
### **Gotchas**
|
||||
- `EventLength` is named descriptively as *“total length available for download event”* in XML doc, but the property itself does not distinguish between *total available* vs. *downloaded*—consumers must infer semantics from naming and context.
|
||||
- `IsDefault` is read-only but has no documentation on *how* it is determined (e.g., by position, metadata, or configuration). Its behavior is implementation-specific.
|
||||
- `ShouldDisplayLength` is a UI hint only; it does not affect `EventLength`’s value or behavior in non-UI logic. Misusing it as a data filter may cause inconsistencies.
|
||||
- No validation rules are enforced by the interface (e.g., `EventNumber` may be negative; `EventLength` may be `TimeSpan.Zero` or negative unless guarded by implementation).
|
||||
- The file header comment `//FB 6399` suggests a feature/bug reference, but no context is provided—this may be relevant for historical debugging.
|
||||
|
||||
*None identified beyond the above.*
|
||||
@@ -0,0 +1,46 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.CommonCore/Interface/EngineerDetails/IEngineerDetailsView.cs
|
||||
- Common/DTS.CommonCore/Interface/EngineerDetails/IEngineerDetailsViewModel.cs
|
||||
generated_at: "2026-04-16T02:19:13.157191+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "feca2337b3dd2d0e"
|
||||
---
|
||||
|
||||
# EngineerDetails
|
||||
|
||||
## 1. Purpose
|
||||
This module defines the core view and view model interfaces for the *Engineer Details* feature within the DTS (likely *Design & Technical Services*) system. It serves as a contract layer in a MVVM (Model-View-ViewModel) architecture, decoupling UI presentation logic from implementation details. The interfaces `IEngineerDetailsView` and `IEngineerDetailsViewModel` extend base abstractions (`IBaseView`, `IBaseViewModel`) to signal that this feature adheres to the common architectural patterns used across the application, but—based on the provided source—does not yet expose any domain-specific data or commands, indicating either an early-stage implementation or a minimal placeholder interface set.
|
||||
|
||||
## 2. Public Interface
|
||||
No public *members* (methods, properties, events) are defined on the interfaces themselves beyond inheritance. However, the public *types* are:
|
||||
|
||||
- **`IEngineerDetailsView`**
|
||||
*Signature:* `public interface IEngineerDetailsView : IBaseView`
|
||||
*Behavior:* Represents the view layer contract for the Engineer Details feature. As it inherits `IBaseView`, it is expected to support standard view lifecycle or binding behaviors defined in the base interface (e.g., data context assignment, initialization hooks), though those specifics are not visible in this file.
|
||||
|
||||
- **`IEngineerDetailsViewModel`**
|
||||
*Signature:* `public interface IEngineerDetailsViewModel : IBaseViewModel`
|
||||
*Behavior:* Represents the view model layer contract for the Engineer Details feature. As it inherits `IBaseViewModel`, it is expected to expose standard view model capabilities (e.g., property change notification via `INotifyPropertyChanged`, command support), but no engineer-specific properties (e.g., `EngineerId`, `Name`, `Skills`) or commands (e.g., `SaveCommand`) are declared here.
|
||||
|
||||
## 3. Invariants
|
||||
- Both interfaces are *marker interfaces*—they carry no additional constraints beyond their base interface contracts.
|
||||
- They must be implemented by concrete types that conform to the semantics of `IBaseView` and `IBaseViewModel`, respectively (e.g., view models must support property change notifications, views must bind to a view model).
|
||||
- No validation rules, ordering guarantees, or state invariants are specified at this level.
|
||||
|
||||
## 4. Dependencies
|
||||
- **Depends on:**
|
||||
- `DTS.Common.Base` namespace (specifically `IBaseView` and `IBaseViewModel`, though their definitions are not included here).
|
||||
- **Depended on by:**
|
||||
- Likely concrete implementations of the view (e.g., `EngineerDetailsView : IEngineerDetailsView`) and view model (e.g., `EngineerDetailsViewModel : IEngineerDetailsViewModel`).
|
||||
- Dependency injection containers or navigation frameworks may use these interfaces to resolve or inject the engineer details feature components.
|
||||
- Other modules (e.g., navigation, routing, or feature registration logic) may reference these interfaces to integrate the Engineer Details feature into the larger application.
|
||||
|
||||
## 5. Gotchas
|
||||
- **No domain exposure:** Despite the feature name, the interfaces contain *no* engineer-related properties or methods (e.g., no `Engineer` model, `LoadCommand`, or `IsLoading` flag). This may mislead developers into expecting functionality that is not yet implemented or resides elsewhere.
|
||||
- **Base interface assumptions:** Behavior is entirely inherited from `IBaseView`/`IBaseViewModel`. Without access to those base definitions, the full contract is incomplete—e.g., it is unclear if `IBaseView` requires a `ViewModel` property or if `IBaseViewModel` includes `InitializeAsync`.
|
||||
- **Placeholder status:** These interfaces may be scaffolding for future work; relying on them as complete contracts could lead to runtime errors if consumers expect non-existent members.
|
||||
- **Namespace ambiguity:** The namespace `DTS.Common.Interface` (instead of `DTS.Common.Interface.EngineerDetails`) suggests possible inconsistency in module scoping, though this is a design choice rather than a bug.
|
||||
|
||||
*None identified from source alone.*
|
||||
@@ -0,0 +1,59 @@
|
||||
---
|
||||
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-16T02:24:36.468213+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "ccb8183959611900"
|
||||
---
|
||||
|
||||
# ExportData
|
||||
|
||||
## Documentation: Export Data Module Interfaces
|
||||
|
||||
### 1. Purpose
|
||||
This module defines core interfaces for the export data feature, establishing the contract between the view, view model, and header data structures in a MVVM (Model-View-ViewModel) architecture. It provides typed abstractions for UI components that handle data export functionality—specifically, enabling selection and display of exportable fields/columns via `IExportHeader`, while decoupling UI (`IExportDataView`) and state/logic (`IExportDataViewModel`) layers through base interfaces. The module serves as a minimal, extensible foundation for export-related UIs, likely used in desktop or WPF-based client applications given the `INotifyPropertyChanged` dependency.
|
||||
|
||||
### 2. Public Interface
|
||||
|
||||
#### `IExportDataView`
|
||||
- **Namespace**: `DTS.Common.Interface`
|
||||
- **Inherits**: `IBaseView`
|
||||
- **Description**: Marker interface for the view layer in the export data feature. No additional members beyond those inherited from `IBaseView`. Used to enforce type safety and enable dependency injection or view resolution for export-related UI components.
|
||||
|
||||
#### `IExportDataViewModel`
|
||||
- **Namespace**: `DTS.Common.Interface`
|
||||
- **Inherits**: `IBaseViewModel`
|
||||
- **Description**: Marker interface for the view model layer in the export data feature. No additional members beyond those inherited from `IBaseViewModel`. Represents the state and behavior (e.g., export logic, header management) backing an `IExportDataView`.
|
||||
|
||||
#### `IExportHeader`
|
||||
- **Namespace**: `DTS.Common.Interface.ExportData`
|
||||
- **Inherits**: `INotifyPropertyChanged`
|
||||
- **Properties**:
|
||||
- `string HeaderName { get; set; }` – The display name of the export header/column.
|
||||
- `bool IsSelected { get; set; }` – Indicates whether this header is included in the current export operation.
|
||||
- **Description**: Represents a single column or field available for export. Implements `INotifyPropertyChanged` to support data binding (e.g., UI controls reflecting selection state changes).
|
||||
|
||||
### 3. Invariants
|
||||
- `IExportHeader.IsSelected` must be observable via `INotifyPropertyChanged.PropertyChanged` events when modified, as required by `INotifyPropertyChanged`.
|
||||
- `IExportHeader.HeaderName` must be non-null (though not validated in the interface itself—implementation responsibility).
|
||||
- `IExportDataView` and `IExportDataViewModel` are *marker interfaces*; their implementations must conform to the base contracts of `IBaseView` and `IBaseViewModel` respectively (behavior of which is defined elsewhere and not derivable from this source).
|
||||
- No ordering guarantees are specified for `IExportHeader` instances (e.g., no requirement for stable sort order or index-based access).
|
||||
|
||||
### 4. Dependencies
|
||||
- **Depends on**:
|
||||
- `DTS.Common.Base.IBaseView` (from `DTS.Common.Base`)
|
||||
- `DTS.Common.Base.IBaseViewModel` (from `DTS.Common.Base`)
|
||||
- `System.ComponentModel.INotifyPropertyChanged` (standard .NET interface)
|
||||
- **Depended on by**:
|
||||
- Likely concrete implementations in UI layer (e.g., WPF views, view models, and header models) within the `DTS` codebase.
|
||||
- No direct usage of these interfaces is visible in the provided sources, so concrete consumers must be inferred from other modules (e.g., export service, UI project).
|
||||
|
||||
### 5. Gotchas
|
||||
- **Ambiguity in base interfaces**: Behavior of `IBaseView` and `IBaseViewModel` is not defined here; their contracts (e.g., lifecycle methods, event patterns) must be referenced separately.
|
||||
- **No header ordering or grouping**: `IExportHeader` provides no mechanism for specifying column order, group, or priority—implementation must handle this externally (e.g., via collection ordering in the view model).
|
||||
- **No validation on `HeaderName`**: While `HeaderName` is non-nullable in C# reference type semantics, the interface does not enforce non-empty strings; implementations may need to guard against empty/whitespace names.
|
||||
- **No export-specific metadata**: The interface lacks fields for data type, format string, or export constraints (e.g., required, max length)—these would need to be added in derived interfaces or implementations.
|
||||
- **Namespace inconsistency**: `IExportHeader` resides in `DTS.Common.Interface.ExportData`, while `IExportDataView` and `IExportDataViewModel` are in `DTS.Common.Interface` (no `ExportData` sub-namespace). This may cause discoverability or organization confusion.
|
||||
@@ -0,0 +1,93 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.CommonCore/Interface/Graphs/IGraph.cs
|
||||
- Common/DTS.CommonCore/Interface/Graphs/IGraphRecord.cs
|
||||
generated_at: "2026-04-16T02:23:21.443229+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "a5e5bc31a5802f38"
|
||||
---
|
||||
|
||||
# Graphs
|
||||
|
||||
## Documentation: `IGraph` Interface
|
||||
|
||||
---
|
||||
|
||||
### 1. **Purpose**
|
||||
|
||||
The `IGraph` interface defines the contract for a graph entity that aggregates and manages a collection of `IGroupChannel` instances, along with associated display and persistence metadata. It extends `IGraphRecord` to combine database-backed metadata (e.g., name, axis limits, thresholds) with runtime graph composition logic (adding/removing channels, XML serialization/deserialization). This module serves as the core abstraction for graph configuration in the system—enabling programmatic manipulation of channel groupings and persistence of graph state to/from XML and database records.
|
||||
|
||||
---
|
||||
|
||||
### 2. **Public Interface**
|
||||
|
||||
#### `IGraph` Interface (inherits `IGraphRecord`)
|
||||
|
||||
- **`void AddChannel(IGroupChannel groupChannel)`**
|
||||
Adds the specified `IGroupChannel` to the graph’s internal collection of channels. Must be called before serialization to ensure the channel is included in `ChannelsString`.
|
||||
|
||||
- **`void RemoveChannel(IGroupChannel groupChannel)`**
|
||||
Removes the specified `IGroupChannel` from the graph’s internal collection of channels. Must be followed by `UpdateChannelAndThresholdStrings()` to persist the change to `ChannelsString`.
|
||||
|
||||
- **`void ReadXML(System.Xml.XmlElement root, IReadOnlyDictionary<long, IGroupChannel> channelLookup)`**
|
||||
Deserializes graph state from an XML element (`root`). Uses `channelLookup` to resolve channel references by ID (keyed by `long`). Populates the graph’s channels and metadata (e.g., axis limits, thresholds) from XML. *Note: Does not automatically call `UpdateChannelAndThresholdStrings()`—callers must do so explicitly if needed.*
|
||||
|
||||
- **`void WriteXML(ref System.Xml.XmlWriter writer)`**
|
||||
Serializes the graph’s state (including channels and thresholds) to XML using the provided `XmlWriter`. Relies on the current values of `ChannelsString` and `ThresholdsString`, which must be up-to-date (e.g., via `UpdateChannelAndThresholdStrings()`).
|
||||
|
||||
- **`void UpdateChannelAndThresholdStrings()`**
|
||||
Synchronizes the `ChannelsString` and `ThresholdsString` properties with the current in-memory state of `GroupChannels` and `Thresholds`. *This method must be invoked before `WriteXML()` or any database persistence to ensure consistency.*
|
||||
|
||||
#### `IGraphRecord` Interface (inherited members)
|
||||
|
||||
| Member | Type | Description |
|
||||
|--------|------|-------------|
|
||||
| `GraphId` | `int` | Database primary key for the graph record. |
|
||||
| `TestSetupId` | `int` | Foreign key linking the graph to a specific test setup. |
|
||||
| `GraphName` | `string` | Human-readable name (max 50 chars). |
|
||||
| `GraphDescription` | `string` | Human-readable description (max 50 chars). |
|
||||
| `ChannelsString` | `string` | Serialized list of channel identifiers (max 2048 chars). |
|
||||
| `UseDomainMin`, `DomainMin` | `bool`, `double` | Controls whether the domain (X) axis minimum is enforced. |
|
||||
| `UseDomainMax`, `DomainMax` | `bool`, `double` | Controls whether the domain (X) axis maximum is enforced. |
|
||||
| `UseRangeMin`, `RangeMin` | `bool`, `double` | Controls whether the range (Y) axis minimum is enforced. |
|
||||
| `UseRangeMax`, `RangeMax` | `bool`, `double` | Controls whether the range (Y) axis maximum is enforced. |
|
||||
| `ThresholdsString` | `string` | Serialized list of threshold definitions (max 2048 chars). |
|
||||
| `LocalOnly` | `bool` | **Deprecated** flag indicating whether the record is local-only (not synced to central DB). |
|
||||
|
||||
> **Note**: `IGraphRecord` does *not* expose `GroupChannels` or `Thresholds` as properties—these are inferred to be internal to implementations of `IGraph`. The `ChannelsString` and `ThresholdsString` are the persisted representations.
|
||||
|
||||
---
|
||||
|
||||
### 3. **Invariants**
|
||||
|
||||
- `ChannelsString` and `ThresholdsString` **must** be kept in sync with the in-memory channel/threshold state via `UpdateChannelAndThresholdStrings()` before persistence (e.g., `WriteXML`, DB save).
|
||||
- `GraphName` and `GraphDescription` are constrained to ≤ 50 characters (via `[MaxLength(50)]`).
|
||||
- `ChannelsString` and `ThresholdsString` are constrained to ≤ 2048 characters (via `[MaxLength(2048)]`).
|
||||
- Axis limits (`DomainMin`, `DomainMax`, etc.) are only semantically valid when their corresponding `Use*` flag is `true`.
|
||||
- `LocalOnly` is deprecated and should be ignored in new logic.
|
||||
|
||||
---
|
||||
|
||||
### 4. **Dependencies**
|
||||
|
||||
- **Depends on**:
|
||||
- `DTS.Common.Interface.Channels.IGroupChannel` (for channel management).
|
||||
- `System.Collections.Generic.IReadOnlyDictionary<long, IGroupChannel>` (for XML deserialization channel resolution).
|
||||
- `System.Xml.XmlElement`, `System.Xml.XmlWriter` (for XML I/O).
|
||||
- `System.ComponentModel.DataAnnotations` (for metadata annotations like `[MaxLength]`).
|
||||
|
||||
- **Depended on by**:
|
||||
- Likely consumed by UI layers (graph rendering), persistence services (DB/XML I/O), and test setup configuration modules (given `TestSetupId`).
|
||||
- Implementations (not shown) would be concrete graph types (e.g., `Graph`, `TimeSeriesGraph`).
|
||||
|
||||
---
|
||||
|
||||
### 5. **Gotchas**
|
||||
|
||||
- **Critical**: `ReadXML` does *not* automatically call `UpdateChannelAndThresholdStrings()`—implementations or callers must ensure strings are updated post-deserialization if persistence is required.
|
||||
- **Critical**: `AddChannel`/`RemoveChannel` modify internal state but do *not* update `ChannelsString`; `UpdateChannelAndThresholdStrings()` must be called explicitly afterward.
|
||||
- **Ambiguity**: The interface does not expose `GroupChannels` or `Thresholds` as properties—only their serialized string forms (`ChannelsString`, `ThresholdsString`). This implies implementations manage these collections internally, but the exact structure (e.g., `List<IGroupChannel>`, `HashSet<IGroupChannel>`) is unknown.
|
||||
- **Deprecated Flag**: `LocalOnly` is marked as deprecated but remains part of the interface—avoid using it in new code.
|
||||
- **String Length Limits**: `ChannelsString` and `ThresholdsString` are capped at 2048 characters; implementations must ensure serialization does not exceed this (e.g., by truncating or rejecting channels).
|
||||
- **No Validation on Axis Values**: While `Use*` flags control whether min/max values are applied, the interface does not enforce logical consistency (e.g., `DomainMin < DomainMax`).
|
||||
@@ -0,0 +1,115 @@
|
||||
---
|
||||
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-16T02:22:23.083455+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "7ad50e5b491c81bf"
|
||||
---
|
||||
|
||||
# GroupTemplate
|
||||
|
||||
## Documentation: Group Template Interface Module
|
||||
|
||||
### 1. Purpose
|
||||
This module defines the core interfaces for the *Group Template* subsystem, which manages reusable template definitions for grouping test channels and associated metadata in the DTS (Device Test System) platform. It provides a layered architecture separating *data models* (`IGroupTemplate`, `ITestObjectTemplate`, `IGroupTemplateChannel`), *view models* (`IGroupTemplateViewModel`, `IGroupTemplateListViewModel`, `ITemplateChannelListViewModel`, `IGroupTemplateInfoControlViewModel`), and *view contracts* (`IGroupTemplateListView`, `IGroupTemplateExportView`, `IGroupTemplateImportView`, `ITemplateChannelListView`, `IGroupTemplateInfoControlView`). These interfaces enable separation of concerns for UI presentation, data binding, and business logic related to template creation, listing, import/export, and channel configuration.
|
||||
|
||||
---
|
||||
|
||||
### 2. Public Interface
|
||||
|
||||
#### Data Model Interfaces
|
||||
- **`IGroupTemplate`**
|
||||
Represents a group template with basic properties: `Disabled`, `Name`, `Description`, `Channels`, `AssociatedGroups`, `LastModifiedBy`, `LastModified`, `SerialNumber`. Includes `Filter(string term)` for client-side filtering.
|
||||
|
||||
- **`IGroupTemplateChannel`**
|
||||
Represents a channel within a group template. Properties: `Custom` (read-only), `DisplayOrder`, `NameOfTheChannel`, `Name` (read-only), `Required`, `ISOCode`. Includes `Filter(string term)`.
|
||||
- **`GroupTemplateChannelComparer`**
|
||||
Implements `IComparer<IGroupTemplateChannel>` for sorting. Uses `SortField` (of type `GroupTemplateChannelFields`) and `Ascending` flag. Supports sorting by `Required`, `Name`, `ISOCode`, `Custom`, and `DisplayOrder`. Throws `ArgumentOutOfRangeException` for unsupported sort fields.
|
||||
|
||||
- **`ITestObjectTemplate`**
|
||||
Represents a test object template (possibly embedded). Properties include `TemplateName`, `TemplateNameOrOriginalTemplateName`, `Icon`, `Description`, `LocalOnly`, `Version`, `LastModifiedBy`, `LastModified`, `CRC32`, `TestObject`, `TestObjectType`, `TemplateParent`, `SysBuilt`, `OriginalTemplateName`, `Embedded`. Includes `IsISOMode()` method.
|
||||
|
||||
#### View Model Interfaces
|
||||
- **`IGroupTemplateViewModel`**
|
||||
Main view model for group template operations. Properties: `ImportView` (`IGroupTemplateImportView`), `ExportView` (`IGroupTemplateExportView`). Includes `Unset()` method (likely for cleanup/disposal).
|
||||
|
||||
- **`IGroupTemplateListViewModel`**
|
||||
Manages the list view of group templates. Properties: `View` (`IGroupTemplateListView`), `Templates` (array of `IGroupTemplate`). Methods: `GetAllTemplates(bool bIncludeEmbedded, bool bISOMode)`, `Unset()`, `Sort(object o, bool columnClick)`, `Filter(string term)`, `MouseDoubleClick(int index)`. Implements `IFilterableListView` (inherited from `IBaseViewModel` + `IFilterableListView`).
|
||||
|
||||
- **`ITemplateChannelListViewModel`**
|
||||
Manages the channel list for a group template. Properties: `View` (`ITemplateChannelListView`). Methods: `Unset()`, `Sort(object o, bool columnClick)`, `Filter(string term)`, `SetAllChannels(IGroupTemplateChannel[] channels)`, `GetAllChannels()`, `MoveDown(IGroupTemplateChannel channel)`, `MoveUp(IGroupTemplateChannel channel)`, `SetParent(object o)`.
|
||||
|
||||
- **`IGroupTemplateInfoControlViewModel`**
|
||||
Manages the info/control view for a selected group template. Properties: `View` (`IGroupTemplateInfoView`), `SelectedGroupTemplate` (`IGroupTemplate`). *Note: `IGroupTemplateInfoView` is referenced but not defined in this module; its definition is assumed to be in the `DataPro.Common.Interface` namespace.*
|
||||
|
||||
#### View Interface Contracts
|
||||
- **`IGroupTemplateListView`**
|
||||
Marker interface for the group template list view (extends `IBaseView`).
|
||||
|
||||
- **`IGroupTemplateExportView`**
|
||||
Marker interface for the group template export view (extends `IBaseView`).
|
||||
|
||||
- **`IGroupTemplateImportView`**
|
||||
Marker interface for the group template import view (extends `IBaseView`).
|
||||
|
||||
- **`ITemplateChannelListView`**
|
||||
Marker interface for the template channel list view (extends `IBaseView`).
|
||||
|
||||
- **`IGroupTemplateInfoControlView`**
|
||||
Marker interface for the group template info/control view (extends `IBaseView`). *Note: This interface is defined in the `DataPro.Common.Interface` namespace, not `DTS.Common.Interface.GroupTemplate`.*
|
||||
|
||||
---
|
||||
|
||||
### 3. Invariants
|
||||
- All view interfaces (`IGroupTemplateListView`, `IGroupTemplateExportView`, etc.) are *marker interfaces* extending `IBaseView`; they convey no additional contract beyond type identity.
|
||||
- View models (`IGroupTemplateViewModel`, `IGroupTemplateListViewModel`, etc.) must maintain a valid reference to their corresponding view (via the `View` property) during active use.
|
||||
- `IGroupTemplateListViewModel.Templates` is expected to be an array of `IGroupTemplate` instances populated by `GetAllTemplates(...)`.
|
||||
- `ITemplateChannelListViewModel` expects `SetAllChannels(...)` to be called before `GetAllChannels()`, `MoveUp/Down`, or `Sort` operations to ensure channel data is initialized.
|
||||
- `IGroupTemplateChannel.Name` is read-only and likely derived from `NameOfTheChannel` or other internal state.
|
||||
- `ITestObjectTemplate.Embedded` and `ITestObjectTemplate.TemplateName` are related: embedded templates use a GUID as `TemplateName`, while `OriginalTemplateName` stores the human-readable name.
|
||||
- `IGroupTemplate.Filter(string term)` and `IGroupTemplateChannel.Filter(string term)` must implement case-insensitive or substring matching (exact behavior not specified in source).
|
||||
- `IGroupTemplateInfoControlViewModel` requires `IGroupTemplateInfoView` to be defined elsewhere (in `DataPro.Common.Interface`).
|
||||
|
||||
---
|
||||
|
||||
### 4. Dependencies
|
||||
- **Internal Dependencies**
|
||||
- All interfaces depend on `DTS.Common.Base.IBaseView` and `DTS.Common.Base.IBaseViewModel`.
|
||||
- `IGroupTemplateListViewModel` depends on `DTS.Common.Interface.Pagination.IFilterableListView`.
|
||||
- `IGroupTemplateChannel` depends on `DTS.Common.Enums.GroupTemplates.GroupTemplateChannelFields` (enum for sort fields).
|
||||
- `IGroupTemplateInfoControlViewModel` depends on `DataPro.Common.Interface.IGroupTemplateInfoView` (not provided in this module).
|
||||
|
||||
- **External Dependencies**
|
||||
- `DataPro.Common.Base` namespace (used in `IGroupTemplateInfoControlView` and `IGroupTemplateInfoControlViewModel`).
|
||||
- `System`, `System.Collections.Generic`, `System.Linq` (implied via `IComparer`, `String.Compare`, etc.).
|
||||
|
||||
- **Dependents**
|
||||
- UI layers (e.g., WPF/WinForms views) likely implement the view interfaces.
|
||||
- View model implementations (e.g., `GroupTemplateListViewModelImpl`) depend on these interfaces for DI and testability.
|
||||
- Import/export logic likely consumes `IGroupTemplateImportView`/`IGroupTemplateExportView`.
|
||||
- Channel ordering UI likely consumes `ITemplateChannelListViewModel`.
|
||||
|
||||
---
|
||||
|
||||
### 5. Gotchas
|
||||
- **Namespace Inconsistency**: `IGroupTemplateInfoControlView` and `IGroupTemplateInfoControlViewModel` reside in `DataPro.Common.Interface`, not `DTS.Common.Interface.GroupTemplate`, despite being grouped here. This may cause confusion during navigation or refactoring.
|
||||
- **Missing `IGroupTemplateInfoView`**: Referenced in `IGroupTemplateInfoControlViewModel`, but not defined in this module. Its contract is unknown.
|
||||
- **`IGroupTemplateChannel.Name` vs `NameOfTheChannel`**: `Name` is read-only, while `NameOfTheChannel` is read-write. The relationship between them is not documented (e.g., is `Name` a normalized version?).
|
||||
- **`CRC32` and `Version` fields**: Comments indicate these are *“not currently used”* or *“unsure if this is still used”*, suggesting potential dead code or legacy artifacts.
|
||||
- **`TemplateParent` and `SysBuilt`**: Comments indicate uncertainty about usage; behavior may be undefined or deprecated.
|
||||
- **`IFilterableListView`**: Inherited by `IGroupTemplateListViewModel`, but its contract (e.g., `FilterTerm` property, `OnFilterChanged` event) is not visible here.
|
||||
- **`Unset()` method**: Used across multiple view models; likely for cleanup, but semantics (e.g., nulling `View`, releasing resources) are not specified.
|
||||
- **`MouseDoubleClick(int index)`**: Signature implies index-based selection, but no context (e.g., which item, event args) is provided—potential source of off-by-one or stale-index bugs.
|
||||
- **No generic constraints**: View models accept `object` for `Sort(object o, bool columnClick)` and `SetParent(object o)`, risking runtime type errors if callers pass unexpected types.
|
||||
@@ -0,0 +1,126 @@
|
||||
---
|
||||
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-16T02:21:23.908891+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "0073692ccbf88d7d"
|
||||
---
|
||||
|
||||
# Groups
|
||||
|
||||
## Documentation: Group Import Module Interfaces
|
||||
|
||||
---
|
||||
|
||||
### 1. **Purpose**
|
||||
|
||||
This module defines a set of interfaces that constitute the *Group Import* subsystem, responsible for importing test groups (and their associated channels) from external `.grp` files into the application. It supports a multi-step workflow: selecting source files (`IGroupImportOptionsView`), previewing and validating parsed groups/channels (`IGroupImportPreviewView`), and committing the groups to the system while reporting progress (`IGroupImportImportView`). The module is decoupled from UI implementation via view interfaces and delegates, enabling separation of concerns and testability. It interacts with core domain entities like `IGroupDbRecord`, `IGroupHardwareDbRecord`, `ITestSetupGroupRecord`, `IGroupChannel`, and `ITestObject`, and relies on external services (e.g., group/sensor existence checks, group creation, database commit) provided via delegate injection.
|
||||
|
||||
---
|
||||
|
||||
### 2. **Public Interface**
|
||||
|
||||
#### Interfaces (View Layer)
|
||||
|
||||
| Interface | Method/Property | Signature | Description |
|
||||
|-----------|-----------------|-----------|-------------|
|
||||
| `IGroupImportImportView` | — | *N/A* | Marker interface (extends `IBaseView`) for the view responsible for displaying progress during group creation and commit. |
|
||||
| `IGroupImportOptionsView` | `Validate` | `bool Validate(out List<string> errors, out List<string> warnings);` | Validates file selection. Returns `true` if files are selected; `false` otherwise. Populates `errors` and `warnings` with validation messages. |
|
||||
| `IGroupImportPreviewView` | `Validate` | `bool Validate(bool userIsAdmin, out List<string> errors, out List<string> warnings);` | Validates selected groups (including channels and group names). `userIsAdmin` may affect validation rules. Returns `true` only if *all* selected groups are valid. Errors prevent proceeding; warnings are non-fatal. |
|
||||
| `IGroupImportViewModel` | `SetStatus` | `void SetStatus(string message, Color color);` | Sets status message and associated color (e.g., for UI feedback). |
|
||||
| | `ImportOptionsView` | `IGroupImportOptionsView ImportOptionsView { get; set; }` | Gets/sets the options view (file selection & validation). |
|
||||
| | `ImportPreviewView` | `IGroupImportPreviewView ImportPreviewView { get; set; }` | Gets/sets the preview view (group/channel parsing & selection). |
|
||||
| | `ImportView` | `IGroupImportImportView ImportView { get; set; }` | Gets/sets the import progress view. |
|
||||
| | `ParseSourceFiles` | `void ParseSourceFiles(string userTags);` | Reads and parses source `.grp` files, extracting groups and channels. `userTags` are applied during parsing. |
|
||||
| | `Import` | `void Import();` | Commits parsed groups and channels to the application. |
|
||||
| | `Reset` | `void Reset();` | Resets the view model to initial state (re-initialization for page reuse). |
|
||||
| | `Logger` | `FileUtils.LogDelegate Logger { get; set; }` | Logging delegate for internal messages. |
|
||||
| | `SwitchNavSteps` | `SwitchNavStepsDelegate SwitchNavSteps { get; set; }` | Delegate to navigate to another step in the application. |
|
||||
| | `CheckGroupExists` | `CheckGroupExistsDelegate CheckGroupExists { get; set; }` | Delegate to check if a group (by serial number) exists. |
|
||||
| | `CheckSensorExists` | `CheckSensorExistsDelegate CheckSensorExists { get; set; }` | Delegate to check if a sensor (by serial number) exists. |
|
||||
| | `CreateGroup` | `CreateGroupDelegate CreateGroup { get; set; }` | Delegate to create a new group (by serial number and tags). |
|
||||
| | `AddChannel` | `AddChannelToGroupDelegate AddChannel { get; set; }` | Delegate to add a channel to a group (with optional overrides for capacity, invert, ISO code, and defaults). |
|
||||
| | `CommitGroups` | `CommitGroupsDelegate CommitGroups { get; set; }` | Delegate to commit one or more groups to the database. |
|
||||
| | `DisableUI` / `EnableUI` | `Disable_UIDelegate DisableUI { get; set; }`<br>`Enable_UIDelegate EnableUI { get; set; }` | Delegates to disable/enable the UI during long-running operations. |
|
||||
| | `BrowseOk` | `bool BrowseOk { get; set; }` | Indicates whether the file browse operation succeeded (likely used internally). |
|
||||
|
||||
#### Domain Record Interfaces
|
||||
|
||||
| Interface | Property | Signature | Description |
|
||||
|-----------|----------|-----------|-------------|
|
||||
| `IGroupHardwareDbRecord` | `Id`, `GroupId`, `DASId`, `SerialNumber` | `int Id { get; set; }`<br>`int GroupId { get; set; }`<br>`int DASId { get; set; }`<br>`string SerialNumber { get; set; }` | Represents a hardware mapping record in the DB: links a group (`GroupId`) to a DAS (`DASId`) and hardware serial number. |
|
||||
| `ITestSetupGroupRecord` | `GroupId`, `DisplayOrder`, `Position`, `TestObjectType`, `TestSetupId` | `int GroupId { get; set; }`<br>`int DisplayOrder { get; set; }`<br>`string Position { get; set; }`<br>`string TestObjectType { get; set; }`<br>`int TestSetupId { get; set; }` | Represents a test setup group record in the DB. Includes ISO 13499 fields (`Position`, `TestObjectType`). Groups may contain mixed values. |
|
||||
| `IGroupDbRecord` | `Id`, `SerialNumber`, `Picture`, `DisplayName`, `Description`, `Embedded`, `LastModified`, `LastModifiedBy`, `StaticGroupId`, `ExtraProperties` | `int Id { get; set; }`<br>`string SerialNumber { get; set; }`<br>`string Picture { get; set; }`<br>`string DisplayName { get; set; }`<br>`string Description { get; set; }`<br>`bool Embedded { get; set; }`<br>`DateTime LastModified { get; set; }`<br>`string LastModifiedBy { get; set; }`<br>`int? StaticGroupId { get; set; }`<br>`string ExtraProperties { get; set; }` | Represents a group entity in the DB. Includes metadata (display name, description, picture), timestamps, and extensibility (`ExtraProperties`). |
|
||||
|
||||
#### Channel & Test Object Interfaces
|
||||
|
||||
| Interface | Property/Method | Signature | Description |
|
||||
|-----------|-----------------|-----------|-------------|
|
||||
| `IGroupChannel` | `Disabled`, `ChannelIdx`, `SensorSerialNumber`, `HardwareId` | `bool Disabled { get; set; }`<br>`int ChannelIdx { get; set; }`<br>`string SensorSerialNumber { get; set; }`<br>`string HardwareId { get; set; }` | Logical channel in a group. `Disabled` excludes it from data collection. Extends `IGroupTemplateChannel` and `IComparable<IGroupChannel>`. |
|
||||
| `ITestObject` | `SortChannels()`, `DisplaySerialNumber`, `SerialNumberConverted`, `SerialNumber`, `SerialNumberOrOriginalSerialNumber`, `TestObjectType`, `ParentObject`, `SysBuilt`, `TextL1`, `HardwareIds`, `Template`, `SetTemplateOnly`, `LocalOnly`, `LastModifiedBy`, `LastModified`, `Embedded`, `OriginalSerialNumber`, `OriginalTemplate` | `void SortChannels();`<br>`string DisplaySerialNumber { get; }`<br>`string SerialNumberConverted { get; set; }`<br>`string SerialNumber { get; set; }`<br>`string SerialNumberOrOriginalSerialNumber { get; }`<br>`string TestObjectType { get; set; }`<br>`string ParentObject { get; set; }`<br>`bool SysBuilt { get; set; }`<br>`string TextL1 { get; set; }`<br>`string[] HardwareIds { get; set; }`<br>`string Template { get; set; }`<br>`void SetTemplateOnly(string value);`<br>`bool LocalOnly { get; set; }`<br>`string LastModifiedBy { get; set; }`<br>`DateTime LastModified { get; set; }`<br>`bool Embedded { get; set; }`<br>`string OriginalSerialNumber { get; set; }`<br>`string OriginalTemplate { get; set; }` | Represents a test object (group) in the application. Supports serial number variants, template embedding, and hardware ID tracking. |
|
||||
|
||||
#### Delegates
|
||||
|
||||
| Delegate | Signature | Purpose |
|
||||
|----------|-----------|---------|
|
||||
| `SwitchNavStepsDelegate` | `void (GroupImportEnums.Steps step)` | Navigate to a different application step. |
|
||||
| `CheckGroupExistsDelegate` | `bool (string name)` | Check if a group (by serial number/name) exists. |
|
||||
| `CheckSensorExistsDelegate` | `bool (string serialNumber)` | Check if a sensor (by serial number) exists. |
|
||||
| `CreateGroupDelegate` | `void (string serialNumber, string tags)` | Create a new group with given serial number and tags. |
|
||||
| `AddChannelToGroupDelegate` | `void (string groupSerialNumber, string displayName, string sensorSerialNumber, double? capacity, bool? invert, string isoCode, IChannelSetting[] channelDefaults)` | Add a channel to a group. `capacity`/`invert` override sensor defaults if non-null. |
|
||||
| `CommitGroupsDelegate` | `void (string[] serialNumbers)` | Commit groups (by serial numbers) to the database. |
|
||||
| `Disable_UIDelegate` / `Enable_UIDelegate` | `void ()` | Disable/enable the UI. |
|
||||
|
||||
---
|
||||
|
||||
### 3. **Invariants**
|
||||
|
||||
- **`IGroupImportOptionsView.Validate`**: Must return `true` *only* if files have been selected. Validation errors/warnings must be non-null outputs (even if empty lists).
|
||||
- **`IGroupImportPreviewView.Validate`**: Must return `true` *only* if *all* selected groups are valid (no errors). Warnings do not affect return value. Admin status (`userIsAdmin`) may influence validation rules.
|
||||
- **`IGroupChannel.Disabled`**: When `true`, the channel must be excluded from data collection during test runs.
|
||||
- **`IGroupDbRecord.Embedded`**: Indicates whether the group is embedded in a test setup (likely immutable after embedding).
|
||||
- **`ITestObject.Embedded` / `ITestObject.OriginalTemplate`**: When a group is embedded, its `Template` may change, but `OriginalTemplate` preserves the pre-embedding value.
|
||||
- **`IGroupHardwareDbRecord`**: Each record uniquely maps a `GroupId` → `DASId` + `SerialNumber`. No constraints on uniqueness of `DASId` or `SerialNumber` across records are specified.
|
||||
|
||||
---
|
||||
|
||||
### 4. **Dependencies**
|
||||
|
||||
#### Module Dependencies (from source):
|
||||
- **Base Layer**: `DTS.Common.Base` (`IBaseView`, `IBaseViewModel`)
|
||||
- **Enums**: `DTS.Common.Enums.Groups.GroupImportEnums.Steps` (used in `SwitchNavStepsDelegate`)
|
||||
- **Utils**: `FileUtils.LogDelegate` (for logging)
|
||||
- **Channels**: `DTS.Common.Interface.Channels.IChannelSetting[]` (used in `AddChannelToGroupDelegate`)
|
||||
- **GroupTemplate**: `IGroupTemplateChannel` (base interface for `IGroupChannel`)
|
||||
|
||||
#### Dependencies *on* this Module:
|
||||
- **UI Layer**: Concrete implementations of `IGroupImportOptionsView`, `IGroupImportPreviewView`, `IGroupImportImportView`, and `IGroupImportViewModel`.
|
||||
- **Application Core**: Must provide implementations for the delegates (`CheckGroupExists`, `CreateGroup`, `AddChannel`, `CommitGroups`, etc.) to integrate with the broader system (DB, sensor/group registries, navigation).
|
||||
|
||||
#### Inferred Dependencies:
|
||||
- `DTS.Common.Interface.GroupTemplate` (for `IGroupTemplateChannel`).
|
||||
- Database access layer (for `IGroupDbRecord`, `IGroupHardwareDbRecord`, `ITestSetupGroupRecord`).
|
||||
- Sensor and group registries (for `CheckGroupExists`, `CheckSensorExists`).
|
||||
|
||||
---
|
||||
|
||||
### 5. **Gotchas**
|
||||
|
||||
- **`IGroupChannel` is marked for *legacy* use**: The XML comment explicitly states: *"THIS IS FOR THE OLD (PRE 2.0) TESTOBJECT CHANNELS"*. New implementations may use a different channel model.
|
||||
- **`ITestObject` has redundant serial number properties**: `SerialNumber`, `OriginalSerialNumber`, `SerialNumberConverted`, and `SerialNumberOrOriginalSerialNumber` suggest complex serial number handling (e.g., conversion, fallback logic). Behavior of these properties is not fully specified.
|
||||
- **`IGroupImportPreviewView.Validate` admin flag**: The `userIsAdmin` parameter implies role-based validation rules, but the source does not specify how admin/non-admin behavior differs.
|
||||
- **`IGroupImportViewModel` re-use pattern**: The `Reset()` method exists because the view model is reused across page visits (not recreated). This may lead to state leakage if `Reset()` is incomplete or skipped.
|
||||
- **`AddChannelToGroupDelegate` parameters**: `capacity`/`invert` are nullable; null means "use sensor defaults". This is critical for correct channel configuration.
|
||||
- **`IGroupHardwareDbRecord` field names**: Uses `DASId` (not `HardwareId` or `DeviceId`), suggesting a specific hardware abstraction layer (DAS = Data Acquisition System?).
|
||||
- **No validation rules for group names/serial numbers**: The interfaces do not define naming constraints (e.g., uniqueness, allowed characters), though `CheckGroupExists` implies uniqueness enforcement elsewhere.
|
||||
|
||||
*None identified beyond the above.*
|
||||
@@ -0,0 +1,191 @@
|
||||
---
|
||||
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-16T02:32:21.161697+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "b48152996c8c8c44"
|
||||
---
|
||||
|
||||
# Documentation: Group Channel List Module
|
||||
|
||||
## 1. Purpose
|
||||
This module defines the interfaces for the *Group Channel List* feature, which manages the display, configuration, and interaction logic for channels associated with groups or test setups in the DTS system. It serves as the abstraction layer between UI views (`IGroupChannelListView`, `IGroupChannelSettingsListView`) and the underlying data and business logic (`IGroupChannelListViewModel`). The module enables dynamic column rendering, filtering, sorting, channel management (add/remove/move), and integration with sensors, hardware, and ISO/test setup metadata—supporting both group editing and test setup editing workflows.
|
||||
|
||||
---
|
||||
|
||||
## 2. Public Interface
|
||||
|
||||
### Interfaces
|
||||
|
||||
#### `IGroupChannelListView`
|
||||
*Inherits:* `IBaseView`
|
||||
*Purpose:* Base view interface for the group channel list UI.
|
||||
|
||||
- **`void HandleColumns(IsoViewMode viewMode)`**
|
||||
Configures which columns are displayed in the channel list view based on the provided `IsoViewMode`.
|
||||
|
||||
#### `IGroupChannelSettingsListView`
|
||||
*Inherits:* `IBaseView`
|
||||
*Purpose:* View interface for the group channel *settings* panel (e.g., column configuration, filter controls).
|
||||
|
||||
- **`void SetOrderMode(bool bUseTestSetupOrder)`**
|
||||
Toggles whether channels are ordered by group order (`false`) or test setup order (`true`).
|
||||
- **`void SetDisplayOptions(bool bShowSensorChannelUserValues)`**
|
||||
Controls visibility of *User Value X* columns (e.g., `UserValue1`, `UserValue2`).
|
||||
- **`void HandleColumns(IsoViewMode viewMode)`**
|
||||
Same as in `IGroupChannelListView`; configures columns based on ISO view mode.
|
||||
- **`void SetFilterMode(PossibleFilters filterMode)`**
|
||||
Applies a sensor-type filter (e.g., analog, digital) to determine which channel types are shown.
|
||||
- **`int ViewDbVersion { get; set; }`**
|
||||
Stores the minimum client database version associated with the data in the view. Used to gate features/properties based on version compatibility.
|
||||
|
||||
#### `IGroupChannelListViewModel`
|
||||
*Inherits:* `IBaseViewModel`, `IFilterableListView`
|
||||
*Purpose:* Core logic interface coordinating views, data population, and channel operations.
|
||||
|
||||
- **`IGroupChannelListView View { get; set; }`**
|
||||
Reference to the main channel list view.
|
||||
- **`IGroupChannelSettingsListView SettingsView { get; set; }`**
|
||||
Reference to the settings view.
|
||||
- **`IDictionary<IGroup, Channels.IGroupChannel[]> PopulateChannels(...)`**
|
||||
Populates channels for display in views. Takes lookup dictionaries for sensors/hardware, default channel settings, and flags for admin permissions, deletion rules, and sensor push/pull behavior. Returns a mapping from groups to their channels.
|
||||
- **`bool CreateVoltageInputChannels { get; set; }`**
|
||||
Controls whether dragging analog hardware onto a blank channel auto-creates voltage input channels.
|
||||
- **`bool CompareAndMarkChannelParameters(Channels.IGroupChannel ch)`**
|
||||
Compares channel parameter values against the sensor database and marks differences (e.g., for UI highlighting).
|
||||
- **`void OnSetActive()`**
|
||||
Hook called when the view becomes active (e.g., tab switch).
|
||||
- **`void Unset()`**
|
||||
Hook called when the view is unloaded.
|
||||
- **`void Filter(string term)`**
|
||||
Filters displayed channels by a text search term.
|
||||
- **`string CapacityFormat { get; set; }`**
|
||||
Format string (e.g., `"N2"`) for numeric capacity values.
|
||||
- **`List<Channels.IGroupChannel> AllChannels { get; }`**
|
||||
All channels *before* filtering/sorting.
|
||||
- **`Func<IList<IChannelCode>> ChannelCodesFunc { get; }`**
|
||||
Lazy-loaded list of available channel codes (e.g., for dropdowns).
|
||||
- **`ObservableCollection<Channels.IGroupChannel> Channels { get; set; }`**
|
||||
Channels currently displayed in the main channel list view.
|
||||
- **`ObservableCollection<Channels.IGroupChannel> SettingChannels { get; set; }`**
|
||||
Snapshot of `Channels` (excluding blank channels) used in the settings view.
|
||||
- **`bool SettingsViewLoaded { get; set; }`**
|
||||
Indicates whether `SettingsView` has been initialized.
|
||||
- **`bool SettingChannelsLoaded { get; set; }`**
|
||||
Indicates whether `SettingChannels` UI elements have been created.
|
||||
- **`IGroup Group { get; set; }`**
|
||||
The group being edited (when in group-edit mode).
|
||||
- **`ITestSetup TestSetup { get; set; }`**
|
||||
The test setup being edited (when in test setup-edit mode).
|
||||
- **`bool UseISOCodeFilterMapping { get; set; }`**
|
||||
If `true`, enforces strict mapping between CFC codes and ISO codes.
|
||||
- **`void SetFilter(PossibleFilters bridgeFilter)`**
|
||||
Filters channels by sensor type (e.g., `PossibleFilters.Analog`, `Digital`).
|
||||
- **`bool ShowISOCodes { get; }`**
|
||||
Indicates whether ISO code columns are visible.
|
||||
- **`bool ShowUserCodes { get; }`**
|
||||
Indicates whether user-defined code columns are visible.
|
||||
- **`bool ShowDallasIdColumn { get; set; }`**
|
||||
Controls visibility of the Dallas ID column (per case #31802).
|
||||
- **`IsoViewMode ISOViewMode { get; set; }`**
|
||||
Current ISO view mode (e.g., `IsoViewMode.Standard`, `IsoViewMode.Simplified`).
|
||||
- **`bool ShowISOStringBuilder { get; set; }`**
|
||||
Toggles visibility of the ISO code string builder UI.
|
||||
- **`bool UniqueISOCodesRequired { get; set; }`**
|
||||
Enforces uniqueness of ISO codes.
|
||||
- **`bool ShowChannelCodeLookupHelper { get; set; }`**
|
||||
Shows/hides the channel code lookup helper UI.
|
||||
- **`bool UseTestSetupOrder { get; }`**
|
||||
Read-only flag indicating whether test setup ordering is active.
|
||||
- **`bool ShowSensorChannelUserValues { get; set; }`**
|
||||
Controls display of user-defined value columns (mirrors `SetDisplayOptions`).
|
||||
- **`void MoveDown(Channels.IGroupChannel[] channel)`**
|
||||
Moves specified channels down in the list.
|
||||
- **`void MoveBottom(Channels.IGroupChannel[] channel)`**
|
||||
Moves specified channels to the bottom of the list.
|
||||
- **`void MoveUp(Channels.IGroupChannel[] channel)`**
|
||||
Moves specified channels up in the list.
|
||||
- **`void MoveTop(Channels.IGroupChannel[] channel)`**
|
||||
Moves specified channels to the top of the list.
|
||||
- **`void Filter(PossibleFilters filter)`**
|
||||
Overload of `SetFilter` (likely for `IFilterableListView` compliance).
|
||||
- **`void AddChannels(DragAndDropItem[] sensors)`**
|
||||
Adds channels for the given sensors.
|
||||
- **`void AddChannels(IHardwareChannel[] hardwareChannels)`**
|
||||
Adds channels for the given hardware channels.
|
||||
- **`void AddChannels(Channels.IGroupChannel[] groupChannels)`**
|
||||
Adds existing channels (e.g., copy/paste).
|
||||
- **`void Remove(Channels.IGroupChannel channel, bool notifyChanged = true)`**
|
||||
Removes a channel; `notifyChanged` controls whether UI updates are triggered.
|
||||
- **`IGroup CreateGroupIfNeeded(ITestSetup testSetup, string groupName)`**
|
||||
Creates a group if it doesn’t exist for the given test setup.
|
||||
- **`void SetIncludedHardware(IDASHardware[] hardwares)`**
|
||||
Updates internal state to track included hardware (used for channel count display).
|
||||
- **`bool ApplySensorDataToBlankChannels { get; set; }`**
|
||||
If `true`, sensor metadata (e.g., range, units) is auto-applied when dragging sensors onto blank channels.
|
||||
- **`bool AllowChannelDeletionByNonAdminUser { get; set; }`**
|
||||
Controls whether non-admin users can delete channels.
|
||||
- **`bool UserIsAdmin { get; set; }`**
|
||||
User role flag (admin/non-admin).
|
||||
- **`bool AllowSensorPushAndPull { get; set; }`**
|
||||
Enables/disables sensor push/pull functionality.
|
||||
- **`void SetRange(CACOption option)`**
|
||||
Applies a range configuration (e.g., `CACOption.Default`, `CACOption.UserDefined`) to all analog sensors.
|
||||
- **`void Sort(object columnTag, bool bUserClick)`**
|
||||
Sorts channels by the specified column (e.g., `columnTag = "Name"`).
|
||||
- **`bool ReadOnlyParametersMode { get; set; }`**
|
||||
Locks parameter editing (e.g., for review-only mode).
|
||||
- **`bool ReadOnlyChannelsMode { get; set; }`**
|
||||
Locks channel structure edits (add/remove/move).
|
||||
- **`int UserID { get; set; }`**
|
||||
ID of the current user (used for permission checks).
|
||||
|
||||
---
|
||||
|
||||
## 3. Invariants
|
||||
|
||||
- **`Channels` vs. `SettingChannels`**: `SettingChannels` is a snapshot of `Channels` taken at `OnSetActive()`, with blank channels removed.
|
||||
- **`ViewDbVersion` must be set before `HandleColumns`/`SetFilterMode`**: Used to gate feature availability based on client DB version.
|
||||
- **`Group` and `TestSetup` are mutually exclusive**: Only one is non-null at a time (group-edit vs. test setup-edit mode).
|
||||
- **`UseTestSetupOrder` is read-only**: Its value is determined internally (e.g., by `TestSetup` state) and not settable directly.
|
||||
- **`ShowISOCodes` and `ShowUserCodes` are read-only**: Derived from configuration (e.g., `ISOViewMode`, user settings).
|
||||
- **`AllChannels` is immutable after `PopulateChannels`**: Modifications require re-population.
|
||||
|
||||
---
|
||||
|
||||
## 4. Dependencies
|
||||
|
||||
### Dependencies *of* this module:
|
||||
- **`DTS.Common.Base`**: Provides `IBaseView`, `IBaseViewModel`, and `IFilterableListView`.
|
||||
- **`DTS.Common.Enums`**: `IsoViewMode`, `PossibleFilters`.
|
||||
- **`DTS.Common.Enums.Sensors`**: `PossibleFilters` (re-exported).
|
||||
- **`DTS.Common.Interface.*`**:
|
||||
- `Channels.IGroupChannel`, `Channels.ChannelCodes.IChannelCode`
|
||||
- `DataRecorders.IDASHardware`, `DataRecorders.IHardwareChannel`
|
||||
- `Groups.GroupList.IGroup`
|
||||
- `Groups.GroupList.ITestSetup`
|
||||
- `Pagination.IPagination` (via `IFilterableListView`)
|
||||
- `Sensors.ISensorData`, `Sensors.SensorsList.IDragAndDropItem`
|
||||
|
||||
### Dependencies *on* this module:
|
||||
- **UI Layer**: Views implementing `IGroupChannelListView`/`IGroupChannelSettingsListView` (e.g., WPF/XAML views).
|
||||
- **Business Logic Layer**: ViewModels/controllers implementing `IGroupChannelListViewModel` (e.g., `GroupChannelListViewModel`).
|
||||
- **Data Layer**: Services providing `sensorLookup`, `hardwareLookup`, `channelDefaults` (via `PopulateChannels`).
|
||||
|
||||
---
|
||||
|
||||
## 5. Gotchas
|
||||
|
||||
- **`SettingChannels` is a snapshot**: Changes to `Channels` after `OnSetActive()` are *not* reflected in `SettingChannels`.
|
||||
- **`PopulateChannels` has many flags**: Default parameters (`allowChannelDeletionByNonAdminUser`, `userIsAdmin`, etc.) imply complex permission logic; callers must explicitly set these to avoid unintended behavior.
|
||||
- **`SetFilter` vs. `Filter(string term)`**: `SetFilter` filters by sensor type (`PossibleFilters`), while `Filter(string term)` filters by text search. Confusing naming.
|
||||
- **`UseTestSetupOrder` is read-only**: Cannot be set directly; likely derived from `TestSetup` state (e.g., `TestSetup?.UseTestSetupOrder`).
|
||||
- **`ShowISOCodes` is read-only**: Its value is computed (e.g., `ISOViewMode != IsoViewMode.None`), not user-configurable.
|
||||
- **`ViewDbVersion` is critical for backward compatibility**: Must be set *before* `HandleColumns`/`SetFilterMode` to avoid UI errors with newer features.
|
||||
- **`Move*` methods accept arrays**: Designed for multi-select operations, but behavior for overlapping/multiple calls is unspecified.
|
||||
- **No explicit documentation on thread safety**: All methods assume UI-thread execution (common for view models).
|
||||
|
||||
None identified beyond the above.
|
||||
@@ -0,0 +1,142 @@
|
||||
---
|
||||
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-16T02:32:20.944334+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "a5d3249cf1dc850d"
|
||||
---
|
||||
|
||||
# GroupList
|
||||
|
||||
## Documentation: Group List Module (`DTS.Common.Interface.Groups.GroupList`)
|
||||
|
||||
---
|
||||
|
||||
### 1. Purpose
|
||||
|
||||
This module defines the core interfaces and supporting types for managing *groups*—logical collections of hardware (e.g., test fixtures, sensors, data recorders)—within the DTS system. It provides a view-model abstraction (`IGroupListViewModel`) for listing, filtering, sorting, creating, editing, and deleting groups, as well as a domain interface (`IGroup`) representing an individual group’s state, metadata, and behavior (e.g., channel association, XML serialization, test setup linkage). The module serves as the data and logic layer for UI components that display and manipulate groups, decoupling presentation concerns (via `IGroupListView`) from business logic.
|
||||
|
||||
---
|
||||
|
||||
### 2. Public Interface
|
||||
|
||||
#### `IGroupListView`
|
||||
- **Inherits**: `IBaseView`
|
||||
- **Purpose**: Marker interface for the view layer associated with group list UI. No additional members defined—intended for binding or dependency injection to identify group-list-specific views.
|
||||
|
||||
#### `TestSetupParentHelper`
|
||||
- **Fields/Properties**:
|
||||
- `int Id`
|
||||
- `string Name { get; set; }`
|
||||
- `bool Modified { get; set; }`
|
||||
- **Methods**:
|
||||
- `override string ToString()` → Returns `Name`
|
||||
- **Purpose**: Simple DTO for associating test setups with a group (used in `IGroup.AssociatedTestSetups`). Likely used for UI display or tracking changes to test setup associations.
|
||||
|
||||
#### `IGroupListViewModel`
|
||||
- **Inherits**: `IBaseViewModel`, `IFilterableListView`
|
||||
- **Properties**:
|
||||
- `IGroupListView View { get; set; }` — Reference to the view bound to this view model.
|
||||
- `IGroup[] Groups { get; set; }` — Current list of groups displayed/managed.
|
||||
- **Methods**:
|
||||
- `void Unset()` — Releases resources or clears state (e.g., unsubscribes events, nulls view).
|
||||
- `void Sort(object o, bool columnClick)` — Sorts the `Groups` collection; `o` likely specifies sort key/column; `columnClick` indicates user-initiated sort.
|
||||
- `void OnSetActive(object page, bool groupTile, object currentUser)` — Initializes or refreshes state when the view becomes active; parameters suggest context (`page`, `groupTile` UI mode, `currentUser` permissions).
|
||||
- `void MouseDoubleClick(int index)` — Handles double-click on group at `index` (e.g., opens editor).
|
||||
- `void Filter(string term)` — Filters `Groups` in-place based on `term`.
|
||||
- `IGroup GetGroup(int? id, bool updateTags = true)` — Retrieves group by ID; optionally refreshes tags.
|
||||
- `IGroup GetGroup(string displayName)` — Retrieves group by `DisplayName`.
|
||||
- `IGroup[] GetGroups(int[] ids)` — Bulk retrieval of groups by IDs.
|
||||
- `IGroup[] GetAllGroups()` — Retrieves all groups (likely from persistence).
|
||||
- `void DeleteGroups(int[] ids)` — Deletes groups by IDs.
|
||||
- `IGroup CreateGroup()` — Creates a new, unsaved group.
|
||||
- `IGroup CreateGroup(List<string> includedHardwareStringList)` — Creates a new group with hardware specified via legacy string IDs.
|
||||
- `IGroup CreateGroup(SqlDataReader reader, List<string> includedHardwareStringList, List<int> dasIdList)` — Creates a group from database reader + hardware lists (likely for import/restore).
|
||||
- `IGroup CreateGroup(IGroupDbRecord groupRecord, List<string> includedHardwareStringList, List<int> dasIdList)` — Creates a group from a database record + hardware lists.
|
||||
|
||||
#### `IGroup`
|
||||
- **Inherits**: `IComparable<IGroup>`
|
||||
- **Properties**:
|
||||
- `int Id`, `string Name`, `string DisplayName`, `string Description`, `bool Embedded`, `DateTime LastModified`, `string LastModifiedBy`
|
||||
- `int? StaticGroupId` — ID of a static template group this group may derive from.
|
||||
- `int ChannelCount`
|
||||
- `int[] IncludedHardware` — Hardware IDs (modern scheme).
|
||||
- `string[] IncludedHardwareStringList` — Hardware IDs in legacy `SerialNumber_type` format (used for import).
|
||||
- `bool PositionIsMixed`, `bool PositionIsTextbox`, `bool PositionIsCombobox`, `string Position` — UI state for position field (e.g., multi-select conflict or editable).
|
||||
- `bool TestObjectIsMixed`, `string TestObject` — UI state for test object field.
|
||||
- `int DisplayOrder`
|
||||
- `List<Channels.IGroupChannel> GroupChannelList` — List of channels associated with this group.
|
||||
- `List<TestSetupParentHelper> AssociatedTestSetups` — Test setups referencing this group.
|
||||
- `int[] TagIDs`, `string Tags` — Tag metadata.
|
||||
- `List<string> AvailableTestObjects`, `string SelectedTestObjectItem`
|
||||
- `List<string> AvailablePositions`, `string SelectedPositionItem`
|
||||
- **Methods**:
|
||||
- `IGroupDbRecord GetIGroupDbRecord()` — Returns database record snapshot.
|
||||
- `bool Filter(string term)` — Returns `true` if group matches `term` (used by `IGroupListViewModel.Filter`).
|
||||
- `bool Save(Channels.IGroupChannel[] groupChannels, bool canUserCommitChannelCodes)` — Persists group and channels; `canUserCommitChannelCodes` likely controls validation/commit behavior.
|
||||
- `void ClearGroupChannelSettingCache(long groupId)` — Clears cached channel settings for this group.
|
||||
- `Channels.IGroupChannel[] GetAllChannels(bool bEditable, IDictionary<int, ISensorData> sensorLookup, IDictionary<int, IDASHardware> hardwareLookup, IChannelSetting[] channelDefaults, bool allowSensorPushAndPull = false)` — Computes/returns full channel list with resolved sensor/hardware data.
|
||||
- `void LoadHardware()` — Populates `IncludedHardware`/`IncludedHardwareStringList` from persistence.
|
||||
- `void ConvertToEmbedded(Channels.IGroupChannel[] groupChannels)` — Converts group to embedded mode (likely immutable).
|
||||
- `void DeterminePositionAndTestObject(Channels.IGroupChannel[] channels)` — Infers `Position`/`TestObject` values from channels (e.g., for mixed-state detection).
|
||||
- `ISensorData GetSensor(Channels.IGroupChannel channel, ISensorData sensorData, bool bUseIsoFilter)` — Retrieves sensor data for a channel, optionally applying ISO filter.
|
||||
- `void SetSensor(Channels.IGroupChannel channel, ISensorData sensorData)` — Assigns sensor data to a channel.
|
||||
- `void WriteXML(ref XmlWriter writer)` — Serializes group to XML.
|
||||
- `IGroup ReadXML(XmlElement node, Dictionary<long, IGroupChannel> channelLookup, List<ISensorData> sensors)` — Static-like factory to deserialize group from XML.
|
||||
- `void SetIncludedHardware(int[] hardware)` — Updates `IncludedHardware` and marks hardware as loaded.
|
||||
- `void SetTestSetupLists()` — Populates `AssociatedTestSetups`.
|
||||
- `bool StaticGroupIsEqual()` — Compares group to its static template (`StaticGroupId`).
|
||||
- `bool IsDifferentThanStaticGroup { get; set; }` — Flag indicating deviation from static template.
|
||||
- `bool TagCompatible(int[] tags)` — Checks if group’s tags intersect with `tags`.
|
||||
- `string GetTagsAsCommaSeparatedString(TagsGetDelegate tagsGet)` — Formats tags as CSV using provided delegate for tag name lookup.
|
||||
|
||||
---
|
||||
|
||||
### 3. Invariants
|
||||
|
||||
- **Group Identity**: A group’s `Id` is its primary identifier; `GetGroup(int? id)` relies on uniqueness.
|
||||
- **Hardware Consistency**: `IncludedHardware` (int array) and `IncludedHardwareStringList` (string array) must be kept in sync during import/update operations, though the string list is explicitly noted as legacy.
|
||||
- **Channel Grouping**: `GroupChannelList` must contain all channels associated with the group; `GetAllChannels` depends on this list and external lookups (`sensorLookup`, `hardwareLookup`) to resolve channel metadata.
|
||||
- **UI State Integrity**: `PositionIsMixed`, `PositionIsTextbox`, `PositionIsCombobox`, and `TestObjectIsMixed` must accurately reflect whether the group’s channels have uniform or conflicting values for `Position`/`TestObject`.
|
||||
- **Persistence Contract**: `Save` must persist both the group’s metadata (via `IGroupDbRecord`) and its channels. The `canUserCommitChannelCodes` parameter implies conditional validation (e.g., user permissions).
|
||||
- **Tag Compatibility**: `TagCompatible(int[] tags)` must return `true` if the group’s `TagIDs` has non-empty intersection with `tags`.
|
||||
|
||||
---
|
||||
|
||||
### 4. Dependencies
|
||||
|
||||
#### Dependencies *of* this module:
|
||||
- **Core Interfaces**:
|
||||
- `DTS.Common.Base.IBaseView`, `DTS.Common.Base.IBaseViewModel`, `DTS.Common.Interface.Pagination.IFilterableListView`
|
||||
- `DTS.Common.Interface.Channels.IGroupChannel`, `Channels.IGroupChannel[]`
|
||||
- `DTS.Common.Interface.Sensors.ISensorData`
|
||||
- `DTS.Common.Interface.DataRecorders.IDASHardware`
|
||||
- `DTS.Common.Interface.TestSetups.TestSetupsList.TestSetupParentHelper` (used in `IGroup.AssociatedTestSetups`)
|
||||
- **External Types**:
|
||||
- `System.Data.SqlClient.SqlDataReader` (used in `IGroupListViewModel.CreateGroup`)
|
||||
- `System.Xml.XmlWriter`, `System.Xml.XmlElement` (XML serialization)
|
||||
- `System.Collections.Generic` collections (`List<T>`, `Dictionary<TKey, TValue>`)
|
||||
|
||||
#### Dependencies *on* this module:
|
||||
- **UI Layer**: `IGroupListView` implies consumption by UI components (e.g., group list views).
|
||||
- **Persistence Layer**: `IGroupDbRecord` (referenced in `IGroup`) suggests a database abstraction layer.
|
||||
- **Channel/Sensor/Hardware Layers**: `IGroup` depends on channel, sensor, and DAS hardware interfaces for full functionality.
|
||||
- **Test Setup Module**: `TestSetupParentHelper` links to test setup management (via `AssociatedTestSetups`).
|
||||
|
||||
---
|
||||
|
||||
### 5. Gotchas
|
||||
|
||||
- **Legacy Hardware IDs**: `IncludedHardwareStringList` is explicitly marked as legacy (`"primarily for import purposes"`). Mixing it with `IncludedHardware` may lead to inconsistencies if not synchronized during updates.
|
||||
- **Mixed State Flags**: Properties like `PositionIsMixed`/`TestObjectIsMixed` are *mutable* (`{ get; set; }`), but their update logic is not defined in this interface. Consumers must ensure `DeterminePositionAndTestObject` is called before relying on them.
|
||||
- **`GetAllChannels` Complexity**: This method requires multiple external lookups (`sensorLookup`, `hardwareLookup`, `channelDefaults`). Failure to provide valid dictionaries may cause runtime errors (e.g., `KeyNotFoundException`).
|
||||
- **`ReadXML` Signature Ambiguity**: `ReadXML` is an *instance method* (not static), but its behavior (e.g., whether it modifies the current instance or returns a new one) is unclear from the signature alone. The return type `IGroup` suggests it may be a factory, but this contradicts typical XML deserialization patterns.
|
||||
- **`Unset()` Semantics**: The purpose of `Unset()` is not documented. It may release resources, clear the `View` reference, or reset state—implementation-specific.
|
||||
- **`OnSetActive` Parameter Types**: Parameters `page`, `groupTile`, and `currentUser` are `object`, indicating potential use of dynamic dispatch or legacy patterns. Their expected types and usage are not specified here.
|
||||
- **`Save` Return Type**: `Save` returns `bool` but does not indicate success/failure semantics (e.g., validation failure vs. persistence failure). This is not documented in the interface.
|
||||
|
||||
None identified beyond the above ambiguities.
|
||||
@@ -0,0 +1,289 @@
|
||||
---
|
||||
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-16T02:19:24.711512+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "706013fcdffb7c0e"
|
||||
---
|
||||
|
||||
# Hardware
|
||||
|
||||
### **Purpose**
|
||||
This module defines a set of core interfaces for hardware monitoring, diagnostics, and status tracking within the DAS (Data Acquisition System) ecosystem. It provides abstractions for querying hardware metadata (e.g., `IDASMonitorInfo`), managing hardware lifecycle and validation (`IISOHardware`), tracking real-time arm/diagnostic status across distributed components (`IAllATDStatus`, `IATDStatus`, `IDistributorArmStatus`, `IDeviceArmStatus`), and encapsulating detailed diagnostic results for individual channels (`IDiagnosticResult`). Together, these interfaces enable consistent introspection, validation, and status reporting across physical and pseudo-rack hardware modules, distributors, and devices in the DAS system.
|
||||
|
||||
---
|
||||
|
||||
### **Public Interface**
|
||||
|
||||
#### **`IDASMonitorInfo`**
|
||||
- `string SerialNumber { get; }`
|
||||
Returns the hardware serial number.
|
||||
- `double[] TiltSensorCals { get; }`
|
||||
Returns calibration coefficients for tilt sensors (likely scale/offset per axis).
|
||||
- `short[] TiltSensorDataPre { get; }`
|
||||
Returns pre-calibrated raw tilt sensor ADC readings.
|
||||
- `DFConstantsAndEnums.TiltAxes TiltAxes { get; }`
|
||||
Indicates which tilt axes are physically present/active (e.g., X/Y/Z).
|
||||
- `int AxisIgnored { get; }`
|
||||
Index (0-based) of the tilt axis that is intentionally ignored (e.g., due to mounting).
|
||||
- `double MountOffsetAxisOne { get; }`
|
||||
Mechanical offset (in degrees or mm) applied to axis 1 during tilt computation.
|
||||
- `double MountOffsetAxisTwo { get; }`
|
||||
Mechanical offset (in degrees or mm) applied to axis 2 during tilt computation.
|
||||
- `string GetChannelName(int index)`
|
||||
Returns the human-readable name for channel `index` (e.g., `"CH01"`, `"TILT_X"`).
|
||||
- `double GetOffsetTolerancemVLow(int index)`
|
||||
Returns the lower bound (in mV) of acceptable offset for channel `index`.
|
||||
- `double GetOffsetTolerancemVHigh(int index)`
|
||||
Returns the upper bound (in mV) of acceptable offset for channel `index`.
|
||||
- `void ReadFromFile(string path)`
|
||||
Loads monitor info configuration from a file at `path`.
|
||||
- `void WriteToFile(string path)`
|
||||
Saves current monitor info configuration to a file at `path`.
|
||||
|
||||
#### **`IISOHardware`**
|
||||
- `void GetChannelsString(out int analog, out int digitalIn, out int digitalOut, out int squib, out int uart, out int streamOut, out int streamIn)`
|
||||
Outputs counts of each channel type supported by this hardware (analog, digital I/O, squib, UART, stream in/out).
|
||||
- `HardwareTypes DASTypeEnum { get; set; }`
|
||||
Gets/sets the hardware type (e.g., `ISO`, `SLICE`, `SLICE6`) as a strongly-typed enum.
|
||||
- `string IPAddress { get; set; }`
|
||||
Gets/sets the network IP address assigned to the hardware.
|
||||
- `bool IsPseudoRackModule()`
|
||||
Returns `true` if this hardware is a pseudo-rack module (e.g., SLICE slab or SLICE6 with S6DB).
|
||||
- `bool IsTSRAIR()`
|
||||
Returns `true` if this hardware is a TSRAIR module.
|
||||
- `bool ValidateSerialNumber(ref List<string> errors)`
|
||||
Validates the serial number; appends human-readable error messages to `errors` if invalid; returns `true` if valid.
|
||||
- `bool ValidateIPAddress(ref List<string> errors)`
|
||||
Validates the `IPAddress`; appends error messages to `errors` if invalid; returns `true` if valid.
|
||||
- `void Insert()`
|
||||
Persists this hardware record to the database (e.g., creates a new row).
|
||||
- `void Update()`
|
||||
Updates the existing database record for this hardware.
|
||||
- `void Delete()`
|
||||
Removes this hardware record from the database.
|
||||
|
||||
#### **`IAllATDStatus`**
|
||||
- `IATDStatus[] ATDs { get; }`
|
||||
Returns an array of all ATD (Arm/Telemetry/Diagnostics) devices being monitored.
|
||||
- `void AddDevice(IDeviceArmStatus device, string parent)`
|
||||
Registers a device (e.g., a DAS unit) under a named parent (e.g., `"Rack1"` or `"DistributorSN123"`).
|
||||
- `void PopulateFromHardware(IDASHardware[] hardware)`
|
||||
Initializes or refreshes the ATD status tree using an array of `IDASHardware` instances.
|
||||
- `AllATDStatuses OverallStatus { get; }`
|
||||
Returns the aggregate status across all ATDs (e.g., `AllConnected`, `Errors`).
|
||||
|
||||
#### **`IATDStatus`**
|
||||
- `AllATDStatuses Status { get; }`
|
||||
Returns the current status of this ATD (e.g., `Connecting`, `AllArmed`).
|
||||
- `IDistributorArmStatus[] Distributors { get; }`
|
||||
Returns the list of distributors managed by this ATD.
|
||||
- `void AddDistributor(IDistributorArmStatus distributor)`
|
||||
Registers a distributor with this ATD.
|
||||
- `IPAddress IP { get; }`
|
||||
Returns the IP address of this ATD.
|
||||
- `void SetIP(IPAddress ip)`
|
||||
Sets the IP address of this ATD.
|
||||
- `void UpdateAggregateStatus()`
|
||||
Recalculates the `Status` based on distributor/device states.
|
||||
|
||||
#### **`IDistributorArmStatus`**
|
||||
- `bool EmptyDistributor { get; }`
|
||||
Returns `true` if this distributor has no attached devices.
|
||||
- `IDeviceArmStatus Distributor { get; }`
|
||||
Returns the underlying device representing this distributor (e.g., a hardware unit acting as a distributor).
|
||||
- `void SetDistributor(IDeviceArmStatus distributor)`
|
||||
Associates a device instance as this distributor.
|
||||
- `DistributorStatuses DistributorStatus { get; }`
|
||||
Returns the distributor’s current status (e.g., `Connected`, `Errored`).
|
||||
- `void SetDistributorStatus(DistributorStatuses status)`
|
||||
Sets the distributor’s status.
|
||||
- `AllATDStatuses AggregateStatus { get; }`
|
||||
Returns the status of this distributor’s subtree (e.g., `AllConnected`).
|
||||
- `IDeviceArmStatus[] Devices { get; }`
|
||||
Returns the list of devices (e.g., DAS units) attached to this distributor.
|
||||
- `void AddDevice(IDeviceArmStatus device)`
|
||||
Adds a device to this distributor.
|
||||
- `string SerialNumber { get; }`
|
||||
Returns the distributor’s serial number.
|
||||
- `void SetSerialNumber(string serial)`
|
||||
Sets the distributor’s serial number.
|
||||
- `void UpdateAggregateStatus()`
|
||||
Recalculates `AggregateStatus` from attached devices.
|
||||
- `DateTime? LastSeen { get; }`
|
||||
Returns the last timestamp the distributor reported telemetry.
|
||||
- `float? InputVoltage { get; }`
|
||||
Returns the current input voltage (in V) measured by the distributor.
|
||||
- `float? BackupVoltage { get; }`
|
||||
Returns the current backup voltage (in V) measured by the distributor.
|
||||
- `void UpdateStatusFromQATS(IUDPQATSEntry qats)`
|
||||
Updates status fields (e.g., `LastSeen`, `InputVoltage`) from a QATS telemetry entry.
|
||||
|
||||
#### **`IDeviceArmStatus`**
|
||||
- `bool HasArmed { get; set; }`
|
||||
Gets/sets whether this device has successfully armed.
|
||||
- `DASStatuses DASStatus { get; }`
|
||||
Returns the device’s operational status (e.g., `BootedNotArmedYet`, `ArmedReady`).
|
||||
- `void SetDASStatus(DASStatuses status)`
|
||||
Sets the device’s `DASStatus`.
|
||||
- `DiagStatuses DiagStatus { get; }`
|
||||
Returns the device’s diagnostic status (e.g., `Passed`, `FailedShunt`).
|
||||
- `void SetDiagStatus(DiagStatuses status)`
|
||||
Sets the device’s `DiagStatus`.
|
||||
- `IDistributorArmStatus Distributor { get; }`
|
||||
Returns the parent distributor of this device.
|
||||
- `void SetDistributor(IDistributorArmStatus distributor)`
|
||||
Sets the parent distributor.
|
||||
- `IDASHardware Hardware { get; }`
|
||||
Returns the hardware instance associated with this device.
|
||||
- `void SetHardware(IDASHardware hardware)`
|
||||
Sets the hardware instance.
|
||||
- `IDASCommunication DASCommunication { get; }`
|
||||
Returns the communication interface used to interact with this device.
|
||||
- `void SetDASCommunication(IDASCommunication das)`
|
||||
Sets the communication interface.
|
||||
- `string SerialNumber { get; }`
|
||||
Returns the device’s serial number.
|
||||
- `void SetSerialNumber(string serial)`
|
||||
Sets the device’s serial number.
|
||||
- `DateTime? LastSeen { get; }`
|
||||
Returns the last timestamp the device reported telemetry.
|
||||
- `float? InputVoltage { get; }`
|
||||
Returns the device’s input voltage (in V).
|
||||
- `float? BackupVoltage { get; }`
|
||||
Returns the device’s backup voltage (in V).
|
||||
- `void UpdateStatusFromQATS(IUDPQATSEntry qats)`
|
||||
Updates status fields from a QATS telemetry entry.
|
||||
- `string ShuntResults { get; }`
|
||||
Returns a human-readable string summarizing shunt test results (e.g., `"PASS"` or `"FAIL: >5% deviation"`).
|
||||
- `string OffsetResults { get; }`
|
||||
Returns a human-readable string summarizing offset test results.
|
||||
- `double? TiltX { get; }`
|
||||
Returns the measured tilt on the X-axis (in degrees or mm).
|
||||
- `double? TiltY { get; }`
|
||||
Returns the measured tilt on the Y-axis.
|
||||
- `double? TiltZ { get; }`
|
||||
Returns the measured tilt on the Z-axis.
|
||||
- `string IPAddress { get; }`
|
||||
Returns the device’s IP address.
|
||||
- `bool Triggered { get; }`
|
||||
Returns `true` if the device has triggered an event.
|
||||
|
||||
#### **`IDiagnosticResult`**
|
||||
- `int DASChannelNumber { get; set; }`
|
||||
Channel number (0-based) this diagnostic result applies to.
|
||||
- `int EventNumber { get; set; }`
|
||||
Event ID this diagnostic result is associated with.
|
||||
- `double ScalefactorMilliVoltsPerADC { get; set; }`
|
||||
**Mandatory** scale factor to convert raw ADC counts to mV (from factory calibration).
|
||||
- `double ExpectedExcitationMilliVolts { get; set; }`
|
||||
**Mandatory** nominal excitation voltage (mV) expected by the sensor.
|
||||
- `short GetExpectedDataZeroLevelADC(ZeroMethodType zeroMethod)`
|
||||
Returns the expected zero-level ADC value for the given zeroing method (e.g., `AutoZero`, `ManualZero`).
|
||||
- `double? MeasuredExcitationMilliVolts { get; set; }`
|
||||
Actual excitation voltage measured during calibration (`null` if unmeasured).
|
||||
- `bool NegativeExcitation { get; set; }`
|
||||
`true` if `MeasuredExcitationMilliVolts` was negative (legacy flag for broken sensor/wire warnings).
|
||||
- `double? MeasuredOffsetMilliVolts { get; set; }`
|
||||
Measured sensor offset (mV) during calibration (`null` if unmeasured).
|
||||
- `double? MeasuredInternalOffsetMilliVolts { get; set; }`
|
||||
Internal DAS offset (mV) measured during calibration (`null` if unmeasured).
|
||||
- `double? AutoZeroPercentDeviation { get; set; }`
|
||||
Deviation (±% of full-scale) from 0 after auto-zeroing (e.g., `3.2` means 3.2% off).
|
||||
- `short? FinalOffsetADC { get; set; }`
|
||||
Offset remaining after offset-removal calibration (ADC counts).
|
||||
- `int? RemovedOffsetADC { get; set; }`
|
||||
Offset removed during calibration (ADC counts).
|
||||
- `int? RemovedInternalOffsetADC { get; set; }`
|
||||
Internal offset removed during calibration (ADC counts).
|
||||
- `double? NoisePercentFullScale { get; set; }`
|
||||
Full-scale signal-to-noise ratio as a percentage (`null` if unmeasured).
|
||||
- `bool ShuntDeflectionFailed { get; set; }`
|
||||
`true` if the emulated shunt test failed (deflection outside tolerance).
|
||||
- `bool CalSignalCheckFailed { get; set; }`
|
||||
`true` if the calibration signal check failed.
|
||||
- `double? MeasuredShuntDeflectionMv { get; set; }`
|
||||
Measured shunt deflection (mV) during emulated shunt test (`null` if unmeasured).
|
||||
- `double? MeasuredCalSignalMv { get; set; }`
|
||||
Measured calibration signal (mV).
|
||||
- `double? TargetCalSignalMv { get; set; }`
|
||||
Expected calibration signal (mV).
|
||||
- `double? MeasuredDurationMS { get; set; }`
|
||||
Measured duration of a test (e.g., squib fire) in milliseconds.
|
||||
- `double? MeasuredDelayMS { get; set; }`
|
||||
Measured delay (e.g., squib delay) in milliseconds.
|
||||
- `bool? SquibFirePassed { get; set; }`
|
||||
`true` if squib fire test passed.
|
||||
- `bool? SquibDurationPassed { get; set; }`
|
||||
`true` if squib duration test passed.
|
||||
- `bool? SquibDelayPassed { get; set; }`
|
||||
`true` if squib delay test passed.
|
||||
- `double[] SquibFireCurrentData { get; set; }`
|
||||
Raw current samples during squib fire test.
|
||||
- `double[] SquibFireVoltageData { get; set; }`
|
||||
Raw voltage samples during squib fire test.
|
||||
- `double[] SquibFireTimeAxis { get; set; }`
|
||||
Time axis (ms) corresponding to `SquibFireCurrentData`/`SquibFireVoltageData`.
|
||||
- `double SquibThreshold { get; set; }`
|
||||
Threshold current (mA) used to detect squib fire start.
|
||||
- `double SquibVoltageScaler { get; set; }`
|
||||
Scaling factor to convert raw squib voltage ADC to mV.
|
||||
- `double SquibCurrentScaler { get; set; }`
|
||||
Scaling factor to convert raw squib current ADC to mA.
|
||||
- `double? TargetGain { get; set; }`
|
||||
Expected gain (e.g., from calibration spec).
|
||||
- `double? MeasuredGain { get; set; }`
|
||||
Measured gain (e.g., from calibration test).
|
||||
- `double? QueriedGain { get; set; }`
|
||||
Gain value retrieved from hardware/firmware.
|
||||
- `double? TargetShuntDeflectionMv { get; set; }`
|
||||
Expected shunt deflection (mV) for emulated shunt test.
|
||||
- `double? BridgeResistance { get; set; }`
|
||||
Measured sensor bridge resistance (Ω) (`null` if unmeasured).
|
||||
- `short ZeroMVInADC { get; set; }`
|
||||
ADC value corresponding to 0 mV input (from factory calibration).
|
||||
- `short WindowAverageADC { get; set; }`
|
||||
Average ADC over the configured averaging window (`short.MinValue` = uninitialized).
|
||||
- `bool DigitalInputActiveState { get; set; }`
|
||||
Current active state of the digital input (`true` = high, `false` = low).
|
||||
|
||||
---
|
||||
|
||||
### **Invariants**
|
||||
- **`IDASMonitorInfo`**:
|
||||
- `TiltSensorCals.Length` must equal `TiltSensorDataPre.Length`.
|
||||
- `AxisIgnored` must be in the range `[0, TiltAxes.Length - 1]` (if tilt axes exist).
|
||||
- `GetChannelName(index)` must return a non-null, non-empty string for all valid `index` values (0 ≤ `index` < channel count).
|
||||
- **`IDiagnosticResult`**:
|
||||
- `ScalefactorMilliVoltsPerADC` is **mandatory** and must be non-zero for valid data scaling.
|
||||
- `ExpectedExcitationMilliVolts` is **mandatory** and must be > 0 for valid sensor operation.
|
||||
- `WindowAverageADC == short.MinValue` indicates uninitialized/invalid data.
|
||||
- `MeasuredExcitationMilliVolts == 0.0` or `null` may indicate "not measured" (legacy behavior).
|
||||
- **`IDeviceArmStatus`/`IDistributorArmStatus`**:
|
||||
- `LastSeen` may be `null` if the device has never reported telemetry.
|
||||
- `InputVoltage`/`BackupVoltage` may be `null` if not measured.
|
||||
- `DASStatus` and `DiagStatus` must be consistent with `HasArmed` and `ShuntDeflectionFailed`/`CalSignalCheckFailed`.
|
||||
- **`IISOHardware`**:
|
||||
- `ValidateSerialNumber`/`ValidateIPAddress` must not mutate the hardware object; errors are appended to the passed `List<string>`.
|
||||
- `IsPseudoRackModule()` and `IsTSRAIR()` are mutually exclusive (a module cannot be both).
|
||||
|
||||
---
|
||||
|
||||
### **Dependencies**
|
||||
- **Imports/Usings**:
|
||||
- `DTS.Common.Enums.DASFactory`, `DTS.Common.Enums.Hardware`, `DTS.Common.Enums.Sensors` (for `ZeroMethodType`, `HardwareTypes`, `DistributorStatuses`, etc.).
|
||||
- `DTS.Common.Interface.DataRecorders` (for `IDASHardware`, `IDASCommunication`).
|
||||
- `DTS.Common.Interface.DASFactory.Diagnostics.HardwareList` (for `IDeviceArmStatus` in `IAllATDStatus`).
|
||||
- `System.Net` (`IPAddress`), `System.ComponentModel` (`TypeConverter`), `System.Collections.Generic`.
|
||||
- **Inferred Consumers**:
|
||||
- `DTS.DASLib.Service.DiagnosticsService` (for `Calibrate`, `PerformShuntCheck`, `MeasureBridgeResistance`).
|
||||
- `DTS.DASLib.Service.DiagnosticsActions` (for `PerformShuntCheck`).
|
||||
- UI layers or telemetry services that consume `IAllATDStatus`/`IATDStatus` for real-time status dashboards.
|
||||
- Database persistence layers (for `IISOHardware.Insert`/`Update`/`Delete`).
|
||||
- **Inferred Providers**:
|
||||
- Concrete implementations of `IDASMonitorInfo` (e.g., `DASMonitorInfo` class) likely read from `.ini` or XML config files.
|
||||
- `IDASHardware` implementations (e.g., `ISOHardware`, `SLICE
|
||||
@@ -0,0 +1,133 @@
|
||||
---
|
||||
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-16T02:30:45.767318+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "8c9d2e027679c71f"
|
||||
---
|
||||
|
||||
# Documentation: AddEditHardware Module Interface
|
||||
|
||||
## 1. Purpose
|
||||
This module provides the interface layer for a UI-driven hardware configuration and editing workflow—specifically for adding or editing DAS (Data Acquisition System) hardware units and their associated modules in the SLICE6 ecosystem. It defines contracts for the view, view model, hardware model, and DAS module representations, enabling separation of concerns between UI presentation and business logic while supporting both physical hardware and "stand-in" (placeholder) entries. The module integrates with the broader diagnostics and hardware list subsystems, and supports persistence via conversion to `IISOHardware`.
|
||||
|
||||
## 2. Public Interface
|
||||
|
||||
### `IAddEditHardwareView`
|
||||
- **`void Activated();`**
|
||||
Notifies the view it has been activated; the view should perform any post-activation initialization or UI updates.
|
||||
- **`int ViewDbVersion { get; set; }`**
|
||||
Gets or sets the database version associated with the view’s current data context; likely used for concurrency or versioning checks during save.
|
||||
|
||||
### `IAddEditHardwareDASModule`
|
||||
- **`HardwareTypes ModuleType { get; set; }`**
|
||||
Gets or sets the type of the DAS module (e.g., analog input, digital I/O).
|
||||
- **`string SerialNumber { get; set; }`**
|
||||
Gets or sets the serial number of the module.
|
||||
- **`ImageSource DASImage { get; }`**
|
||||
Gets an image (WPF `ImageSource`) representing the module visually.
|
||||
- **`IAddEditHardwareHardware OwningHardware { get; set; }`**
|
||||
Gets or sets the parent hardware unit that owns this module.
|
||||
- **`SLICEBridgeTypes SLICEBridgeType { get; set; }`**
|
||||
Gets or sets the bridge type used by the module (e.g., for SLICE6 connectivity).
|
||||
- **`string GetSerialNumberPrefix();`**
|
||||
Returns the expected prefix for serial numbers of modules of this `ModuleType`; used for validation.
|
||||
|
||||
### `IAddEditHardwareViewModel`
|
||||
- **`IAddEditHardwareView View { get; set; }`**
|
||||
Gets or sets the associated view instance (MVVM pattern).
|
||||
- **`void Unset();`**
|
||||
Cleans up references and state, typically called when the view model is being discarded.
|
||||
- **`IAddEditHardwareHardware Hardware { get; set; }`**
|
||||
Gets or sets the hardware instance being edited or added.
|
||||
- **`int? TestId { get; set; }`**
|
||||
Gets or sets an optional test ID associated with the hardware (e.g., for test-specific configuration).
|
||||
- **`void SetHardware(IDASHardware hw, IISOHardware isoHW);`**
|
||||
Initializes the view model with existing hardware data from the diagnostics (`IDASHardware`) and ISO layer (`IISOHardware`).
|
||||
- **`bool NotificationsOn { get; set; }`**
|
||||
Enables or disables change notifications (e.g., to suppress UI updates during bulk initialization).
|
||||
- **`bool Validate(IISOHardware isoHW, ref List<string> errors, ref List<string> warnings, bool displayWindow, bool IsAdd);`**
|
||||
Validates the current hardware state against `isoHW`. Returns `true` if valid; populates `errors` and `warnings` lists. If `displayWindow` is `true`, may show UI dialogs for warnings/errors. `IsAdd` indicates if this is a new hardware entry.
|
||||
- **`void Save();`**
|
||||
Commits changes made in the view model to persistent storage (e.g., database).
|
||||
- **`IISOHardware GetISOHardware();`**
|
||||
Returns the current hardware state as an `IISOHardware` instance (used for persistence or propagation to other layers).
|
||||
- **`bool AllowStandin { get; set; }`**
|
||||
Gets or sets whether "stand-in" (non-physical) hardware entries are permitted.
|
||||
- **`void SetSLICE6TreeView(ISLICE6TreeView treeView, IHardwareListViewModel treeViewModel);`**
|
||||
Injects references to the SLICE6 tree view and its view model for integration (e.g., updating tree selection or state).
|
||||
- **`ISLICE6TreeView SLICE6TreeView { get; }`**
|
||||
Gets the currently assigned SLICE6 tree view instance.
|
||||
|
||||
### `IAddEditHardwareHardware`
|
||||
- **`HardwareTypes HardwareType { get; set; }`**
|
||||
Gets or sets the type of the DAS hardware unit.
|
||||
- **`string SerialNumber { get; set; }`**
|
||||
Gets or sets the serial number of the hardware unit.
|
||||
- **`string FirmwareVersion { get; set; }`**
|
||||
Gets or sets the firmware version of the hardware unit.
|
||||
- **`string IPAddress { get; set; }`**
|
||||
Gets or sets the IP address (if supported).
|
||||
- **`bool SupportsIPAddress { get; }`**
|
||||
Indicates whether the hardware type supports IP addressing.
|
||||
- **`bool SupportsRackSize { get; }`**
|
||||
Indicates whether the hardware type supports rack size configuration.
|
||||
- **`bool SupportsConfiguration { get; }`**
|
||||
Indicates whether the hardware type supports SLICE configuration options.
|
||||
- **`SLICEConfigurations SLICEConfiguration { get; set; }`**
|
||||
Gets or sets the SLICE configuration (e.g., rack layout, module positions).
|
||||
- **`RackSizes RackSize { get; set; }`**
|
||||
Gets or sets the rack size (e.g., 1U, 2U).
|
||||
- **`ImageSource DASImage { get; }`**
|
||||
Gets an image representing the hardware unit visually.
|
||||
- **`ObservableCollection<IAddEditHardwareDASModule> Modules { get; set; }`**
|
||||
Gets or sets the collection of modules installed in the hardware unit.
|
||||
- **`void RemoveModule(IAddEditHardwareDASModule module);`**
|
||||
Removes a module from the `Modules` collection.
|
||||
- **`void AddModule();`**
|
||||
Adds a new module instance to the `Modules` collection (implementation likely creates a default module of appropriate type).
|
||||
- **`IISOHardware ToISOHardware();`**
|
||||
Converts the current state into an `IISOHardware` instance for persistence or external use.
|
||||
- **`bool StandIn { get; set; }`**
|
||||
Indicates whether this entry represents placeholder/stand-in hardware (not physical).
|
||||
- **`bool IsModule { get; set; }`**
|
||||
Indicates whether this instance represents a module (vs. a top-level hardware unit).
|
||||
- **`bool IsAdd { get; set; }`**
|
||||
Indicates whether this hardware record is new (`true`) or pre-existing (`false`).
|
||||
|
||||
## 3. Invariants
|
||||
- **`HardwareType` and `ModuleType` must be valid enum values** from `DTS.Common.Enums.Hardware.HardwareTypes` and `DTS.Common.Enums.Hardware.SLICEBridgeTypes`, respectively.
|
||||
- **`Modules` collection must be initialized before use** (via `ObservableCollection<IAddEditHardwareDASModule>`), as `AddModule()` and `RemoveModule()` assume non-null.
|
||||
- **`DASImage` is read-only** (`get` only) for both `IAddEditHardwareHardware` and `IAddEditHardwareDASModule`; images must be set internally (e.g., via constructor or factory).
|
||||
- **`IsAdd` must be set before validation or save**, as `Validate()` uses it to determine behavior (e.g., uniqueness checks).
|
||||
- **`StandIn` and `IsModule` are mutually orthogonal flags**—a hardware unit can be `StandIn == true` and `IsModule == false`, or vice versa.
|
||||
- **`ViewDbVersion` must be synchronized with the underlying database version** during activation and save operations to prevent stale writes.
|
||||
|
||||
## 4. Dependencies
|
||||
- **Depends on**:
|
||||
- `DTS.Common.Base` (`IBaseView`, `IBaseViewModel`)
|
||||
- `DTS.Common.Interface.DASFactory.Diagnostics` (`IDASHardware`, `IISOHardware`)
|
||||
- `DTS.Common.Interface.DASFactory.Diagnostics.HardwareList` (`IHardwareListViewModel`, `ISLICE6TreeView`)
|
||||
- `DTS.Common.Interface.DataRecorders` (likely for ISO layer integration)
|
||||
- `DTS.Common.Enums.Hardware` (`HardwareTypes`, `SLICEBridgeTypes`, `SLICEConfigurations`, `RackSizes`)
|
||||
- WPF UI types (`System.Windows.Media.ImageSource`)
|
||||
- **Depended on by**:
|
||||
- UI layer implementations (e.g., WPF views and view models) for hardware configuration.
|
||||
- Persistence layers that consume `IISOHardware` (via `ToISOHardware()` and `GetISOHardware()`).
|
||||
- SLICE6 tree view integrations (`SetSLICE6TreeView()` suggests coupling with `HardwareListViewModel`).
|
||||
|
||||
## 5. Gotchas
|
||||
- **`DASImage` is read-only**—consumers cannot assign images directly; initialization must occur in concrete implementations (e.g., via factory or constructor).
|
||||
- **`NotificationsOn` is a blunt instrument**—disabling it suppresses *all* change notifications, which may mask unintended side effects if not carefully managed around initialization.
|
||||
- **`Validate()` mutates `errors` and `warnings` via `ref`**—callers must initialize these lists before invoking.
|
||||
- **`AddModule()` does not specify module type**—implementation likely infers type from `HardwareType` or defaults to a generic module, which may cause ambiguity.
|
||||
- **`IsAdd` and `IsModule` are both `bool` properties**—no validation ensures `IsModule == true` implies `IsAdd == false` (or vice versa); logic may rely on external context.
|
||||
- **`GetSerialNumberPrefix()` is not guaranteed to return a non-empty string**—callers should handle empty/whitespace prefixes.
|
||||
- **No explicit thread-safety guarantees**—all interfaces assume single-threaded UI access (common in WPF MVVM but not stated).
|
||||
- **`StandIn` hardware may lack full functionality**—e.g., `ToISOHardware()` may produce incomplete or placeholder data.
|
||||
|
||||
*None identified from source alone.*
|
||||
@@ -0,0 +1,239 @@
|
||||
---
|
||||
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-16T02:31:10.910753+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "0b794dc751ea2075"
|
||||
---
|
||||
|
||||
# HardwareList
|
||||
|
||||
## Documentation: Hardware List Module (DTS.Common.Interface.DASFactory.Diagnostics.HardwareList)
|
||||
|
||||
---
|
||||
|
||||
### 1. Purpose
|
||||
|
||||
This module defines the interface layer for the *Hardware List* feature within the DASFactory diagnostics subsystem. It provides a set of strongly-typed interfaces that abstract the presentation and data models for viewing, filtering, selecting, and managing hardware devices (e.g., DAS units, SLICE6 modules, bridges) in a diagnostic context. The interfaces support multiple specialized views (e.g., overdue calibration, replacement, SLICE6 tree), and the central `IHardwareListViewModel` orchestrates data retrieval, state management, and user interactions—including calibration tracking, sample rate configuration, clock synchronization (PTP), and hardware association (e.g., SLICE6 units to SLICE6DB backbones). It serves as the contract between the UI layer and underlying business logic for hardware inventory and configuration.
|
||||
|
||||
---
|
||||
|
||||
### 2. Public Interface
|
||||
|
||||
#### Interfaces (View Contracts)
|
||||
|
||||
- **`ISLICE6TreeView : IBaseView`**
|
||||
Represents the view contract for the SLICE6 tree hierarchy display.
|
||||
|
||||
- **`IHardwareListView : IBaseView`**
|
||||
Represents the view contract for the primary hardware list display.
|
||||
|
||||
- **`IHardwareListSelectView : IBaseView`**
|
||||
Represents the view contract for hardware selection workflows.
|
||||
|
||||
- **`IHardwareListOverdueView : IBaseView`**
|
||||
Represents the view contract for displaying hardware with overdue calibration.
|
||||
|
||||
- **`IHardwareListReplaceView : IBaseView`**
|
||||
Represents the view contract for hardware replacement workflows.
|
||||
|
||||
#### Data Model Interfaces
|
||||
|
||||
- **`ISLICE6TreeNode`**
|
||||
Represents a SLICE6 unit node in a tree structure.
|
||||
- `int DASId { get; set; }`
|
||||
- `string SerialNumber { get; set; }`
|
||||
- `int Port { get; set; }`
|
||||
- `string PortString { get; }` *(read-only)*
|
||||
- `int Number { get; set; }`
|
||||
- `int PositionOnChain { get; set; }`
|
||||
- `string PositionOnChainString { get; }` *(read-only)*
|
||||
|
||||
- **`IHardware`**
|
||||
Represents a hardware device (e.g., DAS, SLICE6, bridge).
|
||||
- `int DASId { get; set; }`
|
||||
- `bool Disabled { get; set; }`
|
||||
- `bool Included { get; set; }`
|
||||
- `double TestSampleRate { get; set; }`
|
||||
- `string SerialNumber { get; set; }`
|
||||
- `string HardwareType { get; set; }`
|
||||
- `string ChannelCount { get; set; }`
|
||||
- `string Firmware { get; set; }`
|
||||
- `double? MaxSampleRate { get; set; }`
|
||||
- `DateTime? CalDate { get; set; }`
|
||||
- `DateTime? CalDueDate { get; set; }`
|
||||
- `object Hardware { get; set; }` *(opaque reference to underlying hardware object)*
|
||||
- `void SetIncluded(bool bIncluded)`
|
||||
- `void SetMixedRates(bool mixed)`
|
||||
- `bool Filter(string term)`
|
||||
- `string ParentDAS { get; set; }`
|
||||
- `int PositionOnChain { get; set; }`
|
||||
- `int PositionOnDistributor { get; set; }`
|
||||
- `int Port { get; set; }`
|
||||
- `int AnalogChannels { get; set; }`
|
||||
- `int SquibChannels { get; set; }`
|
||||
- `int DigitalInChannels { get; set; }`
|
||||
- `int DigitalOutChannels { get; set; }`
|
||||
- `int UartChannels { get; set; }`
|
||||
- `int StreamOutChannels { get; set; }`
|
||||
- `int StreamInChannels { get; set; }`
|
||||
- `void DetermineChannelCount(bool showCompact, IHardware[] allHardware)`
|
||||
- `string IPAddress { get; set; }`
|
||||
- `DateTime? FirstUseDate { get; set; }`
|
||||
- `bool IsFirstUseValid { get; set; }`
|
||||
- `bool IsTSRAIR { get; }`
|
||||
- `byte PTPDomainID { get; set; }`
|
||||
|
||||
#### View Model Interface
|
||||
|
||||
- **`IHardwareListViewModel : IBaseViewModel, IFilterableListView`**
|
||||
Central view model for hardware list operations. Key members:
|
||||
|
||||
- **Properties**
|
||||
- `ISLICE6TreeNode SelectedSLICE6 { get; set; }`
|
||||
- `ISLICE6TreeNode[] AvailableSLICE6 { get; set; }`
|
||||
- `IHardware SelectedSLICE6DB { get; set; }`
|
||||
- `IHardware[] AvailableSLICE6DB { get; set; }`
|
||||
- `bool IsEdit { get; set; }`
|
||||
- `int TDASCalPeriod`, `int G5CalPeriod`, ..., `int SLICE6AirBridge_CalPeriod`
|
||||
*(Calibration period defaults for each hardware type)*
|
||||
- `IHardwareListReplaceView ReplaceView { get; set; }`
|
||||
- `IHardwareListView View { get; set; }`
|
||||
- `IHardwareListOverdueView OverdueView { get; set; }`
|
||||
- `IHardwareListSelectView SelectView { get; set; }`
|
||||
- `ISLICE6TreeView SLICE6TreeView { get; set; }`
|
||||
- `IHardware[] Hardware { get; set; }`
|
||||
- `IHardware[] OverdueHardware { get; set; }`
|
||||
- `IHardware[] HardwareInTest { get; set; }`
|
||||
- `IHardware HardwareToReplace { get; set; }`
|
||||
- `IHardware[] AvailableHardware { get; set; }`
|
||||
- `IHardware ReplacementHardware { get; set; }`
|
||||
- `bool ShowCompact { get; set; }`
|
||||
- `ISLICE6TreeNode[] SLICE6TreeNodes { get; set; }`
|
||||
- `int TestAAFRateHzColumnWidth`, `TestSampleRateColumnWidth`, `TestClockMasterColumnWidth`, `PTPDomainColumnWidth { get; set; }`
|
||||
|
||||
- **Methods**
|
||||
- `void InitializeReplace(ITestSetup setup, IsoViewMode viewMode)`
|
||||
Initializes the replacement view for a given test.
|
||||
- `void GetHardware(bool bIncludeModules, bool bIncludeOverdue, bool bIncludeBridges, int? testId, int? groupId)`
|
||||
Loads hardware data based on filters.
|
||||
- `void GetAvailableSampleRates(int[] availableSampleRates)`
|
||||
Populates available sample rates (likely for UI dropdowns).
|
||||
- `void SetTestSampleRates(Dictionary<string, double> testSampleRates)`
|
||||
Sets per-hardware sample rates for the current test.
|
||||
- `void SetHasIncludedChildren()`
|
||||
Updates state indicating if any hardware has included children.
|
||||
- `void UpdateTestSampleRate(string childSerialNumber, double testSampleRate)`
|
||||
Updates sample rate for a specific child device.
|
||||
- `void SetTestAAFRates(Dictionary<string, float> testAAFRates)`
|
||||
Sets per-hardware anti-aliasing filter rates.
|
||||
- `void UpdateTestAAFilterRate(string childSerialNumber, float testAAFilterRate)`
|
||||
Updates AAF rate for a specific child device.
|
||||
- `Func<SerializableAAF.DAS_TYPE, int, float> GetAAFForHardwareFunc { get; set; }`
|
||||
Callback to compute AAF rate for a given hardware type and sample rate.
|
||||
- `void CheckForMixedDAS(string nonParentSerialNumber, double testSampleRate)`
|
||||
Validates sample rate consistency across parent/child DAS units.
|
||||
- `void SetParentMixedRates(string parentDAS, bool mixedRates)`
|
||||
Marks a parent DAS as having mixed sample rates.
|
||||
- `void SetTestClockProfiles(DTS.Common.ClockSyncProfile masterProfile, DTS.Common.ClockSyncProfile slaveProfile)`
|
||||
Sets clock sync profiles for master/slave configuration.
|
||||
- `void SetTestClockMasters(Dictionary<string, bool> testClockMasters)`
|
||||
Sets per-device clock master status.
|
||||
- `void UpdateTestClockMaster(string childSerialNumber, bool testClockMaster)`
|
||||
Updates clock master status for a device.
|
||||
- `void SetTestPTPDomainIDs(Dictionary<string, byte> testPTPDomainIDs)`
|
||||
Sets per-device PTP domain IDs.
|
||||
- `void UpdateTestPTPDomainID(string childSerialNumber, byte ptpDomainId)`
|
||||
Updates PTP domain ID for a device.
|
||||
- `void Unset()`
|
||||
Clears view model state.
|
||||
- `void Sort(object o, bool columnClick)`
|
||||
Sorts main hardware list.
|
||||
- `void SortOverdue(object o, bool columnClick)`
|
||||
Sorts overdue hardware list.
|
||||
- `void SetIncluded(string[] serialNumbers, bool included)`
|
||||
Sets `Included` flag for multiple devices by serial number.
|
||||
- `void SetIncluded(int[] dasId)`
|
||||
Sets `Included` flag for multiple devices by DAS ID.
|
||||
- `void Filter(string term)`
|
||||
Applies text filter to hardware list.
|
||||
- `void MouseDoubleClick(int index)`
|
||||
Handles double-click on list item at `index`.
|
||||
- `void SetCache(IISOHardware[] hardware)`
|
||||
Populates internal cache from raw hardware data.
|
||||
- `void LoadTreeView(string serialNumber)`
|
||||
Loads SLICE6 tree for a given SLICE6DB serial number.
|
||||
- `void Associate(ISLICE6TreeNode node)`
|
||||
Associates a SLICE6 node with the currently selected SLICE6DB (no commit).
|
||||
- `void Associate(IHardware node)`
|
||||
Associates units from one SLICE6DB with another (no commit).
|
||||
- `void UnAssociate(ISLICE6TreeNode node)`
|
||||
Removes association of a SLICE6 node from its SLICE6DB (no commit).
|
||||
- `void SaveSLICE6Associations(string serialNumber)`
|
||||
Commits pending SLICE6/SLICE6DB associations for a given SLICE6DB.
|
||||
- `IHardware[] GetSelectedItems()`
|
||||
Returns currently selected hardware items.
|
||||
- `void Replace()`
|
||||
Executes hardware replacement (`HardwareToReplace` → `ReplacementHardware`).
|
||||
- `void SetCalPeriods(...)`
|
||||
Sets calibration period defaults for all hardware types.
|
||||
|
||||
---
|
||||
|
||||
### 3. Invariants
|
||||
|
||||
- All hardware objects (`IHardware`) must have a non-null `SerialNumber`.
|
||||
- `CalDueDate` is derived from `CalDate` + hardware-specific calibration period (e.g., `SLICE6_CalPeriod`).
|
||||
- `ChannelCount` is computed dynamically via `DetermineChannelCount()` and reflects channel composition (e.g., `AnalogChannels`, `SquibChannels`, etc.).
|
||||
- `IsFirstUseValid` and `FirstUseDate` are only meaningful for hardware supporting first-use tracking (e.g., 15524 DAS).
|
||||
- `SLICE6TreeNodes` is populated only after `LoadTreeView()` is called.
|
||||
- `SLICE6TreeNodes` contains *all* SLICE6 units associated with the selected `SelectedSLICE6DB`.
|
||||
- Association operations (`Associate`, `UnAssociate`) are *not* persisted until `SaveSLICE6Associations()` is invoked.
|
||||
- `HardwareToReplace` and `ReplacementHardware` must both be non-null before calling `Replace()`.
|
||||
- `TestSampleRate` on a child device must be compatible with its parent’s rate (enforced via `CheckForMixedDAS()`).
|
||||
- `PTPDomainID` is a per-device setting; domain conflicts may occur if not managed.
|
||||
|
||||
---
|
||||
|
||||
### 4. Dependencies
|
||||
|
||||
- **Internal Dependencies**
|
||||
- `DTS.Common.Base` (provides `IBaseView`, `IBaseViewModel`, `IFilterableListView`)
|
||||
- `DTS.Common.Classes.Hardware` (likely contains `IISOHardware` used in `SetCache`)
|
||||
- `DTS.Common.Enums` (e.g., `IsoViewMode` used in `InitializeReplace`)
|
||||
- `DTS.Common.Interface.Pagination` (via `IFilterableListView`)
|
||||
- `DTS.Common.Interface.TestSetups.TestSetupsList` (e.g., `ITestSetup` used in `InitializeReplace`)
|
||||
- `SerializableAAF` (namespace for `DAS_TYPE` enum used in `GetAAFForHardwareFunc`)
|
||||
|
||||
- **External Dependencies**
|
||||
- UI framework (e.g., WPF or WinForms) for `IBaseView` implementations.
|
||||
- Backend services for hardware data persistence (implied by `GetHardware`, `SaveSLICE6Associations`).
|
||||
|
||||
- **Depended Upon**
|
||||
- UI layer implementations (e.g., `SLICE6TreeView`, `HardwareListViewModel`) depend on these interfaces for binding and decoupling.
|
||||
|
||||
---
|
||||
|
||||
### 5. Gotchas
|
||||
|
||||
- **`Hardware` property**: The `object Hardware { get; set; }` field is typed as `object`, implying tight coupling to concrete types elsewhere (e.g., `DAS`, `SLICE6`). This may complicate mocking or testing without access to concrete implementations.
|
||||
- **`DetermineChannelCount` behavior**: The `showCompact` parameter suppresses SLICEPro units connected to ECMs. This may cause confusion if the UI toggles this flag without clear user indication.
|
||||
- **`IsFirstUseValid` semantics**: `FirstUseDate` is only valid *if* `IsFirstUseValid` is `true`. A `null` `FirstUseDate` does *not* imply invalidity—it may mean "not yet used since calibration."
|
||||
- **Association workflow**: `Associate`/`UnAssociate` do *not* commit changes. Developers may mistakenly assume they persist data. `SaveSLICE6Associations()` must be called explicitly.
|
||||
- **`GetAAFForHardwareFunc`**: This callback is a `Func<SerializableAAF.DAS_TYPE, int, float>`—its implementation must be provided externally. Its purpose (computing AAF rate) is documented, but the mapping logic is not defined here.
|
||||
- **`SLICE6TreeNodes` vs `AvailableSLICE6`**:
|
||||
- `SLICE6TreeNodes`: *All* SLICE6 units associated with the current `SelectedSLICE6DB` (set by `LoadTreeView`).
|
||||
- `AvailableSLICE6`: SLICE6 units *not* associated with the current `SelectedSLICE6DB`.
|
||||
Confusing these may lead to incorrect UI behavior.
|
||||
- **`TestSampleRate` vs `MaxSampleRate`**: `TestSampleRate` is user-configurable per device; `MaxSampleRate` is a hardware limit. No validation is defined in the interface to prevent exceeding `MaxSampleRate`.
|
||||
- **`PTPDomainID`**: No range validation is specified (e.g., 0–237 per IEEE 1588). Implementation must enforce constraints.
|
||||
|
||||
None identified beyond these.
|
||||
@@ -0,0 +1,74 @@
|
||||
---
|
||||
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-16T02:31:01.486440+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "785426dcfee2c243"
|
||||
---
|
||||
|
||||
# ExtraProperties
|
||||
|
||||
## 1. Purpose
|
||||
This module defines the core interfaces for managing a list of *extra properties*—custom key-value metadata associated with ISO-compliant data objects—in a WPF-based UI layer. It establishes a clean separation between view (`IExtraPropertiesListView`), view model (`IExtraPropertiesListViewModel`), and individual property data (`IExtraProperty`) to support data binding, editing, validation, and user interactions (copy, delete, sort, filter, paste) in a structured, testable manner. The module exists to abstract the UI logic for handling dynamic, user-defined properties while enforcing consistency with the broader `DTS.Common` architecture.
|
||||
|
||||
## 2. Public Interface
|
||||
|
||||
### `IExtraPropertiesListView`
|
||||
- **Inherits**: `IBaseView`
|
||||
- **Description**: A marker interface for the view (e.g., XAML user control) that renders the extra properties list. No additional members—behavior is entirely driven by the view model.
|
||||
|
||||
### `IExtraPropertiesListViewModel`
|
||||
- **Inherits**: `IBaseViewModel`
|
||||
- **Properties**:
|
||||
- `IExtraPropertiesListView View { get; set; }` — Binds to the associated view instance.
|
||||
- `ObservableCollection<IExtraProperty> ExtraProperties { get; set; }` — The mutable collection of properties displayed/managed.
|
||||
- `bool IsReadOnly { get; set; }` — Controls whether edits are permitted.
|
||||
- `IExtraProperty[] SelectedProperties { get; }` — Returns currently selected items in the UI (read-only snapshot).
|
||||
- **Methods**:
|
||||
- `void SetPage(IDataPROPage page)` — Associates the view model with a specific data page context (likely for persistence or scoping).
|
||||
- `void SetParent(object parent)` — Sets a parent object (e.g., containing entity), though its exact use is not specified in the interface.
|
||||
- `void SetExtraProperties(IList<IExtraProperty> properties)` — Replaces the current `ExtraProperties` collection with a new list.
|
||||
- `void CopySelected()` — Copies selected properties (likely to clipboard or internal buffer).
|
||||
- `void DeleteSelected()` — Removes selected properties from `ExtraProperties`.
|
||||
- `void Filter(object tag, string term)` — Filters the displayed properties based on a search term (`term`) and optional `tag` (e.g., column or field identifier).
|
||||
- `void Sort(object o, bool columnClick)` — Sorts the properties, where `o` likely identifies the sort key/column and `columnClick` indicates whether the sort was triggered by UI interaction.
|
||||
- `bool Validate(ref List<string> errors)` — Validates all properties in `ExtraProperties`; returns `false` and populates `errors` if any property fails validation.
|
||||
|
||||
### `IExtraProperty`
|
||||
- **Inherits**: `INotifyPropertyChanged`
|
||||
- **Properties**:
|
||||
- `string Key { get; set; }` — The property’s name/identifier.
|
||||
- `string Value { get; set; }` — The property’s value.
|
||||
- `UIItemStatus ItemStatus { get; set; }` — Current UI validation/status state (e.g., `Success`, `Failed`, `Warning`—values defined in `DTS.Common.Enums`).
|
||||
- **Commands**:
|
||||
- `ICommand PasteCommand { get; set; }` — Handles paste operations, supporting multi-row pastes (e.g., CSV) into a single field.
|
||||
|
||||
## 3. Invariants
|
||||
- `ExtraProperties` must be an `ObservableCollection<IExtraProperty>` to support UI data binding and change notifications.
|
||||
- `IsReadOnly` controls mutability: when `true`, operations like `DeleteSelected()` and edits to `Key`/`Value` should be disabled (enforced by the view or view model implementation).
|
||||
- `SelectedProperties` is a *snapshot* of the current selection at the time of access—its contents may change independently of the view model’s internal state.
|
||||
- `Validate(ref List<string> errors)` must populate `errors` with human-readable messages for *all* invalid properties, not just the first failure.
|
||||
- `PasteCommand` is expected to handle multi-line or multi-property pastes (e.g., pasting multiple rows into one cell), though the exact behavior is implementation-defined.
|
||||
|
||||
## 4. Dependencies
|
||||
- **Depends on**:
|
||||
- `DTS.Common.Base` (for `IBaseView`, `IBaseViewModel`)
|
||||
- `DTS.Common.Enums` (for `UIItemStatus`)
|
||||
- `System.Collections.ObjectModel` (for `ObservableCollection<T>`)
|
||||
- `System.Windows.Input` (for `ICommand`)
|
||||
- **Depended on by**:
|
||||
- Likely consumed by UI components (e.g., `UserControl` implementing `IExtraPropertiesListView`) and higher-level view models managing ISO data pages (e.g., `IDataPROPage` implementations).
|
||||
- `IDataPROPage` (referenced in `SetPage`) is assumed to be defined elsewhere in `DTS.Common.Base`.
|
||||
|
||||
## 5. Gotchas
|
||||
- **Ambiguous `SetParent` usage**: The `object parent` parameter lacks type safety or documentation—implementers must infer its role (e.g., parent entity, container, or context object).
|
||||
- **`Filter`/`Sort` signature ambiguity**: The `object tag` and `object o` parameters in `Filter` and `Sort` are untyped; their expected types (e.g., `string`, `int`, or custom enum) are not specified.
|
||||
- **`SelectedProperties` is read-only**: The array is not live-updated; consumers must re-query after selection changes.
|
||||
- **No explicit thread-safety guarantees**: `ObservableCollection` is not thread-safe; modifications must occur on the UI thread (standard WPF constraint).
|
||||
- **`PasteCommand` behavior is underspecified**: While documented as handling multi-row pastes, the interface does not define how pasted data is parsed or distributed (e.g., row/column splitting).
|
||||
- **No event for selection changes**: The interface lacks a `SelectedPropertiesChanged` event—consumers must rely on external mechanisms (e.g., binding to `ICollectionView.SelectionChanged`).
|
||||
|
||||
*None identified beyond the above.*
|
||||
@@ -0,0 +1,55 @@
|
||||
---
|
||||
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-16T02:18:08.768984+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "9b8d7157407e874e"
|
||||
---
|
||||
|
||||
# LabDetails
|
||||
|
||||
## Documentation: Lab Details Module Interfaces
|
||||
|
||||
### 1. Purpose
|
||||
This module defines the core interface contracts for the *Lab Details* feature within the DTS application. It establishes the separation of concerns between view and view model layers for both the main lab details display and its associated ribbon-based menu UI, following the MVVM (Model-View-ViewModel) pattern. The interfaces `ILabDetailsView`, `ILabDetailsViewModel`, `ILabDetailsMenuView`, and `ILabDetailsMenuViewModel` collectively provide the structural foundation for implementing UI components that present and manage laboratory-specific data and actions, with the menu view specifically integrating with the application’s ribbon control system.
|
||||
|
||||
### 2. Public Interface
|
||||
|
||||
- **`ILabDetailsView`**
|
||||
*Signature:* `public interface ILabDetailsView : IBaseView`
|
||||
*Description:* Represents the view layer for the primary lab details UI. Inherits from `IBaseView`, implying it adheres to the base view contract (e.g., binding context, lifecycle hooks), but no additional members are defined in this source.
|
||||
|
||||
- **`ILabDetailsViewModel`**
|
||||
*Signature:* `public interface ILabDetailsViewModel : IBaseViewModel`
|
||||
*Description:* Represents the view model for the primary lab details UI. Inherits from `IBaseViewModel`, implying it provides core view model capabilities (e.g., data binding, command exposure), but no additional members are defined in this source.
|
||||
|
||||
- **`ILabDetailsMenuView`**
|
||||
*Signature:* `public interface ILabDetailsMenuView : IRibbonView`
|
||||
*Description:* Represents the view layer for the ribbon menu associated with lab details. Inherits from `IRibbonView`, indicating it integrates with the ribbon control infrastructure (e.g., exposes ribbon tabs, groups, or buttons).
|
||||
|
||||
- **`ILabDetailsMenuViewModel`**
|
||||
*Signature:* `public interface ILabDetailsMenuViewModel : IRibbonViewModel`
|
||||
*Description:* Represents the view model for the ribbon menu associated with lab details. Inherits from `IRibbonViewModel`, implying it manages ribbon-specific state and commands (e.g., ribbon tab activation, button enablement), but no additional members are defined in this source.
|
||||
|
||||
### 3. Invariants
|
||||
- All four interfaces are *marker interfaces*—they carry no explicit members beyond their base interface inheritance.
|
||||
- `ILabDetailsView` and `ILabDetailsViewModel` must be used in conjunction as a view/view model pair, conforming to the `IBaseView`/`IBaseViewModel` contract.
|
||||
- `ILabDetailsMenuView` and `ILabDetailsMenuViewModel` must be used in conjunction as a view/view model pair, conforming to the `IRibbonView`/`IRibbonViewModel` contract.
|
||||
- No additional validation rules, ordering guarantees, or state invariants are specified in the provided sources.
|
||||
|
||||
### 4. Dependencies
|
||||
- **Dependencies *of* this module:**
|
||||
- `DTS.Common.Base` (for `IBaseView`, `IBaseViewModel`)
|
||||
- `DTS.Common.RibbonControl` (for `IRibbonView`, `IRibbonViewModel`)
|
||||
- **Dependencies *on* this module:**
|
||||
- Not determinable from source alone. These interfaces are likely consumed by concrete implementations in other modules (e.g., UI project(s) or lab-specific feature modules), but no such references appear in the provided files.
|
||||
|
||||
### 5. Gotchas
|
||||
- **No behavior defined:** All interfaces are empty (marker interfaces). Actual functionality (e.g., data properties, commands, event handlers) must be defined in their concrete implementations or in the base interfaces (`IBaseView`, `IBaseViewModel`, `IRibbonView`, `IRibbonViewModel`).
|
||||
- **Namespace ambiguity:** All interfaces reside in `DTS.Common.Interface`, but the `RibbonControl`-dependent interfaces (`ILabDetailsMenuView`, `ILabDetailsMenuViewModel`) rely on types from `DTS.Common.RibbonControl`. Ensure the ribbon control module is available at compile/runtime.
|
||||
- **Potential for confusion:** The naming (`LabDetailsView` vs. `LabDetailsMenuView`) suggests a hierarchical relationship, but the interfaces themselves do not enforce or indicate any composition or ownership between them.
|
||||
- **None identified from source alone.**
|
||||
@@ -0,0 +1,51 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.CommonCore/Interface/ManageUsers/IManageUsersView.cs
|
||||
- Common/DTS.CommonCore/Interface/ManageUsers/IManageUsersViewModel.cs
|
||||
generated_at: "2026-04-16T02:27:00.683670+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "ca53759ac42ae06f"
|
||||
---
|
||||
|
||||
# ManageUsers
|
||||
|
||||
## 1. Purpose
|
||||
This module defines the view and view model interfaces for the *Manage Users* feature within the application’s UI layer. It serves as a contract between the presentation layer (view) and the business logic/data-binding layer (view model) in a pattern consistent with MVVM (Model-View-ViewModel), enabling separation of concerns and testability. The interfaces themselves are intentionally minimal—extending base interfaces (`IBaseView` and `IBaseViewModel`)—suggesting that core functionality (e.g., lifecycle management, navigation, data context) is abstracted at the base level, while *Manage Users* adds no additional surface area beyond this base contract.
|
||||
|
||||
## 2. Public Interface
|
||||
No public members are declared directly in either interface. Both interfaces are empty markers that inherit from base interfaces:
|
||||
|
||||
- **`IManageUsersView`**
|
||||
- *Signature*: `public interface IManageUsersView : IBaseView`
|
||||
- *Behavior*: Serves as the contract for the UI view (e.g., XAML page or control) responsible for rendering the user management UI. It inherits all contract obligations of `IBaseView` (e.g., `DataContext` assignment, initialization hooks, disposal patterns), though the specifics of `IBaseView` are not included here.
|
||||
|
||||
- **`IManageUsersViewModel`**
|
||||
- *Signature*: `public interface IManageUsersViewModel : IBaseViewModel`
|
||||
- *Behavior*: Serves as the contract for the view model backing `IManageUsersView`. It inherits all contract obligations of `IBaseViewModel` (e.g., property change notification, command registration, state management), though the specifics of `IBaseViewModel` are not included here.
|
||||
|
||||
> **Note**: Actual functionality (e.g., user list loading, user creation/deletion commands, selection handling) is not exposed in these interfaces and must be defined in concrete implementations or in the base interfaces (`IBaseView`, `IBaseViewModel`).
|
||||
|
||||
## 3. Invariants
|
||||
- `IManageUsersView` must be implemented by a class that satisfies the contract of `IBaseView`.
|
||||
- `IManageUsersViewModel` must be implemented by a class that satisfies the contract of `IBaseViewModel`.
|
||||
- The view and view model must be paired such that the view’s `DataContext` is an instance of `IManageUsersViewModel` (or its concrete implementation), per standard MVVM binding conventions.
|
||||
- No additional runtime invariants (e.g., thread affinity, initialization order) are specified in the source.
|
||||
|
||||
## 4. Dependencies
|
||||
- **Depends on**:
|
||||
- `DTS.Common.Base.IBaseView`
|
||||
- `DTS.Common.Base.IBaseViewModel`
|
||||
- `DTS.Common.Base` namespace (likely contains base types and contracts for UI components)
|
||||
|
||||
- **Depended on by**:
|
||||
- Concrete implementations of `IManageUsersView` (e.g., a XAML view class)
|
||||
- Concrete implementations of `IManageUsersViewModel` (e.g., a view model class)
|
||||
- DI containers or navigation services that resolve or inject these interfaces
|
||||
- Other modules that reference `IManageUsersView`/`IManageUsersViewModel` for composition or testing (e.g., unit tests, integration layers)
|
||||
|
||||
## 5. Gotchas
|
||||
- **Empty interfaces**: The interfaces contain no members beyond inheritance, which may indicate incomplete refactoring, future extensibility, or reliance on convention over explicit contract definition. Developers should verify that `IBaseView` and `IBaseViewModel` provide sufficient functionality for the *Manage Users* feature.
|
||||
- **Ambiguity in feature scope**: Without additional members, it is unclear whether user-specific operations (e.g., `LoadUsersAsync()`, `DeleteUserCommand`) are expected to be defined in the base interfaces or in derived classes. This could lead to inconsistent implementations.
|
||||
- **No versioning or deprecation markers**: The absence of attributes (e.g., `[Obsolete]`) or versioning hints makes it difficult to assess whether these interfaces are stable or in flux.
|
||||
- **None identified from source alone.**
|
||||
@@ -0,0 +1,79 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.CommonCore/Interface/Menu/HamburgerMenu/IHamburgerMenuView.cs
|
||||
- Common/DTS.CommonCore/Interface/Menu/HamburgerMenu/IHamburgerMenuViewModel.cs
|
||||
generated_at: "2026-04-16T02:34:46.916280+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "2d2eff5fd8108e4e"
|
||||
---
|
||||
|
||||
# HamburgerMenu
|
||||
|
||||
## Documentation: Hamburger Menu Module Interfaces
|
||||
|
||||
### 1. Purpose
|
||||
This module defines the core interfaces (`IHamburgerMenuView` and `IHamburgerMenuViewModel`) for the *Hamburger Menu* UI component within the application. It serves as the contract between the view (UI layer) and view model (logic/data layer) for a navigation menu typically rendered as a collapsible side panel (e.g., triggered by a hamburger icon). The module enables separation of concerns by decoupling UI rendering from business logic, supporting menu item management, lifecycle hooks for activation/deactivation, and event-driven interaction via `MenuItemPressed`.
|
||||
|
||||
### 2. Public Interface
|
||||
|
||||
#### `IHamburgerMenuView`
|
||||
- **Inherits**: `IBaseView`
|
||||
- **Description**: A marker interface representing the *view* (UI) for the hamburger menu. No additional members are defined beyond base view contract. Implementation is expected to render the hamburger menu UI (e.g., `Menu`, `Button`, `Popup`) and bind to `IHamburgerMenuViewModel`.
|
||||
|
||||
#### `IHamburgerMenuViewModel`
|
||||
- **Inherits**: `IBaseViewModel`
|
||||
- **Properties**:
|
||||
- `IHamburgerMenuView View { get; set; }`
|
||||
Gets or sets the associated view instance (standard MVVM pattern for view-model ↔ view binding).
|
||||
- `bool TestRunning { get; }`
|
||||
Read-only flag indicating whether a test is currently executing. *Note: Comment references issue #15324 regarding a warning dialog appearing on tab changes for admin users viewing other users’ views.*
|
||||
|
||||
- **Methods**:
|
||||
- `void OnSetActive()`
|
||||
Invoked when the view becomes active (e.g., when its tab/page is selected). Used for initialization or resource acquisition.
|
||||
- `void Unset()`
|
||||
Invoked when the view is deactivated/unloaded. Used for cleanup (e.g., releasing resources, unsubscribing events).
|
||||
- `ContextMenu GetContextMenu()`
|
||||
Returns the `ContextMenu` instance used for the hamburger menu. Likely used to attach the menu to a UI element (e.g., `Button.ContextMenu`).
|
||||
- `void SetMenuItems(string[] items)`
|
||||
Populates the menu with items derived from the `items` array (e.g., menu item labels).
|
||||
- `void ClearMenuItems()`
|
||||
Removes all menu items from the current menu state.
|
||||
|
||||
- **Events**:
|
||||
- `MenuItemPressedDelegate MenuItemPressed { get; set; }`
|
||||
Event handler invoked when a menu item is selected. The delegate signature is `void delegate(string command)`, where `command` is the identifier (e.g., menu item text or key) of the pressed item.
|
||||
|
||||
#### `MenuItemPressedDelegate`
|
||||
- **Signature**: `delegate void MenuItemPressedDelegate(string command)`
|
||||
- **Description**: Delegate for menu item selection events. Carries the `command` string identifying the selected menu item.
|
||||
|
||||
---
|
||||
|
||||
### 3. Invariants
|
||||
- `View` must be set to a valid `IHamburgerMenuView` instance before `OnSetActive()` is called (implied by MVVM pattern).
|
||||
- `SetMenuItems()` and `ClearMenuItems()` must be called *before* `GetContextMenu()` returns a fully populated menu (ordering implied by typical menu construction workflows).
|
||||
- `TestRunning` is read-only and externally controlled (implementation not visible here); callers must not modify it directly.
|
||||
- `MenuItemPressed` must be assigned a handler *before* menu items are interacted with (otherwise, selections will be ignored).
|
||||
|
||||
---
|
||||
|
||||
### 4. Dependencies
|
||||
- **Internal Dependencies**:
|
||||
- `DTS.Common.Base` namespace (provides `IBaseView`, `IBaseViewModel`).
|
||||
- `System.Windows.Controls` (provides `ContextMenu`, `MenuItem`).
|
||||
- **External Dependencies**:
|
||||
- `IHamburgerMenuView`/`IHamburgerMenuViewModel` implementations (e.g., WPF view/user control and its view model) must exist elsewhere in the codebase.
|
||||
- Likely consumed by higher-level navigation or shell modules (e.g., main window or tabbed interface) that manage view lifecycle (`OnSetActive`/`Unset`).
|
||||
|
||||
---
|
||||
|
||||
### 5. Gotchas
|
||||
- **Ambiguous `GetContextMenu()` semantics**: The method returns a `ContextMenu` but does not specify whether it is a *new instance* or a *cached instance*. Callers must avoid modifying the returned object without understanding ownership (risk of side effects).
|
||||
- **`TestRunning` flag purpose unclear**: While the property exists, its implementation and update mechanism are not visible here. Its usage in UI logic (e.g., blocking tab changes) is referenced in a comment but not enforced by the interface.
|
||||
- **No error handling in interface**: Methods like `SetMenuItems()` lack validation or exception guarantees (e.g., null/empty `items` handling).
|
||||
- **`MenuItemPressed` delegate signature is minimal**: Only passes `string command`; no context (e.g., menu item index, source element) for complex scenarios.
|
||||
- **Comment references issue #15324**: The inline comment about a warning dialog suggests a known bug or technical debt in tab-switching behavior for admin users. This behavior is *not* reflected in the interface and must be investigated in implementation code.
|
||||
|
||||
None identified beyond the above.
|
||||
@@ -0,0 +1,70 @@
|
||||
---
|
||||
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-16T02:19:48.560146+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "9f8faed114584889"
|
||||
---
|
||||
|
||||
# Networking
|
||||
|
||||
## Documentation: Networking Interface Module
|
||||
|
||||
### 1. Purpose
|
||||
This module defines a set of interfaces that establish the contract for networking-related UI and ViewModel layers within the application’s MVVM (Model-View-ViewModel) architecture. It enables separation of concerns by decoupling networking functionality (e.g., multicast configuration, network adapter selection) from concrete implementations, supporting testability and modularity. Specifically, it provides typed interfaces for views (`INetworkingView`, `INetworkAdapterView`) and view models (`INetworkingViewModel`, `INetworkAdapterViewModel`) that manage network adapter state and SLICE6 multicast communication parameters.
|
||||
|
||||
### 2. Public Interface
|
||||
|
||||
#### `INetworkingView`
|
||||
- **Signature**: `public interface INetworkingView : IBaseView`
|
||||
- **Behavior**: Represents the view layer for the networking UI. Inherits from `IBaseView`, implying it participates in the base view lifecycle (e.g., binding, initialization). No additional members defined—acts as a marker interface for networking-specific views.
|
||||
|
||||
#### `INetworkAdapterView`
|
||||
- **Signature**: `public interface INetworkAdapterView : IBaseView`
|
||||
- **Behavior**: Represents the view layer for network adapter selection UI. Like `INetworkingView`, it is a marker interface inheriting `IBaseView`, used to identify views responsible for network adapter presentation.
|
||||
|
||||
#### `INetworkAdapterViewModel`
|
||||
- **Signature**: `public interface INetworkAdapterViewModel : IBaseViewModel`
|
||||
- **Behavior**: Manages state for network adapter selection. Exposes a single property:
|
||||
- `SelectedNetworkInterface`: Gets or sets the currently selected `System.Net.NetworkInformation.NetworkInterface`. This is the core data point for adapter-related logic.
|
||||
|
||||
#### `INetworkingViewModel`
|
||||
- **Signature**: `public interface INetworkingViewModel : IBaseViewModel`
|
||||
- **Behavior**: Coordinates high-level networking configuration, particularly for SLICE6 multicast communication. Key members:
|
||||
- `View`: Gets or sets the associated `INetworkingView` instance (enabling view-model-to-view binding).
|
||||
- `SLICE6MulticastAddress`: Gets or sets the IPv6 multicast address (e.g., `"ff02::1:2"`) as a `string`.
|
||||
- `SLICE6MulticastAddressHasError`: Gets a `bool` indicating whether the current `SLICE6MulticastAddress` value is invalid (e.g., malformed or unreachable).
|
||||
- `SLICE6MulticastCommandPort`: Gets or sets the UDP port used for sending multicast commands (e.g., `5000`).
|
||||
- `SLICE6MulticastResponsePort`: Gets or sets the UDP port used for receiving multicast responses (e.g., `5001`).
|
||||
- `SetStatus(StatusInfo.StatusState status, string message = "", decimal percentage = -1, int processId = 0)`: Updates the UI status (e.g., progress, error, success) via the view. Parameters align with `StatusInfo.StatusState` (from `DTS.Common.Base`) and support optional progress/message context.
|
||||
|
||||
### 3. Invariants
|
||||
- **`INetworkingViewModel`**:
|
||||
- `SLICE6MulticastAddressHasError` must be `true` if and only if `SLICE6MulticastAddress` is syntactically invalid or otherwise unusable (e.g., not a valid IPv6 multicast address).
|
||||
- `SLICE6MulticastCommandPort` and `SLICE6MulticastResponsePort` must be valid port numbers (0–65535), though validation is not enforced by the interface itself.
|
||||
- `View` must be assigned before `SetStatus` is called; otherwise, behavior is undefined (no null-safety guaranteed in interface).
|
||||
- **`INetworkAdapterViewModel`**:
|
||||
- `SelectedNetworkInterface` may be `null` (e.g., if no adapter is selected), but implementations are expected to handle null gracefully (e.g., disable dependent operations).
|
||||
- **General**: All interfaces extend `IBaseViewModel`/`IBaseView`, implying adherence to base lifecycle contracts (e.g., disposal, initialization), though specifics are defined in `DTS.Common.Base`.
|
||||
|
||||
### 4. Dependencies
|
||||
- **Depends on**:
|
||||
- `DTS.Common.Base` (provides `IBaseView`, `IBaseViewModel`, and `StatusInfo.StatusState`).
|
||||
- `System.Net.NetworkInformation` (for `NetworkInterface`).
|
||||
- `System.Collections.Generic`, `System.Threading.Tasks`, `DTS.Common.Events` (via `INetworkingViewModel`, though no methods use them directly—likely for future extensibility or internal implementation).
|
||||
- **Depended on by**:
|
||||
- Concrete implementations of networking views (e.g., WPF/WinForms UI pages) and view models (e.g., `NetworkingViewModel`, `NetworkAdapterViewModel`).
|
||||
- Likely consumed by higher-level modules managing network configuration, device discovery, or SLICE6 protocol communication (inferred from `SLICE6Multicast*` naming).
|
||||
|
||||
### 5. Gotchas
|
||||
- **`SLICE6MulticastAddressHasError` is read-only**: Validation state is exposed via a getter, but the interface provides no method to explicitly trigger validation. Implementations must self-validate (e.g., on property setter or external events).
|
||||
- **No explicit error details**: `SLICE6MulticastAddressHasError` only indicates *whether* an error exists, not *why*. Consumers must parse `SLICE6MulticastAddress` or rely on implementation-specific logging.
|
||||
- **`SetStatus` signature is generic**: The method uses `StatusInfo.StatusState` (from `DTS.Common.Base`), but the interface does not define what states exist (e.g., `Idle`, `Processing`, `Error`). Consumers must reference `StatusInfo` to interpret status transitions.
|
||||
- **No async support in `INetworkingViewModel`**: Despite `System.Threading.Tasks` being imported, no async methods are declared—suggesting networking operations may be handled elsewhere or via side effects.
|
||||
- **`View` property is bidirectional but unenforced**: While `INetworkingViewModel` exposes a `View` property, the interface does not specify when it must be set (e.g., during construction vs. binding). Null assignments may cause runtime failures in `SetStatus`.
|
||||
|
||||
None identified beyond the above.
|
||||
@@ -0,0 +1,60 @@
|
||||
---
|
||||
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-16T02:18:03.956026+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "17272f9179ee1d83"
|
||||
---
|
||||
|
||||
# Pagination
|
||||
|
||||
## Documentation: Pagination and Filtering Interfaces
|
||||
|
||||
### 1. Purpose
|
||||
This module defines foundational interfaces for pagination and filtering functionality within the UI layer of the DTS system. Specifically, `IPaginationView` and `IPaginationViewModel` serve as marker interfaces to establish a contract for views and view models that support pagination, inheriting from `IBaseView` and `IBaseViewModel` respectively. Separately, `IFilterableListView` provides an explicit contract for list views that support dynamic filtering by term and tag, with identification via `ListViewId`. These interfaces enable consistent handling of pagination and filtering concerns across UI components, promoting separation of concerns between view logic (`IPaginationView`, `IFilterableListView`) and view model logic (`IPaginationViewModel`).
|
||||
|
||||
### 2. Public Interface
|
||||
- **`IPaginationView`**
|
||||
*Signature:* `public interface IPaginationView : IBaseView`
|
||||
*Behavior:* A marker interface indicating that a view supports pagination. It inherits from `IBaseView` (from `DTS.Common.Base`), implying it adheres to base view contracts (e.g., lifecycle, binding context), but adds no additional members itself.
|
||||
|
||||
- **`IPaginationViewModel`**
|
||||
*Signature:* `public interface IPaginationViewModel : IBaseViewModel`
|
||||
*Behavior:* A marker interface indicating that a view model supports pagination. Inherits from `IBaseViewModel`, implying base view model responsibilities (e.g., state management, command exposure), but adds no additional members.
|
||||
|
||||
- **`IFilterableListView`**
|
||||
*Signature:* `public interface IFilterableListView`
|
||||
*Behavior:* Defines contract for a list view capable of filtering.
|
||||
- `void Filter(object tag, string term)`: Applies a filter using a `tag` (e.g., column/field identifier) and `term` (user-provided filter string).
|
||||
- `void ClearAllFilters()`: Removes all active filters.
|
||||
- `string ListViewId { get; }`: Unique identifier for the list view instance, used for scoping filters or state.
|
||||
|
||||
### 3. Invariants
|
||||
- `IPaginationView` and `IPaginationViewModel` are *pure marker interfaces*—they impose no runtime behavior beyond inheritance from their respective base interfaces (`IBaseView`, `IBaseViewModel`).
|
||||
- `IFilterableListView.Filter` must be idempotent or statefully consistent: repeated calls with the same `tag` and `term` should not produce undefined behavior (e.g., duplicate filters), though exact semantics (overwrite vs. append) are not specified.
|
||||
- `IFilterableListView.ListViewId` must return a non-null, stable identifier for the lifetime of the instance.
|
||||
- `IFilterableListView.ClearAllFilters()` must reset the view’s filter state to its unfiltered condition.
|
||||
- No ordering guarantees are specified for filter application or clearing (e.g., filters may be applied in any sequence).
|
||||
|
||||
### 4. Dependencies
|
||||
- **Dependencies *of* this module:**
|
||||
- `DTS.Common.Base.IBaseView` (via `IPaginationView`)
|
||||
- `DTS.Common.Base.IBaseViewModel` (via `IPaginationViewModel`)
|
||||
- *No other direct dependencies*—interfaces are self-contained.
|
||||
|
||||
- **Dependencies *on* this module:**
|
||||
- UI components implementing pagination (e.g., views/view models for list pages) must implement `IPaginationView`/`IPaginationViewModel`.
|
||||
- List views requiring filtering capability must implement `IFilterableListView`.
|
||||
- Likely consumed by higher-level UI frameworks or pagination/filtering services (not visible in source), but such consumers are not declared here.
|
||||
|
||||
### 5. Gotchas
|
||||
- **Ambiguity in `Filter` semantics:** The `tag` parameter’s type (`object`) and purpose (e.g., enum, string key, or custom identifier) are unspecified. Implementers must infer or document expected usage.
|
||||
- **No error handling contract:** `Filter` and `ClearAllFilters` have no documented exception behavior (e.g., on invalid `tag` or during filter application).
|
||||
- **No state introspection:** `IFilterableListView` exposes no way to query current filters (e.g., `GetActiveFilters()`), making debugging or UI state synchronization difficult.
|
||||
- **Namespace inconsistency:** `IFilterableListView` resides in `DTS.Common.Interface.Pagination`, while `IPaginationView` and `IPaginationViewModel` are in `DTS.Common.Interface` (no `.Pagination` sub-namespace). This may cause discoverability issues.
|
||||
- **No versioning or extensibility hooks:** Interfaces are minimal and lack extensibility (e.g., no `Version` property or `Try*` patterns), suggesting potential rigidity for future enhancements.
|
||||
|
||||
*None identified beyond the above.*
|
||||
@@ -0,0 +1,96 @@
|
||||
---
|
||||
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-16T02:22:07.614992+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "1785995e6227da9e"
|
||||
---
|
||||
|
||||
# Realtime
|
||||
|
||||
## Documentation: Realtime Channel Selection Module
|
||||
|
||||
### 1. Purpose
|
||||
This module defines the foundational interfaces for a *realtime channel selection view and view model* within the DTS (Data Tracking System) architecture. It enables UI components to present and manage a selectable list of realtime data channels (e.g., sensor readings) for user interaction, supporting operations such as filtering by search text, setting the available channel list, and programmatically selecting a specific channel. It adheres to the MVVM (Model-View-ViewModel) pattern, with clear separation between the view (`IRealtimeChannelSelectView`), the view model (`IRealtimeChannelSelectViewModel`), and the underlying channel data model (`IRealtimeChannel`).
|
||||
|
||||
### 2. Public Interface
|
||||
|
||||
#### `IRealtimeChannelSelectView`
|
||||
- **Definition**: `public interface IRealtimeChannelSelectView : IBaseView`
|
||||
- **Behavior**: A marker interface representing the *view* (UI layer) for channel selection. Inherits from `IBaseView`, implying standard view lifecycle or binding contract (e.g., `DataContext` setup, initialization hooks). No additional methods or properties are defined here—implementation details (e.g., controls, rendering) are left to concrete classes.
|
||||
|
||||
#### `IRealtimeChannelSelectViewModel`
|
||||
- **Definition**: `public interface IRealtimeChannelSelectViewModel : IBaseViewModel`
|
||||
- **Behavior**: The *view model* mediating between the channel selection view and the underlying channel data.
|
||||
- **`ChannelSelectView`**: `IRealtimeChannelSelectView ChannelSelectView { get; set; }`
|
||||
Gets or sets the associated view instance. Used for view-model-to-view coordination (e.g., triggering UI updates or responding to view events).
|
||||
- **`SetAvailableChannels(IRealtimeChannel[] channels)`**:
|
||||
Updates the list of channels available for selection. The view should refresh its channel list UI to reflect this new set.
|
||||
- **`SetSearchText(string searchText)`**:
|
||||
Sets the current search/filter text. The view should filter the displayed channel list based on this text (e.g., matching `SensorName`, `ChannelName`, or other display fields).
|
||||
- **`SetRealtimeChannel(IRealtimeChannel channel)`**:
|
||||
Programmatically selects the specified channel. This likely updates the view’s active selection state and may trigger side effects (e.g., updating a details panel or starting data subscription).
|
||||
|
||||
#### `IRealtimeChannel`
|
||||
- **Definition**: `public interface IRealtimeChannel`
|
||||
- **Behavior**: Represents a single realtime data channel (e.g., a sensor reading). Provides metadata and identity for the channel.
|
||||
- **`Capacity`**: `double Capacity { get; }`
|
||||
The maximum capacity (e.g., in physical units or samples) for this channel.
|
||||
- **`DisplayOrder`**: `int DisplayOrder { get; }`
|
||||
Integer priority for sorting channels in the UI (lower values displayed first).
|
||||
- **`SensorName`**: `string SensorName { get; }`
|
||||
Human-readable name of the sensor (e.g., "Temperature Sensor A").
|
||||
- **`ChannelName`**: `string ChannelName { get; }`
|
||||
Name of the channel itself (may be distinct from `SensorName`).
|
||||
- **`DasNames`**: `string[] DasNames { get; }`
|
||||
Array of DAS (Data Acquisition System) names associated with this channel.
|
||||
- **`SensorSerial`**: `string SensorSerial { get; }`
|
||||
Serial number of the physical sensor.
|
||||
- **`Units`**: `string Units { get; }`
|
||||
Raw unit string (e.g., "V", "°C").
|
||||
- **`UserValue1`**: `string UserValue1 { get; }`
|
||||
Custom user-defined string (purpose context-dependent).
|
||||
- **`GroupName`**: `string GroupName { get; }`
|
||||
Logical group name for channel categorization (e.g., "Engine", "Hydraulics").
|
||||
- **`DisplayUnit`**: `string DisplayUnit { get; }`
|
||||
Unit string formatted for display (may differ from `Units`, e.g., "Degrees C").
|
||||
- **`HardwareChannelString`**: `string HardwareChannelString { get; }`
|
||||
Hardware-level channel identifier (e.g., "AI0", "CH3").
|
||||
- **`ISOCode`**: `string ISOCode { get; }`
|
||||
ISO-standard code for the channel (e.g., for internationalization or compliance).
|
||||
- **`SensorsString`**: `string SensorsString { get; }`
|
||||
Concatenated string of sensor identifiers (e.g., "S1,S2").
|
||||
- **`DasName`**: `string DasName { get; }`
|
||||
Single DAS name (likely the primary or first entry from `DasNames`).
|
||||
- **`GetId()`**: `string GetId()`
|
||||
Returns a unique identifier for the channel (e.g., for tracking or persistence).
|
||||
- **`HasPassedLevelTrigger`**: `bool HasPassedLevelTrigger { get; }`
|
||||
Indicates if the channel’s current value has exceeded a predefined threshold (e.g., for alerting).
|
||||
- **`Name`**: `string Name { get; }`
|
||||
Fallback display name (likely a composite of `SensorName` and `ChannelName`).
|
||||
|
||||
### 3. Invariants
|
||||
- **`IRealtimeChannelSelectViewModel` must maintain a valid reference to `ChannelSelectView`** before invoking view-related operations (e.g., `SetAvailableChannels` may assume the view is attached to render updates).
|
||||
- **`SetAvailableChannels` must be called with a non-null array** (though the array may be empty). The view model should handle null inputs gracefully (e.g., treat as an empty list), but the interface does not specify this—implementation may vary.
|
||||
- **`SetRealtimeChannel` expects a channel from the *currently available set*** (i.e., one previously set via `SetAvailableChannels`). Passing a channel outside this set may lead to undefined behavior (e.g., selection ignored or exception).
|
||||
- **`DisplayOrder` values must be consistent** across channels in a given selection context to ensure stable sorting. No explicit ordering guarantee is enforced by the interface, but implementations should respect this for predictable UI behavior.
|
||||
|
||||
### 4. Dependencies
|
||||
- **Depends on**:
|
||||
- `DTS.Common.Base.IBaseView` and `DTS.Common.Base.IBaseViewModel` (via inheritance).
|
||||
- `DTS.Common.Interface.Realtime.IRealtimeChannel` (core data model).
|
||||
- **Depended on by**:
|
||||
- Concrete implementations of `IRealtimeChannelSelectView` (e.g., WPF/WinForms user controls).
|
||||
- Concrete implementations of `IRealtimeChannelSelectViewModel` (e.g., business logic classes managing channel selection state).
|
||||
- Higher-level modules (e.g., a `RealtimeDashboardViewModel`) that compose or orchestrate channel selection workflows.
|
||||
|
||||
### 5. Gotchas
|
||||
- **`DasNames` vs. `DasName`**: `DasNames` is an array, while `DasName` is a single string. Implementers must ensure `DasName` returns a consistent value (e.g., `DasNames[0]` or a primary DAS), but the interface does not specify this.
|
||||
- **`Name` vs. `SensorName`/`ChannelName`**: `Name` is a distinct property—its value is not defined by the interface. It may be a concatenation, a fallback, or a user-editable field.
|
||||
- **`UserValue1` semantics are undefined**: Its purpose is not documented here and may be application-specific (e.g., a user-configurable label or metadata field).
|
||||
- **No explicit error handling**: Methods like `SetRealtimeChannel` do not specify behavior for invalid inputs (e.g., null, non-available channel). Implementations must define this.
|
||||
- **No threading guarantees**: The interface does not specify thread-safety. Concurrent calls to `SetAvailableChannels`, `SetSearchText`, or `SetRealtimeChannel` may require external synchronization.
|
||||
- **None identified from source alone.**
|
||||
@@ -0,0 +1,52 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.CommonCore/Interface/RegionOfInterest/IRegionOfInterest.cs
|
||||
generated_at: "2026-04-16T02:17:44.659996+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "59ff4edea9524aba"
|
||||
---
|
||||
|
||||
# RegionOfInterest
|
||||
|
||||
### **Purpose**
|
||||
This module defines the `IRegionOfInterest` interface, which standardizes the contract for regions of interest (ROIs) across the system—typically representing selectable time or frequency intervals associated with specific channels. It enables UI and business logic components to bind to ROI metadata (e.g., `Start`, `End`, `IsEnabled`) and react to changes via `INotifyPropertyChanged`. The interface supports default/placeholder ROIs (`IsDefault`), custom naming via `Suffix`, and channel-specific scoping (`ChannelNames`), while providing optimized mutation paths (`SetChannelNamesNoNotify`) to avoid unnecessary notifications during batch updates.
|
||||
|
||||
---
|
||||
|
||||
### **Public Interface**
|
||||
|
||||
| Member | Signature | Behavior |
|
||||
|--------|-----------|----------|
|
||||
| `Suffix` | `string Suffix { get; set; }` | Gets or sets a user-defined suffix appended to the ROI’s display name (e.g., `"Peak"` → `"ROI_Peak"`). Modifying this triggers `PropertyChanged`. |
|
||||
| `Start` | `double Start { get; set; }` | Gets or sets the inclusive start boundary of the ROI (e.g., time in seconds or frequency in Hz). Modifying this triggers `PropertyChanged`. |
|
||||
| `End` | `double End { get; set; }` | Gets or sets the exclusive end boundary of the ROI. Must be ≥ `Start`. Modifying this triggers `PropertyChanged`. |
|
||||
| `IsEnabled` | `bool IsEnabled { get; set; }` | Gets or sets whether the ROI is active (e.g., processed or rendered). Modifying this triggers `PropertyChanged`. |
|
||||
| `IsDefault` | `bool IsDefault { get; set; }` | Gets or sets whether this ROI is a system-provided default (e.g., auto-generated). Typically immutable by user actions. Modifying this triggers `PropertyChanged`. |
|
||||
| `ChannelNames` | `string[] ChannelNames { get; set; }` | Gets or sets the ordered list of channel identifiers this ROI applies to (e.g., `["CH1", "CH3"]`). Modifying this triggers `PropertyChanged`. |
|
||||
| `SetChannelNamesNoNotify` | `void SetChannelNamesNoNotify(string[] names)` | Sets `ChannelNames` *without* raising `PropertyChanged`. Intended for bulk initialization or internal state synchronization where notifications would be redundant or problematic. |
|
||||
| `ResetSuffix` | `void ResetSuffix()` | Resets `Suffix` to its default value (e.g., empty string or system-defined fallback). Behavior implies a `PropertyChanged` event for `Suffix` is raised *unless* the implementation explicitly suppresses it (source does not specify—see *Gotchas*). |
|
||||
|
||||
---
|
||||
|
||||
### **Invariants**
|
||||
- `Start ≤ End` must hold at all times; implementations are expected to enforce this (e.g., via validation in setters).
|
||||
- `ChannelNames` must be non-null; empty arrays are permitted (indicating no channels).
|
||||
- `IsDefault` implies immutability constraints: while not enforced by the interface, implementations typically prevent modification of `Start`, `End`, `ChannelNames`, or `Suffix` for default ROIs.
|
||||
- `SetChannelNamesNoNotify` must *not* raise `PropertyChanged`; all other property setters *must* raise `PropertyChanged` (per `INotifyPropertyChanged` contract).
|
||||
|
||||
---
|
||||
|
||||
### **Dependencies**
|
||||
- **Depends on**: `System.ComponentModel` (for `INotifyPropertyChanged`).
|
||||
- **Depended on by**: UI layers (e.g., WPF/XAML bindings), ROI management services (e.g., `ROIManager`), and serialization modules (e.g., JSON converters for ROI persistence).
|
||||
- **No direct external library dependencies** beyond .NET Base Class Library.
|
||||
|
||||
---
|
||||
|
||||
### **Gotchas**
|
||||
- **`ResetSuffix` behavior ambiguity**: The interface does not specify whether `ResetSuffix` raises `PropertyChanged`. Implementations may differ—some may suppress notifications (e.g., if resetting to current value), others may unconditionally raise the event. Callers should assume notification *may* occur.
|
||||
- **`ChannelNames` mutability**: The property setter accepts `string[]`, but the interface does not clarify whether the array is copied (defensive copy) or referenced. Implementations may mutate the backing store if the caller retains a reference to the passed array.
|
||||
- **No validation in interface**: While `Start ≤ End` is an expected invariant, the interface itself does not enforce it—validation must be implemented in concrete types.
|
||||
- **`IsDefault` semantics**: The interface does not define *how* `IsDefault` affects behavior (e.g., whether it blocks edits or affects serialization). This is implementation-specific.
|
||||
- **No thread-safety guarantees**: `INotifyPropertyChanged` implementations are typically not thread-safe; concurrent modifications may cause race conditions in event handlers.
|
||||
@@ -0,0 +1,113 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.CommonCore/Interface/RegionOfInterest/RegionOfInterestChannels/IRegionOfInterestChannelsView.cs
|
||||
- Common/DTS.CommonCore/Interface/RegionOfInterest/RegionOfInterestChannels/IRegionOfInterestChannelsViewModel.cs
|
||||
generated_at: "2026-04-16T02:29:26.774100+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "3255d2bc1a28f8fd"
|
||||
---
|
||||
|
||||
# RegionOfInterestChannels
|
||||
|
||||
## Documentation: `IRegionOfInterestChannelsViewModel` and `IRegionOfInterestChannelsView`
|
||||
|
||||
---
|
||||
|
||||
### 1. **Purpose**
|
||||
|
||||
This module defines the contract for the view and view model layers responsible for managing and presenting a collection of regions of interest (ROIs) in the context of test setups, channel groupings, and hardware configurations. It serves as the data and interaction layer for UI components that display, filter, sort, and validate ROI channel data—typically used in test setup or configuration interfaces where users define or inspect specific channel subsets (ROIs) across hardware devices. The module sits between domain-level ROI definitions (`IRegionOfInterest`) and higher-level test setup logic (`ITestSetup`, `IDASHardware`), enabling dynamic UI-driven manipulation of ROI collections.
|
||||
|
||||
---
|
||||
|
||||
### 2. **Public Interface**
|
||||
|
||||
#### `IRegionOfInterestChannelsView`
|
||||
- **Interface**: `IRegionOfInterestChannelsView : IBaseView`
|
||||
A marker interface for the view layer (e.g., UI control or page) implementing the view contract for ROI channel presentation. Inherits from `IBaseView`, implying standard view lifecycle or binding support.
|
||||
|
||||
#### `IRegionOfInterestChannelsViewModel`
|
||||
- **Interface**: `IRegionOfInterestChannelsViewModel : IBaseViewModel`
|
||||
Core business logic interface for ROI channel management.
|
||||
|
||||
- **`void SetParent(object o)`**
|
||||
Assigns a parent object (e.g., a parent view model or controller) for hierarchical navigation or context propagation.
|
||||
|
||||
- **`IRegionOfInterestChannelsView View { get; set; }`**
|
||||
Gets or sets the associated view instance. Enables two-way binding or view-model-to-view coordination.
|
||||
|
||||
- **`BindingList<IRegionOfInterest> RegionsOfInterest { get; set; }`**
|
||||
Gets or sets the mutable list of ROI objects currently managed. `BindingList<T>` implies change notifications (e.g., for UI data binding).
|
||||
|
||||
- **`string[] AllChannelSSNs { get; }`**
|
||||
Read-only array of serial numbers (SSNs) for *all* channels known to the view model (e.g., from hardware or test setup). Used for validation or lookup.
|
||||
|
||||
- **`void SetGroups(ITestSetup testSetup, Dictionary<string, IDASHardware> serialNumberToHardware, IsoViewMode viewMode)`**
|
||||
Initializes or updates the ROI list based on a given test setup, hardware lookup (by serial number), and view mode. Replaces or populates `RegionsOfInterest`.
|
||||
|
||||
- **`void SetTest(string path, IsoViewMode viewMode)`**
|
||||
Loads ROI data from a test definition at `path`, applying the specified `IsoViewMode`. Likely used for loading saved or template-based configurations.
|
||||
|
||||
- **`void Filter(object tag, string term)`**
|
||||
Filters ROIs (and possibly their channels) using a search `term`, with optional `tag` for context-specific filtering (e.g., by group or hardware type).
|
||||
|
||||
- **`void Filter(string term)`**
|
||||
Overload of `Filter` that filters all channels/ROIs by `term` without additional context.
|
||||
|
||||
- **`void Sort(object o, bool columnClick)`**
|
||||
Sorts the `RegionsOfInterest` list. `o` likely identifies the sort key (e.g., column header or property name); `columnClick` may indicate user-initiated sorting.
|
||||
|
||||
- **`void SelectAll(int roiIndex, bool selection)`**
|
||||
Sets the selection state (`true` = selected, `false` = deselected) for *all channels* within the ROI at `roiIndex`.
|
||||
|
||||
- **`bool Validate(ref List<string> errors)`**
|
||||
Validates the current ROI configuration (e.g., channel assignments, hardware compatibility). Returns `false` if errors exist; populates `errors` with human-readable messages.
|
||||
|
||||
- **`IsoViewMode ISOViewMode { get; set; }`**
|
||||
Gets or sets the current view mode (e.g., `IsoViewMode.Standard`, `IsoViewMode.Comparison`), influencing how ROIs/channels are displayed or interpreted.
|
||||
|
||||
---
|
||||
|
||||
### 3. **Invariants**
|
||||
|
||||
- `RegionsOfInterest` must be a `BindingList<IRegionOfInterest>`—not a plain `List<T>`—to support UI change notifications.
|
||||
- `AllChannelSSNs` must contain *all* channel serial numbers relevant to the current context (e.g., those in `testSetup` or loaded hardware), and must not include duplicates.
|
||||
- `Validate(ref List<string> errors)` must return `false` if any ROI or channel assignment is invalid (e.g., missing hardware, duplicate SSNs, out-of-range indices), and must populate `errors` with actionable details.
|
||||
- `Filter` and `Sort` operations must not mutate the *underlying* ROI data—only the *view* or *displayed* list (implied by `BindingList` usage and typical MVVM patterns).
|
||||
- `SetGroups` and `SetTest` must fully reinitialize `RegionsOfInterest` and related state (e.g., `AllChannelSSNs`, `ISOViewMode`) to reflect the new context.
|
||||
|
||||
---
|
||||
|
||||
### 4. **Dependencies**
|
||||
|
||||
#### **Imports/Usings (Explicit Dependencies)**
|
||||
- `DTS.Common.Base` → Base interfaces (`IBaseViewModel`, `IBaseView`).
|
||||
- `System.Collections.Generic`, `System.Collections.ObjectModel`, `System.ComponentModel` → Core .NET collections and data binding (`BindingList<T>`, `ObservableCollection<T>` implied via `IBaseViewModel`).
|
||||
- `DTS.Common.Interface.DataRecorders` → `IDASHardware`.
|
||||
- `DTS.Common.Interface.Groups`, `DTS.Common.Interface.GroupTemplate` → `ITestObject`, `ITestObjectTemplate` (commented-out signature suggests legacy use).
|
||||
- `DTS.Common.Interface.TestSetups.TestSetupsList` → `ITestSetup`.
|
||||
- `DTS.Common.Enums` → `IsoViewMode`.
|
||||
|
||||
#### **Inferred Dependencies**
|
||||
- **Consumers**: Any UI layer or parent view model requiring ROI channel management (e.g., test configuration dialog, ROI editor).
|
||||
- **Dependencies**:
|
||||
- `IRegionOfInterest` (type of items in `RegionsOfInterest`)
|
||||
- `ITestSetup` (for `SetGroups`/`SetTest`)
|
||||
- `IDASHardware` (via `serialNumberToHardware` dictionary)
|
||||
- `IsoViewMode` enum (controls behavior of filtering/sorting/validation)
|
||||
|
||||
#### **Notable Omission**
|
||||
- The commented-out `SetGroups` signature suggests a prior design using `ITestObject[]` and `ITestObjectTemplate[]`; current implementation uses `ITestSetup` instead. This may indicate legacy compatibility concerns.
|
||||
|
||||
---
|
||||
|
||||
### 5. **Gotchas**
|
||||
|
||||
- **`SetGroups` vs. `SetTest` ambiguity**: The distinction between `SetGroups` (hardware/test setup-driven) and `SetTest` (path-driven) is not clarified in the source. It is unclear whether `SetTest` internally calls `SetGroups` or loads data from disk (e.g., JSON/XML).
|
||||
- **`Filter(object tag, string term)`**: The purpose of `tag` is undocumented. It may be used for multi-filter scenarios (e.g., filtering by group *and* term), but without implementation or usage context, its contract is ambiguous.
|
||||
- **`SelectAll(int roiIndex, bool selection)`**: No bounds checking is declared. Passing an out-of-range `roiIndex` may cause runtime exceptions.
|
||||
- **`AllChannelSSNs` scope**: It is unclear whether this includes *only* channels in the current test setup or *all* channels in the system. This affects validation logic (e.g., rejecting SSNs not in `AllChannelSSNs`).
|
||||
- **No thread-safety guarantees**: `BindingList<T>` is not thread-safe; concurrent modifications (e.g., from background workers) may corrupt state.
|
||||
- **`IsoViewMode` usage**: The enum `IsoViewMode` is used in multiple methods, but its possible values and their behavioral impact are not defined here (must be checked in `DTS.Common.Enums`).
|
||||
|
||||
*None identified from source alone.*
|
||||
@@ -0,0 +1,80 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.CommonCore/Interface/Reports/PedestrianAndHead/ITRLReportInputView.cs
|
||||
- Common/DTS.CommonCore/Interface/Reports/PedestrianAndHead/ITRLReportOutputView.cs
|
||||
- Common/DTS.CommonCore/Interface/Reports/PedestrianAndHead/IHeadReportInputView.cs
|
||||
- Common/DTS.CommonCore/Interface/Reports/PedestrianAndHead/IHeadReportOutputView.cs
|
||||
- Common/DTS.CommonCore/Interface/Reports/PedestrianAndHead/ITRLReportViewModel.cs
|
||||
- Common/DTS.CommonCore/Interface/Reports/PedestrianAndHead/IHeadReportViewModel.cs
|
||||
generated_at: "2026-04-16T02:38:08.522173+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "263ef567c8d12f8f"
|
||||
---
|
||||
|
||||
# PedestrianAndHead
|
||||
|
||||
## Documentation Page: Pedestrian and Head Report View/ViewModel Interfaces
|
||||
|
||||
---
|
||||
|
||||
### 1. **Purpose**
|
||||
|
||||
This module defines the core interface contracts for the *Pedestrian and Head Report* subsystem within the DTS reporting framework. It establishes a standardized separation between input and output concerns for two distinct report types—**TRL (Traffic Report Line)** and **Head (likely Headway or Headcount)**—by declaring paired `InputView`/`OutputView` and `ViewModel` interfaces. These interfaces follow the MVVM (Model-View-ViewModel) pattern, enabling decoupled UI composition and testability. The module itself contains no implementation logic; it serves as a contract layer to ensure consistent structure across implementations of these report types.
|
||||
|
||||
---
|
||||
|
||||
### 2. **Public Interface**
|
||||
|
||||
All interfaces are defined in the `DTS.Common.Interface` namespace and inherit from `IBaseView` or `IBaseViewModel` (from `DTS.Common.Base`).
|
||||
|
||||
#### Interfaces
|
||||
|
||||
| Interface | Type | Properties | Behavior |
|
||||
|-----------|------|------------|----------|
|
||||
| `ITRLReportInputView` | Interface | — | Marker interface for the *input view* of a TRL report. No additional API beyond `IBaseView`. |
|
||||
| `ITRLReportOutputView` | Interface | — | Marker interface for the *output view* of a TRL report. No additional API beyond `IBaseView`. |
|
||||
| `IHeadReportInputView` | Interface | — | Marker interface for the *input view* of a Head report. No additional API beyond `IBaseView`. |
|
||||
| `IHeadReportOutputView` | Interface | — | Marker interface for the *output view* of a Head report. No additional API beyond `IBaseView`. |
|
||||
| `ITRLReportViewModel` | Interface | `ITRLReportInputView InputView { get; set; }`<br>`ITRLReportOutputView OutputView { get; set; }` | ViewModel for TRL reports. Manages references to its input and output views. Inherits from `IBaseViewModel`. |
|
||||
| `IHeadReportViewModel` | Interface | `IHeadReportInputView InputView { get; set; }`<br>`IHeadReportOutputView OutputView { get; set; }` | ViewModel for Head reports. Manages references to its input and output views. Inherits from `IBaseViewModel`. |
|
||||
|
||||
> **Note**: No method signatures are declared in any of these interfaces. Behavior (e.g., data loading, report generation) is expected to be implemented in concrete types and/or via `IBaseView`/`IBaseViewModel` contracts (not shown here).
|
||||
|
||||
---
|
||||
|
||||
### 3. **Invariants**
|
||||
|
||||
- All view interfaces (`ITRLReportInputView`, `ITRLReportOutputView`, `IHeadReportInputView`, `IHeadReportOutputView`) **must** inherit from `IBaseView`.
|
||||
- All viewmodel interfaces (`ITRLReportViewModel`, `IHeadReportViewModel`) **must** inherit from `IBaseViewModel`.
|
||||
- For any `ITRLReportViewModel` instance:
|
||||
- `InputView` **must** be assignable to `ITRLReportInputView`.
|
||||
- `OutputView` **must** be assignable to `ITRLReportOutputView`.
|
||||
- For any `IHeadReportViewModel` instance:
|
||||
- `InputView` **must** be assignable to `IHeadReportInputView`.
|
||||
- `OutputView` **must** be assignable to `IHeadReportOutputView`.
|
||||
- View and viewmodel pairs are strictly scoped: TRL views only bind to `ITRLReportViewModel`, and Head views only bind to `IHeadReportViewModel`.
|
||||
|
||||
---
|
||||
|
||||
### 4. **Dependencies**
|
||||
|
||||
#### Dependencies *of this module*:
|
||||
- `DTS.Common.Base` (specifically, `IBaseView` and `IBaseViewModel` interfaces).
|
||||
- No other modules or libraries are imported.
|
||||
|
||||
#### Dependencies *on this module* (inferred):
|
||||
- Any concrete implementation of `ITRLReportViewModel` or `IHeadReportViewModel` must depend on this module to satisfy the interface contracts.
|
||||
- UI layers or DI containers that instantiate or inject viewmodels (e.g., `ITRLReportViewModel`) will depend on this module.
|
||||
- Modules responsible for constructing or wiring report views (e.g., a report factory or view loader) will depend on these interfaces to decouple from concrete implementations.
|
||||
|
||||
---
|
||||
|
||||
### 5. **Gotchas**
|
||||
|
||||
- **No behavior defined**: These interfaces are *purely structural*—they define *what* views/viewmodels exist, not *how* they behave. Developers must inspect `IBaseView`/`IBaseViewModel` and concrete implementations to understand runtime behavior.
|
||||
- **Ambiguous report semantics**: The meaning of "TRL" and "Head" reports is not documented here. "Head" could refer to headway, headcount, or another domain-specific concept; this must be clarified elsewhere (e.g., in domain documentation or naming conventions).
|
||||
- **No validation or lifecycle hooks**: Since no methods or events are declared, state transitions, validation, or error handling must be handled via `IBaseView`/`IBaseViewModel` or in concrete types—this may lead to inconsistency if not enforced by convention.
|
||||
- **Potential for misuse**: Without explicit constraints, a consumer could assign an `IHeadReportInputView` to an `ITRLReportViewModel.InputView` property at compile time (since both are `IBaseView`), risking runtime errors. Enforcing type safety requires discipline or additional tooling.
|
||||
|
||||
> **None identified from source alone** beyond the above structural caveats.
|
||||
@@ -0,0 +1,44 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.CommonCore/Interface/RunTest/IRunTestView.cs
|
||||
- Common/DTS.CommonCore/Interface/RunTest/IRunTestViewModel.cs
|
||||
generated_at: "2026-04-16T02:27:22.843711+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "e490e1c23959cb19"
|
||||
---
|
||||
|
||||
# RunTest
|
||||
|
||||
## 1. Purpose
|
||||
This module defines the core view and view model interfaces for the *Run Test* feature within the DTS (presumably *Device Test System*) architecture. It serves as a contract layer in a MVVM (Model-View-ViewModel) pattern, enabling separation of UI concerns (`IRunTestView`) from business/logic concerns (`IRunTestViewModel`). These interfaces extend base abstractions (`IBaseView`, `IBaseViewModel`) to ensure consistency across the application’s UI components, but do not themselves introduce additional functionality—suggesting this feature’s behavior is either minimal, delegated elsewhere, or intended for future extension.
|
||||
|
||||
## 2. Public Interface
|
||||
No public members are declared directly in these interfaces. Both interfaces are *empty* (marker interfaces) and inherit solely from base interfaces:
|
||||
|
||||
- **`IRunTestView`**
|
||||
*Signature:* `public interface IRunTestView : IBaseView`
|
||||
*Behavior:* Serves as the contract for the *Run Test* view (e.g., a UI page or control). Its behavior is entirely defined by `IBaseView` (not shown here), which likely enforces standard view lifecycle or binding contracts.
|
||||
|
||||
- **`IRunTestViewModel`**
|
||||
*Signature:* `public interface IRunTestViewModel : IBaseViewModel`
|
||||
*Behavior:* Serves as the contract for the *Run Test* view model (e.g., the logic layer backing the view). Its behavior is entirely defined by `IBaseViewModel` (not shown here), which likely enforces standard view model contracts (e.g., property change notification, command exposure).
|
||||
|
||||
## 3. Invariants
|
||||
- `IRunTestView` must be implemented by a class that satisfies all invariants of `IBaseView` (e.g., likely implements `INotifyPropertyChanged` or similar, though not explicit here).
|
||||
- `IRunTestViewModel` must be implemented by a class that satisfies all invariants of `IBaseViewModel`.
|
||||
- Neither interface introduces additional constraints beyond their base interfaces.
|
||||
- No runtime validation or state guarantees are defined in this module alone.
|
||||
|
||||
## 4. Dependencies
|
||||
- **Depends on:**
|
||||
- `DTS.Common.Base` namespace (specifically `IBaseView` and `IBaseViewModel`, though their definitions are external to this file).
|
||||
- **Depended on by:**
|
||||
- Concretely, implementations of `IRunTestView` and `IRunTestViewModel` (e.g., `RunTestView.xaml.cs`, `RunTestViewModel.cs`) are implied but not visible here.
|
||||
- Likely used by DI containers, navigation systems, or view/view model factories within the DTS UI framework to resolve and wire up the *Run Test* feature.
|
||||
|
||||
## 5. Gotchas
|
||||
- **Empty interfaces:** These interfaces carry no functional semantics beyond type identity. Developers may mistakenly expect them to define behavior—actual functionality resides in their base interfaces or concrete implementations.
|
||||
- **No feature-specific API surface:** The absence of methods/properties suggests either (a) the *Run Test* feature is trivial (e.g., a static view), (b) behavior is injected via other mechanisms (e.g., attributes, conventions), or (c) this is a placeholder for future work.
|
||||
- **Reliance on base interfaces:** Behavior and contracts are entirely inherited from `IBaseView`/`IBaseViewModel`. Without access to those definitions, the full contract for `IRunTestView` and `IRunTestViewModel` is incomplete.
|
||||
- **Namespace ambiguity:** Both interfaces reside in `DTS.Common.Interface`, but the `Interface` folder name may be misleading—it likely represents *view/view model contracts*, not general-purpose interfaces.
|
||||
@@ -0,0 +1,48 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.CommonCore/Interface/SensorDatabase/ISensorDatabaseView.cs
|
||||
- Common/DTS.CommonCore/Interface/SensorDatabase/ISensorDatabaseViewModel.cs
|
||||
generated_at: "2026-04-16T02:28:08.664992+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "9059966d6baab89c"
|
||||
---
|
||||
|
||||
# SensorDatabase
|
||||
|
||||
## 1. Purpose
|
||||
This module defines the foundational view and view-model interfaces for the sensor database feature within the DTS (Data Tracking System) architecture. It establishes the contract for UI-layer components that interact with sensor data, leveraging the existing `IBaseView` and `IBaseViewModel` base interfaces to maintain consistency with the system’s MVVM (Model-View-ViewModel) pattern. The interfaces themselves are intentionally minimal—serving as marker interfaces—indicating that sensor database UI components inherit standard view/view-model behavior without additional feature-specific API surface at this level.
|
||||
|
||||
## 2. Public Interface
|
||||
No public methods, properties, or events are declared in these interfaces beyond those inherited from their base interfaces (`IBaseView` and `IBaseViewModel`). The interfaces are:
|
||||
|
||||
- **`ISensorDatabaseView`**
|
||||
*Signature:* `public interface ISensorDatabaseView : IBaseView`
|
||||
*Behavior:* Serves as a contract for the *view* (e.g., XAML page, control, or UI component) responsible for presenting sensor database content. Inherits all members of `IBaseView` (e.g., `DataContext`, lifecycle hooks, etc.), though their exact signatures are defined in the base interface (not shown here).
|
||||
|
||||
- **`ISensorDatabaseViewModel`**
|
||||
*Signature:* `public interface ISensorDatabaseViewModel : IBaseViewModel`
|
||||
*Behavior:* Serves as a contract for the *view-model* that manages state and logic for the sensor database UI. Inherits all members of `IBaseViewModel` (e.g., `Initialize`, `LoadDataAsync`, `Dispose`, etc.), though their exact signatures are defined in the base interface (not shown here).
|
||||
|
||||
> **Note:** Since both interfaces are empty beyond inheritance, no additional behavior is specified at this level. Concrete implementations (e.g., `SensorDatabaseView`, `SensorDatabaseViewModel`) must define actual functionality.
|
||||
|
||||
## 3. Invariants
|
||||
- `ISensorDatabaseView` must be implemented by a type that also satisfies `IBaseView` (e.g., supports binding to an `ISensorDatabaseViewModel` via `DataContext`).
|
||||
- `ISensorDatabaseViewModel` must be implemented by a type that also satisfies `IBaseViewModel` (e.g., supports initialization, data loading, and cleanup).
|
||||
- The pair (`ISensorDatabaseView`, `ISensorDatabaseViewModel`) is intended to be used together in an MVVM binding context, where the view’s `DataContext` is an instance of `ISensorDatabaseViewModel`.
|
||||
|
||||
## 4. Dependencies
|
||||
- **Depends on:**
|
||||
- `DTS.Common.Base.IBaseView`
|
||||
- `DTS.Common.Base.IBaseViewModel`
|
||||
*(Exact definitions of these base interfaces are in `DTS.Common.Base`, not provided here.)*
|
||||
- **Used by:**
|
||||
- UI-layer modules (e.g., WPF/MAUI/Xamarin projects) that implement sensor database screens.
|
||||
- Dependency injection containers or view-resolution logic that resolves `ISensorDatabaseView`/`ISensorDatabaseViewModel` for navigation or composition.
|
||||
- **Notable absence:** No direct dependencies on data-access or domain-layer types (e.g., no `ISensorRepository`, `SensorEntity`)—suggesting separation of concerns.
|
||||
|
||||
## 5. Gotchas
|
||||
- **Empty interfaces may indicate incomplete design:** The interfaces currently serve only as markers. Developers should verify whether `IBaseView`/`IBaseViewModel` provide sufficient functionality or if sensor-specific behavior (e.g., `RefreshAsync()`, `SelectedSensorId`) was intended here but deferred.
|
||||
- **Ambiguity in scope:** The term "sensor database" is not further qualified (e.g., is it a local cache, a remote API, or a historical log?). Without additional context, consumers must infer semantics from concrete implementations.
|
||||
- **No versioning or extensibility hooks:** The interfaces lack attributes (e.g., `[Obsolete]`, `[EditorBrowsable]`) or generic parameters, making future extension (e.g., adding `ISensorDatabaseView<T>`) potentially breaking.
|
||||
- **None identified from source alone.**
|
||||
@@ -0,0 +1,46 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.CommonCore/Interface/SensorTemplates/ISensorTemplatesView.cs
|
||||
- Common/DTS.CommonCore/Interface/SensorTemplates/ISensorTemplatesViewModel.cs
|
||||
generated_at: "2026-04-16T02:24:56.206391+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "d4eff855657fe005"
|
||||
---
|
||||
|
||||
# SensorTemplates
|
||||
|
||||
## 1. Purpose
|
||||
This module defines the view and view model interfaces for the *Sensor Templates* feature within the DTS (likely *Data Tracking System*) UI layer. It serves as a contract for implementing the presentation layer of sensor template management functionality—enabling UI components to bind to a view model that exposes sensor template data and operations. As part of the `DTS.Common.Interface` namespace, it enforces separation of concerns by decoupling UI logic (view) from business/data logic (view model), following a standard MVVM (Model-View-ViewModel) pattern. The interfaces themselves are empty markers, indicating minimal or deferred implementation of domain-specific behavior.
|
||||
|
||||
## 2. Public Interface
|
||||
No public methods, properties, or events are defined in either interface. Both interfaces are *marker interfaces* extending base abstractions:
|
||||
|
||||
- **`ISensorTemplatesView`**
|
||||
- *Signature:* `public interface ISensorTemplatesView : IBaseView`
|
||||
- *Behavior:* Serves as a contract for a UI view (e.g., a XAML page or control) responsible for rendering sensor templates. Its behavior is entirely inherited from `IBaseView`, which is assumed (from namespace context) to provide foundational view lifecycle or navigation support, though its members are not visible in this source.
|
||||
|
||||
- **`ISensorTemplatesViewModel`**
|
||||
- *Signature:* `public interface ISensorTemplatesViewModel : IBaseViewModel`
|
||||
- *Behavior:* Serves as a contract for a view model managing state and commands for sensor templates. Its behavior is inherited from `IBaseViewModel`, which is assumed (from namespace context) to provide base functionality such as property change notification (`INotifyPropertyChanged`) or command handling, though its members are not visible in this source.
|
||||
|
||||
## 3. Invariants
|
||||
- Both interfaces must be implemented by types that satisfy the contracts of their respective base interfaces (`IBaseView` and `IBaseViewModel`).
|
||||
- No additional validation rules, state constraints, or ordering guarantees are specified in this source.
|
||||
- Since the interfaces are empty, the only invariant is *interface compliance*—implementations must not violate the semantics of `IBaseView`/`IBaseViewModel`.
|
||||
|
||||
## 4. Dependencies
|
||||
- **Dependencies *of* this module:**
|
||||
- `DTS.Common.Base` (specifically, `IBaseView` and `IBaseViewModel` types).
|
||||
- **Dependencies *on* this module:**
|
||||
- UI components (e.g., views in `DTS.UI.*` or similar projects) that require binding to sensor template functionality.
|
||||
- View model implementations (e.g., `SensorTemplatesViewModel` in a `DTS.UI.ViewModels` project) that must implement `ISensorTemplatesViewModel`.
|
||||
- Dependency injection or composition frameworks may register these interfaces for runtime resolution.
|
||||
|
||||
*Note:* No other modules or types are referenced directly in the provided sources.
|
||||
|
||||
## 5. Gotchas
|
||||
- **Empty interfaces**: The interfaces contain no members, suggesting they are placeholders for future expansion or rely entirely on inherited base functionality. Developers may mistakenly assume domain-specific APIs exist here when none are defined.
|
||||
- **Ambiguity in base interfaces**: Behavior is entirely dependent on `IBaseView` and `IBaseViewModel`, whose definitions are not provided. Misunderstanding their contract (e.g., missing required lifecycle methods) could lead to runtime issues.
|
||||
- **No naming collision risk**: The `SensorTemplates` naming is specific, but if other template types (e.g., `DeviceTemplates`, `AlertTemplates`) follow the same pattern, confusion may arise without explicit documentation of their distinctions.
|
||||
- **None identified from source alone.**
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,117 @@
|
||||
---
|
||||
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-16T02:30:05.623483+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "1a993886a7ce02c0"
|
||||
---
|
||||
|
||||
# SensorSettingsModule
|
||||
|
||||
## Documentation: Sensor Settings Module Interfaces
|
||||
|
||||
---
|
||||
|
||||
### 1. **Purpose**
|
||||
|
||||
This module defines the core interfaces for managing sensor-related configuration settings in the DTS system. It provides a structured abstraction for UI (view), state management (view model), and calibration policy enforcement, enabling consistent handling of sensor defaults (e.g., squib, digital I/O, IEPE, analog), calibration behavior, and persistence. Its role is to decouple presentation logic from data storage while enforcing validation and configuration integrity across the sensor subsystem.
|
||||
|
||||
---
|
||||
|
||||
### 2. **Public Interface**
|
||||
|
||||
#### `ISensorSettingsView`
|
||||
- **Inherits**: `IBaseView`
|
||||
- **Description**: A marker interface representing the view layer for the sensor settings UI. No additional members beyond base view contract.
|
||||
|
||||
#### `ICalibrationPolicy`
|
||||
- **Description**: Defines the contract for managing sensor calibration policy settings.
|
||||
- **Properties**:
|
||||
- `SensorConstants.SensorCalPolicy SelectedCalPolicy { get; set; }`
|
||||
Gets or sets the currently selected calibration policy.
|
||||
- `SensorConstants.SensorCalPolicy[] AvailableSensorCalPolicies { get; }`
|
||||
Gets an array of all supported calibration policies.
|
||||
- `int WarningPeriod { get; set; }`
|
||||
Gets or sets the number of days before a calibration is due when a warning should be issued.
|
||||
- `bool UseSensorFirstUseDate { get; set; }`
|
||||
Gets or sets whether the calibration interval should be calculated from the sensor’s *first use date* (`true`) or *last calibration date* (`false`).
|
||||
- **Methods**:
|
||||
- `void ReadXML(System.Xml.XmlElement root)`
|
||||
Loads calibration policy settings from the provided XML element.
|
||||
- `void WriteXML(ref System.Xml.XmlWriter writer)`
|
||||
Serializes calibration policy settings to XML using the provided writer.
|
||||
|
||||
#### `ISensorSettingsViewModel`
|
||||
- **Inherits**: `IBaseViewModel`
|
||||
- **Description**: Manages the state and logic for sensor settings UI, including defaults for multiple sensor types and calibration policy.
|
||||
- **Properties**:
|
||||
- `string User { get; set; }`
|
||||
User identifier used when persisting/retrieving settings from the database.
|
||||
- `int UserID { get; set; }`
|
||||
Numeric user ID used when persisting/retrieving settings from the database.
|
||||
- `ISensorSettingsView View { get; set; }`
|
||||
Reference to the associated view instance.
|
||||
- `ISquibSettingDefaults SquibSettings { get; set; }`
|
||||
Default settings for squib (explosive device) configurations.
|
||||
- `IDigitalOutDefaults DigitalOutSettings { get; set; }`
|
||||
Default settings for digital output channels.
|
||||
- `IDigitalInputDefaults DigitalInputDefaults { get; set; }`
|
||||
Default settings for digital input channels.
|
||||
- `IIEPESensorDefaults IEPESensorDefaults { get; set; }`
|
||||
Default settings for IEPE (Integrated Electronics Piezo-Electric) sensors.
|
||||
- `ICalibrationPolicy SensorCalibrationDefaults { get; set; }`
|
||||
Calibration policy defaults and behavior.
|
||||
- `IAnalogDefaults AnalogDefaults { get; set; }`
|
||||
Default settings for analog channels (FB13120 reference).
|
||||
- **Methods**:
|
||||
- `void RestoreOriginalSettings()`
|
||||
Resets all settings to their original (factory or initial) values.
|
||||
- `void Unset()`
|
||||
Uninitializes the display and frees associated resources.
|
||||
- `void OnSetActive()`
|
||||
Initializes or activates the display (e.g., when the settings page becomes active).
|
||||
- `bool ValidateAndSave()`
|
||||
Validates current settings; returns `true` and saves if valid, returns `false` and does *not* save if invalid.
|
||||
|
||||
---
|
||||
|
||||
### 3. **Invariants**
|
||||
|
||||
- `ISensorSettingsViewModel` must maintain a non-null `View` reference when `OnSetActive()` or `ValidateAndSave()` are called (implied by `View` being settable and used in UI lifecycle).
|
||||
- `ICalibrationPolicy.SelectedCalPolicy` must be one of the values in `AvailableSensorCalPolicies` at all times (enforced by setter semantics).
|
||||
- `ICalibrationPolicy.WarningPeriod` must be ≥ 0 (implied by "period in days before calibration is due to warn").
|
||||
- `ICalibrationPolicy.UseSensorFirstUseDate` determines the reference point for calibration interval calculation; its value must be consistent with the selected policy’s semantics.
|
||||
- `ISensorSettingsViewModel.ValidateAndSave()` must *not* persist settings if validation fails.
|
||||
- `ISensorSettingsViewModel.User` and `ISensorSettingsViewModel.UserID` must be set before calling persistence-related methods (e.g., `ValidateAndSave`, `ReadXML`, `WriteXML`), as they are explicitly documented as being used for DB persistence.
|
||||
|
||||
---
|
||||
|
||||
### 4. **Dependencies**
|
||||
|
||||
- **Depends on**:
|
||||
- `DTS.Common.Base` (for `IBaseView`, `IBaseViewModel`)
|
||||
- `DTS.Common.Enums.Sensors` (for `SensorConstants.SensorCalPolicy`)
|
||||
- `System.Xml` (for `XmlElement`, `XmlWriter` in `ICalibrationPolicy`)
|
||||
- Other interfaces in this module (`ISquibSettingDefaults`, `IDigitalOutDefaults`, etc.) — *not defined in this file set*, but referenced.
|
||||
|
||||
- **Depended on by**:
|
||||
- UI components implementing `ISensorSettingsView`.
|
||||
- View model implementations (e.g., concrete classes implementing `ISensorSettingsViewModel`).
|
||||
- Persistence layers (via `ReadXML`/`WriteXML` in `ICalibrationPolicy`).
|
||||
- Other modules that configure or consume sensor defaults (e.g., sensor initialization, test sequencing).
|
||||
|
||||
---
|
||||
|
||||
### 5. **Gotchas**
|
||||
|
||||
- **Ambiguous persistence scope**: While `User`/`UserID` are documented as used for DB persistence, the `ISensorSettingsViewModel` interface itself does *not* expose explicit save/load methods — persistence is implied to occur via `ValidateAndSave()` and XML methods in `ICalibrationPolicy`. The exact mechanism (e.g., when defaults are loaded) is not specified here.
|
||||
- **Missing XML context**: `ICalibrationPolicy.ReadXML`/`WriteXML` lack details on expected XML structure or namespace. Implementation details are hidden.
|
||||
- **`UseSensorFirstUseDate` semantics**: The behavior of "first use date" vs. "last calibration date" is not defined — e.g., what happens if a sensor has never been used? No fallback policy is specified.
|
||||
- **No error handling in XML methods**: `ReadXML`/`WriteXML` do not declare exceptions or error states — callers must infer failure modes (e.g., malformed XML).
|
||||
- **`ValidateAndSave()` behavior**: The method name suggests validation *and* saving, but the documentation only clarifies behavior on success/failure — it does not specify *what* validation rules apply or *where* defaults are persisted (DB vs. config file).
|
||||
- **No thread-safety guarantees**: None of the interfaces indicate thread-safety; concurrent access may require external synchronization.
|
||||
|
||||
> *None of the above are explicitly stated in the source; inferred from naming, documentation, and typical usage patterns.*
|
||||
@@ -0,0 +1,125 @@
|
||||
---
|
||||
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-16T02:30:32.654902+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "843b21a9981849bf"
|
||||
---
|
||||
|
||||
# Sensors List Module Documentation
|
||||
|
||||
## 1. Purpose
|
||||
This module defines the core interfaces for the *Sensors List* UI layer, which provides a standardized way to display, filter, sort, and manage various types of sensor and sensor-like settings (analog sensors, squibs, digital inputs/outputs, UART I/O, stream inputs/outputs) in the DTS system. It serves as the contract between the UI (views) and the presentation logic (view models), enabling consistent interaction patterns across different sensor list contexts such as main sensor lists, edit group configuration, overdue sensors, and template import/export operations. The interfaces abstract implementation details of data sources and UI rendering while enforcing shared behavior for filtering, sorting, inclusion state, and drag-and-drop payloads.
|
||||
|
||||
## 2. Public Interface
|
||||
|
||||
### Interfaces (View Models)
|
||||
- **`ISensorsListViewModel`**
|
||||
Primary view model for the main sensor list view. Manages collections of `IAnalogSensor`, `ISquib`, `IDigitalInputSetting`, `IDigitalOutputSetting`, `IUartIOSetting`, and `IStreamOutputSetting`. Supports filtering, sorting (including overdue-specific sorting), inclusion toggling, and drag-and-drop of included items. Provides methods to retrieve sensors with calibration warning periods and to set cached sensor/calibration data.
|
||||
- `void GetSensors(int sensorCalWarningPeriodDays, bool included)`
|
||||
- `void GetSensors(int sensorCalWarningPeriodDays, int[] sensorsAllowed, IReadOnlyDictionary<int, ISensorData> sensors)`
|
||||
- `IDragAndDropItem[] GetIncludedSensors()`
|
||||
- `void UseIncludedColumn(bool bUsesIncludedColumn)`
|
||||
- `void SetIncludedAll(bool bIncluded)`
|
||||
- `bool ShowOnlyTDCSensors { set; }`
|
||||
- `bool ShowOnlySlicewareSensors { set; }`
|
||||
|
||||
- **`ISensorsListEditGroupViewModel`**
|
||||
View model for the *Edit Group* configuration context. Extends `IFilterableListView` and manages heterogeneous sensor collections (analog, squib, digital, UART, stream). Supports tab-specific filtering, assignment/online status toggling, and setting active tab.
|
||||
- `ISensorsListEditGroupView View { get; set; }`
|
||||
- `IAnalogSensor[] AnalogSensors { get; set; }`, `ISquib[] Squibs { get; set; }`, etc.
|
||||
- `void GetSensors(int sensorCalWarningPeriodDays, bool included)`
|
||||
- `void FilterSquib(object columnTag, string searchTerm)`, `FilterDigitalIn(...)`, `FilterDigitalOut(...)`, `FilterUartIO(...)`, `FilterStreamOut(...)`, `FilterStreamIn(...)`
|
||||
- `void SetShowAssigned(bool showAssigned, bool showUnassigned, IReadOnlyDictionary<string, bool> assignedSensors)`
|
||||
- `void SetAssignedSensors(IReadOnlyDictionary<string, bool> serialNumbers)`
|
||||
- `bool IsSensorOnline(string serialNumber)`
|
||||
- `void SetActiveTab(PossibleFilters filter)`
|
||||
|
||||
- **`ISensorTemplatesViewModel`**
|
||||
Marker interface for template-related view models (no additional members beyond `IBaseViewModel`).
|
||||
|
||||
### Interfaces (Views)
|
||||
- **`ISensorsListView`**
|
||||
View for the main sensor list. Handles column configuration based on calibration behavior and inclusion column visibility.
|
||||
- `void HandleColumns(CalibrationBehaviors calibrationBehavior)`
|
||||
- `void SetIncludedVisible(bool bUsesIncludeColumn)`
|
||||
|
||||
- **`ISensorsListEditGroupView`**
|
||||
View for the *Edit Group* configuration. Handles column configuration before display.
|
||||
- `void HandleColumns()` *(Note: Comment references "13065 Sensor 'First Use' Date")*
|
||||
|
||||
- **`ISensorsListOverdueView`**, **`ISensorTemplatesExportView`**, **`ISensorsTemplatesImportView`**
|
||||
Marker interfaces extending `IBaseView`. No additional methods; likely used for view registration or routing.
|
||||
|
||||
### Interfaces (Sensor/Setting Models)
|
||||
All sensor and setting interfaces share common properties and behaviors:
|
||||
- **`ISquib`**, **`IDigitalInputSetting`**, **`IDigitalOutputSetting`**, **`IUartIOSetting`**, **`IStreamInputSetting`**, **`IStreamOutputSetting`**, **`IAnalogSensor`**
|
||||
Common properties:
|
||||
- `int DatabaseId`, `bool Included`, `string SerialNumber`, `string Description`
|
||||
- `string LastModifiedBy` / `ModifiedBy`, `DateTime LastModified`
|
||||
- `bool Assigned`, `bool Online`, `bool Broken`, `bool DoNotUse`
|
||||
- `string ISOCode`, `string ISOChannelName`, `string UserCode`, `string UserChannelName`
|
||||
- `bool Filter(string term)`
|
||||
|
||||
Specific properties (selected examples):
|
||||
- `ISquib`: `double ResistanceLow`, `double ResistanceHigh`, `string SQMode`, `double SQDelay`, `SquibFireMode Mode`
|
||||
- `IDigitalInputSetting`: `string DIMode`, `string EID`, `string ActiveValue`, `string DefaultValue`, `DigitalInputModes Mode`
|
||||
- `IDigitalOutputSetting`: `double DODelay`, `double DODuration`, `bool LimitDuration`, `Enums.DigitalOutputModes DOMode`
|
||||
- `IUartIOSetting`: `uint BaudRate`, `uint DataBits`, `StopBits StopBits`, `Parity Parity`, `Handshake FlowControl` *(always `NONE`)*, `UartDataFormat DataFormat`
|
||||
- `IStreamOutputSetting`: `UDPStreamProfile UDPProfile`, `string UDPAddress`, `ushort UDPTimeChannelId`, `bool IsCH10`, `bool IsTMNS`, `bool IsIENA`, `bool IsUART`, `uint TMNS_SubFrameId`, `ushort IENA_Key`, etc.
|
||||
- `IAnalogSensor`: `SensorConstants.BridgeType Bridge`, `bool IEPE`, `double Capacity`, `string Sensitivity`, `DateTime CalDate`, `DateTime CalDueDate`, `Enums.Sensors.FilterClassType CFC`, `DateTime? FirstUseDate`, `int? LatestCalibrationId`, `bool UsingLatestCalibration`
|
||||
|
||||
### Interfaces (Drag-and-Drop)
|
||||
- **`IDragAndDropItem`**
|
||||
Standard payload for drag-and-drop operations originating from sensor lists.
|
||||
- `string SerialNumber { get; set; }`
|
||||
- `int DatabaseId { get; set; }` *(valid only if >0)*
|
||||
- `string ISOCode { get; }`, `string ISOChannelName { get; }`
|
||||
- `string UserCode { get; }`, `string UserChannelName { get; }`
|
||||
|
||||
## 3. Invariants
|
||||
- **`DatabaseId`**: Must be `> 0` for valid database entries; `0` or negative values indicate unsaved or transient items.
|
||||
- **`Included`**: Controls UI visibility via checkbox; affects inclusion in `GetIncludedSensors()` and drag-and-drop payloads.
|
||||
- **`Broken` / `DoNotUse`**: When `true`, the item must *not* appear in selectable lists for *Edit Test Setup* or *Edit Group* contexts (explicitly stated in `ISquib`, `IStreamInputSetting`, `IDigitalInputSetting`, `IDigitalOutputSetting`).
|
||||
- **`Assigned` / `Online`**: Boolean flags indicating channel association and runtime connectivity status, respectively. Used for filtering and status display.
|
||||
- **Filtering**: All sensor interfaces implement `bool Filter(string term)` to support client-side search.
|
||||
- **ISO/User Channel Names**: For `IAnalogSensor`, these represent *default* values when assigning to a new blank channel.
|
||||
- **`FirstUseDate` / `LatestCalibrationId` / `UsingLatestCalibration`**: Only meaningful when `UsingLatestCalibration` is `true`; otherwise, calibration data may be stale.
|
||||
|
||||
## 4. Dependencies
|
||||
- **Base Interfaces**: All interfaces extend `IBaseView` (for views) or `IBaseViewModel` (for view models).
|
||||
- **Enums**:
|
||||
- `DTS.Common.Enums.Sensors` (e.g., `CalibrationBehaviors`, `PossibleFilters`, `DigitalInputModes`, `DigitalOutputModes`)
|
||||
- `DTS.Common.Enums` (e.g., `SquibFireMode`, `UartDataFormat`, `Parity`, `StopBits`, `Handshake`)
|
||||
- **Pagination**: `IFilterableListView` (from `DTS.Common.Interface.Pagination`) is implemented by view models to support filtering/sorting.
|
||||
- **Collections**: Uses `IReadOnlyDictionary<string, bool>`, `IDictionary<string, bool>`, `IReadOnlyDictionary<int, ISensorData>`, `ISensorData[]`, `ISensorCalibration[]`.
|
||||
- **System**: `System`, `System.Collections.Generic`, `System.IO.Ports` (for `IUartIOSetting`).
|
||||
- **Inferred Consumers**:
|
||||
- View models depend on concrete implementations of `ISensorData`, `ISensorCalibration`, and `IFilterClass`.
|
||||
- Views likely depend on view models for data binding.
|
||||
- Drag-and-drop handlers consume `IDragAndDropItem`.
|
||||
|
||||
## 5. Gotchas
|
||||
- **`FlowControl` in `IUartIOSetting`**: Explicitly documented as *always `NONE`* (FB 30486); do not attempt to set it.
|
||||
- **`Online` for digital outputs**: Comment notes *"there's no real way of finding digital output online"* — this flag may be unreliable or unused.
|
||||
- **`ISOCode`/`UserChannelName` for digital outputs/outputs**: Comments note these are present for consistency but *"not really needed"* since outputs aren’t in collected data.
|
||||
- **`FirstUseDate`**: Nullable `DateTime?`; null indicates unset. Only valid when `UsingLatestCalibration` is `true`.
|
||||
- **Template Views**: `ISensorsTemplatesImportView`/`ISensorTemplatesExportView`/`ISensorTemplatesViewModel` are empty markers — their behavior is inferred from naming but not defined in the source.
|
||||
- **Overdue View**: `ISensorsListOverdueView` is a marker interface; no overdue-specific logic is defined here (likely handled in `ISensorsListViewModel.SortOverdue(...)`).
|
||||
- **No Implementation Details**: Source files contain *only* interface definitions — no implementation, behavior, or data flow details are visible.
|
||||
@@ -0,0 +1,86 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.CommonCore/Interface/Sensors/SoftwareFilters/ISoftwareFiltersView.cs
|
||||
- Common/DTS.CommonCore/Interface/Sensors/SoftwareFilters/ISoftwareFiltersViewModel.cs
|
||||
generated_at: "2026-04-16T02:30:19.442870+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "c132999d4e5c3d51"
|
||||
---
|
||||
|
||||
# SoftwareFilters
|
||||
|
||||
## Documentation: Software Filters Module (View & ViewModel Interfaces)
|
||||
|
||||
---
|
||||
|
||||
### 1. Purpose
|
||||
This module defines the contract interfaces for managing software-based sensor filters within the DTS system. Specifically, it establishes the separation between view-layer representation (`ISoftwareFiltersView`) and the associated view-model logic (`ISoftwareFiltersViewModel`), enabling data binding and UI interaction for filter configuration. The `IFilterClass` interface standardizes metadata and behavior for filter classification types (e.g., low-pass, high-pass), supporting UI display and sorting via `FilterName`, `FClass`, `Frequency`, and a numeric representation. This module serves as the foundational abstraction for filter management UI components, likely consumed by a configuration or diagnostics interface.
|
||||
|
||||
---
|
||||
|
||||
### 2. Public Interface
|
||||
|
||||
#### `ISoftwareFiltersView`
|
||||
- **Inherits**: `IBaseView`
|
||||
- **Purpose**: Marker interface for the view layer of the software filters UI. No additional members defined—intended for dependency injection or view-model binding.
|
||||
|
||||
#### `IFilterClass`
|
||||
- **Inherits**: `IComparable`
|
||||
- **Attributes**: `[TypeConverter(typeof(ExpandableObjectConverter))]`
|
||||
- **Properties**:
|
||||
- `string FilterName { get; }` — Read-only display name of the filter class.
|
||||
- `FilterClassType FClass { get; set; }` — Enumerated type representing the filter class (e.g., `LowPass`, `HighPass`).
|
||||
- `double Frequency { get; set; }` — Center or cutoff frequency in Hz.
|
||||
- **Methods**:
|
||||
- `int GetFilterClassNumericValue()` — Returns a numeric code corresponding to the `FClass` value (e.g., for serialization or legacy compatibility).
|
||||
|
||||
#### `ISoftwareFiltersViewModel`
|
||||
- **Inherits**: `IBaseViewModel`, `IFilterableListView`
|
||||
- **Properties**:
|
||||
- `ISoftwareFiltersView View { get; set; }` — Reference to the associated view instance (likely for view-model-to-view communication).
|
||||
- `ObservableCollection<ISoftwareFilter> SoftwareFilters { get; set; }` — Collection of active software filters.
|
||||
- `string CurrentUser { get; set; }` — Username of the currently logged-in user (likely for audit/logging).
|
||||
- **Methods**:
|
||||
- `void Sort(object sortBy, bool bColumnClick)` — Sorts the `SoftwareFilters` collection based on `sortBy` (e.g., column header) and user interaction (`bColumnClick`).
|
||||
- `void Unset()` — Resets or clears the view model state (e.g., disposes resources, clears selections).
|
||||
- `void Filter(string currentFilter)` — Applies a text-based filter to the `SoftwareFilters` collection (e.g., search term).
|
||||
- `ISoftwareFilter[] GetSoftwareFilters()` — Returns a snapshot of the current `SoftwareFilters` collection as an array.
|
||||
- `void PopulateView()` — Loads or refreshes the view’s data (e.g., populates `SoftwareFilters` from a data source).
|
||||
- `bool ValidateAndSave()` — Validates filter configurations and persists changes; returns `true` on success.
|
||||
|
||||
---
|
||||
|
||||
### 3. Invariants
|
||||
- `ISoftwareFiltersView` must be implemented by a concrete view class (e.g., WPF `UserControl`), but its interface itself is empty—no behavioral invariants beyond being an `IBaseView`.
|
||||
- `IFilterClass` instances must maintain consistency between `FClass` (enum) and the value returned by `GetFilterClassNumericValue()` (e.g., `FClass.LowPass` → `1`).
|
||||
- `Frequency` must be non-negative (`≥ 0.0`) for valid filter configurations (implied by physical constraints of sensor filters, though not explicitly enforced in the interface).
|
||||
- `SoftwareFilters` collection must be thread-safe *for read-only access* during UI operations (e.g., sorting/filtering), though write operations (e.g., `PopulateView`) may require synchronization.
|
||||
- `ValidateAndSave()` must return `false` if any filter in `SoftwareFilters` fails validation (e.g., invalid `Frequency`, missing `FilterName`).
|
||||
|
||||
---
|
||||
|
||||
### 4. Dependencies
|
||||
|
||||
#### This module depends on:
|
||||
- `DTS.Common.Base` (for `IBaseView`, `IBaseViewModel`, `IFilterableListView`).
|
||||
- `DTS.Common.Enums.Sensors` (for `FilterClassType` enum).
|
||||
- `System` (for `IComparable`, `ObservableCollection<T>`, `TypeConverter`).
|
||||
|
||||
#### This module is depended upon by:
|
||||
- UI components implementing `ISoftwareFiltersView` (e.g., XAML views).
|
||||
- View-model implementations (e.g., concrete classes implementing `ISoftwareFiltersViewModel`).
|
||||
- Data layers or services that populate `SoftwareFilters` (e.g., via `PopulateView()`).
|
||||
- Serialization or persistence modules that consume `IFilterClass` (e.g., to convert `GetFilterClassNumericValue()` to protocol buffers/JSON).
|
||||
|
||||
---
|
||||
|
||||
### 5. Gotchas
|
||||
- **`IFilterClass` is an interface, not a class**: Implementers must manually synchronize `FClass` and `GetFilterClassNumericValue()`—no default implementation is provided.
|
||||
- **`Sort` signature is non-generic**: The `sortBy` parameter is `object`, implying runtime type checking (e.g., `sortBy as string`) is required—error-prone without clear contract on expected values.
|
||||
- **`Unset()` behavior is undefined**: The interface does not specify whether `Unset()` clears `SoftwareFilters`, disposes resources, or nullifies `View`. Implementation-specific.
|
||||
- **`ValidateAndSave()` lacks error details**: Returns only `bool`, so callers cannot determine *why* validation failed (e.g., missing frequency vs. invalid enum).
|
||||
- **`CurrentUser` is exposed but not validated**: No constraints ensure `CurrentUser` is non-null/non-empty before `ValidateAndSave()` is called.
|
||||
- **No documentation for `IFilterableListView`**: Since `ISoftwareFiltersViewModel` inherits from it, its contract (e.g., `Filter` method signature) is assumed but not visible here.
|
||||
|
||||
*None identified beyond the above.*
|
||||
@@ -0,0 +1,87 @@
|
||||
---
|
||||
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-16T02:23:18.111923+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "329090afc20c7c34"
|
||||
---
|
||||
|
||||
# StatusAndProgressBar
|
||||
|
||||
## Documentation: Status and Progress UI Infrastructure
|
||||
|
||||
---
|
||||
|
||||
### 1. Purpose
|
||||
This module defines the core interfaces and delegates for a status bar and progress bar UI component system, intended to decouple view logic from business logic in a MVVM-like architecture. It enables consistent status reporting (text, color, progress value/visibility) across different parts of the application—particularly in search or long-running operations—by establishing standardized contracts between view models and views. The interfaces `IStatusAndProgressBarViewModel`, `IStatusAndProgressBarFooterViewModel`, and their corresponding view interfaces (`IStatusAndProgressBarView`, `IStatusAndProgressFooterView`) provide the structural foundation for injecting and managing status/progress UI elements, while the delegates in `StatusAndProgressDelegates` define the callback signatures used to drive UI updates imperatively.
|
||||
|
||||
---
|
||||
|
||||
### 2. Public Interface
|
||||
|
||||
#### Interfaces
|
||||
- **`IStatusAndProgressBarView : IBaseView`**
|
||||
Marker interface for a view that displays status and progress information. No additional members; inherits from `IBaseView`.
|
||||
|
||||
- **`IStatusAndProgressFooterView : IBaseView`**
|
||||
Marker interface for a footer-specific status/progress view. Inherits from `IBaseView`. Likely used for a dedicated footer region (e.g., bottom of window).
|
||||
|
||||
- **`IStatusAndProgressBarViewModel : IBaseViewModel`**
|
||||
View model for the main status/progress UI.
|
||||
- `IBaseView View { get; set; }` — Gets or sets the associated view (note: typed as `IBaseView`, *not* `IStatusAndProgressBarView`).
|
||||
- `IBaseViewModel Parent { get; set; }` — Gets or sets the parent view model.
|
||||
- `string ProgressBarName { get; set; }` — Gets or sets a name/identifier for the progress bar (likely used for binding or region mapping).
|
||||
- `object ContextSearchRegion { get; set; }` — Gets or sets an object representing the search context/region (purpose inferred from name; likely used to scope or correlate search operations).
|
||||
|
||||
- **`IStatusAndProgressBarFooterViewModel : IBaseViewModel`**
|
||||
View model for the footer status/progress UI.
|
||||
- `IStatusAndProgressFooterView View { get; set; }` — Gets or sets the associated footer view (correctly typed to its specific view interface).
|
||||
|
||||
#### Delegates (in `StatusAndProgressDelegates.cs`)
|
||||
- **`SetProgressValueDelegate(double value)`** — Callback to set the progress bar’s current value.
|
||||
- **`SetStatusTextDelegate(string text)`** — Callback to update the status text.
|
||||
- **`SetProgressVisibilityDelegate(bool bVisible)`** — Callback to show/hide the progress bar.
|
||||
- **`SetStatusColorDelegate(Color color)`** — Callback to set the status text color (uses `System.Windows.Media.Color`).
|
||||
- **`ActionCompleteDelegate()`** — Callback invoked when an action completes.
|
||||
- **`StatusIntDelegate(int status)`** — Callback to report a numeric status code.
|
||||
- **`StatusExIntDelegate(int status, params object[] extra)`** — Extended status callback with additional context.
|
||||
- **`ErrorCallback(string errorString, string unit) : DialogResult`** — Callback for error reporting; returns a dialog result (e.g., OK/Cancel) to allow user interaction.
|
||||
|
||||
---
|
||||
|
||||
### 3. Invariants
|
||||
- All view interfaces (`IStatusAndProgressBarView`, `IStatusAndProgressFooterView`) inherit from `IBaseView`, implying they are part of a unified view hierarchy.
|
||||
- View models inherit from `IBaseViewModel`, enforcing a consistent base contract.
|
||||
- `IStatusAndProgressBarViewModel` uses `IBaseView` for its `View` property (not the more specific `IStatusAndProgressBarView`), suggesting either intentional flexibility or a potential inconsistency.
|
||||
- `IStatusAndProgressBarFooterViewModel` correctly uses `IStatusAndProgressFooterView` for its `View` property, indicating stricter typing for the footer variant.
|
||||
- No explicit validation rules or ordering guarantees are defined in the interfaces themselves; constraints must be enforced by implementations.
|
||||
- The `ContextSearchRegion` property implies that this view model is primarily used in search-related workflows, though the type is generic (`object`), allowing broad usage.
|
||||
|
||||
---
|
||||
|
||||
### 4. Dependencies
|
||||
|
||||
#### Dependencies *of* this module:
|
||||
- `DTS.Common.Base` — Provides `IBaseView` and `IBaseViewModel`, which all interfaces inherit from.
|
||||
- `System.Windows.Forms` — Referenced for `DialogResult` (used in `ErrorCallback`).
|
||||
- `System.Windows.Media` — Referenced for `Color` (used in `SetStatusColorDelegate`).
|
||||
|
||||
#### Dependencies *on* this module:
|
||||
- Any module implementing or consuming status/progress UI components (e.g., search modules, long-running operation controllers) will depend on these interfaces and delegates.
|
||||
- Concrete implementations of `IStatusAndProgressBarViewModel`/`IStatusAndProgressBarFooterViewModel` must bind to views implementing `IStatusAndProgressBarView`/`IStatusAndProgressFooterView`.
|
||||
- UI layers (e.g., WPF/WinForms views) will depend on the delegate types to register callbacks for status/progress updates.
|
||||
|
||||
---
|
||||
|
||||
### 5. Gotchas
|
||||
- **Typing Inconsistency**: `IStatusAndProgressBarViewModel.View` is typed as `IBaseView`, while `IStatusAndProgressBarFooterViewModel.View` is correctly typed as `IStatusAndProgressFooterView`. This may cause confusion or require casting in implementations.
|
||||
- **Ambiguous `ContextSearchRegion`**: The purpose and expected type of `ContextSearchRegion` is not documented beyond its name. Its usage must be inferred from concrete implementations.
|
||||
- **No Direct Progress Bar API**: The interfaces themselves do not expose progress bar methods; all updates occur via the delegate callbacks. This is by design but requires consumers to understand the delegate-based update pattern.
|
||||
- **Mixed UI Frameworks**: Delegates use both `System.Windows.Forms.DialogResult` (WinForms) and `System.Windows.Media.Color` (WPF), suggesting this module may be shared across UI frameworks or used in hybrid applications. This could introduce subtle compatibility issues if not carefully managed.
|
||||
- **No Error Handling Contract**: While `ErrorCallback` exists, the interfaces do not specify *when* it should be invoked or how errors propagate. This is likely implementation-specific.
|
||||
- **None identified from source alone.** (Note: The above are *inferred* from inconsistencies and naming, not explicit gotchas in the source.)
|
||||
@@ -0,0 +1,59 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.CommonCore/Interface/SystemSettings/ISystemSettingsView.cs
|
||||
- Common/DTS.CommonCore/Interface/SystemSettings/ISystemSettingsViewModel.cs
|
||||
generated_at: "2026-04-16T02:20:01.457499+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "409fbccc02533644"
|
||||
---
|
||||
|
||||
# SystemSettings
|
||||
|
||||
## Documentation: System Settings View & ViewModel Interfaces
|
||||
|
||||
### 1. Purpose
|
||||
This module defines the contract interfaces (`ISystemSettingsView` and `ISystemSettingsViewModel`) for the *System Settings* feature within the application’s UI layer. It establishes the separation of concerns between the view (UI presentation) and view model (business/logic state) for the system settings module, following the MVVM (Model-View-ViewModel) pattern. These interfaces extend base abstractions (`IBaseView`, `IBaseViewModel`) to integrate with the broader application architecture, enabling modular composition and dependency injection for system settings functionality.
|
||||
|
||||
### 2. Public Interface
|
||||
|
||||
#### `ISystemSettingsView`
|
||||
- **Inherits**: `IBaseView`
|
||||
- **Description**: A marker interface representing the view (e.g., XAML window/user control) for the system settings UI. It carries no additional API surface beyond its base interface. Its concrete implementation is expected to be provided by the UI layer (e.g., WPF).
|
||||
|
||||
#### `ISystemSettingsViewModel`
|
||||
- **Inherits**: `IBaseViewModel`
|
||||
- **Properties**:
|
||||
- `ISystemSettingsView View { get; }`
|
||||
*Gets the associated view instance bound to this view model.*
|
||||
- `Object ContextMenuRegion { get; set; }`
|
||||
*Gets or sets the context object for the context menu region (e.g., a region container or host for context menu UI elements).*
|
||||
- `Object ContextMainRegion { get; set; }`
|
||||
*Gets or sets the context object for the main content region (e.g., the primary settings panel container).*
|
||||
- `Object ContextNavigationRegion { get; set; }`
|
||||
*Gets or sets the context object for the navigation region (e.g., a region hosting navigation controls or menu items).*
|
||||
- **Methods**:
|
||||
- `List<FrameworkElement> GetRegions()`
|
||||
*Returns a list of `FrameworkElement` instances representing the named UI regions (e.g., `ContextMenuRegion`, `ContextMainRegion`, `ContextNavigationRegion`) that the view model manages or binds to. The order and contents are determined by the view model’s implementation.*
|
||||
|
||||
### 3. Invariants
|
||||
- `View` must be non-null and must be an instance of a type implementing `ISystemSettingsView`.
|
||||
- `GetRegions()` must return a list containing *at least* the elements corresponding to the three context regions (`ContextMenuRegion`, `ContextMainRegion`, `ContextNavigationRegion`), though the exact mapping between region properties and list items is implementation-defined.
|
||||
- The `Context*Region` properties must be set *before* `GetRegions()` is called, as the view model likely relies on them to populate the region list.
|
||||
- All `Context*Region` properties are of type `Object`; their concrete types are not specified and must be inferred from usage (e.g., `RegionManager` regions, `ContentControl` instances, or custom containers).
|
||||
|
||||
### 4. Dependencies
|
||||
- **Depends on**:
|
||||
- `DTS.Common.Base` (for `IBaseView`, `IBaseViewModel`)
|
||||
- `System.Windows` (for `FrameworkElement`)
|
||||
- **Depended on by**:
|
||||
- Likely consumed by a DI container or view model factory to instantiate and wire the system settings module.
|
||||
- Concrete implementations (e.g., `SystemSettingsView`, `SystemSettingsViewModel`) in the UI project(s) will depend on these interfaces.
|
||||
- Other modules may depend on `ISystemSettingsViewModel` to trigger or interact with system settings (e.g., via event aggregation or direct injection), though this is not explicit in the provided source.
|
||||
|
||||
### 5. Gotchas
|
||||
- **Ambiguous region semantics**: The `Context*Region` properties are typed as `Object` with no documentation on expected concrete types or lifecycle (e.g., when they are set, whether they are nullable, or if they must be initialized in a specific order). This could lead to runtime errors if implementations assume a specific type (e.g., `Region` from Prism) without verification.
|
||||
- **No explicit region naming**: `GetRegions()` returns a `List<FrameworkElement>` but does not associate each element with its logical region name (e.g., "ContextMenu", "Main"). Consumers must infer ordering or rely on undocumented conventions.
|
||||
- **No mutability guarantees**: The interface does not specify whether `GetRegions()` returns a fresh list each time or a cached reference. This could cause issues if callers modify the list.
|
||||
- **No error handling or validation**: No indication of how invalid region assignments (e.g., `null` or incompatible types) are handled.
|
||||
- **None identified from source alone** for behavioral edge cases beyond the above.
|
||||
@@ -0,0 +1,61 @@
|
||||
---
|
||||
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-16T02:31:50.852650+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "7e29e0cdd222a5b1"
|
||||
---
|
||||
|
||||
# DB
|
||||
|
||||
## 1. Purpose
|
||||
This module defines the core interfaces for the database import/export subsystem within the system settings UI layer. It establishes a contract for a view model (`IDBViewModel`) that coordinates database import and export operations—specifically handling file paths, raw data payloads (as XML strings), and status reporting—while delegating UI-specific rendering and interaction logic to dedicated view interfaces (`IDBImportView`, `IDBExportView`). The module serves as a lightweight abstraction layer between the UI and underlying data persistence logic, enabling separation of concerns and testability.
|
||||
|
||||
## 2. Public Interface
|
||||
|
||||
### `IDBImportView`
|
||||
- **Signature**: `public interface IDBImportView : IBaseView`
|
||||
- **Behavior**: Represents the UI view responsible for displaying and interacting with database import functionality. Inherits from `IBaseView`, implying standard view lifecycle/behavior (e.g., binding, rendering). No additional members are defined in this interface; implementation details are assumed to reside in concrete view classes.
|
||||
|
||||
### `IDBExportView`
|
||||
- **Signature**: `public interface IDBExportView : IBaseView`
|
||||
- **Behavior**: Represents the UI view responsible for displaying and interacting with database export functionality. Inherits from `IBaseView`. Like `IDBImportView`, it contains no additional members beyond the base view contract.
|
||||
|
||||
### `IDBViewModel`
|
||||
- **Signature**: `public interface IDBViewModel : IBaseViewModel`
|
||||
- **Properties**:
|
||||
- `IDBImportView ImportView { get; set; }` – Reference to the import view instance.
|
||||
- `IDBExportView ExportView { get; set; }` – Reference to the export view instance.
|
||||
- `string ImportFileName { get; set; }` – File path for the import source.
|
||||
- `string ImportStatusText { get; set; }` – Status message for the import operation (e.g., progress, error).
|
||||
- `string ExportFileName { get; set; }` – File path for the export destination.
|
||||
- `string ExportData { get; set; }` – XML-formatted string containing data to be exported.
|
||||
- `string ImportData { get; set; }` – XML-formatted string containing data read from the import file.
|
||||
- **Methods**:
|
||||
- `void Export();` – Executes the export operation by writing `ExportData` to `ExportFileName`. The implementation is expected to handle file I/O and error reporting (e.g., updating `ExportStatusText` if such a property existed—note: only `ImportStatusText` is defined).
|
||||
|
||||
## 3. Invariants
|
||||
- `ImportView` and `ExportView` must be non-null before `Export()` is called (though not enforced by the interface; runtime null checks may be required).
|
||||
- `ExportData` is expected to be a well-formed XML string prior to calling `Export()` (per the summary comment: “for now this is formatted xml string to write to the file”).
|
||||
- `ImportData` is expected to be populated *after* an import operation reads and parses data from `ImportFileName` (per the summary comment: “for now this is the formatted xml string read from the file”).
|
||||
- `ImportFileName` and `ExportFileName` are file paths (strings), but the interface does not enforce existence, format, or permissions—validation is assumed to occur elsewhere.
|
||||
- No explicit ordering or lifecycle guarantees are defined for setting `ImportView`/`ExportView` relative to other properties or method calls.
|
||||
|
||||
## 4. Dependencies
|
||||
- **Depends on**:
|
||||
- `DTS.Common.Base.IBaseView` (via `IDBImportView`, `IDBExportView`)
|
||||
- `DTS.Common.Base.IBaseViewModel` (via `IDBViewModel`)
|
||||
- **Depended on by**:
|
||||
- Concrete implementations of `IDBImportView`, `IDBExportView`, and `IDBViewModel` (not visible in source).
|
||||
- Likely consumed by a higher-level settings controller or UI framework (e.g., MVVM framework binding logic) to wire views and view model.
|
||||
- **No direct dependencies on external libraries or system APIs** are evident from the source.
|
||||
|
||||
## 5. Gotchas
|
||||
- **Missing `ExportStatusText`**: While `ImportStatusText` is defined, there is no corresponding property for export operation status. This asymmetry may lead to inconsistent status reporting or require ad-hoc workarounds.
|
||||
- **No import operation defined**: The interface includes `ImportFileName`, `ImportData`, and `ImportStatusText`, but no `Import()` method—only `Export()` is declared. Import logic (e.g., parsing, validation, file reading) is not part of this contract and must be handled externally (e.g., in view implementations or a separate service).
|
||||
- **Tight coupling to XML**: `ExportData` and `ImportData` are explicitly documented as XML strings. This hardcodes the data format, limiting flexibility for future changes (e.g., JSON, binary).
|
||||
- **View model assumes responsibility for file I/O**: The `Export()` method implies the view model directly writes to disk, violating separation of concerns (typically, I/O should be delegated to a service). This may complicate unit testing and increase coupling.
|
||||
- **Ambiguous initialization**: Comments suggest `ImportFileName`/`ExportFileName` may be redundant if the view model handles all operations internally—indicating potential technical debt or incomplete refactoring.
|
||||
@@ -0,0 +1,85 @@
|
||||
---
|
||||
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-16T02:31:37.120937+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "7b8cfe6060429ed5"
|
||||
---
|
||||
|
||||
# ISOSettings
|
||||
|
||||
## Documentation Page: ISO Settings Module
|
||||
|
||||
### 1. Purpose
|
||||
This module defines the core interfaces for managing ISO (International Organization for Standardization) code settings within the system’s settings infrastructure. It implements a standard Model-View-ViewModel (MVVM) pattern to decouple configuration data (`IISOSettingsData`), business logic/data persistence (`IISOSettingsModel`), and UI presentation (`IISOSettingsView` and `IISOSettingsViewModel`). Its role is to provide a structured, testable abstraction layer for storing, loading, and exposing user-configurable ISO-related display and validation preferences—such as whether ISO codes must be unique, which view modes are active, and which helper UI elements (e.g., code builder, channel lookup) are visible.
|
||||
|
||||
---
|
||||
|
||||
### 2. Public Interface
|
||||
|
||||
#### `IISOSettingsView`
|
||||
- **Signature**: `interface IISOSettingsView : IBaseView`
|
||||
- **Behavior**: Represents the view layer contract for ISO settings UI. Inherits from `IBaseView`, implying standard view lifecycle/interaction capabilities (e.g., data binding, initialization hooks). No additional members defined—implementation responsibility lies in concrete view classes.
|
||||
|
||||
#### `IISOSettingsModel`
|
||||
- **Signature**: `interface IISOSettingsModel : IBaseModel`
|
||||
- **Behavior**: Manages persistence of ISO settings.
|
||||
- `void SaveData(IISOSettingsData data)`: Persists the provided `IISOSettingsData` instance.
|
||||
- `IISOSettingsData LoadData()`: Retrieves and returns the current persisted ISO settings data.
|
||||
Inherits from `IBaseModel`, implying standard model responsibilities (e.g., state management, validation hooks).
|
||||
|
||||
#### `IISOSettingsViewModel`
|
||||
- **Signature**: `interface IISOSettingsViewModel : IBaseViewModel`
|
||||
- **Behavior**: Orchestrates interaction between view, model, and data.
|
||||
- `IISOSettingsView View { get; set; }`: Gets or sets the associated view instance.
|
||||
- `IISOSettingsData ISOData { get; set; }`: Gets or sets the current ISO settings data model.
|
||||
- `IISOSettingsModel Model { get; set; }`: Gets or sets the associated data persistence model.
|
||||
Inherits from `IBaseViewModel`, implying standard MVVM behaviors (e.g., command binding, property change notification).
|
||||
|
||||
#### `IISOSettingsData`
|
||||
- **Signature**: `interface IISOSettingsData : IBaseClass`
|
||||
- **Behavior**: Encapsulates configurable ISO settings properties.
|
||||
- `bool UniqueISOCodesRequired { get; set; }`: Controls whether duplicate ISO codes are disallowed.
|
||||
- `IsoViewMode ISOViewMode { get; set; }`: Sets the current display mode for ISO codes (enum value from `DTS.Common.Enums`).
|
||||
- `bool ShowISOStringBuilder { get; set; }`: Toggles visibility of the ISO code builder UI helper.
|
||||
- `bool ShowChannelCodeLookupHelper { get; set; }`: Toggles visibility of the channel code lookup helper.
|
||||
- `bool UseISOCodeFilterMapping { get; set; }`: Enables/disables filtering logic based on ISO code mappings.
|
||||
- `bool ShowISOCodes { get; }`: *Read-only* flag indicating whether ISO codes should be displayed.
|
||||
- `bool ShowUserCodes { get; }`: *Read-only* flag indicating whether user-defined codes should be displayed.
|
||||
- `bool ChannelNamesOnly { get; }`: *Read-only* flag indicating whether only channel names (not codes) should be shown.
|
||||
Inherits from `IBaseClass`, implying base functionality (e.g., equality, cloning—exact behavior depends on `IBaseClass` implementation).
|
||||
|
||||
---
|
||||
|
||||
### 3. Invariants
|
||||
- **Data Integrity**: `SaveData` and `LoadData` must ensure data consistency—`LoadData()` should return a valid `IISOSettingsData` instance (non-null) representing the persisted state.
|
||||
- **Read-Only Properties**: `ShowISOCodes`, `ShowUserCodes`, and `ChannelNamesOnly` are read-only; their values must be determined internally (e.g., derived from `ISOViewMode` or other settings) and not settable directly.
|
||||
- **MVVM Coupling**: `IISOSettingsViewModel` requires all three dependencies (`View`, `Model`, `ISOData`) to be non-null for correct operation (enforced by implementation, not interface).
|
||||
- **Enum Dependency**: `ISOViewMode` is defined in `DTS.Common.Enums`; its valid values and semantics must be consistent with the behavior of `ShowISOCodes`, `ShowUserCodes`, and `ChannelNamesOnly`.
|
||||
|
||||
---
|
||||
|
||||
### 4. Dependencies
|
||||
|
||||
#### Dependencies *of* this module:
|
||||
- `DTS.Common.Base`: Provides base contracts (`IBaseView`, `IBaseModel`, `IBaseViewModel`, `IBaseClass`).
|
||||
- `DTS.Common.Enums`: Defines the `IsoViewMode` enum used in `IISOSettingsData`.
|
||||
|
||||
#### Dependencies *on* this module:
|
||||
- Any module implementing or consuming ISO settings (e.g., UI components, persistence layers, configuration services) must depend on these interfaces.
|
||||
- Concrete implementations of `IISOSettingsView`, `IISOSettingsModel`, `IISOSettingsViewModel`, and `IISOSettingsData` are expected elsewhere in the codebase (not specified here).
|
||||
|
||||
---
|
||||
|
||||
### 5. Gotchas
|
||||
- **Read-Only Properties**: `ShowISOCodes`, `ShowUserCodes`, and `ChannelNamesOnly` are read-only but may be computed from `ISOViewMode` or other settings. Modifying `ISOViewMode` could indirectly change these values.
|
||||
- **No Validation Logic**: The interfaces define *what* data is stored and how it’s persisted but contain no validation rules (e.g., `UniqueISOCodesRequired` is a flag, but enforcement logic must reside in implementation).
|
||||
- **Null Safety**: The `ViewModel` interface allows setting `View`, `Model`, or `ISOData` to `null`; implementations must handle null references gracefully (e.g., via guards or default instances).
|
||||
- **No Explicit Error Handling**: `SaveData`/`LoadData` signatures do not declare exceptions—implementation may throw (e.g., on I/O failure), but callers must infer error paths.
|
||||
- **Namespace Overlap**: All interfaces reside in `DTS.Common.Interface`, suggesting this is part of a shared core library; changes may impact multiple consumers.
|
||||
|
||||
None identified beyond the above.
|
||||
@@ -0,0 +1,44 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.CommonCore/Interface/SystemSettings/PowerAndBattery/IPowerAndBatteryView.cs
|
||||
- Common/DTS.CommonCore/Interface/SystemSettings/PowerAndBattery/IPowerAndBatteryViewModel.cs
|
||||
generated_at: "2026-04-16T02:31:20.098955+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "a788360f54c0a8e6"
|
||||
---
|
||||
|
||||
# PowerAndBattery
|
||||
|
||||
## 1. Purpose
|
||||
This module defines the foundational interfaces for the Power and Battery settings view layer within the system settings UI. Specifically, `IPowerAndBatteryView` and `IPowerAndBatteryViewModel` serve as contract interfaces that establish the separation of concerns between the view (UI layer) and view model (business/logic layer) for the Power and Battery configuration section. They inherit from `IBaseView` and `IBaseViewModel` respectively, indicating adherence to a common MVVM (Model-View-ViewModel) architectural pattern used across the application. The interfaces themselves contain no additional members, suggesting this section currently has no specialized view/view model behavior beyond the base contract.
|
||||
|
||||
## 2. Public Interface
|
||||
No public methods, properties, or events are defined directly on these interfaces. They are marker interfaces extending base contracts:
|
||||
|
||||
- **`IPowerAndBatteryView`**
|
||||
*Signature:* `public interface IPowerAndBatteryView : IBaseView`
|
||||
*Behavior:* Represents the view contract for the Power and Battery settings section. As a marker interface inheriting `IBaseView`, it signals to the framework or DI container that this type corresponds to the view component for this settings area. No additional behavior is specified in this source.
|
||||
|
||||
- **`IPowerAndBatteryViewModel`**
|
||||
*Signature:* `public interface IPowerAndBatteryViewModel : IBaseViewModel`
|
||||
*Behavior:* Represents the view model contract for the Power and Battery settings section. As a marker interface inheriting `IBaseViewModel`, it signals to the framework or DI container that this type corresponds to the view model component for this settings area. No additional behavior is specified in this source.
|
||||
|
||||
## 3. Invariants
|
||||
- Both interfaces must be implemented by types that fulfill the contracts of their respective base interfaces (`IBaseView` and `IBaseViewModel`).
|
||||
- Since no members are declared, the interfaces impose no additional runtime constraints beyond those inherited from `IBaseView`/`IBaseViewModel`.
|
||||
- The interfaces are intended to be used as *marker interfaces*—their presence (or absence) in a type’s inheritance hierarchy signals its role in the Power and Battery settings section.
|
||||
|
||||
## 4. Dependencies
|
||||
- **Dependencies *of* this module:**
|
||||
- `DTS.Common.Base` namespace (specifically `IBaseView` and `IBaseViewModel`, though their definitions are not provided here).
|
||||
- **Dependencies *on* this module:**
|
||||
- Any concrete view or view model implementation for the Power and Battery settings section must implement `IPowerAndBatteryView` and `IPowerAndBatteryViewModel` respectively.
|
||||
- Framework or DI infrastructure likely uses these interfaces to resolve or wire up the Power and Battery settings UI components (e.g., via view model first navigation or view-first activation patterns).
|
||||
- Other modules (e.g., settings navigation, settings registry) may reference these interfaces to register or locate the Power and Battery section.
|
||||
|
||||
## 5. Gotchas
|
||||
- **Ambiguity of purpose:** The interfaces are empty and provide no guidance on expected behavior, data binding properties, or lifecycle events. Consumers must rely on documentation or inspection of concrete implementations (not provided here) to understand how this section is implemented.
|
||||
- **Potential for future extension:** Since no members are defined, future additions to these interfaces (e.g., methods for refreshing battery status or handling power plan changes) would be breaking changes for existing implementations.
|
||||
- **No indication of state or data model:** The interfaces do not expose any properties (e.g., `BatteryPercentage`, `IsCharging`)—these would be defined in concrete classes or in `IBaseViewModel`/`IBaseView`.
|
||||
- **None identified from source alone.**
|
||||
@@ -0,0 +1,47 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.CommonCore/Interface/SystemSettings/QASettings/IQASettingsView.cs
|
||||
- Common/DTS.CommonCore/Interface/SystemSettings/QASettings/IQASettingsViewModel.cs
|
||||
generated_at: "2026-04-16T02:31:28.333874+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "5199e3039d0bb459"
|
||||
---
|
||||
|
||||
# QASettings
|
||||
|
||||
## 1. Purpose
|
||||
This module defines the foundational interfaces for the QA Settings feature within the system’s settings UI layer. Specifically, it establishes the contract between the view (UI layer) and view model (business logic/data layer) for QA-related settings, leveraging the existing `IBaseView` and `IBaseViewModel` base interfaces. It serves as a minimal, extensible abstraction point—likely intended to support future implementation of QA-specific configuration UI (e.g., test environment toggles, diagnostic mode controls)—without yet containing any domain-specific behavior.
|
||||
|
||||
## 2. Public Interface
|
||||
No public *classes* are defined in these files. Only two interfaces are declared:
|
||||
|
||||
- **`IQASettingsView`**
|
||||
```csharp
|
||||
public interface IQASettingsView : IBaseView
|
||||
```
|
||||
Represents the view contract for the QA Settings UI. Inherits from `IBaseView`, implying it adheres to the base view contract (e.g., lifecycle management, data binding support, or UI framework integration), though the specifics of `IBaseView` are not provided here.
|
||||
|
||||
- **`IQASettingsViewModel`**
|
||||
```csharp
|
||||
public interface IQASettingsViewModel : IBaseViewModel
|
||||
```
|
||||
Represents the view model contract for QA Settings. Inherits from `IBaseViewModel`, implying it supports standard view model responsibilities (e.g., state management, command exposure, property change notifications), per the base contract defined in `DTS.Common.Base`.
|
||||
|
||||
## 3. Invariants
|
||||
- `IQASettingsView` and `IQASettingsViewModel` must be implemented consistently as a pair (e.g., a view implementation must bind to a view model implementing `IQASettingsViewModel`).
|
||||
- Both interfaces extend their respective base interfaces (`IBaseView`, `IBaseViewModel`), so all invariants of those base interfaces apply transitively (e.g., lifecycle ordering, thread affinity, or binding requirements).
|
||||
- No additional validation rules or constraints are specified in the source.
|
||||
|
||||
## 4. Dependencies
|
||||
- **Depends on**:
|
||||
- `DTS.Common.Base` (specifically, `IBaseView` and `IBaseViewModel`—though their definitions are external to these files).
|
||||
- **Depended on by**:
|
||||
- Unknown from source alone. These interfaces are likely consumed by concrete implementations in other modules (e.g., `DTS.App.Settings.QA` or similar), but no such references are visible in the provided files.
|
||||
|
||||
## 5. Gotchas
|
||||
- **No behavior defined**: These interfaces are empty markers—no methods, properties, or events are declared. Any functional behavior must be added via extension or future updates to the interfaces.
|
||||
- **Ambiguity of `IBaseView`/`IBaseViewModel`**: Without access to the base interface definitions, the full contract (e.g., required properties like `Title`, `IsBusy`, or event patterns) is unclear.
|
||||
- **Namespace overlap**: Both interfaces reside in `DTS.Common.Interface`, but the namespace `DTS.Common.Base` (for base interfaces) is separate—ensure no accidental circular dependencies arise from cross-references.
|
||||
- **No versioning guidance**: No attributes (e.g., `VersionAttribute`) or explicit versioning conventions are present, which may complicate future interface evolution.
|
||||
- **None identified from source alone.**
|
||||
@@ -0,0 +1,50 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.CommonCore/Interface/SystemSettings/RealtimeSettings/IRealtimeSettingsView.cs
|
||||
- Common/DTS.CommonCore/Interface/SystemSettings/RealtimeSettings/IRealtimeSettingsViewModel.cs
|
||||
generated_at: "2026-04-16T02:31:38.700356+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "0ef736bfba716a64"
|
||||
---
|
||||
|
||||
# RealtimeSettings
|
||||
|
||||
## 1. Purpose
|
||||
This module defines the foundational interfaces for the *Realtime Settings* feature within the system’s settings UI layer. Specifically, it establishes the contract between the view and view model layers for realtime configuration UI components, leveraging the existing `IBaseView` and `IBaseViewModel` base interfaces. Its role is to provide type-safe, structured separation of concerns for realtime settings—likely used in a UI framework adhering to MVVM (Model-View-ViewModel) patterns—without introducing domain-specific logic or state management directly in these interfaces.
|
||||
|
||||
## 2. Public Interface
|
||||
No public *implementations* or *concrete types* are defined in the provided source files. Only two interfaces are declared:
|
||||
|
||||
- **`IRealtimeSettingsView`**
|
||||
```csharp
|
||||
public interface IRealtimeSettingsView : IBaseView
|
||||
```
|
||||
Represents the view layer contract for the realtime settings UI. Inherits from `IBaseView`, implying it participates in a standardized view hierarchy (e.g., for navigation, lifecycle, or rendering). No additional members are declared—behavior and data binding are expected to be handled via `IBaseView` or through XAML/data-binding mechanisms outside this interface.
|
||||
|
||||
- **`IRealtimeSettingsViewModel`**
|
||||
```csharp
|
||||
public interface IRealtimeSettingsViewModel : IBaseViewModel
|
||||
```
|
||||
Represents the view model layer contract for the realtime settings feature. Inherits from `IBaseViewModel`, implying it adheres to a common view model contract (e.g., `INotifyPropertyChanged`, command handling, or state management). Like its view counterpart, it declares no additional members—functional behavior is assumed to be defined elsewhere or via base interface contracts.
|
||||
|
||||
> **Note**: Neither interface exposes properties, methods, or events in the provided source. Any observable behavior (e.g., `RealtimeEnabled`, `UpdateInterval`) would be defined in concrete implementations or derived interfaces not included here.
|
||||
|
||||
## 3. Invariants
|
||||
- `IRealtimeSettingsView` *must* be implemented by a type that satisfies the contract of `IBaseView`.
|
||||
- `IRealtimeSettingsViewModel` *must* be implemented by a type that satisfies the contract of `IBaseViewModel`.
|
||||
- The two interfaces are *intended* to be paired (view ↔ view model) per MVVM conventions, though the source does not enforce or declare this relationship explicitly (e.g., via generic constraints or binding attributes).
|
||||
- No runtime validation or state invariants are defined in the interfaces themselves.
|
||||
|
||||
## 4. Dependencies
|
||||
- **Dependencies *of* this module**:
|
||||
- `DTS.Common.Base` namespace (specifically, `IBaseView` and `IBaseViewModel` types).
|
||||
- **Dependencies *on* this module**:
|
||||
- Not determinable from the provided source. Concretely, UI components (e.g., XAML pages, controls) or view model factories would depend on these interfaces, but no such consumers are visible here.
|
||||
- The `DTS.Common.Interface` namespace (where these interfaces reside) is likely referenced by higher-level UI or settings modules (e.g., `DTS.App.Settings`), but this is inferred, not explicit.
|
||||
|
||||
## 5. Gotchas
|
||||
- **Ambiguity of scope**: The interfaces are *empty*—they convey no semantic meaning about what "realtime settings" entails (e.g., polling intervals, live data feeds, or connection state). Consumers must rely on documentation, naming conventions, or concrete implementations to understand expected behavior.
|
||||
- **No versioning or extensibility hooks**: Since no members are declared, extending functionality (e.g., adding a `bool IsConnected` property) would require either modifying the interface (breaking change) or adding a new derived interface (risking fragmentation).
|
||||
- **Potential for misuse**: Without explicit contracts, developers might conflate `IRealtimeSettingsView`/`IRealtimeSettingsViewModel` with domain logic (e.g., expecting them to manage network connections or data updates), leading to tight coupling or anti-patterns.
|
||||
- **None identified from source alone** — but the above are structural risks inherent to the minimal interface design.
|
||||
@@ -0,0 +1,50 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.CommonCore/Interface/SystemSettings/TablesSettings/ITablesSettingsView.cs
|
||||
- Common/DTS.CommonCore/Interface/SystemSettings/TablesSettings/ITablesSettingsModel.cs
|
||||
generated_at: "2026-04-16T02:31:21.087079+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "9b85701d1358796f"
|
||||
---
|
||||
|
||||
# TablesSettings
|
||||
|
||||
## Documentation Page: Tables Settings View/Model Interfaces
|
||||
|
||||
### 1. Purpose
|
||||
This module defines the foundational interfaces for the *Tables Settings* feature within the system’s settings UI layer. Specifically, `ITablesSettingsView` and `ITablesSettingsViewModel` serve as contract interfaces that establish the separation of concerns between the view (UI presentation layer) and the view model (business/logic layer) for configuring table-related settings. They inherit from base interfaces (`IBaseView` and `IBaseViewModel`, respectively), indicating adherence to a common MVVM (Model-View-ViewModel) architectural pattern used throughout the codebase. The interfaces themselves are empty markers—no behavior is defined here—suggesting this module exists to enable type-based composition, dependency injection, or UI routing within the larger settings subsystem.
|
||||
|
||||
### 2. Public Interface
|
||||
No public methods, properties, or events are declared in either interface. Both interfaces are *marker interfaces* with no members beyond inheritance.
|
||||
|
||||
- **`ITablesSettingsView`**
|
||||
- *Inherits from*: `IBaseView`
|
||||
- *Behavior*: Serves as the contract for the view component responsible for rendering the Tables Settings UI. Its concrete implementation is expected to handle UI rendering and user interaction, delegating logic to `ITablesSettingsViewModel`.
|
||||
|
||||
- **`ITablesSettingsViewModel`**
|
||||
- *Inherits from*: `IBaseViewModel`
|
||||
- *Behavior*: Serves as the contract for the view model managing state and commands for the Tables Settings feature. It exposes data and operations bound to `ITablesSettingsView`, but no members are defined at this level.
|
||||
|
||||
> **Note**: All meaningful functionality (e.g., properties like `TableOptions`, commands like `SaveSettings`) must be defined in concrete implementations or in the base interfaces (`IBaseView`, `IBaseViewModel`), and are not visible in this source.
|
||||
|
||||
### 3. Invariants
|
||||
- Both interfaces must be implemented by types that conform to the expectations of their respective base interfaces (`IBaseView`, `IBaseViewModel`).
|
||||
- No additional constraints or validation rules are specified in this file.
|
||||
- The interfaces are *intended* to be used as part of a view-model-view binding pipeline, but the source provides no guarantees about lifecycle, threading, or state consistency.
|
||||
|
||||
### 4. Dependencies
|
||||
- **Dependencies *of* this module**:
|
||||
- `DTS.Common.Base` namespace (specifically, `IBaseView` and `IBaseViewModel` must be defined elsewhere in `DTS.Common.Base`).
|
||||
- **Dependencies *on* this module**:
|
||||
- Not inferable from the provided sources. However, given the naming and structure, it is highly likely that:
|
||||
- A concrete view class (e.g., `TablesSettingsView`) implements `ITablesSettingsView`.
|
||||
- A concrete view model class (e.g., `TablesSettingsViewModel`) implements `ITablesSettingsViewModel`.
|
||||
- UI routing or DI containers may reference these interfaces to resolve or inject the appropriate components.
|
||||
- Other parts of the settings subsystem (e.g., a `SettingsController` or `ISettingsManager`) may depend on `ITablesSettingsViewModel` to coordinate feature activation.
|
||||
|
||||
### 5. Gotchas
|
||||
- **Empty interfaces**: Developers may mistakenly expect behavior or properties here. All logic must reside in concrete implementations or base interfaces.
|
||||
- **Ambiguity of scope**: The term *“Tables Settings”* is not defined—this could refer to database table configurations, UI grid/table rendering options, or data import/export table mappings. Its precise meaning is context-dependent on downstream implementations.
|
||||
- **No versioning or deprecation markers**: The interfaces are minimal and stable, but future extensibility (e.g., adding members) would require careful versioning to avoid breaking consumers.
|
||||
- **None identified from source alone.**
|
||||
@@ -0,0 +1,47 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.CommonCore/Interface/SystemSettings/TestSettings/ITestSettingsView.cs
|
||||
- Common/DTS.CommonCore/Interface/SystemSettings/TestSettings/ITestSettingsViewModel.cs
|
||||
generated_at: "2026-04-16T02:31:47.872062+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "5e0dfcfe8f8e6976"
|
||||
---
|
||||
|
||||
# TestSettings
|
||||
|
||||
## 1. Purpose
|
||||
This module defines the foundational view and view model interfaces for the *Test Settings* feature within the system’s settings UI layer. It serves as a contract between the UI presentation layer (e.g., XAML views) and the underlying business logic/data layer (e.g., view models), enabling separation of concerns and testability. Specifically, `ITestSettingsView` and `ITestSettingsViewModel` extend base abstractions (`IBaseView`, `IBaseViewModel`) to establish a standardized pattern for test-related configuration UI components, without prescribing implementation details.
|
||||
|
||||
## 2. Public Interface
|
||||
No public *functions*, *classes*, or *methods* are defined in the provided source files. Only two interfaces are declared:
|
||||
|
||||
- **`ITestSettingsView`**
|
||||
*Signature:* `public interface ITestSettingsView : IBaseView { }`
|
||||
*Behavior:* A marker interface indicating that an implementation represents the *view* (e.g., UI page/user control) for test settings. It inherits from `IBaseView`, implying conformance to a common view contract (e.g., lifecycle hooks, data context binding), though the specifics of `IBaseView` are not included here.
|
||||
|
||||
- **`ITestSettingsViewModel`**
|
||||
*Signature:* `public interface ITestSettingsViewModel : IBaseViewModel { }`
|
||||
*Behavior:* A marker interface indicating that an implementation represents the *view model* for test settings. It inherits from `IBaseViewModel`, implying adherence to a common view model contract (e.g., property change notification, command exposure), though the specifics of `IBaseViewModel` are not included here.
|
||||
|
||||
> **Note:** No properties, methods, or events are declared directly on either interface. Behavior and data members are expected to be defined in their respective base interfaces (`IBaseView`, `IBaseViewModel`) or in concrete implementations.
|
||||
|
||||
## 3. Invariants
|
||||
- `ITestSettingsView` must be implemented by a type that also satisfies `IBaseView`.
|
||||
- `ITestSettingsViewModel` must be implemented by a type that also satisfies `IBaseViewModel`.
|
||||
- The interfaces are *purely marker interfaces*—they impose no additional runtime constraints beyond inheritance.
|
||||
- No ordering, initialization, or state guarantees are specified at this level.
|
||||
|
||||
## 4. Dependencies
|
||||
- **Depends on:**
|
||||
- `DTS.Common.Base` (specifically, `IBaseView` and `IBaseViewModel` from that namespace/module).
|
||||
- **Depended on by:**
|
||||
- Concrete implementations of `ITestSettingsView` (e.g., XAML code-behind classes) and `ITestSettingsViewModel` (e.g., view model classes for test settings).
|
||||
- Dependency injection or composition frameworks may use these interfaces to resolve or wire up test settings UI components.
|
||||
- Other modules in the `DTS.Common.Interface` namespace may reference these interfaces for navigation, registration, or testing purposes.
|
||||
|
||||
## 5. Gotchas
|
||||
- **Ambiguity in base interfaces:** The behavior and requirements of `ITestSettingsView` and `ITestSettingsViewModel` are entirely dependent on the definitions of `IBaseView` and `IBaseViewModel`, which are not provided. Without those, the full contract is incomplete.
|
||||
- **No functional surface area:** The interfaces currently serve only as *type tags*; developers may mistakenly expect them to expose settings-related members (e.g., `TestTimeout`, `EnableLogging`), but none are defined here.
|
||||
- **Potential for overloading:** Future extension of these interfaces (e.g., adding properties) could break existing implementations if not carefully managed.
|
||||
- **None identified from source alone.**
|
||||
@@ -0,0 +1,52 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.CommonCore/Interface/SystemSettings/UISettings/IUISettingsView.cs
|
||||
- Common/DTS.CommonCore/Interface/SystemSettings/UISettings/IUISettingsViewModel.cs
|
||||
generated_at: "2026-04-16T02:31:11.498064+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "2585d1c5e565105e"
|
||||
---
|
||||
|
||||
# UISettings
|
||||
|
||||
## 1. Purpose
|
||||
This module defines the foundational interfaces for the UI Settings feature within the system’s settings architecture. Specifically, it establishes the contract between the view and view model layers for UI settings functionality—ensuring separation of concerns and adherence to the MVVM (Model-View-ViewModel) pattern. The interfaces `IUISettingsView` and `IUISettingsViewModel` serve as typed markers to constrain generic UI settings handling (e.g., in navigation, dependency injection, or view/view model registration logic), leveraging the base interfaces `IBaseView` and `IBaseViewModel` from `DTS.Common.Base`.
|
||||
|
||||
## 2. Public Interface
|
||||
No public *implementations* or *concrete types* are defined in the provided source files. Only two interfaces are declared:
|
||||
|
||||
- **`IUISettingsView`**
|
||||
```csharp
|
||||
public interface IUISettingsView : IBaseView
|
||||
```
|
||||
A marker interface indicating that a type represents the *view* layer for UI settings. It inherits from `IBaseView`, implying it conforms to the base view contract (e.g., lifecycle management, data binding context), though the specifics of `IBaseView` are not included here.
|
||||
|
||||
- **`IUISettingsViewModel`**
|
||||
```csharp
|
||||
public interface IUISettingsViewModel : IBaseViewModel
|
||||
```
|
||||
A marker interface indicating that a type represents the *view model* layer for UI settings. It inherits from `IBaseViewModel`, implying it adheres to the base view model contract (e.g., property change notification, command exposure), though the specifics of `IBaseViewModel` are not included here.
|
||||
|
||||
## 3. Invariants
|
||||
- `IUISettingsView` must be implemented by types that represent a UI *view* (e.g., a XAML page or control) dedicated to UI settings.
|
||||
- `IUISettingsViewModel` must be implemented by types that represent the corresponding *view model* for UI settings.
|
||||
- The interfaces are *marker interfaces*; they impose no additional behavioral requirements beyond their base interface (`IBaseView`/`IBaseViewModel`). Any invariants or constraints are therefore inherited from those base interfaces (not specified here).
|
||||
- There is no enforced pairing or binding logic in these interfaces themselves—e.g., no compile-time guarantee that a given `IUISettingsView` is paired with a specific `IUISettingsViewModel`.
|
||||
|
||||
## 4. Dependencies
|
||||
- **Depends on**:
|
||||
- `DTS.Common.Base` (specifically `IBaseView` and `IBaseViewModel`, though their definitions are external to this module).
|
||||
- **Depended on by**:
|
||||
- Likely consumed by higher-level frameworks or modules responsible for:
|
||||
- View/ViewModel registration (e.g., DI containers, navigation services).
|
||||
- View resolution logic (e.g., mapping `IUISettingsViewModel` to `IUISettingsView`).
|
||||
- Settings management modules that route UI settings changes to the appropriate handlers.
|
||||
*(Exact consumers cannot be determined from the provided source.)*
|
||||
|
||||
## 5. Gotchas
|
||||
- **Ambiguity of base interfaces**: Since `IBaseView` and `IBaseViewModel` are referenced but not defined here, their exact contract (e.g., required properties/methods) is unknown. This may impact how `IUISettingsView`/`IUISettingsViewModel` are used in practice.
|
||||
- **No explicit pairing**: These interfaces do not enforce a one-to-one relationship (e.g., via generic constraints like `IUISettingsView : IView<IUISettingsViewModel>`), which could lead to runtime mismatches if not handled carefully by consuming code.
|
||||
- **Minimal surface area**: The interfaces are intentionally thin—this may be by design for extensibility, but it also means all behavior must be implemented in concrete types or via extension methods (not visible here).
|
||||
- **Namespace co-location**: Both interfaces reside in `DTS.Common.Interface`, suggesting they are part of a shared contract layer; developers should avoid adding UI-specific logic here to preserve layering.
|
||||
- **None identified from source alone.**
|
||||
@@ -0,0 +1,45 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.CommonCore/Interface/TSRAIRGo/INavigationButtonInfo.cs
|
||||
generated_at: "2026-04-16T02:17:51.762048+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "9b7d291a6a236da0"
|
||||
---
|
||||
|
||||
# TSRAIRGo
|
||||
|
||||
## 1. Purpose
|
||||
This module defines the `INavigationButtonInfo` interface, which serves as a contract for navigation button metadata in the TSRAIRGo application. It standardizes how UI components expose and consume information about navigation buttons—such as their identity, display text, tooltip, enabled state, and visual border visibility—enabling decoupled UI rendering and button management logic.
|
||||
|
||||
## 2. Public Interface
|
||||
- **`INavigationButtonInfo` interface**
|
||||
- `NavigationButtonId Id { get; }`
|
||||
Returns the unique identifier for the button (defined in `DTS.Common.Enums.TSRAIRGo.NavigationButtonId`). This property is read-only and must be set at construction time.
|
||||
- `string Text { get; set; }`
|
||||
Gets or sets the primary label text displayed on the button.
|
||||
- `string Tooltip { get; set; }`
|
||||
Gets or sets the tooltip text shown on hover (or equivalent interaction).
|
||||
- `bool Enabled { get; set; }`
|
||||
Gets or sets whether the button is interactive (i.e., not disabled).
|
||||
- `bool ShowBorder { get; set; }`
|
||||
Gets or sets whether a visible border should be rendered around the button.
|
||||
|
||||
## 3. Invariants
|
||||
- `Id` must be non-default (i.e., not `NavigationButtonId.Unknown` or equivalent uninitialized value), though the source does not enforce this—implementers are expected to ensure validity.
|
||||
- `Text` and `Tooltip` may be `null` or empty strings unless constrained by UI consumers (not specified here).
|
||||
- `Enabled` and `ShowBorder` are boolean flags with no stated default values; their initial state depends on implementation.
|
||||
- No ordering or lifecycle guarantees are defined (e.g., `Id` must be set before `Text`).
|
||||
|
||||
## 4. Dependencies
|
||||
- **Depends on**:
|
||||
- `DTS.Common.Enums.TSRAIRGo.NavigationButtonId` (enum, referenced in `Id` property).
|
||||
- **Depended on by**:
|
||||
- UI components or services that consume navigation button metadata (not visible in this file; inferred from naming and namespace).
|
||||
- Likely used by a navigation bar or button manager in the TSRAIRGo UI layer.
|
||||
|
||||
## 5. Gotchas
|
||||
- The interface does not define how `Id` is initialized or validated—implementers must ensure `Id` is set and remains immutable after construction.
|
||||
- No explicit handling is defined for localization; `Text` and `Tooltip` are plain `string`s, suggesting either hardcoded values or external localization logic is applied elsewhere.
|
||||
- `ShowBorder` is a UI presentation flag; its semantics (e.g., when `false`, is the border hidden or rendered differently?) are implementation-specific and not standardized here.
|
||||
- None identified from source alone.
|
||||
@@ -0,0 +1,110 @@
|
||||
---
|
||||
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-16T02:21:59.128274+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "8ded8eec16b04840"
|
||||
---
|
||||
|
||||
# Tags
|
||||
|
||||
## Documentation: Tagging System Interfaces
|
||||
|
||||
### 1. Purpose
|
||||
This module defines core interfaces for a tagging system used across the DTS platform. It establishes contracts for representing tags themselves (`ITag`), associating tags with domain objects (`ITagAssignment`), and enabling objects to manage tag metadata dynamically (`ITagAware`). The interfaces collectively support tagging of diverse entity types (users, groups, templates, etc.) via a unified abstraction, enabling features like filtering, grouping, and metadata association without coupling to specific entity implementations.
|
||||
|
||||
---
|
||||
|
||||
### 2. Public Interface
|
||||
|
||||
#### `TagTypes` enum
|
||||
- **Definition**:
|
||||
```csharp
|
||||
public enum TagTypes
|
||||
{
|
||||
User,
|
||||
Group,
|
||||
Template,
|
||||
TestSetup,
|
||||
Sensors,
|
||||
SensorModels
|
||||
}
|
||||
```
|
||||
- **Behavior**: Defines the set of supported object types that can be assigned tags. Each value corresponds to a distinct entity category in the system.
|
||||
|
||||
#### `ITagAssignment` interface
|
||||
- **Definition**:
|
||||
```csharp
|
||||
public interface ITagAssignment
|
||||
{
|
||||
int ObjectID { get; set; }
|
||||
int TagID { get; set; }
|
||||
TagTypes ObjectType { get; set; }
|
||||
}
|
||||
```
|
||||
- **Behavior**: Represents a many-to-many association between a domain object and a tag. `ObjectID` identifies the tagged entity, `TagID` identifies the tag, and `ObjectType` specifies the entity’s type (from `TagTypes`). Used for persistence and querying tag assignments.
|
||||
|
||||
#### `ITagAware` interface
|
||||
- **Definition**:
|
||||
```csharp
|
||||
public interface ITagAware
|
||||
{
|
||||
void SetTags(string[] tagsText);
|
||||
string[] GetTagsArray();
|
||||
int[] GetTagIDs();
|
||||
void RemoveTags(string[] tagsText);
|
||||
bool ContainsAnyTag(int[] tags);
|
||||
}
|
||||
```
|
||||
- **Behavior**: Enables an object to manage its tag associations.
|
||||
- `SetTags`: Assigns tags by their text representations (likely resolving text to IDs internally).
|
||||
- `GetTagsArray`: Returns the current tag text labels.
|
||||
- `GetTagIDs`: Returns the underlying tag IDs (e.g., for database queries).
|
||||
- `RemoveTags`: Removes specified tags by text.
|
||||
- `ContainsAnyTag`: Checks if *any* of the provided tag IDs are associated with the object.
|
||||
|
||||
#### `ITag` interface
|
||||
- **Definition**:
|
||||
```csharp
|
||||
public interface ITag : ICloneable
|
||||
{
|
||||
int ID { get; set; }
|
||||
string Text { get; set; }
|
||||
bool IsObsolete { get; set; }
|
||||
}
|
||||
```
|
||||
- **Behavior**: Represents a tag entity. `ID` is the database primary key, `Text` is the human-readable label, and `IsObsolete` indicates if the tag is deprecated (e.g., should not be assigned to new objects). Inherits `ICloneable` for duplication support.
|
||||
|
||||
---
|
||||
|
||||
### 3. Invariants
|
||||
- `ITagAssignment.ObjectType` must be one of the defined `TagTypes` values (`User`, `Group`, `Template`, `TestSetup`, `Sensors`, `SensorModels`).
|
||||
- `ITagAssignment.ObjectID` and `ITagAssignment.TagID` must be non-negative integers (implied by `int` type and typical ID semantics).
|
||||
- `ITag.Text` must be non-null and non-empty for valid, non-deprecated tags (though `IsObsolete` may allow empty/placeholder text).
|
||||
- `ITagAware.GetTagsArray()` and `ITagAware.GetTagIDs()` must return arrays of matching length and semantic correspondence (i.e., index `i` in `GetTagsArray()` maps to index `i` in `GetTagIDs()`).
|
||||
- `ITag` instances must be safely clonable via `ICloneable` (shallow or deep, per implementation).
|
||||
|
||||
---
|
||||
|
||||
### 4. Dependencies
|
||||
- **Depends on**:
|
||||
- `System` (via `ICloneable` in `ITag`).
|
||||
- **Depended on by**:
|
||||
- Entities implementing `ITagAware` (e.g., `User`, `Sensor`, `TestSetup`—inferred from `TagTypes`).
|
||||
- Data access or service layers that manage `ITagAssignment` records (e.g., a tag assignment repository).
|
||||
- UI components that render or edit tags (using `ITag` for display and `ITagAware` for interaction).
|
||||
- **Notable**: No direct dependencies on other DTS modules are visible in the source; interfaces are self-contained.
|
||||
|
||||
---
|
||||
|
||||
### 5. Gotchas
|
||||
- **Ambiguity in `SetTags`/`RemoveTags` behavior**: The interfaces do not specify how text-to-ID resolution is performed (e.g., case sensitivity, whitespace handling, or creation of new tags). Implementation details may vary.
|
||||
- **`IsObsolete` semantics**: The interface does not enforce whether obsolete tags can be assigned to new objects or only removed from existing ones. This is likely handled by business logic outside the interfaces.
|
||||
- **`ICloneable` ambiguity**: `ITag` inherits `ICloneable` without specifying whether cloning is shallow or deep. This may cause issues if `ITag` implementations include reference-type fields.
|
||||
- **No concurrency guarantees**: The interfaces provide no indication of thread-safety or locking semantics for concurrent tag modifications.
|
||||
- **No versioning or audit trail**: Interfaces lack fields for tracking creation/modification timestamps or authors, suggesting this is handled externally (e.g., in database tables).
|
||||
|
||||
None identified beyond the above.
|
||||
@@ -0,0 +1,99 @@
|
||||
---
|
||||
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-16T02:19:49.438916+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "adb5cdc8cb4cf74e"
|
||||
---
|
||||
|
||||
# Documentation: Test Metadata Interfaces
|
||||
|
||||
## 1. Purpose
|
||||
This module defines a set of interfaces that represent the schema of three database tables—`TestEngineerDetails`, `CustomerDetails`, and `LabratoryDetails`—used to store metadata about test participants and associated entities. These interfaces serve as data contracts for ORM (e.g., Entity Framework) mapping, enabling strongly-typed access to test-related metadata without exposing underlying database implementation details. They are part of the `DTS.Common.Interface.TestMetaData` namespace and are intended for use across the system wherever test metadata records need to be consumed or persisted.
|
||||
|
||||
## 2. Public Interface
|
||||
|
||||
### `ITestEngineerDetailsDbRecord`
|
||||
Represents a record from the `TestEngineerDetails` table.
|
||||
|
||||
| Member | Type | Description |
|
||||
|--------|------|-------------|
|
||||
| `int TestEngineerId { get; set; }` | Property | Primary key; maps to `TestEngineerId` column. |
|
||||
| `string Name { get; set; }` | Property | General name field; maps to `Name` column. |
|
||||
| `string TestEngineerName { get; set; }` | Property | Full name of the test engineer; maps to `TestEngineerName` column. |
|
||||
| `string TestEngineerPhone { get; set; }` | Property | Phone number of the test engineer; maps to `TestEngineerPhone` column. |
|
||||
| `string TestEngineerFax { get; set; }` | Property | Fax number of the test engineer; maps to `TestEngineerFax` column. |
|
||||
| `string TestEngineerEmail { get; set; }` | Property | Email address of the test engineer; maps to `TestEngineerEmail` column. |
|
||||
| `bool LocalOnly { get; set; }` | Property | Indicates if the record is local-only (not shared); maps to `LocalOnly` column. |
|
||||
| `DateTime LastModified { get; set; }` | Property | Timestamp of last modification; maps to `LastModified` column. |
|
||||
| `string LastModifiedBy { get; set; }` | Property | User identifier who last modified the record; maps to `LastModifiedBy` column. |
|
||||
| `int Version { get; set; }` | Property | Concurrency token for optimistic locking; maps to `Version` column. |
|
||||
|
||||
### `ICustomerDetailsDbRecord`
|
||||
Represents a record from the `CustomerDetails` table.
|
||||
|
||||
| Member | Type | Description |
|
||||
|--------|------|-------------|
|
||||
| `int CustomerId { get; set; }` | Property | Primary key; maps to `CustomerId` column. |
|
||||
| `string Name { get; set; }` | Property | General name field; maps to `Name` column. |
|
||||
| `string CustomerName { get; set; }` | Property | Full name of the customer; maps to `CustomerName` column. |
|
||||
| `string CustomerTestRefNumber { get; set; }` | Property | Reference number assigned by the customer for the test; maps to `CustomerTestRefNumber` column. |
|
||||
| `string ProjectRefNumber { get; set; }` | Property | Project reference number; maps to `ProjectRefNumber` column. |
|
||||
| `string CustomerOrderNumber { get; set; }` | Property | Order number from the customer; maps to `CustomerOrderNumber` column. |
|
||||
| `string CustomerCostUnit { get; set; }` | Property | Cost center or unit associated with the customer; maps to `CustomerCostUnit` column. |
|
||||
| `bool LocalOnly { get; set; }` | Property | Indicates if the record is local-only; maps to `LocalOnly` column. |
|
||||
| `DateTime LastModified { get; set; }` | Property | Timestamp of last modification; maps to `LastModified` column. |
|
||||
| `string LastModifiedBy { get; set; }` | Property | User identifier who last modified the record; maps to `LastModifiedBy` column. |
|
||||
| `int Version { get; set; }` | Property | Concurrency token for optimistic locking; maps to `Version` column. |
|
||||
|
||||
### `ILabratoryDetailsDbRecord`
|
||||
Represents a record from the `LabratoryDetails` table.
|
||||
|
||||
| Member | Type | Description |
|
||||
|--------|------|-------------|
|
||||
| `int LabratoryId { get; set; }` | Property | Primary key; maps to `LabratoryId` column. |
|
||||
| `string Name { get; set; }` | Property | General name field; maps to `Name` column. |
|
||||
| `string LabratoryName { get; set; }` | Property | Full name of the laboratory; maps to `LabratoryName` column. |
|
||||
| `string LabratoryContactName { get; set; }` | Property | Name of the laboratory contact person; maps to `LabratoryContactName` column. |
|
||||
| `string LabratoryContactPhone { get; set; }` | Property | Phone number of the laboratory contact; maps to `LabratoryContactPhone` column. |
|
||||
| `string LabratoryContactFax { get; set; }` | Property | Fax number of the laboratory contact; maps to `LabratoryContactFax` column. |
|
||||
| `string LabratoryContactEmail { get; set; }` | Property | Email address of the laboratory contact; maps to `LabratoryContactEmail` column. |
|
||||
| `string LabratoryTestRefNumber { get; set; }` | Property | Reference number assigned by the laboratory for the test; maps to `LabratoryTestRefNumber` column. |
|
||||
| `string LabratoryProjectRefNumber { get; set; }` | Property | Project reference number from the laboratory; maps to `LabratoryProjectRefNumber` column. |
|
||||
| `bool LocalOnly { get; set; }` | Property | Indicates if the record is local-only; maps to `LocalOnly` column. |
|
||||
| `DateTime LastModified { get; set; }` | Property | Timestamp of last modification; maps to `LastModified` column. |
|
||||
| `string LastModifiedBy { get; set; }` | Property | User identifier who last modified the record; maps to `LastModifiedBy` column. |
|
||||
| `int Version { get; set; }` | Property | Concurrency token for optimistic locking; maps to `Version` column. |
|
||||
|
||||
## 3. Invariants
|
||||
- Each interface defines a single primary key property (`TestEngineerId`, `CustomerId`, `LabratoryId`) annotated with `[Key]` and mapped to a column of the same name (via `[Column("...")]`).
|
||||
- All interfaces include the following shared metadata fields:
|
||||
- `Name` (string, not nullable per column mapping)
|
||||
- `LocalOnly` (boolean)
|
||||
- `LastModified` (non-nullable `DateTime`)
|
||||
- `LastModifiedBy` (string, not nullable per column mapping)
|
||||
- `Version` (non-nullable `int`)
|
||||
- The `Name` property is mapped to the same column name across all three interfaces, suggesting a common convention for a generic display name.
|
||||
- The `LocalOnly` field is consistently defined as a `bool` and mapped to the `LocalOnly` column in all tables, implying a uniform business rule for record scope (local vs. shared).
|
||||
- All string properties are nullable by default (no `[Required]` attribute), but their column mappings do not explicitly indicate nullability—implementation may assume non-nullability based on DB schema, but this is not enforced in the interface.
|
||||
|
||||
## 4. Dependencies
|
||||
- **Dependencies of this module**:
|
||||
- `System.ComponentModel.DataAnnotations` (for `[Key]`, `[Column]`)
|
||||
- `System` (for `DateTime`, `string`, `bool`, `int`)
|
||||
- **Depended upon by**:
|
||||
- Any module that consumes or persists test metadata records (e.g., data access layers, services, UI models).
|
||||
- Likely used in conjunction with Entity Framework or similar ORM (e.g., as `DbSet<ITestEngineerDetailsDbRecord>`—though interfaces cannot be directly mapped by EF, they likely serve as contracts for concrete entity classes).
|
||||
- No direct references to other modules are visible in the source; dependencies are inferred from usage context.
|
||||
|
||||
## 5. Gotchas
|
||||
- **Typo in namespace/table name**: The interface `ILabratoryDetailsDbRecord` and its associated table (`LabratoryDetails`) use the misspelled word *“Labratory”* instead of *“Laboratory”*. This is likely intentional for legacy consistency but may cause confusion.
|
||||
- **Redundant name fields**: Each interface includes both a generic `Name` and a more specific name field (e.g., `TestEngineerName`, `CustomerName`, `LabratoryName`). The distinction between these fields is not documented—consumers must infer semantics from naming.
|
||||
- **Missing nullability annotations**: While `[Column]` attributes specify column names, they do not indicate whether columns allow `NULL`. For example, `LastModifiedBy` is mapped but may be nullable in the database despite the lack of `[Required]`.
|
||||
- **Concurrency handling**: The `Version` field is present but its semantics (e.g., row version vs. manual increment) are not specified in the interface.
|
||||
- **No validation attributes**: Despite using `System.ComponentModel.DataAnnotations`, no `[Required]`, `[StringLength]`, or `[DataType]` attributes are applied beyond `[Key]` and `[Column]`, so consumers cannot rely on metadata-driven validation.
|
||||
- **No inheritance or shared base interface**: Despite overlapping fields (e.g., `Name`, `LocalOnly`, `LastModified`, `LastModifiedBy`, `Version`), there is no common interface or abstract class—this may lead to duplication in data access or mapping logic.
|
||||
- **None identified from source alone.**
|
||||
@@ -0,0 +1,48 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.CommonCore/Interface/TestModule/ITestModuleView.cs
|
||||
- Common/DTS.CommonCore/Interface/TestModule/ITestModuleViewModel.cs
|
||||
generated_at: "2026-04-16T02:18:19.975880+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "20d420d686cdf3c6"
|
||||
---
|
||||
|
||||
# TestModule
|
||||
|
||||
## 1. Purpose
|
||||
This module defines the core view and view-model interfaces for a test-related UI component within the DTS system. It serves as a contract layer separating UI presentation logic (via `ITestModuleView`) from its data-binding and state management (via `ITestModuleViewModel`), enabling test module implementations to integrate with the broader DTS framework’s MVVM (Model-View-ViewModel) architecture. It extends base abstractions (`IBaseView`, `IBaseViewModel`) to provide a standardized extension point for test-specific UI functionality—though the interfaces themselves are minimal and intentionally leave implementation details to concrete consumers.
|
||||
|
||||
## 2. Public Interface
|
||||
|
||||
### `ITestModuleView`
|
||||
- **Signature**: `public interface ITestModuleView : IBaseView { }`
|
||||
- **Behavior**: Marks a UI view class as belonging to the test module. Inherits from `IBaseView` (defined in `DTS.Common.Base`), but adds no additional members. Its sole purpose is type-based identification and framework integration (e.g., for dependency injection, view discovery, or navigation).
|
||||
|
||||
### `ITestModuleViewModel`
|
||||
- **Signature**: `public interface ITestModuleViewModel : IBaseViewModel { List<Assembly> AssemblyList { get; set; } }`
|
||||
- **Behavior**: Represents the view-model for the test module. Extends `IBaseViewModel` and exposes a single property, `AssemblyList`, which holds a list of `Assembly` instances (from `System.Reflection`). This list is likely used to enumerate or inspect test assemblies at runtime (e.g., for test discovery, loading, or execution). The property is read-write, implying the view-model is responsible for both consuming and potentially updating the list.
|
||||
|
||||
## 3. Invariants
|
||||
- `ITestModuleView` and `ITestModuleViewModel` must be implemented together in a valid MVVM pairing (e.g., a view and its corresponding view-model).
|
||||
- `AssemblyList` in `ITestModuleViewModel` must be non-null (as it is a non-nullable reference type in C# 8+ with enabled annotations), though the source does not explicitly enforce initialization. Implementations must ensure it is initialized before use to avoid `NullReferenceException`.
|
||||
- The `AssemblyList` property is expected to contain only valid `Assembly` instances (e.g., loaded test assemblies), though no validation is performed by the interface itself.
|
||||
- No ordering or uniqueness guarantees are specified for `AssemblyList`; implementations may assume arbitrary order and potential duplicates unless otherwise constrained by consuming code.
|
||||
|
||||
## 4. Dependencies
|
||||
- **Depends on**:
|
||||
- `DTS.Common.Base` (specifically `IBaseView` and `IBaseViewModel`, though their definitions are not provided here).
|
||||
- `System.Collections.Generic` (for `List<T>`).
|
||||
- `System.Reflection` (for `Assembly`).
|
||||
- **Depended on by**:
|
||||
- Unknown from this source alone. Likely consumed by:
|
||||
- A test module implementation (e.g., `TestModuleView`, `TestModuleViewModel` classes).
|
||||
- A DI container or view-resolution framework (e.g., to bind views to view-models).
|
||||
- Test orchestration or discovery services that operate on `ITestModuleViewModel` instances.
|
||||
|
||||
## 5. Gotchas
|
||||
- **Ambiguity in `AssemblyList` semantics**: The purpose of `AssemblyList` is not documented—e.g., whether it represents *loaded* test assemblies, *candidate* assemblies for loading, or assemblies to be *unloaded*. Its mutability (`set` accessor) suggests external code may replace the entire list, but this is not guaranteed to be thread-safe.
|
||||
- **No lifecycle management**: The interfaces provide no methods for initialization, cleanup, or state transitions (e.g., `Load`, `Unload`, `ExecuteTest`). These are likely handled by `IBaseViewModel` or external orchestrators, but this is not explicit here.
|
||||
- **Minimal interface surface**: The interfaces are intentionally sparse, which may indicate they are placeholders for future expansion or that test-specific logic resides elsewhere (e.g., in concrete implementations or extension methods).
|
||||
- **No nullability annotations**: While `List<Assembly>` is non-nullable, the list *elements* are not annotated for nullability. Implementations must decide whether `null` assemblies are permitted (likely not).
|
||||
- **None identified from source alone.**
|
||||
@@ -0,0 +1,96 @@
|
||||
---
|
||||
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-16T02:26:15.632629+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "f7166919537b0724"
|
||||
---
|
||||
|
||||
# TestSetups
|
||||
|
||||
## Documentation: TestSetups Module
|
||||
|
||||
### 1. Purpose
|
||||
This module defines a set of interfaces that model test setup data structures and UI/viewmodel abstractions within the DTS (Data Acquisition and Test System) platform. It serves as the contract layer for representing hardware configuration (DAS, sensors), regions of interest (ROIs), calculated channels, and ISF (Instrumented Sensor File) format specifications. These interfaces enable decoupled data handling across layers—particularly for persistence, UI binding, and file I/O—while enforcing domain-specific constraints like channel ordering, ROI definitions, and sensor calibration metadata.
|
||||
|
||||
### 2. Public Interface
|
||||
|
||||
#### Interfaces (No concrete implementations provided in source)
|
||||
|
||||
| Interface | Signature | Behavior |
|
||||
|-----------|-----------|----------|
|
||||
| `ITestSetupsView` | `interface ITestSetupsView : IBaseView` | Marker interface for the view layer in the test setups feature. Inherits from `IBaseView`. |
|
||||
| `ITestSetupsViewModel` | `interface ITestSetupsViewModel : IBaseViewModel` | Marker interface for the viewmodel layer in the test setups feature. Inherits from `IBaseViewModel`. |
|
||||
| `ITestDASOrder` | `interface ITestDASOrder` | Allows DAS (Data Acquisition System) instances to be ordered within a test setup. Defines a single property: `int DASIndex { get; set; }`. |
|
||||
| `IROIPeriodChannelRecord` | `interface IROIPeriodChannelRecord` | Represents a row in the `ROIPeriodChannels` database table. Properties: `int TestSetupROIId`, `string ChannelName`. |
|
||||
| `ITestSetupHardwareRecord` | `interface ITestSetupHardwareRecord` | Represents a row in the test setup hardware configuration table. Properties: `int DASId`, `int TestSetupId`, `bool AddDAS`, `int SamplesPerSecond`, `bool IsClockMaster`, `int AntiAliasFilterRate`, `byte PTPDomainId`. |
|
||||
| `ITestSetupROIRecord` | `interface ITestSetupROIRecord` | Represents a row in the `TestSetupROIs` database table. Properties: `int TestSetupROIId`, `int TestSetupId`, `string Suffix`, `double ROIStart`, `double ROIEnd`, `bool IsEnabled`, `bool IsDefault`. |
|
||||
| `ICalculatedChannelRecord` | `interface ICalculatedChannelRecord` | Represents a calculated channel record in the database. Properties: `string Name`, `string TestSetupName`, `int Id`, `Operations Operation`, `string CalculatedValueCode`, `string[] InputChannelIds`, `string CFCForInputChannels`, `string ChannelFilterClassForOutput`, `int TestSetupId`, `bool ViewInRealtime`, `int ClipLength`. |
|
||||
| `IISFFile` | `interface IISFFile` | Models an ISF file structure (used for sensor calibration/sensor definition files). Properties: `char[] HeaderLine1`, `char[] TestSetupName`, `short NumberOfRecords { get }`, `char[] TestType`, `char[] TestDivision`, `char[] TCFile`, `char[] HeaderLine2`, `char[] HeaderLine3`, `IISFSensorRecord[] Records`. Methods: `void AddRecord(IISFSensorRecord record)`, `void WriteToFile(string pathToFile)`, `void AddSensors(ISensorData[] sensors)`. |
|
||||
| `IISFSensorRecord` | `interface IISFSensorRecord` | Models a 4-record (320-byte) ISF sensor entry. Contains many fixed-width `char[]` fields with precise offsets (e.g., `DataChannelNumber` at char 7, length 5). Methods: `void SetDataChannelNumber(short value)`, `void SetCapacity(double)`, `double GetCapacity()`, `void SetSensitivity(double)`, `double GetSensitivity()`, `void SetBridgeResistance(double)`, `void SetC1(double)`, `double GetC1()`, `void SetC2(double)`, `void SetC3(double)`, `void SetSensorComment(string)`, `void Write(BinaryWriter)`, `void SetSensor(ISensorData)`. |
|
||||
| `Operations` (enum) | `enum Operations` | Defines supported calculated channel operations: `SUM`, `AVERAGE`, `IRTRACC3D`, `IRTRACC3D_ABDOMEN`, `IRTRACC3D_LOWERTHORAX`, `Resultant`, `HIC`. Each has a `[DescriptionResource]` attribute for localization. |
|
||||
| `ConstantsAndEnums` (nested abstract class) | `abstract class ConstantsAndEnums` | Defines constants and enums used by `IISFFile`: `RECORD_LENGTH = 80`, `ISFKnownChannelTypes` enum (`VS`, `VU`, `SB`, `TI`, `TC`, `CT`, `XP`, `P4`, `VF`, `NB`, `EX`). |
|
||||
|
||||
### 3. Invariants
|
||||
|
||||
- **ISF File Format Constraints**
|
||||
- All `char[]` fields in `IISFSensorRecord` have fixed lengths and byte offsets (e.g., `TestSetupName` starts at char 7, length 8; `NumberOfRecords` is 5 chars starting at char 15).
|
||||
- `RECORD_LENGTH` is strictly 80 bytes per record; sensor records consist of exactly 4 records.
|
||||
- `NumberOfRecords` is read-only and must reflect the count of `Records` in the file.
|
||||
- `Sensitivity` and `C1`/`C2`/`C3` fields store scaled values (e.g., sensitivity is stored as V/1000; polynomial coefficients are stored as /1000).
|
||||
- `TOMConfigurationName` defaults to `"STANDARD"`; other values are not currently supported.
|
||||
- `SensorType` must contain `"N/O"` or `"N/C"` for digital inputs.
|
||||
|
||||
- **Test Setup Data Invariants**
|
||||
- `ITestSetupROIRecord.IsEnabled` and `IsDefault` are boolean flags; only one ROI per test setup may be `IsDefault = true`.
|
||||
- `ITestSetupHardwareRecord.IsClockMaster` indicates which DAS provides timing; only one DAS per test setup should be master.
|
||||
- `InputChannelIds` in `ICalculatedChannelRecord` is a CSV-separated list encoded as `string[]` (note: type mismatch between description and property type—see *Gotchas*).
|
||||
- `ClipLength` applies only to certain `Operations` (e.g., max over a clip), but no enforcement is present in the interface.
|
||||
|
||||
- **Naming & IDs**
|
||||
- `TestSetupId` appears consistently across `ITestSetupHardwareRecord`, `ITestSetupROIRecord`, and `ICalculatedChannelRecord` as the foreign key to a test setup.
|
||||
- `TestSetupROIId` is the primary key for ROIs and referenced by `IROIPeriodChannelRecord.TestSetupROIId`.
|
||||
|
||||
### 4. Dependencies
|
||||
|
||||
- **Internal Dependencies**
|
||||
- `DTS.Common.Base`: All view/viewmodel interfaces (`IBaseView`, `IBaseViewModel`) are defined here.
|
||||
- `DTS.Common.Enums.DASFactory.DFConstantsAndEnums`: Referenced in `ITestSetupHardwareRecord` (e.g., for PTP domain IDs).
|
||||
- `DTS.Common.Interface.Sensors`: `IISFFile` depends on `ISensorData` (from this namespace).
|
||||
- `System.ComponentModel`: Used for `TypeConverter` attribute on `Operations` enum.
|
||||
- `System.IO`: Used for `BinaryWriter` in `IISFSensorRecord.Write`.
|
||||
|
||||
- **External Dependencies**
|
||||
- No external (non-DTS) libraries are imported beyond .NET base types.
|
||||
- Localization resources (e.g., `"CalculatedChannel_Sum"`) are referenced via `[DescriptionResource]` but not defined in this module.
|
||||
|
||||
### 5. Gotchas
|
||||
|
||||
- **Type Mismatch in `ICalculatedChannelRecord.InputChannelIds`**
|
||||
The property is declared as `string[]`, but the XML comment states it is a "CSV separated list of channel ids". This suggests the implementation likely stores a *single* CSV string (e.g., `"1,2,3"`), not an array. Developers must clarify whether this is a documentation error or if the array is used for intermediate processing.
|
||||
|
||||
- **ISF Record Field Offsets Are Implicit**
|
||||
Offsets and lengths of `char[]` fields are only documented in comments (e.g., `"starts at character 15, 5 characters long"`). There is no runtime validation or helper to enforce these constraints—implementations must manually parse/write at exact byte positions.
|
||||
|
||||
- **`NumberOfRecords` Is Read-Only but Must Be Updated**
|
||||
`IISFFile.NumberOfRecords` is read-only, yet `AddRecord` must update it. This implies the implementation must internally track and expose the count, but the interface does not enforce consistency (e.g., if `Records` array is modified directly).
|
||||
|
||||
- **`ISFKnownChannelTypes.TI`/`TC` Are Non-Analog**
|
||||
The enum includes `TI` and `TC` as known channel types, but comments note they are "not analog (TOM)". Implementations must handle these as special cases (e.g., digital triggers), not standard analog channels.
|
||||
|
||||
- **`SetSensorComment` Aggregates Three Fields**
|
||||
`SetSensorComment(string)` writes to `CommentPart1`, `CommentPart2`, and `CommentPart3` (total 70 chars: 15+40+15). There is no truncation or padding behavior specified—implementations must decide how to handle overflow/underflow.
|
||||
|
||||
- **No Validation on `ROIStart`/`ROIEnd`**
|
||||
`ITestSetupROIRecord` does not enforce `ROIStart < ROIEnd` or that values are non-negative. Invalid ranges may propagate to downstream logic.
|
||||
|
||||
- **`PTPDomainId` Is `byte`**
|
||||
While `byte` is appropriate for PTP domain IDs (0–255), no validation ensures the value is within valid range for the target PTP implementation.
|
||||
@@ -0,0 +1,71 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.CommonCore/Interface/TestSetups/CachedItemsList/ICachedItemsListView.cs
|
||||
- Common/DTS.CommonCore/Interface/TestSetups/CachedItemsList/ICachedItem.cs
|
||||
- Common/DTS.CommonCore/Interface/TestSetups/CachedItemsList/ICachedItemsListViewModel.cs
|
||||
generated_at: "2026-04-16T02:36:44.484475+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "83cb92d5e0360700"
|
||||
---
|
||||
|
||||
# CachedItemsList
|
||||
|
||||
### **Purpose**
|
||||
This module defines the core interfaces for a cached items list feature within the test setup infrastructure. It establishes a contract for representing and managing cached test setup items (e.g., sensors, calibrations, hardware) along with metadata about their cache state and database synchronization status. The module enables separation of concerns between view, view model, and data representation—specifically supporting UI layers that display and manage cached items while tracking freshness and completeness relative to the underlying database.
|
||||
|
||||
---
|
||||
|
||||
### **Public Interface**
|
||||
|
||||
#### `ICachedItemsListView : IBaseView`
|
||||
- **Purpose**: Marker interface for the view layer in the cached items list feature. Extends `IBaseView`, implying it participates in a standard view/view-model pattern (likely MVVM). No additional members are defined here; implementation details are delegated to concrete view classes.
|
||||
|
||||
#### `ICachedItem`
|
||||
- **Purpose**: Represents a single cached item with metadata about its identity, type, and synchronization state.
|
||||
- **Properties**:
|
||||
- `string Name { get; }` — Human-readable identifier of the item.
|
||||
- `string ObjectType { get; }` — Type classification of the item (e.g., `"Sensor"`, `"Calibration"`, `"Hardware"`).
|
||||
- `DateTime CacheTime { get; }` — Timestamp when the item was last cached (i.e., loaded into the cache).
|
||||
- `DateTime DBTime { get; }` — Timestamp of the item’s last modification in the database. **Special semantics**: `DateTime.MinValue` indicates the item no longer exists in the database; otherwise, it reflects the `LastModified` time from the database.
|
||||
|
||||
#### `ICachedItemsListViewModel : IBaseViewModel`
|
||||
- **Purpose**: View model responsible for managing the cached items list, updating its contents based on live data sources, and exposing state about cache validity and missing components.
|
||||
- **Properties**:
|
||||
- `ICachedItemsListView View { get; set; }` — Reference to the associated view; follows standard view-model binding pattern.
|
||||
- `ICachedItem[] CachedItems { get; set; }` — Array of cached items currently managed by the view model.
|
||||
- **Methods**:
|
||||
- `bool SetCachedItems(ISensorData[] sensors, ISensorCalibration[] sensorCalibrations, IDASHardware[] hardware, IDASHardware[] allDAS)` — Updates the internal `CachedItems` array by reconciling the provided live data (`sensors`, `sensorCalibrations`, `hardware`) against the current cache. Returns `true` if the cache was successfully updated; `false` otherwise (e.g., due to invalid input or internal error).
|
||||
- **Properties (read-only state indicators)**:
|
||||
- `bool HasOutofDateCachedItems { get; }` — `true` if any cached item’s `DBTime` predates its `CacheTime`, indicating stale data.
|
||||
- `bool HasMissingSensors { get; }` — `true` if any sensor referenced in the current setup is no longer present in the database (i.e., has `DBTime == DateTime.MinValue` in its corresponding `ICachedItem`).
|
||||
|
||||
---
|
||||
|
||||
### **Invariants**
|
||||
- `ICachedItem.DBTime == DateTime.MinValue` **iff** the item is no longer present in the database.
|
||||
- `ICachedItem.CacheTime` must be ≥ `ICachedItem.DBTime` for items still present in the database (i.e., `DBTime != DateTime.MinValue`).
|
||||
- `ICachedItemsListViewModel.CachedItems` must be populated *only* via the `SetCachedItems` method; direct mutation of the array is discouraged (though not enforced by the interface).
|
||||
- `ICachedItemsListViewModel.SetCachedItems` must compare the provided live data (`sensors`, `sensorCalibrations`, `hardware`) against `allDAS` to determine which items are obsolete or missing.
|
||||
- `HasOutofDateCachedItems` and `HasMissingSensors` must be computed *based on the current `CachedItems` array* and updated after each `SetCachedItems` call.
|
||||
|
||||
---
|
||||
|
||||
### **Dependencies**
|
||||
- **Depends on**:
|
||||
- `DTS.Common.Base.IBaseView`, `DTS.Common.Base.IBaseViewModel` — Base interfaces for view/view-model pattern.
|
||||
- `DTS.Common.Interface.DataRecorders.ISensorData`, `ISensorCalibration` — Data types for sensor and calibration records.
|
||||
- `DTS.Common.Interface.Sensors.IDASHardware` — Hardware metadata interface.
|
||||
- **Depended on by**:
|
||||
- Concrete implementations of `ICachedItemsListView` (e.g., WPF/WinForms UI controls).
|
||||
- Concrete implementations of `ICachedItemsListViewModel` (e.g., test setup logic that populates/refreshes the cached list).
|
||||
- Likely consumed by higher-level test setup orchestration modules (inferred from naming and usage of `IDASHardware[] allDAS` in `SetCachedItems`).
|
||||
|
||||
---
|
||||
|
||||
### **Gotchas**
|
||||
- `DBTime == DateTime.MinValue` is used as a sentinel value to indicate *deletion* from the database—not merely absence from the current cache. This is non-standard and could be confused with uninitialized timestamps.
|
||||
- `SetCachedItems` accepts *four* arrays, but only `sensors`, `sensorCalibrations`, and `hardware` are used to populate the cache; `allDAS` is likely used for validation (e.g., checking if any `hardware` item is not in `allDAS`). The exact reconciliation logic is not visible here.
|
||||
- The `CachedItems` property is read-write (`{ get; set; }`), implying external code *could* replace the entire array. This bypasses validation in `SetCachedItems` and may break invariants (e.g., `HasOutofDateCachedItems` may become stale).
|
||||
- No explicit thread-safety guarantees are defined; concurrent access to `CachedItems` or `SetCachedItems` may cause race conditions.
|
||||
- None of the interfaces expose events (e.g., `PropertyChanged`), suggesting eventing is handled via `IBaseViewModel`/`IBaseView` or external mechanisms (e.g., reactive extensions).
|
||||
@@ -0,0 +1,55 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.CommonCore/Interface/TestSetups/Diagnostics/IDiagnosticsTreeView.cs
|
||||
- Common/DTS.CommonCore/Interface/TestSetups/Diagnostics/IDiagnosticsViewModel.cs
|
||||
generated_at: "2026-04-16T02:36:28.733646+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "12ee399c3ee57cf2"
|
||||
---
|
||||
|
||||
# Diagnostics
|
||||
|
||||
### 1. **Purpose**
|
||||
This module defines the core interfaces (`IDiagnosticsTreeView` and `IDiagnosticsViewModel`) for a diagnostics view-model/view architecture within the test setup diagnostics subsystem. It establishes a contract for a MVVM-style pairing where `IDiagnosticsViewModel` manages the logic and state for diagnostics presentation, while `IDiagnosticsTreeView` represents the UI layer (likely a tree-structured control for displaying hierarchical diagnostic data). The interfaces extend base abstractions (`IBaseView`, `IBaseViewModel`) to integrate with a larger framework for test setup UI components.
|
||||
|
||||
---
|
||||
|
||||
### 2. **Public Interface**
|
||||
|
||||
#### `IDiagnosticsTreeView`
|
||||
- **Signature**: `public interface IDiagnosticsTreeView : IBaseView { }`
|
||||
- **Behavior**: Represents the view layer for diagnostics UI. As a marker interface extending `IBaseView`, it implies conformance to a base view contract (e.g., lifecycle, binding, or rendering responsibilities), but no additional members are defined in this source. Its purpose is to serve as a strongly-typed reference for the view in the view-model.
|
||||
|
||||
#### `IDiagnosticsViewModel`
|
||||
- **Signature**: `public interface IDiagnosticsViewModel : IBaseViewModel`
|
||||
- **Property**: `IDiagnosticsTreeView View { get; set; }`
|
||||
- Gets or sets the associated view instance. Enables two-way binding or view-view-model coordination.
|
||||
- **Method**: `void Unset();`
|
||||
- Releases or clears the view reference (likely to break circular references, prepare for disposal, or reset state). Behavior is not further specified beyond its signature.
|
||||
|
||||
---
|
||||
|
||||
### 3. **Invariants**
|
||||
- `IDiagnosticsViewModel.View` must be assignable to an instance implementing `IDiagnosticsTreeView`.
|
||||
- The `Unset()` method is expected to clear or invalidate the `View` reference (e.g., set it to `null`), though the exact behavior is not specified in the source.
|
||||
- Both interfaces inherit from base interfaces (`IBaseView`, `IBaseViewModel`), implying adherence to their respective contracts (e.g., lifecycle management, data binding support), but those are defined externally and not detailed here.
|
||||
- *No validation rules, ordering guarantees, or state constraints are explicitly defined in the provided sources.*
|
||||
|
||||
---
|
||||
|
||||
### 4. **Dependencies**
|
||||
- **Internal Dependencies**:
|
||||
- `DTS.Common.Base` namespace (specifically `IBaseView` and `IBaseViewModel`).
|
||||
- **External Dependencies**:
|
||||
- `IDiagnosticsTreeView` and `IDiagnosticsViewModel` are likely consumed by concrete implementations (e.g., `DiagnosticsViewModel : IDiagnosticsViewModel`) and a DI/container or view-hosting layer (e.g., WPF/WinForms UI framework).
|
||||
- The module is part of `DTS.CommonCore`, suggesting it is a shared dependency for test setup diagnostics components across the codebase.
|
||||
- **Dependents**: Not explicitly stated, but any diagnostics UI module (e.g., a diagnostics window or panel) would depend on these interfaces for decoupled view-model binding.
|
||||
|
||||
---
|
||||
|
||||
### 5. **Gotchas**
|
||||
- **Ambiguity in `Unset()` semantics**: The interface does not specify whether `Unset()` disposes resources, nullifies the `View` property, or triggers cleanup events. Implementers must infer or document this behavior.
|
||||
- **No explicit event or data-binding contract**: While `IBaseViewModel` likely implies change notification (e.g., `INotifyPropertyChanged`), this is not confirmed here. Consumers should verify base interface contracts.
|
||||
- **Minimal interface surface**: The interfaces are intentionally thin (likely to reduce coupling), but this means critical behavior (e.g., how diagnostics data is loaded or updated) is deferred to implementations.
|
||||
- **None identified from source alone.**
|
||||
@@ -0,0 +1,49 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.CommonCore/Interface/TestSetups/Imports/TTS/AnalogChannels/IAnalogChannelsView.cs
|
||||
- Common/DTS.CommonCore/Interface/TestSetups/Imports/TTS/AnalogChannels/IAnalogChannelsViewModel.cs
|
||||
generated_at: "2026-04-16T02:37:15.292896+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "8c6903018ff71181"
|
||||
---
|
||||
|
||||
# AnalogChannels
|
||||
|
||||
### 1. Purpose
|
||||
This module defines the contract for the *Analog Channels* view-model and view layers within the TTS (presumably *Test Tool Suite*) import subsystem of the test setup framework. It establishes a minimal MVVM-style separation for managing analog channel configuration UI, where `IAnalogChannelsView` represents the UI layer and `IAnalogChannelsViewModel` encapsulates the logic and state, including validation. Its role is to provide a standardized interface for binding and interaction between UI and business logic, without implementing any behavior itself—only specifying the required contract.
|
||||
|
||||
### 2. Public Interface
|
||||
- **`IAnalogChannelsView`**
|
||||
*Interface*
|
||||
- Inherits from `IBaseView`.
|
||||
- Serves as the contract for the view (e.g., a WPF or WinForms UI control/page) responsible for rendering analog channel configuration.
|
||||
- Contains no members beyond the inherited `IBaseView` contract (not shown here).
|
||||
|
||||
- **`IAnalogChannelsViewModel`**
|
||||
*Interface*
|
||||
- Inherits from `IBaseViewModel`.
|
||||
- **`IAnalogChannelsView View { get; set; }`**
|
||||
Gets or sets the associated view instance. Enables two-way binding or manual view-viewmodel linking.
|
||||
- **`string Validate()`**
|
||||
Performs validation of the current state (e.g., user-entered analog channel settings). Returns an empty string (`""`) if valid; otherwise, returns a non-empty error message describing the first validation failure. *Note: Return type is `string`, not `bool` or `ValidationResult`—suggesting a simple, message-based validation scheme.*
|
||||
|
||||
### 3. Invariants
|
||||
- `IAnalogChannelsView` must be assignable to `IAnalogChannelsViewModel.View`.
|
||||
- `Validate()` must be idempotent and side-effect-free *with respect to state changes* (i.e., calling it multiple times should not alter the viewmodel’s internal state beyond what is implied by its return value).
|
||||
- The `View` property may be `null` (not explicitly constrained), but typical usage likely requires it to be set before interaction (e.g., before calling `Validate()` or during UI initialization).
|
||||
- No ordering guarantees are specified for property access (e.g., `View` may be set before or after `Validate()` calls), though conventionally the view would be assigned before validation occurs.
|
||||
|
||||
### 4. Dependencies
|
||||
- **Depends on**:
|
||||
- `DTS.Common.Base.IBaseView` and `DTS.Common.Base.IBaseViewModel` (from `DTS.Common.Base` namespace).
|
||||
- **Is depended on by**:
|
||||
- Likely consumed by higher-level test setup or import orchestration components (e.g., a `TTSImportManager` or similar), though not visible in the provided source.
|
||||
- Concrete implementations of `IAnalogChannelsView` and `IAnalogChannelsViewModel` would reside elsewhere in the codebase (not included here).
|
||||
|
||||
### 5. Gotchas
|
||||
- The `Validate()` method returns a `string`, but the source does not clarify whether the return value is *always* an error message (non-empty on failure, empty on success) or could include warnings/informational text. Common practice suggests the former, but this is not guaranteed.
|
||||
- No documentation on thread-safety: it is unclear whether `Validate()` or `View` property access is safe to call from non-UI threads.
|
||||
- `IAnalogChannelsView` and `IAnalogChannelsViewModel` are *empty contracts* beyond inheritance and the two members in the viewmodel—no data-binding properties (e.g., `ChannelCount`, `SelectedChannel`) are defined here. Actual data exposure must occur via `IBaseViewModel` or concrete implementations.
|
||||
- The namespace `Imports.TTS` suggests this is part of an *import* workflow; it is unclear whether this module is also used for *export* or *configuration* scenarios.
|
||||
- **None identified from source alone.**
|
||||
@@ -0,0 +1,49 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.CommonCore/Interface/TestSetups/Imports/TTS/DIChannels/IDigitalInputChannelsView.cs
|
||||
- Common/DTS.CommonCore/Interface/TestSetups/Imports/TTS/DIChannels/IDigitalInputChannelsViewModel.cs
|
||||
generated_at: "2026-04-16T02:37:04.282971+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "439e5f65da5823d2"
|
||||
---
|
||||
|
||||
# DIChannels
|
||||
|
||||
## 1. Purpose
|
||||
This module defines the foundational view and view-model interfaces for the digital input channels section of the TTS (presumably *Test Tool Suite*) import subsystem within the DTS (Device Test System) framework. Its role is to establish a clean separation of concerns between UI representation (`IDigitalInputChannelsView`) and business logic/state management (`IDigitalInputChannelsViewModel`) using the MVVM (Model-View-ViewModel) pattern, building upon the base view/view-model abstractions (`IBaseView`, `IBaseViewModel`) provided by `DTS.Common.Base`.
|
||||
|
||||
## 2. Public Interface
|
||||
- **`IDigitalInputChannelsView`**
|
||||
*Interface*: `IDigitalInputChannelsView : IBaseView`
|
||||
*Behavior*: Represents the UI layer contract for digital input channels. As a view interface, it is intended to be implemented by concrete UI components (e.g., WPF user controls, WinForms panels). It inherits `IBaseView`, implying standard view lifecycle or binding behavior (e.g., `DataContext` management), though specifics are defined in the base interface.
|
||||
|
||||
- **`IDigitalInputChannelsViewModel`**
|
||||
*Interface*: `IDigitalInputChannelsViewModel : IBaseViewModel`
|
||||
*Behavior*: Represents the view-model layer for digital input channels. It exposes a single property:
|
||||
- `IDigitalInputChannelsView View { get; set; }` — A bidirectional reference to the associated view instance. This enables the view-model to interact with the view (e.g., trigger UI updates, access view-specific properties) and supports view-model-first navigation or coordination patterns.
|
||||
|
||||
## 3. Invariants
|
||||
- `IDigitalInputChannelsView` must implement `IBaseView`.
|
||||
- `IDigitalInputChannelsViewModel` must implement `IBaseViewModel`.
|
||||
- The `View` property on `IDigitalInputChannelsViewModel` is *nullable* (no `required` modifier) and allows null assignment; no invariant enforces non-null state.
|
||||
- No validation rules, ordering guarantees, or state constraints are specified beyond the interface hierarchy.
|
||||
|
||||
## 4. Dependencies
|
||||
- **Depends on**:
|
||||
- `DTS.Common.Base` (specifically `IBaseView`, `IBaseViewModel`)
|
||||
- **Depends on by**:
|
||||
- Concrete implementations of `IDigitalInputChannelsView` (e.g., UI controls)
|
||||
- Concrete implementations of `IDigitalInputChannelsViewModel` (e.g., view-model classes handling DI channel data)
|
||||
- Likely consumed by higher-level test setup import modules (e.g., TTS import coordinators), though not explicitly visible in this source.
|
||||
|
||||
## 5. Gotchas
|
||||
- **Ambiguity in `View` property semantics**: The `View` property is read-write and lacks documentation. It is unclear whether:
|
||||
- The view-model *owns* the view (and should dispose it),
|
||||
- The view sets this reference during initialization (e.g., in its constructor or `OnLoaded`),
|
||||
- Or it is used for dependency injection (e.g., by a DI container).
|
||||
This could lead to circular reference issues if not managed carefully (e.g., view → view-model → view).
|
||||
- **No data or command members defined**: The interfaces contain no properties, methods, or events beyond the `View` reference. All functional behavior (e.g., channel state, configuration) must be implemented in derived classes or via other mechanisms (e.g., shared models, events from `IBaseViewModel`).
|
||||
- **No versioning or extensibility markers**: Absence of attributes (e.g., `[Contract]`, `[Serializable]`) or explicit versioning hints may complicate future evolution.
|
||||
- **Namespace implies TTS-specific context**: The `Imports.TTS.DIChannels` path suggests this is part of a *test tool suite import* flow, not general-purpose DI channel handling—misuse outside this context could cause integration issues.
|
||||
- **None identified from source alone.**
|
||||
@@ -0,0 +1,51 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.CommonCore/Interface/TestSetups/Imports/TTS/DOChannels/IDigitalOutputChannelsView.cs
|
||||
- Common/DTS.CommonCore/Interface/TestSetups/Imports/TTS/DOChannels/IDigitalOutputChannelsViewModel.cs
|
||||
generated_at: "2026-04-16T02:37:33.188444+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "59f8ae955149cdda"
|
||||
---
|
||||
|
||||
# DOChannels
|
||||
|
||||
### 1. **Purpose**
|
||||
This module defines the core interface contracts for the digital output channels view and view model components within the TTS (likely *Test Tool Suite*) test setup import layer. It establishes the minimal contract required to integrate digital output channel UI representation (`IDigitalOutputChannelsView`) and its associated view model (`IDigitalOutputChannelsViewModel`) into the application’s MVVM (Model-View-ViewModel) architecture, leveraging the base view/view model abstractions (`IBaseView`, `IBaseViewModel`) from `DTS.Common.Base`.
|
||||
|
||||
### 2. **Public Interface**
|
||||
- **`IDigitalOutputChannelsView`**
|
||||
```csharp
|
||||
public interface IDigitalOutputChannelsView : IBaseView { }
|
||||
```
|
||||
A marker interface representing the *view* (e.g., UI control or screen) for digital output channels. It inherits from `IBaseView`, implying it participates in the standard view lifecycle (e.g., initialization, binding, disposal), but no additional view-specific API is defined here.
|
||||
|
||||
- **`IDigitalOutputChannelsViewModel`**
|
||||
```csharp
|
||||
public interface IDigitalOutputChannelsViewModel : IBaseViewModel
|
||||
{
|
||||
IDigitalOutputChannelsView View { get; set; }
|
||||
}
|
||||
```
|
||||
A view model interface for digital output channels. It exposes a single property `View` (of type `IDigitalOutputChannelsView`) that allows bidirectional linkage between the view model and its corresponding view, following a typical MVVM pattern where the view model holds a reference to its view for coordination (e.g., triggering UI updates or responding to view events). It inherits from `IBaseViewModel`, implying standard view model responsibilities (e.g., data binding, command handling, state management).
|
||||
|
||||
### 3. **Invariants**
|
||||
- `IDigitalOutputChannelsView` must be implemented by a concrete view type that adheres to the contract of `IBaseView` (e.g., supports binding context, lifecycle events).
|
||||
- `IDigitalOutputChannelsViewModel` must maintain a reference to exactly one `IDigitalOutputChannelsView` instance via its `View` property at runtime (though the property is nullable and may be `null` during initialization or teardown).
|
||||
- The `View` property is read-write (`get; set;`), implying the view model is responsible for assigning or updating its associated view (e.g., during view construction or reattachment).
|
||||
- No additional validation or ordering guarantees are specified (e.g., no requirement that `View` be set before certain methods are called), as the interface itself contains no methods.
|
||||
|
||||
### 4. **Dependencies**
|
||||
- **Internal dependencies**:
|
||||
- `DTS.Common.Base` (specifically `IBaseView` and `IBaseViewModel`)
|
||||
- **External dependencies (inferred)**:
|
||||
- Any consumer of this module (e.g., test setup configuration UI, TTS import logic) must implement or consume concrete types for `IDigitalOutputChannelsView` and `IDigitalOutputChannelsViewModel`.
|
||||
- Likely depends on other TTS import modules (e.g., `TTS` namespace suggests integration with a specific test tool or framework), but no direct imports of other *types* are present in the source.
|
||||
- **Depended upon by**:
|
||||
- Unknown from source alone — this module provides abstractions, so concrete implementations or consumers (e.g., a view controller, DI container, or test setup builder) would reference it, but no such references are visible here.
|
||||
|
||||
### 5. **Gotchas**
|
||||
- **No behavior defined**: Both interfaces are effectively *marker interfaces* with no methods or additional properties beyond the base contracts. Developers must infer or consult other layers (e.g., concrete implementations, tests, or documentation) for how digital output channels are actually manipulated or displayed.
|
||||
- **Circular reference risk**: The `View` property on the view model creates a potential circular reference (view ↔ view model), which could lead to memory leaks or disposal issues if not managed carefully (e.g., via weak references or explicit cleanup).
|
||||
- **Ambiguity in lifecycle**: Since `IBaseView`/`IBaseViewModel` behavior is not visible here, the exact timing and expectations for setting `View` (e.g., before/after binding, during construction) are unclear.
|
||||
- **No data members exposed**: Despite the name "DigitalOutputChannels", the interfaces contain no properties for channel data (e.g., channel count, states, configurations). This suggests data is either handled via `IBaseViewModel` extensions or deferred to downstream implementations.
|
||||
@@ -0,0 +1,84 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.CommonCore/Interface/TestSetups/Imports/TTS/EditFile/IEditFileView.cs
|
||||
- Common/DTS.CommonCore/Interface/TestSetups/Imports/TTS/EditFile/IEditFileViewModel.cs
|
||||
generated_at: "2026-04-16T02:37:29.978835+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "3c042c6fc82ba63f"
|
||||
---
|
||||
|
||||
# EditFile
|
||||
|
||||
## Documentation Page: `IEditFileView` and `IEditFileViewModel` Interfaces
|
||||
|
||||
---
|
||||
|
||||
### 1. **Purpose**
|
||||
|
||||
This module defines the contract for the *Edit File* view and view model components within the TTS (likely *Test Time Setup*) import subsystem. It supports editing of TTS channel records via a UI, with built-in validation logic—particularly for detecting duplicate channel codes among required channels—and provides UI initialization and search filtering capabilities. The interfaces follow the Model-View-ViewModel (MVVM) pattern, where `IEditFileView` represents the UI layer and `IEditFileViewModel` encapsulates presentation logic and state, inheriting from base interfaces in the `DTS.Common.Base` and `DTS.Common.Interface.TestSetups.Imports.TTS.ReadFile` namespaces.
|
||||
|
||||
---
|
||||
|
||||
### 2. **Public Interface**
|
||||
|
||||
#### `IEditFileView`
|
||||
- **Inherits**: `IBaseView`
|
||||
- **Description**: A marker interface for the view (UI) component in the Edit File flow. No additional members are defined—behavior and data binding are expected to be implemented via the associated `IEditFileViewModel`.
|
||||
|
||||
#### `IEditFileViewModel`
|
||||
- **Inherits**: `IBaseViewModel`
|
||||
- **Properties**:
|
||||
- `IEditFileView View { get; set; }`
|
||||
Gets or sets the associated view instance. Enables two-way binding and view coordination.
|
||||
- `bool ChangeValidationIsNeeded { get; set; }`
|
||||
A flag indicating whether validation should be performed on changes (e.g., user input). Likely used to defer or skip validation in certain scenarios (e.g., during initialization).
|
||||
|
||||
- **Methods**:
|
||||
- `bool Validate()`
|
||||
Performs full validation of the current state (e.g., all fields on the page). Returns `true` if valid, `false` otherwise.
|
||||
- `bool ValidateChange(ITTSChannelRecord record = null)`
|
||||
Validates changes made on the page. If a `record` is provided (i.e., an existing record being modified), it additionally checks for duplicate `ChannelCode` values among required channels. Returns `true` if valid, `false` otherwise.
|
||||
*Note*: The `record` parameter may be `null` (e.g., for new record creation).
|
||||
- `void InitializeView()`
|
||||
Initializes UI components in the associated `View`. Likely populates dropdowns, binds lists, or sets initial state.
|
||||
- `void Search(string text)`
|
||||
Filters the available sensors (likely in a UI list or grid) based on the provided `text` (e.g., by name, code, or description).
|
||||
|
||||
---
|
||||
|
||||
### 3. **Invariants**
|
||||
|
||||
- `IEditFileViewModel.View` must be assigned before calling `InitializeView()` or any method that interacts with the UI (e.g., `Search()`), otherwise behavior is undefined.
|
||||
- `ValidateChange(ITTSChannelRecord record)` enforces uniqueness of `ChannelCode` **only for required channels** when a non-null `record` is passed. Non-required channels may have duplicates.
|
||||
- `ChangeValidationIsNeeded` controls whether validation is triggered on change events (e.g., user input), but the source does not specify *when* or *how* this flag is used internally—only that it is a configurable property.
|
||||
- `Validate()` and `ValidateChange(...)` must return `false` if any validation rule fails; `true` otherwise. No exceptions are documented as part of the contract.
|
||||
|
||||
---
|
||||
|
||||
### 4. **Dependencies**
|
||||
|
||||
- **Internal Dependencies**:
|
||||
- `DTS.Common.Base` — Provides `IBaseView` and `IBaseViewModel`, the base interfaces for UI and VM layers.
|
||||
- `DTS.Common.Interface.TestSetups.Imports.TTS.ReadFile` — Defines `ITTSChannelRecord`, used in `ValidateChange`.
|
||||
|
||||
- **External Dependencies**:
|
||||
- Any concrete implementation of `IEditFileView` must be compatible with the UI framework used (e.g., WPF, MAUI, or similar), though the interface itself is framework-agnostic.
|
||||
- `ITTSChannelRecord` (from `ReadFile`) must expose at least a `ChannelCode` property and a way to identify required channels (e.g., via a `Required` flag or similar), though the exact structure is not visible here.
|
||||
|
||||
- **Depended Upon By**:
|
||||
- Likely consumed by a concrete view model class (e.g., `EditFileViewModel`) and its corresponding view class (e.g., `EditFileView`), which are not included in this source.
|
||||
|
||||
---
|
||||
|
||||
### 5. **Gotchas**
|
||||
|
||||
- **Ambiguity in `ValidateChange` semantics**: The summary states it validates *changes on page*, but the parameter `record` is described as “null, or record being changed.” It is unclear whether passing `null` implies a *new* record (where duplicate checks may not apply) or an *unchanged* record (where validation may be skipped). Implementation details are required to resolve this.
|
||||
- **No documentation on `ChangeValidationIsNeeded` usage**: While the property exists, the source does not specify *when* it is set to `true`/`false`, or *which methods* respect it (e.g., does `ValidateChange` skip validation when `false`?).
|
||||
- **`Search` behavior unspecified**: The method filters “available sensors,” but the source does not define:
|
||||
- What “available sensors” means (e.g., list of candidates, current selection, etc.).
|
||||
- Whether filtering is case-sensitive or supports partial matches.
|
||||
- Whether it modifies UI directly or returns filtered results.
|
||||
- **No error reporting mechanism**: Both `Validate` and `ValidateChange` return only `bool`. There is no provision for returning *why* validation failed (e.g., error messages, error lists), which may require consumers to implement their own error tracking.
|
||||
|
||||
None identified beyond the above ambiguities.
|
||||
@@ -0,0 +1,99 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.CommonCore/Interface/TestSetups/Imports/TTS/HardwareScan/IHardwareScanView.cs
|
||||
- Common/DTS.CommonCore/Interface/TestSetups/Imports/TTS/HardwareScan/IChannelSummary.cs
|
||||
- Common/DTS.CommonCore/Interface/TestSetups/Imports/TTS/HardwareScan/IDasSummary.cs
|
||||
- Common/DTS.CommonCore/Interface/TestSetups/Imports/TTS/HardwareScan/IHardwareSummaryRecord.cs
|
||||
- Common/DTS.CommonCore/Interface/TestSetups/Imports/TTS/HardwareScan/IHardwareScanViewModel.cs
|
||||
generated_at: "2026-04-16T02:37:51.896980+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "8610a74cf39a7a50"
|
||||
---
|
||||
|
||||
# HardwareScan
|
||||
|
||||
## Documentation: Hardware Scan Interface Module
|
||||
|
||||
### 1. Purpose
|
||||
This module defines the core interfaces for the *Hardware Scan* feature within the test setup import subsystem for TTS (presumably a test target system). Its role is to establish a contract between the UI (via `IHardwareScanView`) and the view model (`IHardwareScanViewModel`) that orchestrates hardware scanning operations—collecting, aggregating, and reporting hardware inventory data (e.g., DOUT, DIN, squibs, analog channels, ECMs, racks, etc.) and per-channel summaries. It enables separation of concerns by decoupling UI rendering from business logic, while providing structured data models (`IHardwareSummaryRecord`, `IChannelSummary`, `IDasSummary`) for hardware state reporting.
|
||||
|
||||
### 2. Public Interface
|
||||
|
||||
#### Interfaces
|
||||
- **`IHardwareScanView : IBaseView`**
|
||||
Marker interface for the view (UI layer) in the Hardware Scan feature. Inherits `IBaseView`, implying standard view lifecycle/contract (e.g., binding context, initialization). No additional members defined.
|
||||
|
||||
- **`IChannelSummary : IBaseClass`**
|
||||
Represents a summary of channel allocation for a given channel type.
|
||||
- `string ChannelType { get; set; }` – Type identifier (e.g., "DOUT", "ANALOG").
|
||||
- `int Requested { get; set; }` – Number of channels requested.
|
||||
- `int Assigned { get; set; }` – Number of channels assigned.
|
||||
- `int Unassigned { get; set; }` – Number of channels not yet assigned.
|
||||
|
||||
- **`IDasSummary : IBaseClass`**
|
||||
Encapsulates DAS (Data Acquisition System) hardware status.
|
||||
- `string DASSerial { get; set; }` – Serial number of the DAS unit.
|
||||
- `string EIDFound { get; set; }` – EID (Equipment ID) status string.
|
||||
- `string BatteryVoltageStatus { get; set; }` – Battery voltage status (e.g., "OK", "LOW").
|
||||
- `System.Windows.Media.SolidColorBrush BatteryVoltageColor { get; set; }` – UI color for battery status (WPF-specific).
|
||||
- `string InputVoltageStatus { get; set; }` – Input voltage status.
|
||||
- `System.Windows.Media.SolidColorBrush InputVoltageColor { get; set; }` – UI color for input voltage status.
|
||||
|
||||
- **`IHardwareSummaryRecord`**
|
||||
Aggregates hardware inventory counts for a single test setup or configuration.
|
||||
- `uint DOut { get; set; }` – Count of digital output channels.
|
||||
- `uint DIn { get; set; }` – Count of digital input channels.
|
||||
- `uint Squib { get; set; }` – Count of squib (explosive device) channels.
|
||||
- `uint Analog { get; set; }` – Count of analog channels.
|
||||
- `uint Total { get; }` – Read-only total of all hardware channels (`DOut + DIn + Squib + Analog + ...`).
|
||||
- `uint SPS { get; set; }` – Count of SPS (presumably a subsystem/component).
|
||||
- `uint SPD { get; set; }` – Count of SPD.
|
||||
- `uint SPT { get; set; }` – Count of SPT.
|
||||
- `uint ECM { get; set; }` – Count of ECMs (Electronic Control Modules).
|
||||
- `uint Rack { get; set; }` – Count of racks.
|
||||
- `uint G5 { get; set; }` – Count of G5 units.
|
||||
- `void UpdateTotal()` – Recalculates and updates the `Total` property.
|
||||
- `void Update(uint analog, uint squib, uint din, uint dout, uint ecm, uint sps, uint spt, uint spd, uint g5, uint rack)` – Updates all hardware counts in one call; likely triggers `UpdateTotal()` internally.
|
||||
|
||||
- **`IHardwareScanViewModel : IBaseViewModel`**
|
||||
View model for the Hardware Scan feature. Coordinates scanning logic and data exposure.
|
||||
- `IHardwareScanView View { get; set; }` – Reference to the bound view.
|
||||
- `IHardwareSummaryRecord[] HardwareRecords { get; }` – Immutable array of hardware summary records (read-only).
|
||||
- `void SetStatus(string status)` – Updates the UI status message (e.g., "Scanning...", "Complete").
|
||||
- `void SetProgress(double progress)` – Updates progress indicator (0.0–1.0 range implied).
|
||||
- `void HardwareScan()` – Initiates the hardware scan operation (synchronous or asynchronous—behavior not specified).
|
||||
- `void SetChannelSummaryList(ITTSChannelRecord[] channelRecords)` – Populates channel summary data (likely used to derive `IChannelSummary` instances internally).
|
||||
|
||||
#### Delegates
|
||||
- **`HardwareScanDelegate`**
|
||||
`public delegate void HardwareScanDelegate();`
|
||||
Represents a method that performs a hardware scan. Used for callback or event subscription.
|
||||
|
||||
### 3. Invariants
|
||||
- `IHardwareSummaryRecord.Total` is a *read-only* property derived from other counts; it must be kept consistent with the sum of all individual hardware counts (`DOut`, `DIn`, `Squib`, `Analog`, `SPS`, `SPD`, `SPT`, `ECM`, `Rack`, `G5`).
|
||||
- `IHardwareSummaryRecord.Update(uint...)` must ensure all provided counts are applied before `Total` is recalculated (implied by `UpdateTotal()` presence).
|
||||
- `IDasSummary` properties `BatteryVoltageColor` and `InputVoltageColor` are WPF-specific (`System.Windows.Media.SolidColorBrush`), indicating this module is UI-tier dependent and not platform-agnostic.
|
||||
- `HardwareRecords` is exposed as a read-only array—consumers must not modify the array contents directly.
|
||||
|
||||
### 4. Dependencies
|
||||
- **Internal Dependencies**
|
||||
- `DTS.Common.Base` namespace: `IBaseView`, `IBaseViewModel`, `IBaseClass` (base contracts for views, view models, and data classes).
|
||||
- `DTS.Common.Interface.TestSetups.Imports.TTS.ReadFile`: `ITTSChannelRecord` (used in `SetChannelSummaryList`).
|
||||
- `DTS.Common.Utils`: Likely contains utility types (exact usage not visible in this file).
|
||||
- **External Dependencies**
|
||||
- `System.Windows.Media` (for `SolidColorBrush` in `IDasSummary`), indicating a dependency on WPF.
|
||||
- **Depended Upon**
|
||||
- UI layer implementations (e.g., a WPF view implementing `IHardwareScanView`).
|
||||
- View model implementations (e.g., concrete class implementing `IHardwareScanViewModel`).
|
||||
- Likely consumed by higher-level test setup orchestration logic (e.g., a test runner or setup wizard).
|
||||
|
||||
### 5. Gotchas
|
||||
- **WPF Coupling**: `IDasSummary` uses `System.Windows.Media.SolidColorBrush`, tightly coupling this interface to WPF. This may cause issues if reused in non-WPF contexts (e.g., headless tests, cross-platform).
|
||||
- **Missing Implementation Details**:
|
||||
- `HardwareScan()` behavior (synchronous vs. asynchronous, cancellation support, error handling) is not specified.
|
||||
- `SetChannelSummaryList` does not expose how `ITTSChannelRecord` maps to `IChannelSummary`—implementation detail hidden.
|
||||
- `HardwareRecords` is read-only, but the source does not clarify whether the underlying array is defensively copied or shared.
|
||||
- **Ambiguous Acronyms**: `SPS`, `SPD`, `SPT`, `ECM`, `G5`, `DAS`, `EID` are used without definition—assumed domain-specific.
|
||||
- **No Validation on `Update(uint...)`**: No indication that `Update` validates input counts (e.g., negative values, overflow).
|
||||
- **No Thread Safety Contract**: `HardwareScan()` may be called from non-UI threads, but no thread-safety guarantees are documented.
|
||||
@@ -0,0 +1,90 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.CommonCore/Interface/TestSetups/Imports/TTS/LevelTrigger/ILevelTriggerView.cs
|
||||
- Common/DTS.CommonCore/Interface/TestSetups/Imports/TTS/LevelTrigger/ILevelTriggerViewModel.cs
|
||||
- Common/DTS.CommonCore/Interface/TestSetups/Imports/TTS/LevelTrigger/ILevelTrigger.cs
|
||||
generated_at: "2026-04-16T02:37:21.834892+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "0174d8f986cc146b"
|
||||
---
|
||||
|
||||
# LevelTrigger
|
||||
|
||||
## Documentation: Level Trigger Interface Module
|
||||
|
||||
---
|
||||
|
||||
### 1. Purpose
|
||||
This module defines the core interfaces for the *Level Trigger* feature within the TTS (likely *Test Trigger System*) import subsystem. It establishes the contract for modeling a level-triggered test condition—where a test action is initiated when a signal crosses a specified threshold—by abstracting the data model (`ILevelTrigger`), its view-model (`ILevelTriggerViewModel`), and view (`ILevelTriggerView`). The module serves as the foundational API layer for UI and business logic integration, enabling configuration, persistence, and runtime evaluation of level-trigger conditions in test setups.
|
||||
|
||||
---
|
||||
|
||||
### 2. Public Interface
|
||||
|
||||
#### `ILevelTriggerView`
|
||||
- **Definition**: `public interface ILevelTriggerView : IBaseView { }`
|
||||
- **Behavior**: A marker interface for the view layer of the Level Trigger feature. Inherits `IBaseView`, implying it participates in a standard MVVM (Model-View-ViewModel) pattern with base view capabilities (e.g., lifecycle, binding context). No additional members are defined here.
|
||||
|
||||
#### `ILevelTriggerViewModel`
|
||||
- **Definition**: `public interface ILevelTriggerViewModel : IBaseViewModel`
|
||||
- **Members**:
|
||||
- `ILevelTriggerView View { get; set; }`
|
||||
- **Behavior**: Binds the view to its view model in the MVVM pattern. The `View` property enables two-way association (e.g., for data binding or lifecycle coordination). Inherits `IBaseViewModel`, implying standard view-model responsibilities (e.g., command handling, state management).
|
||||
|
||||
#### `ILevelTrigger`
|
||||
- **Definition**: `public interface ILevelTrigger`
|
||||
- **Properties**:
|
||||
- `string Code { get; }` — Unique identifier for the level trigger configuration.
|
||||
- `string JCode { get; }` — Secondary identifier (possibly job- or job-step-specific).
|
||||
- `double ValuePercent { get; set; }` — Threshold expressed as a percentage (e.g., of full-scale range).
|
||||
- `double ValueEU { get; set; }` — Threshold expressed in engineering units (e.g., Volts, PSI).
|
||||
- `string EULabel { get; }` — Human-readable label for the engineering unit (e.g., `"V"`, `"psi"`).
|
||||
- `string HWSerialNumber { get; }` — Serial number of the hardware device associated with this trigger.
|
||||
- `int ChannelNumber { get; }` — Logical channel number used by the trigger.
|
||||
- `ITTSChannelRecord Channel { get; set; }` — The currently assigned channel record (may be `null` if unassigned).
|
||||
- `ITTSSetup TestSetup { get; }` — Reference to the parent test setup containing this trigger.
|
||||
- `ITTSChannelRecord[] AvailableChannels { get; }` — Read-only list of channels eligible for assignment.
|
||||
- `bool IsActive { get; }` — Indicates whether the trigger is currently active (e.g., enabled in the test sequence).
|
||||
- `bool IsModified { get; set; }` — Flag indicating whether the trigger configuration has unsaved changes.
|
||||
- **Methods**:
|
||||
- `void Refresh()` — Updates the `AvailableChannels` list and re-evaluates the `Channel` assignment (e.g., to reflect hardware changes or setup edits).
|
||||
- `void Add(ITTSChannelRecord channel)` — Adds a channel to the `AvailableChannels` list and makes it eligible for assignment.
|
||||
- `void Remove(ITTSChannelRecord channel)` — Removes a channel from `AvailableChannels`; if `Channel == channel`, unassigns it (sets `Channel = null`).
|
||||
- `byte[] GetBytes()` — Returns a deterministic byte sequence representing the trigger’s configuration, suitable for hashing (e.g., for change detection or persistence validation).
|
||||
|
||||
---
|
||||
|
||||
### 3. Invariants
|
||||
- `ChannelNumber` and `HWSerialNumber` are immutable (read-only), implying they are fixed at instantiation and tied to the hardware context.
|
||||
- `AvailableChannels` must be kept consistent with the underlying hardware/test setup; modifications via `Add`/`Remove`/`Refresh` must update this array atomically.
|
||||
- If `Channel` is assigned, the assigned `ITTSChannelRecord` must be present in `AvailableChannels`.
|
||||
- `IsModified` is a mutable flag; its semantics imply that external consumers (e.g., UI, persistence layer) must respect its state for dirty-checking.
|
||||
- `GetBytes()` must produce identical output for semantically identical configurations (i.e., deterministic serialization).
|
||||
- `IsActive` is read-only, suggesting its value is controlled by external logic (e.g., test sequence state), not the trigger itself.
|
||||
|
||||
---
|
||||
|
||||
### 4. Dependencies
|
||||
|
||||
#### Dependencies *of* this module:
|
||||
- `DTS.Common.Base` — Provides `IBaseView` and `IBaseViewModel`.
|
||||
- `DTS.Common.Interface.TestSetups.Imports.TTS.ReadFile` — Defines `ITTSChannelRecord`, `ITTSSetup`, and related types (referenced but not included here).
|
||||
- `System.Collections.Generic` — Used implicitly via array (`ITTSChannelRecord[]`).
|
||||
|
||||
#### Dependencies *on* this module:
|
||||
- Any UI component implementing `ILevelTriggerView` (e.g., WPF/WinForms view).
|
||||
- View-model implementations (e.g., concrete `LevelTriggerViewModel`) that bind to `ILevelTrigger`.
|
||||
- Test execution logic that consumes `ILevelTrigger` to evaluate trigger conditions at runtime.
|
||||
- Persistence layers that use `GetBytes()` for change tracking or serialization.
|
||||
|
||||
---
|
||||
|
||||
### 5. Gotchas
|
||||
- **Ambiguity in `ChannelNumber` vs. `Channel`**: `ChannelNumber` is an `int`, while `Channel` is an `ITTSChannelRecord`. It is unclear whether `ChannelNumber` is derived from `Channel` (e.g., `Channel?.Number`) or stored separately. This may lead to inconsistencies if `Channel` is reassigned without updating `ChannelNumber`.
|
||||
- **`Refresh()` semantics**: The method updates `AvailableChannels` and `Channel`, but it is unspecified whether `Channel` is reset to `null` if the current assignment is no longer in `AvailableChannels`, or whether it preserves the assignment if still valid.
|
||||
- **`IsActive` mutability**: Though `IsActive` is read-only on `ILevelTrigger`, its value is likely controlled by external logic (e.g., a test sequencer). Developers must ensure synchronization between this flag and the trigger’s runtime behavior.
|
||||
- **No explicit thread-safety guarantees**: The interface does not specify thread-safety for `Add`, `Remove`, or property setters (e.g., `ValuePercent`, `Channel`). Concurrent access may require external synchronization.
|
||||
- **No documentation on `Code` vs. `JCode`**: The distinction between these identifiers is not explained (e.g., `Code` may be global, `JCode` job-specific), risking misuse.
|
||||
|
||||
*None identified from source alone.* (Note: The above are *inferred risks* based on interface design gaps—not documented behavior.)
|
||||
@@ -0,0 +1,121 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.CommonCore/Interface/TestSetups/Imports/TTS/ReadFile/IReadFileView.cs
|
||||
- Common/DTS.CommonCore/Interface/TestSetups/Imports/TTS/ReadFile/IReadFileViewModel.cs
|
||||
- Common/DTS.CommonCore/Interface/TestSetups/Imports/TTS/ReadFile/ITTSSetup.cs
|
||||
- Common/DTS.CommonCore/Interface/TestSetups/Imports/TTS/ReadFile/ITTSChannelRecord.cs
|
||||
generated_at: "2026-04-16T02:38:21.359060+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "e7476db05b9e4a5a"
|
||||
---
|
||||
|
||||
# ReadFile
|
||||
|
||||
## Documentation: TTS Read File Import Module
|
||||
|
||||
### 1. Purpose
|
||||
This module defines the interfaces and contracts for importing TTS (Time-To-Spike) test setup configurations from external files (e.g., CSV or XML). It provides a layered architecture—comprising view, view model, and domain model interfaces—to decouple UI presentation logic from data parsing and configuration state management. The module enables loading, validating, and transforming imported file data into structured test setup objects (`ITTSSetup`, `ITTSChannelRecord`) used throughout the test execution pipeline. It supports both standard and advanced recording modes (e.g., Active RAM, Hybrid Recorder), squib channel configuration, digital I/O, and sensor-to-hardware assignment—including pre-assignment scenarios where hardware scanning occurs *after* file import.
|
||||
|
||||
---
|
||||
|
||||
### 2. Public Interface
|
||||
|
||||
#### Interfaces
|
||||
- **`IReadFileView : IBaseView`**
|
||||
A marker interface for the view layer in the TTS read-file import flow. Inherits `IBaseView`. No additional members.
|
||||
|
||||
- **`IReadFileViewModel : IBaseViewModel`**
|
||||
View model responsible for orchestrating file import logic.
|
||||
- `IReadFileView View { get; set; }` — Binds to the view instance.
|
||||
- `void SetStatus(string status)` — Updates the UI status with a single message.
|
||||
- `void SetStatus(string status, string error)` — Updates status *and* includes an error message.
|
||||
- `void SetProgress(double progress)` — Reports import progress (0.0–1.0 range implied).
|
||||
- `string FileToImport { get; set; }` — Path of the file to be imported.
|
||||
- `void ReadFile(...)` — Initiates file parsing and configuration population. Parameters include:
|
||||
- `fileName`: Path to the import file.
|
||||
- `defaultSampleRate`, `defaultMode`, `defaultTTSPreTrigger`, `defaultTTSPostTrigger`, `defaultTTSROIStart`, `defaultTTSROIEnd`, `defaultRequireEIDFound`, `defaultDigitalInputMode`: Default values to fall back on if not present in the file.
|
||||
- `squibDefaults`: `ISquibSettingDefaults` instance providing default squib fire parameters.
|
||||
|
||||
- **`ITTSSetup`**
|
||||
Represents the parsed configuration from a TTS import file. Key properties:
|
||||
- `string Filename`, `string TestId`, `string Line1`–`Line4`: Metadata (first 4 lines of CSV for edit-file reconstruction).
|
||||
- `double SampleRate`, `RecordingModes Mode`, `double TestLength`, `PreTrigger`, `PostTrigger`, `ROIStart`, `ROIEnd`: Core timing and acquisition settings.
|
||||
- `ITTSChannelRecord[] Channels`: Array of channel records.
|
||||
- `ILevelTrigger[] LevelTriggers`: Level-trigger definitions.
|
||||
- `string OriginalImportFile`: Original source file path.
|
||||
- `bool AllowAdvancedRecordingModes`, `AllowActiveRecordingModes`, `AllowTSRAIRRecordingModes`: Global flags controlling supported recording modes.
|
||||
- `bool RequireEIDFound`: Whether sensors without EIDs are rejected.
|
||||
- `string DefaultDigitalInputMode`, `double DefaultSquibFireDurationMs`: Defaults sourced from config.
|
||||
- `Tuple<string,string>[] PreAssignedSensorIdAndHwId`: Pre-mapped sensor-to-hardware IDs (used during XML import before hardware scan completes).
|
||||
- `string GetHashCode()`: Custom hash code implementation (likely for change detection or caching).
|
||||
|
||||
- **`ITTSChannelRecord`**
|
||||
Represents a single channel entry in a TTS import. Extensive properties for analog/digital/squib channels:
|
||||
- `int ChannelNumber`, `string ChannelCode`, `string JCodeOrDescription`, `double ChannelRange`, `int ChannelFilterHz`: Basic channel config.
|
||||
- `string SensorEID`, `SensorSerialNumber`, `SensorSensitivity`, `SensorExcitationVolts`, `SensorCapacity`, `SensorEU`, `SensorPolarity`: Sensor metadata.
|
||||
- `ToyotaBridgeType ChannelType`, `string Description`, `bool ProportionalToExcitation`, `BridgeResistance`, `InitialOffsetVoltage`, `InitialOffsetVoltageTolerance`, `bool RemoveOffset`, `ToyotaZeroMethods ZeroMethod`, `CableMultiplier`, `InitialEUInMV`, `InitialEUInEU`, `IRTraccExponent`, `PolynomialConstant`, `PolynomialCoefficientC`, `PolynomialCoefficentB`, `PolynomialCoefficientA`, `PolynomialCoefficientAlpha`: Calibration and scaling parameters.
|
||||
- `string ISOCode`, `ISODescription`, `ISOPolarity`: ISO-standard metadata.
|
||||
- `bool IsSquib`, `bool IsDigitalInput`, `bool IsDigitalOutput`: Channel type flags.
|
||||
- `bool IsEmptyRecord { get; }`: True if `ChannelCode` and `SensorSerialNumber` are both empty/null.
|
||||
- `IHardwareChannel HardwareChannel { get; set; }`: Bound hardware channel (populated post-scan).
|
||||
- `bool IsChannelCodeValid`, `IsJCodeValid`, `IsRangeValid`, `IsFilterValid`: Validation state flags.
|
||||
- `bool Disabled`: Excludes channel from active acquisition.
|
||||
- Squib-specific: `SquibFireMode`, `SquibFireDelayMs`, `LimitDuration`, `SquibFireDurationMs`, `SquibFireCurrent`, `SquibFireResistanceLowOhm`, `SquibFireResistanceHighOhm`.
|
||||
- Digital I/O: `DigitalInputMode`, `DigitalOutputMode`, `DigitalOutputDelay`, `DigitalOutputDuration`.
|
||||
- `IEditFileViewModel Parent { get; set; }`: Back-reference to parent edit-file view model.
|
||||
- `ITTSChannelRecord Copy()`: Deep copy method.
|
||||
- `Visibility RangeVisible`, `FilterVisible`: UI visibility hints (WPF `Visibility`).
|
||||
- `bool OriginallyRequestedChannel`: Whether the channel was explicitly requested (vs. auto-added).
|
||||
- `bool DiagnosticsMode`: Enables diagnostics mode (if supported by hardware/config).
|
||||
- `bool IsModified`: Tracks whether the record has been edited.
|
||||
- `byte[] GetBytes()`: Returns canonical byte representation for hashing/CRC.
|
||||
|
||||
#### Delegates
|
||||
- **`ReadFileDelegate(string importFile)`**
|
||||
Delegate signature for asynchronous or background file reading (e.g., `Task.Run` or `BackgroundWorker`). Takes the file path as input.
|
||||
|
||||
---
|
||||
|
||||
### 3. Invariants
|
||||
- **`ITTSChannelRecord.IsEmptyRecord`** must be `true` *only* when both `ChannelCode` and `SensorSerialNumber` are null/empty.
|
||||
- **`ITTSSetup.TestLength`** is read-only (`get;` only), implying it is derived/computed from other properties (e.g., `PreTrigger` + `PostTrigger` + ROI duration).
|
||||
- **`PreAssignedSensorIdAndHwId`** is populated *only* during XML imports and is cleared once hardware assignment is finalized.
|
||||
- **`AllowAdvancedRecordingModes`**, **`AllowActiveRecordingModes`**, and **`AllowTSRAIRRecordingModes`** control *global* support for advanced modes; individual channels may be invalid if these are disabled.
|
||||
- **`RequireEIDFound`** enforces that sensors without EIDs are rejected *only if* this flag is `true`; otherwise, EID-less sensors may be accepted.
|
||||
- **`IsModified`** on `ITTSChannelRecord` must be set to `true` after any property change that affects the output of `GetBytes()`.
|
||||
|
||||
---
|
||||
|
||||
### 4. Dependencies
|
||||
|
||||
#### Dependencies *of* this module:
|
||||
- **`DTS.Common.Base`**: Provides `IBaseView`, `IBaseViewModel`, `IBaseClass` base interfaces.
|
||||
- **`DTS.Common.Enums`**: Defines `RecordingModes`, `ToyotaBridgeType`, `ToyotaZeroMethods`, `DigitalInputModes`, `DigitalOutputModes`, `SquibFireMode`.
|
||||
- **`DTS.Common.Interface.Sensors`**: Supplies `ISquibSettingDefaults` (used in `ReadFile` method).
|
||||
- **`DTS.Common.Interface.DataRecorders`**: Supplies `IHardwareChannel` (used in `ITTSChannelRecord`).
|
||||
- **`System.Windows`**: Used for `Visibility` type (WPF).
|
||||
- **`System`**: For `Tuple<string,string>`, `delegate`, and basic types.
|
||||
|
||||
#### Dependencies *on* this module:
|
||||
- **`ITTSSetup`** is likely consumed by:
|
||||
- Test execution engine (to configure acquisition).
|
||||
- UI layers (e.g., `IEditFileViewModel` via `ITTSChannelRecord.Parent`).
|
||||
- Hardware scanning/assignment logic (uses `PreAssignedSensorIdAndHwId`).
|
||||
- **`IReadFileViewModel`** is consumed by UI frameworks (e.g., WPF) implementing MVVM for file import workflows.
|
||||
- **`ITTSChannelRecord`** is used by:
|
||||
- Validation logic (via `Is*Valid` properties).
|
||||
- CRC/hashing utilities (via `GetBytes()`).
|
||||
- Hardware binding logic (via `HardwareChannel`).
|
||||
|
||||
---
|
||||
|
||||
### 5. Gotchas
|
||||
- **`GetHashCode()` on `ITTSSetup` is explicitly declared**, suggesting a custom implementation is required—*not* inherited from `object`. This may conflict with default .NET hashing behavior if misused.
|
||||
- **`PreAssignedSensorIdAndHwId`** is only populated during XML imports and is *not* persisted after hardware assignment. Relying on it post-assignment will yield incorrect results.
|
||||
- **`TestLength` is read-only** (`get;` only), but its source is not defined in the interface. Its value is likely computed from `PreTrigger`, `PostTrigger`, `ROIStart`, and `ROIEnd`, but the exact formula is not specified here.
|
||||
- **`IsModified`** has no setter documentation—consumers must ensure it is updated *only* when meaningful changes occur (e.g., not for UI-only state like selection).
|
||||
- **`RangeVisible` and `FilterVisible`** are read-only `Visibility` properties, implying their values are computed dynamically (e.g., based on `ChannelType`). Their logic is not exposed in the interface.
|
||||
- **`IsSquib`, `IsDigitalInput`, `IsDigitalOutput`** are mutually exclusive flags (implied by channel type), but the interface does not enforce this invariant—validation must occur elsewhere.
|
||||
- **`DefaultDigitalInputMode`** and **`DefaultSquibFireDurationMs`** are sourced from `DataPRO.config.exe`, but the interface provides no mechanism to verify or validate these defaults. Misconfiguration here may propagate silently.
|
||||
- **`ReadFile` method signature includes many defaults**, but it is unclear whether *all* parameters are required or if some may be `null`/default. For example, `squibDefaults` is typed as `ISquibSettingDefaults`, but no null-safety is documented.
|
||||
@@ -0,0 +1,97 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.CommonCore/Interface/TestSetups/Imports/TTS/Summary/ISummaryChannel.cs
|
||||
- Common/DTS.CommonCore/Interface/TestSetups/Imports/TTS/Summary/ISummaryView.cs
|
||||
- Common/DTS.CommonCore/Interface/TestSetups/Imports/TTS/Summary/ISummaryViewModel.cs
|
||||
generated_at: "2026-04-16T02:37:53.934971+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "b65d9ef6e313b6f0"
|
||||
---
|
||||
|
||||
# Summary
|
||||
|
||||
## Documentation: Summary Module Interfaces
|
||||
|
||||
### 1. Purpose
|
||||
This module defines core interfaces (`ISummaryChannel`, `ISummaryView`, `ISummaryViewModel`) for managing and exposing summary-level metadata and UI state related to test setup imports—specifically for TTS (likely *Test Time Series*) data. It serves as the contract layer between the view (UI), view model (business logic), and channel metadata (e.g., channel assignments, types), enabling decoupled implementation of summary views in test setup workflows. The interfaces are part of the `DTS.Common.Interface` namespace and inherit from base interfaces (`IBaseClass`, `IBaseView`, `IBaseViewModel`) in the `DTS.Common.Base` namespace.
|
||||
|
||||
### 2. Public Interface
|
||||
|
||||
#### `ISummaryChannel`
|
||||
- **`string ChannelType { get; set; }`**
|
||||
Gets or sets the type identifier of the channel (e.g., `"Analog"`, `"Digital"`).
|
||||
- **`int Assigned { get; set; }`**
|
||||
Gets or sets an integer representing the number of assigned channels.
|
||||
- **`string Unassigned { get; set; }`**
|
||||
Gets or sets a string representation of unassigned channel identifiers (e.g., comma-separated list or `"None"`).
|
||||
|
||||
#### `ISummaryView`
|
||||
- **`void UpdateTestIds(string[] serializedValues)`**
|
||||
Updates the view with an array of serialized test ID strings (e.g., JSON or delimited format).
|
||||
- **`string GetTestId()`**
|
||||
Returns the currently selected or primary test ID displayed in the view.
|
||||
- **`void SetTestName(string testName)`**
|
||||
Sets the test name displayed in the view.
|
||||
|
||||
#### `ISummaryViewModel`
|
||||
- **`ISummaryView View { get; set; }`**
|
||||
Gets or sets the associated view instance (MVP/MVVM pattern).
|
||||
- **`void SetStatus(string status, string error = default(string))`**
|
||||
Updates the UI status (e.g., progress text or error message). Optional `error` parameter allows setting an error string separately.
|
||||
- **`void SetProgress(double progress)`**
|
||||
Sets the current progress value (expected to be in [0.0, 1.0] range).
|
||||
- **`bool TestSetupComplete { get; set; }`**
|
||||
Gets or sets a flag indicating whether the test setup import process is complete.
|
||||
- **`string ImportFileName { get; }`**
|
||||
Gets the name of the imported file (read-only).
|
||||
- **`string TestSetupName { get; }`**
|
||||
Gets the user-facing name of the test setup.
|
||||
- **`double SampleRate { get; }`**
|
||||
Gets the sample rate (in Hz) used for the test setup.
|
||||
- **`RecordingModes RecordingMode { get; }`**
|
||||
Gets the recording mode (enum value from `DTS.Common.Enums.RecordingModes`).
|
||||
- **`string PreTrigger { get; }`**
|
||||
Gets the pre-trigger configuration (e.g., duration or condition).
|
||||
- **`string PostTrigger { get; }`**
|
||||
Gets the post-trigger configuration (e.g., duration or condition).
|
||||
- **`void SetChannelList()`**
|
||||
Triggers population or refresh of channel-related UI elements (e.g., via `ISummaryChannel` data).
|
||||
- **`void UpdateUI()`**
|
||||
Forces a full UI refresh.
|
||||
- **`void SetSerializedTestIdValues(string[] values)`**
|
||||
Sets test ID values in serialized form (likely for internal state or later retrieval).
|
||||
- **`void SetAvailableSampleRates(int[] values)`**
|
||||
Sets the list of available sample rates (as integers, e.g., `[1000, 5000, 10000]`).
|
||||
- **`string GetTestId()`**
|
||||
Returns the test ID (delegates to `ISummaryView.GetTestId()` or maintains internal state).
|
||||
- **`void SetAAFExceptions(Dictionary<double, List<double>> values)`**
|
||||
Sets AAF (likely *Analog Acquisition Fault*) exception data, where keys are timestamps (seconds) and values are lists of exception values (e.g., magnitudes or error codes).
|
||||
|
||||
### 3. Invariants
|
||||
- `SampleRate`, `RecordingMode`, `PreTrigger`, `PostTrigger`, `ImportFileName`, and `TestSetupName` are **read-only** properties; their values must be set during initialization or via internal logic and not modified externally.
|
||||
- `TestSetupComplete` is a mutable flag, but its semantics imply that once `true`, the test setup import process has finalized and further modifications may be disallowed (enforced by implementation, not interface).
|
||||
- `progress` passed to `SetProgress` is expected to be in the range `[0.0, 1.0]`, though the interface does not enforce this.
|
||||
- `SetChannelList()` and `UpdateUI()` are expected to be called *after* channel, test ID, and metadata state is updated (e.g., after `SetSerializedTestIdValues`, `SetAvailableSampleRates`, etc.).
|
||||
- `SetStatus`’s `error` parameter is optional (`default(string)`), implying `status` is the primary message and `error` is secondary (e.g., for error-specific UI styling).
|
||||
|
||||
### 4. Dependencies
|
||||
- **Depends on**:
|
||||
- `DTS.Common.Base` (for `IBaseClass`, `IBaseView`, `IBaseViewModel`).
|
||||
- `DTS.Common.Enums` (specifically `RecordingModes`).
|
||||
- `System.Collections.Generic` (for `Dictionary<double, List<double>>`).
|
||||
- `DTS.Common.Interface.TestSetups.Imports.TTS.ReadFile` (namespace reference, though no types from it are used directly in this interface—suggests a dependency on related file-reading logic).
|
||||
- **Used by**:
|
||||
- Implementations of `ISummaryView` (e.g., WPF/WinForms UI controls).
|
||||
- Implementations of `ISummaryViewModel` (e.g., test setup import orchestrators).
|
||||
- Code that consumes summary metadata (e.g., reporting, validation, or export modules).
|
||||
|
||||
### 5. Gotchas
|
||||
- **Ambiguity in `Unassigned`**: The `string Unassigned` property lacks specification of its format (e.g., comma-separated IDs, JSON, or free text). Implementation may vary.
|
||||
- **`GetTestId()` duplication**: Both `ISummaryView` and `ISummaryViewModel` expose `GetTestId()`. It is unclear whether `ISummaryViewModel.GetTestId()` delegates to `View.GetTestId()` or maintains independent state.
|
||||
- **`SetSerializedTestIdValues` vs `UpdateTestIds`**: The distinction between `SetSerializedTestIdValues` (on `ISummaryViewModel`) and `UpdateTestIds` (on `ISummaryView`) is not documented. One may be internal state setter, the other UI updater.
|
||||
- **`SetAAFExceptions` key/value semantics**: The meaning of `Dictionary<double, List<double>>` keys (timestamps) and values (exception lists) is not specified. Are keys absolute times? Relative? Are values magnitudes, error codes, or something else?
|
||||
- **No validation guarantees**: The interface does not enforce non-null checks (e.g., `SetTestName(null)` behavior is undefined).
|
||||
- **`Assigned` is `int` but `Unassigned` is `string`**: Inconsistent representation of channel assignment state may lead to parsing errors if `Unassigned` is parsed manually.
|
||||
|
||||
*None of the interfaces define threading model, lifecycle, or disposal semantics. Implementers must infer or document these separately.*
|
||||
@@ -0,0 +1,45 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.CommonCore/Interface/TestSetups/Imports/TTS/TOMChannels/ITOMChannelsView.cs
|
||||
- Common/DTS.CommonCore/Interface/TestSetups/Imports/TTS/TOMChannels/ITOMChannelsViewModel.cs
|
||||
generated_at: "2026-04-16T02:36:53.863498+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "2075bbf3b1e0d537"
|
||||
---
|
||||
|
||||
# TOMChannels
|
||||
|
||||
## 1. Purpose
|
||||
This module defines foundational interfaces for a Model-View-ViewModel (MVVM) pattern implementation related to TOM (likely *Test Object Model* or domain-specific test object) channel management within the test setup import subsystem for TTS (likely *Test Tool Suite*). It provides a minimal contract layer separating view and view model concerns—`ITOMChannelsView` represents the UI layer, while `ITOMChannelsViewModel` encapsulates presentation logic and state—enabling test setup configurations involving TOM channels to be tested, mocked, or swapped independently.
|
||||
|
||||
## 2. Public Interface
|
||||
- **`ITOMChannelsView`**
|
||||
*Signature:* `public interface ITOMChannelsView : IBaseView`
|
||||
*Behavior:* Represents the view layer for TOM channel configuration in test setups. As a direct extension of `IBaseView`, it inherits base view contract behavior (e.g., lifecycle or binding hooks), though the source does not specify additional members. It is a marker interface with no explicit properties or methods defined here.
|
||||
|
||||
- **`ITOMChannelsViewModel`**
|
||||
*Signature:* `public interface ITOMChannelsViewModel : IBaseViewModel`
|
||||
*Behavior:* Represents the view model for TOM channel configuration. It exposes a single property `View` of type `ITOMChannelsView`, allowing bidirectional linkage between view and view model (typical in MVVM). The property is read-write (`get; set;`), implying the view model may be constructed independently and later attached to a view instance.
|
||||
|
||||
## 3. Invariants
|
||||
- `ITOMChannelsView` must implement `IBaseView` (inherited from `DTS.Common.Base`).
|
||||
- `ITOMChannelsViewModel` must implement `IBaseViewModel` (inherited from `DTS.Common.Base`).
|
||||
- The `View` property of `ITOMChannelsViewModel` must be assignable and expected to hold a valid `ITOMChannelsView` instance during active use (though null assignment is not syntactically prohibited by the interface).
|
||||
- No additional validation, ordering, or state constraints are specified in the source.
|
||||
|
||||
## 4. Dependencies
|
||||
- **Depends on:**
|
||||
- `DTS.Common.Base.IBaseView` (via `ITOMChannelsView`)
|
||||
- `DTS.Common.Base.IBaseViewModel` (via `ITOMChannelsViewModel`)
|
||||
- **Depended on by (inferred):**
|
||||
- Any implementation of `ITOMChannelsView` (e.g., a WPF `UserControl`, WinForms `UserControl`, or XAML page) will depend on this interface for binding or integration with the view model.
|
||||
- Any class implementing `ITOMChannelsViewModel` will depend on `IBaseViewModel` and likely on concrete view types implementing `ITOMChannelsView`.
|
||||
- Other modules in `DTS.Common.Interface.TestSetups.Imports.TTS` (e.g., import logic, configuration handlers) may depend on `ITOMChannelsViewModel` to manage TOM channel settings during test setup import.
|
||||
|
||||
## 5. Gotchas
|
||||
- The interfaces are *marker interfaces* with no explicit members beyond inheritance—behavior is entirely defined by their base interfaces (`IBaseView`, `IBaseViewModel`) and concrete implementations.
|
||||
- The `View` property in `ITOMChannelsViewModel` is not initialized by the interface; callers must ensure proper view/view model pairing (e.g., via DI container or manual assignment) to avoid null reference issues.
|
||||
- No documentation or naming clues indicate the purpose of "TOM channels" (e.g., whether they represent hardware channels, logical groupings, or test resources); this is domain-specific and not evident from the source.
|
||||
- No versioning, obsolescence, or deprecation attributes are present—no indication of planned changes or legacy status.
|
||||
- *None identified from source alone.*
|
||||
@@ -0,0 +1,181 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.CommonCore/Interface/TestSetups/TestSetupsList/ITestSetupsListView.cs
|
||||
- Common/DTS.CommonCore/Interface/TestSetups/TestSetupsList/ITestSetupsListViewModel.cs
|
||||
- Common/DTS.CommonCore/Interface/TestSetups/TestSetupsList/ITestSetup.cs
|
||||
- Common/DTS.CommonCore/Interface/TestSetups/TestSetupsList/ITestSetupRecord.cs
|
||||
- Common/DTS.CommonCore/Interface/TestSetups/TestSetupsList/ITestTemplate.cs
|
||||
generated_at: "2026-04-16T02:37:02.866337+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "acb65b277b35d013"
|
||||
---
|
||||
|
||||
# TestSetupsList
|
||||
|
||||
## Documentation: TestSetupsList Module
|
||||
|
||||
---
|
||||
|
||||
### 1. Purpose
|
||||
|
||||
This module defines the core interfaces for representing, managing, and interacting with *test setups* in the DTS system. A test setup encapsulates the configuration required to execute a test—including hardware (DAS units), groups of channels, sensors, trigger conditions, and execution behavior—while supporting both persistent storage (via `ITestSetupRecord`) and runtime behavior (via `ITestSetup` and `ITestTemplate`). The module also defines UI-layer abstractions (`ITestSetupsListView`, `ITestSetupsListViewModel`) to support listing, filtering, sorting, and interaction with test setups in a view-model pattern. It serves as the foundational contract between the UI, business logic, and data persistence layers for test setup management.
|
||||
|
||||
---
|
||||
|
||||
### 2. Public Interface
|
||||
|
||||
#### `ITestSetupsListView`
|
||||
- **Inherits**: `IBaseView`
|
||||
- **Purpose**: UI view interface for the test setups list screen. No additional members—acts as a marker interface for DI/view binding.
|
||||
|
||||
#### `ITestSetupsListViewModel`
|
||||
- **Inherits**: `IBaseViewModel`, `IFilterableListView`
|
||||
- **Properties**:
|
||||
- `ITestSetupsListView View { get; set; }` – Back-reference to the bound view.
|
||||
- `ITestSetup[] TestSetups { get; set; }` – Current list of test setups displayed.
|
||||
- **Methods**:
|
||||
- `void SetTestSetups(ITestSetup[] allTestSetups)` – Replaces the current test setup list.
|
||||
- `void Sort(object sortBy, bool bColumnClick)` – Sorts the displayed test setups (e.g., by name, ID).
|
||||
- `void Unset()` – Clears or resets the view model state.
|
||||
- `void Filter(string currentFilter)` – Filters the displayed test setups by `currentFilter` (likely name/description).
|
||||
- `void MouseDoubleClick(int index)` – Handles double-click on the test setup at `index` (e.g., to open/edit).
|
||||
|
||||
#### `ITestSetupRecord`
|
||||
- **Inherits**: *None* (base interface for persisted test setup metadata)
|
||||
- **Purpose**: Represents the *data model* of a test setup stored in the database. Contains metadata, configuration flags, and trigger settings.
|
||||
- **Key Properties** (selected highlights):
|
||||
- `int Id`, `string Name`, `string Description`
|
||||
- `bool AutomaticProgression`, `int AutomaticProgressionDelayMS`
|
||||
- `RecordingModes RecordingMode`, `double SamplesPerSecondAggregate`
|
||||
- `double PreTriggerSeconds`, `double PostTriggerSeconds`, `int NumberOfEvents`
|
||||
- `bool StrictDiagnostics`, `bool RequireUserConfirmationOnErrors`
|
||||
- `bool DoROIDownload`, `bool ViewROIDownload`, `bool DownloadAll`, `bool ViewRealtime`, `short DefaultNumberRealtimeGraphs`
|
||||
- `BindingList<IRegionOfInterest> RegionsOfInterest`
|
||||
- `bool Dirty`, `bool IsComplete`, `string ErrorMessage`
|
||||
- `bool CheckoutMode`, `string ISFFile`, `string TestSetupUniqueId`
|
||||
- Numerous trigger-related properties (e.g., `LowgLevelTriggerOnX`, `HighgLevelTriggerOnY`, etc.)
|
||||
- `bool UseLabratoryDetails`, `string LabDetails`, `bool UseCustomerDetails`, `string CustomerDetails`
|
||||
- `CalibrationBehaviors CalibrationBehavior`, `bool LocalOnly`, `DateTime LastModified`, `string LastModifiedBy`
|
||||
- **Methods**:
|
||||
- `void Copy(ITestSetupRecord copy)` – Deep copy from another record.
|
||||
- `void InitializeFromDefaults(CalibrationBehaviors, RecordingModes, double preTriggerSeconds, double postTriggerSeconds, int numEvents)` – Initializes with default values.
|
||||
|
||||
#### `ITestSetup`
|
||||
- **Inherits**: `ITestSetupRecord`
|
||||
- **Purpose**: Extends `ITestSetupRecord` with runtime behavior for managing *test objects* (groups, channels, sensors, hardware).
|
||||
- **Properties**:
|
||||
- `Dictionary<IGroup, IGroupChannel[]> ChannelsForGroup { get; set; }`
|
||||
- `Dictionary<string, bool> DASClockMasterList { get; set; }`
|
||||
- `Dictionary<string, double> DASSampleRateList { get; set; }`
|
||||
- `Dictionary<string, float> DASAAFRateList { get; set; }`
|
||||
- `Dictionary<string, List<string>> EncapsulatedDASList { get; set; }`
|
||||
- `ObservableCollection<IGroup> Groups { get; set; }`
|
||||
- `int[] AddedHardware { get; set; }`, `int[] RemovedHardware { get; set; }`
|
||||
- `Visibility TooltipVisibility { get; }`, `string TooltipMessage { get; }`, `string CompletionErrorMessage { get; }`
|
||||
- **Methods**:
|
||||
- `void AddGroup(IGroup group, IDictionary<int, ISensorData> sensorLookup, IDictionary<long, IGroupChannel> channelLookup)`
|
||||
*(overload exists with `IDictionary<int, IDASHardware> hardwareLookup, IChannelSetting[] channelDefaults`)*
|
||||
- `double GetSampleRate(string dasSerialNumber, double defaultValue)`
|
||||
- `bool Filter(string term)` – Filters internal groups/channels by `term`.
|
||||
- `int[] GetAllIncludedHardware()` – Returns hardware IDs included in the test (after additions/removals).
|
||||
- `void AddHardware(int dasId, string dasSerialNumber, IDASHardware[] allHardware, IDictionary<int, IDASHardware> lookup)`
|
||||
`void AddHardware(int dasId, IDictionary<int, IDASHardware> lookup)`
|
||||
`void RemoveHardware(int dasId, IDASHardware[] allHardware, IDictionary<int, IDASHardware> lookup)`
|
||||
- `void SaveGroups()`, `void SaveHardware()`, `void RemoveGroup(IGroup group)`
|
||||
- `void MoveGroupUp(IGroup group)`, `void MoveGroupDown(IGroup group)`, `void MoveGroupToDisplayOrder(IGroup group, int displayOrder)`
|
||||
- `List<IGroupChannel> GetChannels()`, `void SetTestSetupChannelOrder()`
|
||||
|
||||
#### `ITestTemplate`
|
||||
- **Inherits**: `ITestSetup`
|
||||
- **Purpose**: Represents the *heavyweight*, fully-loaded runtime instance of a test setup (e.g., `HeavyTestSetup` class). Includes UI state, derived properties, and methods for manipulation, serialization, and validation.
|
||||
- **Properties** (selected highlights):
|
||||
- `bool LowgLevelTriggersMixed`, `double LowgLinearLevelTriggerAggregate`, `bool HighgLevelTriggersMixed`, etc. (aggregate level trigger flags)
|
||||
- `bool DestructiveTest { get; set; }` – Runtime flag indicating test is destructive/impact (affects sensor/DAS first-use date).
|
||||
- `bool ExpressTestSetup`, `bool PreserveTestId`, `bool IsLoaded`, `bool QuickSensorCheck`
|
||||
- `bool ArmCheckListStep`, `bool CheckListBatteryVoltageCheck`, ... (checklist step flags)
|
||||
- `int ExcitationWarmupTimeMS`, `int GraphCount`, `string SetupFile`, `string TestId`, `string TestDirectory`, `string SampleRateText`
|
||||
- `List<string> CheckedDASList { get; set; }`, `bool GroupsStepValid`
|
||||
- `double MaxSampleRate { get; }`, `double MinSampleRate { get; }`
|
||||
- `int ChannelCount { get; }`, `int IncludedChannelCount { get; }`
|
||||
- **Methods** (selected highlights):
|
||||
- `void CreateCopy()` – Removes IDs to create a new unsaved copy.
|
||||
- `void ClearHardware()` – Clears all hardware assignments.
|
||||
- `void Rename(bool bAddedGroups)` – Renames test setup and updates group references.
|
||||
- `void SetGroupsListOrder()` – Sets display order based on current group list order.
|
||||
- `void ReplaceLevelTriggerChannel(...)` (multiple overloads) – Updates channel IDs/group mappings in level triggers.
|
||||
- `void RefreshSensorsFromDb()` – Reloads sensors from DB while preserving custom overrides.
|
||||
- `void SetDisabled(string groupName, string channelName, bool disabled)` – Disables a channel (excludes from run).
|
||||
- `void WriteXML(ref XmlWriter writer)` – Serializes test setup to XML.
|
||||
- `void Load(bool fromDB = false)`, `void UnLoad()` – Manages memory state.
|
||||
- `void LoadFromDb()`, `void UpdateFromDb()`, `IDASHardware[] GetHardwareFromDb()`, etc.
|
||||
- `void CalculateIsComplete(bool bSetInDb = true)` – Computes `IsComplete` and `ErrorMessage`.
|
||||
- `void MarkIsCompleteUnchecked(bool skipMemoryCheck = false)` – Sets `Dirty = true` *and* persists to DB.
|
||||
- `void ReloadGroups(bool bMemoryOnly)`, `void ReloadGroupsMemoryOnly()`
|
||||
- `bool CheckForIEPE()`, `bool CheckForTOM()`, `bool CheckForTOMInTest()`, `bool CheckForAnalog()`
|
||||
- `double GetSampleRateForHardware(string h)`, `float GetAAFForHardware(IDASCommunication das)`, `float GetAAFForHardware(IDASCommunication das, int sps)`, `float GetRealtimeAAFForHardware(IDASCommunication idas, double samplerate)`
|
||||
- `void SetHardwareOverride(string hid, bool bAdd)` – Adds/removes hardware from test.
|
||||
- `void UpdateDynamicGroupFromStaticGroup(IGroup _updateGroup, IGroup staticGroup)` – Converts dynamic group to static snapshot.
|
||||
- `void Rename(string newName)` – Renames the test setup.
|
||||
|
||||
---
|
||||
|
||||
### 3. Invariants
|
||||
|
||||
- **`ITestSetupRecord.IsComplete`** is *dependent* on `Dirty`:
|
||||
If `Dirty == true`, `IsComplete` is *not* valid and must be recalculated via `CalculateIsComplete()`.
|
||||
*(See `ITestSetupRecord.Dirty`, `ITestSetupRecord.IsComplete` comments)*
|
||||
- **`ITestSetupRecord.ErrorMessage`** is a cached value; it is *not* automatically updated on change. Must be set explicitly (e.g., via `SetCompletionErrorMessage()` or `CalculateIsComplete()`).
|
||||
- **`ITestTemplate.IsLoaded`** indicates whether full data (groups, channels, hardware) has been loaded from DB. Methods like `Load()`, `UnLoad()`, `LoadFromDb()` manage this state.
|
||||
- **Hardware overrides (`AddedHardware`, `RemovedHardware`)** take precedence over hardware inferred from groups. `GetAllIncludedHardware()` reflects this.
|
||||
- **Level triggers** (e.g., `LowgLevelTriggerOnX`) may reference groups/channels by ID/serial; methods like `ReplaceLevelTriggerChannel()` and `ReplaceLevelTriggerChannelGroupMapping()` exist to maintain consistency after renaming/cloning.
|
||||
- **`ITestSetupRecord.LastModified`** and `LastModifiedBy` are *not* auto-updated; must be set explicitly on save.
|
||||
|
||||
---
|
||||
|
||||
### 4. Dependencies
|
||||
|
||||
#### Dependencies *of* this module:
|
||||
- **Core Interfaces**:
|
||||
- `DTS.Common.Base.IBaseView`, `DTS.Common.Base.IBaseViewModel`
|
||||
- `DTS.Common.Interface.Pagination.IFilterableListView`
|
||||
- `DTS.Common.Interface.Channels.IGroupChannel`
|
||||
- `DTS.Common.Interface.DataRecorders.IDASHardware`, `IDASCommunication`
|
||||
- `DTS.Common.Interface.Groups.GroupList.IGroup`
|
||||
- `DTS.Common.Interface.Sensors.ISensorData`, `ISensorCalibration`
|
||||
- `DTS.Common.Interface.RegionOfInterest.IRegionOfInterest`
|
||||
- `DTS.Common.Interface.ISO.ExtraProperties.IExtraProperty`
|
||||
- **Enums**:
|
||||
- `DTS.Common.Enums.RecordingModes`, `DTS.Common.Enums.Sensors.CalibrationBehaviors`, `DTS.Common.Enums.DASFactory.ClockSyncProfile`, `DTS.Common.Enums.Viewer.SupportedExportFormatBitFlags`, `TimeUnitTypeEnum`, `WakeupTriggers`
|
||||
- **System Types**:
|
||||
- `System.Collections.Generic.*`, `System.Collections.ObjectModel.*`, `System.Collections.Specialized.BindingList<T>`, `System.Windows.Visibility`, `System.Xml.XmlWriter`
|
||||
|
||||
#### Dependencies *on* this module:
|
||||
- UI layers (WPF) consuming `ITestSetupsListView`/`ITestSetupsListViewModel`.
|
||||
- Persistence layers (DB access) implementing `ITestSetupRecord`/`ITestSetup`/`ITestTemplate`.
|
||||
- Test execution engine (uses `ITestSetup`/`ITestTemplate` for runtime configuration).
|
||||
|
||||
---
|
||||
|
||||
### 5. Gotchas
|
||||
|
||||
- **`Dirty`/`IsComplete` state is *not* persisted automatically**:
|
||||
`SetIsComplete()`, `SetIsDirty()`, and `SetCompletionErrorMessage()` only affect in-memory state. To persist, use `CalculateIsComplete(bSetInDb: true)` or `MarkIsCompleteUnchecked()` (which *does* persist `Dirty`).
|
||||
- **`ITestSetupRecord` vs `ITestSetup` vs `ITestTemplate`**:
|
||||
`ITestSetupRecord` is *only* for DB metadata. `ITestSetup` adds runtime group/hardware management. `ITestTemplate` is the concrete runtime implementation with full features (serialization, XML, hardware lookup, etc.). Do not assume `ITestSetup` instances are `ITestTemplate`.
|
||||
- **Hardware lookup methods require external dictionaries**:
|
||||
`AddHardware()`, `RemoveHardware()` require `allHardware` and `lookup` parameters—these are *not* self-contained. Callers must provide up-to-date hardware caches.
|
||||
- **`DestructiveTest` is *not serialized***:
|
||||
It is a runtime-only flag used during test execution (e.g., to set first-use dates).
|
||||
- **`GroupsStepValid` is a UI flag**:
|
||||
Set by UI logic; not computed or enforced by the interface.
|
||||
- **`SampleRateText` is a string representation**:
|
||||
Likely for display only; `MaxSampleRate`/`MinSampleRate` are the canonical numeric values.
|
||||
- **`ITestSetupRecord.TagsBlobBytes`**:
|
||||
Binary blob—interpretation is external to this module.
|
||||
- **`ITestSetupRecord.LocalOnly` is deprecated**:
|
||||
Comment states it is deprecated; avoid relying on it for new features.
|
||||
- **`ITestTemplate.RefreshSensorsFromDb()` preserves custom values**:
|
||||
Sensors are reloaded from DB, but custom overrides (range, polarity, CFC, etc.) are retained.
|
||||
- **`ITestTemplate.WriteXML()` writes to an *existing* `XmlWriter`**:
|
||||
Caller is responsible for creating/wrapping the writer and managing stream lifecycle.
|
||||
@@ -0,0 +1,44 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.CommonCore/Interface/ViewData/IViewDataView.cs
|
||||
- Common/DTS.CommonCore/Interface/ViewData/IViewDataViewModel.cs
|
||||
generated_at: "2026-04-16T02:19:02.978313+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "820bab209e8d1b8f"
|
||||
---
|
||||
|
||||
# ViewData
|
||||
|
||||
## 1. Purpose
|
||||
This module defines foundational interfaces for a view-layer architecture in the DTS.CommonCore library, specifically for implementing the *View Data* pattern (likely part of a broader MVVM or similar separation of concerns). The `IViewDataView` and `IViewDataViewModel` interfaces serve as marker interfaces that extend base view and view model contracts (`IBaseView`, `IBaseViewModel`), enabling type-safe binding and dependency injection of view-related components while preserving abstraction and decoupling between UI presentation and business logic layers.
|
||||
|
||||
## 2. Public Interface
|
||||
No public *functions*, *properties*, or *methods* are defined directly in these interfaces. They are empty (marker) interfaces. Their sole purpose is to establish type identity and inheritance relationships.
|
||||
|
||||
- `interface IViewDataView : IBaseView`
|
||||
A marker interface for views that expose or consume *view data* (e.g., data-bound UI elements). It inherits from `IBaseView`, implying it adheres to the base view contract (e.g., lifecycle, initialization, or rendering semantics defined elsewhere).
|
||||
|
||||
- `interface IViewDataViewModel : IBaseViewModel`
|
||||
A marker interface for view models that provide *view data* (e.g., state, commands, or data structures consumed by `IViewDataView`). It inherits from `IBaseViewModel`, implying it conforms to the base view model contract (e.g., data binding support, state management, or notification patterns defined elsewhere).
|
||||
|
||||
## 3. Invariants
|
||||
- `IViewDataView` must be implemented by types that also satisfy `IBaseView`.
|
||||
- `IViewDataViewModel` must be implemented by types that also satisfy `IBaseViewModel`.
|
||||
- No additional behavioral invariants are specified beyond inheritance; the interfaces themselves impose no runtime constraints.
|
||||
|
||||
## 4. Dependencies
|
||||
- **Depends on**:
|
||||
- `DTS.Common.Base.IBaseView` (via `IViewDataView`)
|
||||
- `DTS.Common.Base.IBaseViewModel` (via `IViewDataViewModel`)
|
||||
- `DTS.Common.Base` namespace (implicit dependency on the `DTS.Common.Base` assembly/module)
|
||||
|
||||
- **Depended on by**:
|
||||
- Not determinable from source alone. Likely used elsewhere in the codebase (e.g., in DI registrations, view/view model factories, or binding infrastructure) to constrain generic parameters (e.g., `TView : IViewDataView`, `TViewModel : IViewDataViewModel`) or enforce architectural rules.
|
||||
|
||||
## 5. Gotchas
|
||||
- **Ambiguity of purpose**: The term *“View Data”* is not defined in the source. Its semantic distinction from other view/view model types (e.g., `IBaseView` vs. `IViewDataView`) is unclear without additional context (e.g., documentation or usage examples).
|
||||
- **No API surface**: Since these are marker interfaces, developers may mistakenly expect methods/properties—ensure they are used only for type checking (`is`, `as`, generic constraints) or DI registration, not behavior invocation.
|
||||
- **Potential naming overlap**: If other modules define similarly named interfaces (e.g., `IViewData`), confusion may arise; verify naming consistency across the codebase.
|
||||
- **No versioning or deprecation hints**: No attributes (e.g., `[Obsolete]`) or version comments are present; assume stability but verify usage in consuming code for compatibility.
|
||||
- **None identified from source alone.**
|
||||
@@ -0,0 +1,109 @@
|
||||
---
|
||||
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-16T02:22:43.523517+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "d625778ef337fcd6"
|
||||
---
|
||||
|
||||
# Viewer Interface Module Documentation
|
||||
|
||||
## 1. Purpose
|
||||
This module defines a set of interfaces that establish the contract for the *view* and *view model* layers in a modular UI architecture, specifically for a test definition and analysis application. It establishes a standardized structure for core UI regions—main view, menu, navigation, filter, and test summary list—by defining their corresponding view (`*View`) and view model (`*ViewModel`) interfaces, all inheriting from base interfaces in `DTS.Common.Base`. The module serves as a contract layer enabling decoupled UI composition, likely used in a region-based navigation framework (e.g., Prism), where views and view models are loosely coupled and injected into named regions of a shell application.
|
||||
|
||||
## 2. Public Interface
|
||||
|
||||
### View Interfaces (all inherit `IBaseView`):
|
||||
- **`IMainView`**
|
||||
Represents the main shell/window view. No additional members beyond `IBaseView`.
|
||||
|
||||
- **`IMenuView`**
|
||||
Represents the menu view (e.g., top-level menu bar or context menu container). No additional members beyond `IBaseView`.
|
||||
|
||||
- **`IFilterView`**
|
||||
Represents the filter/search view (e.g., search bar, filter controls). No additional members beyond `IBaseView`.
|
||||
|
||||
- **`INavigationView`**
|
||||
Represents the navigation view (e.g., side navigation panel). No additional members beyond `IBaseView`.
|
||||
|
||||
- **`ITestSummaryListView`** *(note: interface name mismatch with file name)*
|
||||
Represents the list view for test definitions/summaries. No additional members beyond `IBaseView`.
|
||||
⚠️ *File declares `ITestDefinitionListView`, but interface is named `ITestSummaryListView`.*
|
||||
|
||||
### View Model Interfaces (all inherit `IBaseViewModel`):
|
||||
- **`IMenuViewModel`**
|
||||
- `IMenuView View { get; }` — Returns the associated menu view instance.
|
||||
|
||||
- **`INavigationViewModel`**
|
||||
- `INavigationView NavigationView { get; }` — Returns the associated navigation view instance.
|
||||
|
||||
- **`IFilterViewModel`**
|
||||
- `IBaseView View { get; }` — Returns the associated filter/search view instance.
|
||||
- `IBaseViewModel Parent { get; }` — Reference to the parent view model (likely `IMainViewModel`).
|
||||
- `object ContextSearchRegion { get; set; }` — Holds a reference to the UI region (e.g., content control) where search/filter results are displayed.
|
||||
|
||||
- **`ITestSummaryListViewModel`** *(note: interface name mismatch with file name)*
|
||||
- `ITestSummaryListView TestSummaryListView { get; }` — Returns the associated test summary list view.
|
||||
- `ObservableCollection<ITestSummary> TestSummaryList { get; set; }` — Collection of test summaries displayed in the list.
|
||||
- `List<ITestSummary> SelectedTestSummaryList { get; set; }` — Currently selected test summaries.
|
||||
- `void PublishSelectedTestSummaryList()` — Triggers publication of the selected list (e.g., for downstream processing or event broadcasting).
|
||||
|
||||
- **`IMainViewModel`**
|
||||
- `IBaseView View { get; }` — Returns the main shell view instance.
|
||||
- `object ContextNavigationRegion { get; set; }` — Reference to the navigation region container.
|
||||
- `object ContextGraphRegion { get; set; }` — Reference to the primary graph region container.
|
||||
- `object ContextTestsRegion { get; set; }` — Reference to the tests region container.
|
||||
- `object ContextGraphsRegion { get; set; }` — Reference to the graphs region container (plural).
|
||||
- `object ContextLegendRegion { get; set; }` — Reference to the legend region container.
|
||||
- `object ContextDiagRegion { get; set; }` — Reference to the diagnostics region container.
|
||||
- `object ContextStatsRegion { get; set; }` — Reference to the statistics region container.
|
||||
- `object ContextCursorRegion { get; set; }` — Reference to the cursor/overlay region container.
|
||||
- `object ContextPropertyRegion { get; set; }` — Reference to the property inspection region container.
|
||||
- `List<FrameworkElement> GetRegions()` — Returns a list of all region containers as `FrameworkElement` instances.
|
||||
|
||||
## 3. Invariants
|
||||
- All view interfaces (`*View`) must be implemented by UI controls (e.g., `UserControl`, `Window`) that inherit from `IBaseView`.
|
||||
- All view model interfaces (`*ViewModel`) must be implemented by view models that inherit from `IBaseViewModel`.
|
||||
- Each view model *must* expose a reference to its corresponding view via the `View`-typed property (e.g., `INavigationViewModel.NavigationView`, `IFilterViewModel.View`).
|
||||
- `IFilterViewModel` requires a `Parent` reference, implying a hierarchical view model structure.
|
||||
- `IMainViewModel` defines a fixed set of named region contexts (`Context*Region`)—these are expected to be non-null after initialization and must correspond to actual UI regions in the shell.
|
||||
- `GetRegions()` must return a list containing *all* region containers, including those not explicitly named (e.g., `Context*Region` properties), to support generic region enumeration.
|
||||
|
||||
## 4. Dependencies
|
||||
### Dependencies *on* this module:
|
||||
- **`DTS.Common.Base`**: All interfaces inherit from `IBaseView` and `IBaseViewModel`, implying this module depends on the base layer for core contracts.
|
||||
- **`DTS.Common.Interface.TestDefinition`**: `ITestSummaryListViewModel` references `ITestSummary`, indicating a dependency on the `TestDefinition` sub-namespace (likely defining test metadata models).
|
||||
- **`System.Collections.Generic`, `System.Collections.ObjectModel`**: Used for list/collection properties in `ITestSummaryListViewModel`.
|
||||
- **`System.Windows`**: `IMainViewModel.GetRegions()` returns `FrameworkElement`, indicating a WPF-specific dependency.
|
||||
|
||||
### Dependencies *of* this module:
|
||||
- This module is *consumed* by higher-level UI composition layers (e.g., shell application, region managers, or DI containers) that instantiate and wire views/view models.
|
||||
- Likely consumed by implementations in `DTS.App.*` or similar application projects.
|
||||
|
||||
## 5. Gotchas
|
||||
- **Interface name mismatch**:
|
||||
- File `ITestDefinitionListView.cs` declares interface `ITestSummaryListView` (not `ITestDefinitionListView`).
|
||||
- File `ITestDefinitionListViewModel.cs` declares interface `ITestSummaryListViewModel` (not `ITestDefinitionListViewModel`).
|
||||
This may cause confusion during code navigation or refactoring.
|
||||
- **Ambiguous region semantics**:
|
||||
`Context*Region` properties are typed as `object`, with no compile-time guarantee of their expected type (e.g., `ContentControl`, `Grid`). Consumers must assume runtime type compatibility.
|
||||
- **Missing `INavigationView` vs. `NavigationView` naming**:
|
||||
`INavigationViewModel.NavigationView` returns `INavigationView`, but the interface is named `INavigationView` (not `INavigationView`), which is consistent—but the *region* is named `ContextNavigationRegion`, not `ContextShellRegion`, suggesting potential naming inconsistency with other regions.
|
||||
- **No explicit region registration**:
|
||||
The interfaces define region *references* but no mechanism to register or validate region names—consumers must rely on external configuration (e.g., XAML region names matching property names like `ContextTestsRegion`).
|
||||
- **`IFilterViewModel.ContextSearchRegion`**:
|
||||
The name `ContextSearchRegion` suggests search-specific behavior, but the interface is named `IFilterView`—this may indicate legacy naming or incomplete refactoring.
|
||||
- **No documentation for `GetRegions()` behavior**:
|
||||
It is unclear whether `GetRegions()` includes *only* the explicitly named `Context*Region` properties or also other regions; implementation may vary.
|
||||
|
||||
None identified beyond the above.
|
||||
@@ -0,0 +1,229 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.CommonCore/Interface/Viewer/TestDefinition/ITestMetadata.cs
|
||||
- Common/DTS.CommonCore/Interface/Viewer/TestDefinition/ITestGraphs.cs
|
||||
- Common/DTS.CommonCore/Interface/Viewer/TestDefinition/ITestSetupMetadata.cs
|
||||
- Common/DTS.CommonCore/Interface/Viewer/TestDefinition/ITestSummary.cs
|
||||
- Common/DTS.CommonCore/Interface/Viewer/TestDefinition/ITestRunMetadata.cs
|
||||
- Common/DTS.CommonCore/Interface/Viewer/TestDefinition/ITestModule.cs
|
||||
- Common/DTS.CommonCore/Interface/Viewer/TestDefinition/ITestChannel.cs
|
||||
- Common/DTS.CommonCore/Interface/Viewer/TestDefinition/ITestCalculatedChannel.cs
|
||||
generated_at: "2026-04-16T02:35:18.903149+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "2b62dbe801084083"
|
||||
---
|
||||
|
||||
# Documentation: Test Definition Interfaces
|
||||
|
||||
## 1. Purpose
|
||||
This module defines a set of interfaces that model metadata for test execution and data capture within the DTS (presumably Data Acquisition and Test System) viewer framework. It establishes a structured contract for representing hierarchical test metadata—from high-level test summaries down to individual channels and modules—including run-level configuration, setup details, graph definitions, and channel-specific calibration and acquisition parameters. These interfaces serve as the foundational data model for test result visualization, analysis, and reporting components, enabling consumers to access metadata without coupling to concrete implementations.
|
||||
|
||||
## 2. Public Interface
|
||||
|
||||
### `ITestMetadata`
|
||||
- **Namespace**: `DTS.Common.Interface.TestDefinition`
|
||||
- **Properties**:
|
||||
- `ITestRunMetadata TestRun { get; set; }` – Top-level metadata for a specific test run (e.g., execution context, modules, channels).
|
||||
- `ITestSetupMetadata TestSetup { get; set; }` – Metadata describing the physical setup and environment at test start (e.g., date, graphs, setup name).
|
||||
|
||||
### `ITestGraphs`
|
||||
- **Namespace**: `DTS.Common.Interface`
|
||||
- **Properties**:
|
||||
- `string Name { get; set; }` – Human-readable name of the graph.
|
||||
- `string HardwareChannelName { get; set; }` – Name of the hardware channel associated with this graph.
|
||||
- `List<string> ChannelId { get; set; }` – Ordered list of channel IDs included in this graph.
|
||||
|
||||
### `ITestSetupMetadata`
|
||||
- **Namespace**: `DTS.Common.Interface`
|
||||
- **Properties**:
|
||||
- `string Name { get; set; }` – Name of the test setup.
|
||||
- `DateTime TestDate { get; set; }` – Date the test was performed.
|
||||
- `DateTime TimeStamp { get; set; }` – Timestamp of setup metadata creation/update.
|
||||
- `List<ITestGraphs> TestGraphs { get; set; }` – Collection of graph definitions associated with this setup.
|
||||
|
||||
### `ITestSummary`
|
||||
- **Namespace**: `DTS.Common.Interface.TestDefinition`
|
||||
- **Inherits**: `IBaseClass` (not defined in provided source)
|
||||
- **Properties**:
|
||||
- `string Id { get; set; }` – Unique identifier for the test summary.
|
||||
- `string Name { get; set; }` – Human-readable test name.
|
||||
- `string Description { get; set; }` – Free-form description of the test.
|
||||
- `int ChannelCount { get; set; }` – Total number of channels (including calculated).
|
||||
- `DateTime TestDate { get; set; }` – Date/time of the test.
|
||||
- `string DataType { get; set; }` – Type of data collected (e.g., "Raw", "Processed").
|
||||
- `bool IsSelected { get; set; }` – Flag indicating if this test summary is selected in UI.
|
||||
- `List<ITestGraphs> Graphs { get; set; }` – Graphs associated with this summary.
|
||||
- `List<ITestChannel> Channels { get; set; }` – Physical channels captured during the test.
|
||||
- `List<ITestChannel> CalculatedChannels { get; set; }` – Channels derived via calculation (note: type is `ITestChannel`, not `ITestCalculatedChannel`).
|
||||
- `IBaseViewModel Parent { get; set; }` – Parent view model (requires `IBaseViewModel` definition).
|
||||
|
||||
### `ITestRunMetadata`
|
||||
- **Namespace**: `DTS.Common.Interface`
|
||||
- **Inherits**: `INotifyPropertyChanged`
|
||||
- **Properties**:
|
||||
- `string Id { get; set; }` – Unique identifier for the test run.
|
||||
- `string Description { get; set; }` – Description of the test run.
|
||||
- `bool InlineSerializedData { get; set; }` – Indicates if raw data is embedded inline in metadata (vs. external file).
|
||||
- `string TestGuid { get; set; }` – Globally unique identifier for the test.
|
||||
- `int FaultFlags { get; set; }` – Bitmask of fault conditions encountered during test.
|
||||
- `string Software { get; set; }` – Name of software used for acquisition.
|
||||
- `string SoftwareVersion { get; set; }` – Version of acquisition software.
|
||||
- `string DataType { get; set; }` – Data type identifier (e.g., "Raw", "Processed").
|
||||
- `List<ITestModule> Modules { get; set; }` – List of hardware modules used in the test.
|
||||
- `List<ITestChannel> Channels { get; set; }` – Physical channels in the test.
|
||||
- `List<ITestChannel> CalculatedChannels { get; set; }` – Calculated channels (note: type is `ITestChannel`, not `ITestCalculatedChannel`).
|
||||
|
||||
### `ITestModule`
|
||||
- **Namespace**: `DTS.Common.Interface`
|
||||
- **Inherits**: `INotifyPropertyChanged`
|
||||
- **Properties**:
|
||||
- `string SerialNumber { get; set; }` – Unique serial number of the module.
|
||||
- `string BaseSerialNumber { get; set; }` – Base serial number (e.g., chassis ID).
|
||||
- `int AaFilterRateHz { get; set; }` – Anti-aliasing filter rate in Hz.
|
||||
- `int Number { get; set; }` – Module number/index.
|
||||
- `int NumberOfSamples { get; set; }` – Number of samples *after* subsampling.
|
||||
- `int UnsubsampledNumberOfSamples { get; set; }` – Number of samples *before* subsampling.
|
||||
- `double RequestedPostTriggerSeconds { get; set; }` – User-requested post-trigger time.
|
||||
- `double RequestedPreTriggerSeconds { get; set; }` – User-requested pre-trigger time.
|
||||
- `double PostTriggerSeconds { get; set; }` – Actual post-trigger time (may differ from requested).
|
||||
- `double PreTriggerSeconds { get; set; }` – Actual pre-trigger time.
|
||||
- `string RecordingMode { get; set; }` – e.g., "Continuous", "Event".
|
||||
- `int SampleRateHz { get; set; }` – Effective sample rate (post-subsample).
|
||||
- `int StartRecordSampleNumber { get; set; }` – Sample index where recording started.
|
||||
- `int NumberOfChannels { get; set; }` – Number of active channels on this module.
|
||||
- `bool InlineSerializedData { get; set; }` – Indicates if raw data is embedded inline.
|
||||
- `int StartRecordTimestampSec { get; set; }` – Start record timestamp (seconds).
|
||||
- `int StartRecordTimestampNanoSec { get; set; }` – Start record timestamp (nanoseconds).
|
||||
- `int TriggerTimestampSec { get; set; }` – Trigger timestamp (seconds).
|
||||
- `int TriggerTimestampNanoSec { get; set; }` – Trigger timestamp (nanoseconds).
|
||||
- `bool PTPMasterSync { get; set; }` – Indicates if Precision Time Protocol master sync was used.
|
||||
- `int TiltSensorAxisX/Y/ZDegreesPre/Post { get; set; }` – Tilt sensor readings (pre/post test).
|
||||
- `int TemperatureLocation1-4Pre/Post { get; set; }` – Temperature readings (pre/post test).
|
||||
- `List<ITestChannel> TestChannels { get; set; }` – Channels assigned to this module.
|
||||
|
||||
### `ITestChannel`
|
||||
- **Namespace**: `DTS.Common.Interface`
|
||||
- **Inherits**: `INotifyPropertyChanged`
|
||||
- **Properties**:
|
||||
- `string SerialNumber { get; set; }` – Serial number of the sensor/module.
|
||||
- `string ChannelId { get; set; }` – Unique channel identifier (e.g., "CH1").
|
||||
- `string Description { get; set; }` – Human-readable description.
|
||||
- `string ChannelGroupName { get; set; }` – Group name for channel organization.
|
||||
- `string ChannelType { get; set; }` – e.g., "Strain", "Voltage", "Temperature".
|
||||
- `int Number { get; set; }` – Channel index.
|
||||
- `string DigitalMultiplier { get; set; }` – Multiplier for digital channels.
|
||||
- `string DigitalMode { get; set; }` – e.g., "Counter", "Encoder".
|
||||
- `DateTime Start { get; set; }` – Start time of channel recording.
|
||||
- `string Bridge { get; set; }` – Bridge configuration (e.g., "Full", "Half").
|
||||
- `double BridgeResistanceOhms { get; set; }` – Bridge resistance in ohms.
|
||||
- `double ZeroPoint { get; set; }` – Zero-point offset.
|
||||
- `string ChannelDescriptionString { get; set; }` – Full description string.
|
||||
- `string ChannelName2 { get; set; }` – Alternate channel name.
|
||||
- `string HardwareChannelName { get; set; }` – Hardware-level channel name.
|
||||
- `double DesiredRange { get; set; }` – Desired measurement range.
|
||||
- `double Sensitivity { get; set; }` – Sensor sensitivity (e.g., mV/V).
|
||||
- `string SoftwareFilter { get; set; }` – Applied software filter (e.g., "MovingAverage").
|
||||
- `bool ProportionalToExcitation { get; set; }` – Whether output is proportional to excitation.
|
||||
- `bool IsInverted { get; set; }` – Whether signal is inverted.
|
||||
- `string LinearizationFormula { get; set; }` – Formula used for linearization.
|
||||
- `bool IsSubsampled { get; set; }` – Whether data was subsampled.
|
||||
- `int AbsoluteDisplayOrder { get; set; }` – Display order index.
|
||||
- `DateTime LastCalibrationDate { get; set; }` – Last calibration timestamp.
|
||||
- `string SensorId { get; set; }` – Sensor identifier.
|
||||
- `int OffsetToleranceLowMv { get; set; }` – Low tolerance for offset check (mV).
|
||||
- `int OffsetToleranceHighMv { get; set; }` – High tolerance for offset check (mV).
|
||||
- `int DataFlag { get; set; }` – Data quality flag (bitmask).
|
||||
- `string ExcitationVoltage { get; set; }` – Excitation voltage setting (e.g., "2.5V").
|
||||
- `string Eu { get; set; }` – Engineering units (e.g., "lbf", "°C").
|
||||
- `bool CalSignalEnabled { get; set; }` – Whether calibration signal was enabled.
|
||||
- `bool ShuntEnabled { get; set; }` – Whether shunt calibration was enabled.
|
||||
- `bool VoltageInsertionCheckEnabled { get; set; }` – Whether voltage insertion check was active.
|
||||
- `bool RemoveOffset { get; set; }` – Whether offset removal was applied.
|
||||
- `string ZeroMethod { get; set; }` – Method used for zeroing (e.g., "Average", "Manual").
|
||||
- `double ZeroAverageWindowBegin { get; set; }` – Start time of zero averaging window.
|
||||
- `double ZeroAverageWindowEnd { get; set; }` – End time of zero averaging window.
|
||||
- `int InitialEu { get; set; }` – Initial engineering unit value.
|
||||
- `string InitialOffset { get; set; }` – Initial offset value (string format).
|
||||
- `int UnsubsampledSampleRateHz { get; set; }` – Sample rate before subsampling.
|
||||
- `double MeasuredShuntDeflectionMv { get; set; }` – Measured shunt deflection (mV).
|
||||
- `double TargetShuntDeflectionMv { get; set; }` – Target shunt deflection (mV).
|
||||
- `double MeasuredExcitationVoltage { get; set; }` – Actual measured excitation voltage.
|
||||
- `double FactoryExcitationVoltage { get; set; }` – Factory-set excitation voltage.
|
||||
- `double TimeOfFirstSample { get; set; }` – Timestamp of first sample (seconds).
|
||||
- `int Multiplier { get; set; }` – Channel-specific multiplier.
|
||||
- `int UserOffsetEu { get; set; }` – User-defined offset in engineering units.
|
||||
- `int UnitConversion { get; set; }` – Unit conversion type/index.
|
||||
- `bool AtCapacity { get; set; }` – Whether channel was at full-scale capacity.
|
||||
- `int CapacityOutputIsBasedOn { get; set; }` – Reference for capacity calculation.
|
||||
- `string SourceChannelNumber { get; set; }` – Source channel number (for calculated channels).
|
||||
- `string SourceModuleNumber { get; set; }` – Source module number.
|
||||
- `string SourceModuleSerialNumber { get; set; }` – Source module serial number.
|
||||
- `string Calculation { get; set; }` – Formula/expression for calculated channels.
|
||||
- `int SampleRateHz { get; set; }` – Effective sample rate.
|
||||
- `string SensitivityUnits { get; set; }` – Units for sensitivity (e.g., "mV/V/lbf").
|
||||
- `int SensorCapacity { get; set; }` – Sensor full-scale capacity.
|
||||
|
||||
### `ITestCalculatedChannel`
|
||||
- **Namespace**: `DTS.Common.Interface`
|
||||
- **Inherits**: `INotifyPropertyChanged`
|
||||
- **Properties**:
|
||||
- Identical to `ITestChannel` *except*:
|
||||
- `int BridgeResistanceOhms { get; set; }` (vs. `double` in `ITestChannel`).
|
||||
- `int ExcitationVoltage { get; set; }` (vs. `string` in `ITestChannel`).
|
||||
- **Note**: Despite its name, this interface is *not* used in `ITestRunMetadata.CalculatedChannels` or `ITestSummary.CalculatedChannels`, which both declare `List<ITestChannel>`.
|
||||
|
||||
## 3. Invariants
|
||||
|
||||
- **`ITestRunMetadata` and `ITestSummary`**:
|
||||
- `Channels` and `CalculatedChannels` are declared as `List<ITestChannel>` in both interfaces, implying calculated channels are *not* typed as `ITestCalculatedChannel` in the current model.
|
||||
- `DataType` appears in both `ITestRunMetadata` and `ITestSummary`, but its value may be inconsistent across levels (no enforcement of consistency).
|
||||
- **`ITestModule`**:
|
||||
- `StartRecordTimestampSec/NanoSec` and `TriggerTimestampSec/NanoSec` are separate; no combined timestamp is defined.
|
||||
- Pre/post tilt/temperature readings are stored as integers (likely in °C or °F), but units are not specified.
|
||||
- **`ITestChannel` vs `ITestCalculatedChannel`**:
|
||||
- `BridgeResistanceOhms` is `double` in `ITestChannel` but `int` in `ITestCalculatedChannel`—a type mismatch for the same logical property.
|
||||
- `ExcitationVoltage` is `string` in `ITestChannel` but `int` in `ITestCalculatedChannel`.
|
||||
- **`ITestSummary`**:
|
||||
- `CalculatedChannels` is declared as `List<ITestChannel>`, not `List<ITestCalculatedChannel>`, suggesting calculated channels are stored using the base `ITestChannel` interface.
|
||||
|
||||
## 4. Dependencies
|
||||
|
||||
### This module depends on:
|
||||
- `System.Collections.Generic` (for `List<T>`)
|
||||
- `System.ComponentModel` (for `INotifyPropertyChanged`)
|
||||
- `System` (for `DateTime`, `string`, `int`, `double`, `bool`)
|
||||
- `DTS.Common.Base` (for `IBaseClass` and `IBaseViewModel`, referenced but not provided)
|
||||
|
||||
### This module is depended upon by:
|
||||
- Any consumer of test metadata (e.g., UI viewers, analysis tools, serialization layers).
|
||||
- Concrete implementations of these interfaces (not provided in source).
|
||||
- Likely used by modules handling test data export, reporting, and visualization.
|
||||
|
||||
## 5. Gotchas
|
||||
|
||||
- **Type Mismatch in `BridgeResistanceOhms` and `ExcitationVoltage`**:
|
||||
`ITestChannel` uses `double` for `BridgeResistanceOhms` and `string` for `ExcitationVoltage`, while `ITestCalculatedChannel` uses `int` for both. This inconsistency may cause runtime errors or require explicit casting/conversion in implementations.
|
||||
|
||||
- **`ITestCalculatedChannel` is unused in public interfaces**:
|
||||
Despite defining `ITestCalculatedChannel`, both `ITestRunMetadata.CalculatedChannels` and `ITestSummary.CalculatedChannels` are declared as `List<ITestChannel>`. This suggests either:
|
||||
(a) Calculated channels are stored as `ITestChannel` with a `Calculation` property, or
|
||||
(b) The interface is legacy/unused.
|
||||
|
||||
- **Ambiguous timestamp handling**:
|
||||
Timestamps are split into `Sec` and `NanoSec` fields (e.g., `TriggerTimestampSec`, `TriggerTimestampNanoSec`), but no combined `DateTime` or `TimeSpan` is provided. Consumers must manually reconstruct timestamps.
|
||||
|
||||
- **No validation or null-safety guarantees**:
|
||||
All properties are read/write with no explicit null checks or validation rules. Implementations must handle missing data (e.g., empty `List<T>` vs `null`).
|
||||
|
||||
- **`HardwareChannelName` appears in multiple interfaces**:
|
||||
Defined in `ITestGraphs`, `ITestChannel`, and `ITestCalculatedChannel`—but not guaranteed to be consistent across them.
|
||||
|
||||
- **`InitialOffset` is `string`**:
|
||||
Despite other offset-related fields being numeric, `InitialOffset` is a string (e.g., "0.5"), requiring parsing for numeric operations.
|
||||
|
||||
- **No explicit ordering guarantees**:
|
||||
`List<T>` properties (e.g., `Modules`, `Channels`, `TestGraphs`) have no documented ordering semantics. Consumers should not assume order unless validated by implementation.
|
||||
|
||||
- **`SensorCapacity` vs `CapacityOutputIsBasedOn`**:
|
||||
The meaning of `
|
||||
@@ -0,0 +1,44 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.CommonCore/Interface/Viewer/TestModule/ITestModuleView.cs
|
||||
- Common/DTS.CommonCore/Interface/Viewer/TestModule/ITestModuleViewModel.cs
|
||||
generated_at: "2026-04-16T02:34:29.141077+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "4507faea757f83cb"
|
||||
---
|
||||
|
||||
# TestModule
|
||||
|
||||
## 1. Purpose
|
||||
This module defines the foundational view and view-model interfaces for a *Test Module* within the application’s viewer layer. It serves as a contract for UI components responsible for displaying and managing test-related functionality—specifically, operations involving .NET `Assembly` inspection or loading. The interfaces `ITestModuleView` and `ITestModuleViewModel` extend base abstractions (`IBaseView`, `IBaseViewModel`) to integrate into a larger MVVM (Model-View-ViewModel) architecture, enabling separation of UI presentation logic from business or test execution concerns.
|
||||
|
||||
## 2. Public Interface
|
||||
- **`ITestModuleView`**
|
||||
- *Signature*: `public interface ITestModuleView : IBaseView`
|
||||
- *Behavior*: A marker interface indicating a UI view (e.g., a WPF `UserControl`, WinForms `Form`, or equivalent) that hosts the test module’s UI. It inherits from `IBaseView`, implying it adheres to a common view contract (e.g., lifecycle management, data context binding), though the specifics of `IBaseView` are not provided here.
|
||||
|
||||
- **`ITestModuleViewModel`**
|
||||
- *Signature*: `public interface ITestModuleViewModel : IBaseViewModel`
|
||||
- *Behavior*: Defines the data and commands exposed to the `ITestModuleView`. It exposes a single property:
|
||||
- `AssemblyList`: A `List<Assembly>` (read-write) representing a collection of loaded .NET assemblies—likely those under test or available for test discovery/execution. The view model is responsible for populating and updating this list, and the view binds to it for display or interaction.
|
||||
|
||||
## 3. Invariants
|
||||
- `ITestModuleView` must be implemented by a concrete UI component that can bind to an `ITestModuleViewModel` instance (via `IBaseView`’s contract, assumed to include a `DataContext` or similar mechanism).
|
||||
- `ITestModuleViewModel.AssemblyList` must be non-null after initialization (implied by its read-write property definition), though the source does not specify whether it is initialized by default.
|
||||
- The `AssemblyList` property is expected to hold *loaded* `Assembly` instances (e.g., via `Assembly.Load*`), but the source does not define thread-safety, mutation semantics, or lifecycle constraints (e.g., whether assemblies may be unloaded or modified externally).
|
||||
|
||||
## 4. Dependencies
|
||||
- **Depends on**:
|
||||
- `DTS.Common.Base` namespace (specifically `IBaseView` and `IBaseViewModel`—behavior inferred but not defined here).
|
||||
- `System.Collections.Generic` (for `List<T>`).
|
||||
- `System.Reflection` (for `Assembly`).
|
||||
- **Depended on by**:
|
||||
- Concrete implementations of `ITestModuleView` (e.g., a WPF view class) and `ITestModuleViewModel` (e.g., a view model class handling test assembly management).
|
||||
- Likely consumed by a DI container or module loader in the `DTS.Common.Interface` layer to wire up test module UI components.
|
||||
|
||||
## 5. Gotchas
|
||||
- **Ambiguity in `AssemblyList` semantics**: The interface does not specify whether `AssemblyList` is *owned* by the view model (e.g., populated internally) or *observed* from an external source (e.g., shared state). This could lead to confusion about responsibility for assembly loading/unloading.
|
||||
- **No mutability guarantees**: The property is read-write, but there is no indication of whether changes to the list (e.g., `AssemblyList.Add(...)`) trigger UI updates (e.g., via `INotifyPropertyChanged`). If `IBaseViewModel` does not enforce change notification, consumers may need to manually raise events.
|
||||
- **No versioning or compatibility notes**: Given the proprietary context, future changes to `AssemblyList` (e.g., replacing `List<Assembly>` with `ImmutableArray<Assembly>`) could break implementations without warning.
|
||||
- **None identified from source alone** for other aspects (e.g., no obvious threading or disposal requirements).
|
||||
@@ -0,0 +1,46 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.CommonCore/Interface/_GenericModule/IGenericModuleView.cs
|
||||
- Common/DTS.CommonCore/Interface/_GenericModule/IGenericModuleViewModel.cs
|
||||
generated_at: "2026-04-16T02:23:01.843288+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "857aa9f92afca967"
|
||||
---
|
||||
|
||||
# _GenericModule
|
||||
|
||||
## 1. Purpose
|
||||
This module defines the foundational view and view-model interfaces for generic modules within the system’s UI architecture. It establishes a contract for components that follow the Model-View-ViewModel (MVVM) pattern, enabling consistent separation of UI presentation logic from business logic across different module types. These interfaces inherit from base abstractions (`IBaseView` and `IBaseViewModel`) to ensure uniform behavior and lifecycle management across all modules in the application.
|
||||
|
||||
## 2. Public Interface
|
||||
No public types beyond the interfaces themselves are defined in the provided source files. The interfaces are:
|
||||
|
||||
- **`IGenericModuleView`**
|
||||
*Signature:* `public interface IGenericModuleView : IBaseView`
|
||||
*Behavior:* Serves as a marker interface for UI views associated with generic modules. It inherits from `IBaseView`, implying it adheres to the base view contract (e.g., lifecycle events, data binding setup), though the specific members of `IBaseView` are not visible here.
|
||||
|
||||
- **`IGenericModuleViewModel`**
|
||||
*Signature:* `public interface IGenericModuleViewModel : IBaseViewModel`
|
||||
*Behavior:* Serves as a marker interface for view models associated with generic modules. It inherits from `IBaseViewModel`, implying it conforms to the base view model contract (e.g., property change notification, command exposure), though the specific members of `IBaseViewModel` are not visible here.
|
||||
|
||||
## 3. Invariants
|
||||
- `IGenericModuleView` and `IGenericModuleViewModel` are *marker interfaces* with no additional members or constraints beyond their base interfaces.
|
||||
- Any implementation of `IGenericModuleView` must also satisfy the contract of `IBaseView`.
|
||||
- Any implementation of `IGenericModuleViewModel` must also satisfy the contract of `IBaseViewModel`.
|
||||
- No validation, state, or ordering guarantees are defined at this level; invariants are delegated to the base interfaces and concrete implementations.
|
||||
|
||||
## 4. Dependencies
|
||||
- **Depends on:**
|
||||
- `DTS.Common.Base` namespace (specifically, `IBaseView` and `IBaseViewModel`).
|
||||
- **Used by:**
|
||||
- Unknown from this source alone. These interfaces are likely consumed by module registration systems, dependency injection containers, or UI framework components (e.g., view/view-model locators) that rely on type constraints to wire generic modules.
|
||||
- **No external libraries or modules** are imported beyond `DTS.Common.Base`.
|
||||
|
||||
## 5. Gotchas
|
||||
- **Ambiguity in base contracts:** Since `IBaseView` and `IBaseViewModel` are not defined in the provided sources, their exact contract (e.g., required properties, events, or lifecycle methods) is unknown. This may lead to confusion if consumers assume additional behavior.
|
||||
- **Marker-only interfaces:** The lack of members in `IGenericModuleView` and `IGenericModuleViewModel` means they provide no runtime guarantees beyond type identity. Consumers must rely on convention or additional attributes (e.g., `[ViewFor]`, `[ViewModelFor]`) to associate views and view models.
|
||||
- **Namespace placement:** Both interfaces reside in `DTS.Common.Interface`, but under a subfolder `_GenericModule` (with underscore), which may be unintentional or legacy. This could cause confusion in discovery or tooling.
|
||||
- **No versioning or deprecation markers:** Absence of `[Obsolete]` attributes or versioning hints suggests these interfaces are stable, but historical usage may have evolved beyond their original intent.
|
||||
|
||||
None identified from source alone beyond the above.
|
||||
Reference in New Issue
Block a user