9.2 KiB
source_files, generated_at, model, schema_version, sha256
| source_files | generated_at | model | schema_version | sha256 | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
2026-04-16T03:06:05.557409+00:00 | Qwen/Qwen3-Coder-Next-FP8 | 1 | a6c557fc6025ec40 |
HardwareList
Documentation: Hardware List Module (DTS.Common.Interface.DASFactory.Diagnostics.HardwareList)
1. Purpose
This module defines the interfaces for a hardware management and diagnostics view layer in the DASFactory system, specifically supporting the display, selection, association, and replacement of hardware units (e.g., DAS units, SLICE6 modules, bridges) within test setups. It provides a structured abstraction for UI components (views) and their corresponding state and logic (view model), enabling operations such as filtering, sorting, calibration tracking, sample rate configuration, clock synchronization (PTP), and hardware tree navigation (e.g., SLICE6 units associated with a SLICE6DB). Its role is to decouple UI rendering from business logic while supporting multiple specialized views (e.g., overdue, replace, select, tree) for different hardware management workflows.
2. Public Interface
Interfaces (All in namespace DTS.Common.Interface.DASFactory.Diagnostics.HardwareList)
| Interface | Signature | Behavior |
|---|---|---|
ISLICE6TreeView |
interface ISLICE6TreeView : IBaseView |
Represents the view responsible for rendering the SLICE6 hardware tree. No additional behavior beyond IBaseView. |
IHardwareListView |
interface IHardwareListView : IBaseView |
General-purpose view for displaying the main hardware list. No additional behavior beyond IBaseView. |
IHardwareListOverdueView |
interface IHardwareListOverdueView : IBaseView |
View for displaying hardware with overdue calibration. No additional behavior beyond IBaseView. |
IHardwareListReplaceView |
interface IHardwareListReplaceView : IBaseView |
View for the hardware replacement workflow. No additional behavior beyond IBaseView. |
IHardwareListSelectView |
interface IHardwareListSelectView : IBaseView |
View for selecting hardware. Includes InitializeColumns(bool bSteamingTest) to configure column layout based on streaming test mode. |
ISLICE6TreeNode |
interface ISLICE6TreeNode |
Represents a SLICE6 unit node in a tree. Properties: DASId, SerialNumber, Port, PortString (read-only), Number, PositionOnChain, PositionOnChainString (read-only). |
IHardware |
interface IHardware |
Represents a hardware unit (e.g., DAS, SLICE6, bridge). Includes properties for identification (DASId, SerialNumber, HardwareType, IPAddress), configuration (Disabled, Included, DSPStreamingFilter, TestSampleRate, PTPDomainID), calibration (CalDate, CalDueDate, FirstUseDate, IsFirstUseValid), channel counts (AnalogChannels, SquibChannels, etc.), and methods: SetIncluded, SetMixedRates, Filter, DetermineChannelCount. |
IHardwareListViewModel |
interface IHardwareListViewModel : IBaseViewModel, IFilterableListView |
Core view model managing hardware state, associations, and view coordination. Key members: • Properties: SelectedSLICE6, AvailableSLICE6, SelectedSLICE6DB, AvailableSLICE6DB, Hardware, OverdueHardware, HardwareInTest, HardwareToReplace, AvailableHardware, ReplacementHardware, SLICE6TreeNodes, ShowCompact, TestAAFRateHzColumnWidth, TestSampleRateColumnWidth, TestClockMasterColumnWidth, PTPDomainColumnWidth, TDASCalPeriod, G5CalPeriod, etc. • Methods: InitializeReplace, GetHardware, GetAvailableSampleRates, SetTestSampleRates, UpdateTestSampleRate, SetTestAAFRates, UpdateTestAAFilterRate, SetTestClockProfiles, SetTestClockMasters, UpdateTestClockMaster, SetTestPTPDomainIDs, UpdateTestPTPDomainID, CheckForMixedDAS, SetParentMixedRates, SetIncluded, Filter, Sort, SortOverdue, LoadTreeView, Associate, UnAssociate, SaveSLICE6Associations, Replace, SetCalPeriods, GetSelectedItems, SetCache, Unset. |
3. Invariants
IHardware.IncludedandIHardware.Disabled: These boolean flags are mutable viaSetIncluded(bool)and direct property assignment. Their semantics are not explicitly defined in the source, butSetIncludedis provided as a dedicated method, suggesting it may trigger additional logic (e.g., cascading updates).IHardware.DetermineChannelCount: TheChannelCountstring is not auto-updated; it must be explicitly set viaDetermineChannelCount(bool showCompact, IHardware[] allHardware). TheshowCompactparameter controls whether SLICEPro units connected to ECMs are omitted.IHardware.FirstUseDateandIsFirstUseValid:FirstUseDateis only meaningful whenIsFirstUseValidistrue. Anullvalue forFirstUseDateindicates the hardware has not been used since calibration.ISLICE6TreeNodeassociation:SLICE6TreeNodesis populated byLoadTreeView(string serialNumber). Associations (Associate,UnAssociate) are not committed untilSaveSLICE6Associations(string serialNumber)is called.IHardwareListViewModelstate: TheIsEditflag is exposed but not defined in behavior; its usage is implied to control edit vs. read-only mode.IBaseViewandIBaseViewModelinheritance: All views and the view model derive fromDTS.Common.Base.IBaseViewandIBaseViewModelrespectively, implying standard lifecycle/interaction patterns (e.g., initialization, binding) are expected but not detailed here.
4. Dependencies
Dependencies of this module:
- Core types:
System,System.Collections.Generic,System.Collections.ObjectModel - Base layer:
DTS.Common.Base(forIBaseView,IBaseViewModel) - DSP & hardware classes:
DTS.Common.Classes.DSP(IStreamingFilterProfile),DTS.Common.Classes.Hardware(IISOHardware) - Enums:
DTS.Common.Enums(e.g.,IsoViewMode) - Pagination:
DTS.Common.Interface.Pagination(forIFilterableListView) - Test setups:
DTS.Common.Interface.TestSetups.TestSetupsList(ITestSetup) - Clock sync:
DTS.Common.ClockSyncProfile(used inSetTestClockProfiles)
Dependencies on this module:
- UI layer: Concrete implementations of
IHardwareListView,IHardwareListOverdueView,IHardwareListReplaceView,IHardwareListSelectView,ISLICE6TreeView(e.g., WPF/WinForms views). - View model consumers: Controllers or presenters that use
IHardwareListViewModelto drive hardware management workflows. - Hardware data sources: Code that populates
IHardware[]andISLICE6TreeNode[]arrays (e.g., data access or service layers).
5. Gotchas
IHardwareListSelectView.InitializeColumns(bool bSteamingTest): The parameter namebSteamingTestappears to be a typo forbStreamingTest. This could cause confusion during implementation or maintenance.IHardware.DetermineChannelCount: The method does not automatically updateChannelCount; callers must ensure it is invoked after hardware changes to keep the display accurate.SLICE6association workflow:Associate/UnAssociateoperations are not committed to persistent storage untilSaveSLICE6Associationsis called. This two-step process (select → save) is critical to avoid data loss.HardwareToReplacevs.ReplacementHardware: TheReplace()method usesHardwareToReplace(the unit being replaced) andReplacementHardware(the new unit). Confusing these could lead to incorrect replacements.ShowCompactflag: Controls whether rack modules (e.g., SLICEPro units connected to ECMs) are shown inChannelCountand possibly the UI. Its effect is limited toDetermineChannelCountper the XML comment.GetHardwareparameters: ThebIncludeModules,bIncludeOverdue,bIncludeBridges,testId, andgroupIdparameters suggest flexible filtering, but their exact semantics (e.g., howgroupIdrelates to test setups) are not documented in the interface.SetTestSampleRatesvs.UpdateTestSampleRate:SetTestSampleRatestakes aDictionary<string, double>(likely bulk initialization), whileUpdateTestSampleRateupdates a single unit. Mixing them carelessly could cause state inconsistencies.CheckForMixedDASandSetParentMixedRates: These methods suggest support for mixed sample rates within a DAS chain, but the logic for detecting/propagating mixed rates is not visible here. Callers must ensure correct ordering (e.g.,SetParentMixedRatesafterCheckForMixedDAS).PTPDomainIDtype: Defined asbyte, but no range validation is visible in the interface. Implementers must ensure values are within valid PTP domain ranges (typically 0–127).
None identified from source alone.