11 KiB
source_files, generated_at, model, schema_version, sha256
| source_files | generated_at | model | schema_version | sha256 | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
2026-04-16T04:15:08.688374+00:00 | Qwen/Qwen3-Coder-Next-FP8 | 1 | a9dba4b05459423e |
ResolveChannels
Documentation: ResolveChannels Module – Channel Resolution UI Tables
1. Purpose
This module provides a set of WPF-based data grid tables used in the Resolve Channels step of the DataPRO test setup workflow. Its purpose is to visualize and enable manual resolution of channel mismatches between logical channels (as defined in the test setup) and physical channels (as present on hardware modules). Specifically, it displays unresolved channels, channels with mismatched EIDs (Sensor ID out of position), channels with extra/unexpected EIDs, and resolved channel assignments. The module supports drag-and-drop interactions to assign or unassign logical-to-physical channel mappings.
2. Public Interface
SensorOutOfPosition (DataPROWin7.CollectDataSubControls.ResolveChannels)
-
SensorOutOfPosition(string currentChannel, string originalChannel, string sensorId, string sensor)
Constructor. Initializes immutable properties representing a sensor whose EID was found on a different physical channel than originally assigned. -
CurrentChannel(string, read-only)
The physical channel currently reporting the sensor’s EID. -
OriginalChannel(string, read-only)
The physical channel expected to report the sensor’s EID. -
SensorId(string, read-only)
The EID (sensor ID) of the sensor. -
Sensor(string, read-only)
Human-readable sensor description (e.g., serial number or type).
ExtraEIDsTable (DataPROWin7.SubControls)
-
UnSet()
Clears the table by settingItemsSourcetonull. -
UpdateTable(TableHelper[] items)
Populates the table withTableHelperinstances representing channels with EIDs not present in the test setup. -
TableHelper(nested class)TableHelper(string channelName, string eid, string sensorName)
Constructor. Stores channel, EID, and sensor name for display.ChannelName(string, read-only)EID(string, read-only)SensorName(string, read-only)
-
ColumnIdsenum
Defines column order:ChannelName,EID,SensorName.
SensorsOutOfPositionTable (DataPROWin7.CollectDataSubControls.ResolveChannels)
-
UnSet()
Clears the table by settingItemsSourcetonull. -
UpdateTable(SensorOutOfPosition[] items)
Populates the table withSensorOutOfPositioninstances. -
ColumnIdsenum
Defines column order:CurrentChannel,OriginalChannel,SensorId,Sensor. -
Constructor
SensorsOutOfPositionTable(ContentControl parentControl, DataPROPage page, ResolveChannels resolveChannels)
Initializes grid columns, setsSelectionMode = None, and configures binding toSensorOutOfPositionproperties.
ResolvedChannelsTable (DataPROWin7.SubControls)
-
UnSet()
Clears the underlyingDataTablerows and reassignsDataTable. -
Update(ResolveChannels.ManuallyResolvedChannel[] channels)
Populates the table with manually resolved channel mappings. Each row includes:- DAS serial/module info
- Logical channel name
- Sensor info
- Resolved logical channel object
-
ColumnIdsenum (private)
DAS,ChannelName,Sensor,ResolvedChannel. -
Constructor
ResolvedChannelsTable(ContentControl parentControl, DataPROPage page)
Initializes aSystem.Data.DataTablewith typed columns and WPF DataGrid columns bound to the table.
ChannelsToResolveTable (DataPROWin7.SubControls)
-
UnSet()
Clears the underlyingDataTablerows. -
Update(ResolveChannels.UnresolvedChannel[] channels)
Populates the table with unresolved channels. For each channel:- Channel name (ISO view mode)
- Sensor serial number (via
SensorsCollection.GetSensorById) - Sensor type (Squib/Digital Input/Digital Output/IEPE/Analog)
- Status message (e.g.,
Issuefield) UnresolvedChannelobject (for drag/drop)
-
ColumnIdsenum (private)
ChannelName,SensorName,Type,StatusMessage,UnresolvedChannel. -
DRAG_FORMAT(const string)
"UnresolvedChannel []"— custom format used when dragging unresolved channels. -
Drag-and-drop overrides
StartDragging()
Serializes selectedUnresolvedChannelobjects usingDRAG_FORMAT.DoDrop(IDataObject, DataGridCell, string)
On drop (from hardware table), calls_resolveChannels.ManuallyResolveChannels(dasChannels, logicalChannels).
-
Constructor
ChannelsToResolveTable(ContentControl parentControl, DataPROPage page, ResolveChannels resolveChannels)
SetsSelectionMode = MultiRow, configures columns, and registers drag/drop formats.
HardwareChannelsTable (DataPROWin7.SubControls)
-
Update(TestTemplate test, Dictionary<string, UnresolvedChannel> resolvedChannels, List<ManuallyResolvedChannel> manuallyResolvedChannels, Dictionary<string, HardwareChannel> channelLookup)
Populates the table with hardware channels. Filters out unsupported/irrelevant channels (e.g., squib pairs, RTC, high-G below cutoff). Populates rows with:- DAS/module serial
- Physical channel name
- IEPE support status
- Logical channel name (if resolved)
- Sensor info (
---if none) - Flags:
ManuallyAssigned,SensorIDMissing,SensorIdOutOfPlace - Remove command (button) with associated
HardwareChannelparameter
-
Update(DASHardware[] hardware, ...)
Overload accepting raw hardware array. -
UnSet()
Clears the underlyingDataTable. -
ViewMode(property,ChannelViewsenum)
Controls filtering:ALL,Assigned,Open,Manual. -
ScrollIntoFocus(HardwareChannel channel)
Scrolls the grid to show the row for the given hardware channel. -
btnRemoveCellTemplate_Click(object parameter)
Event handler for remove button: calls_resolveChannels.ManuallyUnresolveChannel(channel). -
ColumnIdsenum
Includes:DAS,Module,PhysicalChannelName,IEPESupport,LogicalChannelName,Sensor,DASChannel,RemoveCommand,CMDParam,CMD_ENABLED,ManuallyAssigned,UsingSensorId,SensorIDMissing,SensorIdOutOfPlace. -
Drag-and-drop overrides
StartDragging()
Serializes selectedHardwareChannelobjects (excludes locked/assigned channels, high-G below cutoff). UsesDTS.Common.Classes.Hardware.DragAndDropPayload.FORMAT.DoDrop(IDataObject, DataGridCell, string)
On drop (fromChannelsToResolveTable), calls_resolveChannels.ManuallyResolveChannels(dasChannels, logicalChannels).
-
Constructor
HardwareChannelsTable(ContentControl parentControl, DataPROPage page, object owningControl)
InitializesDataTable, WPF columns, remove button column, drag/drop formats, and registers cell background coloring logic (HardwareChannelsTable_LoadedCellPresenter).
3. Invariants
SensorOutOfPositioninstances are immutable — all properties are read-only and set only in the constructor.ExtraEIDsTableandSensorsOutOfPositionTableuseItemsSource— they are bound to arrays of view models (TableHelper[],SensorOutOfPosition[]) and cleared viaUnSet().ResolvedChannelsTable,ChannelsToResolveTable, andHardwareChannelsTableuseSystem.Data.DataTable— they populate a typedDataTableand assign it toDataTable.HardwareChannelsTablefilters channels duringUpdate()— skips squib pairs (by incrementingi), RTC channels, and high-G channels below 500 SPS.HardwareChannelsTabledisables remove button for locked EIDs — if a sensor’s EID is assigned to a different physical channel,CMD_ENABLEDisfalse.ChannelsToResolveTableallows multi-row selection —SelectionMode = MultiRow.SensorsOutOfPositionTableandExtraEIDsTabledisable selection —SelectionMode = None.HardwareChannelsTablesupports drag/drop in both directions — from hardware to unresolved, and vice versa.
4. Dependencies
Imports/References
DTS.Common.*(Base, Enums, SharedResource.Strings, Classes, Utils)DTS.SensorDB.SensorsCollectionC1.WPF.DataGrid(WPF DataGrid control)System.Data(DataTable,DataColumn,DataRow)System.Windows(WPF drag/drop, data binding,IDataObject)DataPROWin7.DataModel(HardwareChannel,DASHardware)DataPROWin7.SubControls(ResolveChannels,EditObjectSensorsControl)DataPROWin7.CollectDataSubControls.ResolveChannels(internal namespace)
Usage
- Consumed by:
ResolveChannelscontrol (inferred from constructor parameters and_resolveChannelsfield). - Depends on:
ResolveChannels.ManuallyResolveChannels()andManuallyUnresolveChannel()methods.ResolveChannels.GetHWIDForSensorId()(for EID locking).DTS.SensorDB.SensorsCollection.SensorsList.GetSensorById()(to get sensor serial/type).Common.SerializedSettings.ISOViewMode,WarnOnEIDPositionSwap.DFConstantsAndEnums.TSR_AIR_HIGH_G_CUTOFF_RATE_SPS.StringResources.*for localized headers/columns.
5. Gotchas
- Squib channels skip next row — in
HardwareChannelsTable.Update(), when a squib channel is encountered,i++skips the next channel (squibs use two physical channels per sensor). Modulecolumn is hidden but still defined —ColumnIds.Moduleexists but is not displayed;DAScolumn includes module info when needed.TableHelperis only used byExtraEIDsTable— not shared withSensorsOutOfPositionTable.ResolvedChannelsTableusesChannelRepresentation— to format DAS/module serial numbers.ChannelsToResolveTableusesDRAG_FORMAT = "UnresolvedChannel []"— a custom format distinct from hardware drag format.HardwareChannelsTablehas complex row coloring —HardwareChannelsTable_LoadedCellPresentersets background based on:SensorIdOutOfPlace(ifWarnOnEIDPositionSwap)SensorIDMissingUsingSensorId(EID locked elsewhere)- Sensor presence + manual assignment
HardwareChannelsTabledisables drag for high-G channels below cutoff — even if previously deleted (see comments referencing issue #30144).HardwareChannelsTableallows drag of TSRAIR free channels — even ifsensor != "---"butLogicalChannelName == NA.UnSet()does not resetDataTable/ItemsSourceto new instances — only clears rows/items. Reuse requires reassignment.- No validation in
SensorOutOfPositionconstructor — assumes caller provides consistentcurrentChannel/originalChannel/sensorId/sensor.