7.3 KiB
source_files, generated_at, model, schema_version, sha256
| source_files | generated_at | model | schema_version | sha256 | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
2026-04-16T02:05:30.336536+00:00 | Qwen/Qwen3-Coder-Next-FP8 | 1 | b4d2ceb184c9ded4 |
Documentation: DAS Channel Concept Interfaces
1. Purpose
This module defines a set of lightweight, composable interfaces that express concepts—behavioral or metadata capabilities—applicable to Data Acquisition System (DAS) channels. Each interface encapsulates a single concern (e.g., timestamping, linearization, shunt calibration awareness) to enable flexible, duck-typed composition of channel implementations without requiring deep inheritance hierarchies. These interfaces are used throughout the DAS framework to conditionally apply logic (e.g., calibration validation, decimation, inversion) based on what capabilities an object advertises at runtime.
2. Public Interface
All interfaces are read-write property containers; none define methods beyond indexers where noted.
| Interface | Property / Indexer | Type | Description |
|---|---|---|---|
ITimestampAware |
TimestampPartType |
TimestampPartTypes |
Indicates which part(s) of a timestamp (e.g., sample time, acquisition time) are relevant for this channel. |
ILinearized |
LinearizationFormula |
DTS.Common.Classes.Sensors.LinearizationFormula |
Specifies the formula (e.g., polynomial, table-based) used to convert raw ADC values to engineering units. |
IIsoCodeAware |
IsoCode |
string |
Stores the ISO standard code (e.g., "ISO 6876") associated with the channel or sensor. |
ISerialNumberAware |
SerialNumber |
string |
Stores the hardware serial number of the sensor or channel. |
IInversionAware |
IsInverted |
bool |
Indicates whether the channel’s output should be inverted (e.g., for negative-slope sensors). |
IEngineeringUnitAware |
EngineeringUnits |
string |
Human-readable description of the engineering unit (e.g., "psi", "°C"). |
ICalSignalAware |
MeasuredCalSignalMv |
double |
Measured shunt-deflection voltage (in mV) during calibration verification. |
TargetCalSignalMv |
double |
Expected (target) shunt-deflection voltage (in mV) for calibration verification. | |
IVoltageInsertionAware |
ExpectedGain |
double |
Expected gain (ratio of output change to input change) during voltage insertion/shunt check. |
MeasuredGain |
double |
Measured gain (ratio of output change to input change) during voltage insertion/shunt check. | |
IShuntAware |
MeasuredShuntDeflectionMv |
double |
Measured shunt-deflection voltage (in mV) during shunt calibration. |
TargetShuntDeflectionMv |
double |
Target (nominal) shunt-deflection voltage (in mV) for shunt calibration. | |
ILevelTriggerable |
SampleAverageADC |
double? |
Cached ADC sample average used for level-triggering; null if not cached. |
TriggerBelowThresholdEu |
double? |
Lower bound threshold (in engineering units); null disables below-threshold triggering. |
|
TriggerAboveThresholdEu |
double? |
Upper bound threshold (in engineering units); null disables above-threshold triggering. |
|
LevelTriggerType |
LevelTriggerTypes |
Specifies the trigger mode (e.g., rising, falling, window). | |
IDecimatable<T> |
PointsPerPoint |
uint |
Number of raw data points compressed into one decimated point. |
DecimationType |
DecimationMethod |
Algorithm used for decimation (e.g., mean, min/max, median). | |
ToDecimatedArray() |
T[] |
Returns a new array of decimated data using current settings. | |
this[long i] |
T |
Indexer returning the i-th decimated value (post-decimation indexing). |
Note
:
IDecimatable<T>is generic. The type parameterTrepresents the data type handled by the channel (e.g.,double,float, or custom sample structs).
3. Invariants
- Property semantics: All properties are read-write (get/set) unless explicitly marked nullable (
?)—in which casenullis a valid state indicating absence or deactivation (e.g.,TriggerBelowThresholdEu = nulldisables that trigger). - Threshold semantics: For
ILevelTriggerable, thresholds in engineering units (TriggerBelowThresholdEu,TriggerAboveThresholdEu) must benullto disable their respective triggers; non-null values are assumed valid and active. - Decimation indexing: Implementations of
IDecimatable<T>must ensure thatthis[i]returns the i-th element of the decimated sequence, not the raw data. The indexer is read-only and must reflect the currentPointsPerPointandDecimationType. - No implicit defaults: Interfaces do not define default values; consumers must handle
null,0, orfalseexplicitly where appropriate.
4. Dependencies
- Internal dependencies:
DTS.Common.DAS.Conceptsnamespace (inferred fromusingand namespace).System(onlyILevelTriggerableimportsSystem).- Types
TimestampPartTypes,LevelTriggerTypes,DecimationMethod, andLinearizationFormulaare referenced but not defined here—likely defined inDTS.Common.Classes.Sensorsor adjacent namespaces.
- Consumers: These interfaces are intended to be implemented by channel types (e.g.,
Channel,SensorChannel) elsewhere in the DAS framework. They are used for runtime type checking (e.g.,if (channel is IShuntAware) { ... }) and dependency injection or visitor-style logic.
5. Gotchas
- Naming inconsistency:
IVoltageInsertAware(file name) vs.IVoltageInsertionAware(interface name in source)—likely a typo in the file name (IVoltageInsertionAware.csis correct per interface declaration). - Ambiguous
ILevelTriggerablecomment: The comment about "14042 Flash Clear turns of excitation for s6" is highly specific and may be legacy documentation; its relevance to current implementations is unclear without context. - Missing
usingdirectives: None of the interfaces import external namespaces beyondSysteminILevelTriggerable, so all referenced types (TimestampPartTypes,DecimationMethod, etc.) must be in the same namespace or globally accessible—no explicitusingis declared. - No validation semantics: Interfaces impose no validation (e.g.,
MeasuredShuntDeflectionMvcould be negative or NaN). Consumers must enforce domain constraints. IDecimatable<T>indexing: The indexerthis[long i]is read-only and must return decimated values. Implementers must not conflate raw vs. decimated indexing—this is a common source of off-by-one or scale errors.
None identified beyond those noted above.