mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-23 18:17:59 +02:00
Dev/remove gotthard i (#1108)
* slsSupportLib done, at receiver rooting out in implementation * removed from receiver and client * removed everywhere except gui, python and client(commands.yaml and Detector.h) * updated python * fixed autocomplete to print what the issue is if there is one with ToString when running the autocomplete script to generate fixed.json. updated readme.md in generator folder * formatting * removed enums for dacs * udpating autocomplete and generating commands * removed gotthard from docs and release notes * removed dac test * bug from removing g1 * fixed virtual test for xilinx, was minor. so in this PR * gui done * binary in merge fix * formatting and removing enums * updated fixed and dump.json * bash autocomplete * updated doc on command line generation * removing increments in dac enums for backward compatibility. Not required * removed ROI from rxParameters (only in g1), not needed to be backward compatible * removed the phase shift option from det server staruip
This commit is contained in:
@ -78,6 +78,9 @@ def get_literal(ifstmt):
|
||||
stringliteral = implicitCastExpr['inner'][0]['value'][1:-1]
|
||||
|
||||
retstmt = get_object_by_kind(ifstmt['inner'], 'ReturnStmt')
|
||||
if retstmt is None:
|
||||
print(f"Error: No 'ReturnStmt' found in: {ifstmt['inner']}")
|
||||
exit(1)
|
||||
declrefexpt = get_object_by_kind(retstmt['inner'], 'DeclRefExpr')
|
||||
enum_val = declrefexpt["referencedDecl"]["name"]
|
||||
|
||||
|
@ -80,7 +80,7 @@ _sd() {
|
||||
local IS_PATH=0
|
||||
|
||||
|
||||
local SLS_COMMANDS=" acquire activate adcclk adcenable adcenable10g adcindex adcinvert adclist adcname adcphase adcpipeline adcreg adcvpp apulse asamples autocompdisable badchannels blockingtrigger burstmode burstperiod bursts burstsl bustest cdsgain chipversion clearbit clearbusy clearroi clientversion clkdiv clkfreq clkphase collectionmode column compdisabletime confadc config configtransceiver counters currentsource dac dacindex daclist dacname dacvalues datastream dbitclk dbitphase dbitpipeline defaultdac defaultpattern delay delayl detectorserverversion detsize diodelay dpulse dr drlist dsamples execcommand exptime exptime1 exptime2 exptime3 exptimel extrastoragecells extsampling extsamplingsrc extsig fformat filtercells filterresistor findex firmwaretest firmwareversion fliprows flowcontrol10g fmaster fname foverwrite fpath framecounter frames framesl frametime free fwrite gaincaps gainmode gappixels gatedelay gatedelay1 gatedelay2 gatedelay3 gates getbit hardwareversion highvoltage hostname im_a im_b im_c im_d im_io imagetest initialchecks inj_ch interpolation interruptsubframe kernelversion lastclient led lock master maxadcphaseshift maxclkphaseshift maxdbitphaseshift measuredperiod measuredsubperiod moduleid nextframenumber nmod numinterfaces overflow packageversion parallel parameters partialreset patfname patioctrl patlimits patloop patloop0 patloop1 patloop2 patmask patnloop patnloop0 patnloop1 patnloop2 patsetbit pattern patternstart patwait patwait0 patwait1 patwait2 patwaittime patwaittime0 patwaittime1 patwaittime2 patword pedestalmode period periodl polarity port powerchip powerindex powerlist powername powervalues programfpga pulse pulsechip pulsenmove pumpprobe quad ratecorr readnrows readout readoutspeed readoutspeedlist rebootcontroller reg resetdacs resetfpga roi romode row runclk runtime rx_arping rx_clearroi rx_dbitlist rx_dbitoffset rx_discardpolicy rx_fifodepth rx_frameindex rx_framescaught rx_framesperfile rx_hostname rx_jsonaddheader rx_jsonpara rx_lastclient rx_lock rx_missingpackets rx_padding rx_printconfig rx_realudpsocksize rx_roi rx_silent rx_start rx_status rx_stop rx_tcpport rx_threads rx_udpsocksize rx_version rx_zmqfreq rx_zmqhwm rx_zmqip rx_zmqport rx_zmqstartfnum rx_zmqstream samples savepattern scan scanerrmsg selinterface serialnumber setbit settings settingslist settingspath signalindex signallist signalname sleep slowadc slowadcindex slowadclist slowadcname slowadcvalues start status stop stopport storagecell_delay storagecell_start subdeadtime subexptime sync syncclk temp_10ge temp_adc temp_control temp_dcdc temp_event temp_fpga temp_fpgaext temp_fpgafl temp_fpgafr temp_slowadc temp_sodl temp_sodr temp_threshold templist tempvalues tengiga threshold thresholdnotb timing timing_info_decoder timinglist timingsource top transceiverenable trigger triggers triggersl trimbits trimen trimval tsamples txdelay txdelay_frame txdelay_left txdelay_right type udp_cleardst udp_dstip udp_dstip2 udp_dstlist udp_dstmac udp_dstmac2 udp_dstport udp_dstport2 udp_firstdst udp_numdst udp_reconfigure udp_srcip udp_srcip2 udp_srcmac udp_srcmac2 udp_validate update updatedetectorserver updatekernel updatemode user v_a v_b v_c v_chip v_d v_io v_limit vchip_comp_adc vchip_comp_fe vchip_cs vchip_opa_1st vchip_opa_fd vchip_ref_comp_fe versions veto vetoalg vetofile vetophoton vetoref vetostream virtual vm_a vm_b vm_c vm_d vm_io zmqhwm zmqip zmqport "
|
||||
local SLS_COMMANDS=" acquire activate adcclk adcenable adcenable10g adcindex adcinvert adclist adcname adcphase adcpipeline adcreg adcvpp apulse asamples autocompdisable badchannels blockingtrigger burstmode burstperiod bursts burstsl bustest cdsgain chipversion clearbit clearbusy clientversion clkdiv clkfreq clkphase collectionmode column compdisabletime confadc config configtransceiver counters currentsource dac dacindex daclist dacname dacvalues datastream dbitclk dbitphase dbitpipeline defaultdac defaultpattern delay delayl detectorserverversion detsize diodelay dpulse dr drlist dsamples execcommand exptime exptime1 exptime2 exptime3 extrastoragecells extsampling extsamplingsrc extsig fformat filtercells filterresistor findex firmwaretest firmwareversion fliprows flowcontrol10g fmaster fname foverwrite fpath framecounter frames framesl frametime free fwrite gaincaps gainmode gappixels gatedelay gatedelay1 gatedelay2 gatedelay3 gates getbit hardwareversion highvoltage hostname im_a im_b im_c im_d im_io imagetest initialchecks inj_ch interpolation interruptsubframe kernelversion lastclient led lock master maxadcphaseshift maxclkphaseshift maxdbitphaseshift measuredperiod measuredsubperiod moduleid nextframenumber nmod numinterfaces overflow packageversion parallel parameters partialreset patfname patioctrl patlimits patloop patloop0 patloop1 patloop2 patmask patnloop patnloop0 patnloop1 patnloop2 patsetbit pattern patternstart patwait patwait0 patwait1 patwait2 patwaittime patwaittime0 patwaittime1 patwaittime2 patword pedestalmode period periodl polarity port powerchip powerindex powerlist powername powervalues programfpga pulse pulsechip pulsenmove pumpprobe quad ratecorr readnrows readout readoutspeed readoutspeedlist rebootcontroller reg resetdacs resetfpga romode row runclk runtime rx_arping rx_clearroi rx_dbitlist rx_dbitoffset rx_discardpolicy rx_fifodepth rx_frameindex rx_framescaught rx_framesperfile rx_hostname rx_jsonaddheader rx_jsonpara rx_lastclient rx_lock rx_missingpackets rx_padding rx_printconfig rx_realudpsocksize rx_roi rx_silent rx_start rx_status rx_stop rx_tcpport rx_threads rx_udpsocksize rx_version rx_zmqfreq rx_zmqhwm rx_zmqip rx_zmqport rx_zmqstartfnum rx_zmqstream samples savepattern scan scanerrmsg selinterface serialnumber setbit settings settingslist settingspath signalindex signallist signalname sleep slowadc slowadcindex slowadclist slowadcname slowadcvalues start status stop stopport storagecell_delay storagecell_start subdeadtime subexptime sync syncclk temp_10ge temp_adc temp_control temp_dcdc temp_event temp_fpga temp_fpgaext temp_fpgafl temp_fpgafr temp_slowadc temp_sodl temp_sodr temp_threshold templist tempvalues tengiga threshold thresholdnotb timing timing_info_decoder timinglist timingsource top transceiverenable trigger triggers triggersl trimbits trimen trimval tsamples txdelay txdelay_frame txdelay_left txdelay_right type udp_cleardst udp_dstip udp_dstip2 udp_dstlist udp_dstmac udp_dstmac2 udp_dstport udp_dstport2 udp_firstdst udp_numdst udp_reconfigure udp_srcip udp_srcip2 udp_srcmac udp_srcmac2 udp_validate update updatedetectorserver updatekernel updatemode user v_a v_b v_c v_chip v_d v_io v_limit vchip_comp_adc vchip_comp_fe vchip_cs vchip_opa_1st vchip_opa_fd vchip_ref_comp_fe versions veto vetoalg vetofile vetophoton vetoref vetostream virtual vm_a vm_b vm_c vm_d vm_io zmqhwm zmqip zmqport "
|
||||
__acquire() {
|
||||
FCN_RETURN=""
|
||||
return 0
|
||||
@ -351,10 +351,6 @@ fi
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
__clearroi() {
|
||||
FCN_RETURN=""
|
||||
return 0
|
||||
}
|
||||
__clientversion() {
|
||||
FCN_RETURN=""
|
||||
return 0
|
||||
@ -861,20 +857,6 @@ fi
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
__exptimel() {
|
||||
FCN_RETURN=""
|
||||
if [[ ${IS_GET} -eq 1 ]]; then
|
||||
if [[ "${cword}" == "2" ]]; then
|
||||
FCN_RETURN="ms ns s us"
|
||||
fi
|
||||
fi
|
||||
if [[ ${IS_GET} -eq 0 ]]; then
|
||||
if [[ "${cword}" == "2" ]]; then
|
||||
FCN_RETURN="ms ns s us"
|
||||
fi
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
__extrastoragecells() {
|
||||
FCN_RETURN=""
|
||||
if [[ ${IS_GET} -eq 0 ]]; then
|
||||
@ -2034,18 +2016,6 @@ fi
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
__roi() {
|
||||
FCN_RETURN=""
|
||||
if [[ ${IS_GET} -eq 0 ]]; then
|
||||
if [[ "${cword}" == "2" ]]; then
|
||||
FCN_RETURN=""
|
||||
fi
|
||||
if [[ "${cword}" == "3" ]]; then
|
||||
FCN_RETURN=""
|
||||
fi
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
__romode() {
|
||||
FCN_RETURN=""
|
||||
if [[ ${IS_GET} -eq 0 ]]; then
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -4,7 +4,7 @@
|
||||
_sd() {
|
||||
|
||||
|
||||
local SLS_COMMANDS=" acquire activate adcclk adcenable adcenable10g adcindex adcinvert adclist adcname adcphase adcpipeline adcreg adcvpp apulse asamples autocompdisable badchannels blockingtrigger burstmode burstperiod bursts burstsl bustest cdsgain chipversion clearbit clearbusy clearroi clientversion clkdiv clkfreq clkphase collectionmode column compdisabletime confadc config configtransceiver counters currentsource dac dacindex daclist dacname dacvalues datastream dbitclk dbitphase dbitpipeline defaultdac defaultpattern delay delayl detectorserverversion detsize diodelay dpulse dr drlist dsamples execcommand exptime exptime1 exptime2 exptime3 exptimel extrastoragecells extsampling extsamplingsrc extsig fformat filtercells filterresistor findex firmwaretest firmwareversion fliprows flowcontrol10g fmaster fname foverwrite fpath framecounter frames framesl frametime free fwrite gaincaps gainmode gappixels gatedelay gatedelay1 gatedelay2 gatedelay3 gates getbit hardwareversion highvoltage hostname im_a im_b im_c im_d im_io imagetest initialchecks inj_ch interpolation interruptsubframe kernelversion lastclient led lock master maxadcphaseshift maxclkphaseshift maxdbitphaseshift measuredperiod measuredsubperiod moduleid nextframenumber nmod numinterfaces overflow packageversion parallel parameters partialreset patfname patioctrl patlimits patloop patloop0 patloop1 patloop2 patmask patnloop patnloop0 patnloop1 patnloop2 patsetbit pattern patternstart patwait patwait0 patwait1 patwait2 patwaittime patwaittime0 patwaittime1 patwaittime2 patword pedestalmode period periodl polarity port powerchip powerindex powerlist powername powervalues programfpga pulse pulsechip pulsenmove pumpprobe quad ratecorr readnrows readout readoutspeed readoutspeedlist rebootcontroller reg resetdacs resetfpga roi romode row runclk runtime rx_arping rx_clearroi rx_dbitlist rx_dbitoffset rx_discardpolicy rx_fifodepth rx_frameindex rx_framescaught rx_framesperfile rx_hostname rx_jsonaddheader rx_jsonpara rx_lastclient rx_lock rx_missingpackets rx_padding rx_printconfig rx_realudpsocksize rx_roi rx_silent rx_start rx_status rx_stop rx_tcpport rx_threads rx_udpsocksize rx_version rx_zmqfreq rx_zmqhwm rx_zmqip rx_zmqport rx_zmqstartfnum rx_zmqstream samples savepattern scan scanerrmsg selinterface serialnumber setbit settings settingslist settingspath signalindex signallist signalname sleep slowadc slowadcindex slowadclist slowadcname slowadcvalues start status stop stopport storagecell_delay storagecell_start subdeadtime subexptime sync syncclk temp_10ge temp_adc temp_control temp_dcdc temp_event temp_fpga temp_fpgaext temp_fpgafl temp_fpgafr temp_slowadc temp_sodl temp_sodr temp_threshold templist tempvalues tengiga threshold thresholdnotb timing timing_info_decoder timinglist timingsource top transceiverenable trigger triggers triggersl trimbits trimen trimval tsamples txdelay txdelay_frame txdelay_left txdelay_right type udp_cleardst udp_dstip udp_dstip2 udp_dstlist udp_dstmac udp_dstmac2 udp_dstport udp_dstport2 udp_firstdst udp_numdst udp_reconfigure udp_srcip udp_srcip2 udp_srcmac udp_srcmac2 udp_validate update updatedetectorserver updatekernel updatemode user v_a v_b v_c v_chip v_d v_io v_limit vchip_comp_adc vchip_comp_fe vchip_cs vchip_opa_1st vchip_opa_fd vchip_ref_comp_fe versions veto vetoalg vetofile vetophoton vetoref vetostream virtual vm_a vm_b vm_c vm_d vm_io zmqhwm zmqip zmqport "
|
||||
local SLS_COMMANDS=" acquire activate adcclk adcenable adcenable10g adcindex adcinvert adclist adcname adcphase adcpipeline adcreg adcvpp apulse asamples autocompdisable badchannels blockingtrigger burstmode burstperiod bursts burstsl bustest cdsgain chipversion clearbit clearbusy clientversion clkdiv clkfreq clkphase collectionmode column compdisabletime confadc config configtransceiver counters currentsource dac dacindex daclist dacname dacvalues datastream dbitclk dbitphase dbitpipeline defaultdac defaultpattern delay delayl detectorserverversion detsize diodelay dpulse dr drlist dsamples execcommand exptime exptime1 exptime2 exptime3 extrastoragecells extsampling extsamplingsrc extsig fformat filtercells filterresistor findex firmwaretest firmwareversion fliprows flowcontrol10g fmaster fname foverwrite fpath framecounter frames framesl frametime free fwrite gaincaps gainmode gappixels gatedelay gatedelay1 gatedelay2 gatedelay3 gates getbit hardwareversion highvoltage hostname im_a im_b im_c im_d im_io imagetest initialchecks inj_ch interpolation interruptsubframe kernelversion lastclient led lock master maxadcphaseshift maxclkphaseshift maxdbitphaseshift measuredperiod measuredsubperiod moduleid nextframenumber nmod numinterfaces overflow packageversion parallel parameters partialreset patfname patioctrl patlimits patloop patloop0 patloop1 patloop2 patmask patnloop patnloop0 patnloop1 patnloop2 patsetbit pattern patternstart patwait patwait0 patwait1 patwait2 patwaittime patwaittime0 patwaittime1 patwaittime2 patword pedestalmode period periodl polarity port powerchip powerindex powerlist powername powervalues programfpga pulse pulsechip pulsenmove pumpprobe quad ratecorr readnrows readout readoutspeed readoutspeedlist rebootcontroller reg resetdacs resetfpga romode row runclk runtime rx_arping rx_clearroi rx_dbitlist rx_dbitoffset rx_discardpolicy rx_fifodepth rx_frameindex rx_framescaught rx_framesperfile rx_hostname rx_jsonaddheader rx_jsonpara rx_lastclient rx_lock rx_missingpackets rx_padding rx_printconfig rx_realudpsocksize rx_roi rx_silent rx_start rx_status rx_stop rx_tcpport rx_threads rx_udpsocksize rx_version rx_zmqfreq rx_zmqhwm rx_zmqip rx_zmqport rx_zmqstartfnum rx_zmqstream samples savepattern scan scanerrmsg selinterface serialnumber setbit settings settingslist settingspath signalindex signallist signalname sleep slowadc slowadcindex slowadclist slowadcname slowadcvalues start status stop stopport storagecell_delay storagecell_start subdeadtime subexptime sync syncclk temp_10ge temp_adc temp_control temp_dcdc temp_event temp_fpga temp_fpgaext temp_fpgafl temp_fpgafr temp_slowadc temp_sodl temp_sodr temp_threshold templist tempvalues tengiga threshold thresholdnotb timing timing_info_decoder timinglist timingsource top transceiverenable trigger triggers triggersl trimbits trimen trimval tsamples txdelay txdelay_frame txdelay_left txdelay_right type udp_cleardst udp_dstip udp_dstip2 udp_dstlist udp_dstmac udp_dstmac2 udp_dstport udp_dstport2 udp_firstdst udp_numdst udp_reconfigure udp_srcip udp_srcip2 udp_srcmac udp_srcmac2 udp_validate update updatedetectorserver updatekernel updatemode user v_a v_b v_c v_chip v_d v_io v_limit vchip_comp_adc vchip_comp_fe vchip_cs vchip_opa_1st vchip_opa_fd vchip_ref_comp_fe versions veto vetoalg vetofile vetophoton vetoref vetostream virtual vm_a vm_b vm_c vm_d vm_io zmqhwm zmqip zmqport "
|
||||
__acquire() {
|
||||
FCN_RETURN=""
|
||||
return 0
|
||||
@ -275,10 +275,6 @@ fi
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
__clearroi() {
|
||||
FCN_RETURN=""
|
||||
return 0
|
||||
}
|
||||
__clientversion() {
|
||||
FCN_RETURN=""
|
||||
return 0
|
||||
@ -785,20 +781,6 @@ fi
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
__exptimel() {
|
||||
FCN_RETURN=""
|
||||
if [[ ${IS_GET} -eq 1 ]]; then
|
||||
if [[ "${cword}" == "2" ]]; then
|
||||
FCN_RETURN="ms ns s us"
|
||||
fi
|
||||
fi
|
||||
if [[ ${IS_GET} -eq 0 ]]; then
|
||||
if [[ "${cword}" == "2" ]]; then
|
||||
FCN_RETURN="ms ns s us"
|
||||
fi
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
__extrastoragecells() {
|
||||
FCN_RETURN=""
|
||||
if [[ ${IS_GET} -eq 0 ]]; then
|
||||
@ -1958,18 +1940,6 @@ fi
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
__roi() {
|
||||
FCN_RETURN=""
|
||||
if [[ ${IS_GET} -eq 0 ]]; then
|
||||
if [[ "${cword}" == "2" ]]; then
|
||||
FCN_RETURN=""
|
||||
fi
|
||||
if [[ "${cword}" == "3" ]]; then
|
||||
FCN_RETURN=""
|
||||
fi
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
__romode() {
|
||||
FCN_RETURN=""
|
||||
if [[ ${IS_GET} -eq 0 ]]; then
|
||||
|
@ -441,7 +441,7 @@ period:
|
||||
function: setPeriod
|
||||
|
||||
delay:
|
||||
help: "[duration] [(optional unit) ns|us|ms|s]\n\t[Jungfrau][Moench][Gotthard][Mythen3][Gotthard2][Ctb][Moench][Xilinx Ctb] Delay after trigger"
|
||||
help: "[duration] [(optional unit) ns|us|ms|s]\n\t[Jungfrau][Moench][Mythen3][Gotthard2][Ctb][Moench][Xilinx Ctb] Delay after trigger"
|
||||
inherit_actions: TIME_COMMAND
|
||||
actions:
|
||||
GET:
|
||||
@ -496,14 +496,14 @@ burstperiod:
|
||||
|
||||
################# TIME_GET_COMMAND #############
|
||||
delayl:
|
||||
help: "\n\t[Gotthard][Jungfrau][Moench][Mythen3][Gotthard2][Ctb][Xilinx Ctb] Delay Left in Acquisition. \n\t[Gotthard2] only in continuous mode."
|
||||
help: "\n\t[Jungfrau][Moench][Mythen3][Gotthard2][Ctb][Xilinx Ctb] Delay Left in Acquisition. \n\t[Gotthard2] only in continuous mode."
|
||||
inherit_actions: TIME_GET_COMMAND
|
||||
actions:
|
||||
GET:
|
||||
function: getDelayAfterTriggerLeft
|
||||
|
||||
periodl:
|
||||
help: "\n\t[Gotthard][Jungfrau][Moench][Ctb][Mythen3][Gotthard2][Xilinx Ctb] Period left for current frame. \n\t[Gotthard2] only in continuous mode."
|
||||
help: "\n\t[Jungfrau][Moench][Ctb][Mythen3][Gotthard2][Xilinx Ctb] Period left for current frame. \n\t[Gotthard2] only in continuous mode."
|
||||
inherit_actions: TIME_GET_COMMAND
|
||||
actions:
|
||||
GET:
|
||||
@ -523,13 +523,6 @@ measuredsubperiod:
|
||||
GET:
|
||||
function: getMeasuredSubFramePeriod
|
||||
|
||||
exptimel:
|
||||
help: "[(optional unit) ns|us|ms|s]\n\t[Gotthard] Exposure time left for current frame. "
|
||||
inherit_actions: TIME_GET_COMMAND
|
||||
actions:
|
||||
GET:
|
||||
function: getExptimeLeft
|
||||
|
||||
runtime:
|
||||
help: "[(optional unit) ns|us|ms|s]\n\t[Jungfrau][Moench][Mythen3][Gotthard2][Ctb][Xilinx Ctb] Time from detector start up.\n\t[Gotthard2] not in burst and auto mode."
|
||||
inherit_actions: TIME_GET_COMMAND
|
||||
@ -641,7 +634,7 @@ adcinvert:
|
||||
|
||||
################# INTEGER_COMMAND_VEC_ID #################
|
||||
settings:
|
||||
help: "[standard, fast, highgain, dynamicgain, lowgain, mediumgain, veryhighgain, highgain0, fixgain1, fixgain2, forceswitchg1, forceswitchg2, verylowgain, g1_hg, g1_lg, g2_hc_hg, g2_hc_lg, g2_lc_hg, g2_lc_lg, g4_hg, g4_lg, gain0]\n\t Detector Settings\n\t[Jungfrau] - [ gain0 | highgain0]\n\t[Gotthard] - [dynamicgain | highgain | lowgain | mediumgain | veryhighgain]\n\t[Gotthard] Also loads default dacs on to the detector.\n\t[Gotthard2] - [dynamicgain | fixgain1 | fixgain2]\n\t[Mythen3] - [standard | fast | highgain] Also changes vrshaper and vrpreamp. \n\t[Eiger] Use threshold or thresholdnotb. \n\t[Eiger] threshold and settings loaded from file found in settingspath. \n\t[Moench] - [g1_hg | g1_lg | g2_hc_hg | g2_hc_lg | g2_lc_hg | g2_lc_lg | g4_hg | g4_lg]"
|
||||
help: "[standard, fast, highgain, dynamicgain, lowgain, mediumgain, veryhighgain, highgain0, fixgain1, fixgain2, forceswitchg1, forceswitchg2, verylowgain, g1_hg, g1_lg, g2_hc_hg, g2_hc_lg, g2_lc_hg, g2_lc_lg, g4_hg, g4_lg, gain0]\n\t Detector Settings\n\t[Jungfrau] - [ gain0 | highgain0]\n\t[Gotthard2] - [dynamicgain | fixgain1 | fixgain2]\n\t[Mythen3] - [standard | fast | highgain] Also changes vrshaper and vrpreamp. \n\t[Eiger] Use threshold or thresholdnotb. \n\t[Eiger] threshold and settings loaded from file found in settingspath. \n\t[Moench] - [g1_hg | g1_lg | g2_hc_hg | g2_hc_lg | g2_lc_hg | g2_lc_lg | g4_hg | g4_lg]"
|
||||
inherit_actions: INTEGER_COMMAND_VEC_ID
|
||||
actions:
|
||||
GET:
|
||||
@ -688,7 +681,7 @@ column:
|
||||
function: setColumn
|
||||
|
||||
timing:
|
||||
help: "[auto|trigger|gating|burst_trigger|trigger_gating]\n\tTiming Mode of detector.\n\t[Jungfrau][Moench][Gotthard][Ctb][Gotthard2][Xilinx Ctb] [auto|trigger]\n\t[Mythen3] [auto|trigger|gating|trigger_gating]\n\t[Eiger] [auto|trigger|gating|burst_trigger]"
|
||||
help: "[auto|trigger|gating|burst_trigger|trigger_gating]\n\tTiming Mode of detector.\n\t[Jungfrau][Moench][Ctb][Gotthard2][Xilinx Ctb] [auto|trigger]\n\t[Mythen3] [auto|trigger|gating|trigger_gating]\n\t[Eiger] [auto|trigger|gating|burst_trigger]"
|
||||
inherit_actions: INTEGER_COMMAND_VEC_ID
|
||||
actions:
|
||||
GET:
|
||||
@ -698,7 +691,7 @@ timing:
|
||||
input_types: [ defs::timingMode ]
|
||||
|
||||
highvoltage:
|
||||
help: "[n_value]\n\tHigh voltage to the sensor in Voltage. \n\t[Gotthard] [0|90|110|120|150|180|200] \n\t[Eiger][Mythen3][Gotthard2] 0-200 \n\t[Jungfrau][Moench][Ctb] [0|60-200]"
|
||||
help: "[n_value]\n\tHigh voltage to the sensor in Voltage. \n\t[Eiger][Mythen3][Gotthard2] 0-200 \n\t[Jungfrau][Moench][Ctb] [0|60-200]"
|
||||
inherit_actions: INTEGER_COMMAND_VEC_ID
|
||||
actions:
|
||||
GET:
|
||||
@ -717,7 +710,7 @@ powerchip:
|
||||
input_types: [ bool ]
|
||||
|
||||
imagetest:
|
||||
help: "[0, 1]\n\t[Gotthard] 1 adds channel intensity with precalculated values when taking an acquisition. Default is 0.\n\t[Eiger][Jungfrau][Moench] Only for Virtual servers. If 0, each pixel intensity incremented by 1. If 1, all pixels almost saturated."
|
||||
help: "[0, 1]\n\t[Eiger][Jungfrau][Moench] Only for Virtual servers. If 0, each pixel intensity incremented by 1. If 1, all pixels almost saturated."
|
||||
inherit_actions: INTEGER_COMMAND_VEC_ID
|
||||
actions:
|
||||
GET:
|
||||
@ -1423,7 +1416,7 @@ lock:
|
||||
|
||||
master:
|
||||
inherit_actions: INTEGER_COMMAND_VEC_ID_GET
|
||||
help: "[0, 1]\n\t[Eiger][Gotthard2][Jungfrau][Moench] Sets (half) module to master and other(s) to slaves.\n\t[Gotthard][Gotthard2][Mythen3][Eiger][Jungfrau][Moench] Gets if the current (half) module is master."
|
||||
help: "[0, 1]\n\t[Eiger][Gotthard2][Jungfrau][Moench] Sets (half) module to master and other(s) to slaves.\n\t[Gotthard2][Mythen3][Eiger][Jungfrau][Moench] Gets if the current (half) module is master."
|
||||
actions:
|
||||
GET:
|
||||
function: getMaster
|
||||
@ -1514,7 +1507,7 @@ triggers:
|
||||
|
||||
dr:
|
||||
inherit_actions: INTEGER_COMMAND_SET_NOID_GET_ID
|
||||
help: "[value]\n\tDynamic Range or number of bits per pixel in detector.\n\t[Eiger] Options: 4, 8, 12, 16, 32. If set to 32, also sets clkdivider to 2, else to 0.\n\t[Mythen3] Options: 8, 16, 32\n\t[Jungfrau][Moench][Gotthard][Ctb][Mythen3][Gotthard2][Xilinx Ctb] 16"
|
||||
help: "[value]\n\tDynamic Range or number of bits per pixel in detector.\n\t[Eiger] Options: 4, 8, 12, 16, 32. If set to 32, also sets clkdivider to 2, else to 0.\n\t[Mythen3] Options: 8, 16, 32\n\t[Jungfrau][Moench][Ctb][Mythen3][Gotthard2][Xilinx Ctb] 16"
|
||||
actions:
|
||||
GET:
|
||||
function: getDynamicRange
|
||||
@ -1777,13 +1770,6 @@ udp_validate:
|
||||
PUT:
|
||||
function: validateUDPConfiguration
|
||||
|
||||
clearroi:
|
||||
inherit_actions: EXECUTE_SET_COMMAND
|
||||
help: "\n\t[Gotthard] Resets Region of interest in detector. All channels enabled. Default is all channels enabled."
|
||||
actions:
|
||||
PUT:
|
||||
function: clearROI
|
||||
|
||||
defaultpattern:
|
||||
inherit_actions: EXECUTE_SET_COMMAND
|
||||
help: "\n\t[Mythen3] Loads and runs default pattern in pattern generator. It is to go back to initial settings."
|
||||
@ -1807,21 +1793,21 @@ resetfpga:
|
||||
|
||||
rebootcontroller:
|
||||
inherit_actions: EXECUTE_SET_COMMAND
|
||||
help: "\n\t[Jungfrau][Moench][Ctb][Gotthard][Mythen3][Gotthard2][Xilinx Ctb] Reboot controller of detector."
|
||||
help: "\n\t[Jungfrau][Moench][Ctb][Mythen3][Gotthard2][Xilinx Ctb] Reboot controller of detector."
|
||||
actions:
|
||||
PUT:
|
||||
function: rebootController
|
||||
|
||||
firmwaretest:
|
||||
inherit_actions: EXECUTE_SET_COMMAND
|
||||
help: "\n\t[Jungfrau][Moench][Gotthard][Mythen3][Gotthard2][Ctb][Xilinx Ctb] Firmware test, ie. reads a read fixed pattern from a register."
|
||||
help: "\n\t[Jungfrau][Moench][Mythen3][Gotthard2][Ctb][Xilinx Ctb] Firmware test, ie. reads a read fixed pattern from a register."
|
||||
actions:
|
||||
PUT:
|
||||
function: executeFirmwareTest
|
||||
|
||||
bustest:
|
||||
inherit_actions: EXECUTE_SET_COMMAND
|
||||
help: "\n\t[Jungfrau][Moench][Gotthard][Mythen3][Gotthard2][Ctb] Bus test, ie. Writes different values in a R/W register and confirms the writes to check bus.\n\tAdvanced User function!"
|
||||
help: "\n\t[Jungfrau][Moench][Mythen3][Gotthard2][Ctb] Bus test, ie. Writes different values in a R/W register and confirms the writes to check bus.\n\tAdvanced User function!"
|
||||
actions:
|
||||
PUT:
|
||||
function: executeBusTest
|
||||
@ -1893,21 +1879,21 @@ moduleid:
|
||||
|
||||
type:
|
||||
inherit_actions: GET_COMMAND
|
||||
help: "\n\tReturns detector type. Can be Eiger, Jungfrau, Gotthard, Moench, Mythen3, Gotthard2, ChipTestBoard, Xilinx_ChipTestBoard"
|
||||
help: "\n\tReturns detector type. Can be Eiger, Jungfrau, Moench, Mythen3, Gotthard2, ChipTestBoard, Xilinx_ChipTestBoard"
|
||||
actions:
|
||||
GET:
|
||||
function: getDetectorType
|
||||
|
||||
framesl:
|
||||
inherit_actions: GET_COMMAND
|
||||
help: "\n\t[Gotthard][Jungfrau][Moench][Mythen3][Gotthard2][Ctb][Xilinx Ctb] Number of frames left in acquisition. \n\t[Gotthard2] only in continuous auto mode."
|
||||
help: "\n\t[Jungfrau][Moench][Mythen3][Gotthard2][Ctb][Xilinx Ctb] Number of frames left in acquisition. \n\t[Gotthard2] only in continuous auto mode."
|
||||
actions:
|
||||
GET:
|
||||
function: getNumberOfFramesLeft
|
||||
|
||||
triggersl:
|
||||
inherit_actions: GET_COMMAND
|
||||
help: "\n\t[Gotthard][Jungfrau][Moench][Mythen3][Gotthard2][Ctb][Xilinx Ctb] Number of triggers left in acquisition. Only when external trigger used."
|
||||
help: "\n\t[Jungfrau][Moench][Mythen3][Gotthard2][Ctb][Xilinx Ctb] Number of triggers left in acquisition. Only when external trigger used."
|
||||
actions:
|
||||
GET:
|
||||
function: getNumberOfTriggersLeft
|
||||
@ -2034,7 +2020,7 @@ framecounter:
|
||||
################# GET_COMMAND_HEX ############################
|
||||
serialnumber:
|
||||
inherit_actions: GET_COMMAND
|
||||
help: "\n\t[Jungfrau][Moench][Gotthard][Mythen3][Gotthard2][Ctb]\n\tSerial number of detector."
|
||||
help: "\n\t[Jungfrau][Moench][Mythen3][Gotthard2][Ctb]\n\tSerial number of detector."
|
||||
actions:
|
||||
GET:
|
||||
function: getSerialNumber
|
||||
@ -2086,7 +2072,7 @@ templist:
|
||||
################# GET_IND_COMMAND ############################
|
||||
temp_adc:
|
||||
inherit_actions: GET_IND_COMMAND
|
||||
help: "[n_value]\n\t[Jungfrau][Moench][Gotthard] ADC Temperature"
|
||||
help: "[n_value]\n\t[Jungfrau][Moench] ADC Temperature"
|
||||
actions:
|
||||
GET:
|
||||
function: getTemperature
|
||||
@ -2095,7 +2081,7 @@ temp_adc:
|
||||
|
||||
temp_fpga:
|
||||
inherit_actions: GET_IND_COMMAND
|
||||
help: "[n_value]\n\t[Eiger][Jungfrau][Moench][Gotthard][Mythen3][Gotthard2][Xilinx CTB] FPGA Temperature"
|
||||
help: "[n_value]\n\t[Eiger][Jungfrau][Moench][Mythen3][Gotthard2][Xilinx CTB] FPGA Temperature"
|
||||
actions:
|
||||
GET:
|
||||
function: getTemperature
|
||||
@ -2890,7 +2876,7 @@ Exptime:
|
||||
|
||||
exptime:
|
||||
inherit_actions: Exptime
|
||||
help: "[duration] [(optional unit) ns|us|ms|s]\n\t[Eiger][Jungfrau][Moench][Gotthard][Gotthard2][Ctb][Xilinx Ctb] Exposure time\n\t[Mythen3] Exposure time of all gate signals in auto and trigger mode (internal gating). To specify gate index, use exptime1, exptime2, exptime3."
|
||||
help: "[duration] [(optional unit) ns|us|ms|s]\n\t[Eiger][Jungfrau][Moench][Gotthard2][Ctb][Xilinx Ctb] Exposure time\n\t[Mythen3] Exposure time of all gate signals in auto and trigger mode (internal gating). To specify gate index, use exptime1, exptime2, exptime3."
|
||||
actions:
|
||||
GET:
|
||||
function: getExptime
|
||||
@ -2984,7 +2970,7 @@ readoutspeed:
|
||||
|
||||
adcphase:
|
||||
infer_action: true
|
||||
help: "[n_value] [(optional)deg]\n\t[Jungfrau][Moench][Ctb][Gotthard] Phase shift of ADC clock. \n\t[Jungfrau][Moench] Absolute phase shift. If deg used, then shift in degrees. Changing Speed also resets adcphase to recommended defaults.\n\t[Ctb] Absolute phase shift. If deg used, then shift in degrees. Changing adcclk also resets adcphase and sets it to previous values.\n\t[Gotthard] Relative phase shift. Cannot get"
|
||||
help: "[n_value] [(optional)deg]\n\t[Jungfrau][Moench][Ctb] Phase shift of ADC clock. \n\t[Jungfrau][Moench] Absolute phase shift. If deg used, then shift in degrees. Changing Speed also resets adcphase to recommended defaults.\n\t[Ctb] Absolute phase shift. If deg used, then shift in degrees. Changing adcclk also resets adcphase and sets it to previous values."
|
||||
actions:
|
||||
GET:
|
||||
require_det_id: true
|
||||
@ -3220,7 +3206,7 @@ clkdiv:
|
||||
output: [ 'args[0]', "' '", 'args[1]' ]
|
||||
|
||||
extsig:
|
||||
help: "[n_signal] [signal_type]\n\t[Gotthard][Mythen3] External signal mode for trigger timing mode.\n\t[Gotthard] [0] [trigger_in_rising_edge|trigger_in_falling_edge]\n\t[Mythen3] [0-7] [trigger_in_rising_edge|trigger_in_falling_edge|inversion_on|inversion_off]\n\t where 0 is master input trigger signal, 1-3 is master input gate signals, 4 is busy out signal and 5-7 is master output gate signals."
|
||||
help: "[n_signal] [signal_type]\n\t[Mythen3] External signal mode for trigger timing mode.\n\t[Mythen3] [0-7] [trigger_in_rising_edge|trigger_in_falling_edge|inversion_on|inversion_off]\n\t where 0 is master input trigger signal, 1-3 is master input gate signals, 4 is busy out signal and 5-7 is master output gate signals."
|
||||
actions:
|
||||
GET:
|
||||
argc: 1
|
||||
@ -3291,7 +3277,7 @@ dac:
|
||||
output: [ "args[0]", "' '", "args[1]", '" mV"' ]
|
||||
|
||||
resetdacs:
|
||||
help: "[(optional) hard] \n\t[Eiger][Jungfrau][Moench][Gotthard][Gotthard2][Mythen3]Reset dac values to the defaults. A 'hard' optional reset will reset the dacs to the hardcoded defaults in on-board detector server."
|
||||
help: "[(optional) hard] \n\t[Eiger][Jungfrau][Moench][Gotthard2][Mythen3]Reset dac values to the defaults. A 'hard' optional reset will reset the dacs to the hardcoded defaults in on-board detector server."
|
||||
actions:
|
||||
PUT:
|
||||
function: resetToDefaultDacs
|
||||
@ -3621,30 +3607,6 @@ pedestalmode:
|
||||
input_types: [ defs::pedestalParameters ]
|
||||
input: [ 'defs::pedestalParameters(StringTo<uint8_t>(args[0]), StringTo<uint16_t>(args[1]))' ]
|
||||
|
||||
roi:
|
||||
help: "[xmin] [xmax] \n\t[Gotthard] Region of interest in detector.\n\tOptions: Only a single ROI per module. \n\tEither all channels or a single adc or 2 chips (256 channels). Default is all channels enabled (-1 -1). "
|
||||
actions:
|
||||
GET:
|
||||
argc: 0
|
||||
require_det_id: true
|
||||
function: getROI
|
||||
output: [ t ]
|
||||
PUT:
|
||||
argc: 2
|
||||
exceptions:
|
||||
- condition: 'det_id == -1 && det->size() > 1'
|
||||
message: '"Cannot execute ROI at multi module level"'
|
||||
require_det_id: true
|
||||
convert_det_id: false
|
||||
function: setROI
|
||||
arg_types: [ int, int ]
|
||||
extra_variables:
|
||||
- name: t
|
||||
type: defs::ROI
|
||||
value: defs::ROI(StringTo<int>(args[0]), StringTo<int>(args[1]))
|
||||
input: [ t ]
|
||||
input_types: [ defs::ROI ]
|
||||
output: [ 't' ]
|
||||
|
||||
inj_ch:
|
||||
help: "[offset] [increment]\n\t[Gotthard2] Inject channels with current source for calibration. Offset is starting channel that is injected, increment determines succeeding channels to be injected."
|
||||
@ -4179,7 +4141,7 @@ updatekernel:
|
||||
output: [ '"successful"' ]
|
||||
|
||||
update:
|
||||
help: "\n\tWithout tftp: [server_name (incl fullpath)] [fname.pof (incl full path)] This does not use tftp.\n\t\t[Jungfrau][Moench][Gotthard][Ctb] Updates the firmware, detector server, deletes old server, creates the symbolic link and then reboots detector controller. \n\t\t[Mythen3][Gotthard2] will require a script to start up the shorter named server link at start up. \n\t\tserver_name is full path name of detector server binary\n\t\tfname is full path of programming file"
|
||||
help: "\n\tWithout tftp: [server_name (incl fullpath)] [fname.pof (incl full path)] This does not use tftp.\n\t\t[Jungfrau][Moench][Ctb] Updates the firmware, detector server, deletes old server, creates the symbolic link and then reboots detector controller. \n\t\t[Mythen3][Gotthard2] will require a script to start up the shorter named server link at start up. \n\t\tserver_name is full path name of detector server binary\n\t\tfname is full path of programming file"
|
||||
actions:
|
||||
PUT:
|
||||
argc: 2
|
||||
@ -4224,7 +4186,7 @@ reg:
|
||||
cast_input: [ true, true, true ]
|
||||
|
||||
adcreg:
|
||||
help: "[address] [value]\n\t[Jungfrau][Moench][Ctb][Gotthard] Writes to an adc register in hex. Advanced user Function!"
|
||||
help: "[address] [value]\n\t[Jungfrau][Moench][Ctb] Writes to an adc register in hex. Advanced user Function!"
|
||||
actions:
|
||||
PUT:
|
||||
argc: 2
|
||||
|
@ -54,13 +54,9 @@ vcn: dac
|
||||
vishaper: dac
|
||||
iodelay: dac
|
||||
vref_ds: dac
|
||||
vcascn_pb: dac
|
||||
vcascp_pb: dac
|
||||
vout_cm: dac
|
||||
vcasc_out: dac
|
||||
vin_cm: dac
|
||||
vref_comp: dac
|
||||
ib_test_c: dac
|
||||
vrshaper_n: dac
|
||||
vipre: dac
|
||||
vdcsh: dac
|
||||
@ -151,7 +147,6 @@ storagecells: extrastoragecells
|
||||
auto_comp_disable: autocompdisable
|
||||
comp_disable_time: compdisabletime
|
||||
|
||||
#Gotthard Specific
|
||||
#Gotthard2 Specific
|
||||
#Mythen3 Specific
|
||||
#CTB Specific
|
||||
|
@ -480,12 +480,11 @@ adcphase:
|
||||
store_result_in_t: false
|
||||
command_name: adcphase
|
||||
function_alias: adcphase
|
||||
help: "[n_value] [(optional)deg]\n\t[Jungfrau][Moench][Ctb][Gotthard] Phase shift\
|
||||
\ of ADC clock. \n\t[Jungfrau][Moench] Absolute phase shift. If deg used, then\
|
||||
\ shift in degrees. Changing Speed also resets adcphase to recommended defaults.\n\
|
||||
\t[Ctb] Absolute phase shift. If deg used, then shift in degrees. Changing adcclk\
|
||||
\ also resets adcphase and sets it to previous values.\n\t[Gotthard] Relative\
|
||||
\ phase shift. Cannot get"
|
||||
help: "[n_value] [(optional)deg]\n\t[Jungfrau][Moench][Ctb] Phase shift of ADC clock.\
|
||||
\ \n\t[Jungfrau][Moench] Absolute phase shift. If deg used, then shift in degrees.\
|
||||
\ Changing Speed also resets adcphase to recommended defaults.\n\t[Ctb] Absolute\
|
||||
\ phase shift. If deg used, then shift in degrees. Changing adcclk also resets\
|
||||
\ adcphase and sets it to previous values."
|
||||
infer_action: true
|
||||
adcpipeline:
|
||||
actions:
|
||||
@ -552,8 +551,8 @@ adcreg:
|
||||
store_result_in_t: false
|
||||
command_name: adcreg
|
||||
function_alias: adcreg
|
||||
help: "[address] [value]\n\t[Jungfrau][Moench][Ctb][Gotthard] Writes to an adc register\
|
||||
\ in hex. Advanced user Function!"
|
||||
help: "[address] [value]\n\t[Jungfrau][Moench][Ctb] Writes to an adc register in\
|
||||
\ hex. Advanced user Function!"
|
||||
infer_action: true
|
||||
adcvpp:
|
||||
actions:
|
||||
@ -1026,9 +1025,9 @@ bustest:
|
||||
store_result_in_t: false
|
||||
command_name: bustest
|
||||
function_alias: bustest
|
||||
help: "\n\t[Jungfrau][Moench][Gotthard][Mythen3][Gotthard2][Ctb] Bus test, ie. Writes\
|
||||
\ different values in a R/W register and confirms the writes to check bus.\n\t\
|
||||
Advanced User function!"
|
||||
help: "\n\t[Jungfrau][Moench][Mythen3][Gotthard2][Ctb] Bus test, ie. Writes different\
|
||||
\ values in a R/W register and confirms the writes to check bus.\n\tAdvanced User\
|
||||
\ function!"
|
||||
infer_action: true
|
||||
template: true
|
||||
cdsgain:
|
||||
@ -1186,28 +1185,6 @@ clearbusy:
|
||||
\ flag in shared memory before starting next acquisition"
|
||||
infer_action: true
|
||||
template: true
|
||||
clearroi:
|
||||
actions:
|
||||
PUT:
|
||||
args:
|
||||
- arg_types: []
|
||||
argc: 0
|
||||
cast_input: []
|
||||
check_det_id: false
|
||||
convert_det_id: true
|
||||
function: clearROI
|
||||
input: []
|
||||
input_types: []
|
||||
output:
|
||||
- '"successful"'
|
||||
require_det_id: true
|
||||
store_result_in_t: false
|
||||
command_name: clearroi
|
||||
function_alias: clearroi
|
||||
help: "\n\t[Gotthard] Resets Region of interest in detector. All channels enabled.\
|
||||
\ Default is all channels enabled."
|
||||
infer_action: true
|
||||
template: true
|
||||
clientversion:
|
||||
actions:
|
||||
GET:
|
||||
@ -2598,7 +2575,7 @@ delay:
|
||||
store_result_in_t: false
|
||||
command_name: delay
|
||||
function_alias: delay
|
||||
help: "[duration] [(optional unit) ns|us|ms|s]\n\t[Jungfrau][Moench][Gotthard][Mythen3][Gotthard2][Ctb][Moench][Xilinx\
|
||||
help: "[duration] [(optional unit) ns|us|ms|s]\n\t[Jungfrau][Moench][Mythen3][Gotthard2][Ctb][Moench][Xilinx\
|
||||
\ Ctb] Delay after trigger"
|
||||
infer_action: true
|
||||
template: true
|
||||
@ -2633,8 +2610,8 @@ delayl:
|
||||
store_result_in_t: true
|
||||
command_name: delayl
|
||||
function_alias: delayl
|
||||
help: "\n\t[Gotthard][Jungfrau][Moench][Mythen3][Gotthard2][Ctb][Xilinx Ctb] Delay\
|
||||
\ Left in Acquisition. \n\t[Gotthard2] only in continuous mode."
|
||||
help: "\n\t[Jungfrau][Moench][Mythen3][Gotthard2][Ctb][Xilinx Ctb] Delay Left in\
|
||||
\ Acquisition. \n\t[Gotthard2] only in continuous mode."
|
||||
infer_action: true
|
||||
template: true
|
||||
detectorserverversion:
|
||||
@ -2806,7 +2783,7 @@ dr:
|
||||
function_alias: dr
|
||||
help: "[value]\n\tDynamic Range or number of bits per pixel in detector.\n\t[Eiger]\
|
||||
\ Options: 4, 8, 12, 16, 32. If set to 32, also sets clkdivider to 2, else to\
|
||||
\ 0.\n\t[Mythen3] Options: 8, 16, 32\n\t[Jungfrau][Moench][Gotthard][Ctb][Mythen3][Gotthard2][Xilinx\
|
||||
\ 0.\n\t[Mythen3] Options: 8, 16, 32\n\t[Jungfrau][Moench][Ctb][Mythen3][Gotthard2][Xilinx\
|
||||
\ Ctb] 16"
|
||||
infer_action: true
|
||||
template: true
|
||||
@ -2994,7 +2971,7 @@ exptime:
|
||||
store_result_in_t: false
|
||||
command_name: exptime
|
||||
function_alias: exptime
|
||||
help: "[duration] [(optional unit) ns|us|ms|s]\n\t[Eiger][Jungfrau][Moench][Gotthard][Gotthard2][Ctb][Xilinx\
|
||||
help: "[duration] [(optional unit) ns|us|ms|s]\n\t[Eiger][Jungfrau][Moench][Gotthard2][Ctb][Xilinx\
|
||||
\ Ctb] Exposure time\n\t[Mythen3] Exposure time of all gate signals in auto and\
|
||||
\ trigger mode (internal gating). To specify gate index, use exptime1, exptime2,\
|
||||
\ exptime3."
|
||||
@ -3327,41 +3304,6 @@ exptime3:
|
||||
\ mode (internal gating)."
|
||||
infer_action: true
|
||||
template: true
|
||||
exptimel:
|
||||
actions:
|
||||
GET:
|
||||
args:
|
||||
- arg_types: []
|
||||
argc: 0
|
||||
cast_input: []
|
||||
check_det_id: false
|
||||
convert_det_id: true
|
||||
function: getExptimeLeft
|
||||
input: []
|
||||
input_types: []
|
||||
output:
|
||||
- OutString(t)
|
||||
require_det_id: true
|
||||
store_result_in_t: true
|
||||
- arg_types:
|
||||
- special::time_unit
|
||||
argc: 1
|
||||
cast_input: []
|
||||
check_det_id: false
|
||||
convert_det_id: true
|
||||
function: getExptimeLeft
|
||||
input: []
|
||||
input_types: []
|
||||
output:
|
||||
- OutString(t , args[0])
|
||||
require_det_id: true
|
||||
store_result_in_t: true
|
||||
command_name: exptimel
|
||||
function_alias: exptimel
|
||||
help: "[(optional unit) ns|us|ms|s]\n\t[Gotthard] Exposure time left for current\
|
||||
\ frame. "
|
||||
infer_action: true
|
||||
template: true
|
||||
extrastoragecells:
|
||||
actions:
|
||||
GET:
|
||||
@ -3531,9 +3473,8 @@ extsig:
|
||||
store_result_in_t: false
|
||||
command_name: extsig
|
||||
function_alias: extsig
|
||||
help: "[n_signal] [signal_type]\n\t[Gotthard][Mythen3] External signal mode for\
|
||||
\ trigger timing mode.\n\t[Gotthard] [0] [trigger_in_rising_edge|trigger_in_falling_edge]\n\
|
||||
\t[Mythen3] [0-7] [trigger_in_rising_edge|trigger_in_falling_edge|inversion_on|inversion_off]\n\
|
||||
help: "[n_signal] [signal_type]\n\t[Mythen3] External signal mode for trigger timing\
|
||||
\ mode.\n\t[Mythen3] [0-7] [trigger_in_rising_edge|trigger_in_falling_edge|inversion_on|inversion_off]\n\
|
||||
\t where 0 is master input trigger signal, 1-3 is master input gate signals, 4\
|
||||
\ is busy out signal and 5-7 is master output gate signals."
|
||||
infer_action: true
|
||||
@ -3714,8 +3655,8 @@ firmwaretest:
|
||||
store_result_in_t: false
|
||||
command_name: firmwaretest
|
||||
function_alias: firmwaretest
|
||||
help: "\n\t[Jungfrau][Moench][Gotthard][Mythen3][Gotthard2][Ctb][Xilinx Ctb] Firmware\
|
||||
\ test, ie. reads a read fixed pattern from a register."
|
||||
help: "\n\t[Jungfrau][Moench][Mythen3][Gotthard2][Ctb][Xilinx Ctb] Firmware test,\
|
||||
\ ie. reads a read fixed pattern from a register."
|
||||
infer_action: true
|
||||
template: true
|
||||
firmwareversion:
|
||||
@ -4075,8 +4016,8 @@ framesl:
|
||||
store_result_in_t: true
|
||||
command_name: framesl
|
||||
function_alias: framesl
|
||||
help: "\n\t[Gotthard][Jungfrau][Moench][Mythen3][Gotthard2][Ctb][Xilinx Ctb] Number\
|
||||
\ of frames left in acquisition. \n\t[Gotthard2] only in continuous auto mode."
|
||||
help: "\n\t[Jungfrau][Moench][Mythen3][Gotthard2][Ctb][Xilinx Ctb] Number of frames\
|
||||
\ left in acquisition. \n\t[Gotthard2] only in continuous auto mode."
|
||||
infer_action: true
|
||||
template: true
|
||||
frametime:
|
||||
@ -4847,8 +4788,8 @@ highvoltage:
|
||||
store_result_in_t: false
|
||||
command_name: highvoltage
|
||||
function_alias: highvoltage
|
||||
help: "[n_value]\n\tHigh voltage to the sensor in Voltage. \n\t[Gotthard] [0|90|110|120|150|180|200]\
|
||||
\ \n\t[Eiger][Mythen3][Gotthard2] 0-200 \n\t[Jungfrau][Moench][Ctb] [0|60-200]"
|
||||
help: "[n_value]\n\tHigh voltage to the sensor in Voltage. \n\t[Eiger][Mythen3][Gotthard2]\
|
||||
\ 0-200 \n\t[Jungfrau][Moench][Ctb] [0|60-200]"
|
||||
infer_action: true
|
||||
template: true
|
||||
hostname:
|
||||
@ -5041,10 +4982,8 @@ imagetest:
|
||||
store_result_in_t: false
|
||||
command_name: imagetest
|
||||
function_alias: imagetest
|
||||
help: "[0, 1]\n\t[Gotthard] 1 adds channel intensity with precalculated values when\
|
||||
\ taking an acquisition. Default is 0.\n\t[Eiger][Jungfrau][Moench] Only for Virtual\
|
||||
\ servers. If 0, each pixel intensity incremented by 1. If 1, all pixels almost\
|
||||
\ saturated."
|
||||
help: "[0, 1]\n\t[Eiger][Jungfrau][Moench] Only for Virtual servers. If 0, each\
|
||||
\ pixel intensity incremented by 1. If 1, all pixels almost saturated."
|
||||
infer_action: true
|
||||
template: true
|
||||
initialchecks:
|
||||
@ -5370,8 +5309,8 @@ master:
|
||||
command_name: master
|
||||
function_alias: master
|
||||
help: "[0, 1]\n\t[Eiger][Gotthard2][Jungfrau][Moench] Sets (half) module to master\
|
||||
\ and other(s) to slaves.\n\t[Gotthard][Gotthard2][Mythen3][Eiger][Jungfrau][Moench]\
|
||||
\ Gets if the current (half) module is master."
|
||||
\ and other(s) to slaves.\n\t[Gotthard2][Mythen3][Eiger][Jungfrau][Moench] Gets\
|
||||
\ if the current (half) module is master."
|
||||
infer_action: true
|
||||
template: true
|
||||
maxadcphaseshift:
|
||||
@ -7183,8 +7122,8 @@ periodl:
|
||||
store_result_in_t: true
|
||||
command_name: periodl
|
||||
function_alias: periodl
|
||||
help: "\n\t[Gotthard][Jungfrau][Moench][Ctb][Mythen3][Gotthard2][Xilinx Ctb] Period\
|
||||
\ left for current frame. \n\t[Gotthard2] only in continuous mode."
|
||||
help: "\n\t[Jungfrau][Moench][Ctb][Mythen3][Gotthard2][Xilinx Ctb] Period left for\
|
||||
\ current frame. \n\t[Gotthard2] only in continuous mode."
|
||||
infer_action: true
|
||||
template: true
|
||||
polarity:
|
||||
@ -7920,8 +7859,8 @@ rebootcontroller:
|
||||
store_result_in_t: false
|
||||
command_name: rebootcontroller
|
||||
function_alias: rebootcontroller
|
||||
help: "\n\t[Jungfrau][Moench][Ctb][Gotthard][Mythen3][Gotthard2][Xilinx Ctb] Reboot\
|
||||
\ controller of detector."
|
||||
help: "\n\t[Jungfrau][Moench][Ctb][Mythen3][Gotthard2][Xilinx Ctb] Reboot controller\
|
||||
\ of detector."
|
||||
infer_action: true
|
||||
template: true
|
||||
reg:
|
||||
@ -8052,7 +7991,7 @@ resetdacs:
|
||||
store_result_in_t: false
|
||||
command_name: resetdacs
|
||||
function_alias: resetdacs
|
||||
help: "[(optional) hard] \n\t[Eiger][Jungfrau][Moench][Gotthard][Gotthard2][Mythen3]Reset\
|
||||
help: "[(optional) hard] \n\t[Eiger][Jungfrau][Moench][Gotthard2][Mythen3]Reset\
|
||||
\ dac values to the defaults. A 'hard' optional reset will reset the dacs to the\
|
||||
\ hardcoded defaults in on-board detector server."
|
||||
infer_action: true
|
||||
@ -8077,54 +8016,6 @@ resetfpga:
|
||||
help: "\n\t[Jungfrau][Moench][Ctb][Xilinx Ctb] Reset FPGA."
|
||||
infer_action: true
|
||||
template: true
|
||||
roi:
|
||||
actions:
|
||||
GET:
|
||||
args:
|
||||
- arg_types: []
|
||||
argc: 0
|
||||
cast_input: []
|
||||
check_det_id: false
|
||||
convert_det_id: true
|
||||
function: getROI
|
||||
input: []
|
||||
input_types: []
|
||||
output:
|
||||
- t
|
||||
require_det_id: true
|
||||
store_result_in_t: true
|
||||
PUT:
|
||||
args:
|
||||
- arg_types:
|
||||
- int
|
||||
- int
|
||||
argc: 2
|
||||
cast_input:
|
||||
- false
|
||||
check_det_id: false
|
||||
convert_det_id: false
|
||||
exceptions:
|
||||
- condition: det_id == -1 && det->size() > 1
|
||||
message: '"Cannot execute ROI at multi module level"'
|
||||
extra_variables:
|
||||
- name: t
|
||||
type: defs::ROI
|
||||
value: defs::ROI(StringTo<int>(args[0]), StringTo<int>(args[1]))
|
||||
function: setROI
|
||||
input:
|
||||
- t
|
||||
input_types:
|
||||
- defs::ROI
|
||||
output:
|
||||
- t
|
||||
require_det_id: true
|
||||
store_result_in_t: false
|
||||
command_name: roi
|
||||
function_alias: roi
|
||||
help: "[xmin] [xmax] \n\t[Gotthard] Region of interest in detector.\n\tOptions:\
|
||||
\ Only a single ROI per module. \n\tEither all channels or a single adc or 2 chips\
|
||||
\ (256 channels). Default is all channels enabled (-1 -1). "
|
||||
infer_action: true
|
||||
romode:
|
||||
actions:
|
||||
GET:
|
||||
@ -9651,8 +9542,7 @@ serialnumber:
|
||||
store_result_in_t: true
|
||||
command_name: serialnumber
|
||||
function_alias: serialnumber
|
||||
help: "\n\t[Jungfrau][Moench][Gotthard][Mythen3][Gotthard2][Ctb]\n\tSerial number\
|
||||
\ of detector."
|
||||
help: "\n\t[Jungfrau][Moench][Mythen3][Gotthard2][Ctb]\n\tSerial number of detector."
|
||||
infer_action: true
|
||||
template: true
|
||||
setbit:
|
||||
@ -9767,13 +9657,11 @@ settings:
|
||||
help: "[standard, fast, highgain, dynamicgain, lowgain, mediumgain, veryhighgain,\
|
||||
\ highgain0, fixgain1, fixgain2, forceswitchg1, forceswitchg2, verylowgain, g1_hg,\
|
||||
\ g1_lg, g2_hc_hg, g2_hc_lg, g2_lc_hg, g2_lc_lg, g4_hg, g4_lg, gain0]\n\t Detector\
|
||||
\ Settings\n\t[Jungfrau] - [ gain0 | highgain0]\n\t[Gotthard] - [dynamicgain |\
|
||||
\ highgain | lowgain | mediumgain | veryhighgain]\n\t[Gotthard] Also loads default\
|
||||
\ dacs on to the detector.\n\t[Gotthard2] - [dynamicgain | fixgain1 | fixgain2]\n\
|
||||
\t[Mythen3] - [standard | fast | highgain] Also changes vrshaper and vrpreamp.\
|
||||
\ \n\t[Eiger] Use threshold or thresholdnotb. \n\t[Eiger] threshold and settings\
|
||||
\ loaded from file found in settingspath. \n\t[Moench] - [g1_hg | g1_lg | g2_hc_hg\
|
||||
\ | g2_hc_lg | g2_lc_hg | g2_lc_lg | g4_hg | g4_lg]"
|
||||
\ Settings\n\t[Jungfrau] - [ gain0 | highgain0]\n\t[Gotthard2] - [dynamicgain\
|
||||
\ | fixgain1 | fixgain2]\n\t[Mythen3] - [standard | fast | highgain] Also changes\
|
||||
\ vrshaper and vrpreamp. \n\t[Eiger] Use threshold or thresholdnotb. \n\t[Eiger]\
|
||||
\ threshold and settings loaded from file found in settingspath. \n\t[Moench]\
|
||||
\ - [g1_hg | g1_lg | g2_hc_hg | g2_hc_lg | g2_lc_hg | g2_lc_lg | g4_hg | g4_lg]"
|
||||
infer_action: true
|
||||
template: true
|
||||
settingslist:
|
||||
@ -10736,7 +10624,7 @@ temp_adc:
|
||||
store_result_in_t: true
|
||||
command_name: temp_adc
|
||||
function_alias: temp_adc
|
||||
help: "[n_value]\n\t[Jungfrau][Moench][Gotthard] ADC Temperature"
|
||||
help: "[n_value]\n\t[Jungfrau][Moench] ADC Temperature"
|
||||
infer_action: true
|
||||
template: true
|
||||
temp_control:
|
||||
@ -10872,8 +10760,8 @@ temp_fpga:
|
||||
store_result_in_t: true
|
||||
command_name: temp_fpga
|
||||
function_alias: temp_fpga
|
||||
help: "[n_value]\n\t[Eiger][Jungfrau][Moench][Gotthard][Mythen3][Gotthard2][Xilinx\
|
||||
\ CTB] FPGA Temperature"
|
||||
help: "[n_value]\n\t[Eiger][Jungfrau][Moench][Mythen3][Gotthard2][Xilinx CTB] FPGA\
|
||||
\ Temperature"
|
||||
infer_action: true
|
||||
template: true
|
||||
temp_fpgaext:
|
||||
@ -11344,8 +11232,8 @@ timing:
|
||||
command_name: timing
|
||||
function_alias: timing
|
||||
help: "[auto|trigger|gating|burst_trigger|trigger_gating]\n\tTiming Mode of detector.\n\
|
||||
\t[Jungfrau][Moench][Gotthard][Ctb][Gotthard2][Xilinx Ctb] [auto|trigger]\n\t\
|
||||
[Mythen3] [auto|trigger|gating|trigger_gating]\n\t[Eiger] [auto|trigger|gating|burst_trigger]"
|
||||
\t[Jungfrau][Moench][Ctb][Gotthard2][Xilinx Ctb] [auto|trigger]\n\t[Mythen3] [auto|trigger|gating|trigger_gating]\n\
|
||||
\t[Eiger] [auto|trigger|gating|burst_trigger]"
|
||||
infer_action: true
|
||||
template: true
|
||||
timing_info_decoder:
|
||||
@ -11614,8 +11502,8 @@ triggersl:
|
||||
store_result_in_t: true
|
||||
command_name: triggersl
|
||||
function_alias: triggersl
|
||||
help: "\n\t[Gotthard][Jungfrau][Moench][Mythen3][Gotthard2][Ctb][Xilinx Ctb] Number\
|
||||
\ of triggers left in acquisition. Only when external trigger used."
|
||||
help: "\n\t[Jungfrau][Moench][Mythen3][Gotthard2][Ctb][Xilinx Ctb] Number of triggers\
|
||||
\ left in acquisition. Only when external trigger used."
|
||||
infer_action: true
|
||||
template: true
|
||||
trimbits:
|
||||
@ -11960,8 +11848,8 @@ type:
|
||||
store_result_in_t: true
|
||||
command_name: type
|
||||
function_alias: type
|
||||
help: "\n\tReturns detector type. Can be Eiger, Jungfrau, Gotthard, Moench, Mythen3,\
|
||||
\ Gotthard2, ChipTestBoard, Xilinx_ChipTestBoard"
|
||||
help: "\n\tReturns detector type. Can be Eiger, Jungfrau, Moench, Mythen3, Gotthard2,\
|
||||
\ ChipTestBoard, Xilinx_ChipTestBoard"
|
||||
infer_action: true
|
||||
template: true
|
||||
udp_cleardst:
|
||||
@ -12569,11 +12457,11 @@ update:
|
||||
command_name: update
|
||||
function_alias: update
|
||||
help: "\n\tWithout tftp: [server_name (incl fullpath)] [fname.pof (incl full path)]\
|
||||
\ This does not use tftp.\n\t\t[Jungfrau][Moench][Gotthard][Ctb] Updates the firmware,\
|
||||
\ detector server, deletes old server, creates the symbolic link and then reboots\
|
||||
\ detector controller. \n\t\t[Mythen3][Gotthard2] will require a script to start\
|
||||
\ up the shorter named server link at start up. \n\t\tserver_name is full path\
|
||||
\ name of detector server binary\n\t\tfname is full path of programming file"
|
||||
\ This does not use tftp.\n\t\t[Jungfrau][Moench][Ctb] Updates the firmware, detector\
|
||||
\ server, deletes old server, creates the symbolic link and then reboots detector\
|
||||
\ controller. \n\t\t[Mythen3][Gotthard2] will require a script to start up the\
|
||||
\ shorter named server link at start up. \n\t\tserver_name is full path name of\
|
||||
\ detector server binary\n\t\tfname is full path of programming file"
|
||||
infer_action: true
|
||||
updatedetectorserver:
|
||||
actions:
|
||||
|
@ -4,10 +4,36 @@ used to generate C++ cli commands. and bash autocompletion scripts.
|
||||
|
||||
### Overview
|
||||
|
||||
|
||||
If any changes to enums in slsDetectorDefs
|
||||
```sh
|
||||
# to generate the dump.json file
|
||||
cd slsSupportLib/src
|
||||
clang++ -Xclang -ast-dump=json -Xclang -ast-dump-filter -Xclang StringTo -c ToString.cpp -I ../include/ -std=gnu++11 > ../../slsDetectorSoftware/generator/autocomplete/dump.json
|
||||
cd ../../slsDetectorSoftware/generator/autocomplete
|
||||
python autocomplete.py -f
|
||||
```
|
||||
To Generate command line commands
|
||||
```sh
|
||||
python gen_commands.py -pgf
|
||||
```
|
||||
To generate autocomplete
|
||||
```sh
|
||||
python gen_commands.py -agf
|
||||
source bash_autocomplete.sh
|
||||
```
|
||||
Always clang-format at the end
|
||||
```sh
|
||||
cd slsDetectorPackage/build
|
||||
make format
|
||||
```
|
||||
|
||||
### Details
|
||||
Looks through the `dump.json` file for the different values of an enum and stores them in the dictionary `type_values`.
|
||||
```sh
|
||||
# To print the different values for enums
|
||||
python gen_commands.py -a
|
||||
|
||||
```
|
||||
|
||||
also the autocomplete.py generates shell autocompletion scripts for both bash and zsh. It uses the template file `bash_autocomplete.in.sh` and adds the necessary code in an output file `bash_autocomplete.sh` (same for zsh).
|
||||
@ -29,6 +55,8 @@ The dump.json is the AST of the file `slsDetectorPackage/slsSupportLib/src/ToStr
|
||||
# to generate the dump.json file
|
||||
cd slsSupportLib/src
|
||||
clang++ -Xclang -ast-dump=json -Xclang -ast-dump-filter -Xclang StringTo -c ToString.cpp -I ../include/ -std=gnu++11 > ../../slsDetectorSoftware/generator/autocomplete/dump.json
|
||||
cd ../../slsDetectorSoftware/generator/autocomplete
|
||||
python autocomplete.py -f
|
||||
# clang version used: 14.0.0-1ubuntu1.1
|
||||
```
|
||||
|
||||
|
@ -97,7 +97,7 @@ class Detector {
|
||||
|
||||
Result<std::string> getKernelVersion(Positions pos = {}) const;
|
||||
|
||||
/* [Jungfrau][Moench][Gotthard][Mythen3][Gotthard2][CTB] */
|
||||
/* [Jungfrau][Moench][Mythen3][Gotthard2][CTB] */
|
||||
Result<int64_t> getSerialNumber(Positions pos = {}) const;
|
||||
|
||||
/** [Eiger][Gotthard2][Mythen3][Jungfrau][Moench] 6 bit value (ideally
|
||||
@ -106,7 +106,7 @@ class Detector {
|
||||
|
||||
Result<std::string> getReceiverVersion(Positions pos = {}) const;
|
||||
|
||||
/** Options: EIGER, JUNGFRAU, GOTTHARD, MOENCH, MYTHEN3, GOTTHARD2,
|
||||
/** Options: EIGER, JUNGFRAU, MOENCH, MYTHEN3, GOTTHARD2,
|
||||
* CHIPTESTBOARD, XILINX_CHIPTESTBOARD */
|
||||
Result<defs::detectorType> getDetectorType(Positions pos = {}) const;
|
||||
|
||||
@ -134,10 +134,10 @@ class Detector {
|
||||
/** list of possible settings for this detector */
|
||||
std::vector<defs::detectorSettings> getSettingsList() const;
|
||||
|
||||
/** [Jungfrau][Moench][Gotthard][Gotthard2][Mythen3] */
|
||||
/** [Jungfrau][Moench][Gotthard2][Mythen3] */
|
||||
Result<defs::detectorSettings> getSettings(Positions pos = {}) const;
|
||||
|
||||
/** [Jungfrau] GAIN0, HIGHGAIN0 \n [Gotthard] DYNAMICGAIN, HIGHGAIN,
|
||||
/** [Jungfrau] GAIN0, HIGHGAIN0 \n DYNAMICGAIN, HIGHGAIN,
|
||||
* LOWGAIN, MEDIUMGAIN, VERYHIGHGAIN \n [Gotthard2] DYNAMICGAIN,
|
||||
* FIXGAIN1, FIXGAIN2 \n [Mythen3] STANDARD, FAST,
|
||||
* HIGHGAIN. Also changes vrshaper and vrpreamp \n [Eiger] Use threshold
|
||||
@ -312,11 +312,11 @@ class Detector {
|
||||
|
||||
void setNumberOfTriggers(int64_t value);
|
||||
|
||||
/** [Gotthard][Jungfrau][Moench][Eiger][CTB][Xilinx CTB][Gotthard2] \n
|
||||
/** [Jungfrau][Moench][Eiger][CTB][Xilinx CTB][Gotthard2] \n
|
||||
* [Mythen3] use function with gate index **/
|
||||
Result<ns> getExptime(Positions pos = {}) const;
|
||||
|
||||
/** [Gotthard][Jungfrau][Moench][Eiger][CTB][Xilinx CTB][Gotthard2] \n
|
||||
/** [Jungfrau][Moench][Eiger][CTB][Xilinx CTB][Gotthard2] \n
|
||||
* [Mythen3] sets exptime for all gate signals. To specify gate index, use
|
||||
* function with gate index **/
|
||||
void setExptime(ns t, Positions pos = {});
|
||||
@ -325,25 +325,25 @@ class Detector {
|
||||
|
||||
void setPeriod(ns t, Positions pos = {});
|
||||
|
||||
/** [Gotthard][Jungfrau][Moench][CTB][Mythen3][Gotthard2][Xilinx CTB] */
|
||||
/** [Jungfrau][Moench][CTB][Mythen3][Gotthard2][Xilinx CTB] */
|
||||
Result<ns> getDelayAfterTrigger(Positions pos = {}) const;
|
||||
|
||||
/** [Gotthard][Jungfrau][Moench][CTB][Mythen3][Gotthard2][Xilinx CTB] */
|
||||
/** [Jungfrau][Moench][CTB][Mythen3][Gotthard2][Xilinx CTB] */
|
||||
void setDelayAfterTrigger(ns value, Positions pos = {});
|
||||
|
||||
/** [Gotthard][Jungfrau][Moench][CTB][Mythen3][Xilinx CTB]
|
||||
/** [Jungfrau][Moench][CTB][Mythen3][Xilinx CTB]
|
||||
* [Gotthard2] only in continuous auto mode */
|
||||
Result<int64_t> getNumberOfFramesLeft(Positions pos = {}) const;
|
||||
|
||||
/** [Gotthard][Jungfrau][Moench][CTB][Mythen3][Xilinx CTB]
|
||||
/** [Jungfrau][Moench][CTB][Mythen3][Xilinx CTB]
|
||||
* Only when external trigger used */
|
||||
Result<int64_t> getNumberOfTriggersLeft(Positions pos = {}) const;
|
||||
|
||||
/** [Gotthard][Jungfrau][Moench][CTB][Mythen3][Gotthard2][Xilinx CTB]
|
||||
/** [Jungfrau][Moench][CTB][Mythen3][Gotthard2][Xilinx CTB]
|
||||
* [Gotthard2] only in continuous mode */
|
||||
Result<ns> getPeriodLeft(Positions pos = {}) const;
|
||||
|
||||
/** [Gotthard][Jungfrau][Moench][CTB][Mythen3][Xilinx CTB]
|
||||
/** [Jungfrau][Moench][CTB][Mythen3][Xilinx CTB]
|
||||
* [Gotthard2] only in continuous mode */
|
||||
Result<ns> getDelayAfterTriggerLeft(Positions pos = {}) const;
|
||||
|
||||
@ -352,7 +352,7 @@ class Detector {
|
||||
/**
|
||||
* [Eiger] Options: 4, 8, 12, 16, 32. If i is 32, also sets clkdivider to 2,
|
||||
* else sets clkdivider to 1 \n [Mythen3] Options: 8, 16, 32 \n
|
||||
* [Jungfrau][Moench][Gotthard][CTB][Mythen3][Gotthard2][Xilinx CTB] 16
|
||||
* [Jungfrau][Moench][CTB][Mythen3][Gotthard2][Xilinx CTB] 16
|
||||
*/
|
||||
void setDynamicRange(int value);
|
||||
|
||||
@ -362,7 +362,7 @@ class Detector {
|
||||
Result<defs::timingMode> getTimingMode(Positions pos = {}) const;
|
||||
|
||||
/**
|
||||
* [Gotthard][Jungfrau][Moench][Gotthard][CTB][Gotthard2][Xilinx CTB]
|
||||
* [Jungfrau][Moench][CTB][Gotthard2][Xilinx CTB]
|
||||
* Options: AUTO_TIMING, TRIGGER_EXPOSURE \n [Mythen3] Options: AUTO_TIMING,
|
||||
* TRIGGER_EXPOSURE, GATED, TRIGGER_GATED \n [Eiger] Options: AUTO_TIMING,
|
||||
* TRIGGER_EXPOSURE, GATED, BURST_TRIGGER
|
||||
@ -391,25 +391,23 @@ class Detector {
|
||||
/** [Jungfrau][Moench][CTB] */
|
||||
Result<int> getADCPhase(Positions pos = {}) const;
|
||||
|
||||
/** [Gotthard][Jungfrau][Moench][CTB]
|
||||
/** [Jungfrau][Moench][CTB]
|
||||
* [Jungfrau][Moench] Absolute phase shift. Changing Speed also resets
|
||||
* adcphase to recommended defaults. \n [Ctb] Absolute phase shift. Changing
|
||||
* adcclk also resets adcphase and sets it to previous values. \n [Gotthard]
|
||||
* Relative phase shift
|
||||
* adcclk also resets adcphase and sets it to previous values.
|
||||
*/
|
||||
void setADCPhase(int value, Positions pos = {});
|
||||
|
||||
/** [Jungfrau][Moench][CTB] */
|
||||
Result<int> getMaxADCPhaseShift(Positions pos = {}) const;
|
||||
|
||||
/** [Gotthard][Jungfrau][Moench][CTB] */
|
||||
/** [Jungfrau][Moench][CTB] */
|
||||
Result<int> getADCPhaseInDegrees(Positions pos = {}) const;
|
||||
|
||||
/** [Gotthard][Jungfrau][Moench][CTB]
|
||||
/** [Jungfrau][Moench][CTB]
|
||||
* [Jungfrau][Moench] Absolute phase shift. Changing Speed also resets
|
||||
* adcphase to recommended defaults. \n [Ctb] Absolute phase shift. Changing
|
||||
* adcclk also resets adcphase and sets it to previous values. \n [Gotthard]
|
||||
* Relative phase shift
|
||||
* adcclk also resets adcphase and sets it to previous values.
|
||||
*/
|
||||
void setADCPhaseInDegrees(int value, Positions pos = {});
|
||||
|
||||
@ -462,7 +460,6 @@ class Detector {
|
||||
Result<int> getHighVoltage(Positions pos = {}) const;
|
||||
|
||||
/**
|
||||
* [Gotthard] Options: 0, 90, 110, 120, 150, 180, 200
|
||||
* [Jungfrau][Moench][CTB] Options: 0, 60 - 200
|
||||
* [Eiger][Mythen3][Gotthard2] Options: 0 - 200
|
||||
*/
|
||||
@ -482,11 +479,10 @@ class Detector {
|
||||
*/
|
||||
void setPowerChip(bool on, Positions pos = {});
|
||||
|
||||
/** [Gotthard][Eiger virtual] */
|
||||
/** [Eiger virtual] */
|
||||
Result<int> getImageTestMode(Positions pos = {});
|
||||
|
||||
/** [Gotthard] If 1, adds channel intensity with precalculated values.
|
||||
* Default is 0 \n
|
||||
/**
|
||||
* [Eiger][Jungfrau][Moench] Only for virtual servers, if 1, pixels are
|
||||
* saturated. If 0, increasing intensity */
|
||||
void setImageTestMode(const int value, Positions pos = {});
|
||||
@ -497,7 +493,6 @@ class Detector {
|
||||
/**
|
||||
* (Degrees)
|
||||
* [Mythen3][Gotthard2][Xilinx Ctb] Options: TEMPERATURE_FPGA
|
||||
* [Gotthard] Options: TEMPERATURE_ADC, TEMPERATURE_FPGA \n
|
||||
* [Jungfrau][Moench] Options: TEMPERATURE_ADC, TEMPERATURE_FPGA \n
|
||||
* [Eiger] Options: TEMPERATURE_FPGA, TEMPERATURE_FPGAEXT, TEMPERATURE_10GE,
|
||||
* TEMPERATURE_DCDC, TEMPERATURE_SODL, TEMPERATURE_SODR, TEMPERATURE_FPGA2,
|
||||
@ -508,10 +503,10 @@ class Detector {
|
||||
/** gets list of dac enums for this detector */
|
||||
std::vector<defs::dacIndex> getDacList() const;
|
||||
|
||||
/** [Eiger][Jungfrau][Moench][Gotthard][Gotthard2][Mythen3] */
|
||||
/** [Eiger][Jungfrau][Moench][Gotthard2][Mythen3] */
|
||||
Result<int> getDefaultDac(defs::dacIndex index, Positions pos = {});
|
||||
|
||||
/** [Eiger][Jungfrau][Moench][Gotthard][Gotthard2][Mythen3] */
|
||||
/** [Eiger][Jungfrau][Moench][Gotthard2][Mythen3] */
|
||||
void setDefaultDac(defs::dacIndex index, int defaultValue,
|
||||
Positions pos = {});
|
||||
|
||||
@ -523,7 +518,7 @@ class Detector {
|
||||
void setDefaultDac(defs::dacIndex index, int defaultValue,
|
||||
defs::detectorSettings sett, Positions pos = {});
|
||||
|
||||
/** [Eiger][Jungfrau][Moench][Gotthard][Gotthard2][Mythen3]
|
||||
/** [Eiger][Jungfrau][Moench][Gotthard2][Mythen3]
|
||||
reset to defaults, hardReset will reset to hardcoded defaults on on-board
|
||||
server */
|
||||
void resetToDefaultDacs(const bool hardReset, Positions pos = {});
|
||||
@ -542,13 +537,12 @@ class Detector {
|
||||
void setOnChipDAC(defs::dacIndex index, int chipIndex, int value,
|
||||
Positions pos = {});
|
||||
|
||||
/** [Gotthard] signal index is 0
|
||||
* [Mythen3] signal index 0-3 for master input, 4-7 master output signals */
|
||||
/** [Mythen3] signal index 0-3 for master input, 4-7 master output signals
|
||||
*/
|
||||
Result<defs::externalSignalFlag>
|
||||
getExternalSignalFlags(int signalIndex, Positions pos = {}) const;
|
||||
|
||||
/** [Gotthard] signal index is 0
|
||||
* Options: TRIGGER_IN_RISING_EDGE, TRIGGER_IN_FALLING_EDGE
|
||||
/**
|
||||
* [Mythen3] signal index 0 is master input trigger signal, 1-3 for master
|
||||
* input gate signals, 4 is busy out signal, 5-7 is master output gate
|
||||
* signals.
|
||||
@ -1397,33 +1391,6 @@ class Detector {
|
||||
|
||||
///@}
|
||||
|
||||
/** @name Gotthard Specific */
|
||||
///@{
|
||||
/**************************************************
|
||||
* *
|
||||
* Gotthard Specific *
|
||||
* *
|
||||
* ************************************************/
|
||||
|
||||
/** [Gotthard]*/
|
||||
Result<defs::ROI> getROI(Positions pos = {}) const;
|
||||
|
||||
/**
|
||||
* [Gotthard] Region of interest in detector \n
|
||||
* Options: Only a single ROI per module \n
|
||||
* Either all channels or a single adc or 2 chips (256 channels). Default is
|
||||
* all channels enabled (-1 -1). \n module_id is position index
|
||||
*/
|
||||
void setROI(defs::ROI value, int module_id);
|
||||
|
||||
/** [Gotthard] Clear ROI to all channels enabled. Default is all channels
|
||||
* enabled. */
|
||||
void clearROI(Positions pos = {});
|
||||
|
||||
/** [Gotthard] */
|
||||
Result<ns> getExptimeLeft(Positions pos = {}) const;
|
||||
///@}
|
||||
|
||||
/** @name Gotthard2 Specific */
|
||||
///@{
|
||||
/**************************************************
|
||||
@ -2006,7 +1973,7 @@ class Detector {
|
||||
/** [CTB][Moench] */
|
||||
void setADCPipeline(int value, Positions pos = {});
|
||||
|
||||
/** [Jungfrau][Moench][Gotthard][CTB][Mythen3][Gotthard2]
|
||||
/** [Jungfrau][Moench][CTB][Mythen3][Gotthard2]
|
||||
* Advanced user Function!
|
||||
* Program firmware from command line, after which detector controller is
|
||||
* rebooted. forceDeleteNormalFile is true, if normal file found
|
||||
@ -2035,12 +2002,12 @@ class Detector {
|
||||
*/
|
||||
void updateKernel(const std::string &fname, Positions pos = {});
|
||||
|
||||
/** [Jungfrau][Moench][Gotthard][CTB][Mythen3][Gotthard2][Xilinx CTB]
|
||||
/** [Jungfrau][Moench][CTB][Mythen3][Gotthard2][Xilinx CTB]
|
||||
* Advanced user Function! */
|
||||
void rebootController(Positions pos = {});
|
||||
|
||||
/**
|
||||
* Advanced user Function!\n [Jungfrau][Moench][Gotthard][CTB] Updates the
|
||||
* Advanced user Function!\n [Jungfrau][Moench][CTB] Updates the
|
||||
* firmware, detector server, make a soft link and then reboots detector
|
||||
* controller. \n [Mythen3][Gotthard2] Will require a script to start up the
|
||||
* shorter named server link at start up \n sname is full path name of
|
||||
@ -2080,16 +2047,16 @@ class Detector {
|
||||
/** Advanced user Function! */
|
||||
Result<int> getBit(uint32_t addr, int bitnr, Positions pos = {});
|
||||
|
||||
/** [Gotthard][Jungfrau][Moench][Mythen3][Gotthard2][CTB] Advanced user
|
||||
/** [Jungfrau][Moench][Mythen3][Gotthard2][CTB] Advanced user
|
||||
* Function! */
|
||||
void executeFirmwareTest(Positions pos = {});
|
||||
|
||||
/** [Gotthard][Jungfrau][Moench][Mythen3][Gotthard2][CTB] Advanced user
|
||||
/** [Jungfrau][Moench][Mythen3][Gotthard2][CTB] Advanced user
|
||||
* Function! Writes different values in a R/W register and confirms the
|
||||
* writes to check bus */
|
||||
void executeBusTest(Positions pos = {});
|
||||
|
||||
/** [Gotthard][Jungfrau][Moench][CTB] Advanced user Function! not possible
|
||||
/** [Jungfrau][Moench][CTB] Advanced user Function! not possible
|
||||
* to read back */
|
||||
void writeAdcRegister(uint32_t addr, uint32_t value, Positions pos = {});
|
||||
|
||||
|
@ -532,10 +532,9 @@ std::string Caller::adcphase(int action) {
|
||||
// print help
|
||||
if (action == slsDetectorDefs::HELP_ACTION) {
|
||||
os << R"V0G0N([n_value] [(optional)deg]
|
||||
[Jungfrau][Moench][Ctb][Gotthard] Phase shift of ADC clock.
|
||||
[Jungfrau][Moench][Ctb] Phase shift of ADC clock.
|
||||
[Jungfrau][Moench] Absolute phase shift. If deg used, then shift in degrees. Changing Speed also resets adcphase to recommended defaults.
|
||||
[Ctb] Absolute phase shift. If deg used, then shift in degrees. Changing adcclk also resets adcphase and sets it to previous values.
|
||||
[Gotthard] Relative phase shift. Cannot get )V0G0N"
|
||||
[Ctb] Absolute phase shift. If deg used, then shift in degrees. Changing adcclk also resets adcphase and sets it to previous values. )V0G0N"
|
||||
<< std::endl;
|
||||
return os.str();
|
||||
}
|
||||
@ -725,7 +724,7 @@ std::string Caller::adcreg(int action) {
|
||||
// print help
|
||||
if (action == slsDetectorDefs::HELP_ACTION) {
|
||||
os << R"V0G0N([address] [value]
|
||||
[Jungfrau][Moench][Ctb][Gotthard] Writes to an adc register in hex. Advanced user Function! )V0G0N"
|
||||
[Jungfrau][Moench][Ctb] Writes to an adc register in hex. Advanced user Function! )V0G0N"
|
||||
<< std::endl;
|
||||
return os.str();
|
||||
}
|
||||
@ -1318,7 +1317,7 @@ std::string Caller::bustest(int action) {
|
||||
// print help
|
||||
if (action == slsDetectorDefs::HELP_ACTION) {
|
||||
os << R"V0G0N(
|
||||
[Jungfrau][Moench][Gotthard][Mythen3][Gotthard2][Ctb] Bus test, ie. Writes different values in a R/W register and confirms the writes to check bus.
|
||||
[Jungfrau][Moench][Mythen3][Gotthard2][Ctb] Bus test, ie. Writes different values in a R/W register and confirms the writes to check bus.
|
||||
Advanced User function! )V0G0N"
|
||||
<< std::endl;
|
||||
return os.str();
|
||||
@ -1589,45 +1588,6 @@ std::string Caller::clearbusy(int action) {
|
||||
return os.str();
|
||||
}
|
||||
|
||||
std::string Caller::clearroi(int action) {
|
||||
|
||||
std::ostringstream os;
|
||||
// print help
|
||||
if (action == slsDetectorDefs::HELP_ACTION) {
|
||||
os << R"V0G0N(
|
||||
[Gotthard] Resets Region of interest in detector. All channels enabled. Default is all channels enabled. )V0G0N"
|
||||
<< std::endl;
|
||||
return os.str();
|
||||
}
|
||||
|
||||
// check if action and arguments are valid
|
||||
if (action == slsDetectorDefs::PUT_ACTION) {
|
||||
if (1 && args.size() != 0) {
|
||||
throw RuntimeError("Wrong number of arguments for action PUT");
|
||||
}
|
||||
|
||||
if (args.size() == 0) {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
else {
|
||||
|
||||
throw RuntimeError(
|
||||
"INTERNAL ERROR: Invalid action: supported actions are ['PUT']");
|
||||
}
|
||||
|
||||
// generate code for each action
|
||||
if (action == slsDetectorDefs::PUT_ACTION) {
|
||||
if (args.size() == 0) {
|
||||
det->clearROI(std::vector<int>{det_id});
|
||||
os << "successful" << '\n';
|
||||
}
|
||||
}
|
||||
|
||||
return os.str();
|
||||
}
|
||||
|
||||
std::string Caller::clientversion(int action) {
|
||||
|
||||
std::ostringstream os;
|
||||
@ -3266,7 +3226,7 @@ std::string Caller::delay(int action) {
|
||||
// print help
|
||||
if (action == slsDetectorDefs::HELP_ACTION) {
|
||||
os << R"V0G0N([duration] [(optional unit) ns|us|ms|s]
|
||||
[Jungfrau][Moench][Gotthard][Mythen3][Gotthard2][Ctb][Moench][Xilinx Ctb] Delay after trigger )V0G0N"
|
||||
[Jungfrau][Moench][Mythen3][Gotthard2][Ctb][Moench][Xilinx Ctb] Delay after trigger )V0G0N"
|
||||
<< std::endl;
|
||||
return os.str();
|
||||
}
|
||||
@ -3354,7 +3314,7 @@ std::string Caller::delayl(int action) {
|
||||
// print help
|
||||
if (action == slsDetectorDefs::HELP_ACTION) {
|
||||
os << R"V0G0N(
|
||||
[Gotthard][Jungfrau][Moench][Mythen3][Gotthard2][Ctb][Xilinx Ctb] Delay Left in Acquisition.
|
||||
[Jungfrau][Moench][Mythen3][Gotthard2][Ctb][Xilinx Ctb] Delay Left in Acquisition.
|
||||
[Gotthard2] only in continuous mode. )V0G0N"
|
||||
<< std::endl;
|
||||
return os.str();
|
||||
@ -3615,7 +3575,7 @@ std::string Caller::dr(int action) {
|
||||
Dynamic Range or number of bits per pixel in detector.
|
||||
[Eiger] Options: 4, 8, 12, 16, 32. If set to 32, also sets clkdivider to 2, else to 0.
|
||||
[Mythen3] Options: 8, 16, 32
|
||||
[Jungfrau][Moench][Gotthard][Ctb][Mythen3][Gotthard2][Xilinx Ctb] 16 )V0G0N"
|
||||
[Jungfrau][Moench][Ctb][Mythen3][Gotthard2][Xilinx Ctb] 16 )V0G0N"
|
||||
<< std::endl;
|
||||
return os.str();
|
||||
}
|
||||
@ -3781,7 +3741,7 @@ std::string Caller::exptime(int action) {
|
||||
// print help
|
||||
if (action == slsDetectorDefs::HELP_ACTION) {
|
||||
os << R"V0G0N([duration] [(optional unit) ns|us|ms|s]
|
||||
[Eiger][Jungfrau][Moench][Gotthard][Gotthard2][Ctb][Xilinx Ctb] Exposure time
|
||||
[Eiger][Jungfrau][Moench][Gotthard2][Ctb][Xilinx Ctb] Exposure time
|
||||
[Mythen3] Exposure time of all gate signals in auto and trigger mode (internal gating). To specify gate index, use exptime1, exptime2, exptime3. )V0G0N"
|
||||
<< std::endl;
|
||||
return os.str();
|
||||
@ -4175,53 +4135,6 @@ std::string Caller::exptime3(int action) {
|
||||
return os.str();
|
||||
}
|
||||
|
||||
std::string Caller::exptimel(int action) {
|
||||
|
||||
std::ostringstream os;
|
||||
// print help
|
||||
if (action == slsDetectorDefs::HELP_ACTION) {
|
||||
os << R"V0G0N([(optional unit) ns|us|ms|s]
|
||||
[Gotthard] Exposure time left for current frame. )V0G0N"
|
||||
<< std::endl;
|
||||
return os.str();
|
||||
}
|
||||
|
||||
// check if action and arguments are valid
|
||||
if (action == slsDetectorDefs::GET_ACTION) {
|
||||
if (1 && args.size() != 0 && args.size() != 1) {
|
||||
throw RuntimeError("Wrong number of arguments for action GET");
|
||||
}
|
||||
|
||||
if (args.size() == 0) {
|
||||
}
|
||||
|
||||
if (args.size() == 1) {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
else {
|
||||
|
||||
throw RuntimeError(
|
||||
"INTERNAL ERROR: Invalid action: supported actions are ['GET']");
|
||||
}
|
||||
|
||||
// generate code for each action
|
||||
if (action == slsDetectorDefs::GET_ACTION) {
|
||||
if (args.size() == 0) {
|
||||
auto t = det->getExptimeLeft(std::vector<int>{det_id});
|
||||
os << OutString(t) << '\n';
|
||||
}
|
||||
|
||||
if (args.size() == 1) {
|
||||
auto t = det->getExptimeLeft(std::vector<int>{det_id});
|
||||
os << OutString(t, args[0]) << '\n';
|
||||
}
|
||||
}
|
||||
|
||||
return os.str();
|
||||
}
|
||||
|
||||
std::string Caller::extrastoragecells(int action) {
|
||||
|
||||
std::ostringstream os;
|
||||
@ -4420,8 +4333,7 @@ std::string Caller::extsig(int action) {
|
||||
// print help
|
||||
if (action == slsDetectorDefs::HELP_ACTION) {
|
||||
os << R"V0G0N([n_signal] [signal_type]
|
||||
[Gotthard][Mythen3] External signal mode for trigger timing mode.
|
||||
[Gotthard] [0] [trigger_in_rising_edge|trigger_in_falling_edge]
|
||||
[Mythen3] External signal mode for trigger timing mode.
|
||||
[Mythen3] [0-7] [trigger_in_rising_edge|trigger_in_falling_edge|inversion_on|inversion_off]
|
||||
where 0 is master input trigger signal, 1-3 is master input gate signals, 4 is busy out signal and 5-7 is master output gate signals. )V0G0N"
|
||||
<< std::endl;
|
||||
@ -4749,7 +4661,7 @@ std::string Caller::firmwaretest(int action) {
|
||||
// print help
|
||||
if (action == slsDetectorDefs::HELP_ACTION) {
|
||||
os << R"V0G0N(
|
||||
[Jungfrau][Moench][Gotthard][Mythen3][Gotthard2][Ctb][Xilinx Ctb] Firmware test, ie. reads a read fixed pattern from a register. )V0G0N"
|
||||
[Jungfrau][Moench][Mythen3][Gotthard2][Ctb][Xilinx Ctb] Firmware test, ie. reads a read fixed pattern from a register. )V0G0N"
|
||||
<< std::endl;
|
||||
return os.str();
|
||||
}
|
||||
@ -5315,7 +5227,7 @@ std::string Caller::framesl(int action) {
|
||||
// print help
|
||||
if (action == slsDetectorDefs::HELP_ACTION) {
|
||||
os << R"V0G0N(
|
||||
[Gotthard][Jungfrau][Moench][Mythen3][Gotthard2][Ctb][Xilinx Ctb] Number of frames left in acquisition.
|
||||
[Jungfrau][Moench][Mythen3][Gotthard2][Ctb][Xilinx Ctb] Number of frames left in acquisition.
|
||||
[Gotthard2] only in continuous auto mode. )V0G0N"
|
||||
<< std::endl;
|
||||
return os.str();
|
||||
@ -6142,7 +6054,6 @@ std::string Caller::highvoltage(int action) {
|
||||
if (action == slsDetectorDefs::HELP_ACTION) {
|
||||
os << R"V0G0N([n_value]
|
||||
High voltage to the sensor in Voltage.
|
||||
[Gotthard] [0|90|110|120|150|180|200]
|
||||
[Eiger][Mythen3][Gotthard2] 0-200
|
||||
[Jungfrau][Moench][Ctb] [0|60-200] )V0G0N"
|
||||
<< std::endl;
|
||||
@ -6406,7 +6317,6 @@ std::string Caller::imagetest(int action) {
|
||||
// print help
|
||||
if (action == slsDetectorDefs::HELP_ACTION) {
|
||||
os << R"V0G0N([0, 1]
|
||||
[Gotthard] 1 adds channel intensity with precalculated values when taking an acquisition. Default is 0.
|
||||
[Eiger][Jungfrau][Moench] Only for Virtual servers. If 0, each pixel intensity incremented by 1. If 1, all pixels almost saturated. )V0G0N"
|
||||
<< std::endl;
|
||||
return os.str();
|
||||
@ -6935,7 +6845,7 @@ std::string Caller::master(int action) {
|
||||
if (action == slsDetectorDefs::HELP_ACTION) {
|
||||
os << R"V0G0N([0, 1]
|
||||
[Eiger][Gotthard2][Jungfrau][Moench] Sets (half) module to master and other(s) to slaves.
|
||||
[Gotthard][Gotthard2][Mythen3][Eiger][Jungfrau][Moench] Gets if the current (half) module is master. )V0G0N"
|
||||
[Gotthard2][Mythen3][Eiger][Jungfrau][Moench] Gets if the current (half) module is master. )V0G0N"
|
||||
<< std::endl;
|
||||
return os.str();
|
||||
}
|
||||
@ -9078,7 +8988,7 @@ std::string Caller::periodl(int action) {
|
||||
// print help
|
||||
if (action == slsDetectorDefs::HELP_ACTION) {
|
||||
os << R"V0G0N(
|
||||
[Gotthard][Jungfrau][Moench][Ctb][Mythen3][Gotthard2][Xilinx Ctb] Period left for current frame.
|
||||
[Jungfrau][Moench][Ctb][Mythen3][Gotthard2][Xilinx Ctb] Period left for current frame.
|
||||
[Gotthard2] only in continuous mode. )V0G0N"
|
||||
<< std::endl;
|
||||
return os.str();
|
||||
@ -10151,7 +10061,7 @@ std::string Caller::rebootcontroller(int action) {
|
||||
// print help
|
||||
if (action == slsDetectorDefs::HELP_ACTION) {
|
||||
os << R"V0G0N(
|
||||
[Jungfrau][Moench][Ctb][Gotthard][Mythen3][Gotthard2][Xilinx Ctb] Reboot controller of detector. )V0G0N"
|
||||
[Jungfrau][Moench][Ctb][Mythen3][Gotthard2][Xilinx Ctb] Reboot controller of detector. )V0G0N"
|
||||
<< std::endl;
|
||||
return os.str();
|
||||
}
|
||||
@ -10303,7 +10213,7 @@ std::string Caller::resetdacs(int action) {
|
||||
// print help
|
||||
if (action == slsDetectorDefs::HELP_ACTION) {
|
||||
os << R"V0G0N([(optional) hard]
|
||||
[Eiger][Jungfrau][Moench][Gotthard][Gotthard2][Mythen3]Reset dac values to the defaults. A 'hard' optional reset will reset the dacs to the hardcoded defaults in on-board detector server. )V0G0N"
|
||||
[Eiger][Jungfrau][Moench][Gotthard2][Mythen3]Reset dac values to the defaults. A 'hard' optional reset will reset the dacs to the hardcoded defaults in on-board detector server. )V0G0N"
|
||||
<< std::endl;
|
||||
return os.str();
|
||||
}
|
||||
@ -10387,71 +10297,6 @@ std::string Caller::resetfpga(int action) {
|
||||
return os.str();
|
||||
}
|
||||
|
||||
std::string Caller::roi(int action) {
|
||||
|
||||
std::ostringstream os;
|
||||
// print help
|
||||
if (action == slsDetectorDefs::HELP_ACTION) {
|
||||
os << R"V0G0N([xmin] [xmax]
|
||||
[Gotthard] Region of interest in detector.
|
||||
Options: Only a single ROI per module.
|
||||
Either all channels or a single adc or 2 chips (256 channels). Default is all channels enabled (-1 -1). )V0G0N"
|
||||
<< std::endl;
|
||||
return os.str();
|
||||
}
|
||||
|
||||
// check if action and arguments are valid
|
||||
if (action == slsDetectorDefs::GET_ACTION) {
|
||||
if (1 && args.size() != 0) {
|
||||
throw RuntimeError("Wrong number of arguments for action GET");
|
||||
}
|
||||
|
||||
if (args.size() == 0) {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
else if (action == slsDetectorDefs::PUT_ACTION) {
|
||||
if (1 && args.size() != 2) {
|
||||
throw RuntimeError("Wrong number of arguments for action PUT");
|
||||
}
|
||||
|
||||
if (args.size() == 2) {
|
||||
defs::ROI t =
|
||||
defs::ROI(StringTo<int>(args[0]), StringTo<int>(args[1]));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
else {
|
||||
|
||||
throw RuntimeError("INTERNAL ERROR: Invalid action: supported actions "
|
||||
"are ['GET', 'PUT']");
|
||||
}
|
||||
|
||||
// generate code for each action
|
||||
if (action == slsDetectorDefs::GET_ACTION) {
|
||||
if (args.size() == 0) {
|
||||
auto t = det->getROI(std::vector<int>{det_id});
|
||||
os << t << '\n';
|
||||
}
|
||||
}
|
||||
|
||||
if (action == slsDetectorDefs::PUT_ACTION) {
|
||||
if (args.size() == 2) {
|
||||
defs::ROI t =
|
||||
defs::ROI(StringTo<int>(args[0]), StringTo<int>(args[1]));
|
||||
if (det_id == -1 && det->size() > 1) {
|
||||
throw RuntimeError("Cannot execute ROI at multi module level");
|
||||
}
|
||||
det->setROI(t, det_id);
|
||||
os << t << '\n';
|
||||
}
|
||||
}
|
||||
|
||||
return os.str();
|
||||
}
|
||||
|
||||
std::string Caller::romode(int action) {
|
||||
|
||||
std::ostringstream os;
|
||||
@ -12440,7 +12285,7 @@ std::string Caller::serialnumber(int action) {
|
||||
// print help
|
||||
if (action == slsDetectorDefs::HELP_ACTION) {
|
||||
os << R"V0G0N(
|
||||
[Jungfrau][Moench][Gotthard][Mythen3][Gotthard2][Ctb]
|
||||
[Jungfrau][Moench][Mythen3][Gotthard2][Ctb]
|
||||
Serial number of detector. )V0G0N"
|
||||
<< std::endl;
|
||||
return os.str();
|
||||
@ -12576,8 +12421,6 @@ std::string Caller::settings(int action) {
|
||||
os << R"V0G0N([standard, fast, highgain, dynamicgain, lowgain, mediumgain, veryhighgain, highgain0, fixgain1, fixgain2, forceswitchg1, forceswitchg2, verylowgain, g1_hg, g1_lg, g2_hc_hg, g2_hc_lg, g2_lc_hg, g2_lc_lg, g4_hg, g4_lg, gain0]
|
||||
Detector Settings
|
||||
[Jungfrau] - [ gain0 | highgain0]
|
||||
[Gotthard] - [dynamicgain | highgain | lowgain | mediumgain | veryhighgain]
|
||||
[Gotthard] Also loads default dacs on to the detector.
|
||||
[Gotthard2] - [dynamicgain | fixgain1 | fixgain2]
|
||||
[Mythen3] - [standard | fast | highgain] Also changes vrshaper and vrpreamp.
|
||||
[Eiger] Use threshold or thresholdnotb.
|
||||
@ -13885,7 +13728,7 @@ std::string Caller::temp_adc(int action) {
|
||||
// print help
|
||||
if (action == slsDetectorDefs::HELP_ACTION) {
|
||||
os << R"V0G0N([n_value]
|
||||
[Jungfrau][Moench][Gotthard] ADC Temperature )V0G0N"
|
||||
[Jungfrau][Moench] ADC Temperature )V0G0N"
|
||||
<< std::endl;
|
||||
return os.str();
|
||||
}
|
||||
@ -14089,7 +13932,7 @@ std::string Caller::temp_fpga(int action) {
|
||||
// print help
|
||||
if (action == slsDetectorDefs::HELP_ACTION) {
|
||||
os << R"V0G0N([n_value]
|
||||
[Eiger][Jungfrau][Moench][Gotthard][Mythen3][Gotthard2][Xilinx CTB] FPGA Temperature )V0G0N"
|
||||
[Eiger][Jungfrau][Moench][Mythen3][Gotthard2][Xilinx CTB] FPGA Temperature )V0G0N"
|
||||
<< std::endl;
|
||||
return os.str();
|
||||
}
|
||||
@ -14590,7 +14433,7 @@ std::string Caller::timing(int action) {
|
||||
if (action == slsDetectorDefs::HELP_ACTION) {
|
||||
os << R"V0G0N([auto|trigger|gating|burst_trigger|trigger_gating]
|
||||
Timing Mode of detector.
|
||||
[Jungfrau][Moench][Gotthard][Ctb][Gotthard2][Xilinx Ctb] [auto|trigger]
|
||||
[Jungfrau][Moench][Ctb][Gotthard2][Xilinx Ctb] [auto|trigger]
|
||||
[Mythen3] [auto|trigger|gating|trigger_gating]
|
||||
[Eiger] [auto|trigger|gating|burst_trigger] )V0G0N"
|
||||
<< std::endl;
|
||||
@ -15053,7 +14896,7 @@ std::string Caller::triggersl(int action) {
|
||||
// print help
|
||||
if (action == slsDetectorDefs::HELP_ACTION) {
|
||||
os << R"V0G0N(
|
||||
[Gotthard][Jungfrau][Moench][Mythen3][Gotthard2][Ctb][Xilinx Ctb] Number of triggers left in acquisition. Only when external trigger used. )V0G0N"
|
||||
[Jungfrau][Moench][Mythen3][Gotthard2][Ctb][Xilinx Ctb] Number of triggers left in acquisition. Only when external trigger used. )V0G0N"
|
||||
<< std::endl;
|
||||
return os.str();
|
||||
}
|
||||
@ -15534,7 +15377,7 @@ std::string Caller::type(int action) {
|
||||
// print help
|
||||
if (action == slsDetectorDefs::HELP_ACTION) {
|
||||
os << R"V0G0N(
|
||||
Returns detector type. Can be Eiger, Jungfrau, Gotthard, Moench, Mythen3, Gotthard2, ChipTestBoard, Xilinx_ChipTestBoard )V0G0N"
|
||||
Returns detector type. Can be Eiger, Jungfrau, Moench, Mythen3, Gotthard2, ChipTestBoard, Xilinx_ChipTestBoard )V0G0N"
|
||||
<< std::endl;
|
||||
return os.str();
|
||||
}
|
||||
@ -16228,7 +16071,7 @@ std::string Caller::update(int action) {
|
||||
if (action == slsDetectorDefs::HELP_ACTION) {
|
||||
os << R"V0G0N(
|
||||
Without tftp: [server_name (incl fullpath)] [fname.pof (incl full path)] This does not use tftp.
|
||||
[Jungfrau][Moench][Gotthard][Ctb] Updates the firmware, detector server, deletes old server, creates the symbolic link and then reboots detector controller.
|
||||
[Jungfrau][Moench][Ctb] Updates the firmware, detector server, deletes old server, creates the symbolic link and then reboots detector controller.
|
||||
[Mythen3][Gotthard2] will require a script to start up the shorter named server link at start up.
|
||||
server_name is full path name of detector server binary
|
||||
fname is full path of programming file )V0G0N"
|
||||
|
@ -82,7 +82,6 @@ class Caller {
|
||||
std::string chipversion(int action);
|
||||
std::string clearbit(int action);
|
||||
std::string clearbusy(int action);
|
||||
std::string clearroi(int action);
|
||||
std::string clientversion(int action);
|
||||
std::string clkdiv(int action);
|
||||
std::string clkfreq(int action);
|
||||
@ -120,7 +119,6 @@ class Caller {
|
||||
std::string exptime1(int action);
|
||||
std::string exptime2(int action);
|
||||
std::string exptime3(int action);
|
||||
std::string exptimel(int action);
|
||||
std::string extrastoragecells(int action);
|
||||
std::string extsampling(int action);
|
||||
std::string extsamplingsrc(int action);
|
||||
@ -230,7 +228,6 @@ class Caller {
|
||||
std::string reg(int action);
|
||||
std::string resetdacs(int action);
|
||||
std::string resetfpga(int action);
|
||||
std::string roi(int action);
|
||||
std::string romode(int action);
|
||||
std::string row(int action);
|
||||
std::string runclk(int action);
|
||||
@ -428,7 +425,6 @@ class Caller {
|
||||
{"chipversion", &Caller::chipversion},
|
||||
{"clearbit", &Caller::clearbit},
|
||||
{"clearbusy", &Caller::clearbusy},
|
||||
{"clearroi", &Caller::clearroi},
|
||||
{"clientversion", &Caller::clientversion},
|
||||
{"clkdiv", &Caller::clkdiv},
|
||||
{"clkfreq", &Caller::clkfreq},
|
||||
@ -466,7 +462,6 @@ class Caller {
|
||||
{"exptime1", &Caller::exptime1},
|
||||
{"exptime2", &Caller::exptime2},
|
||||
{"exptime3", &Caller::exptime3},
|
||||
{"exptimel", &Caller::exptimel},
|
||||
{"extrastoragecells", &Caller::extrastoragecells},
|
||||
{"extsampling", &Caller::extsampling},
|
||||
{"extsamplingsrc", &Caller::extsamplingsrc},
|
||||
@ -579,7 +574,6 @@ class Caller {
|
||||
{"reg", &Caller::reg},
|
||||
{"resetdacs", &Caller::resetdacs},
|
||||
{"resetfpga", &Caller::resetfpga},
|
||||
{"roi", &Caller::roi},
|
||||
{"romode", &Caller::romode},
|
||||
{"row", &Caller::row},
|
||||
{"runclk", &Caller::runclk},
|
||||
@ -784,13 +778,9 @@ class Caller {
|
||||
{"vishaper", "dac"},
|
||||
{"iodelay", "dac"},
|
||||
{"vref_ds", "dac"},
|
||||
{"vcascn_pb", "dac"},
|
||||
{"vcascp_pb", "dac"},
|
||||
{"vout_cm", "dac"},
|
||||
{"vcasc_out", "dac"},
|
||||
{"vin_cm", "dac"},
|
||||
{"vref_comp", "dac"},
|
||||
{"ib_test_c", "dac"},
|
||||
{"vrshaper_n", "dac"},
|
||||
{"vipre", "dac"},
|
||||
{"vdcsh", "dac"},
|
||||
|
@ -112,10 +112,6 @@ IpAddr Caller::getDstIpFromAuto() {
|
||||
}
|
||||
|
||||
IpAddr Caller::getSrcIpFromAuto() {
|
||||
if (det->getDetectorType().squash() == defs::GOTTHARD) {
|
||||
throw RuntimeError(
|
||||
"Cannot use 'auto' for udp_srcip for GotthardI Detector.");
|
||||
}
|
||||
std::string hostname =
|
||||
det->getHostname(std::vector<int>{det_id}).squash("none");
|
||||
// Hostname could be ip try to decode otherwise look up the hostname
|
||||
@ -511,7 +507,7 @@ std::string Caller::udp_srcip(int action) {
|
||||
"ip.\n\t[Eiger] Set only for 10G. For 1G, detector will replace "
|
||||
"with its own DHCP IP address. \n\tOne can also set this to "
|
||||
"'auto' for 1 GbE data and virtual detectors. It will set to IP "
|
||||
"of detector. Not available for GotthardI"
|
||||
"of detector."
|
||||
<< '\n';
|
||||
} else if (action == defs::GET_ACTION) {
|
||||
auto t = det->getSourceUDPIP(std::vector<int>{det_id});
|
||||
|
@ -215,10 +215,6 @@ std::vector<defs::detectorSettings> Detector::getSettingsList() const {
|
||||
return std::vector<defs::detectorSettings>{
|
||||
defs::STANDARD, defs::HIGHGAIN, defs::LOWGAIN, defs::VERYHIGHGAIN,
|
||||
defs::VERYLOWGAIN};
|
||||
case defs::GOTTHARD:
|
||||
return std::vector<defs::detectorSettings>{
|
||||
defs::HIGHGAIN, defs::DYNAMICGAIN, defs::LOWGAIN, defs::MEDIUMGAIN,
|
||||
defs::VERYHIGHGAIN};
|
||||
case defs::JUNGFRAU:
|
||||
return std::vector<defs::detectorSettings>{defs::GAIN0,
|
||||
defs::HIGHGAIN0};
|
||||
@ -684,7 +680,6 @@ std::vector<defs::dacIndex> Detector::getTemperatureList() const {
|
||||
return std::vector<defs::dacIndex>{defs::SLOW_ADC_TEMP};
|
||||
case defs::JUNGFRAU:
|
||||
case defs::MOENCH:
|
||||
case defs::GOTTHARD:
|
||||
return std::vector<defs::dacIndex>{defs::TEMPERATURE_ADC,
|
||||
defs::TEMPERATURE_FPGA};
|
||||
case defs::EIGER:
|
||||
@ -747,10 +742,6 @@ std::vector<defs::dacIndex> Detector::getDacList() const {
|
||||
defs::VCAL, defs::VCMP_RL, defs::RXB_RB, defs::RXB_LB,
|
||||
defs::VCMP_RR, defs::VCP, defs::VCN, defs::VISHAPER,
|
||||
defs::VTHRESHOLD};
|
||||
case defs::GOTTHARD:
|
||||
return std::vector<defs::dacIndex>{
|
||||
defs::VREF_DS, defs::VCASCN_PB, defs::VCASCP_PB, defs::VOUT_CM,
|
||||
defs::VCASC_OUT, defs::VIN_CM, defs::VREF_COMP, defs::IB_TESTC};
|
||||
case defs::JUNGFRAU:
|
||||
return std::vector<defs::dacIndex>{
|
||||
defs::VB_COMP, defs::VDD_PROT, defs::VIN_COM, defs::VREF_PRECH,
|
||||
@ -1818,27 +1809,6 @@ void Detector::setCollectionMode(defs::collectionMode value, Positions pos) {
|
||||
pimpl->Parallel(&Module::setCollectionMode, pos, value);
|
||||
}
|
||||
|
||||
// Gotthard Specific
|
||||
|
||||
Result<defs::ROI> Detector::getROI(Positions pos) const {
|
||||
return pimpl->Parallel(&Module::getROI, pos);
|
||||
}
|
||||
|
||||
void Detector::setROI(defs::ROI value, int module_id) {
|
||||
if (module_id < 0 && size() > 1) {
|
||||
throw RuntimeError("Cannot set ROI for all modules simultaneously");
|
||||
}
|
||||
pimpl->Parallel(&Module::setROI, {module_id}, value);
|
||||
}
|
||||
|
||||
void Detector::clearROI(Positions pos) {
|
||||
pimpl->Parallel(&Module::clearROI, pos);
|
||||
}
|
||||
|
||||
Result<ns> Detector::getExptimeLeft(Positions pos) const {
|
||||
return pimpl->Parallel(&Module::getExptimeLeft, pos);
|
||||
}
|
||||
|
||||
// Gotthard2 Specific
|
||||
|
||||
Result<int64_t> Detector::getNumberOfBursts(Positions pos) const {
|
||||
|
@ -230,9 +230,9 @@ void DetectorImpl::addModule(const std::string &name) {
|
||||
// get type by connecting
|
||||
detectorType type = Module::getTypeFromDetector(hostname, port);
|
||||
|
||||
// gotthard cannot have more than 2 modules (50um=1, 25um=2
|
||||
if ((type == GOTTHARD || type == GOTTHARD2) && modules.size() > 2) {
|
||||
throw RuntimeError("Gotthard cannot have more than 2 modules. Please "
|
||||
// gotthard2 cannot have more than 2 modules (50um=1, 25um=2
|
||||
if (type == GOTTHARD2 && modules.size() > 2) {
|
||||
throw RuntimeError("GotthardII cannot have more than 2 modules. Please "
|
||||
"free the shared memory and start again.");
|
||||
}
|
||||
|
||||
@ -1187,11 +1187,6 @@ int DetectorImpl::acquire() {
|
||||
if (acquisition_finished != nullptr) {
|
||||
// status
|
||||
auto statusList = Parallel(&Module::getRunStatus, {});
|
||||
// if any slave still waiting, wait up to 1s (gotthard)
|
||||
for (int i = 0; i != 20 && statusList.any(WAITING); ++i) {
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(50));
|
||||
statusList = Parallel(&Module::getRunStatus, {});
|
||||
}
|
||||
runStatus status = statusList.squash(ERROR);
|
||||
// inconsistent status (squash error), but none of them in error
|
||||
if (status == ERROR && (!statusList.any(ERROR))) {
|
||||
@ -1235,7 +1230,6 @@ bool DetectorImpl::handleSynchronization(Positions pos) {
|
||||
switch (shm()->detType) {
|
||||
case defs::MYTHEN3:
|
||||
case defs::GOTTHARD2:
|
||||
case defs::GOTTHARD:
|
||||
handleSync = true;
|
||||
break;
|
||||
case defs::JUNGFRAU:
|
||||
@ -1290,11 +1284,6 @@ void DetectorImpl::startAcquisition(const bool blocking, Positions pos) {
|
||||
// ensure all status normal (slaves not blocking)
|
||||
// to catch those slaves that are still 'waiting'
|
||||
auto statusList = Parallel(&Module::getRunStatus, pos);
|
||||
// if any slave still waiting, wait up to 1s (gotthard)
|
||||
for (int i = 0; i != 20 && statusList.any(WAITING); ++i) {
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(50));
|
||||
statusList = Parallel(&Module::getRunStatus, pos);
|
||||
}
|
||||
if (!statusList.contains_only(IDLE, STOPPED, RUN_FINISHED)) {
|
||||
throw RuntimeError("Acquisition not successful. "
|
||||
"Unexpected detector status");
|
||||
@ -1442,7 +1431,6 @@ std::vector<char> DetectorImpl::readProgrammingFile(const std::string &fname) {
|
||||
}
|
||||
break;
|
||||
case EIGER:
|
||||
case GOTTHARD:
|
||||
throw RuntimeError("programfpga not implemented for this detector");
|
||||
default:
|
||||
throw RuntimeError(
|
||||
|
@ -93,35 +93,19 @@ std::string GetHelpDac(std::string dac) {
|
||||
}
|
||||
if (dac == "vref_ds") {
|
||||
return std::string("[dac or mV value][(optional unit) mV] "
|
||||
"\n\t[Gotthard][Jungfrau] Dac for ??");
|
||||
}
|
||||
if (dac == "vcascn_pb") {
|
||||
return std::string(
|
||||
"[dac or mV value][(optional unit) mV] \n\t[Gotthard] Dac for ??");
|
||||
}
|
||||
if (dac == "vcascp_pb") {
|
||||
return std::string(
|
||||
"[dac or mV value][(optional unit) mV] \n\t[Gotthard] Dac for ??");
|
||||
"\n\t[Jungfrau] Dac for ??");
|
||||
}
|
||||
if (dac == "vout_cm") {
|
||||
return std::string("[dac or mV value][(optional unit) mV] "
|
||||
"\n\t[Gotthard] Dac for ??\n\t[Moench] Dac for 5");
|
||||
}
|
||||
if (dac == "vcasc_out") {
|
||||
return std::string(
|
||||
"[dac or mV value][(optional unit) mV] \n\t[Gotthard] Dac for ??");
|
||||
"\n\t[Moench] Dac for 5");
|
||||
}
|
||||
if (dac == "vin_cm") {
|
||||
return std::string("[dac or mV value][(optional unit) mV] "
|
||||
"\n\t[Gotthard] Dac for ??\n\t[Moench] Dac for 2");
|
||||
"\n\t[Moench] Dac for 2");
|
||||
}
|
||||
if (dac == "vref_comp") {
|
||||
return std::string("[dac or mV value][(optional unit) mV] "
|
||||
"\n\t[Gotthard][Jungfrau] Dac for ??");
|
||||
}
|
||||
if (dac == "ib_test_c") {
|
||||
return std::string(
|
||||
"[dac or mV value][(optional unit) mV] \n\t[Gotthard] Dac for ??");
|
||||
"\n\t[Jungfrau] Dac for ??");
|
||||
}
|
||||
if (dac == "vrshaper_n") {
|
||||
return std::string(
|
||||
|
@ -1967,29 +1967,6 @@ void Module::setCollectionMode(const defs::collectionMode value) {
|
||||
sendToDetector(F_SET_COLLECTION_MODE, static_cast<int>(value), nullptr);
|
||||
}
|
||||
|
||||
// Gotthard Specific
|
||||
|
||||
slsDetectorDefs::ROI Module::getROI() const {
|
||||
return sendToDetector<slsDetectorDefs::ROI>(F_GET_ROI);
|
||||
}
|
||||
|
||||
void Module::setROI(slsDetectorDefs::ROI arg) {
|
||||
if (arg.xmin < 0 || arg.xmax >= getNumberOfChannels().x) {
|
||||
arg.xmin = -1;
|
||||
arg.xmax = -1;
|
||||
}
|
||||
sendToDetector(F_SET_ROI, arg, nullptr);
|
||||
if (shm()->useReceiverFlag) {
|
||||
sendToReceiver(F_RECEIVER_SET_DETECTOR_ROI, arg, nullptr);
|
||||
}
|
||||
}
|
||||
|
||||
void Module::clearROI() { setROI(slsDetectorDefs::ROI{}); }
|
||||
|
||||
int64_t Module::getExptimeLeft() const {
|
||||
return sendToDetectorStop<int64_t>(F_GET_EXPTIME_LEFT);
|
||||
}
|
||||
|
||||
// Gotthard2 Specific
|
||||
|
||||
int64_t Module::getNumberOfBursts() const {
|
||||
@ -3440,8 +3417,6 @@ const std::string Module::getDetectorAPI() const {
|
||||
return APIEIGER;
|
||||
case JUNGFRAU:
|
||||
return APIJUNGFRAU;
|
||||
case GOTTHARD:
|
||||
return APIGOTTHARD;
|
||||
case CHIPTESTBOARD:
|
||||
return APICTB;
|
||||
case MOENCH:
|
||||
|
@ -418,16 +418,6 @@ class Module : public virtual slsDetectorDefs {
|
||||
defs::collectionMode getCollectionMode() const;
|
||||
void setCollectionMode(const defs::collectionMode enable);
|
||||
|
||||
/**************************************************
|
||||
* *
|
||||
* Gotthard Specific *
|
||||
* *
|
||||
* ************************************************/
|
||||
slsDetectorDefs::ROI getROI() const;
|
||||
void setROI(slsDetectorDefs::ROI arg);
|
||||
void clearROI();
|
||||
int64_t getExptimeLeft() const;
|
||||
|
||||
/**************************************************
|
||||
* *
|
||||
* Gotthard2 Specific *
|
||||
|
@ -426,18 +426,6 @@ int InferAction::clearbusy() {
|
||||
}
|
||||
}
|
||||
|
||||
int InferAction::clearroi() {
|
||||
|
||||
if (args.size() == 0) {
|
||||
return slsDetectorDefs::PUT_ACTION;
|
||||
}
|
||||
|
||||
else {
|
||||
|
||||
throw RuntimeError("Could not infer action: Wrong number of arguments");
|
||||
}
|
||||
}
|
||||
|
||||
int InferAction::clientversion() {
|
||||
|
||||
if (args.size() == 0) {
|
||||
@ -1032,22 +1020,6 @@ int InferAction::exptime3() {
|
||||
}
|
||||
}
|
||||
|
||||
int InferAction::exptimel() {
|
||||
|
||||
if (args.size() == 0) {
|
||||
return slsDetectorDefs::GET_ACTION;
|
||||
}
|
||||
|
||||
if (args.size() == 1) {
|
||||
return slsDetectorDefs::GET_ACTION;
|
||||
}
|
||||
|
||||
else {
|
||||
|
||||
throw RuntimeError("Could not infer action: Wrong number of arguments");
|
||||
}
|
||||
}
|
||||
|
||||
int InferAction::extrastoragecells() {
|
||||
|
||||
if (args.size() == 0) {
|
||||
@ -2482,22 +2454,6 @@ int InferAction::resetfpga() {
|
||||
}
|
||||
}
|
||||
|
||||
int InferAction::roi() {
|
||||
|
||||
if (args.size() == 0) {
|
||||
return slsDetectorDefs::GET_ACTION;
|
||||
}
|
||||
|
||||
if (args.size() == 2) {
|
||||
return slsDetectorDefs::PUT_ACTION;
|
||||
}
|
||||
|
||||
else {
|
||||
|
||||
throw RuntimeError("Could not infer action: Wrong number of arguments");
|
||||
}
|
||||
}
|
||||
|
||||
int InferAction::romode() {
|
||||
|
||||
if (args.size() == 0) {
|
||||
|
@ -39,7 +39,6 @@ class InferAction {
|
||||
int chipversion();
|
||||
int clearbit();
|
||||
int clearbusy();
|
||||
int clearroi();
|
||||
int clientversion();
|
||||
int clkdiv();
|
||||
int clkfreq();
|
||||
@ -77,7 +76,6 @@ class InferAction {
|
||||
int exptime1();
|
||||
int exptime2();
|
||||
int exptime3();
|
||||
int exptimel();
|
||||
int extrastoragecells();
|
||||
int extsampling();
|
||||
int extsamplingsrc();
|
||||
@ -187,7 +185,6 @@ class InferAction {
|
||||
int reg();
|
||||
int resetdacs();
|
||||
int resetfpga();
|
||||
int roi();
|
||||
int romode();
|
||||
int row();
|
||||
int runclk();
|
||||
@ -373,7 +370,6 @@ class InferAction {
|
||||
{"chipversion", &InferAction::chipversion},
|
||||
{"clearbit", &InferAction::clearbit},
|
||||
{"clearbusy", &InferAction::clearbusy},
|
||||
{"clearroi", &InferAction::clearroi},
|
||||
{"clientversion", &InferAction::clientversion},
|
||||
{"clkdiv", &InferAction::clkdiv},
|
||||
{"clkfreq", &InferAction::clkfreq},
|
||||
@ -411,7 +407,6 @@ class InferAction {
|
||||
{"exptime1", &InferAction::exptime1},
|
||||
{"exptime2", &InferAction::exptime2},
|
||||
{"exptime3", &InferAction::exptime3},
|
||||
{"exptimel", &InferAction::exptimel},
|
||||
{"extrastoragecells", &InferAction::extrastoragecells},
|
||||
{"extsampling", &InferAction::extsampling},
|
||||
{"extsamplingsrc", &InferAction::extsamplingsrc},
|
||||
@ -524,7 +519,6 @@ class InferAction {
|
||||
{"reg", &InferAction::reg},
|
||||
{"resetdacs", &InferAction::resetdacs},
|
||||
{"resetfpga", &InferAction::resetfpga},
|
||||
{"roi", &InferAction::roi},
|
||||
{"romode", &InferAction::romode},
|
||||
{"row", &InferAction::row},
|
||||
{"runclk", &InferAction::runclk},
|
||||
|
@ -13,7 +13,6 @@ target_sources(tests PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/Caller/test-Caller-jungfrau.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/Caller/test-Caller-mythen3.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/Caller/test-Caller-gotthard2.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/Caller/test-Caller-gotthard.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/Caller/test-Caller-chiptestboard.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/Caller/test-Caller-xilinx-chiptestboard.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/Caller/test-Caller-moench.cpp
|
||||
|
@ -530,15 +530,6 @@ TEST_CASE("dac", "[.cmdcall][.dacs]") {
|
||||
REQUIRE_THROWS(caller.call("dac", {"vb_ds"}, -1, GET));
|
||||
REQUIRE_THROWS(caller.call("dac", {"vref_ds"}, -1, GET));
|
||||
REQUIRE_THROWS(caller.call("dac", {"vref_comp"}, -1, GET));
|
||||
// gotthard
|
||||
REQUIRE_THROWS(caller.call("dac", {"vref_ds"}, -1, GET));
|
||||
REQUIRE_THROWS(caller.call("dac", {"vcascn_pb"}, -1, GET));
|
||||
REQUIRE_THROWS(caller.call("dac", {"vcascp_pb"}, -1, GET));
|
||||
REQUIRE_THROWS(caller.call("dac", {"vout_cm"}, -1, GET));
|
||||
REQUIRE_THROWS(caller.call("dac", {"vcasc_out"}, -1, GET));
|
||||
REQUIRE_THROWS(caller.call("dac", {"vin_cm"}, -1, GET));
|
||||
REQUIRE_THROWS(caller.call("dac", {"vref_comp"}, -1, GET));
|
||||
REQUIRE_THROWS(caller.call("dac", {"ib_test_c"}, -1, GET));
|
||||
// mythen3
|
||||
REQUIRE_THROWS(caller.call("dac", {"vrpreamp"}, -1, GET));
|
||||
REQUIRE_THROWS(caller.call("dac", {"vrshaper"}, -1, GET));
|
||||
|
@ -185,15 +185,6 @@ TEST_CASE("Setting and reading back EIGER dacs", "[.cmdcall][.dacs]") {
|
||||
det.setDAC(defs::VCP, vcp[i], false, {i});
|
||||
}
|
||||
}
|
||||
// gotthard
|
||||
REQUIRE_THROWS(caller.call("vref_ds", {}, -1, GET));
|
||||
REQUIRE_THROWS(caller.call("vcascn_pb", {}, -1, GET));
|
||||
REQUIRE_THROWS(caller.call("vcascp_pb", {}, -1, GET));
|
||||
REQUIRE_THROWS(caller.call("vout_cm", {}, -1, GET));
|
||||
REQUIRE_THROWS(caller.call("vcasc_out", {}, -1, GET));
|
||||
REQUIRE_THROWS(caller.call("vin_cm", {}, -1, GET));
|
||||
REQUIRE_THROWS(caller.call("vref_comp", {}, -1, GET));
|
||||
REQUIRE_THROWS(caller.call("ib_test_c", {}, -1, GET));
|
||||
// mythen3
|
||||
// REQUIRE_THROWS(caller.call("vrpreamp", {}, -1, GET));
|
||||
// REQUIRE_THROWS(caller.call("vrshaper", {}, -1, GET));
|
||||
|
@ -1,174 +0,0 @@
|
||||
// SPDX-License-Identifier: LGPL-3.0-or-other
|
||||
// Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||
#include "Caller.h"
|
||||
#include "catch.hpp"
|
||||
#include "sls/Detector.h"
|
||||
#include "sls/sls_detector_defs.h"
|
||||
#include <sstream>
|
||||
|
||||
#include "sls/Result.h"
|
||||
#include "sls/ToString.h"
|
||||
#include "sls/versionAPI.h"
|
||||
#include "test-Caller-global.h"
|
||||
#include "tests/globals.h"
|
||||
|
||||
namespace sls {
|
||||
|
||||
using test::GET;
|
||||
using test::PUT;
|
||||
|
||||
/* dacs */
|
||||
|
||||
TEST_CASE("Setting and reading back GOTTHARD dacs", "[.cmdcall][.dacs]") {
|
||||
// vref_ds, vcascn_pb, vcascp_pb, vout_cm, vcasc_out, vin_cm, vref_comp,
|
||||
// ib_test_c
|
||||
|
||||
Detector det;
|
||||
Caller caller(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
if (det_type == defs::GOTTHARD) {
|
||||
SECTION("vref_ds") { test_dac_caller(defs::VREF_DS, "vref_ds", 660); }
|
||||
SECTION("vcascn_pb") {
|
||||
test_dac_caller(defs::VCASCN_PB, "vcascn_pb", 650);
|
||||
}
|
||||
SECTION("vcascp_pb") {
|
||||
test_dac_caller(defs::VCASCP_PB, "vcascp_pb", 1480);
|
||||
}
|
||||
SECTION("vout_cm") { test_dac_caller(defs::VOUT_CM, "vout_cm", 1520); }
|
||||
SECTION("vcasc_out") {
|
||||
test_dac_caller(defs::VCASC_OUT, "vcasc_out", 1320);
|
||||
}
|
||||
SECTION("vin_cm") { test_dac_caller(defs::VIN_CM, "vin_cm", 1350); }
|
||||
SECTION("vref_comp") {
|
||||
test_dac_caller(defs::VREF_COMP, "vref_comp", 350);
|
||||
}
|
||||
SECTION("ib_test_c") {
|
||||
test_dac_caller(defs::IB_TESTC, "ib_test_c", 2001);
|
||||
}
|
||||
// eiger
|
||||
REQUIRE_THROWS(caller.call("dac", {"vthreshold"}, -1, GET));
|
||||
REQUIRE_THROWS(caller.call("dac", {"vsvp"}, -1, GET));
|
||||
REQUIRE_THROWS(caller.call("dac", {"vsvn"}, -1, GET));
|
||||
REQUIRE_THROWS(caller.call("dac", {"vtrim"}, -1, GET));
|
||||
REQUIRE_THROWS(caller.call("dac", {"vrpreamp"}, -1, GET));
|
||||
REQUIRE_THROWS(caller.call("dac", {"vrshaper"}, -1, GET));
|
||||
REQUIRE_THROWS(caller.call("dac", {"vtgstv"}, -1, GET));
|
||||
REQUIRE_THROWS(caller.call("dac", {"vcmp_ll"}, -1, GET));
|
||||
REQUIRE_THROWS(caller.call("dac", {"vcmp_lr"}, -1, GET));
|
||||
REQUIRE_THROWS(caller.call("dac", {"vcal"}, -1, GET));
|
||||
REQUIRE_THROWS(caller.call("dac", {"vcmp_rl"}, -1, GET));
|
||||
REQUIRE_THROWS(caller.call("dac", {"vcmp_rr"}, -1, GET));
|
||||
REQUIRE_THROWS(caller.call("dac", {"rxb_rb"}, -1, GET));
|
||||
REQUIRE_THROWS(caller.call("dac", {"rxb_lb"}, -1, GET));
|
||||
REQUIRE_THROWS(caller.call("dac", {"vcp"}, -1, GET));
|
||||
REQUIRE_THROWS(caller.call("dac", {"vcn"}, -1, GET));
|
||||
REQUIRE_THROWS(caller.call("dac", {"vishaper"}, -1, GET));
|
||||
REQUIRE_THROWS(caller.call("dac", {"iodelay"}, -1, GET));
|
||||
// jungfrau
|
||||
REQUIRE_THROWS(caller.call("dac", {"vb_comp"}, -1, GET));
|
||||
REQUIRE_THROWS(caller.call("dac", {"vdd_prot"}, -1, GET));
|
||||
REQUIRE_THROWS(caller.call("dac", {"vin_com"}, -1, GET));
|
||||
REQUIRE_THROWS(caller.call("dac", {"vref_prech"}, -1, GET));
|
||||
REQUIRE_THROWS(caller.call("dac", {"vb_pixbuf"}, -1, GET));
|
||||
REQUIRE_THROWS(caller.call("dac", {"vb_ds"}, -1, GET));
|
||||
// REQUIRE_THROWS(caller.call("dac", {"vref_ds"}, -1, GET));
|
||||
// REQUIRE_THROWS(caller.call("dac", {"vref_comp"}, -1, GET));
|
||||
// mythen3
|
||||
REQUIRE_THROWS(caller.call("dac", {"vrpreamp"}, -1, GET));
|
||||
REQUIRE_THROWS(caller.call("dac", {"vrshaper"}, -1, GET));
|
||||
REQUIRE_THROWS(caller.call("dac", {"vrshaper_n"}, -1, GET));
|
||||
REQUIRE_THROWS(caller.call("dac", {"vipre"}, -1, GET));
|
||||
REQUIRE_THROWS(caller.call("dac", {"vishaper"}, -1, GET));
|
||||
REQUIRE_THROWS(caller.call("dac", {"vdcsh"}, -1, GET));
|
||||
REQUIRE_THROWS(caller.call("dac", {"vth1"}, -1, GET));
|
||||
REQUIRE_THROWS(caller.call("dac", {"vth2"}, -1, GET));
|
||||
REQUIRE_THROWS(caller.call("dac", {"vth3"}, -1, GET));
|
||||
REQUIRE_THROWS(caller.call("dac", {"vcal_n"}, -1, GET));
|
||||
REQUIRE_THROWS(caller.call("dac", {"vcal_p"}, -1, GET));
|
||||
REQUIRE_THROWS(caller.call("dac", {"vtrim"}, -1, GET));
|
||||
REQUIRE_THROWS(caller.call("dac", {"vcassh"}, -1, GET));
|
||||
REQUIRE_THROWS(caller.call("dac", {"vcas"}, -1, GET));
|
||||
REQUIRE_THROWS(caller.call("dac", {"vicin"}, -1, GET));
|
||||
REQUIRE_THROWS(caller.call("dac", {"vipre_out"}, -1, GET));
|
||||
// gotthard2
|
||||
REQUIRE_THROWS(caller.call("dac", {"vref_h_adc"}, -1, GET));
|
||||
REQUIRE_THROWS(caller.call("dac", {"vb_comp_fe"}, -1, GET));
|
||||
REQUIRE_THROWS(caller.call("dac", {"vb_comp_adc"}, -1, GET));
|
||||
REQUIRE_THROWS(caller.call("dac", {"vcom_cds"}, -1, GET));
|
||||
REQUIRE_THROWS(caller.call("dac", {"vref_rstore"}, -1, GET));
|
||||
REQUIRE_THROWS(caller.call("dac", {"vb_opa_1st"}, -1, GET));
|
||||
REQUIRE_THROWS(caller.call("dac", {"vref_comp_fe"}, -1, GET));
|
||||
REQUIRE_THROWS(caller.call("dac", {"vcom_adc1"}, -1, GET));
|
||||
REQUIRE_THROWS(caller.call("dac", {"vref_l_adc"}, -1, GET));
|
||||
REQUIRE_THROWS(caller.call("dac", {"vref_cds"}, -1, GET));
|
||||
REQUIRE_THROWS(caller.call("dac", {"vb_cs"}, -1, GET));
|
||||
REQUIRE_THROWS(caller.call("dac", {"vb_opa_fd"}, -1, GET));
|
||||
REQUIRE_THROWS(caller.call("dac", {"vcom_adc2"}, -1, GET));
|
||||
}
|
||||
}
|
||||
|
||||
/* Gotthard Specific */
|
||||
|
||||
TEST_CASE("roi", "[.cmdcall]") {
|
||||
Detector det;
|
||||
Caller caller(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
|
||||
if (det_type == defs::GOTTHARD) {
|
||||
if (det.size() > 1) {
|
||||
REQUIRE_THROWS(caller.call("roi", {"0", "255"}, -1, PUT));
|
||||
REQUIRE_NOTHROW(caller.call("roi", {}, -1, GET));
|
||||
} else {
|
||||
auto prev_val = det.getROI();
|
||||
{
|
||||
std::ostringstream oss;
|
||||
caller.call("roi", {"0", "255"}, -1, PUT, oss);
|
||||
REQUIRE(oss.str() == "roi [0, 255]\n");
|
||||
}
|
||||
{
|
||||
std::ostringstream oss;
|
||||
caller.call("roi", {"256", "511"}, -1, PUT, oss);
|
||||
REQUIRE(oss.str() == "roi [256, 511]\n");
|
||||
}
|
||||
REQUIRE_THROWS(caller.call("roi", {"0", "256"}, -1, PUT));
|
||||
for (int i = 0; i != det.size(); ++i) {
|
||||
det.setROI(prev_val[i], i);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
REQUIRE_THROWS(caller.call("roi", {}, -1, GET));
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("clearroi", "[.cmdcall]") {
|
||||
Detector det;
|
||||
Caller caller(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
|
||||
if (det_type == defs::GOTTHARD) {
|
||||
auto prev_val = det.getROI();
|
||||
{
|
||||
std::ostringstream oss;
|
||||
caller.call("clearroi", {}, -1, PUT, oss);
|
||||
REQUIRE(oss.str() == "clearroi successful\n");
|
||||
}
|
||||
for (int i = 0; i != det.size(); ++i) {
|
||||
det.setROI(prev_val[i], i);
|
||||
}
|
||||
} else {
|
||||
REQUIRE_THROWS(caller.call("clearroi", {}, -1, PUT));
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("exptimel", "[.cmdcall]") {
|
||||
Detector det;
|
||||
Caller caller(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
if (det_type == defs::GOTTHARD) {
|
||||
REQUIRE_NOTHROW(caller.call("exptimel", {}, -1, GET));
|
||||
} else {
|
||||
REQUIRE_THROWS(caller.call("exptimel", {}, -1, GET));
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace sls
|
@ -59,15 +59,6 @@ TEST_CASE("Setting and reading back Jungfrau dacs", "[.cmdcall][.dacs]") {
|
||||
REQUIRE_THROWS(caller.call("vcn", {}, -1, GET));
|
||||
REQUIRE_THROWS(caller.call("vishaper", {}, -1, GET));
|
||||
REQUIRE_THROWS(caller.call("iodelay", {}, -1, GET));
|
||||
// gotthard
|
||||
// REQUIRE_THROWS(caller.call("vref_ds", {}, -1, GET));
|
||||
REQUIRE_THROWS(caller.call("vcascn_pb", {}, -1, GET));
|
||||
REQUIRE_THROWS(caller.call("vcascp_pb", {}, -1, GET));
|
||||
REQUIRE_THROWS(caller.call("vout_cm", {}, -1, GET));
|
||||
REQUIRE_THROWS(caller.call("vcasc_out", {}, -1, GET));
|
||||
REQUIRE_THROWS(caller.call("vin_cm", {}, -1, GET));
|
||||
// REQUIRE_THROWS(caller.call("vref_comp", {}, -1, GET));
|
||||
REQUIRE_THROWS(caller.call("ib_test_c", {}, -1, GET));
|
||||
// mythen3
|
||||
REQUIRE_THROWS(caller.call("vrpreamp", {}, -1, GET));
|
||||
REQUIRE_THROWS(caller.call("vrshaper", {}, -1, GET));
|
||||
|
@ -59,15 +59,6 @@ TEST_CASE("Setting and reading back moench dacs", "[.cmdcall][.dacs]") {
|
||||
REQUIRE_THROWS(caller.call("vcn", {}, -1, GET));
|
||||
REQUIRE_THROWS(caller.call("vishaper", {}, -1, GET));
|
||||
REQUIRE_THROWS(caller.call("iodelay", {}, -1, GET));
|
||||
// gotthard
|
||||
REQUIRE_THROWS(caller.call("vref_ds", {}, -1, GET));
|
||||
REQUIRE_THROWS(caller.call("vcascn_pb", {}, -1, GET));
|
||||
REQUIRE_THROWS(caller.call("vcascp_pb", {}, -1, GET));
|
||||
// REQUIRE_THROWS(caller.call("vout_cm", {}, -1, GET));
|
||||
REQUIRE_THROWS(caller.call("vcasc_out", {}, -1, GET));
|
||||
// REQUIRE_THROWS(caller.call("vin_cm", {}, -1, GET));
|
||||
REQUIRE_THROWS(caller.call("vref_comp", {}, -1, GET));
|
||||
REQUIRE_THROWS(caller.call("ib_test_c", {}, -1, GET));
|
||||
// mythen3
|
||||
REQUIRE_THROWS(caller.call("vrpreamp", {}, -1, GET));
|
||||
REQUIRE_THROWS(caller.call("vrshaper", {}, -1, GET));
|
||||
|
@ -232,13 +232,6 @@ TEST_CASE("settings", "[.cmdcall]") {
|
||||
sett.push_back("g4_hg");
|
||||
sett.push_back("g4_lg");
|
||||
break;
|
||||
case defs::GOTTHARD:
|
||||
sett.push_back("highgain");
|
||||
sett.push_back("dynamicgain");
|
||||
sett.push_back("lowgain");
|
||||
sett.push_back("mediumgain");
|
||||
sett.push_back("veryhighgain");
|
||||
break;
|
||||
case defs::GOTTHARD2:
|
||||
sett.push_back("dynamicgain");
|
||||
sett.push_back("fixgain1");
|
||||
@ -613,8 +606,8 @@ TEST_CASE("master", "[.cmdcall]") {
|
||||
Caller caller(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
if (det_type == defs::EIGER || det_type == defs::MYTHEN3 ||
|
||||
det_type == defs::GOTTHARD || det_type == defs::GOTTHARD2 ||
|
||||
det_type == defs::JUNGFRAU || det_type == defs::MOENCH) {
|
||||
det_type == defs::GOTTHARD2 || det_type == defs::JUNGFRAU ||
|
||||
det_type == defs::MOENCH) {
|
||||
REQUIRE_NOTHROW(caller.call("master", {}, -1, GET));
|
||||
if (det_type == defs::EIGER || det_type == defs::GOTTHARD2 ||
|
||||
det_type == defs::JUNGFRAU || det_type == defs::MOENCH) {
|
||||
@ -902,9 +895,6 @@ TEST_CASE("delay", "[.cmdcall]") {
|
||||
if (det_type == defs::EIGER) {
|
||||
REQUIRE_THROWS(caller.call("delay", {"1"}, -1, PUT));
|
||||
REQUIRE_THROWS(caller.call("delay", {}, -1, GET));
|
||||
} else if (det_type == defs::GOTTHARD) {
|
||||
// extra delays for master (can throw when setting)
|
||||
REQUIRE_NOTHROW(caller.call("delay", {}, -1, GET));
|
||||
} else {
|
||||
auto prev_val = det.getDelayAfterTrigger();
|
||||
{
|
||||
@ -1204,34 +1194,25 @@ TEST_CASE("adcphase", "[.cmdcall]") {
|
||||
Detector det;
|
||||
Caller caller(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
if (det_type == defs::GOTTHARD || det_type == defs::JUNGFRAU ||
|
||||
det_type == defs::MOENCH || det_type == defs::CHIPTESTBOARD) {
|
||||
if (det_type == defs::GOTTHARD) {
|
||||
std::ostringstream oss1;
|
||||
if (det_type == defs::JUNGFRAU || det_type == defs::MOENCH ||
|
||||
det_type == defs::CHIPTESTBOARD) {
|
||||
auto prev_val = det.getADCPhase();
|
||||
{
|
||||
std::ostringstream oss1, oss2;
|
||||
caller.call("adcphase", {"20"}, -1, PUT, oss1);
|
||||
REQUIRE(oss1.str() == "adcphase 20\n");
|
||||
// cant get, cant use deg
|
||||
REQUIRE_THROWS(caller.call("adcphase", {}, -1, GET));
|
||||
REQUIRE_THROWS(caller.call("adcphase", {"20", "deg"}, -1, PUT));
|
||||
} else {
|
||||
auto prev_val = det.getADCPhase();
|
||||
{
|
||||
std::ostringstream oss1, oss2;
|
||||
caller.call("adcphase", {"20"}, -1, PUT, oss1);
|
||||
REQUIRE(oss1.str() == "adcphase 20\n");
|
||||
caller.call("adcphase", {}, -1, GET, oss2);
|
||||
REQUIRE(oss2.str() == "adcphase 20\n");
|
||||
}
|
||||
{
|
||||
std::ostringstream oss1, oss2;
|
||||
caller.call("adcphase", {"20", "deg"}, -1, PUT, oss1);
|
||||
REQUIRE(oss1.str() == "adcphase 20 deg\n");
|
||||
caller.call("adcphase", {"deg"}, -1, GET, oss2);
|
||||
REQUIRE(oss2.str() == "adcphase 20 deg\n");
|
||||
}
|
||||
for (int i = 0; i != det.size(); ++i) {
|
||||
det.setADCPhase(prev_val[i], {i});
|
||||
}
|
||||
caller.call("adcphase", {}, -1, GET, oss2);
|
||||
REQUIRE(oss2.str() == "adcphase 20\n");
|
||||
}
|
||||
{
|
||||
std::ostringstream oss1, oss2;
|
||||
caller.call("adcphase", {"20", "deg"}, -1, PUT, oss1);
|
||||
REQUIRE(oss1.str() == "adcphase 20 deg\n");
|
||||
caller.call("adcphase", {"deg"}, -1, GET, oss2);
|
||||
REQUIRE(oss2.str() == "adcphase 20 deg\n");
|
||||
}
|
||||
for (int i = 0; i != det.size(); ++i) {
|
||||
det.setADCPhase(prev_val[i], {i});
|
||||
}
|
||||
} else {
|
||||
REQUIRE_THROWS(caller.call("adcphase", {"0"}, -1, PUT));
|
||||
@ -1426,27 +1407,9 @@ TEST_CASE("highvoltage", "[.cmdcall]") {
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
if (det_type != defs::XILINX_CHIPTESTBOARD) {
|
||||
auto prev_val = det.getHighVoltage();
|
||||
// selected values
|
||||
if (det_type == defs::GOTTHARD) {
|
||||
REQUIRE_THROWS(caller.call("highvoltage", {"50"}, -1, PUT));
|
||||
{
|
||||
std::ostringstream oss1, oss2;
|
||||
caller.call("highvoltage", {"90"}, -1, PUT, oss1);
|
||||
REQUIRE(oss1.str() == "highvoltage 90\n");
|
||||
caller.call("highvoltage", {}, -1, GET, oss2);
|
||||
REQUIRE(oss2.str() == "highvoltage 90\n");
|
||||
}
|
||||
{
|
||||
std::ostringstream oss1, oss2;
|
||||
caller.call("highvoltage", {"0"}, -1, PUT, oss1);
|
||||
REQUIRE(oss1.str() == "highvoltage 0\n");
|
||||
caller.call("highvoltage", {}, -1, GET, oss2);
|
||||
REQUIRE(oss2.str() == "highvoltage 0\n");
|
||||
}
|
||||
}
|
||||
// range 0, 60 - 200
|
||||
else if (det_type == defs::JUNGFRAU || det_type == defs::MOENCH ||
|
||||
det_type == defs::CHIPTESTBOARD) {
|
||||
if (det_type == defs::JUNGFRAU || det_type == defs::MOENCH ||
|
||||
det_type == defs::CHIPTESTBOARD) {
|
||||
REQUIRE_THROWS(caller.call("highvoltage", {"50"}, -1, PUT));
|
||||
{
|
||||
std::ostringstream oss1, oss2;
|
||||
@ -1580,27 +1543,8 @@ TEST_CASE("imagetest", "[.cmdcall]") {
|
||||
Caller caller(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
// cannot test only for virtual eiger/jungfrau
|
||||
if (det_type == defs::GOTTHARD) {
|
||||
auto prev_val = det.getImageTestMode();
|
||||
{
|
||||
std::ostringstream oss1, oss2;
|
||||
caller.call("imagetest", {"1"}, -1, PUT, oss1);
|
||||
REQUIRE(oss1.str() == "imagetest 1\n");
|
||||
caller.call("imagetest", {}, -1, GET, oss2);
|
||||
REQUIRE(oss2.str() == "imagetest 1\n");
|
||||
}
|
||||
{
|
||||
std::ostringstream oss1, oss2;
|
||||
caller.call("imagetest", {"0"}, -1, PUT, oss1);
|
||||
REQUIRE(oss1.str() == "imagetest 0\n");
|
||||
caller.call("imagetest", {}, -1, GET, oss2);
|
||||
REQUIRE(oss2.str() == "imagetest 0\n");
|
||||
}
|
||||
for (int i = 0; i != det.size(); ++i) {
|
||||
det.setImageTestMode(prev_val[i], {i});
|
||||
}
|
||||
} else if (det_type != defs::JUNGFRAU && det_type != defs::MOENCH &&
|
||||
det_type != defs::EIGER) {
|
||||
if (det_type != defs::JUNGFRAU && det_type != defs::MOENCH &&
|
||||
det_type != defs::EIGER) {
|
||||
// wont fail for eiger and jungfrau/moench virtual servers
|
||||
REQUIRE_THROWS(caller.call("imagetest", {}, -1, GET));
|
||||
}
|
||||
@ -1610,32 +1554,7 @@ TEST_CASE("extsig", "[.cmdcall]") {
|
||||
Detector det;
|
||||
Caller caller(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
if (det_type == defs::GOTTHARD) {
|
||||
auto prev_val = det.getExternalSignalFlags(0);
|
||||
REQUIRE_THROWS(caller.call("extsig", {}, -1, GET));
|
||||
REQUIRE_THROWS(caller.call("extsig", {"1"}, -1, GET));
|
||||
REQUIRE_THROWS(caller.call("extsig", {"0", "inversion_on"}, -1, PUT));
|
||||
REQUIRE_THROWS(caller.call("extsig", {"0", "inversion_off"}, -1, PUT));
|
||||
{
|
||||
std::ostringstream oss1, oss2;
|
||||
caller.call("extsig", {"0", "trigger_in_rising_edge"}, -1, PUT,
|
||||
oss1);
|
||||
REQUIRE(oss1.str() == "extsig 0 trigger_in_rising_edge\n");
|
||||
caller.call("extsig", {"0"}, -1, GET, oss2);
|
||||
REQUIRE(oss2.str() == "extsig 0 trigger_in_rising_edge\n");
|
||||
}
|
||||
{
|
||||
std::ostringstream oss1, oss2;
|
||||
caller.call("extsig", {"0", "trigger_in_falling_edge"}, -1, PUT,
|
||||
oss1);
|
||||
REQUIRE(oss1.str() == "extsig 0 trigger_in_falling_edge\n");
|
||||
caller.call("extsig", {"0"}, -1, GET, oss2);
|
||||
REQUIRE(oss2.str() == "extsig 0 trigger_in_falling_edge\n");
|
||||
}
|
||||
for (int i = 0; i != det.size(); ++i) {
|
||||
det.setExternalSignalFlags(0, prev_val[i], {i});
|
||||
}
|
||||
} else if (det_type == defs::MYTHEN3) {
|
||||
if (det_type == defs::MYTHEN3) {
|
||||
auto prev_val_0 = det.getExternalSignalFlags(0);
|
||||
auto prev_val_1 = det.getExternalSignalFlags(1);
|
||||
REQUIRE_THROWS(caller.call("extsig", {}, -1, GET));
|
||||
@ -2022,8 +1941,7 @@ TEST_CASE("temp_adc", "[.cmdcall]") {
|
||||
Detector det;
|
||||
Caller caller(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
if (det_type == defs::JUNGFRAU || det_type == defs::MOENCH ||
|
||||
det_type == defs::GOTTHARD) {
|
||||
if (det_type == defs::JUNGFRAU || det_type == defs::MOENCH) {
|
||||
REQUIRE_NOTHROW(caller.call("temp_adc", {}, -1, GET));
|
||||
std::ostringstream oss;
|
||||
REQUIRE_NOTHROW(caller.call("temp_adc", {}, 0, GET, oss));
|
||||
@ -2518,7 +2436,7 @@ TEST_CASE("scan", "[.cmdcall]") {
|
||||
break;
|
||||
case defs::EIGER:
|
||||
ind = defs::VCMP_LL;
|
||||
notImplementedInd = defs::VCASCP_PB;
|
||||
notImplementedInd = defs::VIN_COM;
|
||||
break;
|
||||
case defs::JUNGFRAU:
|
||||
ind = defs::VB_COMP;
|
||||
@ -2528,10 +2446,6 @@ TEST_CASE("scan", "[.cmdcall]") {
|
||||
ind = defs::VIN_CM;
|
||||
notImplementedInd = defs::VSVP;
|
||||
break;
|
||||
case defs::GOTTHARD:
|
||||
ind = defs::VREF_DS;
|
||||
notImplementedInd = defs::VSVP;
|
||||
break;
|
||||
case defs::GOTTHARD2:
|
||||
ind = defs::VB_COMP_FE;
|
||||
notImplementedInd = defs::VSVP;
|
||||
@ -3284,8 +3198,7 @@ TEST_CASE("rebootcontroller", "[.cmdcall]") {
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
if (det_type == defs::JUNGFRAU || det_type == defs::MOENCH ||
|
||||
det_type == defs::CHIPTESTBOARD || det_type == defs::MYTHEN3 ||
|
||||
det_type == defs::GOTTHARD2 || det_type == defs::GOTTHARD ||
|
||||
det_type == defs::XILINX_CHIPTESTBOARD) {
|
||||
det_type == defs::GOTTHARD2 || det_type == defs::XILINX_CHIPTESTBOARD) {
|
||||
// TODO: reboot real server?
|
||||
// REQUIRE_NOTHROW(caller.call("rebootcontroller", {}, -1, PUT));
|
||||
REQUIRE_THROWS(caller.call("rebootcontroller", {}, -1, GET));
|
||||
@ -3357,7 +3270,7 @@ TEST_CASE("adcreg", "[.cmdcall]") {
|
||||
Caller caller(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
if (det_type == defs::JUNGFRAU || det_type == defs::MOENCH ||
|
||||
det_type == defs::CHIPTESTBOARD || det_type == defs::GOTTHARD) {
|
||||
det_type == defs::CHIPTESTBOARD) {
|
||||
std::ostringstream oss;
|
||||
caller.call("adcreg", {"0x8", "0x3"}, -1, PUT, oss);
|
||||
REQUIRE(oss.str() == "adcreg [0x8, 0x3]\n");
|
||||
@ -3464,9 +3377,8 @@ TEST_CASE("firmwaretest", "[.cmdcall]") {
|
||||
Caller caller(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
if (det_type == defs::JUNGFRAU || det_type == defs::MOENCH ||
|
||||
det_type == defs::CHIPTESTBOARD || det_type == defs::GOTTHARD ||
|
||||
det_type == defs::MYTHEN3 || det_type == defs::GOTTHARD2 ||
|
||||
det_type == defs::XILINX_CHIPTESTBOARD) {
|
||||
det_type == defs::CHIPTESTBOARD || det_type == defs::MYTHEN3 ||
|
||||
det_type == defs::GOTTHARD2 || det_type == defs::XILINX_CHIPTESTBOARD) {
|
||||
std::ostringstream oss;
|
||||
caller.call("firmwaretest", {}, -1, PUT, oss);
|
||||
REQUIRE(oss.str() == "firmwaretest successful\n");
|
||||
@ -3482,8 +3394,8 @@ TEST_CASE("bustest", "[.cmdcall]") {
|
||||
Caller caller(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
if (det_type == defs::JUNGFRAU || det_type == defs::MOENCH ||
|
||||
det_type == defs::CHIPTESTBOARD || det_type == defs::GOTTHARD ||
|
||||
det_type == defs::MYTHEN3 || det_type == defs::GOTTHARD2) {
|
||||
det_type == defs::CHIPTESTBOARD || det_type == defs::MYTHEN3 ||
|
||||
det_type == defs::GOTTHARD2) {
|
||||
std::ostringstream oss;
|
||||
caller.call("bustest", {}, -1, PUT, oss);
|
||||
REQUIRE(oss.str() == "bustest successful\n");
|
||||
|
Reference in New Issue
Block a user