47 lines
1.5 KiB
Markdown
47 lines
1.5 KiB
Markdown
|
|
---
|
||
|
|
source_files:
|
||
|
|
- DataPRO/StateMachine.Tests/States/RealtimeShould.cs
|
||
|
|
- DataPRO/StateMachine.Tests/States/ConfigureShould.cs
|
||
|
|
- DataPRO/StateMachine.Tests/States/RealtimeStartShould.cs
|
||
|
|
- DataPRO/StateMachine.Tests/States/DiagnoseShould.cs
|
||
|
|
- DataPRO/StateMachine.Tests/States/HardwareDiscoveryStartShould.cs
|
||
|
|
generated_at: "2026-04-17T15:52:23.970516+00:00"
|
||
|
|
model: "zai-org/GLM-5-FP8"
|
||
|
|
schema_version: 1
|
||
|
|
sha256: "ca0ada14242b6e01"
|
||
|
|
---
|
||
|
|
|
||
|
|
# StateMachine Module Documentation
|
||
|
|
|
||
|
|
## 1. Purpose
|
||
|
|
|
||
|
|
This module implements a state machine for managing system operational states within the DTS.DASLib.Service namespace. It provides state transition logic for a data acquisition system (DAS) that progresses through hardware discovery, configuration, diagnostics, download, arming, and realtime operation phases. Each state class encapsulates its own transition logic via a `StateSelector()` method that determines the next appropriate state based on runtime status and parameter conditions.
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
## 2. Public Interface
|
||
|
|
|
||
|
|
### State Enum
|
||
|
|
An enumeration defining all possible system states. Observed values include:
|
||
|
|
- `State.HardwareDiscoveryStart`
|
||
|
|
- `State.HardwareDiscovery`
|
||
|
|
- `State.Configure`
|
||
|
|
- `State.ConfigureStart`
|
||
|
|
- `State.Download`
|
||
|
|
- `State.Arm`
|
||
|
|
- `State.Diagnose`
|
||
|
|
- `State.RealtimeStart`
|
||
|
|
- `State.Realtime`
|
||
|
|
|
||
|
|
### Realtime Class
|
||
|
|
**Properties:**
|
||
|
|
- `State` — Returns `State.Realtime`
|
||
|
|
|
||
|
|
**Methods:**
|
||
|
|
- None observed in tests (terminal state).
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
### Configure Class
|
||
|
|
**Methods:**
|
||
|
|
- `StateSelector()` — Returns a `dasState` object with `State.ConfigureStart
|