init
This commit is contained in:
155
docs/ai/DataPRO/IService/Classes.md
Normal file
155
docs/ai/DataPRO/IService/Classes.md
Normal file
@@ -0,0 +1,155 @@
|
||||
---
|
||||
source_files:
|
||||
- DataPRO/IService/Classes/ConfigurationConstants.cs
|
||||
- DataPRO/IService/Classes/StaticInformation.cs
|
||||
- DataPRO/IService/Classes/NewData.cs
|
||||
- DataPRO/IService/Classes/SampleData.cs
|
||||
- DataPRO/IService/Classes/ModuleDiagnosticResult.cs
|
||||
- DataPRO/IService/Classes/FlashEraseStatus.cs
|
||||
- DataPRO/IService/Classes/TriggerCheckResult.cs
|
||||
- DataPRO/IService/Classes/TOMModule.cs
|
||||
- DataPRO/IService/Classes/Exceptions.cs
|
||||
- DataPRO/IService/Classes/EID.cs
|
||||
- DataPRO/IService/Classes/ServiceCallbackData.cs
|
||||
- DataPRO/IService/Classes/EID.Reader.cs
|
||||
- DataPRO/IService/Classes/XMLHelper.cs
|
||||
- DataPRO/IService/Classes/ConfigurationData.cs
|
||||
- DataPRO/IService/Classes/InfoResult.cs
|
||||
generated_at: "2026-04-17T15:28:43.247435+00:00"
|
||||
model: "zai-org/GLM-5-FP8"
|
||||
schema_version: 1
|
||||
sha256: "f5d708ac0e3a8539"
|
||||
---
|
||||
|
||||
# Documentation: DTS.DASLib.Service
|
||||
|
||||
## 1. Purpose
|
||||
|
||||
This module serves as the data contract and utility layer for the DTS Data Acquisition System (DAS) service infrastructure. It defines the fundamental data structures used to represent hardware configuration (`ConfigurationData`), device information (`InfoResult`), sensor identification (`EID`), and acquired sample data (`SampleData`, `NewDataData`). Additionally, it provides utilities for XML serialization (`XMLHelper`), hardware interaction callbacks (`ServiceCallbackData`), and custom error handling via specific exception types. It acts as the bridge between the hardware communication layer and the higher-level application logic.
|
||||
|
||||
## 2. Public Interface
|
||||
|
||||
### Classes
|
||||
|
||||
#### `ConfigurationData`
|
||||
Implements `IConfigurationData`, `IXmlSerializable`. Represents the configuration of a DAS device.
|
||||
* `IDASModule[] Modules`: Array of modules in the DAS.
|
||||
* `IEID[] IDs`: EIDs for the DAS (ignored in XML serialization).
|
||||
* `string TestID`, `string InstanceID`, `string Description`: Test metadata.
|
||||
* `int NumberOfConfiguredChannels()`: Returns the count of channels where `IsConfigured` is true.
|
||||
* `static void Serialize(string file, ConfigurationData config)`: Serializes config to an XML file.
|
||||
* `static string Serialize(ConfigurationData config)`: Serializes config to an XML string.
|
||||
* `static byte[] SerializeBin(ConfigurationData config)`: Serializes config to a binary blob (uses `BinaryFormatter`).
|
||||
* `static ConfigurationData Deserialize(string file)`: Deserializes XML file to object.
|
||||
* `static ConfigurationData DeserializeFromString(string SerializedText)`: Deserializes XML string to object.
|
||||
* `void WriteXml(XmlWriter writer)`: Custom XML write logic.
|
||||
* `void ReadXml(XmlReader reader)`: Custom XML read logic.
|
||||
|
||||
#### `InfoResult`
|
||||
Implements `IInfoResult`. Contains hardware information about a discovered DAS device.
|
||||
* `IInfoResultModule[] Modules`: Array of module descriptors.
|
||||
* `string MACAddress`: The MAC address of the device.
|
||||
* `IEID BatteryID`: Electronic ID of the battery.
|
||||
* `bool HasBattery`: Calculated property checking if a valid battery ID is present.
|
||||
* `byte MapDASChannelNumber2ModuleArrayIndex(int channelNumber)`: Converts global channel number to module index.
|
||||
* `byte MapDASChannelNumber2ModuleChannelNumber(int channelNumber)`: Converts global channel number to local module channel number.
|
||||
* `byte MapModuleArrayIndexAndChannelNum2DASChannel(int moduleArrayIdx, int channelNumber)`: Converts local module/channel indices to global DAS channel number.
|
||||
* `static void SetDASInfo(IDASCommunication das, IInfoResult dasInfo, bool bSetInDb = true)`: Updates DAS info, optionally persisting to the database.
|
||||
|
||||
#### `EID` (Electronic ID)
|
||||
Implements `IEID`, `IComparable<EID>`, `IComparable<string>`. Represents a sensor Electronic ID.
|
||||
* `string ID`: The ID string.
|
||||
* `byte[] Blob`: Raw binary data.
|
||||
* `bool IsValid()`: Validates the ID (checks length=16, hex format, non-blank, and CRC8).
|
||||
* `int CompareTo(EID eid)`: Case-insensitive comparison.
|
||||
|
||||
#### `EIDReader`
|
||||
Static helper class for reading EIDs from hardware.
|
||||
* `static bool SupportsQueryOneWireID(ICommunication comm)`: Returns false for `EthernetTsrAir` and `WinUSBTsrAir`; true otherwise.
|
||||
* `static IEID[] RetriveEIDs(ICommunication comm, byte DASChannelNumber, int idType)`: Retrieves EIDs with retry logic (3 attempts). Returns `null` on failure or if unsupported.
|
||||
* `static EID[] RetriveEIDs(ICommunication comm, int moduleIndex)`: Retrieves EIDs for a specific module index.
|
||||
* `static EID[][] RetrieveEIDsG5(ICommunication comm)`: Retrieves EIDs for G5 hardware racks.
|
||||
* `static bool IsBlankID(string id)`: Checks if ID equals `BLANK_ID` ("0000000000000000").
|
||||
|
||||
#### `ServiceCallbackData`
|
||||
Base class for internal service callbacks.
|
||||
* `CallbackStatus Status`: Enum (ProgressReport, NewData, Timeout, Success, Failure, Canceled, InvalidParameters).
|
||||
* `SampleData[] DataSamples`: Array of sample data segments.
|
||||
* `void AddSampleData(short[][] data, ulong sampleNumber, ulong timeStamp, ulong sequenceNumber)`: Adds a sample segment to the internal list.
|
||||
* `void SetNewDiagnosticData(DiagnosticNewData data)`, `SetNewTiltData(TiltNewData data)`, etc.: Setters for specific data payload types.
|
||||
|
||||
#### `XMLHelper`
|
||||
Static helper for type-safe XML parsing/writing using `InvariantCulture`.
|
||||
* `GetString(XmlReader reader)`: Reads element text content.
|
||||
* `GetDouble(XmlReader reader)`, `GetInt(XmlReader reader)`, etc.: Parses text to specific types.
|
||||
* `TryGetString(...)`, `TryGetDouble(...)`, etc.: Safe versions returning default values on failure.
|
||||
* `PutString(XmlWriter writer, string tag, string value)`, `PutDouble(...)`, etc.: Writes elements with specified tags.
|
||||
|
||||
#### `SampleData`
|
||||
Represents a single poll of hardware data.
|
||||
* `short[][] Data`: Jagged array of channel data.
|
||||
* `ulong SampleNumber`, `TimeStamp`, `SequenceNumber`: Metadata for the sample.
|
||||
|
||||
#### `NewDataData`
|
||||
Container for bulk data acquisition results.
|
||||
* `short[][][] datas`: 3D array of data.
|
||||
* `ulong[] SampleNumbers`, `TimeStamps`, `SequenceNumbers`: Arrays of metadata.
|
||||
|
||||
#### `TOMModule`
|
||||
Inherits from `DASModule`. Represents a digital output channel.
|
||||
* `TomTriggerType TriggerType`: Enum defining trigger source (NONE, BUS_ONLY, PANEL_ONLY, BUS_PANEL).
|
||||
|
||||
#### `ModuleDiagnosticsResult`
|
||||
Implements `IModuleDiagnosticsResult`. Holds temperature readings from diagnostics.
|
||||
* `float TemperatureLocation1Pre` ... `TemperatureLocation4Post`: Temperature properties.
|
||||
|
||||
#### `FlashEraseStatus`
|
||||
Tracks flash erase progress.
|
||||
* `CommandStatus LastError`: Status of the operation.
|
||||
* `float PercentComplete`: Progress percentage.
|
||||
|
||||
#### `TriggerCheckResult`
|
||||
Implements `ITriggerCheckResult`. Holds trigger line states.
|
||||
* `bool IsStatusGood`, `IsTriggered`, `HasTriggered`, `IsStartRecordActive`, `HasStartRecordBeenActive`.
|
||||
|
||||
### Exceptions
|
||||
* `BusyException`: Thrown when a service is called while already busy.
|
||||
* `TriggerShortedException`, `StartShortedException`: Hardware trigger faults.
|
||||
* `NoDiagnosticsAvailable`: Diagnostics data requested before diagnostics run.
|
||||
* `TooManyDiagnosticsAvailable`: Ambiguous diagnostic results found.
|
||||
|
||||
### Enums
|
||||
* `ConfigurationConstants.VerifyConfig_Errors`: Contains `DefaultHardwareFilterRateOutOfRange`.
|
||||
|
||||
## 3. Invariants
|
||||
|
||||
* **EID Validation**: A valid `EID` must be exactly 16 characters, in Hex format, not equal to "0000000000000000", and must match the internal CRC8 checksum calculated via the static `CRCTable`.
|
||||
* **XML Parsing**: `XMLHelper` methods enforce `InvariantCulture` for all numeric parsing to ensure locale independence.
|
||||
* **Sample Data**: `SampleData` and `NewDataData` associate data arrays strictly with corresponding metadata arrays (SampleNumbers, TimeStamps, etc.). The consumer must ensure array lengths match.
|
||||
* **Module Mapping**: `InfoResult` mapping functions assume `Modules` is ordered by `ModuleArrayIndex`. `MapDASChannelNumber2ModuleArrayIndex` defaults to the last module index if the channel number exceeds the calculated total.
|
||||
|
||||
## 4. Dependencies
|
||||
|
||||
### Internal Dependencies (within DTS.DASLib.Service)
|
||||
* `TOMModule` depends on `DASModule` (base class).
|
||||
* `ServiceCallbackData` depends on `SampleData`.
|
||||
* `ConfigurationData` depends on `XMLHelper`, `DASModule`, `EID`.
|
||||
* `InfoResult` depends on `EID`, `EIDReader`.
|
||||
|
||||
### External Dependencies
|
||||
* **DTS.Common.Interface.DASFactory**: Interfaces `IDASCommunication`, `ICommunication`, `IEID`, `IInfoResult`, `IModuleDiagnosticsResult`, `ITriggerCheckResult`, `IDASModule`.
|
||||
* **DTS.Common.Enums.DASFactory**: Enums `CommandStatus`, `ModuleType`, `RecordingMode`.
|
||||
* **DTS.Common.Utilities**: `HexEncoding`, `APILogger`.
|
||||
* **DTS.DASLib.Command.SLICE**: `QueryOneWireID` command.
|
||||
* **DTS.DASLib.Command.TDAS**: `ReadSensorIDs`, `RackIDX` commands.
|
||||
* **DASFactoryDb**: Database wrapper for configuration and info storage (`Config.SetConfiguration`, `DbWrapper`).
|
||||
|
||||
## 5. Gotchas
|
||||
|
||||
* **Null vs Empty Array in EIDReader**: The method `EIDReader.RetriveEIDs` explicitly returns `null` instead of an empty array if no IDs are found or the device is unsupported. The source comments indicate this is to avoid breaking legacy "CalStation" code that indexes the result directly (e.g., `result[0]`) without checking length.
|
||||
* **Method Name Typo**: The method `RetriveEIDs` in `EIDReader` is misspelled (missing an 'e').
|
||||
* **BinaryFormatter Obsolescence**: `ConfigurationData.SerializeBin` uses `BinaryFormatter`, which is deprecated in modern .NET versions due to security risks.
|
||||
* **Silent Failures in Deserialization**: `ConfigurationData.DeserializeFromString` catches exceptions, logs them, and returns `null` rather than propagating the exception to the caller.
|
||||
* **Hardcoded G5Digital Channel Count**: In `InfoResult.MapDASChannelNumber2RealtimeChannelNumber`, the case for `ModuleType.G5Digital` returns a hardcoded `32`, though the comment notes this case is currently unreachable due to logic flow.
|
||||
* **Redundant Class Name**: The class `NewDataData` has a redundant name.
|
||||
* **Magic Numbers**: `EID` validation relies on a hardcoded 256-byte CRC lookup table. `InfoResult` defaults `NumberOfBridgeChannels` to 3.
|
||||
53
docs/ai/DataPRO/IService/Classes/Arm.md
Normal file
53
docs/ai/DataPRO/IService/Classes/Arm.md
Normal file
@@ -0,0 +1,53 @@
|
||||
---
|
||||
source_files:
|
||||
- DataPRO/IService/Classes/Arm/ArmCheckActions.cs
|
||||
- DataPRO/IService/Classes/Arm/ArmCheckResults.cs
|
||||
- DataPRO/IService/Classes/Arm/ArmStatus.cs
|
||||
generated_at: "2026-04-17T15:40:20.854454+00:00"
|
||||
model: "zai-org/GLM-5-FP8"
|
||||
schema_version: 1
|
||||
sha256: "2263754ec2fc9923"
|
||||
---
|
||||
|
||||
# Documentation: ARM Status and Check Classes
|
||||
|
||||
## 1. Purpose
|
||||
|
||||
This module provides data structures for managing the arming lifecycle of Data Acquisition System (DAS) units. It consists of three classes: `ArmCheckActions` configures which diagnostic checks to perform during the arming process; `ArmCheckResults` stores the outcomes of those diagnostic checks; and `ArmStatus` tracks the real-time operational state of an armed DAS unit, including armed/triggered/recording states, voltage readings, sample progress, and fault information. These classes serve as data transfer objects between the arming service layer and DAS communication interfaces.
|
||||
|
||||
---
|
||||
|
||||
## 2. Public Interface
|
||||
|
||||
### ArmCheckActions
|
||||
|
||||
**Namespace:** `DTS.DASLib.Service`
|
||||
**Implements:** `IArmCheckActions`
|
||||
|
||||
A configuration object specifying which diagnostic checks should be performed during the arm process.
|
||||
|
||||
| Property | Type | Description |
|
||||
|----------|------|-------------|
|
||||
| `PerformBatteryVoltageCheck` | `bool` | Enable/disable battery voltage check. Default: `false` |
|
||||
| `PerformInputVoltageCheck` | `bool` | Enable/disable input voltage check. Default: `false` |
|
||||
| `PerformSensorIdCheck` | `bool` | Enable/disable sensor ID verification. Default: `false` |
|
||||
| `PerformEventLineCheck` | `bool` | Enable/disable event line check. Default: `false` |
|
||||
| `PerformSquibResistanceCheck` | `bool` | Enable/disable squib resistance measurement. Default: `false` |
|
||||
| `PerformTiltSensorCheck` | `bool` | Enable/disable tilt sensor check. Default: `false` |
|
||||
| `PerformTemperatureCheck` | `bool` | Enable/disable temperature check. Default: `false` |
|
||||
| `PerformClockSyncCheck` | `bool` | Enable/disable clock synchronization check. Default: `false` |
|
||||
|
||||
**Constructor:**
|
||||
- `ArmCheckActions()` — Initializes all check flags to `false`.
|
||||
|
||||
---
|
||||
|
||||
### ArmCheckResults
|
||||
|
||||
**Namespace:** `DTS.DASLib.Service`
|
||||
**Implements:** `IArmCheckResults`
|
||||
|
||||
A container for diagnostic check results collected during the arm process.
|
||||
|
||||
| Property | Type | Description |
|
||||
|
|
||||
24
docs/ai/DataPRO/IService/Classes/BaseInput.md
Normal file
24
docs/ai/DataPRO/IService/Classes/BaseInput.md
Normal file
@@ -0,0 +1,24 @@
|
||||
---
|
||||
source_files:
|
||||
- DataPRO/IService/Classes/BaseInput/SLICEBaseInputValues.cs
|
||||
- DataPRO/IService/Classes/BaseInput/SLICE.Base.Input.Reader.cs
|
||||
- DataPRO/IService/Classes/BaseInput/BaseInputValues.cs
|
||||
generated_at: "2026-04-17T15:40:18.236415+00:00"
|
||||
model: "zai-org/GLM-5-FP8"
|
||||
schema_version: 1
|
||||
sha256: "7a9567feeb5e574d"
|
||||
---
|
||||
|
||||
# Documentation: BaseInput Module
|
||||
|
||||
## 1. Purpose
|
||||
|
||||
This module provides infrastructure for reading and representing base unit input power diagnostics for SLICE/TDAS hardware devices. It consists of a data model (`BaseInputValues` and derived `SLICEBaseInputValues`) for storing voltage, battery, and temperature readings, and a reader class (`SLICEBaseInputReader`) that communicates with hardware to populate those values. The module is used by `DiagnosticsService.Diagnose` to capture hardware state for monitoring and display purposes.
|
||||
|
||||
---
|
||||
|
||||
## 2. Public Interface
|
||||
|
||||
### `BaseInputValues` (class)
|
||||
**Namespace:** `DTS.DASLib.Service`
|
||||
**
|
||||
33
docs/ai/DataPRO/IService/Classes/CAN.md
Normal file
33
docs/ai/DataPRO/IService/Classes/CAN.md
Normal file
@@ -0,0 +1,33 @@
|
||||
---
|
||||
source_files:
|
||||
- DataPRO/IService/Classes/CAN/CANConfig.cs
|
||||
- DataPRO/IService/Classes/CAN/CANModuleConfig.cs
|
||||
generated_at: "2026-04-17T15:40:12.991077+00:00"
|
||||
model: "zai-org/GLM-5-FP8"
|
||||
schema_version: 1
|
||||
sha256: "ee9e17e59c3434b9"
|
||||
---
|
||||
|
||||
# Documentation: CAN Configuration Module
|
||||
|
||||
## 1. Purpose
|
||||
|
||||
This module provides XML-serializable configuration management for CAN (Controller Area Network) data acquisition system modules. It exists to persist and retrieve hardware module configurations—including serial numbers, test metadata, recording parameters, and channel definitions—to/from XML files stored in a `DASConfigs` subdirectory relative to the executing assembly. The module serves as the configuration persistence layer for DAS (Data Acquisition System) hardware, enabling test configurations to survive application restarts.
|
||||
|
||||
---
|
||||
|
||||
## 2. Public Interface
|
||||
|
||||
### CANConfig Class
|
||||
|
||||
**Namespace:** `DTS.DASLib.Service`
|
||||
|
||||
| Member | Signature | Description |
|
||||
|--------|-----------|-------------|
|
||||
| `Modules` | `Dictionary<string, CANModuleConfig> Modules { get; }` | Read-only accessor for the internal module dictionary, keyed by serial number string. |
|
||||
| `FileName` | `string FileName { get; }` | Read-only accessor for the full path to the configuration file. |
|
||||
| `CANConfig()` | Constructor | Default constructor. Initializes an empty configuration with no file association. |
|
||||
| `CANConfig(string fileName, bool deleteIfPresent)` | Constructor | Loads configuration from `{ExecutingAssemblyLocation}\DASConfigs\{fileName}`. If `deleteIfPresent` is true, deletes existing file; otherwise reads and deserializes it. |
|
||||
| `SetModule(CANModuleConfig module)` | `void SetModule(CANModuleConfig module)` | Adds a new module or updates an existing one (keyed by `module.SerialNumber`). |
|
||||
| `GetModule(CANModuleConfig module)` | `CANModuleConfig GetModule(CANModuleConfig module)` | Returns existing module by serial number, or adds the passed module if not found and returns it. |
|
||||
| `GetSchema()` | `XmlSchema GetSchema()` | Returns `null`. Required by
|
||||
282
docs/ai/DataPRO/IService/Classes/Channels.md
Normal file
282
docs/ai/DataPRO/IService/Classes/Channels.md
Normal file
@@ -0,0 +1,282 @@
|
||||
---
|
||||
source_files:
|
||||
- DataPRO/IService/Classes/Channels/OutputDASChannel.cs
|
||||
- DataPRO/IService/Classes/Channels/AnalogOutputDASChannel.cs
|
||||
- DataPRO/IService/Classes/Channels/DigitalOutputDASChannel.cs
|
||||
- DataPRO/IService/Classes/Channels/InputDASChannel.cs
|
||||
- DataPRO/IService/Classes/Channels/AnalogInputDASChannelComparer.cs
|
||||
- DataPRO/IService/Classes/Channels/TimestampDASChannel.cs
|
||||
- DataPRO/IService/Classes/Channels/StreamInputDASChannel.cs
|
||||
- DataPRO/IService/Classes/Channels/OutputTOMDigitalChannel.cs
|
||||
- DataPRO/IService/Classes/Channels/CANInputDASChannel.cs
|
||||
- DataPRO/IService/Classes/Channels/UARTInputDASChannel.cs
|
||||
- DataPRO/IService/Classes/Channels/StreamOutputDASChannel.cs
|
||||
- DataPRO/IService/Classes/Channels/DASChannel.cs
|
||||
- DataPRO/IService/Classes/Channels/OutputSquibChannel.cs
|
||||
generated_at: "2026-04-17T15:31:20.768905+00:00"
|
||||
model: "zai-org/GLM-5-FP8"
|
||||
schema_version: 1
|
||||
sha256: "a9fb92d5e6adaff0"
|
||||
---
|
||||
|
||||
# DAS Channel Classes Documentation
|
||||
|
||||
## 1. Purpose
|
||||
|
||||
This module provides a class hierarchy for representing data acquisition system (DAS) channels, supporting both input and output channel types with specialized implementations for various hardware interfaces (CAN, UART, Streaming, Squib, Timestamp). The hierarchy enables XML serialization/deserialization for configuration persistence, tracks channel ownership through module and DAS relationships, and provides configuration validation through the `IsConfigured()` method. Channels serve as the fundamental unit of measurement and control in the DAS architecture.
|
||||
|
||||
---
|
||||
|
||||
## 2. Public Interface
|
||||
|
||||
### DASChannel (Base Class)
|
||||
**Namespace:** `DTS.DASLib.Service`
|
||||
**Implements:** `IDASChannel`, `IXmlSerializable`
|
||||
|
||||
**Constructors:**
|
||||
- `DASChannel(DASModule owner, int channelNumber)` — Initializes channel with owning module and module-relative channel number; sets `ConfigurationMode` to `Normal`, `EventStartTime` to `DateTime.Now`, `DiagnosticsMode` to `false`.
|
||||
- `DASChannel()` — Parameterless constructor for serialization.
|
||||
|
||||
**Properties:**
|
||||
| Property | Type | Description |
|
||||
|----------|------|-------------|
|
||||
| `SetupEID` | `string` | Setup event identifier. |
|
||||
| `DataCollectionEID` | `string` | Data collection event identifier. |
|
||||
| `ConfigurationMode` | `DFConstantsAndEnums.ConfigMode` | Configuration mode setting. |
|
||||
| `DiagnosticsMode` | `bool` | Whether channel is in diagnostics mode. |
|
||||
| `ModuleChannelNumber` | `int` | Channel number relative to owning module. |
|
||||
| `AbsoluteDisplayOrder` | `int` | Display ordering; defaults to 1. |
|
||||
| `UnitConverision` | `double` | Unit conversion factor; defaults to 1D. |
|
||||
| `AtCapacity` | `bool` | Capacity indicator. |
|
||||
| `CapacityOutputIsBasedOn` | `double` | Capacity basis value. |
|
||||
| `SensitivityUnits` | `SensorConstants.SensUnits` | Sensitivity units; defaults to `NONE`. |
|
||||
| `OwningModule` | `DASModule` | Back-reference to containing module (`[XmlIgnore]`). |
|
||||
| `Number` | `byte` | Stack channel number relative to owning DAS (computed via `DASInfo.MapModuleArrayIndexAndChannelNum2DASChannel`). |
|
||||
| `IDs` | `IEID[]` | Array of EID identifiers (`[XmlIgnore]`). |
|
||||
| `EventStartTime` | `DateTime` | Event timestamp. |
|
||||
| `LevelTriggerSeen` | `bool` | Level trigger registration flag. |
|
||||
| `IsoChannelName` | `string` | ISO channel name. |
|
||||
| `ChannelGroupName` | `string` | Channel group name. |
|
||||
| `UserCode` | `string` | User-defined code. |
|
||||
| `UserChannelName` | `string` | User-defined channel name. |
|
||||
| `LinearSensorCalibration` | `string` | Linear calibration data. |
|
||||
| `QualificationSamples` | `int` | Number of samples for qualification. |
|
||||
| `LevelTriggerT0AdjustmentSamples` | `int?` | T0 adjustment for time alignment; null indicates no direct level trigger. |
|
||||
| `IdType` | `int` | Identifier type; defaults to `DEFAULT_ID_TYPE` (0). |
|
||||
| `UserValue1`, `UserValue2`, `UserValue3` | `string` | User-defined values. |
|
||||
|
||||
**Methods:**
|
||||
- `virtual bool IsConfigured()` — Returns `false` by default; overridden by subclasses.
|
||||
- `bool CanReProgram()` — Returns true if channel is reprogrammable (checks `OwningModule.OwningDAS.DASInfo.Modules[0].IsProgrammable`).
|
||||
- `virtual void WriteXml(XmlWriter writer)` — Serializes channel to XML.
|
||||
- `virtual void WriteXmlCRC32(XmlWriter writer)` — Serializes subset of fields for CRC32 calculation.
|
||||
- `virtual void ReadXml(XmlReader reader)` — Deserializes channel from XML.
|
||||
- `virtual void WriteElementStart(XmlWriter writer)` — Writes opening XML element with xsi:type attribute.
|
||||
- `virtual void WriteElementEnd(XmlWriter writer)` — Writes closing XML element.
|
||||
- `virtual void HandleElement(XmlReader reader)` — Handles individual XML elements during deserialization.
|
||||
- `XmlSchema GetSchema()` — Returns `null` (IXmlSerializable requirement).
|
||||
|
||||
**Constants:**
|
||||
- `DEFAULT_ID_TYPE = 0`
|
||||
- `BRIDGE_ID_TYPE = 1`
|
||||
- `IEPE_ID_TYPE = 2`
|
||||
- `BRIDGE_G5_ID_TYPE = 3`
|
||||
|
||||
---
|
||||
|
||||
### OutputDASChannel
|
||||
**Inherits:** `DASChannel`
|
||||
|
||||
**Constructors:**
|
||||
- `OutputDASChannel(DASModule owner, int channelNumber)`
|
||||
- `OutputDASChannel()`
|
||||
|
||||
---
|
||||
|
||||
### InputDASChannel
|
||||
**Inherits:** `DASChannel`
|
||||
|
||||
**Constructors:**
|
||||
- `InputDASChannel(DASModule owner, int channelNumber)`
|
||||
- `InputDASChannel()`
|
||||
|
||||
---
|
||||
|
||||
### AnalogOutputDASChannel
|
||||
**Inherits:** `OutputDASChannel`
|
||||
|
||||
**Constructors:**
|
||||
- `AnalogOutputDASChannel(DASModule owner, int channelNumber)`
|
||||
- `AnalogOutputDASChannel()`
|
||||
|
||||
---
|
||||
|
||||
### DigitalOutputDASChannel
|
||||
**Inherits:** `OutputDASChannel`
|
||||
|
||||
**Constructors:**
|
||||
- `DigitalOutputDASChannel(DASModule owner, int channelNumber)`
|
||||
- `DigitalOutputDASChannel()`
|
||||
|
||||
---
|
||||
|
||||
### TimestampDASChannel
|
||||
**Inherits:** `InputDASChannel`
|
||||
|
||||
**Constructors:**
|
||||
- `TimestampDASChannel(DASModule owner, int channelNumber)`
|
||||
- `TimestampDASChannel()`
|
||||
|
||||
**Methods:**
|
||||
- `override bool IsConfigured()` — Always returns `true`.
|
||||
- `override string ToString()` — Returns descriptive string based on `OwningModule.ModuleType()` and `ModuleChannelNumber`.
|
||||
|
||||
**Constants:**
|
||||
- `MARKER = "MARKER"`
|
||||
- `SEC_H = "SECONDS_HIGH"`
|
||||
- `SEC_L = "SECONDS_LOW"`
|
||||
- `NANOS_H = "NANOSECONDS_HIGH"`
|
||||
- `NANOS_L = "NANOSECONDS_LOW"`
|
||||
- `RSVD = "RESERVED"`
|
||||
|
||||
---
|
||||
|
||||
### StreamInputDASChannel
|
||||
**Inherits:** `InputDASChannel`
|
||||
|
||||
**Constructors:**
|
||||
- `StreamInputDASChannel(DASModule owner, int channelNumber)`
|
||||
- `StreamInputDASChannel()`
|
||||
|
||||
**Properties:**
|
||||
| Property | Type | Default |
|
||||
|----------|------|---------|
|
||||
| `SerialNumber` | `string` | — |
|
||||
| `HardwareChannelName` | `string` | — |
|
||||
| `UDPAddress` | `string` | `string.Empty` |
|
||||
|
||||
**Methods:**
|
||||
- `override bool IsConfigured()` — Returns `true` if `SerialNumber` is not null or empty.
|
||||
- `override string ToString()` — Returns `$"Stream{ModuleChannelNumber}"`.
|
||||
- `override void WriteXml(XmlWriter writer)`
|
||||
- `override void HandleElement(XmlReader reader)`
|
||||
|
||||
---
|
||||
|
||||
### StreamOutputDASChannel
|
||||
**Inherits:** `OutputDASChannel`
|
||||
|
||||
**Constructors:**
|
||||
- `StreamOutputDASChannel(DASModule owner, int channelNumber)`
|
||||
- `StreamOutputDASChannel()`
|
||||
|
||||
**Properties:**
|
||||
| Property | Type | Default |
|
||||
|----------|------|---------|
|
||||
| `SerialNumber` | `string` | — |
|
||||
| `HardwareChannelName` | `string` | — |
|
||||
| `UDPProfileName` | `string` | `UDPStreamProfile.CH10_ANALOG_2HDR.ToString()` |
|
||||
| `UDPTimeChannelId` | `ushort` | — |
|
||||
| `UDPDataChannelId` | `ushort` | — |
|
||||
| `IRIGTimeDataPacketIntervalMs` | `ushort` | — |
|
||||
| `TMATSIntervalMs` | `ushort` | `StreamOutputRecord.DEFAULT_TMATS_INTERVAL_MS` |
|
||||
| `UDPAddress` | `string` | `string.Empty` |
|
||||
| `UDPTmNSConfig` | `uint[]` | `new uint[8]` |
|
||||
|
||||
**Methods:**
|
||||
- `override bool IsConfigured()` — Returns `true` if `SerialNumber` is not null or empty.
|
||||
- `override string ToString()` — Returns `$"Stream{ModuleChannelNumber}"`.
|
||||
- `override void WriteXml(XmlWriter writer)`
|
||||
- `override void HandleElement(XmlReader reader)`
|
||||
|
||||
---
|
||||
|
||||
### CANInputDASChannel
|
||||
**Inherits:** `InputDASChannel`
|
||||
|
||||
**Constructors:**
|
||||
- `CANInputDASChannel(DASModule owner, int channelNumber)` — Sets `SerialNumber` from `owner.SerialNumber()`.
|
||||
- `CANInputDASChannel()`
|
||||
|
||||
**Properties:**
|
||||
| Property | Type | Description |
|
||||
|----------|------|-------------|
|
||||
| `SerialNumber` | `string` | Sensor serial number. |
|
||||
| `HardwareChannelName` | `string` | Hardware channel name. |
|
||||
| `IsFD` | `bool` | CAN FD mode flag. |
|
||||
| `ArbBaseBitrate` | `int` | Arbitration base bitrate. |
|
||||
| `ArbBaseSJW` | `int` | Arbitration base SJW. |
|
||||
| `DataBitrate` | `int` | Data bitrate. |
|
||||
| `DataSJW` | `int` | Data SJW. |
|
||||
| `FileType` | `string` | File type identifier. |
|
||||
|
||||
**Methods:**
|
||||
- `override bool IsConfigured()` — Returns `true` if `SerialNumber` is not null or empty.
|
||||
- `override string ToString()` — Returns `$"CAN{ModuleChannelNumber}"`.
|
||||
- `override void WriteXml(XmlWriter writer)`
|
||||
- `override void HandleElement(XmlReader reader)`
|
||||
|
||||
---
|
||||
|
||||
### UARTInputDASChannel
|
||||
**Inherits:** `InputDASChannel`
|
||||
|
||||
**Constructors:**
|
||||
- `UARTInputDASChannel(DASModule owner, int channelNumber)`
|
||||
- `UARTInputDASChannel()`
|
||||
|
||||
**Properties:**
|
||||
| Property | Type | Description |
|
||||
|----------|------|-------------|
|
||||
| `SerialNumber` | `string` | Sensor serial number. |
|
||||
| `HardwareChannelName` | `string` | Hardware channel name. |
|
||||
| `BaudRate` | `uint` | Baud rate setting. |
|
||||
| `DataBits` | `uint` | Data bits setting. |
|
||||
| `StopBits` | `StopBits` | Stop bits enumeration. |
|
||||
| `Parity` | `Parity` | Parity enumeration. |
|
||||
| `FlowControl` | `Handshake` | Flow control enumeration. |
|
||||
| `DataFormat` | `UartDataFormat` | Data format enumeration. |
|
||||
|
||||
**Methods:**
|
||||
- `override bool IsConfigured()` — Returns `true` if `SerialNumber` is not null or empty.
|
||||
- `override string ToString()` — Returns `$"UART{ModuleChannelNumber}"`.
|
||||
- `override void WriteXml(XmlWriter writer)`
|
||||
- `override void HandleElement(XmlReader reader)`
|
||||
|
||||
---
|
||||
|
||||
### OutputTOMDigitalChannel
|
||||
**Inherits:** `DigitalOutputDASChannel`
|
||||
|
||||
**Constructors:**
|
||||
- `OutputTOMDigitalChannel(XmlReader reader)` — Initializes `IDs` array and calls `ReadXml(reader)`.
|
||||
- `OutputTOMDigitalChannel(DASModule owner, int channelNumber)`
|
||||
- `OutputTOMDigitalChannel()`
|
||||
|
||||
**Properties:**
|
||||
| Property | Type | Default |
|
||||
|----------|------|---------|
|
||||
| `OutputMode` | `DigitalOutputModes` | `DigitalOutputModes.NONE` |
|
||||
| `DelayMS` | `double` | `0D` |
|
||||
| `LimitDuration` | `bool` | `false` |
|
||||
| `DurationMS` | `double` | `0D` |
|
||||
| `DigitalChannelDescription` | `string` | `""` |
|
||||
| `LastModifiedBy` | `string` | `""` |
|
||||
| `LastModified` | `DateTime` | — |
|
||||
| `LocalOnly` | `bool` | `false` |
|
||||
| `HardwareChannelName` | `string` | — |
|
||||
| `Version` | `int` | — |
|
||||
| `Date` | `DateTime` | — |
|
||||
|
||||
**Methods:**
|
||||
- `override bool IsConfigured()` — Returns `true` if `OutputMode != DigitalOutputModes.NONE` and `DigitalChannelDescription` is not empty.
|
||||
- `override void WriteXml(XmlWriter writer)`
|
||||
- `override void WriteXmlCRC32(XmlWriter writer)`
|
||||
- `override void HandleElement(XmlReader reader)`
|
||||
|
||||
---
|
||||
|
||||
### OutputSquibChannel
|
||||
**Inherits:** `AnalogOutputDASChannel`, `IComparable`
|
||||
|
||||
**Constructors:
|
||||
119
docs/ai/DataPRO/IService/Classes/Diagnostics.md
Normal file
119
docs/ai/DataPRO/IService/Classes/Diagnostics.md
Normal file
@@ -0,0 +1,119 @@
|
||||
---
|
||||
source_files:
|
||||
- DataPRO/IService/Classes/Diagnostics/OptimizationValues.cs
|
||||
- DataPRO/IService/Classes/Diagnostics/DiagnosticActions.cs
|
||||
- DataPRO/IService/Classes/Diagnostics/DiagnosticsResultActions.cs
|
||||
- DataPRO/IService/Classes/Diagnostics/DiagnosticsResult.cs
|
||||
generated_at: "2026-04-17T15:38:51.449636+00:00"
|
||||
model: "zai-org/GLM-5-FP8"
|
||||
schema_version: 1
|
||||
sha256: "34ce6d811e6f9b1a"
|
||||
---
|
||||
|
||||
# Diagnostics Module Documentation
|
||||
|
||||
## 1. Purpose
|
||||
|
||||
This module provides data structures and operations for managing diagnostic tests and results for Data Acquisition System (DAS) channels. It enables pre-recording validation of sensor configurations by measuring excitation voltages, offsets, noise floors, shunt deflections, bridge resistance, and squib firing characteristics. The module bridges in-memory diagnostic state with persistent database storage, supporting analog input channels, digital input channels, and output squib channels.
|
||||
|
||||
---
|
||||
|
||||
## 2. Public Interface
|
||||
|
||||
### `OptimizationValues` (Class)
|
||||
**Namespace:** `DTS.DASLib.Service.Classes.Diagnostics`
|
||||
**Implements:** `IOptimizationValues`
|
||||
|
||||
| Property | Type | Description |
|
||||
|----------|------|-------------|
|
||||
| `TransferSpeed` | `float` | Gets or sets the transfer speed value. |
|
||||
|
||||
---
|
||||
|
||||
### `DiagnosticsActions` (Class)
|
||||
**Namespace:** `DTS.DASLib.Service`
|
||||
**Implements:** `IDiagnosticActions`
|
||||
|
||||
Holds instructions for diagnosing a single DAS channel.
|
||||
|
||||
#### Properties
|
||||
|
||||
| Property | Type | Default | Description |
|
||||
|----------|------|---------|-------------|
|
||||
| `DASChannelNumber` | `int` | `0` | The DAS channel number for these diagnostic instructions. |
|
||||
| `MeasureExcitation` | `bool` | `false` | Whether to measure excitation voltage applied to the sensor. |
|
||||
| `MeasureOffset` | `bool` | `false` | Whether to measure the sensor's offset from zero. |
|
||||
| `CheckDigitalState` | `bool` | `false` | Whether to check open/closed/low/high state of a digital input channel. |
|
||||
| `MeasureInternalOffset` | `bool` | `false` | Whether to measure internal offset. |
|
||||
| `RemoveOffset` | `bool` | `false` | Whether firmware should compensate for sensor offset. |
|
||||
| `MeasureNoise` | `bool` | `false` | Whether to measure noise floor as percentage of full scale. |
|
||||
| `PerformShuntCheck` | `bool` | `false` | Whether to perform an emulated shunt check. |
|
||||
| `SquibFireCheck` | `bool` | `false` | Whether to run a squib fire check on the channel. |
|
||||
| `PerformVoltageInsertCheck` | `bool` | `false` | Whether to perform a voltage insertion gain check (SLICE Pro). |
|
||||
| `PerformCalSignalCheck` | `bool` | `false` | Whether to perform a calibration signal check. |
|
||||
| `MeasureBridgeResistance` | `bool` | `false` | Whether to measure the resistance of the bridge. |
|
||||
|
||||
#### Methods
|
||||
|
||||
```csharp
|
||||
public DiagnosticsActions()
|
||||
```
|
||||
Initializes a new instance with all diagnostic actions disabled and `DASChannelNumber` set to 0.
|
||||
|
||||
```csharp
|
||||
public bool AllActionsDisabled()
|
||||
```
|
||||
Returns `true` if all diagnostic actions are disabled; otherwise `false`.
|
||||
|
||||
```csharp
|
||||
public static void SetChannelDiagnosticActions(IDASCommunication unit, IDiagnosticActions[] actions, bool setInDb)
|
||||
```
|
||||
Assigns the diagnostic actions array to `unit.ChannelDiagnostics`. If `setInDb` is `true` and the database is connected, clears all existing diagnostic actions for the unit and inserts the new actions into the database.
|
||||
|
||||
---
|
||||
|
||||
### `DiagnosticsResultActions` (Static Class)
|
||||
**Namespace:** `DTS.DASLib.Service.Classes.Diagnostics`
|
||||
|
||||
Provides static methods for managing diagnostic results on DAS units.
|
||||
|
||||
#### Methods
|
||||
|
||||
```csharp
|
||||
public static void ClearChannelDiagnosticsResults(IDASCommunication unit, bool bClearDb = true)
|
||||
```
|
||||
Clears `unit.ChannelDiagnosticsResults` and `unit.ChannelDiagnostics` by initializing them to empty arrays. If `bClearDb` is `true` and the database is connected, clears existing diagnostics from the database for the unit.
|
||||
|
||||
```csharp
|
||||
public static void SetChannelDiagnosticsResults(IDASCommunication unit, IDiagnosticResult[] results, bool setInDb)
|
||||
```
|
||||
Assigns `results` to `unit.ChannelDiagnosticsResults`. If `setInDb` is `true` and the database is connected, iterates through results and inserts them into the database based on channel type:
|
||||
- `AnalogInputDASChannel` with `DigitalInputChannel == true` → `InsertDiagnosticsResultDigital`
|
||||
- `AnalogInputDASChannel` with `DigitalInputChannel == false` → `InsertDiagnosticsResultAnalog`
|
||||
- `OutputSquibChannel` → `InsertDiagnosticsResultsSquib`
|
||||
|
||||
---
|
||||
|
||||
### `DiagnosticsResult` (Class)
|
||||
**Namespace:** `DTS.DASLib.Service`
|
||||
**Implements:** `IDiagnosticResult`
|
||||
|
||||
Holds diagnostic results for a single DAS channel.
|
||||
|
||||
#### Key Properties
|
||||
|
||||
| Property | Type | Default | Description |
|
||||
|----------|------|---------|-------------|
|
||||
| `DASChannelNumber` | `int` | — | The channel number from which diagnostics are returned. |
|
||||
| `EventNumber` | `int` | — | The event number this diagnostic is relevant for. |
|
||||
| `ScalefactorMilliVoltsPerADC` | `double` | `1` | Scale factor to convert raw ADC values to millivolts. |
|
||||
| `ScalefactorEngineeringUnitsPerADC` | `double` | `1` | Scale factor to convert ADC values to engineering units. |
|
||||
| `ExpectedExcitationMilliVolts` | `double` | — | Factory excitation value (mandatory). |
|
||||
| `MeasuredExcitationMilliVolts` | `double?` | — | Measured excitation voltage in mV. |
|
||||
| `NegativeExcitation` | `bool` | — | Flag indicating if measured excitation was negative. |
|
||||
| `MeasuredOffsetMilliVolts` | `double?` | — | Sensor offset from zero in mV. |
|
||||
| `MeasuredInternalOffsetMilliVolts` | `double?` | — | Measured internal offset in mV. |
|
||||
| `AutoZeroPercentDeviation` | `double?` | — | Deviation from zero during auto-zero (stored as absolute value). |
|
||||
| `FinalOffsetADC` | `short?` | — | Offset remaining after offset removal. |
|
||||
| `RemovedOffsetADC` | `int?` | — | Amount of offset removed. |
|
||||
| `RemovedInternalOffsetADC
|
||||
103
docs/ai/DataPRO/IService/Classes/Download.md
Normal file
103
docs/ai/DataPRO/IService/Classes/Download.md
Normal file
@@ -0,0 +1,103 @@
|
||||
---
|
||||
source_files:
|
||||
- DataPRO/IService/Classes/Download/UARTDownloadRequest.cs
|
||||
- DataPRO/IService/Classes/Download/DownloadRequest.cs
|
||||
- DataPRO/IService/Classes/Download/DownloadReport.cs
|
||||
generated_at: "2026-04-17T15:40:25.049992+00:00"
|
||||
model: "zai-org/GLM-5-FP8"
|
||||
schema_version: 1
|
||||
sha256: "343a1296e8698928"
|
||||
---
|
||||
|
||||
# Documentation: Download Request and Report Classes
|
||||
|
||||
## 1. Purpose
|
||||
|
||||
This module provides data structures and persistence logic for managing download requests and event reports from a Data Acquisition System (DAS) to a PC. It defines three primary classes: `DownloadRequest` for standard channel-based data downloads, `UARTDownloadRequest` for UART stream downloads, and `DownloadReport` for representing event metadata stored on a DAS device. These classes serve as the bridge between in-memory download configurations and database persistence, supporting both the query phase (discovering what events exist) and the download phase (specifying what data to retrieve).
|
||||
|
||||
---
|
||||
|
||||
## 2. Public Interface
|
||||
|
||||
### `UARTDownloadRequest` (implements `IUARTDownloadRequest`)
|
||||
|
||||
**Properties:**
|
||||
| Property | Type | Description |
|
||||
|----------|------|-------------|
|
||||
| `EventNumber` | `ushort` | Identifies which event to download data from |
|
||||
| `TotalByteCount` | `ulong` | Total size of the UART data |
|
||||
| `TriggerByteCount` | `ulong` | Byte offset where trigger occurred in the data stream |
|
||||
| `FaultByteCount` | `ulong` | Byte offset where fault occurred in the data stream |
|
||||
| `StartTimestamp` | `ulong` | Timestamp when UART stream started |
|
||||
| `EndTimestamp` | `ulong` | Timestamp when UART stream ended |
|
||||
| `BaudRate` | `int` | Baud rate used during UART recording |
|
||||
|
||||
**Static Method:**
|
||||
```csharp
|
||||
public static void SetWhatToDownload(IDASCommunication das, IUARTDownloadRequest request, bool bSetInDb)
|
||||
```
|
||||
- Sets the UART download request on the DAS communication object via `udas.WhatUARTToDownload`
|
||||
- If `bSetInDb` is true and database is connected, clears existing requests and inserts the new request into the database
|
||||
- Catches and logs exceptions without re-throwing
|
||||
|
||||
---
|
||||
|
||||
### `DownloadRequest` (implements `IDownloadRequest`)
|
||||
|
||||
**Constants:**
|
||||
| Constant | Value | Description |
|
||||
|----------|-------|-------------|
|
||||
| `ALL_CHANNELS` | `0xFF` | Setting `DASChannelNumber` to this value downloads all channels (currently the only supported option per source comments) |
|
||||
|
||||
**Properties:**
|
||||
| Property | Type | Description |
|
||||
|----------|------|-------------|
|
||||
| `EventNumber` | `ushort` | Identifies which event to download data from |
|
||||
| `DASChannelNumber` | `byte` | Channel identifier (must be `ALL_CHANNELS`) |
|
||||
| `StartSample` | `virtual ulong` | First sample to download |
|
||||
| `EndSample` | `virtual ulong` | Last sample to download |
|
||||
| `SamplesToSkip` | `ulong` | Sub-sampling interval (0 or 1 = no subsampling, 2 = every other sample, etc.) |
|
||||
| `StartRecordTimestampSec` | `double` | Start record timestamp in seconds |
|
||||
| `TriggerTimestampSec` | `double` | Trigger timestamp in seconds |
|
||||
| `StartRecordTimestampNanoSec` | `double` | Start record timestamp nanoseconds component |
|
||||
| `TriggerTimestampNanoSec` | `double` | Trigger timestamp nanoseconds component |
|
||||
| `PTPMasterSync` | `bool` | PTP master sync flag |
|
||||
|
||||
**Static Method:**
|
||||
```csharp
|
||||
public static void SetWhatToDownload(IDASCommunication das, IDownloadRequest request, bool bSetInDb)
|
||||
```
|
||||
- Logs the request details via `APILogger.Log`
|
||||
- Sets the download request on `das.WhatToDownload`
|
||||
- If `bSetInDb` is true and database is connected, clears existing requests and inserts the new request
|
||||
- Catches and logs exceptions without re-throwing
|
||||
|
||||
---
|
||||
|
||||
### `DownloadReport` (implements `IDownloadReport`)
|
||||
|
||||
**Properties:**
|
||||
| Property | Type | Description |
|
||||
|----------|------|-------------|
|
||||
| `Events` | `IEventInfo[]` | Array of all events stored on the DAS |
|
||||
| `UARTEvents` | `IUARTEventInfo[]` | Array of all UART events stored on the DAS |
|
||||
|
||||
**Nested Class: `EventInfo` (implements `IEventInfo`)**
|
||||
|
||||
| Property | Type | Description |
|
||||
|----------|------|-------------|
|
||||
| `Modules` | `IDASModule[]` | Module information addressable by `ModuleArrayIndex` |
|
||||
| `EventNumber` | `int` | Event number |
|
||||
| `TestGUID` | `Guid` | GUID of the corresponding event |
|
||||
| `FaultFlags` | `ushort` | Fault flags |
|
||||
| `FaultFlagsEx` | `ushort` | Extended fault flags |
|
||||
| `ArmAttempts` | `byte` | Number of arm attempts |
|
||||
| `TestTime` | `DateTime` | Timestamp of the event |
|
||||
| `TestID` | `string` | ID of the event |
|
||||
| `Description` | `string` | Text description stored with the event |
|
||||
| `HasBeenDownloaded` | `bool` | True if event already downloaded |
|
||||
| `WasTriggered` | `bool` | True if event received a trigger |
|
||||
|
||||
**Methods:**
|
||||
```csharp
|
||||
public void ClearFaults() //
|
||||
59
docs/ai/DataPRO/IService/Classes/InputRangeAttributes.md
Normal file
59
docs/ai/DataPRO/IService/Classes/InputRangeAttributes.md
Normal file
@@ -0,0 +1,59 @@
|
||||
---
|
||||
source_files:
|
||||
- DataPRO/IService/Classes/InputRangeAttributes/GainDisabledAttribute.cs
|
||||
- DataPRO/IService/Classes/InputRangeAttributes/MaxInputRangeAttribute.cs
|
||||
- DataPRO/IService/Classes/InputRangeAttributes/GainAvailableUnmodifiedAttribute.cs
|
||||
- DataPRO/IService/Classes/InputRangeAttributes/MinInputRangeAttribute.cs
|
||||
- DataPRO/IService/Classes/InputRangeAttributes/FirmwareInputRangeAttribute.cs
|
||||
generated_at: "2026-04-17T16:03:17.836512+00:00"
|
||||
model: "zai-org/GLM-5-FP8"
|
||||
schema_version: 1
|
||||
sha256: "75434fd7a99fb627"
|
||||
---
|
||||
|
||||
# InputRangeAttributes
|
||||
|
||||
### Purpose
|
||||
This module provides a set of custom attributes used to annotate gain-related enum values with metadata controlling input range behavior for data acquisition hardware. The attributes allow fine-grained control over gain availability, disabled states, and input range boundaries (min/max/firmware values) in millivolts, supporting different hardware configurations including modified vs unmodified Gen 3 SPS devices.
|
||||
|
||||
### Public Interface
|
||||
|
||||
**GainDisabledAttribute** : Attribute
|
||||
- `GainDisabledAttribute(bool disabled)` - Constructor; marks a gain as disabled when `disabled` is true.
|
||||
- `static bool IsGainDisabled(object o)` - Returns true if the object (typically an enum value) has `GainDisabledAttribute` with `_bDisabled = true`. Returns false if null, no member found, or attribute not present.
|
||||
|
||||
**MaxInputRangeAttribute** : Attribute
|
||||
- `MaxInputRangeAttribute(double maxInputRangemV)` - Constructor; sets maximum input range in mV.
|
||||
- `static double GetMaxInputRangemV(object o)` - Returns the maximum input range in mV for the given object. Returns 0D if null, no member found, or attribute not present.
|
||||
|
||||
**GainAvailableUnmodifiedAttribute** : Attribute
|
||||
- `GainAvailableUnmodifiedAttribute(bool available)` - Constructor; marks availability for unmodified Gen 3 SPS.
|
||||
- `static bool IsGainAvailableToUnmodified(object o)` - Returns true if gain is available to unmodified Gen 3 SPS. Returns true by default (if attribute not present). Returns false only if attribute is present with `available = false`.
|
||||
|
||||
**MinInputRangeAttribute** : Attribute
|
||||
- `MinInputRangeAttribute(double minInputRangemV)` - Constructor; sets minimum input range in mV.
|
||||
- `static double GetMinInputRangemV(object o)` - Returns the minimum input range in mV for the given object. Returns 0D if null, no member found, or attribute not present.
|
||||
|
||||
**FirmwareInputRangeAttribute** : Attribute
|
||||
- `FirmwareInputRangeAttribute(double firmwareInputRangemV)` - Constructor; sets the input range value to send to firmware.
|
||||
- `static double GetFirmwareInputRangemV(object o)` - Returns the firmware input range in mV for the given object. Returns 0D if null, no member found, or attribute not present.
|
||||
|
||||
### Invariants
|
||||
- All static retrieval methods accept `object` (intended for enum values) and use reflection via `GetMember(o.ToString())`.
|
||||
- Default behaviors:
|
||||
- `IsGainDisabled`: returns `false` (gains are enabled by default)
|
||||
- `IsGainAvailableToUnmodified`: returns `true` (available by default)
|
||||
- Range getters: return `0D` if attribute not present
|
||||
- All attributes are in namespace `DTS.DASLib.Service` despite folder location suggesting otherwise.
|
||||
|
||||
### Dependencies
|
||||
- **Depends on**: `System` (for Attribute and reflection APIs)
|
||||
- **Depended on by**: Unclear from source alone - likely gain-related enums in the data acquisition service layer.
|
||||
|
||||
### Gotchas
|
||||
- **Namespace mismatch**: The namespace `DTS.DASLib.Service` does not match the folder path `DataPRO/IService/Classes/InputRangeAttributes`. A ReSharper comment suppresses namespace check.
|
||||
- **FogBugz references**: Comments reference internal bug tracker URLs (e.g., `http://fogbugz/fogbugz/default.asp?10080`) which are inaccessible externally.
|
||||
- **Reflection assumption**: The static methods assume `o.ToString()` returns a valid member name; if `o` is not an enum or the string doesn't match a member, methods return default values silently.
|
||||
- **Typo in field name**: `FirmwareInputRangeAttribute._firmwareInputRangeAttribute` - the field name repeats the class name rather than describing the value.
|
||||
|
||||
---
|
||||
43
docs/ai/DataPRO/IService/Classes/PowerProInput.md
Normal file
43
docs/ai/DataPRO/IService/Classes/PowerProInput.md
Normal file
@@ -0,0 +1,43 @@
|
||||
---
|
||||
source_files:
|
||||
- DataPRO/IService/Classes/PowerProInput/SLICE.PowerPro.Input.Reader.cs
|
||||
generated_at: "2026-04-17T16:10:43.628352+00:00"
|
||||
model: "zai-org/GLM-5-FP8"
|
||||
schema_version: 1
|
||||
sha256: "583eb4dab6fcbf41"
|
||||
---
|
||||
|
||||
# PowerProInput
|
||||
|
||||
### Purpose
|
||||
This module provides a concrete implementation of input reading functionality for PowerPro hardware devices. It extends `SLICEBaseInputReader` to measure diagnostic channel values including input voltage, temperature, and backup battery voltage from PowerPro hardware via a communication interface.
|
||||
|
||||
### Public Interface
|
||||
|
||||
**Class: `SLICEPowerProInputReader`**
|
||||
|
||||
- **Constructor**: `SLICEPowerProInputReader(ICommunication comm)` - Initializes the reader with an `ICommunication` interface for hardware communication. Passes the communication object to the base class and stores it in a private readonly field.
|
||||
|
||||
- **Property**: `override double InputMilliVolts` - Measures the input voltage on diagnostic channel `InputVoltage_A`. Creates a `MeasurePowerProDiagnosticChannel` instance, configures it with `DeviceGroup = 0` and `DeviceID = 0`, executes synchronously, and returns the measurement converted to millivolts (multiplied by 1000.0).
|
||||
|
||||
- **Property**: `override double TemperatureC` - Measures the temperature in Celsius. Uses diagnostic channel `TemperatureC` with `DeviceGroup = 0` and `DeviceID = 0`. Returns the raw measurement value without conversion.
|
||||
|
||||
- **Property**: `override double DirectBackupMilliVolts` - Measures the backup battery voltage. Uses diagnostic channel `BatteryVoltage` with `DeviceGroup = 0` and `DeviceID = 0`. Returns the measurement converted to millivolts (multiplied by 1000.0).
|
||||
|
||||
### Invariants
|
||||
- All measurement operations use `DeviceGroup = 0` and `DeviceID = 0` (single device assumption).
|
||||
- Voltage measurements (`InputMilliVolts`, `DirectBackupMilliVolts`) are always returned in millivolts, requiring multiplication by 1000.0 from the raw measurement.
|
||||
- Temperature is always returned in Celsius without scaling.
|
||||
- Each property getter performs a synchronous execution call; there is no caching of measurements.
|
||||
|
||||
### Dependencies
|
||||
**Depends on:**
|
||||
- `DTS.Common.Interface.DASFactory` - Provides `ICommunication` interface
|
||||
- `DTS.DASLib.Command.SLICE` - Provides `MeasurePowerProDiagnosticChannel` class and `PowerProDiagnosticChannelList` enum
|
||||
- `SLICEBaseInputReader` (base class, location not shown in source)
|
||||
|
||||
**Depended on by:** Not determinable from source alone.
|
||||
|
||||
### Gotchas
|
||||
- Each property access creates a new `MeasurePowerProDiagnosticChannel` instance and performs a synchronous `SyncExecute()` call. Frequent property access could impact performance.
|
||||
- The hardcoded `DeviceGroup = 0` and `DeviceID = 0` values suggest this implementation only supports single
|
||||
216
docs/ai/DataPRO/IService/Classes/SLICE.md
Normal file
216
docs/ai/DataPRO/IService/Classes/SLICE.md
Normal file
@@ -0,0 +1,216 @@
|
||||
---
|
||||
source_files:
|
||||
- DataPRO/IService/Classes/SLICE/DASConfigurationEventArg.cs
|
||||
- DataPRO/IService/Classes/SLICE/SLICE6DB3.cs
|
||||
- DataPRO/IService/Classes/SLICE/S6DBConnectedDevice.cs
|
||||
- DataPRO/IService/Classes/SLICE/SLICEPRODB.cs
|
||||
- DataPRO/IService/Classes/SLICE/SLICE6AIRBR.cs
|
||||
- DataPRO/IService/Classes/SLICE/SLICE6AIRTC.cs
|
||||
generated_at: "2026-04-17T15:30:50.633601+00:00"
|
||||
model: "zai-org/GLM-5-FP8"
|
||||
schema_version: 1
|
||||
sha256: "434d25165d2bfceb"
|
||||
---
|
||||
|
||||
# SLICE Device Service Classes Documentation
|
||||
|
||||
## 1. Purpose
|
||||
|
||||
This module provides specialized implementations for various SLICE hardware devices (Data Acquisition Systems) within the DTS.DASLib.Service namespace. It contains device-specific classes that handle configuration, communication protocols, diagnostics, and real-time streaming for different SLICE variants including SLICE6DB3 (limited PTP support), SLICEPRODB (battery/distributor), SLICE6AIRBR (bridge recorder), and SLICE6AIRTC (thermocouple). The module also includes supporting classes for device discovery (`S6DBConnectedDevice`) and configuration event handling (`DASConfigurationArg`).
|
||||
|
||||
---
|
||||
|
||||
## 2. Public Interface
|
||||
|
||||
### DASConfigurationArg
|
||||
**Namespace:** `DTS.DASLib.Service`
|
||||
**Implements:** `IDASConfigurationArg`
|
||||
|
||||
| Member | Signature | Description |
|
||||
|--------|-----------|-------------|
|
||||
| `DAS` | `IDASCommunication DAS { get; private set; }` | Gets the DAS communication interface associated with this configuration event. |
|
||||
| `BlankConfigurationRead` | `bool BlankConfigurationRead { get; private set; }` | Indicates whether a blank configuration was read (used during emergency downloads with blank filestore). |
|
||||
| `ConfigurationFailedValidation` | `bool ConfigurationFailedValidation { get; private set; }` | Indicates whether the configuration failed validation. |
|
||||
| Constructor | `DASConfigurationArg(IDASCommunication das, bool blankRead, bool failedValidation)` | Constructs a new configuration argument with the specified DAS, blank read status, and validation status. |
|
||||
|
||||
---
|
||||
|
||||
### SLICE6DB3\<T\>
|
||||
**Namespace:** `DTS.DASLib.Service`
|
||||
**Base Class:** `SLICE6DB<T>`
|
||||
**Constraint:** `where T : IConnection, new()`
|
||||
|
||||
A limited version of SLICE6DB without IEEE1588/PTP support.
|
||||
|
||||
| Member | Signature | Description |
|
||||
|--------|-----------|-------------|
|
||||
| `SetClockSyncConfig` | `override void SetClockSyncConfig(ServiceCallback callback, object userData, ClockSyncProfile profile)` | No-op implementation that immediately reports success. |
|
||||
| `GetClockSyncStatus` | `override void GetClockSyncStatus(ServiceCallback callback, object userData)` | No-op implementation that immediately reports success. |
|
||||
| `SetPTPDomainID` | `override void SetPTPDomainID(ServiceCallback callback, object userData, byte domainID)` | No-op implementation that stores domainID in functionData and reports success. |
|
||||
| `GetPTPDomainID` | `override void GetPTPDomainID(ServiceCallback callback, object userData)` | No-op implementation that immediately reports success. |
|
||||
|
||||
---
|
||||
|
||||
### S6DBConnectedDevice
|
||||
**Namespace:** `DTS.DASLib.Service.Classes.SLICE`
|
||||
**Implements:** `IDASConnectedDevice`
|
||||
|
||||
Describes a device connected to a S6DB as determined by `QAUTIL_QUERY_MAC_IP_TABLE`.
|
||||
|
||||
| Member | Signature | Description |
|
||||
|--------|-----------|-------------|
|
||||
| `DeviceType` | `HardwareTypes DeviceType { get; }` | The device type, defaults to `HardwareTypes.SLICE6_Base`. Changes to `HardwareTypes.SLICE6_AIR` if SerialNumber starts with "S6A". |
|
||||
| `Port` | `int Port { get; private set; }` | The port the device is on (0-based, positive values valid, default -1). |
|
||||
| `SpotOnPort` | `int SpotOnPort { get; private set; }` | Position on the chain/port (0-based, positive values valid, default -1). |
|
||||
| `PhysicalAddress` | `PhysicalAddress PhysicalAddress { get; private set; }` | MAC address of the device. |
|
||||
| `IPAddress` | `string IPAddress { get; private set; }` | IP address reported by device (default empty string). |
|
||||
| `SerialNumber` | `string SerialNumber { get; private set; }` | Serial number of device (default empty string). |
|
||||
| `Location` | `string Location { get; private set; }` | Location of device (default empty string). |
|
||||
| `Version` | `string Version { get; private set; }` | Version of device (default empty string). |
|
||||
| Constructor | `S6DBConnectedDevice(int port, int spotOnPort, PhysicalAddress physicalAddress, string ipAddress, string serialNumber, string location, string version)` | Constructs a new connected device record with all parameters. |
|
||||
|
||||
---
|
||||
|
||||
### SLICEPRODB\<T\>
|
||||
**Namespace:** `DTS.DASLib.Service`
|
||||
**Base Class:** `SLICE6DB<T>`
|
||||
**Implements:** `IDownloadActions`
|
||||
**Constraint:** `where T : IConnection, new()`
|
||||
|
||||
| Member | Signature | Description |
|
||||
|--------|-----------|-------------|
|
||||
| `QueryConnectedDevices` | `override void QueryConnectedDevices()` | No functionality for SLICEPRO DB; sets connected devices to empty array. |
|
||||
| `IsSlice6Distributor` | `override bool IsSlice6Distributor()` | Returns `false`. |
|
||||
| `IsBattery` | `override bool IsBattery()` | Returns `true`. |
|
||||
| `SupportsTemperatureCheck` | `protected override bool SupportsTemperatureCheck { get; }` | Returns `true`. |
|
||||
| `SupportsTiltCheck` | `protected override bool SupportsTiltCheck { get; }` | Returns `true`. |
|
||||
| `SupportsClockSyncCheck` | `protected override bool SupportsClockSyncCheck { get; }` | Returns `true`. |
|
||||
| `SupportsTimeSynchronization` | `public override bool SupportsTimeSynchronization { get; }` | Returns `false`. |
|
||||
| `InitMinProto` | `public override void InitMinProto()` | Initializes protocol limitations dictionary with minimum protocol version 1 for supported commands and `byte.MaxValue` for unsupported commands (PTP, temperature log, tilt queries, Ethernet MAC table). |
|
||||
| `AsyncQueryConfiguration` | `protected override void AsyncQueryConfiguration(object configAsyncInfo)` | Initializes minimum protocol, creates default config from info, and reports success. |
|
||||
|
||||
---
|
||||
|
||||
### SLICE6AIRBR\<T\>
|
||||
**Namespace:** `DTS.DASLib.Service`
|
||||
**Base Class:** `SLICE6_Base<T>`
|
||||
**Implements:** `IAlignUDPToPPSAware`
|
||||
**Constraint:** `where T : IConnection, new()`
|
||||
|
||||
Bridge recorder variant of SLICE6 AIR.
|
||||
|
||||
| Member | Signature | Description |
|
||||
|--------|-----------|-------------|
|
||||
| `AlignUDPToPPS` | `bool AlignUDPToPPS { get; set; }` | Gets or sets UDP to PPS alignment flag. |
|
||||
| `SupportsRemoveLeapSeconds` | `public override bool SupportsRemoveLeapSeconds { get; }` | Returns `true`. |
|
||||
| `SupportsADCSamplesPerPacket` | `public override bool SupportsADCSamplesPerPacket { get; }` | Returns `true`. |
|
||||
| `RequiresNon0QualificationSamples` | `protected override bool RequiresNon0QualificationSamples { get; }` | Returns `true`. |
|
||||
| `DASIndex` | `int DASIndex { get; set; }` | The order of this DAS among multiple DAS (default -1). |
|
||||
| `SetIsStreamingSupported` | `public override void SetIsStreamingSupported(bool supported)` | Always sets `IsStreamingSupported = true`. |
|
||||
| `InitMinProto` | `public override void InitMinProto()` | Initializes extensive protocol limitations dictionary for SLICE6 AIR BR. |
|
||||
| `MaxSampleRateHz` | `protected override uint MaxSampleRateHz { get; }` | Lazy-loaded max sample rate, queries device via `QuerySystemAttributeSLICE6`. Falls back to 50000 on error. |
|
||||
| `MakeConfigModuleFromInfoModule` | `protected override DASModule MakeConfigModuleFromInfoModule(InfoResult.Module infoModule)` | Creates DASModule with channels supporting FullBridge and HalfBridge types (no IEPE). |
|
||||
| `AsyncConfigure` | `protected override void AsyncConfigure(object configAsyncInfo)` | Complex configuration method handling UDP alignment, leap seconds, ADC samples per packet, channel configuration, bridge modes, coupling, and level triggers. |
|
||||
| `GetIsStreaming` | `public override bool GetIsStreaming()` | Returns true if `DASArmStatus.ReceivedInvalidModeDuringSetup` or `DASArmStatus.IsInRealtime`. |
|
||||
|
||||
---
|
||||
|
||||
### SLICE6AIRTC\<T\>
|
||||
**Namespace:** `DTS.DASLib.Service`
|
||||
**Base Class:** `SLICE6_Base<T>`
|
||||
**Implements:** `IAlignUDPToPPSAware`, `IDASReconfigure`, `ITCDiagnosticResults`, `IUARTDownloadActions`, `IUARTDownload`
|
||||
**Constraint:** `where T : IConnection, new()`
|
||||
|
||||
Thermocouple variant of SLICE6 AIR with UART download support.
|
||||
|
||||
| Member | Signature | Description |
|
||||
|--------|-----------|-------------|
|
||||
| `WhatUARTToDownload` | `IUARTDownloadRequest WhatUARTToDownload { get; set; }` | Gets or sets the UART download request. |
|
||||
| `SetWhatUARTToDownload` | `void SetWhatUARTToDownload(IUARTDownloadRequest request, bool bSetInDb = true)` | Sets what to download via `UARTDownloadRequest.SetWhatToDownload`. |
|
||||
| `BaudRate` | `uint BaudRate { get; private set; }` | UART baud rate setting. |
|
||||
| `DataBits` | `uint DataBits { get; private set; }` | UART data bits setting. |
|
||||
| `StopBits` | `StopBits StopBits { get; private set; }` | UART stop bits setting. |
|
||||
| `Parity` | `Parity Parity { get; private set; }` | UART parity setting. |
|
||||
| `FlowControl` | `Handshake FlowControl { get; private set; }` | UART flow control setting. |
|
||||
| `DataFormat` | `UartDataFormat DataFormat { get; private set; }` | UART data format setting. |
|
||||
| `TCDiagnosticResults` | `ITCDiagnosticResult[] TCDiagnosticResults { get; private set; }` | Array of 24 thermocouple diagnostic results. |
|
||||
| `ClearTCDiagnosticResults` | `void ClearTCDiagnosticResults()` | Clears diagnostic results to empty array. |
|
||||
| `SetTCDiagnosticResults` | `void SetTCDiagnosticResults(ITCDiagnosticResult[] results)` | Sets diagnostic results array. |
|
||||
| `IsSlice6AirTc` | `public override bool IsSlice6AirTc()` | Returns `true`. |
|
||||
| `GetMaxFileLengthTMATS` | `public override int GetMaxFileLengthTMATS()` | Returns `32000`. |
|
||||
| `UARTDownload` | `public void UARTDownload(ServiceCallback callback, object userData)` | Returns error "Not supported". |
|
||||
| `QueryUARTDownload` (explicit) | `void IUARTDownloadActions.QueryUARTDownload(ServiceCallback callback, object userData, int eventIndex, TDASServiceSetupInfo setupInfo)` | Queries UART download availability. |
|
||||
| `GetUARTSettings` (explicit) | `void IUARTDownloadActions.GetUARTSettings(ServiceCallback callback, object userData)` | Retrieves UART settings via `QuerySystemAttributeSLICE6AIR`. |
|
||||
| `SetUARTSettings` (explicit) | `void IUARTDownloadActions.SetUARTSettings(ServiceCallback callback, object userData, uint baudRate, uint dataBits, uint stopBits, uint parity, uint flowControl)` | Sets UART settings via `SetSystemAttributeSLICE6AIR`. |
|
||||
| `SetMaxModuleCount` (explicit) | `void IDASReconfigure.SetMaxModuleCount(int count)` | Sets the maximum module count. |
|
||||
| `GetMaxModuleCount` (explicit) | `int IDASReconfigure.GetMaxModuleCount()` | Gets the cached maximum module count. |
|
||||
| `GetStackChannelConfigTypes` | `public override int[] GetStackChannelConfigTypes()` | Queries arm attribute for stack channel config types. |
|
||||
| `InitMinProto` | `public override void InitMinProto()` | Initializes protocol limitations for SLICE6 AIR TC including UART settings commands. |
|
||||
| `GetRTChannelIndices` | `protected override byte[] GetRTChannelIndices(RealTimeAsyncPacket packet)` | Returns channel indices based on `_maxModuleCount`: 8 channels (0 modules), 16 channels (1 module), or 24 channels (2+ modules). |
|
||||
| `GetRealtimeSamplesClass` | `protected override IGetRealtimeSamples GetRealtimeSamplesClass(ICommunication iCommunication, bool bPolling = false)` | Returns `RealtimeStreamingNextSamples` with `SignedData = true` if streaming supported, otherwise falls back to base implementation. |
|
||||
|
||||
---
|
||||
|
||||
## 3. Invariants
|
||||
|
||||
- **S6DBConnectedDevice.Port** and **SpotOnPort**: Only positive values are valid; default is -1 (invalid state).
|
||||
- **S6DBConnectedDevice.DeviceType**: Defaults to `HardwareTypes.SLICE6_Base` but changes to `HardwareTypes.SLICE6_AIR` if SerialNumber starts with "S6A".
|
||||
- **SLICEPRODB**: Always returns `false` for `IsSlice6Distributor()` and `true` for `IsBattery()`.
|
||||
- **SLICEPRODB**: `QueryConnectedDevices()` always sets an empty connected devices array.
|
||||
- **SLICE6AIRBR/SLICE6AIRTC**: `SetIsStreamingSupported()` always sets `IsStreamingSupported = true` regardless of parameter.
|
||||
- **SLICE6AIRTC.TCDiagnosticResults**: Initialized with 24 elements (indexed 0-23).
|
||||
- **SLICE6AIRTC.GetRTChannelIndices**: Returns 8, 16, or 24 channel indices based on `_maxModuleCount` value.
|
||||
- **SLICE6DB3**: All clock sync and PTP methods are no-ops that immediately report success without performing actual operations.
|
||||
- **Protocol limitations**: Commands with `byte.MaxValue` protocol version are unsupported; commands with `MIN_PROTOCOL_VER` (1) are supported.
|
||||
|
||||
---
|
||||
|
||||
## 4. Dependencies
|
||||
|
||||
### External Dependencies (Imports):
|
||||
- `DTS.Common.Interface.Connection` - Connection interfaces (`IConnection`)
|
||||
- `DTS.Common.Interface.DASFactory` - DAS factory interfaces (`IDASCommunication`, `IDASConfigurationArg`, `ICommunication`, `IDASConnectedDevice`, `IDASReconfigure`, `ITCDiagnosticResult`, `IUARTDownload`, `IUARTDownloadActions`, `IUARTDownloadRequest`)
|
||||
- `DTS.Common.Interface.DASFactory.Config` - Configuration types (`DASModule`, `DASChannel`, `AnalogInputDASChannel`, `StreamOutputDASChannel`, `UARTInputDASChannel`)
|
||||
- `DTS.Common.Interface.Communication` - Communication interfaces
|
||||
- `DTS.Common.Enums.DASFactory` - Enums and constants (`DFConstantsAndEnums`, `ProtocolLimitedCommands`, `ModuleType`)
|
||||
- `DTS.Common.Enums.Hardware` - Hardware type enums (`HardwareTypes`)
|
||||
- `DTS.Common.Enums.Sensors` - Sensor enums (`SensorConstants.BridgeType`)
|
||||
- `DTS.Common.Constant.DASSpecific` - DAS-specific constants (`SLICE6AIRBR`, `SLICE6AIRTC`)
|
||||
- `DTS.Common.ICommunication` - Communication types (`InfoResult`, `RealTimeAsyncPacket`)
|
||||
- `DTS.Common.Utilities.Logging` - Logging (`APILogger`)
|
||||
- `DTS.Common.Utils` - Utility functions (`Utils.IsZero`, `Utils.AlmostEqual`)
|
||||
- `DTS.Common.Classes.DASFactory` - DAS factory classes
|
||||
- `DTS.Common.Enums` - General enums
|
||||
- `DTS.DASLib.Command.SLICE` - SLICE command classes (`QuerySystemAttributeSLICE6`, `SetSystemAttributeSLICE6AIR`, `QueryChannelShuntResults`, `RetrieveSampleAverage`, `QueryArmAttribute`)
|
||||
- `DTS.DASLib.Command.SLICE.RealtimeCommands` - Realtime command classes (`RealtimeStreamingNextSamples`)
|
||||
- `DTS.DASLib.Command` - Base command classes (`AbstractCommandBase`)
|
||||
- `DTS.DASLib.Service.Interfaces` - Service interfaces (`IDownloadActions`)
|
||||
- `System.Net.NetworkInformation` - `PhysicalAddress` class
|
||||
- `System.IO.Ports` - Serial port enums (`StopBits`, `Parity`, `Handshake`)
|
||||
- `System.Collections.Generic`
|
||||
|
||||
### Inferred Dependents:
|
||||
- Classes inherit from `SLICE6DB<T>` and `SLICE6_Base<T>` (not provided in source), suggesting a class hierarchy for SLICE device implementations.
|
||||
- `SliceServiceAsyncInfo`, `SliceConfigServiceAsyncInfo`, `QueryDownloadAsyncInfo`, `SetUARTSettingsAsyncInfo`, `SliceUARTDownloadState` are used but not defined in provided source.
|
||||
|
||||
---
|
||||
|
||||
## 5. Gotchas
|
||||
|
||||
1. **SLICE6DB3 PTP No-ops**: The `SetClockSyncConfig`, `GetClockSyncStatus`, `SetPTPDomainID`, and `GetPTPDomainID` methods in `SLICE6DB3` are no-ops that immediately call `Success()` without performing any actual device communication. Code expecting real PTP functionality will silently succeed without effect.
|
||||
|
||||
2. **SLICEPRODB IsBattery Ambiguity**: The `IsBattery()` method returns `true` with the comment "um maybe?", indicating uncertainty about the correctness of this implementation.
|
||||
|
||||
3. **SLICE6AIRBR SetIsStreamingSupported Ignores Parameter**: The `SetIsStreamingSupported(bool supported)` method ignores its parameter and always sets `IsStreamingSupported = true`.
|
||||
|
||||
4. **SLICE6AIRTC UARTDownload Not Supported**: The `UARTDownload` method immediately returns an error "Not supported" despite the class implementing `IUARTDownload`.
|
||||
|
||||
5. **SLICE6AIRTC GetIsStreaming Dual Condition**: The streaming status check uses `DASArmStatus.ReceivedInvalidModeDuringSetup || DASArmStatus.IsInRealtime` - the comment references bug 18852 indicating this is a workaround for unreliable status detection.
|
||||
|
||||
6. **SLICE6AIRTC Failure Threshold**: UART settings methods track `straightFailures` and only report errors after exceeding `PERMITTED_FAILURES` (constant not defined in provided source), otherwise silently succeeding on failure.
|
||||
|
||||
7. **SLICE6AIRBR MaxSampleRateHz Fallback**: On error querying max sample rate, returns hardcoded 50000 Hz with a log message, potentially masking device communication issues.
|
||||
|
||||
8. **S6DBConnectedDevice Default Values**: Port and SpotOnPort default to -1 (invalid), and string properties default to empty strings. Consumers must check validity before use.
|
||||
|
||||
9. **SLICE6AIRTC S6ATCConfigAttributes No-ops**: The nested `S6ATCConfigAttributes` class overrides `ConfigureCoupling`, `ConfigureBridge`, and `ConfigureBridgeResistance` as no-ops, which could cause confusion if bridge configuration is expected.
|
||||
208
docs/ai/DataPRO/IService/Classes/SLICEService.md
Normal file
208
docs/ai/DataPRO/IService/Classes/SLICEService.md
Normal file
@@ -0,0 +1,208 @@
|
||||
---
|
||||
source_files:
|
||||
- DataPRO/IService/Classes/SLICEService/SLICE Service.TriggerCheck.cs
|
||||
- DataPRO/IService/Classes/SLICEService/SLICE Service.cs
|
||||
- DataPRO/IService/Classes/SLICEService/SLICE Service.Public.cs
|
||||
generated_at: "2026-04-17T15:33:52.687420+00:00"
|
||||
model: "zai-org/GLM-5-FP8"
|
||||
schema_version: 1
|
||||
sha256: "8cfeb92a23080dfc"
|
||||
---
|
||||
|
||||
# SLICE Service Module Documentation
|
||||
|
||||
## 1. Purpose
|
||||
|
||||
The `Slice<T>` class is a generic partial class that serves as the primary service abstraction for DTS data acquisition system (DAS) hardware communication. It implements multiple interfaces (`IDASCommunication`, `IConfigurationActions`, `IDiagnosticsActions`, `ITriggerCheckActions`, `IRealTimeActions`, `IArmActions`, `IDownloadActions`) to provide a unified API for configuring, arming, monitoring, and downloading data from various SLICE hardware variants. The class is designed with a generic type parameter `T` constrained to `IConnection`, enabling support for different transport mechanisms (USB, Ethernet) while sharing common functionality.
|
||||
|
||||
---
|
||||
|
||||
## 2. Public Interface
|
||||
|
||||
### Trigger Check Actions (from `ITriggerCheckActions`)
|
||||
|
||||
| Method | Signature | Description |
|
||||
|--------|-----------|-------------|
|
||||
| `PreStartTriggerCheck` | `void ITriggerCheckActions.PreStartTriggerCheck(ServiceCallback callback, object userData)` | Asynchronously prepares hardware for trigger check by setting start record and trigger polarity attributes if supported. |
|
||||
| `PostStartTriggerCheck` | `void ITriggerCheckActions.PostStartTriggerCheck(ServiceCallback callback, object userData)` | Immediately reports success; no additional post-processing performed. |
|
||||
| `StartTriggerCheck` | `void ITriggerCheckActions.StartTriggerCheck(ServiceCallback callback, object userData)` | Asynchronously initializes hardware input lines and checks for shorted trigger/start inputs. Returns error "TriggerInputShorted" or "StartInputShorted" if detected. |
|
||||
| `DoStartCheck` | `void ITriggerCheckActions.DoStartCheck(ServiceCallback callback, object userData)` | Asynchronously checks start record input status and updates `ArmStatus.IsArmed` and `ArmStatus.IsRecording`. |
|
||||
| `DoTriggerCheck` | `void ITriggerCheckActions.DoTriggerCheck(ServiceCallback callback, object userData)` | Asynchronously executes trigger check; callback may be null. |
|
||||
| `DoTriggerCheckSync` | `void ITriggerCheckActions.DoTriggerCheckSync()` | Synchronously checks trigger/start input status and sets `ArmStatus` with `IsTriggered`, `IsArmed`, `IsTriggerShorted`, `IsStartShorted`. |
|
||||
| `CancelTriggerCheck` | `void ITriggerCheckActions.CancelTriggerCheck(ServiceCallback callback, object userData)` | Asynchronously cancels trigger check operation. |
|
||||
|
||||
### Protected/Virtual Methods (Trigger Check)
|
||||
|
||||
| Method | Signature | Description |
|
||||
|--------|-----------|-------------|
|
||||
| `AsyncPreStartTriggerCheck` | `protected virtual void AsyncPreStartTriggerCheck(object asyncInfo)` | Worker method that sets `StartRecordPolarity` and `TriggerPolarity` system attributes based on `InvertStart` and `InvertTrigger` properties. |
|
||||
| `AsyncStartTriggerCheck` | `protected virtual void AsyncStartTriggerCheck(object asyncInfo)` | Worker method that executes `InitializeHardwareLines` command and validates input states. |
|
||||
|
||||
### Core Service Methods (from main partial class)
|
||||
|
||||
| Method | Signature | Description |
|
||||
|--------|-----------|-------------|
|
||||
| `LaunchAsyncWorker` | `public void LaunchAsyncWorker(string Invoker, WaitCallback cb, object asyncInfo)` | Queues an async work item to the thread pool. Throws `NotConnectedException` if not connected, or `Exception` if queue fails. |
|
||||
| `GetRequestedRange` | `protected static double GetRequestedRange(AnalogInputDASChannel analog, double MvPerEU)` | Calculates requested range for analog channel, adjusting for nonlinear polynomial formulas. |
|
||||
| `SetRemoveSeconds` | `protected void SetRemoveSeconds()` | Sets leap second removal attribute if `ProtocolLimitedCommands.RemoveLeapSeconds` is supported. |
|
||||
| `GetExtendedFaultFlags` | `protected virtual QATSExtendedFault[] GetExtendedFaultFlags()` | Queries extended fault flags from arm attributes; returns array of active faults. |
|
||||
| `SetADCSamplesPerPacket` | `protected void SetADCSamplesPerPacket(int adcPerPacket)` | Configures ADC samples per packet via `S6A_IrigStreamBufferConfig` system attribute. |
|
||||
| `SurfaceApplicationError` | `protected static void SurfaceApplicationError(string msg)` | Surfaces error to application via `PageErrorEvent.SurfaceApplicationError`. |
|
||||
|
||||
### Public Properties (from SLICE Service.Public.cs)
|
||||
|
||||
| Property | Type | Description |
|
||||
|----------|------|-------------|
|
||||
| `ConfigData` | `IConfigurationData` | Public configuration data accessor. |
|
||||
| `ChannelDiagnostics` | `IDiagnosticActions[]` | Array of channel diagnostic actions. |
|
||||
| `ChannelDiagnosticsResults` | `IDiagnosticResult[]` | Array of channel diagnostic results. |
|
||||
| `ModuleDiagnosticsResults` | `IModuleDiagnosticsResult[]` | Module-level diagnostic results. |
|
||||
| `TriggerResult` | `ITriggerCheckResult` | Public trigger check result. |
|
||||
| `RealtimeDASChannels` | `List<int>` | List of real-time DAS channels. |
|
||||
| `TiltAxisData` | `List<double>` | Tilt axis data for real-time display. |
|
||||
| `DASFlashEraseStatus` | `FlashEraseStatus` | Flash erase operation status. |
|
||||
| `DASArmStatus` | `IArmStatusData` | Current arm status data. |
|
||||
| `AutoArmStatus` | `DFConstantsAndEnums.CommandStatus` | Auto-arm operation status (default: `StatusNoError`). |
|
||||
| `DASClockSyncStatus` | `IDictionary<InputClockSource, bool>` | Clock sync status per input source. |
|
||||
| `WhatToDownload` | `virtual IDownloadRequest` | Download request specification. |
|
||||
| `EventInfo` | `IDownloadReport` | Event download report. |
|
||||
| `EventDownloadedStatus` | `bool[]` | Per-event download status array. |
|
||||
| `EventGuids` | `Guid[]` | Event GUID array. |
|
||||
| `FaultFlags` | `ushort[]` | Event fault flags. |
|
||||
| `ArmAttempts` | `byte[]` | Event arm attempt counts. |
|
||||
| `InvertTrigger` | `bool` | Trigger polarity inversion flag. |
|
||||
| `InvertStart` | `bool` | Start record polarity inversion flag. |
|
||||
| `IgnoreShortedStart` | `bool` | Flag to ignore shorted start input. |
|
||||
| `IgnoreShortedTrigger` | `bool` | Flag to ignore shorted trigger input. |
|
||||
| `SerialNumber` | `string` | Device serial number (inherited). |
|
||||
| `MACAddress` | `string` | Device MAC address. |
|
||||
| `FirstUseDate` | `DateTime?` | First use date; null if not used since calibration. |
|
||||
| `IsFirstUseDateSupported` | `bool` | Whether hardware supports first use date. |
|
||||
| `IsStreamingSupported` | `bool` | Whether streaming feature is supported. |
|
||||
| `ExcitationStatus` | `ExcitationStatus` | Current excitation status (default: `Unknown`). |
|
||||
| `RecordId` | `int` | Record ID (default: `INVALID_IDASCOMMUNICATION_RECORD_ID`). |
|
||||
|
||||
### Hardware Identification Methods
|
||||
|
||||
| Method | Signature | Description |
|
||||
|--------|-----------|-------------|
|
||||
| `GetHardwareType` | `public virtual HardwareTypes GetHardwareType()` | Returns hardware type based on serial number prefix ("BA5"→Nano, "BA0"→Micro, "SG5"→SLICE1_G5Stack). |
|
||||
| `SupportsTriggerInversion` | `public virtual bool SupportsTriggerInversion()` | Returns `true` (overrideable). |
|
||||
| `SupportsStartInversion` | `public virtual bool SupportsStartInversion()` | Returns `true` (overrideable). |
|
||||
| `IsEthernetDistributor` | `public virtual bool IsEthernetDistributor()` | Returns `false`. |
|
||||
| `IsSlice6Distributor` | `public virtual bool IsSlice6Distributor()` | Returns `false`. |
|
||||
| `IsBattery` | `public virtual bool IsBattery()` | Returns `false`. |
|
||||
| `IsTSRAIR` | `public virtual bool IsTSRAIR()` | Returns `false`. |
|
||||
| `IsSlice6Air` | `public virtual bool IsSlice6Air()` | Returns `false`. |
|
||||
| `IsSlice6AirTc` | `public virtual bool IsSlice6AirTc()` | Returns `false`. |
|
||||
|
||||
### Arm Status Methods
|
||||
|
||||
| Method | Signature | Description |
|
||||
|--------|-----------|-------------|
|
||||
| `GetIsInArm` | `public bool GetIsInArm()` | Returns `DASArmStatus.IsArmed` or `false` if null. |
|
||||
| `GetIsInRealtime` | `public bool GetIsInRealtime()` | Returns `DASArmStatus.IsInRealtime` or `false` if null. |
|
||||
| `GetIsStreaming` | `public virtual bool GetIsStreaming()` | Returns `false`; overrideable for streaming-capable hardware. |
|
||||
| `SetInArm` | `public void SetInArm(bool WriteToDb)` | Sets `IsArmed = true` in arm status. |
|
||||
| `SetInRealtime` | `public void SetInRealtime(bool WriteToDb, bool ExitRealtimeIfPossible)` | Sets realtime mode; queries arm status first and may exit realtime mode. |
|
||||
| `SetDASArmStatus` | `public void SetDASArmStatus(IArmStatusData status, bool bSetInDb)` | Sets arm status with optional DB persistence. |
|
||||
| `SetDASArmStatus` | `public void SetDASArmStatus()` | Persists current `DASArmStatus` to DB; queries `MaxEventsPossible` for TSR AIR devices. |
|
||||
|
||||
### Nested Classes
|
||||
|
||||
| Class | Purpose |
|
||||
|-------|---------|
|
||||
| `SliceServiceAsyncInfo` | Base async info container with `callback`, `userData`, `functionData`, `PreOrPost`, `MaxTimeout`. Methods: `Error()`, `Progress()`, `NewData()`, `Success()`, `Cancel()`. |
|
||||
| `SliceServiceQueryConfigAsyncInfo` | Extends `SliceServiceAsyncInfo` with `CRC`, `ConfigString`, `ReadIds`, `DeviceScaleFactors`, `DifferentModuleCountsAreOK`. |
|
||||
| `SliceServiceQueryTestSetupAsyncInfo` | Extends `SliceServiceAsyncInfo` with `TestSetupGuid`. |
|
||||
| `SliceServiceSetTestSetupAsyncInfo` | Extends `SliceServiceAsyncInfo` with `TestSetupXML`. |
|
||||
| `AutoDetectServiceAsyncInfo` | Extends `SliceServiceAsyncInfo` with `QueryConfiguration` flag. |
|
||||
| `GainCodesSLICE6IEPE` | Enum with 16 gain codes (G1-G16) with attributes for input ranges. |
|
||||
|
||||
### Hardware Subclasses
|
||||
|
||||
| Class | Connection Type | Hardware Type |
|
||||
|-------|-----------------|---------------|
|
||||
| `WinUSBSlice` | WINUSB | SLICE_Base |
|
||||
| `CDCUSBSlice` | WINUSB | SLICE2 |
|
||||
| `WinUSBSlice1_5` | WINUSB | SLICE1_5 |
|
||||
| `WinUSBSlice6` | WINUSB | SLICE6 |
|
||||
| `WinUSBSlice6Air` | WINUSB | SLICE6_AIR |
|
||||
| `WinUSBSlice6AirBridge` | WINUSB | SLICE6_AIR_BR |
|
||||
| `WinUSBTsrAir` | WINUSB | DIR/DKR (based on hardware revision) |
|
||||
| `WinUSBSlice6AirThermocoupler` | WINUSB | SLICE6_AIR_TC |
|
||||
| `EthernetSlice` | Ethernet | SLICE_Base |
|
||||
| `EthernetSlice2` | Ethernet | SLICE2 |
|
||||
| `EthernetSlice6` | Ethernet | SLICE6_Base |
|
||||
| `EthernetSlice6Air` | Ethernet | S6A_EthernetRecorder or SLICE6_AIR |
|
||||
| `EthernetSlice6AirBridge` | Ethernet | SLICE6_AIR_BR |
|
||||
| `EthernetSlice6DB` | Ethernet | SLICE6DB or SLICE6DB_InDummy |
|
||||
| `EthernetPowerPro` | Ethernet | PowerPro |
|
||||
| `EthernetTsrAir` | Ethernet | TSR_AIR or TSR_AIR_RevB |
|
||||
| `EthernetSlice6DB3` | Ethernet | SLICE6DB3 |
|
||||
| `EthernetSlicePRODB` | Ethernet | SLICE_Pro_Distributor |
|
||||
| `EthernetSlice1_5` | Ethernet | SLICE1_5 |
|
||||
| `EthernetSliceDB` | Ethernet | SliceDB |
|
||||
| `EthernetSlice6AirThermocoupler` | Ethernet | SLICE6_AIR_TC |
|
||||
|
||||
---
|
||||
|
||||
## 3. Invariants
|
||||
|
||||
1. **Connection Requirement**: `LaunchAsyncWorker` requires `Connected == true`; otherwise throws `NotConnectedException`.
|
||||
2. **Type Constraint**: Generic type `T` must implement `IConnection` and have a parameterless constructor (`new()`).
|
||||
3. **Async Info Type Safety**: Methods like `AsyncPreStartTriggerCheck`, `AsyncStartTriggerCheck`, `AsyncDoTriggerCheck`, `AsyncDoStartCheck`, and `AsyncCancelTriggerCheck` perform type checking with `is SliceServiceAsyncInfo` and return early if type mismatch.
|
||||
4. **Command Support Checks**: Hardware-specific commands (e.g., `InitHardwareInputLines`, `RemoveLeapSeconds`, `ADCSamplesPerPacket`, `ExtendedFaultIds`) are only executed if `IsCommandSupported` returns `true`.
|
||||
5. **Equality Based on SerialNumber**: Two `Slice<T>` instances are equal if and only if their `SerialNumber` properties are equal (case-sensitive).
|
||||
6. **Arm Status Null Safety**: Methods like `GetIsInArm()` and `GetIsInRealtime()` return `false` if `DASArmStatus` is null rather than throwing.
|
||||
7. **MaxEventsPossible Query**: For TSR AIR devices, `MaxEventsPossible` is set to 0 before querying to trigger calculation per firmware requirements.
|
||||
|
||||
---
|
||||
|
||||
## 4. Dependencies
|
||||
|
||||
### Direct Dependencies (Imports)
|
||||
|
||||
| Namespace | Purpose |
|
||||
|-----------|---------|
|
||||
| `DTS.DASLib.Command.SLICE` | SLICE command classes (`InitializeHardwareLines`, `SetSystemAttribute`, `QueryArmAttribute`, `QueryEventAttribute`, `QuerySystemAttribute`, `SetSystemAttributeSLICE6AIR`, `QueryArmAndTriggerStatus`, `EndRealtimeMode`) |
|
||||
| `DTS.Common.ICommunication` | Communication interfaces (`ServiceCallback`, `ServiceCallbackData`) |
|
||||
| `DTS.Common.Utilities.Logging` | Logging via `APILogger` |
|
||||
| `DTS.Common.Interface.Connection` | Connection interfaces (`IConnection`, `EthernetConnection`, `WINUSBConnection`) |
|
||||
| `DTS.Common.Classes.Connection` | Connection implementations |
|
||||
| `DTS.Common.Enums.DASFactory` | Enums (`DFConstantsAndEnums`, `ProtocolLimitedCommands`, `AttributeTypes`, `QATSExtendedFault`) |
|
||||
| `DTS.Common.Interface.DASFactory` | DAS factory interfaces (`IDASCommunication`, `IConfigurationActions`, `IDiagnosticsActions`, `ITriggerCheckActions`, `IRealTimeActions`, `IArmActions`, `IDownloadActions`) |
|
||||
| `DTS.Common.Enums` | General enums (`ExcitationStatus`, `InputClockSource`, `ClockSyncProfile`) |
|
||||
| `DTS.Common.Enums.Sensors` | Sensor enums (`NonLinearStyles`) |
|
||||
| `DTS.Common.Enums.Hardware` | Hardware enums (`HardwareTypes`) |
|
||||
| `DTS.Common.Events` | Event classes (`PageErrorEvent`) |
|
||||
| `DTS.Common.DASResource` | DAS resource classes (`AnalogInputDASChannel`) |
|
||||
| `DTS.Common.Interface.DASFactory.Diagnostics` | Diagnostic interfaces |
|
||||
| `DTS.Common.Interface.DASFactory.ARM` | ARM interfaces (`IArmStatusData`, `IArmCheckActions`, `IArmCheckResults`, `IOptimizationValues`) |
|
||||
| `DTS.Common.Interface.DASFactory.Download` | Download interfaces (`IDownloadRequest`, `IDownloadReport`) |
|
||||
| `DTS.Common.Interface.DASFactory.Config` | Configuration interfaces (`IConfigurationData`) |
|
||||
| `DTS.DASLib.Service.Classes.Diagnostics` | Diagnostic implementation classes |
|
||||
| `DTS.DASLib.Command.SLICE.RealtimeCommands` | Real-time command classes |
|
||||
|
||||
### Depended On By
|
||||
*Not determinable from source alone* - The module exposes interfaces that other components would consume, but no direct consumers are shown in these files.
|
||||
|
||||
---
|
||||
|
||||
## 5. Gotchas
|
||||
|
||||
1. **Silent Failures in AsyncPreStartTriggerCheck**: The `AsyncPreStartTriggerCheck` method catches all exceptions and only logs them via `APILogger.Log`, then calls `info.Success()`. This means polarity configuration failures are not surfaced to the caller.
|
||||
|
||||
2. **Null Callback Handling**: `DoTriggerCheck` accepts a null `callback` parameter and creates `SliceServiceAsyncInfo` as null in that case. The `AsyncDoTriggerCheck` method uses null-conditional operators (`info?.Success()`) to handle this.
|
||||
|
||||
3. **Hardware Revision Query Side Effect**: `WinUSBTsrAir.GetHardwareType()` and `EthernetTsrAir.GetHardwareType()` call `QueryHardwareRevision()` if `_hardwareRevision` equals `UNKNOWN_REVISION`, which may cause I/O during what appears to be a simple property getter.
|
||||
|
||||
4. **KeepAliveReset Requirement**: Several Ethernet subclasses (`EthernetSlice6`, `EthernetSlice6Air`, `EthernetSlice6AirBridge`, `EthernetTsrAir`, `EthernetSlice6AirThermocoupler`) set `RequiresKeepAliveReset = true` on the transport, indicating these devices require special connection handling.
|
||||
|
||||
5. **TSR AIR Protocol Removal**: `WinUSBTsrAir` constructor removes `PTPSyncStatus` and `PTPTimestamp` from `TSRAIR_MinimumProtocols`, indicating USB-connected TSR AIR devices do not support network time sync.
|
||||
|
||||
6. **Multiple Sample Realtime Flag**: Different subclasses set `_bSupportsMultipleSampleRealtime` differently (WinUSBSlice/EthernetSlice = true, most others = false), affecting real-time data handling behavior.
|
||||
|
||||
7. **SetInRealtime Queries Hardware**: `SetInRealtime` executes `QueryArmAndTriggerStatus` synchronously before setting status, which may have performance implications.
|
||||
|
||||
8. **MaxEventsPossible Calculation Requirement**: For TSR AIR devices, the firmware requires setting `MaxEventsPossible` to 0 before querying to trigger internal calculation (per comment referencing case 26817).
|
||||
102
docs/ai/DataPRO/IService/Classes/TDAS Service.md
Normal file
102
docs/ai/DataPRO/IService/Classes/TDAS Service.md
Normal file
@@ -0,0 +1,102 @@
|
||||
---
|
||||
source_files:
|
||||
- DataPRO/IService/Classes/TDAS Service/TDAS Service.cs
|
||||
- DataPRO/IService/Classes/TDAS Service/Public.cs
|
||||
- DataPRO/IService/Classes/TDAS Service/TriggerCheck.cs
|
||||
generated_at: "2026-04-17T15:33:04.937990+00:00"
|
||||
model: "zai-org/GLM-5-FP8"
|
||||
schema_version: 1
|
||||
sha256: "cace7bc59e68c7cc"
|
||||
---
|
||||
|
||||
# TDAS Service Documentation
|
||||
|
||||
## 1. Purpose
|
||||
|
||||
The `TDAS<T>` class is a generic data acquisition system (DAS) service implementation that provides communication, configuration, diagnostics, trigger checking, real-time operations, arming, and download functionality for TDAS hardware devices. It serves as an abstraction layer between the application and physical TDAS hardware, supporting both Ethernet and Serial connections through its generic type parameter. The class implements multiple action interfaces to provide a unified API for interacting with various TDAS hardware types (G5, TDAS Pro Rack, SIM, TOM, LabRack) identified by their serial number prefixes.
|
||||
|
||||
## 2. Public Interface
|
||||
|
||||
### Class Declaration
|
||||
```csharp
|
||||
public partial class TDAS<T> : Communication<T>,
|
||||
IDASCommunication,
|
||||
IConfigurationActions,
|
||||
IDiagnosticsActions,
|
||||
ITriggerCheckActions,
|
||||
IRealTimeActions,
|
||||
IArmActions,
|
||||
IDownloadActions where T : IConnection, new()
|
||||
```
|
||||
|
||||
### Hardware Identification Methods
|
||||
|
||||
| Method | Signature | Behavior |
|
||||
|--------|-----------|----------|
|
||||
| `GetHardwareType()` | `public HardwareTypes GetHardwareType()` | Returns hardware type based on `SerialNumber` prefix: "5M" → G5 variants, "DR" → TDAS_Pro_Rack, "SM" → SIM, "TOM" → TOM, "LR" → TDAS_LabRack. Defaults to `TDAS_Pro_Rack` for unrecognized prefixes. |
|
||||
| `IsEthernetDistributor()` | `public bool IsEthernetDistributor()` | Always returns `false`. |
|
||||
| `IsSlice6Distributor()` | `public bool IsSlice6Distributor()` | Always returns `false`. |
|
||||
| `IsBattery()` | `public bool IsBattery()` | Always returns `false`. |
|
||||
| `IsTSRAIR()` | `public bool IsTSRAIR()` | Always returns `false`. |
|
||||
| `IsSlice6Air()` | `public bool IsSlice6Air()` | Always returns `false`. |
|
||||
| `IsSlice6AirTc()` | `public bool IsSlice6AirTc()` | Always returns `false`. |
|
||||
| `IsScheduleEventCountSupported()` | `public bool IsScheduleEventCountSupported()` | Always returns `false`. |
|
||||
|
||||
### Configuration Properties & Methods
|
||||
|
||||
| Member | Signature | Behavior |
|
||||
|--------|-----------|----------|
|
||||
| `ConfigData` | `public IConfigurationData ConfigData { get; set; }` | Holds configuration data for the DAS. |
|
||||
| `NumberOfConfiguredChannels()` | `public int NumberOfConfiguredChannels()` | Returns `ConfigData.NumberOfConfiguredChannels()` or 0 if `ConfigData` is null. |
|
||||
| `NumberOfChannels()` | `public int NumberOfChannels()` | Returns `ConfigData.NumberOfChannels()` or 0 if `ConfigData` is null. |
|
||||
| `ConfigureHasBeenRun` | `public bool ConfigureHasBeenRun { get; set; }` | Tracks whether configuration has been executed. |
|
||||
|
||||
### Diagnostics Properties & Methods
|
||||
|
||||
| Member | Signature | Behavior |
|
||||
|--------|-----------|----------|
|
||||
| `ChannelDiagnostics` | `public IDiagnosticActions[] ChannelDiagnostics { get; set; }` | Array of channel diagnostic actions. |
|
||||
| `ChannelDiagnosticsResults` | `public IDiagnosticResult[] ChannelDiagnosticsResults { get; set; }` | Array of channel diagnostic results. |
|
||||
| `SetChannelDiagnosticActions()` | `public void SetChannelDiagnosticActions(IDiagnosticActions[] actions, bool setInDb = true)` | Delegates to `DiagnosticsActions.SetChannelDiagnosticActions()`. |
|
||||
| `ClearChannelDiagnosticsResults()` | `public void ClearChannelDiagnosticsResults(bool bClearDb = true)` | Delegates to `DiagnosticsResultActions.ClearChannelDiagnosticsResults()`. |
|
||||
| `SetChannelDiagnosticsResults()` | `public void SetChannelDiagnosticsResults(IDiagnosticResult[] results, bool setInDb)` | Delegates to `DiagnosticsResultActions.SetChannelDiagnosticsResults()`. |
|
||||
| `DiagnosticsHasBeenRun` | `public bool DiagnosticsHasBeenRun { get; set; }` | Tracks whether diagnostics have been executed. |
|
||||
|
||||
### Arm Status Properties & Methods
|
||||
|
||||
| Member | Signature | Behavior |
|
||||
|--------|-----------|----------|
|
||||
| `DASArmStatus` | `public IArmStatusData DASArmStatus { get; set; }` | Current arm status of the DAS. |
|
||||
| `AutoArmStatus` | `public DFConstantsAndEnums.CommandStatus AutoArmStatus { get; set; }` | Status of auto-arm operation. |
|
||||
| `GetIsInArm()` | `public bool GetIsInArm()` | Returns `DASArmStatus.IsArmed` or `false` if `DASArmStatus` is null. |
|
||||
| `GetIsInRealtime()` | `public bool GetIsInRealtime()` | Returns `DASArmStatus.IsInRealtime` or `false` if `DASArmStatus` is null. |
|
||||
| `GetIsStreaming()` | `public bool GetIsStreaming()` | Always returns `false`. |
|
||||
| `SetInArm()` | `public void SetInArm(bool WriteToDb)` | Sets `DASArmStatus.IsArmed = true`. |
|
||||
| `SetInRealtime()` | `public void SetInRealtime(bool WriteToDb, bool ExitRealtimeIfPossible)` | Sets `DASArmStatus.IsInRealtime = true`. |
|
||||
| `SetDASArmStatus()` | `public void SetDASArmStatus()` | Overload that persists current `DASArmStatus` to database. |
|
||||
| `SetDASArmStatus()` | `public void SetDASArmStatus(IArmStatusData status, bool bSetInDb)` | Delegates to `ArmStatus.SetArmStatus()`. |
|
||||
|
||||
### Trigger Check Methods (ITriggerCheckActions)
|
||||
|
||||
| Method | Signature | Behavior |
|
||||
|--------|-----------|----------|
|
||||
| `PreStartTriggerCheck()` | `void ITriggerCheckActions.PreStartTriggerCheck(ServiceCallback callback, object userData)` | Immediately invokes success callback. No hardware interaction. |
|
||||
| `PostStartTriggerCheck()` | `void ITriggerCheckActions.PostStartTriggerCheck(ServiceCallback callback, object userData)` | Immediately invokes success callback. No hardware interaction. |
|
||||
| `StartTriggerCheck()` | `void ITriggerCheckActions.StartTriggerCheck(ServiceCallback callback, object userData)` | Asynchronously arms the device using `TestTrigger` or `TestTriggerBroadcast` commands depending on G5 mode. |
|
||||
| `DoTriggerCheck()` | `void ITriggerCheckActions.DoTriggerCheck(ServiceCallback callback, object userData)` | Asynchronously checks trigger status using `TestAll` command with `PREV` mode. |
|
||||
| `DoStartCheck()` | `void ITriggerCheckActions.DoStartCheck(ServiceCallback callback, object userData)` | Asynchronously checks if recording has started using `TestAll` command. |
|
||||
| `DoTriggerCheckSync()` | `void ITriggerCheckActions.DoTriggerCheckSync()` | Throws `NotImplementedException`. |
|
||||
| `CancelTriggerCheck()` | `void ITriggerCheckActions.CancelTriggerCheck(ServiceCallback callback, object userData)` | Asynchronously cancels trigger check by sending `TestTrigger.SubCommandValues.OFF` to modules. |
|
||||
|
||||
### Download Properties & Methods
|
||||
|
||||
| Member | Signature | Behavior |
|
||||
|--------|-----------|----------|
|
||||
| `WhatToDownload` | `public IDownloadRequest WhatToDownload { get; set; }` | Download request configuration. |
|
||||
| `EventInfo` | `public IDownloadReport EventInfo { get; set; }` | Event information for download. |
|
||||
| `EventDownloadedStatus` | `public bool[] EventDownloadedStatus { get; set; }` | Array tracking download status per event. |
|
||||
| `EventGuids` | `public Guid[] EventGuids { get; set; }` | GUIDs for events. |
|
||||
| `FaultFlags` | `public ushort[] FaultFlags { get; set; }` | Fault flags for events. |
|
||||
| `ArmAttempts` | `public byte[] ArmAttempts { get; set; }` | Arm attempt counts. |
|
||||
| `SetWhatToDownload()` | `public void SetWhatToDownload(IDownloadRequest request, bool bSetInDb = true)` | Delegates to `DownloadRequest.SetWhatToDownload()`. |
|
||||
| `SetEventInfo()` | `public void SetEventInfo(IDownloadReport eventInfo, bool bSetInDb = true)` | Delegates to `DownloadReport.Set
|
||||
152
docs/ai/DataPRO/IService/Classes/TDAS.md
Normal file
152
docs/ai/DataPRO/IService/Classes/TDAS.md
Normal file
@@ -0,0 +1,152 @@
|
||||
---
|
||||
source_files:
|
||||
- DataPRO/IService/Classes/TDAS/TDASServiceSetupInfo.cs
|
||||
- DataPRO/IService/Classes/TDAS/TDASServiceSetupInfoLookup.cs
|
||||
- DataPRO/IService/Classes/TDAS/TDASConfig.cs
|
||||
- DataPRO/IService/Classes/TDAS/TDASModuleConfig.cs
|
||||
generated_at: "2026-04-17T15:38:46.566937+00:00"
|
||||
model: "zai-org/GLM-5-FP8"
|
||||
schema_version: 1
|
||||
sha256: "48c05185bea83ad8"
|
||||
---
|
||||
|
||||
# TDAS Configuration Module Documentation
|
||||
|
||||
## 1. Purpose
|
||||
|
||||
This module provides configuration management for TDAS (Test Data Acquisition System) hardware modules within the DataPRO system. It defines data structures for service setup information (`TDASServiceSetupInfo`, `TDASServiceSetupInfoLookup`) and implements XML-serializable configuration persistence for TDAS modules and their associated channels (`TDASConfig`, `TDASModuleConfig`). The module supports per-module configuration storage, channel management across multiple channel types, and recording mode settings for data acquisition operations.
|
||||
|
||||
---
|
||||
|
||||
## 2. Public Interface
|
||||
|
||||
### TDASServiceSetupInfo
|
||||
**Namespace:** `DTS.DASLib.Service`
|
||||
|
||||
A POCO class representing static service setup parameters.
|
||||
|
||||
```csharp
|
||||
public TDASServiceSetupInfo(
|
||||
string setupDescription,
|
||||
double? samplesPerSecond,
|
||||
float hardwareFilterRateHz,
|
||||
DFConstantsAndEnums.RecordingMode recordingMode,
|
||||
bool? checkoutMode)
|
||||
```
|
||||
|
||||
| Property | Type | Description |
|
||||
|----------|------|-------------|
|
||||
| `SetupDescription` | `string` | Description of the setup configuration |
|
||||
| `SamplesPerSecond` | `double?` | Nullable sample rate |
|
||||
| `HardwareFilterRateHz` | `float` | Anti-aliasing filter rate in Hertz |
|
||||
| `RecordingMode` | `DFConstantsAndEnums.RecordingMode` | Recording mode enum value |
|
||||
| `CheckoutMode` | `bool?` | Nullable checkout mode flag |
|
||||
|
||||
---
|
||||
|
||||
### TDASServiceSetupInfoLookup
|
||||
**Namespace:** `DTS.DASLib.Service`
|
||||
|
||||
A variant of `TDASServiceSetupInfo` where sample rates and filter rates are stored as dictionaries keyed by DAS identifier, allowing per-device configuration.
|
||||
|
||||
```csharp
|
||||
public TDASServiceSetupInfoLookup(
|
||||
string setupDescription,
|
||||
Dictionary<string, double> sampleRateLookup,
|
||||
Dictionary<string, float> aafLookup,
|
||||
DFConstantsAndEnums.RecordingMode recordingMode,
|
||||
bool? checkoutMode)
|
||||
```
|
||||
|
||||
| Property | Type | Description |
|
||||
|----------|------|-------------|
|
||||
| `SetupDescription` | `string` | Description of the setup configuration |
|
||||
| `SamplesPerSecondLookup` | `Dictionary<string, double>` | Sample rates per DAS identifier |
|
||||
| `HardwareFilterRateHzLookup` | `Dictionary<string, float>` | Filter rates per DAS identifier |
|
||||
| `RecordingMode` | `DFConstantsAndEnums.RecordingMode` | Recording mode enum value |
|
||||
| `CheckoutMode` | `bool?` | Nullable checkout mode flag |
|
||||
|
||||
---
|
||||
|
||||
### TDASConfig
|
||||
**Namespace:** `DTS.DASLib.Service`
|
||||
|
||||
Implements `IXmlSerializable` for XML-based persistence of TDAS module configurations. Manages a collection of `TDASModuleConfig` objects keyed by serial number.
|
||||
|
||||
```csharp
|
||||
public TDASConfig()
|
||||
```
|
||||
Default constructor.
|
||||
|
||||
```csharp
|
||||
public TDASConfig(string fileName, bool deleteIfPresent)
|
||||
```
|
||||
Constructs an instance and optionally loads from or deletes an existing config file. Files are stored in a `DASConfigs` subdirectory relative to the executing assembly location.
|
||||
|
||||
| Parameter | Description |
|
||||
|-----------|-------------|
|
||||
| `fileName` | Name of the configuration file |
|
||||
| `deleteIfPresent` | If `true`, deletes existing file; if `false`, reads existing file |
|
||||
|
||||
```csharp
|
||||
public void SetModule(TDASModuleConfig module)
|
||||
```
|
||||
Adds or updates a module configuration in the internal dictionary keyed by `module.SerialNumber`.
|
||||
|
||||
```csharp
|
||||
public TDASModuleConfig GetModule(TDASModuleConfig module)
|
||||
```
|
||||
Retrieves an existing module by serial number, or adds the provided module if not present.
|
||||
|
||||
```csharp
|
||||
public Dictionary<string, TDASModuleConfig> Modules { get; }
|
||||
```
|
||||
Read-only access to the module dictionary.
|
||||
|
||||
```csharp
|
||||
public string FileName { get; }
|
||||
```
|
||||
Full path to the configuration file.
|
||||
|
||||
**IXmlSerializable Members:**
|
||||
- `XmlSchema GetSchema()` — Returns `null`.
|
||||
- `void ReadXml(XmlReader reader)` — Deserializes from XML with root element `TDASConfig`.
|
||||
- `void WriteXml(XmlWriter writer)` — Serializes to XML.
|
||||
|
||||
---
|
||||
|
||||
### TDASModuleConfig
|
||||
**Namespace:** `DTS.DASLib.Service`
|
||||
|
||||
Implements `IXmlSerializable` for individual TDAS module configuration, including channel definitions.
|
||||
|
||||
```csharp
|
||||
public TDASModuleConfig()
|
||||
```
|
||||
Default constructor.
|
||||
|
||||
```csharp
|
||||
public TDASModuleConfig(string fileName)
|
||||
```
|
||||
Constructs an instance and loads configuration from the specified file in the `DASConfigs` subdirectory.
|
||||
|
||||
| Property | Type | Default | Description |
|
||||
|----------|------|---------|-------------|
|
||||
| `SerialNumber` | `string` | `""` | Module serial number (dictionary key) |
|
||||
| `TestId` | `string` | `""` | Test identifier |
|
||||
| `TestDescription` | `string` | `""` | Test description |
|
||||
| `RecordingMode` | `DFConstantsAndEnums.RecordingMode` | `InvalidArmMode` | Recording mode |
|
||||
| `AAFilterRateHz` | `float` | `0` | Anti-aliasing filter rate |
|
||||
| `PreTriggerSeconds` | `double` | `0` | Pre-trigger duration |
|
||||
| `PostTriggerSeconds` | `double` | `0` | Post-trigger duration |
|
||||
| `FirmwareVersion` | `string` | `""` | Firmware version string |
|
||||
| `MaxEventStorageSpaceInBytes` | `UInt64?` | `0` | Maximum event storage |
|
||||
| `ModuleArrayIndex` | `int` | `0` | Module array index |
|
||||
| `FileName` | `string` | — | Full path to config file (read-only) |
|
||||
|
||||
```csharp
|
||||
public void SetChannel(OutputTOMDigitalChannel channel)
|
||||
public void SetChannel(OutputSquibChannel channel)
|
||||
public void SetChannel(AnalogInputDASChannel channel)
|
||||
```
|
||||
Adds or updates a channel in the internal dictionary keyed by `channel.Module
|
||||
242
docs/ai/DataPRO/IService/Interfaces.md
Normal file
242
docs/ai/DataPRO/IService/Interfaces.md
Normal file
@@ -0,0 +1,242 @@
|
||||
---
|
||||
source_files:
|
||||
- DataPRO/IService/Interfaces/IAutoArmStatus.cs
|
||||
- DataPRO/IService/Interfaces/ITimeActions.cs
|
||||
- DataPRO/IService/Interfaces/IService.cs
|
||||
- DataPRO/IService/Interfaces/IRealtime.cs
|
||||
- DataPRO/IService/Interfaces/IDiagnos.cs
|
||||
- DataPRO/IService/Interfaces/IDASCommunicationComparer.cs
|
||||
- DataPRO/IService/Interfaces/IDASCommunicationEqComparer.cs
|
||||
- DataPRO/IService/Interfaces/IUARTDownloadActions.cs
|
||||
- DataPRO/IService/Interfaces/ITriggerCheckActions.cs
|
||||
- DataPRO/IService/Interfaces/IRealTimeActions.cs
|
||||
- DataPRO/IService/Interfaces/IDownloadActions.cs
|
||||
- DataPRO/IService/Interfaces/IClockSyncActions.cs
|
||||
- DataPRO/IService/Interfaces/IDiagnosticsActions.cs
|
||||
- DataPRO/IService/Interfaces/IConfigurationActions.cs
|
||||
- DataPRO/IService/Interfaces/IArmActions.cs
|
||||
- DataPRO/IService/Interfaces/IDASCommunication.cs
|
||||
generated_at: "2026-04-17T15:29:43.501644+00:00"
|
||||
model: "zai-org/GLM-5-FP8"
|
||||
schema_version: 1
|
||||
sha256: "ddda8c0520405fd5"
|
||||
---
|
||||
|
||||
# DTS.DASLib.Service Interfaces Documentation
|
||||
|
||||
## 1. Purpose
|
||||
|
||||
This module defines the core service interfaces for communicating with Data Acquisition System (DAS) hardware units. It provides abstractions for configuration, diagnostics, arming/disarming, real-time data streaming, download operations, trigger checking, clock synchronization, and time actions. The primary interface `IDASCommunication` serves as the central contract representing a physical DAS unit, aggregating multiple capability interfaces. These interfaces enable a service-oriented architecture where operations are performed asynchronously via callbacks.
|
||||
|
||||
---
|
||||
|
||||
## 2. Public Interface
|
||||
|
||||
### Delegates
|
||||
|
||||
#### `ServiceCallback`
|
||||
**Signature:** `delegate void ServiceCallback(ServiceCallbackData data)`
|
||||
- **Description:** The delegate type used for asynchronous service callbacks. All service methods accept this callback to return results.
|
||||
|
||||
---
|
||||
|
||||
### Interfaces
|
||||
|
||||
#### `IDASCommunication`
|
||||
**Namespace:** `DTS.DASLib.Service`
|
||||
|
||||
The primary interface representing a DAS hardware unit. Inherits from: `IConfiguration`, `IDiagnos`, `ITriggerCheck`, `IRealTime`, `IArmStatus`, `IDownload`, `IInformation`, `IComparable<IDASCommunication>`, `IDisposable`, `IAutoArmStatus`, `IAutoArmed`, `IRangeBandwidthLimited`, `ITimeSynchronization`.
|
||||
|
||||
**Properties:**
|
||||
| Property | Type | Description |
|
||||
|----------|------|-------------|
|
||||
| `RecordId` | `int` | Record identifier. |
|
||||
| `SerialNumber` | `string` | Serial number of the base unit. |
|
||||
| `FirmwareVersion` | `string` | Currently installed firmware version. |
|
||||
| `InputLowVoltage`, `InputMediumVoltage`, `InputHighVoltage` | `float` | Input voltage thresholds. |
|
||||
| `BatteryLowVoltage`, `BatteryMediumVoltage`, `BatteryHighVoltage` | `float` | Battery voltage thresholds. |
|
||||
| `MinimumValidInputVoltage`, `MaximumValidInputVoltage` | `double` | Valid input voltage range. |
|
||||
| `MinimumValidBatteryVoltage`, `MaximumValidBatteryVoltage` | `double` | Valid battery voltage range. |
|
||||
| `DiagnosticsHasBeenRun` | `bool` | Indicates if diagnostics have been run; also signals if arm attributes should be defaulted. |
|
||||
| `ConfigureHasBeenRun` | `bool` | Indicates if configuration has been applied. |
|
||||
| `MaxModules` | `int` | Maximum number of modules supported. |
|
||||
| `InvertTrigger` | `bool` | Sets trigger inversion (write-only). |
|
||||
| `InvertStart` | `bool` | Gets/sets start line inversion. |
|
||||
| `IgnoreShortedStart`, `IgnoreShortedTrigger` | `bool` | Flags for ignoring shorted lines. |
|
||||
| `MACAddress` | `string` | Device MAC address. |
|
||||
| `DownstreamMACAddresses` | `string[]` | MAC addresses of downstream devices. |
|
||||
| `SupportsIndividualChannelRealtimeStreaming` | `bool` | Indicates support for selectable channel realtime streaming. |
|
||||
| `AutoArmUDPSetting` | `string` | UDP settings for auto arm status broadcast. |
|
||||
|
||||
**Methods:**
|
||||
| Method | Return Type | Description |
|
||||
|--------|-------------|-------------|
|
||||
| `GetNominalRanges(SensorConstants.BridgeType bridge)` | `double[]` | Returns nominal ranges for given bridge type. |
|
||||
| `NumberOfConfiguredChannels()` | `int` | Count of configured channels. |
|
||||
| `NumberOfChannels()` | `int` | Total channel count. |
|
||||
| `MaxMemory()` | `long` | Maximum memory capacity. |
|
||||
| `MinSampleRate()` | `uint` | Minimum sample rate. |
|
||||
| `MaxSampleRate()` | `uint` | Maximum sample rate. |
|
||||
| `SupportsAutoArm()` | `bool` | Auto-arm capability check. |
|
||||
| `SupportsLevelTrigger()` | `bool` | Level trigger capability check. |
|
||||
| `SupportsRealtime()` | `bool` | Realtime streaming capability check. |
|
||||
| `SupportsMultipleEvents()` | `bool` | Multiple event support check. |
|
||||
| `SupportsTriggerInversion()` | `bool` | Trigger inversion capability check. |
|
||||
| `SupportsStartInversion()` | `bool` | Start inversion capability check. |
|
||||
| `SupportsHardwareInputCheck()` | `bool` | Hardware input status check capability. |
|
||||
| `SupportsMultipleSampleRealtime()` | `bool` | Multiple sample realtime capability check. |
|
||||
| `ControlsDAQ()` | `bool` | Returns true if base unit controls DAQ for modules. |
|
||||
| `CheckAAF(float rate)` | `bool` | Validates new AAF rate against configured rate. |
|
||||
| `RequireDiagnosticRateMatchSampleRate()` | `bool` | Checks if diagnostic rate must match sample rate. |
|
||||
| `GetPhaseShiftSamples(uint ModuleIndex, double ActualSampleRate, uint HardwareAAF, ulong originalT0)` | `ulong` | Returns phase delay in samples. |
|
||||
| `IsEthernetDistributor()` | `bool` | Returns true for ethernet distributor devices (SLICEDb, SLICE ECM, SLICE6DB). |
|
||||
| `IsSlice6Distributor()` | `bool` | Returns true for SLICE6DB devices. |
|
||||
|
||||
---
|
||||
|
||||
#### `IConfigurationActions`
|
||||
**Namespace:** `DTS.DASLib.Service`
|
||||
|
||||
**Methods:**
|
||||
| Method | Description |
|
||||
|--------|-------------|
|
||||
| `AutoDetect(bool bQueryConfiguration, ServiceCallback callback, object userData)` | Sets channels to auto-detect configuration and queries sensor types. |
|
||||
| `VerifyConfig(bool DoStrictCheck)` / `VerifyConfig(bool DoStrictCheck, ErrorCallback FailedChallengeFunc)` | Validates ConfigData property. |
|
||||
| `SetFirstUseDate(DateTime firstUseDate, ServiceCallback callback, object userData)` | Sets user attribute for first use date. |
|
||||
| `StoreTestSetupXML(ServiceCallback callback, object userData, string testSetupXML)` | Stores test setup XML. |
|
||||
| `ResetHardwareLines(ServiceCallback callback, object userData)` | Resets trigger/start lines. |
|
||||
| `CheckAAFilterRate(ServiceCallback callback, object userData)` | Validates AA filter rate. |
|
||||
| `QueryTestSetup(ServiceCallback callback, object userData)` | Queries test setup. |
|
||||
| `Configure(ServiceCallback callback, object userData, bool bEventConfig, bool DummyConfig, double[] MaxAAF, bool configureDigitalOutputs, uint crc, bool turnOffAAFRealtime, IStreamingFilterProfile dspFilterType, bool discardDiagnostics, ...)` | Applies ConfigData to DAS hardware. |
|
||||
| `ApplyLevelTriggers(ServiceCallback callback, object userData)` | Applies level triggers only. |
|
||||
| `QueryConfiguration(ServiceCallback callback, object userData, uint crc, string strConfig, bool bReadIds, bool bDeviceScaleFactors, bool sourceDASStorageList)` | Retrieves configuration from DAS. |
|
||||
| `UpdateConfigurationFromFile(ServiceCallback callback, object userData, string filePath)` | Updates configuration from file. |
|
||||
| `UpdateIDs(ServiceCallback callback, object userData)` | Retrieves and stores EIDs. |
|
||||
| `UpdateId(ServiceCallback callback, object userData, DASModule module, DASChannel channel)` | Updates single ID. |
|
||||
| `CheckSafetyState(bool bArmed, ServiceCallback callback, object userData)` | Checks safety state. |
|
||||
| `Reboot(ServiceCallback callback, object userData)` | Reboots the device. |
|
||||
|
||||
---
|
||||
|
||||
#### `IDiagnosticsActions`
|
||||
**Namespace:** `DTS.DASLib.Service`
|
||||
|
||||
**Methods:**
|
||||
| Method | Description |
|
||||
|--------|-------------|
|
||||
| `ClearTriggerOut(ServiceCallback callback, object userData)` | Clears trigger out line via SetSwitchImmediate. |
|
||||
| `ClearLatches(ServiceCallback callback, object userData)` | Clears latched FPGA via QATS call. |
|
||||
| `PerformVoltageCheck(ServiceCallback callback, object userData)` | Performs voltage check. |
|
||||
| `PerformVoltageCheckTAOnly(ServiceCallback callback, object userData)` | Voltage check for TA only. |
|
||||
| `PerformArmChecks(ServiceCallback callback, object userData)` | Performs arm checks. |
|
||||
| `SaveTiltSensorDataPre(ServiceCallback callback, object userData)` | Saves tilt sensor data. |
|
||||
| `SaveTemperaturesPre(ServiceCallback callback, object userData)` | Saves temperatures. |
|
||||
| `PrepareForBridgeResistanceMeasurement(UInt32 DiagnosticsSampleRateHz, float DiagnosticsAAFilterFrequencyHz, ServiceCallback callback, object userData)` | Prepares for bridge resistance measurement; required if units were in low power mode. |
|
||||
| `PrepareForDiagnostics(UInt32 DiagnosticsSampleRateHz, float DiagnosticsAAFilterFrequencyHz, PrePostResults WhichResult, ServiceCallback callback, object userData)` | Prepares for diagnostics. |
|
||||
| `SetStatusIndicator(DiagnosticsStatusIndicatorState state, ServiceCallback callback, object userData)` | Sets status indicator. |
|
||||
| `DiagnosAndGetResults(int EventNumber, PrePostResults WhichResult, ServiceCallback callback, object userData)` | Performs diagnostics and stores results. |
|
||||
| `GetEventDiagnosticsResults(int EventNumber, PrePostResults WhichResult, ServiceCallback callback, object userData)` | Retrieves pre/post event diagnostic results. |
|
||||
| `ClearDASTriggerLine(ServiceCallback callback, object userData)` | Clears trigger lines for any DAS. |
|
||||
| `SquibFireCheckArm(double delay, double duration, ServiceCallback callback, object userData)` | Squib fire check arm. |
|
||||
| `TriggerCheckTrigger(ServiceCallback callback, object userData)` | Trigger check trigger. |
|
||||
| `TriggerCheckDownload(double delay, double duration, float diagnosticsAAFilterFrequencyHz, uint diagnosticsSampleRateHz, ServiceCallback callback, object userData)` | Trigger check download. |
|
||||
| `GetBridgeMeasurement(ServiceCallback callback, object userData)` | Gets bridge measurement. |
|
||||
| `MeasureTransferSpeed(ServiceCallback callback, object userData)` | Measures transfer speed. |
|
||||
|
||||
---
|
||||
|
||||
#### `IDownloadActions` (internal)
|
||||
**Namespace:** `DTS.DASLib.Service`
|
||||
|
||||
**Methods:**
|
||||
| Method | Description |
|
||||
|--------|-------------|
|
||||
| `Download(ServiceCallback callback, object userData)` | Downloads data specified in WhatToDownload property. |
|
||||
| `Cancel()` | Cancels current operation. |
|
||||
| `ForceCancel()` | Cancels with smaller clear cancel time. |
|
||||
| `ClearCancel()` | Clears cancel flag. |
|
||||
| `QueryDownload(ServiceCallback callback, object userData, int eventIndex, TDASServiceSetupInfo setupInfo)` | Retrieves info about available events. |
|
||||
| `QueryDownloadedStatus(ServiceCallback callback, object userData)` | Checks if events have been downloaded. |
|
||||
| `SetTriggerSampleNumbers(ServiceCallback callback, object userData)` | Updates recorded trigger sample numbers in HW. |
|
||||
| `SetDownloaded(ServiceCallback callback, object userData)` | Sets event status to downloaded (when no data to download). |
|
||||
| `SetEventInfo(int eventIndex, string id, Guid guid, ulong totalSamples, ulong[] triggerSamples, ulong startRecordSample, UInt32 eventHasDownloaded, ServiceCallback callback, object userData)` | Updates event with new information. |
|
||||
| `CorrectT0s(ServiceCallback callback, object userData)` | Corrects T0 and total samples recorded; searches ADC for rails and peaks/troughs. |
|
||||
|
||||
---
|
||||
|
||||
#### `IArmActions` (internal)
|
||||
**Namespace:** `DTS.DASLib.Service`
|
||||
|
||||
**Methods:**
|
||||
| Method | Description |
|
||||
|--------|-------------|
|
||||
| `TurnOffT0Lights(ServiceCallback callback, object userData)` | Turns off T0 lights. |
|
||||
| `BeginBackgroundFlashErase(ServiceCallback callback, object userData)` | Initiates background flash erase (returns immediately). |
|
||||
| `BeginFlashErase(ServiceCallback callback, object userData, bool DummyArm)` | Starts asynchronous flash erase. |
|
||||
| `QueryFlashEraseStatus(ServiceCallback callback, object userData)` | Queries flash erase progress and errors. |
|
||||
| `ReadyForArming(ServiceCallback callback, object userData, Guid eventGuid, int armNowTimeout, bool testingMode, int maxNumberEvents, bool DummyArm, bool SysMode)` | Prepares for arming. |
|
||||
| `ArmNow(ServiceCallback callback, object userData, Guid eventGuid, int armNowTimeout, bool testingMode, int maxNumberEvents, bool SysMode)` | Arms a single DAS immediately. |
|
||||
| `PrepareForArmNow(...)` | Prepares for immediate arm. |
|
||||
| `PreparedArmNow(...)` | Executes prepared arm. |
|
||||
| `ReArm(ServiceCallback callback, object userData, bool autoArm, bool arm, bool repeatEnable)` | Re-arms all units with optional flags. |
|
||||
| `AutoArmNow(ServiceCallback callback, object userData, Guid eventGuid, int armNowTimeout, bool testingMode, UInt32 diagnosticsDelayMs, int MaxEventCount, bool repeatEnable, bool preserveDiagnostics)` | Auto-arms a single DAS. |
|
||||
| `EnableFaultChecking(ServiceCallback callback, object userData)` | Enables fault checking for chained DAS. |
|
||||
| `CheckAlreadyLevelTriggered(ServiceCallback callback, object userData)` | Checks if channels are level triggered. |
|
||||
| `Disarm(ServiceCallback callback, object userData)` | Disarms the DAS. |
|
||||
| `DisAutoArm(ServiceCallback callback, object userData)` | Disables auto-arm. |
|
||||
| `GetArmStatus(ServiceCallback callback, object userData, uint inputVoltageCutoff, int maxTimeout)` | Retrieves current arm status. |
|
||||
| `GetAutoArmStatus(ServiceCallback callback, object userData)` | Retrieves current auto-arm status. |
|
||||
| `EnterLowPowerMode(ServiceCallback callback, object userData)` | Sets DAS to low power mode. |
|
||||
| `StartRecord(ServiceCallback callback, object userData)` | Tells DAS to start recording. |
|
||||
| `Trigger(ServiceCallback callback, object userData)` | Sends trigger signal to hardware. |
|
||||
| `GetExtendedFaultIds(ServiceCallback callback, object userData)` | Queries extended fault IDs from hardware. |
|
||||
|
||||
**Properties:**
|
||||
| Property | Type | Description |
|
||||
|----------|------|-------------|
|
||||
| `SupportsBackgroundFlashErase` | `bool` | Whether unit supports flash erase. |
|
||||
| `BackgroundFlashEraseStarted` | `bool` | Whether flash erase has started. |
|
||||
| `BackgroundFlashEraseStartTime` | `DateTime?` | Start time of background flash erase. |
|
||||
|
||||
---
|
||||
|
||||
#### `IRealTimeActions` (internal)
|
||||
**Namespace:** `DTS.DASLib.Service`
|
||||
|
||||
**Methods:**
|
||||
| Method | Description |
|
||||
|--------|-------------|
|
||||
| `RealTime(int samplesPerSec, int msBetweenSamples, ServiceCallback callback, object userData, bool allowMultipleSampleRealtime, int moduleIndex, ManualResetEvent stopEvent, byte[] channels, double aaf, int minCallbackUpdateTimeMs, bool UseUDPStreaming, string HostIPAddress)` | Starts realtime data streaming at specified rate. |
|
||||
| `RealTimePolling(ServiceCallback callback, object userData, ManualResetEvent stopEvent, byte[] channels)` | Realtime via active polling for sample averages. |
|
||||
| `ExitRealTimeMode(ServiceCallback callback, object userData)` | Stops realtime data streaming. |
|
||||
| `RealTimeTiltPolling(ServiceCallback callback, object userData, ManualResetEvent stopEvent)` | Realtime tilt data polling. |
|
||||
| `SetUDPStreamProfile(ServiceCallback callback, object userData, UDPStreamProfile streamProfile, string udpAddress, ushort timeChannelId, ushort dataChannelId, uint[] tmnsConfig, ushort irigTimeDataPacketIntervalMs)` | Configures UDP streaming profile. |
|
||||
| `GetUDPStreamProfile(ServiceCallback callback, object userData)` | Retrieves UDP stream profile. |
|
||||
|
||||
---
|
||||
|
||||
#### `ITriggerCheckActions` (internal)
|
||||
**Namespace:** `DTS.DASLib.Service`
|
||||
|
||||
**Methods:**
|
||||
| Method | Description |
|
||||
|--------|-------------|
|
||||
| `PreStartTriggerCheck(ServiceCallback callback, object userData)` | Preparation before StartTriggerCheck; called explicitly by StartTriggerCheck service. |
|
||||
| `PostStartTriggerCheck(ServiceCallback callback, object userData)` | Actions after StartTriggerCheck; called explicitly by StartTriggerCheck service. |
|
||||
| `StartTriggerCheck(ServiceCallback callback, object userData)` | Changes DAS mode to latch signal lines. |
|
||||
| `DoTriggerCheck(ServiceCallback callback, object userData)` | Performs trigger check (async); stores result in TriggerResult property. |
|
||||
| `DoTriggerCheckSync()` | Synchronous version of DoTriggerCheck. |
|
||||
| `DoStartCheck(ServiceCallback callback, object userData)` | Performs start check; stores result in StartResult property. |
|
||||
| `CancelTriggerCheck(ServiceCallback callback, object userData)` | Sets latching mechanism back to normal. |
|
||||
|
||||
---
|
||||
|
||||
#### `IClockSyncActions`
|
||||
**Namespace:** `DTS.DASLib.Service.Interfaces`
|
||||
|
||||
**Methods:**
|
||||
| Method | Description |
|
||||
|--------|-------------|
|
||||
| `GetClockSyncStatus(ServiceCallback callback, object userData)` | Retrieves clock source and sync status. Response includes input/output sync sources, sync status bits, arm state, and PTP timestamps. |
|
||||
| `SetClockSyncConfig(ServiceCallback callback, object userData, ClockSyncProfile profile)` | Sets input/output clock configuration. Supports PTP, IRIG-B122, GPS, and 1PPS inputs. |
|
||||
| `GetPTP
|
||||
38
docs/ai/DataPRO/IService/Properties.md
Normal file
38
docs/ai/DataPRO/IService/Properties.md
Normal file
@@ -0,0 +1,38 @@
|
||||
---
|
||||
source_files:
|
||||
- DataPRO/IService/Properties/AssemblyInfo.cs
|
||||
generated_at: "2026-04-17T16:27:45.382994+00:00"
|
||||
model: "zai-org/GLM-5-FP8"
|
||||
schema_version: 1
|
||||
sha256: "85c6948c52377c2f"
|
||||
---
|
||||
|
||||
# Properties
|
||||
|
||||
### Purpose
|
||||
This module contains the assembly metadata for the `IService` assembly. It is a standard .NET assembly information file that defines versioning, copyright, and COM visibility settings for the IService component. This file exists purely for build-time configuration and contains no executable logic.
|
||||
|
||||
### Public Interface
|
||||
No public types or functions are exposed. This module consists solely of assembly-level attributes:
|
||||
- `AssemblyTitle`: "IService"
|
||||
- `AssemblyVersion`: "1.06.0081"
|
||||
- `AssemblyFileVersion`: "1.06.0081"
|
||||
- `ComVisible`: `false`
|
||||
- `Guid`: "7085ea4c-93ee-4ba6-b42d-4776598554e1"
|
||||
|
||||
### Invariants
|
||||
- The assembly version and file version are synchronized (both "1.06.0081").
|
||||
- COM visibility is disabled at the assembly level; individual types must explicitly enable COM visibility if required.
|
||||
|
||||
### Dependencies
|
||||
**Depends on:**
|
||||
- `System.Reflection`
|
||||
- `System.Runtime.CompilerServices`
|
||||
- `System.Runtime.InteropServices`
|
||||
|
||||
**Depended on by:** Unclear from source alone—this is a leaf configuration file consumed by the build system.
|
||||
|
||||
### Gotchas
|
||||
None identified from source alone.
|
||||
|
||||
---
|
||||
76
docs/ai/DataPRO/IService/SLICE Service.md
Normal file
76
docs/ai/DataPRO/IService/SLICE Service.md
Normal file
@@ -0,0 +1,76 @@
|
||||
---
|
||||
source_files:
|
||||
- DataPRO/IService/SLICE Service/SystemAttribute.cs
|
||||
- DataPRO/IService/SLICE Service/Attribute.cs
|
||||
- DataPRO/IService/SLICE Service/EventAttribute.cs
|
||||
generated_at: "2026-04-17T15:40:14.448178+00:00"
|
||||
model: "zai-org/GLM-5-FP8"
|
||||
schema_version: 1
|
||||
sha256: "59bc9d04c12dd004"
|
||||
---
|
||||
|
||||
# Documentation: DTS.Slice.Service Attribute Classes
|
||||
|
||||
## 1. Purpose
|
||||
|
||||
This module provides an attribute hierarchy for the SLICE Service within the DataPRO system. The `Attribute` class serves as a base class for typed attributes associated with different stores (Arm, Event, System, User), with serialization support for dictionary-to-byte-array conversions. `SystemAttribute` and `EventAttribute` are derived classes intended to represent system-level and event-level attributes respectively. **Note: The majority of the implementation in `SystemAttribute` and `EventAttribute` is currently commented out, leaving these classes as essentially empty shells.**
|
||||
|
||||
## 2. Public Interface
|
||||
|
||||
### `Attribute` (Base Class)
|
||||
|
||||
**Constructor:**
|
||||
- `protected Attribute()` — Parameterless constructor is protected, preventing direct instantiation.
|
||||
|
||||
**Constants:**
|
||||
- `public const int MaxSingleAttributeSize = 500` — Maximum size for a single attribute.
|
||||
- `public const int BulkAttributeStartNumber = 3000` — Starting number for bulk attributes.
|
||||
|
||||
**Protected Properties:**
|
||||
- `protected AttributeInterface Store { get; set; }` — The attribute store type (Arm, Event, System, User).
|
||||
- `protected AttributeTypes.AttributeDataTypes datatype` — The data type of the attribute.
|
||||
- `protected ushort key` — The attribute key.
|
||||
- `protected object value` — The attribute value.
|
||||
|
||||
**Protected Methods:**
|
||||
- `protected Dictionary<byte, double> ByteArrayToDict(byte[] bytes)` — Deserializes a byte array into a `Dictionary<byte, double>`. Each pair consists of 1 byte key + 8 bytes double value (9 bytes total per pair).
|
||||
- `protected byte[] DictToByteArray(Dictionary<byte, double> dict)` — Serializes a `Dictionary<byte, double>` into a byte array using the same 9-byte-per-pair format.
|
||||
|
||||
**Protected Enum:**
|
||||
- `AttributeInterface` — Values: `Arm`, `Event`, `System`, `User`
|
||||
|
||||
---
|
||||
|
||||
### `SystemAttribute` (Derived Class)
|
||||
|
||||
- Inherits from `Attribute`
|
||||
- **No active members.** The class body contains only commented-out code referencing a `TypeValues` enum and derived attribute classes (`SerialNumberAttribute`, `TotalEventsStoredAttribute`).
|
||||
|
||||
---
|
||||
|
||||
### `EventAttribute` (Derived Class)
|
||||
|
||||
- Inherits from `Attribute`
|
||||
- **No active members.** The class body contains only commented-out code referencing a `TypeValues` enum and numerous derived attribute classes (`EventNumber`, `EventName`, `EventSampleRate`, `EventDescription`, `EventTotalSamples`, `EventTriggerSampleNumber`, `EventStartRecordSampleNumber`, `EventTotalChannels`, `EventFilterFrequency`, `EventStartTime`, `EventExcitation`, `PreEventScaleFactors`, `PostEventScaleFactors`, `EventConfigAttributes`).
|
||||
|
||||
## 3. Invariants
|
||||
|
||||
- The `Attribute` constructor is protected; only derived classes can instantiate.
|
||||
- Dictionary serialization format: Each key-value pair occupies exactly 9 bytes (1 byte for key + 8 bytes for double).
|
||||
- `ByteArrayToDict` assumes the input byte array length is evenly divisible by the pair size (9 bytes); behavior is undefined otherwise.
|
||||
- The `Store` property must be one of the four `AttributeInterface` values.
|
||||
|
||||
## 4. Dependencies
|
||||
|
||||
**This module depends on:**
|
||||
- `System` (mscorlib)
|
||||
- `System.Collections.Generic` (mscorlib)
|
||||
- `System.Text` (mscorlib)
|
||||
- `DTS.Common.Utils` — Imported in `Attribute.cs` but no types from this namespace are actively used in the visible code.
|
||||
- `DTS.DASLib.Command.SLICE` — Provides `ByteConvertor` class (referenced in commented code) and `AttributeTypes.AttributeDataTypes` (referenced in active code).
|
||||
|
||||
**What depends on this module:**
|
||||
- Cannot be determined from the provided source files alone.
|
||||
|
||||
**Referenced but not defined in these files:**
|
||||
- `AttributeTypes.AttributeDataTypes` — Used for the `datatype` field; location unclear (possibly in `DTS.DASLib.Command
|
||||
38
docs/ai/DataPRO/IService/SLICE Service/Properties.md
Normal file
38
docs/ai/DataPRO/IService/SLICE Service/Properties.md
Normal file
@@ -0,0 +1,38 @@
|
||||
---
|
||||
source_files:
|
||||
- DataPRO/IService/SLICE Service/Properties/AssemblyInfo.cs
|
||||
generated_at: "2026-04-17T16:27:45.387865+00:00"
|
||||
model: "zai-org/GLM-5-FP8"
|
||||
schema_version: 1
|
||||
sha256: "42d3cd641101717b"
|
||||
---
|
||||
|
||||
# Properties
|
||||
|
||||
### Purpose
|
||||
This module contains the assembly metadata for the `IService` assembly. It is a standard .NET assembly information file that defines versioning, copyright, and COM visibility settings for the IService component. This file exists purely for build-time configuration and contains no executable logic.
|
||||
|
||||
### Public Interface
|
||||
No public types or functions are exposed. This module consists solely of assembly-level attributes:
|
||||
- `AssemblyTitle`: "IService"
|
||||
- `AssemblyVersion`: "1.06.0081"
|
||||
- `AssemblyFileVersion`: "1.06.0081"
|
||||
- `ComVisible`: `false`
|
||||
- `Guid`: "7085ea4c-93ee-4ba6-b42d-4776598554e1"
|
||||
|
||||
### Invariants
|
||||
- The assembly version and file version are synchronized (both "1.06.0081").
|
||||
- COM visibility is disabled at the assembly level; individual types must explicitly enable COM visibility if required.
|
||||
|
||||
### Dependencies
|
||||
**Depends on:**
|
||||
- `System.Reflection`
|
||||
- `System.Runtime.CompilerServices`
|
||||
- `System.Runtime.InteropServices`
|
||||
|
||||
**Depended on by:** Unclear from source alone—this is a leaf configuration file consumed by the build system.
|
||||
|
||||
### Gotchas
|
||||
None identified from source alone.
|
||||
|
||||
---
|
||||
330
docs/ai/DataPRO/IService/StateMachine.md
Normal file
330
docs/ai/DataPRO/IService/StateMachine.md
Normal file
@@ -0,0 +1,330 @@
|
||||
---
|
||||
source_files:
|
||||
- DataPRO/IService/StateMachine/Triggers.cs
|
||||
- DataPRO/IService/StateMachine/IDASState.cs
|
||||
- DataPRO/IService/StateMachine/DASState.cs
|
||||
- DataPRO/IService/StateMachine/States.cs
|
||||
- DataPRO/IService/StateMachine/StateMachineBootstrap.cs
|
||||
generated_at: "2026-04-17T15:37:51.575714+00:00"
|
||||
model: "zai-org/GLM-5-FP8"
|
||||
schema_version: 1
|
||||
sha256: "2906f550f14c0321"
|
||||
---
|
||||
|
||||
# State Machine Module Documentation
|
||||
|
||||
## 1. Purpose
|
||||
|
||||
This module implements a state machine for managing Data Acquisition System (DAS) hardware lifecycle operations. It orchestrates device discovery, configuration, diagnostics, and realtime data acquisition through a formal state transition model using the `Stateless` library. The module provides a centralized mechanism for coordinating complex, multi-step hardware interactions while maintaining consistent status reporting and logging throughout the state transitions.
|
||||
|
||||
---
|
||||
|
||||
## 2. Public Interface
|
||||
|
||||
### Enumerations
|
||||
|
||||
#### `Trigger`
|
||||
Defines all valid state transition triggers:
|
||||
- `PingAndConnect` - Initiates device discovery and connection
|
||||
- `Reset` - Returns state machine to initial state
|
||||
- `ResolveChannelsAuto` - Automatic channel resolution (reentry trigger)
|
||||
- `ResolveChannelsManual` - Manual channel resolution (reentry trigger)
|
||||
- `ApplyConfiguration` - Applies configuration to devices
|
||||
- `TurnOffExcitation` - Deactivates excitation on configured units
|
||||
- `Cancel` - Cancels current operation
|
||||
- `Finish` - Completes current state and transitions
|
||||
- `Arm` - Transitions to arming state
|
||||
- `StartRealtime` - Initiates realtime data acquisition
|
||||
- `RequeryDevice` - Refreshes a single connected device
|
||||
- `Download` - Initiates download operation
|
||||
|
||||
#### `State`
|
||||
Defines all valid states:
|
||||
- `Prepare`, `HardwareDiscovery`, `HardwareDiscoveryStart`, `Configure`, `ConfigureStart`, `Diagnose`, `Realtime`, `Arming`, `Arm`, `Download`, `RealtimeStart`, `DownloadStart`
|
||||
|
||||
---
|
||||
|
||||
### Interfaces
|
||||
|
||||
#### `IDASState`
|
||||
```csharp
|
||||
public interface IDASState
|
||||
{
|
||||
Status Status { get; }
|
||||
IDASFactory DASFactory { get; set; }
|
||||
Action OnEntry { get; }
|
||||
Action OnExit { get; }
|
||||
State State { get; }
|
||||
void OnEnterState();
|
||||
void OnExitState();
|
||||
}
|
||||
```
|
||||
|
||||
#### `IDASStateWithSelector : IDASState`
|
||||
```csharp
|
||||
public interface IDASStateWithSelector : IDASState
|
||||
{
|
||||
IDASState StateSelector();
|
||||
}
|
||||
```
|
||||
Extends `IDASState` with dynamic state selection capability via `StateSelector()`.
|
||||
|
||||
---
|
||||
|
||||
### Abstract Classes
|
||||
|
||||
#### `DASState : IDASState`
|
||||
Base implementation for all states. Provides:
|
||||
- `IDASFactory DASFactory { get; set; }` - Factory for DAS hardware operations
|
||||
- `abstract State State { get; }` - Must be implemented by derived classes
|
||||
- `virtual Action OnEntry { get => OnEnterState; }` - Returns `OnEnterState` method
|
||||
- `virtual Action OnExit { get => OnExitState; }` - Returns `OnExitState` method
|
||||
- `virtual void OnEnterState()` - Logs entry to console
|
||||
- `virtual void OnExitState()` - Logs exit to console
|
||||
- `Status Status { get; }` - Returns a **static, shared** `Status` instance
|
||||
|
||||
#### `DASStateSelector : DASState, IDASStateWithSelector`
|
||||
Abstract base for states requiring dynamic transition logic:
|
||||
- `abstract IDASState StateSelector();` - Must be implemented to determine next state
|
||||
|
||||
---
|
||||
|
||||
### Classes
|
||||
|
||||
#### `States` (Singleton)
|
||||
Registry and factory for all state instances.
|
||||
|
||||
**Properties:**
|
||||
- `static States Instance` - Singleton accessor
|
||||
- `IDASState Prepare { get; }`
|
||||
- `IDASState HardwareDiscovery { get; }`
|
||||
- `IDASStateWithSelector HardwareDiscoveryStart { get; }`
|
||||
- `IDASState Download { get; }`
|
||||
- `IDASStateWithSelector DownloadStart { get; }`
|
||||
- `IDASStateWithSelector Diagnose { get; }`
|
||||
- `IDASStateWithSelector Configure { get; }`
|
||||
- `IDASState Arming { get; }`
|
||||
- `IDASState Arm { get; }`
|
||||
- `IDASState Realtime { get; }`
|
||||
- `IDASStateWithSelector RealtimeStart { get; }`
|
||||
- `IDASStateWithSelector ConfigureStart { get; }`
|
||||
|
||||
**Methods:**
|
||||
- `static void SetDASFactory(IDASFactory dasFactory)` - Propagates factory to all registered states
|
||||
- `IDASState GetIDASState(State state)` - Retrieves state by enum; throws `InvalidOperationException` if undefined
|
||||
|
||||
---
|
||||
|
||||
#### `StateMachineBootstrap`
|
||||
Main orchestrator class that configures and operates the state machine.
|
||||
|
||||
**Constructor:**
|
||||
```csharp
|
||||
public StateMachineBootstrap(IDASFactory dasFactory = null)
|
||||
```
|
||||
Initializes logging, creates state machine starting in `Prepare` state, and configures all transitions.
|
||||
|
||||
**Public Methods:**
|
||||
|
||||
```csharp
|
||||
public void TurnOffExcitation(
|
||||
ActionCompleteDelegate CompleteAction,
|
||||
SetProgressValueDelegate ProgressAction,
|
||||
StatusIntDelegate StatusAction,
|
||||
StatusExIntDelegate StatusExAction)
|
||||
```
|
||||
Turns off excitation for units in configure state. Waits for any running operation to complete before proceeding.
|
||||
|
||||
```csharp
|
||||
public void PrepareForDiagnostics(
|
||||
ErrorCallback ErrorRequiringActionAction,
|
||||
ActionCompleteDelegate CompleteAction,
|
||||
SetProgressValueDelegate ProgressAction,
|
||||
StatusIntDelegate StatusAction,
|
||||
StatusExIntDelegate StatusExAction)
|
||||
```
|
||||
Prepares hardware for diagnostics mode by applying configuration with `PrepareForDiagnostics = true`.
|
||||
|
||||
```csharp
|
||||
public void UpdateConfig(
|
||||
bool ResetEventLines,
|
||||
bool PrepareForDiagnostics,
|
||||
bool ConfigureDigitalOutputs,
|
||||
bool DoStrictCheck,
|
||||
bool DummyConfig,
|
||||
bool EventConfig,
|
||||
double[] maxAAF,
|
||||
bool TurnOffAAFRealtime,
|
||||
bool SkipTurnOnPower,
|
||||
IDASCommunication[] UnitsToConfigure,
|
||||
IReadOnlyDictionary<string, double> SampleRateLookup,
|
||||
IReadOnlyDictionary<string, float> AAFRateLookup,
|
||||
ErrorCallback ErrorRequiringActionAction,
|
||||
ActionCompleteDelegate CompleteAction,
|
||||
SetProgressValueDelegate ProgressAction,
|
||||
StatusIntDelegate StatusAction,
|
||||
StatusExIntDelegate StatusExAction,
|
||||
DSPFilterType dspFilterType)
|
||||
```
|
||||
Updates device configuration with full parameter control.
|
||||
|
||||
```csharp
|
||||
public void PingAndConnectAndCheckHardware(
|
||||
string[] Addresses,
|
||||
Tuple<string, string>[] AddressRanges,
|
||||
bool GoToDownload,
|
||||
string[] KnownSLICEIPAddresses,
|
||||
string[] KnownTDASIPAddresses,
|
||||
bool ProceedWhenDone,
|
||||
bool ReadIds,
|
||||
bool RequireAllDASFound,
|
||||
bool RunAutoSense,
|
||||
bool UseUDPDiscovery,
|
||||
string[] RequiredSerials,
|
||||
HardwareDiscoveryParameters.IsCalDateExpiredDelegate CalDateExpiredQuery,
|
||||
IDASHardware[] ExpectedHardware,
|
||||
HardwareDiscoveryParameters.FirmwareExpectedVersionDelegate UnitExpectedFirmwareQuery,
|
||||
HardwareDiscoveryParameters.UnitExpectedMaxMemoryDelegate UnitExpectedMaxMemoryQuery,
|
||||
HardwareDiscoveryParameters.UnitIsInDbDelegate UnitIsInDbQuery,
|
||||
HardwareDiscoveryParameters.UpdateMaxMemoryDelegate UpdateMaxMemoryAction,
|
||||
ActionCompleteDelegate CompleteAction,
|
||||
SetProgressValueDelegate ProgressAction,
|
||||
StatusIntDelegate StatusAction,
|
||||
StatusExIntDelegate StatusExAction)
|
||||
```
|
||||
Pings, connects, and performs hardware validation (firmware, memory, calibration dates, database presence).
|
||||
|
||||
```csharp
|
||||
public void PingAndConnect(
|
||||
string[] Addresses,
|
||||
Tuple<string, string>[] AddressRanges,
|
||||
bool GoToDownload,
|
||||
string[] KnownSLICEIPAddresses,
|
||||
string[] KnownTDASIPAddresses,
|
||||
bool ProceedWhenDone,
|
||||
bool ReadIds,
|
||||
bool RequireAllDASFound,
|
||||
bool RunAutoSense,
|
||||
bool UseUDPDiscovery,
|
||||
string[] RequiredSerials,
|
||||
ActionCompleteDelegate CompleteAction,
|
||||
SetProgressValueDelegate ProgressAction,
|
||||
StatusIntDelegate StatusAction,
|
||||
StatusExIntDelegate StatusExAction)
|
||||
```
|
||||
Pings and connects without hardware validation checks.
|
||||
|
||||
```csharp
|
||||
public void RequeryDevice(
|
||||
IDASCommunication device,
|
||||
ActionCompleteDelegate CompleteAction,
|
||||
SetProgressValueDelegate ProgressAction,
|
||||
StatusIntDelegate StatusAction,
|
||||
StatusExIntDelegate StatusExAction)
|
||||
```
|
||||
Refreshes a single already-connected device.
|
||||
|
||||
```csharp
|
||||
public void Ping(
|
||||
bool UseUDPDiscovery,
|
||||
string[] ipAddresses,
|
||||
Tuple<string, string>[] ipRanges,
|
||||
ActionCompleteDelegate CompleteAction,
|
||||
SetProgressValueDelegate ProgressAction,
|
||||
StatusIntDelegate StatusAction,
|
||||
StatusExIntDelegate StatusExAction)
|
||||
```
|
||||
Pings devices without connecting (`Connect = false`).
|
||||
|
||||
```csharp
|
||||
public void StartRealtime(
|
||||
List<IDASCommunication> ldas,
|
||||
List<int> moduleIndicies,
|
||||
bool useSingleSampleMode,
|
||||
double realtimeSampleRate,
|
||||
int realtimeDelayBetweenPolls,
|
||||
bool allowMultipleSampleRealtime,
|
||||
byte realtimeSampleRateAAFilterRatio,
|
||||
bool sliceTurnOffAAFRealtime,
|
||||
Action<double, double> SetRealtimeSampleRateAAF,
|
||||
Action CompleteAction,
|
||||
Dictionary<IDASCommunication, byte[]> idasToActiveChannels,
|
||||
ServiceBase.Callback StartRealtimeCallback)
|
||||
```
|
||||
Starts realtime data acquisition on specified units and channels.
|
||||
|
||||
```csharp
|
||||
public void StopRealtime()
|
||||
```
|
||||
Stops realtime acquisition.
|
||||
|
||||
```csharp
|
||||
public void Reset()
|
||||
```
|
||||
Resets state machine to `Prepare` state and clears `HardwareDiscovery.Status`.
|
||||
|
||||
**Properties:**
|
||||
- `bool IsInRealtime { get; }` - Returns current realtime status
|
||||
|
||||
---
|
||||
|
||||
## 3. Invariants
|
||||
|
||||
1. **Singleton States**: The `States` class is a singleton with an explicit static constructor to prevent `beforefieldinit` behavior.
|
||||
|
||||
2. **Shared Status Instance**: `DASState` uses a `private static readonly Status _status` meaning **all states share the same Status object**. The source explicitly notes this is intentional but may be refactored.
|
||||
|
||||
3. **State Categorization**: States are partitioned into two dictionaries:
|
||||
- `_statesDict` for `IDASState` instances
|
||||
- `_statesSelectableDict` for `IDASStateWithSelector` instances
|
||||
A state cannot exist in both dictionaries; `AddState<T>` prioritizes `_statesSelectableDict`.
|
||||
|
||||
4. **Initial State**: The state machine always starts in `States.Instance.Prepare`.
|
||||
|
||||
5. **Substate Hierarchy**:
|
||||
- `HardwareDiscoveryStart` is a substate of `HardwareDiscovery`
|
||||
- `ConfigureStart` is a substate of `Configure`
|
||||
- `RealtimeStart` is a substate of `Realtime`
|
||||
- `DownloadStart` is a substate of `Download` (commented out)
|
||||
|
||||
6. **Async Trigger Firing**: Most public methods use `FireAsync` rather than synchronous `Fire`.
|
||||
|
||||
7. **Log File Size**: Maximum log file size is fixed at `4194304` bytes (4 MB).
|
||||
|
||||
---
|
||||
|
||||
## 4. Dependencies
|
||||
|
||||
### This Module Depends On:
|
||||
- **Stateless** - External state machine library (used for `StateMachine<IDASState, Trigger>`)
|
||||
- `DTS.Common.Interface.DASFactory` - `IDASFactory`, `IDASCommunication`, `IDASHardware`
|
||||
- `DTS.Common.Interface.DataRecorders` - (imported but specific usage unclear from source)
|
||||
- `DTS.Common.Interface.StatusAndProgressBar` - Delegate types (`ActionCompleteDelegate`, `SetProgressValueDelegate`, `StatusIntDelegate`, `StatusExIntDelegate`, `ErrorCallback`)
|
||||
- `DTS.Common.Utilities.Logging` - `TextLogger`, `APILogger`
|
||||
- `DTS.Common.Classes.DSP` - `DSPFilterType`
|
||||
- `System.Windows.Forms` - `DialogResult` (used in callback handling)
|
||||
- `System.Collections.Generic`, `System.Linq`, `System.Text`
|
||||
|
||||
### What Depends On This Module:
|
||||
Not determinable from source alone.
|
||||
|
||||
---
|
||||
|
||||
## 5. Gotchas
|
||||
|
||||
1. **Shared Status Object**: The comment in `DASState.cs` explicitly warns:
|
||||
> "for now we enforce that there is just one status object we'll probably want to refactor this at some point how this information is stored and passed, but this will prevent accidents from happening in the short term"
|
||||
|
||||
This means all states share the same `Status` instance, which could cause data races or unexpected state if not carefully managed.
|
||||
|
||||
2. **Download States Disabled**: The `Download` and `DownloadStart` state configurations in `Configure()` are commented out, suggesting this functionality is incomplete or deprecated.
|
||||
|
||||
3. **Test Methods in Production Code**: The `Start()` method and its helper methods (`SimulatePingAndConnectWithCancel`, `SimulatePingAndConnectComplete`, `BasicInfoToDiagnostics`, `BasicInfoToRealtime`, `StartAndStopRealtime`, `ResolveChannelsManual`, `ResolveChannelsAuto`, `ApplyConfiguration`) appear to be test/simulation code included in the production class.
|
||||
|
||||
4. **Empty Methods**: `ResolveChannelsManual()` and `ResolveChannelsAuto()` are empty but called in simulation code.
|
||||
|
||||
5. **TurnOffExcitation Wait Behavior**: `TurnOffExcitation` calls `status.DoneEvent.WaitOne()` which blocks until any running configuration completes—this could cause unexpected blocking if called from a UI thread.
|
||||
|
||||
6. **Logger Exception Swallowing**: The `LogStuff` method catches and silently discards all exceptions during logging.
|
||||
|
||||
7. **Graph Generation Unused**: `GenerateStateMachineGraph()` generates a DOT graph string but the result is only stored in a local variable and never written to a file or exposed.
|
||||
60
docs/ai/DataPRO/IService/StateMachine/States.md
Normal file
60
docs/ai/DataPRO/IService/StateMachine/States.md
Normal file
@@ -0,0 +1,60 @@
|
||||
---
|
||||
source_files:
|
||||
- DataPRO/IService/StateMachine/States/Arm.cs
|
||||
- DataPRO/IService/StateMachine/States/Arming.cs
|
||||
- DataPRO/IService/StateMachine/States/Realtime.cs
|
||||
- DataPRO/IService/StateMachine/States/Download.cs
|
||||
- DataPRO/IService/StateMachine/States/HardwareDiscovery.cs
|
||||
- DataPRO/IService/StateMachine/States/Prepare.cs
|
||||
- DataPRO/IService/StateMachine/States/ConfigureStart.cs
|
||||
- DataPRO/IService/StateMachine/States/RealtimeStart.cs
|
||||
- DataPRO/IService/StateMachine/States/Configure.cs
|
||||
- DataPRO/IService/StateMachine/States/Diagnose.cs
|
||||
- DataPRO/IService/StateMachine/States/DownloadStart.cs
|
||||
- DataPRO/IService/StateMachine/States/HardwareDiscoveryStart.cs
|
||||
generated_at: "2026-04-17T16:34:18.361174+00:00"
|
||||
model: "zai-org/GLM-5-FP8"
|
||||
schema_version: 1
|
||||
sha256: "916778b8f4ae68d3"
|
||||
---
|
||||
|
||||
# State Machine States Module Documentation
|
||||
|
||||
## 1. Purpose
|
||||
|
||||
This module implements the concrete state classes for a Data Acquisition System (DAS) service state machine within the `DTS.DASLib.Service.StateMachine` namespace. It defines individual state behaviors and state transition logic for the system's operational lifecycle, including hardware discovery, configuration, diagnosis, arming, real-time operation, and data download phases. The states follow a polymorphic design pattern with two class hierarchies: simple states (`DASState`) and state selectors (`DASStateSelector`) that determine the next state transition.
|
||||
|
||||
---
|
||||
|
||||
## 2. Public Interface
|
||||
|
||||
### Simple States (inherit from `DASState`)
|
||||
|
||||
#### `Realtime` (public)
|
||||
```csharp
|
||||
public override State State => State.Realtime;
|
||||
```
|
||||
A terminal state representing real-time data acquisition mode. No custom entry behavior is defined in this class.
|
||||
|
||||
---
|
||||
|
||||
### State Selectors (inherit from `DASStateSelector`)
|
||||
|
||||
#### `Configure` (public)
|
||||
```csharp
|
||||
public override State State => State.Configure;
|
||||
public override IDASState StateSelector();
|
||||
public bool AllowApplyConfig();
|
||||
```
|
||||
- **`StateSelector()`**: Returns `States.Instance.ConfigureStart` if `AllowApplyConfig()` returns `true`; otherwise returns `States.Instance.Configure`.
|
||||
- **`AllowApplyConfig()`**: Currently returns `true` unconditionally. Source contains TODO comments indicating future logic for channel resolution validation.
|
||||
|
||||
---
|
||||
|
||||
#### `ConfigureStart` (public)
|
||||
```csharp
|
||||
public override State State => State.ConfigureStart;
|
||||
public override IDASState StateSelector();
|
||||
public override Action OnEntry { get; }
|
||||
private void ApplyConfig();
|
||||
``
|
||||
75
docs/ai/DataPRO/IService/StateMachine/StatusAndParameters.md
Normal file
75
docs/ai/DataPRO/IService/StateMachine/StatusAndParameters.md
Normal file
@@ -0,0 +1,75 @@
|
||||
---
|
||||
source_files:
|
||||
- DataPRO/IService/StateMachine/StatusAndParameters/IStatusInfo.cs
|
||||
- DataPRO/IService/StateMachine/StatusAndParameters/IStatusParameters.cs
|
||||
- DataPRO/IService/StateMachine/StatusAndParameters/GlobalStatusParameters.cs
|
||||
- DataPRO/IService/StateMachine/StatusAndParameters/Status.cs
|
||||
- DataPRO/IService/StateMachine/StatusAndParameters/GlobalStatusInformation.cs
|
||||
generated_at: "2026-04-17T16:03:17.837339+00:00"
|
||||
model: "zai-org/GLM-5-FP8"
|
||||
schema_version: 1
|
||||
sha256: "2686f48e66f3b9e3"
|
||||
---
|
||||
|
||||
# StatusAndParameters
|
||||
|
||||
### Purpose
|
||||
This module defines the status and parameter tracking infrastructure for a state machine that manages data acquisition system operations. It provides interfaces and concrete implementations for tracking hardware discovery, configuration, realtime operation, diagnostics, and download states, including thread-safe tracking of device power states and operational modes.
|
||||
|
||||
### Public Interface
|
||||
|
||||
**IStatusInfo** (interface)
|
||||
- `void Reset()` - Resets status information to default state.
|
||||
|
||||
**IStatusParameters** (interface)
|
||||
- `void Reset()` - Resets parameters to default state.
|
||||
|
||||
**GlobalStatusParameters** : IStatusParameters
|
||||
- `bool AllowUDPMulticast { get; set; }` - Default: `true`
|
||||
- `bool DisableAutoSense { get; set; }` - Default: `SensorConstants.DisableAutoSense`
|
||||
- `void Reset()` - Resets both properties to defaults.
|
||||
|
||||
**GlobalStatusInformation** : IStatusInfo
|
||||
- `IDASCommunication[] GetUnitsInRealtime()` - Returns array of devices currently in realtime mode.
|
||||
- `void AddUnitInRealtime(IDASCommunication device)` - Adds device to realtime list (no-op if already present).
|
||||
- `IDASCommunication[] GetUnitsInArm()` - Returns array of devices currently in arm mode.
|
||||
- `void AddUnitInArm(IDASCommunication device)` - Adds device to arm list (no-op if already present).
|
||||
- `IDASCommunication[] GetUnitsAtLowPower()` - Returns array of devices at low power.
|
||||
- `void AddUnitAtLowPower(IDASCommunication das)` - Adds to low power list; removes from high power list if present.
|
||||
- `IDASCommunication[] GetUnitsAtHighPower()` - Returns array of devices at high power.
|
||||
- `void AddUnitAtHighPower(IDASCommunication das)` - Adds to high power list; removes from low power list if present.
|
||||
- `bool ExcitationOn { get; set; }` - Default: `false`
|
||||
- `void Reset()` - Clears all lists and sets `ExcitationOn` to false.
|
||||
|
||||
**Status**
|
||||
- `HardwareDiscoveryParameters HardwareDiscoveryParams` - Field, instantiated inline.
|
||||
- `HardwareDiscoveryStatusInfo HardwareDiscoveryStatusInfo` - Field, instantiated inline.
|
||||
- `GlobalStatusInformation GlobalStatusInformation` - Field, instantiated inline.
|
||||
- `GlobalStatusParameters GlobalStatusParameters` - Field, instantiated inline.
|
||||
- `ConfigureStatusInformation ConfigureStatus` - Field, instantiated inline.
|
||||
- `ConfigureStatusParameters ConfigureParameters` - Field, instantiated inline.
|
||||
- `RealtimeStatusInformation RealtimeStatus` - Field, instantiated inline.
|
||||
- `RealtimeParameters RealtimeParams` - Field, instantiated inline.
|
||||
- `DiagnoseParameters DiagnoseParams` - Field, instantiated inline.
|
||||
- `DownloadParameters DownloadParams` - Field, instantiated inline.
|
||||
- `DownloadStatusInformation DownloadStatusInfo` - Field, instantiated inline.
|
||||
- `void Reset()` - Calls Reset() on most (but not all) child objects.
|
||||
|
||||
### Invariants
|
||||
- `GlobalStatusInformation` uses a single static lock object (`MyLock`) for thread-safety on all list operations.
|
||||
- A device cannot be in both low power and high power lists simultaneously; adding to one removes from the other.
|
||||
- A device can exist in multiple operational mode lists (e.g., both realtime and arm lists) - these are independent.
|
||||
- `Status.Reset()` does NOT call Reset on `DownloadParams` or `DownloadStatusInfo`.
|
||||
|
||||
### Dependencies
|
||||
- **Depends on**:
|
||||
- `DTS.Common.Enums.Sensors` (for `SensorConstants.DisableAutoSense`)
|
||||
- `DTS.Common.Interface.DASFactory` (for `IDASCommunication`)
|
||||
- **Depended on by**: Unclear from source alone - likely the main state machine orchestration layer.
|
||||
|
||||
### Gotchas
|
||||
- **Incomplete Reset**: `Status.Reset()` does not reset `DownloadParams` or `DownloadStatusInfo`, which could lead to stale state if not handled elsewhere.
|
||||
- **Missing type definitions**: Several types referenced in `Status` class (`HardwareDiscoveryParameters`, `HardwareDiscoveryStatusInfo`, `ConfigureStatusInformation`, `ConfigureStatusParameters`, `RealtimeStatusInformation`, `RealtimeParameters`, `DiagnoseParameters`, `DownloadParameters`, `DownloadStatusInformation`) are not defined in the provided source files.
|
||||
- **Field vs Property**: `Status` class exposes fields rather than properties for status/parameter objects, which may limit binding or serialization scenarios.
|
||||
|
||||
---
|
||||
@@ -0,0 +1,212 @@
|
||||
---
|
||||
source_files:
|
||||
- DataPRO/IService/StateMachine/StatusAndParameters/Configure/GroupChannelWithMeta.cs
|
||||
- DataPRO/IService/StateMachine/StatusAndParameters/Configure/ConfigureStatusParameters.cs
|
||||
- DataPRO/IService/StateMachine/StatusAndParameters/Configure/ConfigureStatusInformation.cs
|
||||
generated_at: "2026-04-17T15:41:27.157987+00:00"
|
||||
model: "zai-org/GLM-5-FP8"
|
||||
schema_version: 1
|
||||
sha256: "0a25ce0aa4784f4b"
|
||||
---
|
||||
|
||||
# Documentation: Configure State Machine Module
|
||||
|
||||
## 1. Purpose
|
||||
|
||||
This module provides the configuration state machine for Data Acquisition System (DAS) units, managing the complete lifecycle of hardware configuration including channel resolution, sensor-to-hardware mapping, configuration application, and diagnostic preparation. It serves as the orchestration layer between high-level test setup definitions and low-level hardware communication, supporting both automatic channel resolution (via EID lookup) and manual channel assignment with validation.
|
||||
|
||||
---
|
||||
|
||||
## 2. Public Interface
|
||||
|
||||
### `ConfigureStatusParameters` (Class)
|
||||
**Namespace:** `DTS.DASLib.Service.StateMachine`
|
||||
**Implements:** `IStatusParameters`
|
||||
|
||||
Configuration options container for the configure state machine.
|
||||
|
||||
#### Properties
|
||||
|
||||
| Property | Type | Default | Description |
|
||||
|----------|------|---------|-------------|
|
||||
| `RequireIdFoundForSensorsWithIds` | `bool` | `true` | Requires that sensors with IDs have their EID found during resolution |
|
||||
| `AllowMissingSensors` | `bool` | `false` | Permits channels without assigned sensors |
|
||||
| `AllowSensorsOutOfPosition` | `bool` | `true` | Allows sensors on different channels than originally specified |
|
||||
| `AllowSensorIdToBlankChannel` | `bool` | `false` | Permits assigning sensors with EIDs to unassigned hardware channels |
|
||||
| `TestSetupConfiguration` | `ITestSetup` | `null` | The test setup containing channel/group definitions |
|
||||
| `TurnOffExcitation` | `bool` | `false` | Triggers excitation shutdown process |
|
||||
| `UnitsToConfigure` | `IDASCommunication[]` | empty array | Target DAS units for configuration |
|
||||
| `DoStrictCheck` | `bool` | `true` | Enables strict validation during configuration |
|
||||
| `EventConfig` | `bool` | `true` | Writes to event/diagnostic file stores (SLICE legacy feature) |
|
||||
| `DummyConfig` | `bool` | `false` | Configures units without actual data collection |
|
||||
| `MaxAAF` | `double[]` | empty array | Maximum Anti-Alias Filter values for SLICE/TDAS |
|
||||
| `ConfigureDigitalOutputs` | `bool` | `true` | Whether to apply digital output configuration |
|
||||
| `TurnOffAAFRealtime` | `bool` | `true` | Disables AAF for realtime mode (performance optimization) |
|
||||
| `ResetHardwareEventLines` | `bool` | `false` | Resets hardware event lines before configuration |
|
||||
| `PrepareForDiagnostics` | `bool` | `false` | Enables excitation/switch preparation for diagnostics |
|
||||
| `SkipTurnOnPower` | `bool` | `false` | Skips power-on step to maintain low-power state |
|
||||
| `SetConfiguration` | `bool` | `true` | Whether to apply configuration at all |
|
||||
| `DiscardDiagnostics` | `bool` | `true` | Discards diagnostics during configuration |
|
||||
| `DSPFilterType` | `DSPFilterType` | from collection | DSP filter configuration |
|
||||
| `SampleRateLookup` | `IReadOnlyDictionary<string, double>` | empty | Serial number to sample rate mapping |
|
||||
| `AAFRateLookup` | `IReadOnlyDictionary<string, float>` | empty | Serial number to AAF rate mapping |
|
||||
|
||||
#### Delegates
|
||||
|
||||
| Delegate | Signature | Description |
|
||||
|----------|-----------|-------------|
|
||||
| `GetSensorDelegate` | `ISensorData(IGroupChannel)` | Retrieves sensor data for a group channel |
|
||||
| `GetSensorCalibrationDelegate` | `ISensorCalibration(ISensorData, ExcitationVoltageOption)` | Retrieves calibration for sensor/excitation combo |
|
||||
| `GetDatabaseIdDelegate` | `int(IDASCommunication)` | Retrieves database ID for a DAS unit |
|
||||
| `SetSensorCalibrationDelegate` | `void(ISensorData, ISensorCalibration)` | Sets calibration on a sensor |
|
||||
|
||||
#### Methods
|
||||
|
||||
- **`ConfigureStatusParameters()`** - Constructor; initializes `DSPFilterType` from `DSPFilterCollection`
|
||||
- **`void Reset()`** - Resets all properties to default values
|
||||
- **`string ToString()`** - Returns formatted string of all parameter values
|
||||
|
||||
---
|
||||
|
||||
### `ConfigureStatusInformation` (Class)
|
||||
**Namespace:** `DTS.DASLib.Service.StateMachine`
|
||||
**Implements:** `IStatusInfo`
|
||||
|
||||
Runtime status tracking and orchestration for the configuration process.
|
||||
|
||||
#### Nested Types
|
||||
|
||||
**`StatusValues` (Enum)**
|
||||
```
|
||||
ApplyingConfiguration, AutoResolvingChannels, ManuallyResolvedChannels,
|
||||
Completed, Cancelling, Cancelled, ChannelOutOfPosition, NoChannelsAssigned,
|
||||
AllChannelsResolved, EIDNotFound, ApplyConfigFailed, AppliedConfiguration,
|
||||
PrepareForDiagnostics, PrepareForDiagnosticsFailed, PrepareForDiagnosticsSuccess,
|
||||
LowPower, LowPowerSuccess, LowPowerFailure
|
||||
```
|
||||
|
||||
**`InvalidAssignmentException` (Exception)**
|
||||
- `Reasons` enum: `BlankChannel, NoSensor, ChannelDisabled, SensorNotFound, IncompatibleHardware, ChannelAlreadyAssigned, EID_Locked, EIDRequiredAndMissing, ChannelNotAssigned`
|
||||
- Properties: `IGroupChannel GroupChannel`, `Reasons Reason`
|
||||
|
||||
**`SensorCompatiblilityResponse` (Enum)** - `internal`
|
||||
```
|
||||
Compatible, DigitalInputNotSupportedOnHWChannel, DigitalInputModeNotSupportedOnHWChannel,
|
||||
BridgeModeNotSupportedOnHWChannel, SquibFireModeNotSupportedOnHWChannel,
|
||||
NoSupportedExcitationOnHWChannel
|
||||
```
|
||||
|
||||
#### Properties
|
||||
|
||||
| Property | Type | Description |
|
||||
|----------|------|-------------|
|
||||
| `NoChannelsAssigned` | `bool` | `true` when no channels are assigned |
|
||||
| `AllChannelsResolved` | `bool` | `true` when all channels are resolved |
|
||||
| `ChannelsOutOfPosition` | `bool` | `true` when channels are on different hardware than specified |
|
||||
| `HaveAppliedConfigAllUnits` | `bool` | `true` when all target units are configured |
|
||||
| `UnitsConfigured` | `IDASCommunication[]` | Successfully configured units |
|
||||
| `CancelEvent` | `ManualResetEvent` | Signals cancel request |
|
||||
| `DoneEvent` | `ManualResetEvent` | Signals work completion |
|
||||
| `CompleteAction` | `ActionCompleteDelegate` | Completion callback |
|
||||
| `ProgressAction` | `SetProgressValueDelegate` | Progress notification callback |
|
||||
| `StatusAction` | `StatusIntDelegate` | Status notification callback |
|
||||
| `StatusExAction` | `StatusExIntDelegate` | Extended status notification callback |
|
||||
|
||||
#### Methods
|
||||
|
||||
- **`Task Cancel()`** - Async; sets cancel event, waits for task completion, reports `Cancelling` then `Cancelled` status
|
||||
- **`void ApplyConfig()`** - Starts configuration process; checks `TurnOffExcitation` flag first; runs configuration in background task
|
||||
- **`void TurnOffExcitation()`** - Initiates low-power mode on all DAS units; runs in background task
|
||||
- **`void ManuallyResolveChannel(IGroupChannel channel, IDASChannel hardwareChannel)`** - Manually assigns a sensor channel to hardware; validates compatibility and throws `InvalidAssignmentException` on failure
|
||||
- **`void ManuallyUnresolveChannel(IGroupChannel channel)`** - Removes manual channel assignment; throws if channel not assigned or EID-locked
|
||||
- **`void Reset()`** - Resets all status properties to defaults
|
||||
|
||||
---
|
||||
|
||||
### `GroupChannelWithMeta` (Class)
|
||||
**Namespace:** `DTS.DASLib.Service.StateMachine.StatusAndParameters.Configure`
|
||||
**Access:** `internal`
|
||||
|
||||
Helper class for tracking channel resolution state.
|
||||
|
||||
#### Properties
|
||||
|
||||
| Property | Type | Description |
|
||||
|----------|------|-------------|
|
||||
| `ChannelConflict` | `bool` | Channel has conflicting assignment |
|
||||
| `ConflictingChannel` | `IGroupChannel` | Reference to conflicting channel |
|
||||
| `Channel` | `IGroupChannel` | The group channel being tracked |
|
||||
| `Group` | `IGroup` | Parent group reference |
|
||||
| `MissingID` | `bool` | EID not found during resolution |
|
||||
| `MissingSensor` | `bool` | No sensor assigned to channel |
|
||||
| `EIDOutOfPlace` | `bool` | EID found on different hardware than expected |
|
||||
| `HWNotFound` | `bool` | Hardware channel not found |
|
||||
| `HWChannelIncompatible` | `bool` | Hardware incompatible with sensor |
|
||||
| `DASChannel` | `IDASChannel` | Resolved hardware channel |
|
||||
| `AssignedByEID` | `bool` | Channel was auto-assigned via EID lookup |
|
||||
|
||||
---
|
||||
|
||||
## 3. Invariants
|
||||
|
||||
1. **Mutual Exclusion of Channel State**: A channel exists in either `_resolvedChannels` or `_unresolvedChannels`, never both simultaneously. Methods `AddResolvedChannel` and `AddUnresolvedChannel` both remove from the opposite list before adding.
|
||||
|
||||
2. **Thread-Safe Unit Tracking**: The `UnitsConfigured` array is modified exclusively through `AddConfiguredDevice`, which uses a static lock object (`MyLock`) to prevent race conditions.
|
||||
|
||||
3. **EID Lock Immutability**: Channels assigned via EID (`AssignedByEID = true`) cannot be manually unresolved or reassigned to different hardware.
|
||||
|
||||
4. **Task Synchronization**: `CancelEvent` and `DoneEvent` coordinate task lifecycle; `DoneEvent` is reset at the start of `ApplyConfig` and set upon completion.
|
||||
|
||||
5. **Configuration Bypass**: If `SetConfiguration` is `false`, the configuration application step is skipped entirely, proceeding directly to power/diagnostic preparation.
|
||||
|
||||
---
|
||||
|
||||
## 4. Dependencies
|
||||
|
||||
### This Module Depends On
|
||||
|
||||
| Namespace | Purpose |
|
||||
|-----------|---------|
|
||||
| `DTS.Common.Interface.Channels` | Channel interfaces (`IDASChannel`, `AnalogInputDASChannel`, `OutputSquibChannel`, `OutputTOMDigitalChannel`) |
|
||||
| `DTS.Common.Interface.DASFactory` | DAS communication and configuration interfaces (`IDASCommunication`, `IDASFactory`) |
|
||||
| `DTS.Common.Interface.DASFactory.Config` | Configuration data structures |
|
||||
| `DTS.Common.Interface.Sensors` | Sensor interfaces (`ISensorData`, `ISensorCalibration`) |
|
||||
| `DTS.Common.Interface.StatusAndProgressBar` | Status/callback delegates |
|
||||
| `DTS.Common.Interface.TestSetups.TestSetupsList` | Test setup interfaces (`ITestSetup`) |
|
||||
| `DTS.Common.Interface.Groups.GroupList` | Group/channel interfaces (`IGroup`, `IGroupChannel`) |
|
||||
| `DTS.Common.Classes.DSP` | DSP filter types and collections |
|
||||
| `DTS.Common.Enums` | `ExcitationVoltageOptions`, `DSPFilterType` |
|
||||
| `DTS.Common.Utilities.Logging` | `APILogger` for exception logging |
|
||||
| `DTS.DASLib.Service.StateMachine.StatusAndParameters.Configure` | `GroupChannelWithMeta` (same namespace) |
|
||||
|
||||
### External Service Dependencies (instantiated within)
|
||||
|
||||
| Service | Usage |
|
||||
|---------|-------|
|
||||
| `DiagnosticsService` | Prepare units for diagnostic mode |
|
||||
| `ArmingService` | Enter low-power mode |
|
||||
| `ConfigurationService` | Apply hardware configuration |
|
||||
|
||||
### Global State Dependencies
|
||||
|
||||
- **`States.Instance.Configure`** - Configuration state access
|
||||
- **`States.Instance.ConfigureStart`** - Alternate state access path
|
||||
- **`States.Instance.Configure.Status.GlobalStatusInformation`** - Global status tracking (e.g., `ExcitationOn` flag)
|
||||
|
||||
---
|
||||
|
||||
## 5. Gotchas
|
||||
|
||||
1. **Dual State Access Paths**: The code accesses `States.Instance.Configure` and `States.Instance.ConfigureStart` interchangeably. The relationship between these two paths is unclear from source alone—this may indicate a refactoring artifact or intentional state sharing.
|
||||
|
||||
2. **Hardcoded Timing Constants**: `PREPARE_SPIN_TIME` (200ms) and `EXPECTED_PREPARE_TIME` (8000ms) are hardcoded in `PrepareForDiagnostics`. These may not be appropriate for all hardware configurations.
|
||||
|
||||
3. **Cancel Latency**: The `Cancel` method includes a fixed 100ms `Thread.Sleep` to "simulate time spent waiting for cancel to be acknowledged." This may cause unexpected delays in time-sensitive scenarios.
|
||||
|
||||
4. **Exception Re-throw Pattern**: In `PrepareForDiagnostics`, exceptions are caught and re-thrown with `throw ex`, which destroys the original stack trace. This should be `throw` instead.
|
||||
|
||||
5. **Legacy SLICE Features**: The `EventConfig` property references a "legacy feature of sliceware" for multiple file stores. Not all units support this, but the source does not indicate which units do.
|
||||
|
||||
6. **Delegate Nullability**: Several delegate properties (`GetSensorAction`, `GetCalibrationAction`, `GetDatabaseIdAction`, `SetSensorCalibrationAction`) are not validated for null before invocation. Callers must ensure these are set.
|
||||
|
||||
7. **Array Initialization Pattern**: Properties like `MaxAAF`, `UnitsToConfigure`, `SampleRateLookup`, and `AAFRateLookup` are initialized to empty collections rather than null, but the source does not document whether consumers should replace these or modify them in-place.
|
||||
@@ -0,0 +1,17 @@
|
||||
---
|
||||
source_files:
|
||||
- DataPRO/IService/StateMachine/StatusAndParameters/Diagnose/DiagnoseParameters.cs
|
||||
generated_at: "2026-04-17T16:27:45.386214+00:00"
|
||||
model: "zai-org/GLM-5-FP8"
|
||||
schema_version: 1
|
||||
sha256: "05feb9b6c5cdbded"
|
||||
---
|
||||
|
||||
# Diagnose
|
||||
|
||||
### Purpose
|
||||
This module defines `DiagnoseParameters`, a configuration and state-tracking class used by a state machine during diagnostic operations. It controls diagnostic flow behavior (whether to proceed to realtime mode after completion) and tracks whether all units have passed diagnostic checks.
|
||||
|
||||
### Public Interface
|
||||
|
||||
**
|
||||
@@ -0,0 +1,64 @@
|
||||
---
|
||||
source_files:
|
||||
- DataPRO/IService/StateMachine/StatusAndParameters/Download/DownloadParameters.cs
|
||||
- DataPRO/IService/StateMachine/StatusAndParameters/Download/DownloadStatusInformation.cs
|
||||
generated_at: "2026-04-17T15:42:14.920523+00:00"
|
||||
model: "zai-org/GLM-5-FP8"
|
||||
schema_version: 1
|
||||
sha256: "bd941e1c9e197388"
|
||||
---
|
||||
|
||||
# Documentation: Download State Machine Components
|
||||
|
||||
## 1. Purpose
|
||||
|
||||
This module provides the parameter configuration and status management components for a download state machine within the DTS.DASLib.Service namespace. `DownloadParameters` serves as a data transfer object encapsulating all configuration, runtime parameters, and callbacks needed for download operations from DAS (Data Acquisition System) units. `DownloadStatusInformation` manages the execution state, progress reporting, and cancellation handling for asynchronous download operations, coordinating between the state machine, DAS hardware communication layer, and UI consumers through delegate callbacks.
|
||||
|
||||
---
|
||||
|
||||
## 2. Public Interface
|
||||
|
||||
### DownloadParameters Class
|
||||
|
||||
**Implements:** `IStatusParameters`
|
||||
|
||||
| Member | Signature | Description |
|
||||
|--------|-----------|-------------|
|
||||
| `ProceedWhenDone` | `bool { get; set; }` | Controls whether the state machine should remain in state after completion. Default: `false`. |
|
||||
| `RequireAllDASFinish` | `bool { get; set; }` | Determines whether all DAS units must complete their downloads. Default: `false`. |
|
||||
| `DefaultDownloadFolder` | `string { get; set; }` | Download folder path from configuration. Default: `string.Empty`. |
|
||||
| `DefaultUploadBinaries` | `bool { get; set; }` | Upload binaries setting from config. Default: `false`. |
|
||||
| `DefaultUploadExports` | `bool { get; set; }` | Upload exports setting from config. Default: `false`. |
|
||||
| `DefaultUploadLogs` | `bool { get; set; }` | Upload logs setting from config. Default: `false`. |
|
||||
| `DefaultUploadReports` | `bool { get; set; }` | Upload reports setting from config. Default: `false`. |
|
||||
| `DefaultUploadSetups` | `bool { get; set; }` | Upload test setups setting from config. Default: `false`. |
|
||||
| `DASList` | `IDASCommunication[] { get; set; }` | Array of DAS units to download from. Default: empty array. |
|
||||
| `CurrentTestTestId` | `string { get; set; }` | Test ID of current test. Default: `string.Empty`. |
|
||||
| `CurrentTestTestIdNode` | `string { get; set; }` | Test ID node of current test. Default: `string.Empty`. |
|
||||
| `CurrentTestTestDirectory` | `string { get; set; }` | Test directory location. Default: `string.Empty`. |
|
||||
| `CurrentTestOriginalTestDirectory` | `string { get; set; }` | Original test directory location. Default: `string.Empty`. |
|
||||
| `ROI` | `bool { get; set; }` | Indicates ROI (Region of Interest) mode. Default: `false`. |
|
||||
| `Recovery` | `bool { get; set; }` | Indicates Recovery mode. Default: `false`. |
|
||||
| `FoldersCopied` | `bool { get; set; }` | Prevents unnecessary re-copying of folders (DASConfigs, SETUP, etc.) when running from Download tile. |
|
||||
| `ErrorCallback` | `ErrorCallback { get; set; }` | Callback for error handling. |
|
||||
| `Reset` | `void Reset()` | Resets all parameters to default values. Does NOT reset `FoldersCopied`, `ProceedWhenDone`, or `RequireAllDASFinish`. |
|
||||
| `ToString` | `string ToString()` | Returns empty string (implementation appears incomplete). |
|
||||
|
||||
### DownloadStatusInformation Class
|
||||
|
||||
**Implements:** `IStatusInfo`
|
||||
|
||||
| Member | Signature | Description |
|
||||
|--------|-----------|-------------|
|
||||
| `StatusValues` | `enum` | Status values for consumer notification: `Preparing`, `Downloading`, `CaptureAttributes`, `Failed`, `ROIFailed`, `Completed`, `Cancelling`, `Cancelled`, `CancelledPartial`, `DownloadDirectory`, `MissingHardware`, `NoDataToDownload`, `NotAllChannelsDownloaded`, `ExistingFiles`, `CleaningUp`, `QueryEventData`. |
|
||||
| `CancelEvent` | `ManualResetEvent` | Signals that cancel was requested. Initialized to `false` (non-signaled). |
|
||||
| `DoneEvent` | `ManualResetEvent` | Signals when download operation is finished. Initialized to `false`. |
|
||||
| `CompleteAction` | `ActionCompleteDelegate { get; set; }` | Action invoked on completion. |
|
||||
| `ProgressAction` | `SetProgressValueDelegate { get; set; }` | Action invoked for progress notifications. |
|
||||
| `StatusAction` | `StatusIntDelegate { get; set; }` | Action invoked for status notifications. |
|
||||
| `StatusExAction` | `StatusExIntDelegate { get; set; }` | Action invoked for extended status notifications. |
|
||||
| `AllDASFinished` | `bool { get; set; }` | Indicates whether all DAS units completed download. Default: `false`. |
|
||||
| `Reset` | `void Reset()` | Resets status fields to defaults and nulls all delegate actions. |
|
||||
| `Download` | `void Download()` | Starts asynchronous download operation; returns immediately. Spawns internal task via `Task.Run()`. |
|
||||
| `Cancel` | `async Task Cancel()` | Requests cancellation and waits for acknowledgment. Sets `CancelEvent`, invokes `Cancelling` status, waits 100ms, then waits on `DoneEvent`, and invokes `Cancelled` status. |
|
||||
| `DirectoryCopy` | `bool DirectoryCopy(string sourceDirName, string destDirName, bool copySubDirs, DownloadParameters param, ref bool copied, bool uploadingData)` | Copies directory contents
|
||||
@@ -0,0 +1,27 @@
|
||||
---
|
||||
source_files:
|
||||
- DataPRO/IService/StateMachine/StatusAndParameters/HardwareDiscovery/HardwareDiscoveryParameters.cs
|
||||
generated_at: "2026-04-17T15:41:51.740392+00:00"
|
||||
model: "zai-org/GLM-5-FP8"
|
||||
schema_version: 1
|
||||
sha256: "6758fa7750cb111c"
|
||||
---
|
||||
|
||||
# HardwareDiscoveryParameters Documentation
|
||||
|
||||
## 1. Purpose
|
||||
|
||||
`HardwareDiscoveryParameters` is a configuration data class used by a state machine to control hardware discovery behavior for DAS (Data Acquisition System) devices. It encapsulates all parameters needed for discovering, connecting to, and validating hardware components—including IP address ranges to scan, known device types (TDAS vs SLICE), connection timeouts, hardware validation checks, and callback delegates for querying device metadata. This class serves as the input specification for the hardware discovery state within a larger state machine workflow.
|
||||
|
||||
---
|
||||
|
||||
## 2. Public Interface
|
||||
|
||||
### Properties
|
||||
|
||||
| Property | Type | Default | Description |
|
||||
|----------|------|---------|-------------|
|
||||
| `ReadIds` | `bool` | `false` | Controls whether device IDs should be read during discovery. |
|
||||
| `Addresses` | `string[]` | `new string[0]` | Explicit IP addresses to connect to. If not specified in known TDAS or SLICE lists, connection will be attempted as both device types. |
|
||||
| `AddressRanges` | `Tuple<string, string>[]` | `new Tuple<string, string>[0]` | IP address ranges to ping. Each tuple defines a range from the first address up to the 4th byte of the second address. Responding IPs are added to connection candidates. |
|
||||
| `KnownTDASIPAddresses` | `string[]` | `new string[0]` |
|
||||
@@ -0,0 +1,34 @@
|
||||
---
|
||||
source_files:
|
||||
- DataPRO/IService/StateMachine/StatusAndParameters/Realtime/RealtimeParameters.cs
|
||||
- DataPRO/IService/StateMachine/StatusAndParameters/Realtime/RealtimeStatusInformation.cs
|
||||
generated_at: "2026-04-17T15:41:52.943128+00:00"
|
||||
model: "zai-org/GLM-5-FP8"
|
||||
schema_version: 1
|
||||
sha256: "6c622a99f8df2e9c"
|
||||
---
|
||||
|
||||
# Documentation: Realtime State Machine Components
|
||||
|
||||
## 1. Purpose
|
||||
|
||||
This module provides the parameter configuration and status management components for a realtime data acquisition state machine. `RealtimeParameters` serves as a data transfer object holding all configuration needed to initiate realtime polling operations across DAS (Data Acquisition System) hardware units. `RealtimeStatusInformation` manages the runtime state of realtime operations, including thread synchronization primitives, callback handling, and the orchestration of starting/stopping realtime data collection via the `RealtimeService`.
|
||||
|
||||
---
|
||||
|
||||
## 2. Public Interface
|
||||
|
||||
### RealtimeParameters (implements `IStatusParameters`)
|
||||
|
||||
| Member | Signature | Description |
|
||||
|--------|-----------|-------------|
|
||||
| `UnitsToStartRealtime` | `List<IDASCommunication>` | Collection of DAS communication units to start realtime mode on. |
|
||||
| `RealtimeDelayBetweenPollsInMilliSecond` | `int` | Delay interval between polling cycles in milliseconds. |
|
||||
| `AllowMultipleSampleRealtime` | `bool` | Flag indicating whether multiple sample realtime mode is permitted. |
|
||||
| `UseSingleSampleMode` | `bool` | Flag to enable single sample mode (uses `StartActivePolling` instead of `Start`). |
|
||||
| `ModuleIndices` | `List<int>` | List of module array indices for realtime operations. |
|
||||
| `IdasToActiveChannels` | `Dictionary<IDASCommunication, byte[]>` | Maps each DAS unit to its active channel configuration. |
|
||||
| `RealtimeSampleRate` | `double` | Sample rate for realtime acquisition. |
|
||||
| `RealtimeSampleRateAAFilterRatio` | `byte` | Ratio used to calculate Anti-Alias Filter frequency. |
|
||||
| `SliceTurnOffAAFRealtime` | `bool` | Flag to disable AAF for Slice hardware during realtime. |
|
||||
| `Reset()` | `
|
||||
Reference in New Issue
Block a user