154 lines
8.7 KiB
Markdown
154 lines
8.7 KiB
Markdown
|
|
---
|
||
|
|
source_files:
|
||
|
|
- Common/DTS.Common/Interface/TestSetups/TestSetupsList/ITestSetupsListView.cs
|
||
|
|
- Common/DTS.Common/Interface/TestSetups/TestSetupsList/ITestSetupsListViewModel.cs
|
||
|
|
- Common/DTS.Common/Interface/TestSetups/TestSetupsList/ITestSetup.cs
|
||
|
|
- Common/DTS.Common/Interface/TestSetups/TestSetupsList/ITestSetupRecord.cs
|
||
|
|
- Common/DTS.Common/Interface/TestSetups/TestSetupsList/ITestTemplate.cs
|
||
|
|
generated_at: "2026-04-17T15:36:47.639334+00:00"
|
||
|
|
model: "zai-org/GLM-5-FP8"
|
||
|
|
schema_version: 1
|
||
|
|
sha256: "ffffd7ac370d5e8e"
|
||
|
|
---
|
||
|
|
|
||
|
|
# Test Setups List Module Documentation
|
||
|
|
|
||
|
|
## 1. Purpose
|
||
|
|
|
||
|
|
This module defines the core interface hierarchy for test setup management in the DTS (Data Test System) application. It establishes contracts for test setup records (`ITestSetupRecord`), extended test setup functionality (`ITestSetup`), heavy test template operations (`ITestTemplate`), and the MVVM pattern for listing test setups (`ITestSetupsListView`, `ITestSetupsListViewModel`). These interfaces govern how test configurations are defined, stored, associated with hardware/sensors/groups, and presented to users for selection and manipulation.
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
## 2. Public Interface
|
||
|
|
|
||
|
|
### `ITestSetupsListView`
|
||
|
|
**Signature:** `public interface ITestSetupsListView : IBaseView { }`
|
||
|
|
|
||
|
|
A marker interface extending `IBaseView` with no additional members. Represents the view contract for displaying a list of test setups.
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
### `ITestSetupsListViewModel`
|
||
|
|
**Signature:** `public interface ITestSetupsListViewModel : IBaseViewModel, IFilterableListView`
|
||
|
|
|
||
|
|
| Member | Signature | Description |
|
||
|
|
|--------|-----------|-------------|
|
||
|
|
| `View` | `ITestSetupsListView View { get; set; }` | Associated view instance. |
|
||
|
|
| `TestSetups` | `ITestSetup[] TestSetups { get; set; }` | Array of test setups displayed in the list. |
|
||
|
|
| `SetTestSetups` | `void SetTestSetups(ITestSetup[] allTestSetups)` | Populates the list with the provided test setups. |
|
||
|
|
| `Sort` | `void Sort(object sortBy, bool bColumnClick)` | Sorts the list by the specified criteria. |
|
||
|
|
| `Unset` | `void Unset()` | Clears/unsets the view model state. |
|
||
|
|
| `Filter` | `void Filter(string currentFilter)` | Filters the list by the given search term. |
|
||
|
|
| `MouseDoubleClick` | `void MouseDoubleClick(int index)` | Handles double-click interaction on the item at the given index. |
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
### `ITestSetupRecord`
|
||
|
|
**Signature:** `public interface ITestSetupRecord`
|
||
|
|
|
||
|
|
Base interface describing a test setup record persisted in the database. Contains ~100+ properties organized into the following categories:
|
||
|
|
|
||
|
|
**Identity & Metadata:**
|
||
|
|
- `int Id`, `string Name`, `string Description`
|
||
|
|
- `DateTime LastModified`, `string LastModifiedBy`
|
||
|
|
- `string TestSetupUniqueId`
|
||
|
|
|
||
|
|
**Test Execution Flow Control:**
|
||
|
|
- `bool AutomaticProgression`, `int AutomaticProgressionDelayMS`
|
||
|
|
- `bool ViewDiagnostics`, `bool VerifyChannels`, `bool AutoVerifyChannels`, `double AutoVerifyDelaySeconds`
|
||
|
|
- `bool DoROIDownload`, `bool ViewROIDownload`, `bool DownloadAll`, `bool ViewDownloadAll`, `bool ViewExport`, `bool ViewRealtime`
|
||
|
|
- `bool TriggerCheckStep`, `bool TriggerCheckRealtime`, `bool PostTestDiagnosticsLevel`
|
||
|
|
- `bool UploadData`, `string UploadFolder`, `bool UploadExportsOnly`
|
||
|
|
|
||
|
|
**Recording Configuration:**
|
||
|
|
- `RecordingModes RecordingMode`
|
||
|
|
- `double SamplesPerSecondAggregate`, `double PreTriggerSeconds`, `double PostTriggerSeconds`
|
||
|
|
- `int NumberOfEvents`
|
||
|
|
|
||
|
|
**Trigger Configuration:**
|
||
|
|
- `bool InvertTriggerCompletion`, `bool InvertStartRecordCompletion`
|
||
|
|
- `bool IgnoreShortedStartCompletion`, `bool IgnoreShortedTriggerCompletion`
|
||
|
|
|
||
|
|
**Diagnostics & Validation:**
|
||
|
|
- `bool StrictDiagnostics`, `bool RequireUserConfirmationOnErrors`
|
||
|
|
- `bool AllowMissingSensors`, `bool AllowSensorIdToBlankChannel`
|
||
|
|
- `CalibrationBehaviors CalibrationBehavior`
|
||
|
|
|
||
|
|
**Region of Interest:**
|
||
|
|
- `BindingList<IRegionOfInterest> RegionsOfInterest`
|
||
|
|
- `double ROIStart`, `double ROIEnd` (marked as deprecated in comments)
|
||
|
|
|
||
|
|
**Level Triggers (Low-g, High-g, Angular):**
|
||
|
|
- Boolean enable flags per axis: `LowgLevelTriggerOn`, `LowgLevelTriggerOnX/Y/Z`, `HighgLevelTriggerOnX/Y/Z`, `AngularAccelLevelTriggerOnX/Y/Z`, `AngularRateLevelTriggerOnX/Y/Z`
|
||
|
|
- Threshold values: `LowgLinearLevelTriggerX/Y/Z`, `HighgLinearLevelTriggerX/Y/Z`, `AngularRateLevelTriggerX/Y/Z`, `AngularAccelLevelTriggerX/Y/Z`
|
||
|
|
|
||
|
|
**Environmental Level Triggers:**
|
||
|
|
- `bool HumidityLevelTriggerOn`, `bool PressureLevelTriggerOn`, `bool TemperatureLevelTriggerOn`
|
||
|
|
- Threshold bounds: `HumidityLevelTriggerBelow/Above`, `PressureLevelTriggerBelow/Above`, `TemperatureLevelTriggerBelow/Above`
|
||
|
|
|
||
|
|
**Wake-up & Interval Triggers:**
|
||
|
|
- `bool WakeUpAndArmTriggerOn`, `WakeupTriggers WakeUpTrigger`
|
||
|
|
- `int WakeUpMagnetTimeout`, `int WakeUpMotionTimeout`
|
||
|
|
- `DateTime WakeUpTimeSessionStart`, `TimeSpan WakeUpTimeDuration`
|
||
|
|
- `bool TimedIntervalTriggerOn`, `int IntervalBetweenEventStartsMinutes`, `TimeUnitTypeEnum TimedIntervalUnits`, `double TimedIntervalDuration`, `double TimedIntervalEvents`
|
||
|
|
- `bool RTCScheduleTriggerOn`, `DateTime RTCScheduleStartDateTime`, `TimeSpan RTCScheduleDuration`, `bool StartWithEvent`
|
||
|
|
|
||
|
|
**Completion Status:**
|
||
|
|
- `bool Dirty` — If true, completion has not been calculated and needs to be.
|
||
|
|
- `bool IsComplete` — Whether the test setup is ready to run.
|
||
|
|
- `string ErrorMessage` — Cached warnings/errors.
|
||
|
|
|
||
|
|
**Methods:**
|
||
|
|
| Method | Signature | Description |
|
||
|
|
|--------|-----------|-------------|
|
||
|
|
| `Copy` | `void Copy(ITestSetupRecord copy)` | Deep copies the provided test setup record. |
|
||
|
|
| `InitializeFromDefaults` | `void InitializeFromDefaults(CalibrationBehaviors, RecordingModes, double preTriggerSeconds, double postTriggerSeconds, int numEvents)` | Initializes the record with default values. |
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
### `ITestSetup`
|
||
|
|
**Signature:** `public interface ITestSetup : ITestSetupRecord`
|
||
|
|
|
||
|
|
Extends `ITestSetupRecord` with group management, hardware association, and channel configuration.
|
||
|
|
|
||
|
|
**Properties:**
|
||
|
|
| Property | Type | Description |
|
||
|
|
|----------|------|-------------|
|
||
|
|
| `ChannelsForGroup` | `Dictionary<IGroup, IGroupChannel[]>` | Maps groups to their associated channels. |
|
||
|
|
| `DASClockMasterList` | `Dictionary<string, bool>` | DAS serial numbers to clock master status. |
|
||
|
|
| `DASSampleRateList` | `Dictionary<string, double>` | DAS serial numbers to sample rates. |
|
||
|
|
| `DASAAFRateList` | `Dictionary<string, float>` | DAS serial numbers to Anti-Alias Filter rates. |
|
||
|
|
| `EncapsulatedDASList` | `Dictionary<string, List<string>>` | Encapsulated DAS mappings. |
|
||
|
|
| `Groups` | `ObservableCollection<IGroup>` | Collection of groups in the test setup. |
|
||
|
|
| `AddedHardware` | `int[]` | Hardware IDs explicitly added regardless of group membership. |
|
||
|
|
| `RemovedHardware` | `int[]` | Hardware IDs explicitly removed regardless of group membership. |
|
||
|
|
| `TooltipVisibility` | `Visibility` | Tooltip visibility state. |
|
||
|
|
| `TooltipMessage` | `string` | Tooltip content. |
|
||
|
|
| `CompletionErrorMessage` | `string` | Error message for completion validation. |
|
||
|
|
|
||
|
|
**Methods:**
|
||
|
|
| Method | Signature | Description |
|
||
|
|
|--------|-----------|-------------|
|
||
|
|
| `AddGroup` | `void AddGroup(IGroup, IDictionary<int, ISensorData>, IDictionary<long, IGroupChannel>)` | Adds a group with sensor and channel lookups. |
|
||
|
|
| `AddGroup` | `void AddGroup(IGroup, IDictionary<int, ISensorData>, IDictionary<int, IDASHardware>, IChannelSetting[])` | Adds a group with sensor, hardware lookups, and channel defaults. |
|
||
|
|
| `RemoveGroup` | `void RemoveGroup(IGroup)` | Removes a group from the test setup. |
|
||
|
|
| `MoveGroupUp` | `void MoveGroupUp(IGroup)` | Moves a group up in display order. |
|
||
|
|
| `MoveGroupDown` | `void MoveGroupDown(IGroup)` | Moves a group down in display order. |
|
||
|
|
| `MoveGroupToDisplayOrder` | `void MoveGroupToDisplayOrder(IGroup, int displayOrder)` | Moves a group to a specific display position. |
|
||
|
|
| `SaveGroups` | `void SaveGroups()` | Persists group changes. |
|
||
|
|
| `AddHardware` | `void AddHardware(int dasId, string dasSerialNumber, IDASHardware[], IDictionary<int, IDASHardware>)` | Adds hardware with serial number. |
|
||
|
|
| `AddHardware` | `void AddHardware(int dasId, IDictionary<int, IDASHardware>)` | Adds hardware by ID. |
|
||
|
|
| `RemoveHardware` | `void RemoveHardware(int dasId, IDASHardware[], IDictionary<int, IDASHardware>)` | Removes hardware from the test setup. |
|
||
|
|
| `SaveHardware` | `void SaveHardware()` | Persists hardware changes. |
|
||
|
|
| `GetAllIncludedHardware` | `int[] GetAllIncludedHardware()` | Returns all hardware IDs included in the test. |
|
||
|
|
| `GetSampleRate` | `double GetSampleRate(string dasSerialNumber, double defaultValue)` | Gets sample rate for a DAS, returning default if not set. |
|
||
|
|
| `Filter` | `bool Filter(string term)` | Filters the test setup by search term. |
|
||
|
|
| `GetChannels` | `List<IGroupChannel> GetChannels()` | Returns all channels in the test setup. |
|
||
|
|
| `SetTestSetupChannelOrder` | `void SetTestSetupChannelOrder()` | Establishes channel ordering. |
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
### `ITestTemplate`
|
||
|
|
**Signature:** `public interface ITestTemplate : ITestSetup`
|
||
|
|
|
||
|
|
The "heavy" test setup interface
|