Files
DP44/enriched-partialglm/Common/DTS.CommonCore/Interface/Channels.md
2026-04-17 14:55:32 -04:00

14 KiB

source_files, generated_at, model, schema_version, sha256
source_files generated_at model schema_version sha256
Common/DTS.CommonCore/Interface/Channels/IChannelSettingRecord.cs
Common/DTS.CommonCore/Interface/Channels/IGroupChannelSettingRecord.cs
Common/DTS.CommonCore/Interface/Channels/IChannelCode.cs
Common/DTS.CommonCore/Interface/Channels/IChannelSetting.cs
Common/DTS.CommonCore/Interface/Channels/IChannelDbRecord.cs
Common/DTS.CommonCore/Interface/Channels/IGroupChannel.cs
2026-04-16T12:23:05.212303+00:00 zai-org/GLM-5-FP8 1 cbc4fb29d29bc466

Channel Interfaces Documentation

1. Purpose

This module defines the core abstraction layer for channel management in the DTS (Data Test System) application. It provides interfaces for channel configuration, settings persistence, and group channel operations. These interfaces serve as the contract between the database layer, business logic, and UI components for managing physical measurement channels, sensor assignments, hardware configurations, and various channel types (analog, digital, squib, UART, stream, etc.) within test setups.


2. Public Interface

IChannelSettingRecord

Simple data contract for a channel setting type definition.

Member Type Description
Id int Unique identifier for the setting record.
SettingName string Name of the setting.
DefaultValue string Default value for the setting.

IGroupChannelSettingRecord

Associates a setting value with a specific channel.

Member Type Description
ChannelId long ID of the channel this setting applies to.
SettingId int ID of the setting type.
SettingValue string The value assigned to this setting.

IChannelCode

Represents a channel code with its metadata.

Member Type Description
Id int Unique identifier (read-only).
Code string The code string (read-only).
Name string Display name (read-only).
CodeType ChannelEnumsAndConstants.ChannelCodeType Type classification of the code (read-only).

IChannelSetting

Represents a configurable setting on a channel with typed value access.

Member Type Description
ChannelId long ID of the associated channel.
SettingTypeId int Type identifier for this setting (read-only).
SettingName string Name of the setting (read-only).
DefaultValue string Default value (read-only).
Value string Current string value.
IntValue int Integer representation of the value.
DoubleValue double Double representation of the value.
BoolValue bool Boolean representation of the value.
Clone() IChannelSetting Creates a copy of this setting.

IChannelDbRecord

Interface describing a Channel record as stored in the database. Includes Entity Framework data annotations.

Member Type Description
Id long Primary key, mapped to column "Id".
GroupId int ID of the group this channel belongs to.
IsoCode string ISO standard code for the channel.
IsoChannelName string ISO standard channel name.
UserCode string User-defined code.
UserChannelName string User-defined channel name.
DASId int Data Acquisition System ID.
DASChannelIndex int Physical channel index on the DAS.
GroupChannelOrder int Ordering within the group.
TestSetupOrder int Ordering within the test setup.
SensorId int ID of the assigned sensor.
Disabled bool Whether the channel is disabled.
LastModified DateTime Timestamp of last modification.
LastModifiedBy string User who last modified the record.

IGroupChannel

Primary interface for channel operations, extending IChannelDbRecord and IComparable<IGroupChannel>. Contains extensive properties and methods for channel configuration.

Key Properties

Member Type Description
RangeLowG SensorConstants.AvailableRangesLowG Low-G range setting.
VoltageInsertionSensor bool Indicates if channel has a calibration-less voltage measurement channel (read-only).
RangeModifiableSensorLowG bool Whether channel has an embedded range modifiable low-g sensor (read-only).
RangeModifiableSensorARS bool Whether channel has an embedded range modifiable ARS sensor (read-only).
AvailableInitialOffsets InitialOffset[] Available initial offsets (requires sensor with calibration).
IEPESupport string IEPE support status (read-only).
Group IGroup The group this channel belongs to.
GroupName string Display name of the group.
GroupNameValid bool Whether the group name is valid.
IsoCodeValid bool Whether ISO code is set.
IsoChannelNameValid bool Whether ISO channel name is set.
UserCodeValid bool Whether user code is set.
UserChannelNameValid bool Whether user channel name is set.
HardwareValid bool Whether hardware has been assigned (read-only).
HardwareId string Legacy hardware identifier in format [das serial]:[channel index].
TestSampleRate double Sample rate of the associated DAS.
SensorValid bool Whether a sensor has been assigned (read-only).
IsDisabled bool Whether channel should be used for data collection.
CanMoveUp / CanMoveDown bool UI state for ordering controls.
DeleteShouldBeEnabled bool UI state for delete button.
RemoveSensorVisibility System.Windows.Visibility UI visibility state.
PasteCommand ICommand Command for paste operations.
ChannelSettings IChannelSetting[] Array of channel settings (range, polarity, etc.).
Hardware string UI display string for hardware.
Sensor string UI display string for sensor (read-only).
SensorData ISensorData Sensor data object (read-only).
HardwareChannel IHardwareChannel Assigned hardware channel (read-only).
DragAndDropItem IDragAndDropItem Drag-and-drop item (read-only).
SensorCalibration ISensorCalibration Sensor calibration data (read-only).
HasEID bool Whether channel has EID (read-only).
Range double Range setting value.
Capacity double Capacity of the sensor (read-only).
FilterClass IFilterClass Filter class setting (FB 13120).
Polarity string Polarity setting.
Units string Units (read-only).
ZeroMethod ZeroMethodType Zero method type.
ZeroMethodStart / ZeroMethodEnd double Zero method time range.
Sensitivity string Sensitivity (read-only).
InitialOffset InitialOffset Initial offset setting.

Squib/Digital Output Properties

Member Type Description
SquibLimitDuration bool Whether squib duration is limited.
SquibDuration double Squib duration value.
SquibDelay double? Squib delay (nullable for UI purposes - FB 14623).
SquibCurrent double Squib current value.
SquibFireMode SquibFireMode Fire mode setting.
DigitalOutLimitDuration bool Whether digital out duration is limited.
DigitalOutDuration double Digital out duration.
DigitalOutDurationMax double Maximum allowed digital out duration (FB 28107).
DigitalOutDelay double Digital out delay.
DigitalOutputMode DigitalOutputModes Output mode setting.
DigitalInputMode DigitalInputModes Input mode setting.
ActiveValue string Active value setting.
DefaultValue string Default value setting.

UART Properties

Member Type Description
UartBaudRate uint Baud rate.
UartDataBits uint Data bits.
UartStopBits StopBits Stop bits configuration.
UartParity Parity Parity configuration.
UartFlowControl Handshake Flow control (read-only, always NONE per FB 30486).
UartDataFormat UartDataFormat Data format.

Stream Properties

Member Type Description
StreamInUDPAddress string UDP address for stream input.
StreamOutUDPProfile UDPStreamProfile UDP profile for stream output.
StreamOutUDPAddress string UDP address for stream output.
StreamOutUDPTimeChannelId ushort Time channel ID for UDP streaming.
StreamOutUDPDataChannelId ushort Data channel ID for UDP streaming.
StreamOutUDPTmNSConfig string TMNS configuration.
StreamOutIRIGTimeDataPacketIntervalMs ushort IRIG data packet interval in ms.
StreamOutTMATSIntervalMs ushort TMATS interval while streaming (FB 29987).

Channel Type Detection Properties (all read-only)

Member Returns true when
IsAnalog Channel has analog sensor assigned (or non-blank without sensor).
IsSquib Channel has squib sensor assigned (or non-blank without sensor).
IsDigitalIn Channel has digital input sensor assigned (or non-blank without sensor).
IsDigitalOut Channel has digital output sensor assigned (or non-blank without sensor).
IsClock Channel is from an RTC module.
IsUart Channel is from a UART module.
IsStreamIn Channel is from a stream-in module.
IsStreamOut Channel is from a stream-out module.

Difference Tracking Properties

Member Type Purpose
IsRangeDifferent bool Tracks range differences.
IsFilterClassDifferent bool Tracks filter class differences.
IsPolarityDifferent bool Tracks polarity differences.
IsZeroMethodDifferent bool Tracks zero method differences.
IsZeroMethodStartDifferent bool Tracks zero method start differences.
IsZeroMethodEndDifferent bool Tracks zero method end differences.
IsInitialOffsetDifferent bool Tracks initial offset differences.
IsSquibFireModeDifferent bool Tracks squib fire mode differences.
IsSquibDelayDifferent bool Tracks squib delay differences.
IsSquibLimitDurationDifferent bool Tracks squib limit duration differences.
IsSquibDurationDifferent bool Tracks squib duration differences.
IsSquibCurrentDifferent bool Tracks squib current differences.
IsDigitalOutputModeDifferent bool Tracks digital output mode differences.
IsDigitalOutDelayDifferent bool Tracks digital out delay differences.
IsDigitalOutLimitDurationDifferent bool Tracks digital out limit duration differences.
IsDigitalOutDurationDifferent bool Tracks digital out duration differences.
IsDigitalInputModeDifferent bool Tracks digital input mode differences.
IsDefaultValueDifferent bool Tracks default value differences.
IsActiveValueDifferent bool Tracks active value differences.
BorderShouldShowOutOfDate bool UI state for out-of-date indicator.

Methods

Signature Description
void SetHardwareChannel(IHardwareChannel hardwareChannel) Assigns a hardware channel to this channel.
void SetSensor(IDragAndDropItem sensor, IChannelSetting[] channelDefaults, bool applySensorDataToBlankChannels) Assigns a sensor with optional defaults application.
bool CompareValue(string property) Compares a property value.
bool SetDifferent(string property) Marks a property as different.
void SetNotDifferent() Clears all difference flags.
void SetRange(CACOption option) Sets the range based on an option.
bool IsBlank() Returns true if channel is a new, non-edited channel.
void Clear() Clears hardware and sensor assignments.
bool Filter(string term) Returns true if channel contains the search term.
string GetChannelName(IsoViewMode isoViewMode) Returns channel name based on view mode.
string GetChannelCode(IsoViewMode isoViewMode) Returns channel code based on view mode.
void Copy(IGroupChannel groupChannel) Creates a memory copy from another channel.
void SetSensorCalibration(ISensorCalibration calibration) Sets the sensor calibration.
void SetSensorData(ISensorData sensorData, IDragAndDropItem dragAndDropItem, bool decideSettings = false) Sets sensor data with optional settings decision.
IFilterClass GetFilterClassFromISOCode(ISoftwareFilter[] filters, string isoCode) Gets filter class from ISO code (FB 15574, FB 13120).
void SetSettingsFromSensor(ISensorData sd) Sets channel settings from sensor settings.
string GetChangeList(ISensorData sensor) Returns list of parameter differences vs sensor.

Other Members

Member Type Description
CoerceISOCodeFunc CoerceISOCodeDelegate Function for ISO code coercion.
ChannelStatus UIItemStatus Status considering completeness and sensor calibration.

3. Invariants

  1. Comparability: IGroupChannel implements IComparable<IGroupChannel>, implying ordering semantics must be defined (likely by GroupChannelOrder or TestSetupOrder).

  2. IEPE Support Logic: IEPESupport follows a priority chain:

    • If sensor assigned → depends on sensor bridge
    • If no sensor but hardware assigned → depends on hardware channel support
    • If neither assigned → IEPE is available
  3. Channel Type Detection Fallback: Properties IsAnalog, IsSquib, IsDigitalIn, IsDigitalOut return true for non-blank channels even without a sensor assigned. They return false only for blank channels.

  4. Initial Offsets Dependency: AvailableInitialOffsets requires a sensor with calibration to be assigned.

  5. Database Mapping: IChannelDbRecord properties are explicitly mapped to database columns via [Column("...")] attributes.

  6. Primary Key: IChannelDbRecord.Id is marked with [Key] attribute.


4. Dependencies

This module depends on:

  • DTS.Common.Enums.Channels - Channel-related enumerations
  • `DTS.Common.Enums