-
Notifications
You must be signed in to change notification settings - Fork 37
Expand file tree
/
Copy patheeg_quickstart.bat
More file actions
46 lines (38 loc) · 1.19 KB
/
eeg_quickstart.bat
File metadata and controls
46 lines (38 loc) · 1.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
setlocal enabledelayedexpansion
set batdir=%~dp0
cd %batdir%\dataAcq
set dataacq=%1
if "%dataacq%"=="" (
set dataacq=mobita
)
set sigproc=%2
echo Starting the java buffer server \(background\)
rem wmic process call create "dataAcq/startJavaNoSaveBuffer.bat" | find "ProcessId"
start startJavaBuffer.bat
rem Weird windows hack to sleep for 2 secs to allow the buffer server to start
ping 127.0.0.1 -n 3 > nul
echo Starting the data acquisation device %dataacq% \(background\)
if "%dataacq%"=="mobita" (
start startMobita.bat localhost 2
) else if "%dataacq%"=="biosemi" (
start startBiosemi.bat
) else if "%dataacq%"=="eego" (
start startEego.bat
) else (
echo Dont recognise the eeg device type
)
rem dataacqpid=$!
if defined sigproc (
if "%sigproc%"=="1" (
echo Starting the default signal processing function \(background\)
start ..\matlab\signalProc\startSigProcBuffer.bat
rem sigprocpid=$!
)
)
echo Starting the event viewer
startJavaEventViewer.bat
rem Cleanup all the processes we started
rem TODO: make this work, getting the pid of started process seems very hard in windows....
rem taskkill /pid %bufferpid%
rem taskkill /pid %dataacqpid%
rem taskkill /pid %sigprocpid%