Files

100 lines
5.7 KiB
Markdown
Raw Permalink Normal View History

2026-04-17 14:55:32 -04:00
---
source_files:
- Common/DTS.CommonCore/Interface/Communication/ICommunicationReport.cs
- Common/DTS.CommonCore/Interface/Communication/IDASConnectedDevice.cs
- Common/DTS.CommonCore/Interface/Communication/ICommunication_DASInfo.cs
generated_at: "2026-04-16T12:19:03.859448+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "c40d100ec97fea56"
---
# Documentation: DTS.Common.Interface.Communication
## 1. Purpose
This module defines three interfaces for communication-related data structures within the DTS system. `ICommunicationReport` provides a standard contract for reporting communication operation results, including status, user state, and raw data. `IDASConnectedDevice` describes hardware devices connected to a Data Acquisition System (DAS), capturing physical and logical identification properties. `ICommunication_DASInfo` extends DAS communication capabilities to manage connected device discovery, serial/firmware tracking, first-use date tracking, and streaming support detection. These interfaces support auto-discovery and monitoring of DAS-connected hardware (e.g., S6 devices connected to S6DB).
---
## 2. Public Interface
### ICommunicationReport
**Properties:**
| Name | Type | Access | Description |
|------|------|--------|-------------|
| `UserState` | `object` | get/set | Arbitrary user state associated with the communication report. |
| `Result` | `CommunicationConstantsAndEnums.CommunicationResult` | get/set | The result status of the communication operation. |
| `Data` | `byte[]` | get/set | Raw byte data payload from the communication. |
---
### IDASConnectedDevice
**Properties (all read-only):**
| Name | Type | Description |
|------|------|-------------|
| `DeviceType` | `HardwareTypes` | The hardware type of the connected device. |
| `Port` | `int` | The port on the DAS where the device is connected (0-based index). |
| `SpotOnPort` | `int` | The position in the chain on the given port (0-based index). |
| `PhysicalAddress` | `PhysicalAddress` | The MAC address or physical address of the device. |
| `IPAddress` | `string` | The IP address of the device. |
| `SerialNumber` | `string` | The serial number of the device. |
| `Location` | `string` | The location descriptor of the device. |
| `Version` | `string` | The firmware/hardware version of the device. |
---
### ICommunication_DASInfo
**Properties:**
| Name | Type | Access | Description |
|------|------|--------|-------------|
| `ConnectedDevices` | `IDASConnectedDevice[]` | get only | Array of devices currently connected to the DAS. Currently only used by SLICE6DB. |
| `SerialNumbers` | `string[]` | get/set | Array of serial numbers. |
| `FirmwareVersions` | `string[]` | get/set | Array of firmware versions. |
| `FirstUseDate` | `DateTime?` | get/set | Date of first hardware use; `null` indicates hardware has not been used since calibration. Only valid when `IsFirstUseDateSupported` is `true`. |
| `IsFirstUseDateSupported` | `bool` | get/set | Indicates whether hardware supports first use date tracking. Requires firmware storage for user attributes and calibration by software supporting hardware first use. |
| `IsStreamingSupported` | `bool` | get/set | Indicates whether streaming is supported. TSR AIRs can enable/disable via `DISABLE_STREAMING_FEATURE` system attribute. |
**Methods:**
| Signature | Description |
|-----------|-------------|
| `void SetConnectedDevices(IDASConnectedDevice[] devices)` | Sets the `ConnectedDevices` array with devices connected to this DAS. |
| `string StackSerialNumber(int devid)` | Returns the stack serial number for the given device ID. |
---
## 3. Invariants
- **Port and SpotOnPort indexing**: Both `Port` and `SpotOnPort` on `IDASConnectedDevice` are 0-based indices.
- **FirstUseDate validity**: `FirstUseDate` is only meaningful when `IsFirstUseDateSupported` is `true`. A `null` value for `FirstUseDate` indicates the hardware has not been used since calibration.
- **ConnectedDevices mutability**: The `ConnectedDevices` property is read-only; modifications must go through `SetConnectedDevices(IDASConnectedDevice[])`.
- **Streaming support**: `IsStreamingSupported` reflects hardware capability; the actual feature can be controlled via the `DISABLE_STREAMING_FEATURE` system attribute on TSR AIRs.
---
## 4. Dependencies
### This module depends on:
- `DTS.Common.Enums.Communication` — provides `CommunicationConstantsAndEnums.CommunicationResult`
- `DTS.Common.Enums.Hardware` — provides `HardwareTypes` enum
- `System.Net.NetworkInformation` — provides `PhysicalAddress` class
- `System` — provides `DateTime` type
### What depends on this module:
- Not determinable from the provided source files alone. These are interface definitions likely consumed by DAS communication implementations and device discovery services.
---
## 5. Gotchas
- **FirstUseDate null semantics**: A `null` `FirstUseDate` has specific meaning (hardware not used since calibration), not just "unknown" or "uninitialized". Consumers should check `IsFirstUseDateSupported` before relying on `FirstUseDate`.
- **ConnectedDevices limited usage**: The XML comment indicates `ConnectedDevices` is "currently only used by SLICE6DB" — other DAS types may not populate this array.
- **Streaming feature control**: `IsStreamingSupported` indicates hardware capability, but the actual streaming feature can be disabled via the `DISABLE_STREAMING_FEATURE` system attribute on TSR AIRs. The relationship between this property and the system attribute is not fully specified in the source.
- **StackSerialNumber parameter meaning**: The `devid` parameter in `StackSerialNumber(int devid)` lacks documentation; its interpretation (whether 0-based index, hardware ID, or other identifier) is unclear from source alone.