State Diagrams
Device State Machine
This state diagram shows all possible device states and the transitions between them, including guards and actions.
State Descriptions
Device States:
| State | Description | Allowed Actions |
|---|---|---|
| Disconnected | No active connection to device | Connect |
| Connecting | Establishing connection | Cancel |
| Connected | Connected but not configured | Configure, Disconnect, Check Impedance |
| Configuring | Applying device settings | Cancel |
| Ready | Configured and ready to stream | Start Stream, Disconnect |
| Streaming | Actively receiving data | Pause, Stop, Monitor |
| Paused | Streaming suspended | Resume, Stop |
| Error | Recoverable error state | Retry, Reset |
| Reconnecting | Attempting automatic recovery | Cancel |
| Failed | Unrecoverable error | Manual Reset |
Composite States:
- Connected: Contains sub-states for impedance checking
- Streaming: Contains sub-states for buffer management
Processing Pipeline State Machine
This state diagram shows the states and transitions for the real-time neural data processing pipeline.
Pipeline States
Pipeline States:
| State | Description | Processing Rate |
|---|---|---|
| Idle | No active processing | 0 samples/s |
| Initializing | Loading models, allocating buffers | N/A |
| Ready | Waiting for data | 0 samples/s |
| Processing | Active data processing | 250-1000 samples/s |
| Buffering | Accumulating data for batch | Variable |
| FeatureExtraction | Computing features | ~10 windows/s |
| Classification | ML inference | ~10 predictions/s |
| Publishing | Sending results | Async |
| Error | Recoverable error state | 0 samples/s |
| Recovery | Attempting auto-recovery | N/A |
| Failed | Unrecoverable error | 0 samples/s |
Composite State Details:
- Processing: Receiving → Validating → Filtering → Windowing
- FeatureExtraction: Spectral → Temporal → Connectivity analysis
- Classification: Model loading → Inference → Post-processing
System Error Recovery State Machine
This state diagram shows the comprehensive error handling and recovery mechanisms across the system.
Error Categories
System Error Categories:
| Error Level | Examples | Impact | Auto-Recovery |
|---|---|---|---|
| Minor | Single packet loss | Minimal | Yes |
| Minor | Cache miss | Performance | Yes |
| Minor | Slow query | Latency | Yes |
| Major | Device disconnect | Service degradation | Partial |
| Major | Database connection lost | Data availability | Partial |
| Major | Service crash | Feature unavailable | Partial |
| Critical | Data corruption | Data integrity | No |
| Critical | Security breach | System compromise | No |
| Critical | Hardware failure | Total outage | No |
Recovery Time Objectives:
- Minor errors: < 1 minute
- Major errors: < 5 minutes
- Critical errors: < 30 minutes
- Full restoration: < 2 hours
Last updated on