Files
DP44/enriched-partialglm/Common/DTS.Common.DAS.Concepts/Interfaces/DAS/Channel.md

174 lines
7.8 KiB
Markdown
Raw Normal View History

2026-04-17 14:55:32 -04:00
---
source_files:
- Common/DTS.Common.DAS.Concepts/Interfaces/DAS/Channel/ITimestampAware.cs
- Common/DTS.Common.DAS.Concepts/Interfaces/DAS/Channel/ILinearized.cs
- Common/DTS.Common.DAS.Concepts/Interfaces/DAS/Channel/IIsoCodeAware.cs
- Common/DTS.Common.DAS.Concepts/Interfaces/DAS/Channel/ISerialNumberAware.cs
- Common/DTS.Common.DAS.Concepts/Interfaces/DAS/Channel/IInversionAware.cs
- Common/DTS.Common.DAS.Concepts/Interfaces/DAS/Channel/IEngineeringUnitAware.cs
- Common/DTS.Common.DAS.Concepts/Interfaces/DAS/Channel/ICalSignalAware.cs
- Common/DTS.Common.DAS.Concepts/Interfaces/DAS/Channel/IVoltageInsertAware.cs
- Common/DTS.Common.DAS.Concepts/Interfaces/DAS/Channel/IShuntAware.cs
- Common/DTS.Common.DAS.Concepts/Interfaces/DAS/Channel/ILevelTriggerable.cs
- Common/DTS.Common.DAS.Concepts/Interfaces/DAS/Channel/IDecimatable.cs
generated_at: "2026-04-16T11:40:36.287986+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "b4d2ceb184c9ded4"
---
# Documentation: DAS Channel Concept Interfaces
## 1. Purpose
This module defines a set of granular interfaces representing behavioral "concepts" for Data Acquisition System (DAS) channels within the `DTS.Common.DAS.Concepts.DAS.Channel` namespace. These interfaces follow a mixin-style composition pattern, allowing channel implementations to adopt specific capabilities—such as timestamp handling, linearization, calibration awareness, and decimation—by implementing the relevant interfaces. This design enables flexible channel configuration without requiring deep inheritance hierarchies.
---
## 2. Public Interface
### `ITimestampAware`
Defines timestamp configuration capability for a channel.
| Member | Type | Description |
|--------|------|-------------|
| `TimestampPartType` | `TimestampPartTypes` (get/set) | Gets or sets the timestamp part type configuration. |
---
### `ILinearized`
Defines linearization capability for sensor data.
| Member | Type | Description |
|--------|------|-------------|
| `LinearizationFormula` | `DTS.Common.Classes.Sensors.LinearizationFormula` (get/set) | Gets or sets the linearization formula to be applied. |
---
### `IIsoCodeAware`
Defines ISO code awareness for an object.
| Member | Type | Description |
|--------|------|-------------|
| `IsoCode` | `string` (get/set) | Gets or sets the ISO code identifier. |
---
### `ISerialNumberAware`
Defines serial number awareness for an object.
| Member | Type | Description |
|--------|------|-------------|
| `SerialNumber` | `string` (get/set) | Gets or sets the serial number identifier. |
---
### `IInversionAware`
Defines inversion state awareness for a channel.
| Member | Type | Description |
|--------|------|-------------|
| `IsInverted` | `bool` (get/set) | Gets or sets the inversion state. |
---
### `IEngineeringUnitAware`
Defines engineering unit awareness for a channel.
| Member | Type | Description |
|--------|------|-------------|
| `EngineeringUnits` | `string` (get/set) | Gets or sets the engineering unit description. |
---
### `ICalSignalAware`
Defines calibration signal awareness for shunt calibration operations.
| Member | Type | Description |
|--------|------|-------------|
| `MeasuredCalSignalMv` | `double` (get/set) | Gets or sets the measured shunt deflection value in millivolts. |
| `TargetCalSignalMv` | `double` (get/set) | Gets or sets the target shunt deflection value in millivolts. |
---
### `IVoltageInsertionAware`
Defines voltage insertion/gain awareness for calibration operations.
| Member | Type | Description |
|--------|------|-------------|
| `ExpectedGain` | `double` (get/set) | Gets or sets the expected gain value. |
| `MeasuredGain` | `double` (get/set) | Gets or sets the measured gain value. |
---
### `IShuntAware`
Defines shunt-check awareness for calibration verification.
| Member | Type | Description |
|--------|------|-------------|
| `MeasuredShuntDeflectionMv` | `double` (get/set) | Gets or sets the measured shunt deflection value in millivolts. |
| `TargetShuntDeflectionMv` | `double` (get/set) | Gets or sets the target shunt deflection value in millivolts. |
---
### `ILevelTriggerable`
Defines level trigger capability for a channel.
| Member | Type | Description |
|--------|------|-------------|
| `SampleAverageADC` | `double?` (get/set) | Cached ADC value for use when calculating already level-triggered state (created for Flash Clear feature). |
| `TriggerBelowThresholdEu` | `double?` (get/set) | Gets or sets the "trigger below" threshold in engineering units. Set to `null` to deactivate. |
| `TriggerAboveThresholdEu` | `double?` (get/set) | Gets or sets the "trigger above" threshold in engineering units. Set to `null` to deactivate. |
| `LevelTriggerType` | `LevelTriggerTypes` (get/set) | Gets or sets the level trigger type configuration. |
---
### `IDecimatable<T>`
Defines decimation capability for channel data. Generic interface with covariant type parameter `T`.
| Member | Type | Description |
|--------|------|-------------|
| `PointsPerPoint` | `uint` (get/set) | Gets or sets the number of points to be compressed into a single index point. |
| `DecimationType` | `DecimationMethod` (get/set) | Gets or sets the decimation method to be applied. |
| `ToDecimatedArray()` | `T[]` | Generates a decimated array using the configured `DecimationMethod`. |
| `this[long i]` | `T` (get-only indexer) | Gets the value at the specified post-decimation index. |
---
## 3. Invariants
- **Nullable Thresholds**: For `ILevelTriggerable`, setting `TriggerBelowThresholdEu` or `TriggerAboveThresholdEu` to `null` explicitly deactivates that trigger threshold. Implementations must treat `null` as "inactive" rather than "uninitialized."
- **Indexer Behavior**: For `IDecimatable<T>`, the indexer `this[long i]` must return values from the **decimated** dataset, not the raw data. The index `i` refers to the post-decimation index.
- **Covariance**: `IDecimatable<out T>` uses covariant generic parameter, meaning `IDecimatable<DerivedType>` can be assigned to `IDecimatable<BaseType>` if `DerivedType` inherits from `BaseType`.
- **Decimation Configuration**: `PointsPerPoint` is a `uint`, implying it must be at least 1. Behavior when set to 0 is undefined from the source alone.
---
## 4. Dependencies
### External Types Referenced (not defined in provided source):
- `DTS.Common.Classes.Sensors.LinearizationFormula` — Used by `ILinearized`
- `TimestampPartTypes` — Used by `ITimestampAware`
- `DecimationMethod` — Used by `IDecimatable<T>`
- `LevelTriggerTypes` — Used by `ILevelTriggerable`
### Namespace:
All interfaces reside in `DTS.Common.DAS.Concepts.DAS.Channel`.
### Consumers:
Unknown from source alone. These are interface definitions intended to be implemented by concrete channel classes elsewhere in the codebase.
---
## 5. Gotchas
1. **Historical Comment in `ILevelTriggerable`**: The `SampleAverageADC` property includes a comment referencing "14042 Flash Clear turns off excitation for s6." This suggests the property was added for a specific workaround or feature related to hardware excitation control, and may have specialized usage not obvious from the interface alone.
2. **Indexer Semantics in `IDecimatable<T>`**: The indexer returns post-decimation values. Developers might incorrectly assume it indexes raw data. The remarks explicitly call this out, but it remains a potential source of confusion.
3. **Naming Inconsistency in `IVoltageInsertionAware`**: The filename is `IVoltageInsertAware.cs` (note: "Insert" without "ion"), but the XML summary refers to "shunt-check awareness" (copied from `IShuntAware`), while the interface name and properties relate to gain values. The summary documentation appears to be copy-paste residue and does not accurately describe the interface's purpose.
4. **Missing XML Comments**: `ITimestampAware` and `ILinearized` lack XML documentation comments present on other interfaces in this set.