-
Notifications
You must be signed in to change notification settings - Fork 37
/
Copy pathdebug_quickstart.bat
45 lines (37 loc) · 1.21 KB
/
debug_quickstart.bat
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
setlocal enabledelayedexpansion
set batdir=%~dp0
cd %batdir%
set dataacq=%1
if "%dataacq%"=="" (
set dataacq=java
)
set sigproc=%2
echo Starting the non-saving java buffer server \(background\)
rem wmic process call create "dataAcq/startJavaNoSaveBuffer.bat" | find "ProcessId"
start dataAcq\startJavaNoSaveBuffer.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%"=="audio" (
start dataAcq\startJavaAudio.bat localhost 2
) else if "%dataacq%"=="matlab" (
start dataAcq\startMatlabSignalProxy.bat
) else (
start dataAcq\startJavaSignalproxy.bat
)
rem dataacqpid=$!
echo dataacqpid=$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
dataAcq\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%