7.0 KiB
source_files, generated_at, model, schema_version, sha256
| source_files | generated_at | model | schema_version | sha256 | |||
|---|---|---|---|---|---|---|---|
|
2026-04-16T03:13:11.250045+00:00 | Qwen/Qwen3-Coder-Next-FP8 | 1 | e533f1f624433322 |
Summary
Documentation: TTS Summary Module Interfaces
1. Purpose
This module defines core interfaces for the TTS (Test Time Series) summary view and view model components within the DTS (Data Test System) framework. It provides a structured abstraction for displaying and managing high-level test metadata—such as test ID, name, sample rate, recording mode, trigger settings, and channel assignments—during test setup import workflows. The interfaces enforce separation of concerns between UI presentation (ISummaryView), business logic/state (ISummaryViewModel), and channel-specific metadata (ISummaryChannel), enabling consistent integration with the broader IBaseClass/IBaseView/IBaseViewModel hierarchy.
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 the number of channels assigned to the current test setup.string Unassigned { get; set; }
Gets or sets a string representation (likely comma-separated IDs or count) of unassigned channels.
ISummaryView
void UpdateTestIds(string[] serializedValues)
Updates the view with an array of serialized test ID values (e.g., JSON or delimited strings).string GetTestId()
Retrieves the currently displayed test ID from 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 for UI updates.void SetStatus(string status, string error = default(string))
Updates the status text (e.g.,"Ready","Loading...") and optionally an error message.void SetProgress(double progress)
Sets the progress indicator (expected range:0.0to1.0).bool TestSetupComplete { get; set; }
Gets or sets a flag indicating whether the test setup process is complete.string ImportFileName { get; }
Gets the name of the imported file (read-only).string TestSetupName { get; }
Gets the name of the current test setup (read-only).double SampleRate { get; }
Gets the configured sample rate (e.g., in Hz).RecordingModes RecordingMode { get; }
Gets the recording mode (fromDTS.Common.Enums.RecordingModesenum).string PreTrigger { get; }
Gets the pre-trigger duration setting (e.g.,"100ms").string PostTrigger { get; }
Gets the post-trigger duration setting (e.g.,"500ms").void SetChannelList()
Triggers population of channel-related UI elements (e.g., populatingISummaryChanneldata).void UpdateUI()
Forces a refresh of the view (e.g., after data changes).void SetSerializedTestIdValues(string[] values)
Stores serialized test ID values for later retrieval (likely used byUpdateTestIds).void SetAvailableSampleRates(int[] values)
Sets the list of available sample rates (e.g., for dropdown population).string GetTestId()
Retrieves the test ID (delegates toView.GetTestId()internally).void SetAAFExceptions(Dictionary<double, List<double>> values)
Sets AAF (likely Analog Acquisition Fault) exception data, mapping timestamps (double) to lists of exception values (e.g., error magnitudes).
3. Invariants
-
ISummaryChannelChannelTypemust be a non-null, non-empty string when set.Assignedmust be ≥ 0.Unassignedmay be empty or null if no unassigned channels exist.
-
ISummaryViewModelTestSetupCompletemust be set totrueonly after all required setup steps (e.g., file import, channel assignment) have succeeded.SampleRate,RecordingMode,PreTrigger, andPostTriggermust be initialized beforeUpdateUI()is called (behavior undefined if accessed prematurely).SetChannelList()must be called before relying onISummaryChanneldata in the view.SetStatus()with a non-nullerrorimplies an error state;SetStatus(status, null)should clear prior errors.SetProgress()values are expected to be in[0.0, 1.0]; out-of-range values may cause undefined behavior.
-
General
Viewmust be assigned before callingUpdateUI(),SetStatus(), or any method that interacts with the UI.GetTestId()returns the value last set viaISummaryView.SetTestName()orSetSerializedTestIdValues()—no validation guarantees beyond view consistency.
4. Dependencies
-
Internal Dependencies
DTS.Common.Base: All interfaces inherit fromIBaseClass,IBaseView, orIBaseViewModel.DTS.Common.Enums:RecordingModesenum is used inISummaryViewModel.RecordingMode.DTS.Common.Interface.TestSetups.Imports.TTS.ReadFile: Namespace referenced (likely contains file-parsing logic for TTS imports).
-
External Dependencies
- Standard .NET collections:
string[],Dictionary<double, List<double>>,int[]. - No external libraries or third-party dependencies are imported.
- Standard .NET collections:
-
Consumers
- Likely consumed by concrete implementations of
ISummaryView(e.g., WPF/WinForms UI controls) andISummaryViewModel(e.g.,SummaryViewModelclass). - The
TTS.ReadFilenamespace (implied by import) likely depends onISummaryViewModelto populate summary data after parsing.
- Likely consumed by concrete implementations of
5. Gotchas
- Ambiguous
UnassignedFormat: TheUnassignedproperty inISummaryChannelis astringbut its format (e.g.,"0","N/A","CH1,CH3") is not specified. Consumers must infer parsing rules from implementation. GetTestId()Duplication: BothISummaryViewandISummaryViewModelexposeGetTestId(). The view model’s implementation likely delegates to the view, but callers must ensureViewis assigned to avoidNullReferenceException.SetAAFExceptionsSemantics: The purpose ofDictionary<double, List<double>>for AAF exceptions is unclear without context—e.g., whether keys are timestamps, indices, or error codes.- No Validation on
SetProgress: No guardrails prevent progress values outside[0.0, 1.0]; UI may misbehave if invalid values are passed. SetSerializedTestIdValuesvsUpdateTestIds: The distinction between these methods is not documented—SetSerializedTestIdValueslikely stores raw data, whileUpdateTestIdstriggers UI rendering. Confusing usage may occur if order is reversed.- No Error Handling Contract:
SetStatus(status, error)does not specify whethererroris logged, displayed, or both.
None identified from source alone.