You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When another application (e.g., Net Station Acquisition) has already started the amplifier, the CLI's behavior depends on whether you pass any rate or mode flags.
65
+
66
+
### Default: Non-Destructive Attach
67
+
68
+
With no rate flags, the CLI detects the running amplifier, measures its current sample rate from the data stream, and attaches without disrupting the existing session:
69
+
70
+
```bash
71
+
# Attaches to whatever rate/mode the amp is already using
72
+
./EGIAmpServerCLI --address 10.10.10.51
73
+
```
74
+
75
+
This is safe to use alongside Net Station — it will not stop or reconfigure the amplifier.
76
+
77
+
### Forcing a Rate or Mode
78
+
79
+
The following flags cause the CLI to stop, reconfigure, and restart the amplifier — even if it was started by another application:
80
+
81
+
-`--sample-rate <hz>` — reinitializes if the detected rate differs from the requested rate
82
+
-`--fast-recovery` — reinitializes to ensure native (unfiltered) mode
83
+
-`--align-timestamps` — reinitializes at 500/1000 Hz to ensure decimated (filtered) mode, since the operating mode cannot be distinguished from the data stream alone
84
+
85
+
**Warning**: Reinitialization will interrupt any active Net Station recording. If you need to coexist with Net Station, omit these flags and let the CLI match the existing configuration.
86
+
87
+
### Recovery During Streaming
88
+
89
+
If the amplifier is stopped or restarted externally while the CLI is streaming:
90
+
91
+
-**Amp powered off by another app** (e.g., Net Station clicks "Off"): The CLI detects stream loss and attempts to reinitialize the amplifier with its original settings.
92
+
-**Amp restarted by another app** (e.g., Net Station reconnects): The CLI detects the new stream, adapts to whatever rate the other app configured, and recreates its LSL outlets if the rate changed.
93
+
-**Amp power-cycled or shutdown**: The CLI waits up to 120 seconds for recovery before giving up.
94
+
62
95
## Sample Rate Modes
63
96
64
97
The NA400/NA410 amplifiers support two operating modes that affect anti-aliasing and latency:
@@ -357,7 +390,7 @@ The mock server generates synthetic sine waves (10-50 Hz) with noise for the EEG
357
390
358
391
## Net Station Acquisition Compatibility
359
392
360
-
When the user
393
+
See also [Connecting to an Already-Running Amplifier](#connecting-to-an-already-running-amplifier) for details on how the CLI behaves when attaching to an amp started by Net Station.
361
394
362
395
### Behavior When EGIAmpServer is Streaming First
363
396
@@ -399,7 +432,7 @@ When using this application alongside Net Station Acquisition:
399
432
-**Recommended workflow**:
400
433
1. Start Net Station Acquisition
401
434
2. Initialize the amplifier at your desired sample rate (click "On")
402
-
3. Start EGIAmpServer and click "Link" - it will detect the running amp and match its sample rate
435
+
3. Start EGIAmpServer (GUI: click "Link", or CLI: run with no rate flags) — it will detect the running amp and match its sample rate
403
436
4. Both applications will now receive data at the correct rate
0 commit comments