SPECTROMETER=192.168.2.199
PORT=2054  #initialization
PORT2=2055 #commands
#GetPlasma=`cat ../../../basicdiagn/Plasma`
#GetShot=`cat ../../../ShotNo`
#GetShot=`cat ShotNo`


acquisition:

plots:
	python2 detect_signal.py
	
session:
	if ping -c1 -w1 $(SPECTROMETER) > /dev/null ;\
	then\
	    echo PREPARE  | nc $(SPECTROMETER)  $(PORT) -q 0 >> /dev/null  ;\    #signal for SPECTROMETER to prepare
	fi
	
endsession:
	 echo 0 | nc $(SPECTROMETER)  $(PORT2)   -q 0 

arming:
	echo "Activating visible light spectrometer"|tee -a /home/svoboda/GOLEM/web/roperation/RemoteTokamak/actions.log
	if ping -c1 -w1 $(SPECTROMETER) > /dev/null ;\
	then\
	    cat /golem/database/velin/generate_dynamic_shots/currentshot/ShotNo |  nc $(SPECTROMETER)  $(PORT2)   -q 0;\
	else\
	    echo COMPUTER FOR SPECTROMETER IS NOT ACCESSIBLE !!!;\
	fi
	    
