75 lines
4.6 KiB
Markdown
75 lines
4.6 KiB
Markdown
---
|
|
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.
|
|
|
|
--- |