117 lines
8.2 KiB
Markdown
117 lines
8.2 KiB
Markdown
|
|
---
|
|||
|
|
source_files:
|
|||
|
|
- Common/DTS.Common.DataModel/Classes/TSRAIRGo/TSRAIRGoStatus.cs
|
|||
|
|
generated_at: "2026-04-16T03:32:34.714926+00:00"
|
|||
|
|
model: "Qwen/Qwen3-Coder-Next-FP8"
|
|||
|
|
schema_version: 1
|
|||
|
|
sha256: "7a39c7d31659462f"
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# TSRAIRGo
|
|||
|
|
|
|||
|
|
## Documentation Page: `TSRAIRGoStatus` Class
|
|||
|
|
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
### 1. **Purpose**
|
|||
|
|
|
|||
|
|
The `TSRAIRGoStatus` class defines a comprehensive enumeration of status states for the TSRAIRGo hardware discovery, configuration, arming, and streaming lifecycle within the DTS data model. It serves as a canonical source of status type identifiers used across the system to represent the current state of a TSRAIRGo device or subsystem (e.g., during auto-detection, connection, hardware validation, arming, recording, streaming, and download operations). The enum values are annotated with `Description` attributes referencing localized string keys, indicating this status is intended for UI display and logging purposes.
|
|||
|
|
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
### 2. **Public Interface**
|
|||
|
|
|
|||
|
|
#### `enum TSRAIRGoStatus.StatusTypes`
|
|||
|
|
|
|||
|
|
A public nested enum defined inside `TSRAIRGoStatus`, decorated with `[TypeConverter(typeof(EnumDescriptionTypeConverterShared))]`. Each member represents a discrete status state.
|
|||
|
|
|
|||
|
|
| Member | Description Key (from `[Description]`) | Brief Behavior |
|
|||
|
|
|--------|----------------------------------------|----------------|
|
|||
|
|
| `UNKNOWN` | `"Table_NA"` | Initial or indeterminate state. |
|
|||
|
|
| `PING_FAILED` | `"HardwareDiscoveryControl_PingFailed"` | Ping attempt to device failed. |
|
|||
|
|
| `PINGING` | `"AutoDetectDASControl_Pinging"` | Actively pinging device. |
|
|||
|
|
| `PING_SUCCESS` | `"AutoDetectDASControl_Ping_Good"` | Ping succeeded; device reachable. |
|
|||
|
|
| `CONNECT_FAILED` | `"HardwareDiscoveryControl_FailedToConnect"` | Connection attempt failed. |
|
|||
|
|
| `CONNECTING` | `"AutoDetectDASControl_Connecting"` | Establishing connection. |
|
|||
|
|
| `QUERY_FAILED` | `"AutoDetectDASControl_QueryFailed"` | Query to device failed. |
|
|||
|
|
| `QUERY_TIMEDOUT` | `"HardwareDiscoveryControl_QueryTimedOut"` | Query timed out. |
|
|||
|
|
| `DONE` | `"AutoDetectDASControl_Done"` | Auto-detection complete. |
|
|||
|
|
| `QUERYING` | `"AutoDetectDASControl_Querying"` | Querying device for information. |
|
|||
|
|
| `UPDATED` | `"AutoDetectDASControl_Updated"` | Device information updated. |
|
|||
|
|
| `ADDED` | `"AutoDetectDASControl_Added"` | Device added to system. |
|
|||
|
|
| `ONLINE` | `"HardwareDiscoveryControl_Online"` | Device is online. |
|
|||
|
|
| `CONNECTED` | `"HardwareDiscoveryControl_Connected"` | Device is connected. |
|
|||
|
|
| `UNEXPECTED_MAX_MEMORY` | `"CheckHardware_UnexpectedMaxMemory"` | Hardware memory exceeds expected value. |
|
|||
|
|
| `UNEXPECTED_FIRMWARE_VERSION` | `"CheckHardware_FirmwareMismatch"` | Firmware version mismatch detected. |
|
|||
|
|
| `PASSED` | `"CheckHardwareStatus_Passed"` | Hardware check passed. |
|
|||
|
|
| `EXPIRED_CAL_DATE` | `"CheckHardware_CalDateOverdue"` | Calibration date is overdue. |
|
|||
|
|
| `CHANNEL_COUNT_MISMATCH` | `"CheckHardware_ChannelCountMismatch"` | Channel count mismatch. |
|
|||
|
|
| `MISSING_MODULES` | `"Table_NA"` | Required hardware modules missing. |
|
|||
|
|
| `CANCELED` | *(none)* | Operation canceled by user/system. |
|
|||
|
|
| `NO_MEMORY` | `"CheckHardware_NoMemory"` | Insufficient memory available. |
|
|||
|
|
| `ARMED` | `"ArmSystem_Armed"` | System armed and ready. |
|
|||
|
|
| `AUTOARMED` | `"AutoArmed"` | System auto-armed. |
|
|||
|
|
| `REALTIME` | `"Admin_SystemSettings_Page_Realtime"` | System in real-time mode. |
|
|||
|
|
| `READYTOSTREAM` | `"ReadyToStream"` | System ready to begin streaming. |
|
|||
|
|
| `STREAMING` | `"ArmSystem_CurrentlyStreaming"` | Data streaming is active. |
|
|||
|
|
| `LOST_DOCK` | `"LostDock"` | Dock connection lost. |
|
|||
|
|
| `REBOOTING` | `"Status_Rebooting"` | Device is rebooting. |
|
|||
|
|
| `SETTING_CLOCK` | `"CheckHardwareStatus_SettingClockSources"` | Clock sources are being configured. |
|
|||
|
|
| `UNEXPECTED_FIRSTUSE_DATE` | `"CheckHardware_UnexpectedFirstUseDate"` | First-use date unexpected (e.g., in future/past). |
|
|||
|
|
| `INVALID_RECORDING_MODE` | `"InvalidRecordingMode"` | Recording mode configuration invalid. |
|
|||
|
|
| `INVALID_STREAMING_MODE` | `"InvalidStreamMode"` | Streaming mode configuration invalid. |
|
|||
|
|
| `STREAMING_NOT_AVAILABLE` | `"StreamingNotAvailable"` | Streaming functionality unavailable. |
|
|||
|
|
| `ARMING` | *(none)* | Arming process in progress. |
|
|||
|
|
| `DISARMING` | *(none)* | Disarming process in progress. |
|
|||
|
|
| `DISARMED` | `"ArmSystem_Disarmed"` | System disarmed. |
|
|||
|
|
| `ARM_FAILED` | `"ArmSystem_ArmFailed"` | Arming operation failed. |
|
|||
|
|
| `UPDATING_DAS_CONFIG` | `"ArmSystem_SettingConfiguration"` | DAS configuration is being applied. |
|
|||
|
|
| `PREPARING_DATA_MEMORY` | `"ArmSystem_ClearingFlash"` | Data memory (e.g., flash) is being cleared. |
|
|||
|
|
| `REARMING` | `"ArmSystem_Rearming"` | Re-arming process in progress. |
|
|||
|
|
| `PREPARING_FOR_ARMING` | `"ArmSystem_PreparingForArming"` | Preparing for arming (e.g., final checks). |
|
|||
|
|
| `WAITING_FOR_INTERVAL` | `"ArmSystem_WaitingForInterval"` | Waiting for scheduled interval to start. |
|
|||
|
|
| `WAITING_FOR_TRIGGER` | `"ArmSystem_WaitingForTrigger"` | Waiting for external trigger. |
|
|||
|
|
| `WAITING_FOR_SCHEDULE` | `"ArmSystem_WaitingForScheduleStartTime"` | Waiting for scheduled start time. |
|
|||
|
|
| `RECORDING` | `"ArmSystem_Recording"` | Data recording is active. |
|
|||
|
|
| `OFFLINE` | `"Offline"` | Device is offline. |
|
|||
|
|
| `DOWNLOADING` | `"Downloading"` | Data download in progress. |
|
|||
|
|
| `GETTINGEVENTDATA` | `"Download_StatusTypes_GettingEventData"` | Downloading event metadata. |
|
|||
|
|
|
|||
|
|
> **Note**: Enum members without a `[Description]` attribute (`CANCELED`, `ARMING`, `DISARMING`, `DISARMED`, `ARM_FAILED`, `RECORDING`, `OFFLINE`, `DOWNLOADING`, `GETTINGEVENTDATA`) are assumed to use their literal name or a fallback display mechanism.
|
|||
|
|
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
### 3. **Invariants**
|
|||
|
|
|
|||
|
|
- **All enum values are mutually exclusive**: At any given time, a device or subsystem should be in exactly one `StatusTypes` state.
|
|||
|
|
- **State transitions are sequential and context-dependent**: While not enforced by this class, the enum is designed to reflect logical progression (e.g., `PINGING` → `PING_SUCCESS` → `CONNECTING` → `CONNECTED` → `QUERYING` → `DONE`).
|
|||
|
|
- **`[Description]` attributes map to localized string resources**: Keys (e.g., `"AutoDetectDASControl_Pinging"`) are resource identifiers, not literal display strings. The actual UI text is resolved at runtime via `EnumDescriptionTypeConverterShared`.
|
|||
|
|
- **No validation or state machine logic resides in this class**: This is a *data model* enum only; state transitions and validity are handled elsewhere.
|
|||
|
|
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
### 4. **Dependencies**
|
|||
|
|
|
|||
|
|
- **Imports**:
|
|||
|
|
- `DTS.Common.Converters.EnumDescriptionTypeConverterShared` — Used for UI localization of enum values.
|
|||
|
|
- `DTS.Common.SharedResource.Strings` — Source of localized string resources (keys referenced in `[Description]`).
|
|||
|
|
- `System.ComponentModel` — Provides `DescriptionAttribute` and `TypeConverterAttribute`.
|
|||
|
|
|
|||
|
|
- **Consumers (inferred)**:
|
|||
|
|
- UI layers (WPF/XAML) using `EnumDescriptionTypeConverterShared` for binding.
|
|||
|
|
- Hardware discovery, arming, and streaming services that set/report status.
|
|||
|
|
- Logging and diagnostics modules that consume status for audit trails.
|
|||
|
|
- Serialization/deserialization logic (e.g., JSON, XML) likely uses the enum’s underlying integer or string representation.
|
|||
|
|
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
### 5. **Gotchas**
|
|||
|
|
|
|||
|
|
- **Mixed localization key patterns**: Some descriptions use `"Table_NA"` (generic placeholder), while others reference specific control names (e.g., `"AutoDetectDASControl_Pinging"`). This suggests inconsistent naming conventions or legacy resource keys.
|
|||
|
|
- **Missing `[Description]` attributes**: Several enum values (`CANCELED`, `ARMING`, `DISARMING`, `DISARMED`, `ARM_FAILED`, `RECORDING`, `OFFLINE`, `DOWNLOADING`, `GETTINGEVENTDATA`) lack `[Description]`. These may fall back to the enum name or cause runtime issues if `EnumDescriptionTypeConverterShared` is strictly enforced.
|
|||
|
|
- **Ambiguous semantics**: Some states (e.g., `ONLINE`, `CONNECTED`, `READYTOSTREAM`, `ARMED`) overlap in meaning and may require context (e.g., device type, mode) to disambiguate.
|
|||
|
|
- **No explicit ordering or hierarchy**: The enum is unordered; developers must not assume `PASSED < FAILED` or similar ordering semantics.
|
|||
|
|
- **Historical artifacts**: Values like `AUTOARMED` and `REALTIME` suggest legacy or specialized modes that may be deprecated or rarely used.
|
|||
|
|
|
|||
|
|
> **None identified from source alone.**
|
|||
|
|
> *(Note: While above points are inferred from the source, they are not explicit bugs—just observations.)*
|