6.8 KiB
6.8 KiB
source_files, generated_at, model, schema_version, sha256
| source_files | generated_at | model | schema_version | sha256 | |||
|---|---|---|---|---|---|---|---|
|
2026-04-16T02:32:49.562747+00:00 | Qwen/Qwen3-Coder-Next-FP8 | 1 | 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; }– TheChannelDescriptionStringofSelectedChannel.bool IsModifiedDescription { get; }–trueifDescriptiondiffers from the channel’s original value.double EuMultiplier { get; set; }– Eu multiplier ofSelectedChannel.bool IsModifiedEuMultiplier { get; }–trueifEuMultiplierdiffers from original.double EuOffset { get; set; }– Eu offset ofSelectedChannel.bool IsModifiedEuOffset { get; }–trueifEuOffsetdiffers from original.double T0 { get; set; }– T0 offset in milliseconds.bool IsModifiedT0 { get; }–trueifT0differs from original.bool IsModifiedLineFit { get; set; }–trueifT1orT2has 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; }–trueifSensitivitydiffers from original.double Sensitivity { get; set; }– Sensitivity ofSelectedChannel.bool IsModifiedFilter { get; }–trueifSelectedFilterdiffers from original.IFilterClass SelectedFilter { get; set; }– Software filter applied toSelectedChannel.T0Mode T0Mode { get; set; }– Adjustment mode for T0 (typeT0Modenot defined in provided sources).DataFlag SelectedDataFlag { get; set; }– Data flag forSelectedChannel.bool IsModifiedDataFlag { get; }–trueifSelectedDataFlagdiffers from original.bool IsModified { get; }–trueif any channel property has been modified.
- Methods:
bool ValidateT0()– ReturnstrueifT0is within the valid time range of the dataset;falseotherwise.
3. Invariants
SelectedChannelmust be non-null forITestModificationModelto function meaningfully (allIsModified*properties and value getters depend on it).IsModified*properties are read-only indicators of whether the corresponding property differs from the original value ofSelectedChannel(not necessarily the current in-memory value).IsModifiedis a logical OR of allIsModified*properties (inferred from documentation).ValidateT0()must evaluateT0against the dataset’s time bounds (exact bounds unspecified).UseISOCodeFilterMappingandUseZeroForUnfilteredonly affect behavior whenSelectedFilteris modified and ISO code synchronization is enabled (implementation detail not specified).
4. Dependencies
This Module Depends On:
DTS.Common.Basenamespace: ProvidesIBaseView,IBaseViewModel,IBaseModel.DTS.Common.Interface.Sensors.SoftwareFilters: ProvidesIFilterClass.DTS.Common.Interface: ContainsITestChannel,DataFlag, andT0Mode(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
ITestModificationViewModelandITestModificationModel. ITestModificationViewimplies integration with a UI framework (e.g., WPF) viaIBaseView.
5. Gotchas
IsModifiedLineFitis the onlyIsModified*property defined asget; set;(others areget;only). This suggests it may be settable externally (e.g., to force marking line fit as modified without changingT1/T2), which is inconsistent with other flags.SelectedFilterusesIFilterClass(comment notes: "FB 13120 Use IFilterClass instead of CFCFilter"), indicating a refactor history. Ensure no legacy code still assumesCFCFilter.T0ModeandDataFlagtypes 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 viaIBaseViewModel/IBaseModelor external mechanisms. - None of the
IsModified*properties are resettable—oncetrue, they remaintrueunless the value is reverted to the original (implementation-dependent).
None identified beyond the above.