Files
DP44/enriched-partialglm/Common/DTS.Common.DAS.Concepts.md
2026-04-17 14:55:32 -04:00

83 lines
4.8 KiB
Markdown

---
source_files:
- Common/DTS.Common.DAS.Concepts/AvailableArmModes.cs
- Common/DTS.Common.DAS.Concepts/ArmStatus.cs
- Common/DTS.Common.DAS.Concepts/ITriggerable.cs
- Common/DTS.Common.DAS.Concepts/IDataCollectionEnabled.cs
- Common/DTS.Common.DAS.Concepts/ILargeDataAware.cs
- Common/DTS.Common.DAS.Concepts/ICalibratable.cs
- Common/DTS.Common.DAS.Concepts/IGpioEnabled.cs
- Common/DTS.Common.DAS.Concepts/IRealtimeable.cs
- Common/DTS.Common.DAS.Concepts/DataScaler.InvalidExcitationVoltageException.cs
- Common/DTS.Common.DAS.Concepts/ShuntModeType.cs
- Common/DTS.Common.DAS.Concepts/TsrEvent.cs
- Common/DTS.Common.DAS.Concepts/IDownloadEnabled.cs
- Common/DTS.Common.DAS.Concepts/IArmable.cs
- Common/DTS.Common.DAS.Concepts/LinearizationFormula.cs
generated_at: "2026-04-16T11:28:27.362404+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "c415f64680b9e4be"
---
# Documentation: DTS.Common.DAS.Concepts
## 1. Purpose
This module defines the core contracts, data structures, and enumerations for the Data Acquisition System (DAS). It provides an abstraction layer for hardware interaction, defining standard interfaces for device capabilities such as arming, triggering, calibration, real-time data streaming, and data downloading. It also includes logic for sensor linearization and event metadata management, serving as a shared vocabulary between hardware implementations (e.g., TSR, SLICE, HEADS) and higher-level application logic.
## 2. Public Interface
### Namespaces: `DTS.Common.DAS.Concepts` & `DTS.DAS.Concepts`
*Note: This module splits types across two namespaces. `DTS.DAS.Concepts` appears to be the primary namespace for interfaces, while `DTS.Common.DAS.Concepts` contains data structures and enums.*
#### Enumerations
* **`AvailableArmModes`**: Defines arm modes.
* `LowPower`
* `CircularBuffer`
* *Defined in both namespaces.*
* **`ArmStatus`**: Defines the state machine for device arming.
* `Disarming`, `Disarmed`, `Arming`, `Armed`, `Recording`
* *Defined in both namespaces.*
* **`DTS.DAS.Concepts.GPIOPin.Directions`**: Defines GPIO pin directions.
* `Output` (0x00), `Peripheral` (0x01), `Input` (0x02), `InputPulledUp` (0x03), `InputPulledDown` (0x04)
* **`DTS.Common.DAS.Concepts.Test.Module.Channel.Sensor.ShuntModeType`**: Defines shunt calibration modes.
* `Internal`, `External`, `Emulation`, `None`
#### Interfaces
* **`IArmable`** (`DTS.DAS.Concepts`)
* `void Arm()`: Initiates the arming sequence.
* `void Disarm()`: Initiates the disarming sequence.
* `ArmStatus ArmStatus { get; }`: Current status of the arm state machine.
* `AvailableArmModes ArmMode { get; }`: Current arm mode.
* **`ITriggerable`** (`DTS.DAS.Concepts`)
* `void Trigger()`: Triggers the object (e.g., starts recording).
* **`IDownloadEnabled`** (`DTS.DAS.Concepts`)
* `TsrEvent[] EventList { get; }`: List of events available for download.
* `double[][] GetEventData(TsrEvent Event, UInt64 FirstSample, UInt64 LastSample)`: Retrieves sample data for a specific event range.
* `bool DataHasBeenDownloaded { get; }`: Indicates if data has been downloaded.
* **`IDataCollectionEnabled`** (`DTS.DAS.Concepts`) : `IArmable`, `ITriggerable`, `IDownloadEnabled`
* `double[] AvailableSampleRates { get; }`
* `double SampleRate { get; set; }`
* **`ICalibratable`** (`DTS.DAS.Concepts`)
* Properties: `SerialNumber`, `Sensitivity`, `BatteryVolts`, `VddVolts`, `SignalConditioningVolts`.
* **`IGpioEnabled`** (`DTS.DAS.Concepts`)
* `void SetGpio(uint Port, uint Pin, GPIOPin.Directions Direction, bool State)`
* `bool GetGpio(uint Port, uint Pin)`
* **`IRealtimeable`** (`DTS.DAS.Concepts`)
* `void StartRealtime(double sampleRate)`
* `void StopRealtime()`
* `RealtimeSample[] GetRealtimeSamples()`
* **`ILargeDataAware`** (`DTS.DAS.Concepts.DAS.Channel`)
* `bool IsDataArraySized { get; }`: Indicates if data fits safely in an array for slice applications.
#### Classes
* **`TsrEvent`** (`DTS.Common.DAS.Concepts` & `DTS.DAS.Concepts`) : `Exceptional`, `ICloneable`
* Abstract base class for event metadata.
* Properties: `EventId` (UInt64, 1-based), `TimeStamp` (DateTime), `SerialNumber`, `AlternateSerialNumber`, `DurationSeconds`, `MaxSampleRate`, `TemperatureC`, `PreTriggerSeconds`.
* `abstract object Clone()`: Creates a shallow copy.
* **`RealtimeSample`** (`DTS.DAS.Concepts`)
* `double[] DataEU`: Data indexed by channel.
* `UInt64 SampleNumber`
* **`LinearizationFormula`** (`DTS.Common.DAS.Concepts`)
* Handles conversion of raw voltage to Engineering Units (EU).
* **Properties**: `NonLinearStyle`, `PolynomialSensitivity`, `LinearizationExponent`, `MMPerV`, `MVAt0MM`, `Slope`, `Intercept`, `CalibrationFactor`, `ZeroPositionIntercept`, `UsemVOverVForPolys`, `PolynomialCoeff