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