diff --git a/slsDetectorServers/jungfrauDetectorServer/bin/jungfrauDetectorServer_developer b/slsDetectorServers/jungfrauDetectorServer/bin/jungfrauDetectorServer_developer index fd6b606c6..0ed564e1c 100755 Binary files a/slsDetectorServers/jungfrauDetectorServer/bin/jungfrauDetectorServer_developer and b/slsDetectorServers/jungfrauDetectorServer/bin/jungfrauDetectorServer_developer differ diff --git a/slsDetectorSoftware/include/CmdProxy.h b/slsDetectorSoftware/include/CmdProxy.h index 3f9c285a0..f96e08b0f 100644 --- a/slsDetectorSoftware/include/CmdProxy.h +++ b/slsDetectorSoftware/include/CmdProxy.h @@ -230,7 +230,7 @@ } \ mv = true; \ } else if (args.size() > 1) { \ - WrongNumberOfParameters(1); \ + WrongNumberOfParameters(0); \ } \ auto t = det->GETFCN(DAC_INDEX, mv, {det_id}); \ os << OutString(t) << (args.size() > 0 ? " mv\n" : "\n"); \ @@ -567,6 +567,64 @@ class CmdProxy { {"timing", &CmdProxy::timing}, /* dacs */ + {"vthreshold", &CmdProxy::vthreshold}, + {"vsvp", &CmdProxy::vsvp}, + {"vsvn", &CmdProxy::vsvn}, + {"vtr", &CmdProxy::vtr}, + {"vrf", &CmdProxy::vrf}, + {"vrs", &CmdProxy::vrs}, + {"vtgstv", &CmdProxy::vtgstv}, + {"vcmp_ll", &CmdProxy::vcmp_ll}, + {"vcmp_lr", &CmdProxy::vcmp_lr}, + {"vcall", &CmdProxy::vcall}, //TODO??? + {"vcmp_rl", &CmdProxy::vcmp_rl}, + {"vcmp_rr", &CmdProxy::vcmp_rr}, + {"rxb_rb", &CmdProxy::rxb_rb}, + {"rxb_lb", &CmdProxy::rxb_lb}, + {"vcp", &CmdProxy::vcp}, + {"vcn", &CmdProxy::vcn}, + {"vis", &CmdProxy::vis}, + {"iodelay", &CmdProxy::iodelay}, + {"vref_ds", &CmdProxy::vref_ds}, + {"vcascn_pb", &CmdProxy::vcascn_pb}, + {"vcascp_pb", &CmdProxy::vcascp_pb}, + {"vout_cm", &CmdProxy::vout_cm}, + {"vcasc_out", &CmdProxy::vcasc_out}, + {"vin_cm", &CmdProxy::vin_cm}, + {"vref_comp", &CmdProxy::vref_comp}, + {"ib_test_c", &CmdProxy::ib_test_c}, + {"vpreamp", &CmdProxy::vpreamp}, + {"vshaper1", &CmdProxy::vshaper1}, + {"vshaper2", &CmdProxy::vshaper2}, + {"vipre", &CmdProxy::vipre}, + {"viinsh", &CmdProxy::viinsh}, + {"vdcsh", &CmdProxy::vdcsh}, + {"vth1", &CmdProxy::vth1}, + {"vth2", &CmdProxy::vth2}, + {"vth3", &CmdProxy::vth3}, + {"vpl", &CmdProxy::vpl}, + {"vph", &CmdProxy::vph}, + {"vtrim", &CmdProxy::vtrim}, + {"cassh", &CmdProxy::cassh}, + {"cas", &CmdProxy::cas}, + {"vicin", &CmdProxy::vicin}, + {"vref_h_adc", &CmdProxy::vref_h_adc}, + {"vb_comp_fe", &CmdProxy::vb_comp_fe}, + {"vb_comp_adc", &CmdProxy::vb_comp_adc}, + {"vcom_cds", &CmdProxy::vcom_cds}, + {"vref_restore", &CmdProxy::vref_restore}, + {"vb_opa_1st", &CmdProxy::vb_opa_1st}, + {"vref_comp_fe", &CmdProxy::vref_comp_fe}, + {"vcom_adc1", &CmdProxy::vcom_adc1}, + {"vref_prech", &CmdProxy::vref_prech}, + {"vref_l_adc", &CmdProxy::vref_l_adc}, + {"vref_cds", &CmdProxy::vref_cds}, + {"vb_cs", &CmdProxy::vb_cs}, + {"vb_opa_fd", &CmdProxy::vb_opa_fd}, + {"vcom_adc2", &CmdProxy::vcom_adc2}, + {"adcvpp", &CmdProxy::adcvpp}, + {"dac", &CmdProxy::Dac}, + /* acquisition */ {"clearbusy", &CmdProxy::clearbusy}, @@ -770,14 +828,7 @@ class CmdProxy { {"now", &CmdProxy::now}, {"timestamp", &CmdProxy::timestamp}, {"user", &CmdProxy::UserDetails}, - {"rx_frameindex", &CmdProxy::rx_frameindex}, - - - - - - {"adcvpp", &CmdProxy::adcvpp}//dac - + {"rx_frameindex", &CmdProxy::rx_frameindex} }; @@ -801,6 +852,8 @@ class CmdProxy { std::string ClockPhase(int action); std::string MaxClockPhaseShift(int action); std::string ClockDivider(int action); + /* dacs */ + std::string Dac(int action); /* acquisition */ /* Network Configuration (Detector<->Receiver) */ /* Receiver Config */ @@ -941,6 +994,175 @@ class CmdProxy { /* dacs */ + DAC_COMMAND(vthreshold, getDAC, setDAC, defs::THRESHOLD, + "[dac or mv value][(optional unit) mv] \n\t[Eiger][Mythen3] Detector threshold voltage for single photon counters."); + + DAC_COMMAND(vsvp, getDAC, setDAC, defs::E_SvP, + "[dac or mv value][(optional unit) mv] \n\t[Eiger] Eiger dac ?? "); //TODO + + DAC_COMMAND(vsvn, getDAC, setDAC, defs::E_SvN, + "[dac or mv value][(optional unit) mv] \n\t[Eiger] Eiger dac ?? "); //TODO + + DAC_COMMAND(vtr, getDAC, setDAC, defs::E_Vtr, + "[dac or mv value][(optional unit) mv] \n\t[Eiger] Eiger dac ?? "); //TODO + + DAC_COMMAND(vrf, getDAC, setDAC, defs::E_Vrf, + "[dac or mv value][(optional unit) mv] \n\t[Eiger] Eiger dac ?? "); //TODO + + DAC_COMMAND(vrs, getDAC, setDAC, defs::E_Vrs, + "[dac or mv value][(optional unit) mv] \n\t[Eiger] Eiger dac ?? "); //TODO + + DAC_COMMAND(vtgstv, getDAC, setDAC, defs::E_Vtgstv, + "[dac or mv value][(optional unit) mv] \n\t[Eiger] Eiger dac ?? "); //TODO + + DAC_COMMAND(vcmp_ll, getDAC, setDAC, defs::E_Vcmp_ll, + "[dac or mv value][(optional unit) mv] \n\t[Eiger] Eiger dac ?? "); //TODO + + DAC_COMMAND(vcmp_lr, getDAC, setDAC, defs::E_Vcmp_lr, + "[dac or mv value][(optional unit) mv] \n\t[Eiger] Eiger dac ?? "); //TODO + + DAC_COMMAND(vcall, getDAC, setDAC, defs::E_cal, + "[dac or mv value][(optional unit) mv] \n\t[Eiger] Eiger dac ?? "); //TODO , vcall?? + + DAC_COMMAND(vcmp_rl, getDAC, setDAC, defs::E_Vcmp_rl, + "[dac or mv value][(optional unit) mv] \n\t[Eiger] Eiger dac ?? "); //TODO + + DAC_COMMAND(vcmp_rr, getDAC, setDAC, defs::E_Vcmp_rr, + "[dac or mv value][(optional unit) mv] \n\t[Eiger] Eiger dac ?? "); //TODO + + DAC_COMMAND(rxb_rb, getDAC, setDAC, defs::E_rxb_rb, + "[dac or mv value][(optional unit) mv] \n\t[Eiger] Eiger dac ?? "); //TODO + + DAC_COMMAND(rxb_lb, getDAC, setDAC, defs::E_rxb_lb, + "[dac or mv value][(optional unit) mv] \n\t[Eiger] Eiger dac ?? "); //TODO + + DAC_COMMAND(vcp, getDAC, setDAC, defs::E_Vcp, + "[dac or mv value][(optional unit) mv] \n\t[Eiger] Eiger dac ?? "); //TODO + + DAC_COMMAND(vcn, getDAC, setDAC, defs::E_Vcn, + "[dac or mv value][(optional unit) mv] \n\t[Eiger] Eiger dac ?? "); //TODO + + DAC_COMMAND(vis, getDAC, setDAC, defs::E_Vis, + "[dac or mv value][(optional unit) mv] \n\t[Eiger] Eiger dac ?? "); //TODO + + DAC_COMMAND(iodelay, getDAC, setDAC, defs::IO_DELAY, + "[dac or mv value][(optional unit) mv] \n\t[Eiger] Eiger dac ?? "); //TODO + + DAC_COMMAND(vref_ds, getDAC, setDAC, defs::G_VREF_DS, + "[dac or mv value][(optional unit) mv] \n\t[Gotthard] dac ?? "); //TODO + + DAC_COMMAND(vcascn_pb, getDAC, setDAC, defs::G_VCASCN_PB, + "[dac or mv value][(optional unit) mv] \n\t[Gotthard] dac ?? "); //TODO + + DAC_COMMAND(vcascp_pb, getDAC, setDAC, defs::G_VCASCP_PB, + "[dac or mv value][(optional unit) mv] \n\t[Gotthard] dac ?? "); //TODO + + DAC_COMMAND(vout_cm, getDAC, setDAC, defs::G_VOUT_CM, + "[dac or mv value][(optional unit) mv] \n\t[Gotthard] dac ?? "); //TODO + + DAC_COMMAND(vcasc_out, getDAC, setDAC, defs::G_VCASC_OUT, + "[dac or mv value][(optional unit) mv] \n\t[Gotthard] dac ?? "); //TODO + + DAC_COMMAND(vin_cm, getDAC, setDAC, defs::G_VIN_CM, + "[dac or mv value][(optional unit) mv] \n\t[Gotthard] dac ?? "); //TODO + + DAC_COMMAND(vref_comp, getDAC, setDAC, defs::G_VREF_COMP, + "[dac or mv value][(optional unit) mv] \n\t[Gotthard] dac ?? "); //TODO + + DAC_COMMAND(ib_test_c, getDAC, setDAC, defs::G_IB_TESTC, + "[dac or mv value][(optional unit) mv] \n\t[Gotthard] dac ?? "); //TODO + + DAC_COMMAND(vpreamp, getDAC, setDAC, defs::PREAMP, + "[dac or mv value][(optional unit) mv] \n\t[Mythen3] voltage to define the preamplifier feedback resistance."); + + DAC_COMMAND(vshaper1, getDAC, setDAC, defs::SHAPER1, + "[dac or mv value][(optional unit) mv] \n\t[Mythen3] voltage to define feedback resistance of the first shaper"); + + DAC_COMMAND(vshaper2, getDAC, setDAC, defs::SHAPER2, + "[dac or mv value][(optional unit) mv] \n\t[Mythen3] voltage to define feedback resistance of the second shaper."); + + DAC_COMMAND(vipre, getDAC, setDAC, defs::M_vIpre, + "[dac or mv value][(optional unit) mv] \n\t[Mythen3] Dac for the preamplifier's input transistor current."); + + DAC_COMMAND(viinsh, getDAC, setDAC, defs::M_vIinSh, + "[dac or mv value][(optional unit) mv] \n\t[Mythen3] dac for the bias current for the shaper."); + + DAC_COMMAND(vdcsh, getDAC, setDAC, defs::M_VdcSh, + "[dac or mv value][(optional unit) mv] \n\t[Mythen3] Dac for the reference (DC) voltage for the shaper."); + + DAC_COMMAND(vth1, getDAC, setDAC, defs::THRESHOLD, + "[dac or mv value][(optional unit) mv] \n\t[Mythen3] Dac for first detector threshold voltage."); + + DAC_COMMAND(vth2, getDAC, setDAC, defs::M_Vth2, + "[dac or mv value][(optional unit) mv] \n\t[Mythen3] Dac for second detector threshold voltage."); + + DAC_COMMAND(vth3, getDAC, setDAC, defs::M_Vth3, + "[dac or mv value][(optional unit) mv] \n\t[Mythen3] Dac for third detector threshold voltage."); + + DAC_COMMAND(vpl, getDAC, setDAC, defs::M_VPL, + "[dac or mv value][(optional unit) mv] \n\t[Mythen3] Dac for the low voltage for analog pulsing."); + + DAC_COMMAND(vph, getDAC, setDAC, defs::CALIBRATION_PULSE, + "[dac or mv value][(optional unit) mv] \n\t[Mythen3] dac for the high voltage for analog pulsing."); + + DAC_COMMAND(vtrim, getDAC, setDAC, defs::TRIMBIT_SIZE, + "[dac or mv value][(optional unit) mv] \n\t[Mythen3] dac for the voltage defining the trim bit size."); + + DAC_COMMAND(cassh, getDAC, setDAC, defs::M_casSh, + "[dac or mv value][(optional unit) mv] \n\t[Mythen3] dac for the shaper's cascode voltage."); + + DAC_COMMAND(cas, getDAC, setDAC, defs::M_cas, + "[dac or mv value][(optional unit) mv] \n\t[Mythen3] dac for the preamplifier's cascode voltage."); + + DAC_COMMAND(vicin, getDAC, setDAC, defs::M_vIcin, + "[dac or mv value][(optional unit) mv] \n\t[Mythen3] dac for the bias current for the comparator."); + + + DAC_COMMAND(vref_h_adc, getDAC, setDAC, defs::VREF_H_ADC, + "[dac or mv value][(optional unit) mv] \n\t[Gotthard2] dac for reference voltage high of ADC."); + + DAC_COMMAND(vb_comp_fe, getDAC, setDAC, defs::VB_COMP_FE, + "[dac or mv value][(optional unit) mv] \n\t[Gotthard2] dac for comparator current of analogue front end."); + + DAC_COMMAND(vb_comp_adc, getDAC, setDAC, defs::VB_COMP_ADC, + "[dac or mv value][(optional unit) mv] \n\t[Gotthard2] dac for comparator current of ADC."); + + DAC_COMMAND(vcom_cds, getDAC, setDAC, defs::VCOM_CDS, + "[dac or mv value][(optional unit) mv] \n\t[Gotthard2] dac for common mode voltage of CDS stage."); + + DAC_COMMAND(vref_restore, getDAC, setDAC, defs::VREF_RESTORE, + "[dac or mv value][(optional unit) mv] \n\t[Gotthard2] dac for reference charging voltage of temparory storage cell in high gain."); + + DAC_COMMAND(vb_opa_1st, getDAC, setDAC, defs::VB_OPA_1ST, + "[dac or mv value][(optional unit) mv] \n\t[Gotthard2] dac dac for opa current for driving the other DACs in chip."); + + DAC_COMMAND(vref_comp_fe, getDAC, setDAC, defs::VREF_COMP_FE, + "[dac or mv value][(optional unit) mv] \n\t[Gotthard2] dac for reference voltage of the comparator of analogue front end."); + + DAC_COMMAND(vcom_adc1, getDAC, setDAC, defs::VCOM_ADC1, + "[dac or mv value][(optional unit) mv] \n\t[Gotthard2] dac for common mode voltage of ADC DAC bank 1."); + + DAC_COMMAND(vref_prech, getDAC, setDAC, defs::VREF_PRECH, + "[dac or mv value][(optional unit) mv] \n\t[Gotthard2] dac for reference votlage for precharing the preamplifier."); + + DAC_COMMAND(vref_l_adc, getDAC, setDAC, defs::VREF_L_ADC, + "[dac or mv value][(optional unit) mv] \n\t[Gotthard2] dac for reference voltage low for ADC."); + + DAC_COMMAND(vref_cds, getDAC, setDAC, defs::VREF_CDS, + "[dac or mv value][(optional unit) mv] \n\t[Gotthard2] dac for reference voltage of CDS applied to the temporary storage cell in medium and low gain."); + + DAC_COMMAND(vb_cs, getDAC, setDAC, defs::VB_CS, + "[dac or mv value][(optional unit) mv] \n\t[Gotthard2] dac for current injection into preamplifier."); + + DAC_COMMAND(vb_opa_fd, getDAC, setDAC, defs::VB_OPA_FD, + "[dac or mv value][(optional unit) mv] \n\t[Gotthard2] dac for current for CDS opa stage."); + + DAC_COMMAND(vcom_adc2, getDAC, setDAC, defs::VCOM_ADC2, + "[dac or mv value][(optional unit) mv] \n\t[Gotthard2] dac for common mode voltage of ADC DAC bank 2."); + + DAC_COMMAND(adcvpp, getDAC, setDAC, defs::ADC_VPP, + "[dac or mv value][(optional unit) mv] \n\t[Ctb] Vpp of ADC.\n\t 0 -> 1V ; 1 -> 1.14V ; 2 -> 1.33V ; 3 -> 1.6V ; 4 -> 2V."); + /* acquisition */ @@ -1373,16 +1595,6 @@ class CmdProxy { - - DAC_COMMAND(adcvpp, getDAC, setDAC, defs::ADC_VPP, - "[dac or mv value][(optional unit) mv] \n\t[Ctb] Vpp of ADC.\n\t 0 -> 1V ; 1 -> 1.14V ; 2 -> 1.33V ; 3 -> 1.6V ; 4 -> 2V."); - - - - - - - }; } // namespace sls diff --git a/slsDetectorSoftware/include/slsDetectorCommand.h b/slsDetectorSoftware/include/slsDetectorCommand.h index 00a37724e..47795b6c3 100755 --- a/slsDetectorSoftware/include/slsDetectorCommand.h +++ b/slsDetectorSoftware/include/slsDetectorCommand.h @@ -46,8 +46,6 @@ class slsDetectorCommand : public virtual slsDetectorDefs { static std::string helpExitServer(int action); static std::string helpThreaded(int action); static std::string helpSN(int action); - static std::string helpDigiTest(int action); - static std::string helpDAC(int action); static std::string helpConfiguration(int action); static std::string helpReceiver(int action); @@ -62,8 +60,6 @@ class slsDetectorCommand : public virtual slsDetectorDefs { std::string cmdHelp(int narg, const char * const args[], int action, int detPos = -1); std::string cmdExitServer(int narg, const char * const args[], int action, int detPos = -1); std::string cmdSN(int narg, const char * const args[], int action, int detPos = -1); - std::string cmdDigiTest(int narg, const char * const args[], int action, int detPos = -1); - std::string cmdDAC(int narg, const char * const args[], int action, int detPos = -1); std::string cmdConfiguration(int narg, const char * const args[], int action, int detPos = -1); std::string cmdReceiver(int narg, const char * const args[], int action, int detPos = -1); diff --git a/slsDetectorSoftware/src/CmdProxy.cpp b/slsDetectorSoftware/src/CmdProxy.cpp index 9e53e10d8..df8dc04b1 100644 --- a/slsDetectorSoftware/src/CmdProxy.cpp +++ b/slsDetectorSoftware/src/CmdProxy.cpp @@ -505,6 +505,40 @@ std::string CmdProxy::ClockDivider(int action) { /* dacs */ +std::string CmdProxy::Dac(int action) { + std::ostringstream os; + os << cmd << ' '; + if (action == defs::HELP_ACTION) { + os << "[dac index] [dac or mv value] [(optional unit) mv] \n\t[Ctb][Jungfrau] Dac." << '\n'; + } else if (action == defs::GET_ACTION) { + bool mv = false; + if (args.size() == 2) { + if (args[1] != "mv") { + throw sls::RuntimeError("Unknown argument " + args[1] + ". Did you mean mv?"); + } + mv = true; + } else if (args.size() > 2) { + WrongNumberOfParameters(1); + } + auto t = det->getDAC(static_cast(std::stoi(args[0])), mv, {det_id}); + os << OutString(t) << (args.size() > 1 ? " mv\n" : "\n"); + } else if (action == defs::PUT_ACTION) { + bool mv = false; + if (args.size() == 3) { + if (args[2] != "mv") { + throw sls::RuntimeError("Unknown argument " + args[2] + ". Did you mean mv?"); + } + mv = true; + } else if (args.size() > 3 || args.size() < 2) { + WrongNumberOfParameters(2); + } + det->setDAC(static_cast(std::stoi(args[0])), std::stoi(args[1]), mv, {det_id}); + os << args[1] << (args.size() > 2 ? " mv\n" : "\n"); + } else { + throw sls::RuntimeError("Unknown action"); + } + return os.str(); +} /* acquisition */ /* Network Configuration (Detector<->Receiver) */ diff --git a/slsDetectorSoftware/src/slsDetectorCommand.cpp b/slsDetectorSoftware/src/slsDetectorCommand.cpp index 09c64d2f2..8c4865e72 100755 --- a/slsDetectorSoftware/src/slsDetectorCommand.cpp +++ b/slsDetectorSoftware/src/slsDetectorCommand.cpp @@ -138,25 +138,6 @@ slsDetectorCommand::slsDetectorCommand(multiSlsDetector *det) { descrToFuncMap[i].m_pFuncPtr = &slsDetectorCommand::cmdData; ++i; - /*! \page config Configuration commands - Commands to configure the detector. these commands are often left to the configuration file. - - \ref configstructure "Data Structure": commands to configure detector data structure - - \ref configstatus "Status": commands to configure detector status - - \ref configsize "Data Size": commands to configure detector data size - - \ref configflags "Flags": commands to configure detector flags - - \ref configchip "Chip": commands to configure chip of the detector - - \ref configversions "Versions": commands to check version of each subsytem - - \ref configspeed "Speed": commands to configure speed of detector - - \ref configsettings "Detector Parameters": commands to configure/retrieve configuration of detector - */ - /*! \page timing Timing commands - Commands to setup the timing - */ - /* Detector structure configuration and debugging commands */ - /*! \page config - \section configstructure Data Structure - commands to configure detector data structure - */ /*! \page config - \b free Free shared memory on the control PC @@ -166,38 +147,6 @@ slsDetectorCommand::slsDetectorCommand(multiSlsDetector *det) { ++i; - /*! \page config - \section configstatus Status - commands to configure detector status - */ - - - /* detector and data size */ - /*! \page config - \section configsize Data Size - commands to configure detector data size - */ - - - /* flags */ - /*! \page config - \section configflags Flags - commands to configure detector flags - */ - - - /* chip */ - /*! \page config - \section configchip Chip - commands to configure chip of the detector - */ - - /* versions/ serial numbers getId */ - /*! \page config - \section configversions Versions - Commands to check versions of each subsystem - */ - /*! \page config - checkdetversion Checks the version compatibility with detector server (if hostname is in shared memory). Only get! Only for Eiger, Jungfrau & Gotthard. \c Returns \c ("compatible", "incompatible") */ @@ -213,554 +162,12 @@ slsDetectorCommand::slsDetectorCommand(multiSlsDetector *det) { ++i; - /* r/w timers */ - - - /* read only timers */ - - - - /* speed */ - /*! \page config - \section configspeed Speed - commands to configure speed of detector - */ - - - /* settings dump/retrieve */ - /*! \page config - \section configsettings Detector Parameters - commands to configure/retrieve configuration of detector - */ - /* settings dump/retrieve */ descrToFuncMap[i].m_pFuncName = "config"; descrToFuncMap[i].m_pFuncPtr = &slsDetectorCommand::cmdConfiguration; ++i; - /* data processing commands */ - - /*! \page data Data processing commands - Commands to setup the data processing - */ - - - /*! \page data - // - threaded [i] Sets/gets the data processing threaded flag. 1 is threaded, 0 unthreaded. - // */ - // descrToFuncMap[i].m_pFuncName="threaded"; - // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdThreaded; - // ++i; - - - /*! \page settings Detector settings commands - Commands to setup the settings of the detector - - \ref settingsdir "Settings, trim & cal Directories": commands to setup settings/trim/cal directories - - \ref settingssett "Settings and Threshold": commands to configure settings and threshold of detector - - \ref settingsdacs "DACs": commands to configure DACs of detector - - \ref settingsadcs "ADCs": commands to readout ADCs of detector - - \ref settingstmp "Temp Control": commands to monitor and handle temperature overshoot (only JUNGFRAU) - */ - - /* trim/cal directories */ - /*! \page settings - \section settingsdir Settings, trim & cal Directories - commands to setup settings/trim/cal directories - */ - - - /* settings, threshold */ - /*! \page settings - \section settingssett Settings and Threshold - commands to configure settings and threshold of detector - */ - - - /* pots */ - /*! \page settings - \section settingsdacs DACs - commands to configure DACs of detector - */ - - /*! \page settings - - vthreshold [i] [mv] Sets/gets detector threshold voltage for single photon counters. Normally in DAC units unless \c mv is specified at the end of the command line. \c Returns \c (int ["mV"]) - */ - descrToFuncMap[i].m_pFuncName = "vthreshold"; - descrToFuncMap[i].m_pFuncPtr = &slsDetectorCommand::cmdDAC; - ++i; - - /*! \page settings - - vcalibration [i] [mv] Sets/gets the voltage of the calibration pulses. Normally in DAC units unless \c mv is specified at the end of the command line. \c Returns \c (int ["mV"]) - */ - descrToFuncMap[i].m_pFuncName = "vcalibration"; - descrToFuncMap[i].m_pFuncPtr = &slsDetectorCommand::cmdDAC; - ++i; - - /*! \page settings - - vtrimbit [i] [mv] Sets/gets the voltage to set the width of the trimbits. Normally in DAC units unless \c mv is specified at the end of the command line. \c Returns \c (int ["mV"]) - */ - descrToFuncMap[i].m_pFuncName = "vtrimbit"; - descrToFuncMap[i].m_pFuncPtr = &slsDetectorCommand::cmdDAC; - ++i; - - /*! \page settings - - vpreamp [i] [mv] Sets/gets the voltage to define the preamplifier feedback resistance. Normally in DAC units unless \c mv is specified at the end of the command line. \c Returns \c (int ["mV"]) - */ - descrToFuncMap[i].m_pFuncName = "vpreamp"; - descrToFuncMap[i].m_pFuncPtr = &slsDetectorCommand::cmdDAC; - ++i; - - /*! \page settings - - vshaper1 [i] [mv] Sets/gets the voltage to define the feedback resistance of the first shaper. Normally in DAC units unless \c mv is specified at the end of the command line. \c Returns \c (int ["mV"]) - */ - descrToFuncMap[i].m_pFuncName = "vshaper1"; - descrToFuncMap[i].m_pFuncPtr = &slsDetectorCommand::cmdDAC; - ++i; - - /*! \page settings - - vshaper [i] [mv] Sets/gets the voltage to define the feedback transistor voltage of the shaper. Normally in DAC units unless \c mv is specified at the end of the command line. \c Returns \c (int ["mV"]) - */ - descrToFuncMap[i].m_pFuncName = "vshaper"; - descrToFuncMap[i].m_pFuncPtr = &slsDetectorCommand::cmdDAC; - ++i; - - /*! \page settings - - vshaper2 [i] [mv] Sets/gets the voltage to define the feedback resistance of the second shaper. Normally in DAC units unless \c mv is specified at the end of the command line. \c Returns \c (int ["mV"]) - */ - descrToFuncMap[i].m_pFuncName = "vshaper2"; - descrToFuncMap[i].m_pFuncPtr = &slsDetectorCommand::cmdDAC; - ++i; - - /*! \page settings - - vhaperneg [i] [mv] Sets/gets the voltage to define the feedback transistor voltage of the negative-polarity shaper. Normally in DAC units unless \c mv is specified at the end of the command line. \c Returns \c (int ["mV"]) - */ - descrToFuncMap[i].m_pFuncName = "vshaperneg"; - descrToFuncMap[i].m_pFuncPtr = &slsDetectorCommand::cmdDAC; - ++i; - - /*! \page settings - - vapower [i] Sets/gets the analog power supply for the old chiptest board in DAC units. \c Returns \c (int ["mV"]) - */ - descrToFuncMap[i].m_pFuncName = "vapower"; - descrToFuncMap[i].m_pFuncPtr = &slsDetectorCommand::cmdDAC; - ++i; - - /*! \page settings - - vddpower [i] Sets/gets the digital power supply for the old chiptest board in DAC units. \c Returns \c (int ["mV"]) - */ - descrToFuncMap[i].m_pFuncName = "vddpower"; - descrToFuncMap[i].m_pFuncPtr = &slsDetectorCommand::cmdDAC; - ++i; - - /*! \page settings - - vshpower [i] Sets/gets the comparator power supply for the old chiptest board in DAC units. \c Returns \c (int ["mV"]) - */ - descrToFuncMap[i].m_pFuncName = "vshpower"; - descrToFuncMap[i].m_pFuncPtr = &slsDetectorCommand::cmdDAC; - ++i; - - /*! \page settings - - viopower [i] Sets/gets the power supply of the FPGA I/Os for the old chiptest board in DAC units. \c Returns \c (int ["mV"]) - */ - descrToFuncMap[i].m_pFuncName = "viopower"; - descrToFuncMap[i].m_pFuncPtr = &slsDetectorCommand::cmdDAC; - ++i; - - /*! \page settings - - vrefds [i] [mv] Sets/gets vrefds. Normally in DAC units unless \c mv is specified at the end of the command line. \c Returns \c (int ["mV"]) - */ - descrToFuncMap[i].m_pFuncName = "vref_ds"; - descrToFuncMap[i].m_pFuncPtr = &slsDetectorCommand::cmdDAC; - ++i; - - /*! \page settings - - vcascn_pb [i] [mv] Sets/gets vcascn_pb. Normally in DAC units unless \c mv is specified at the end of the command line. \c Returns \c (int ["mV"]) - */ - descrToFuncMap[i].m_pFuncName = "vcascn_pb"; - descrToFuncMap[i].m_pFuncPtr = &slsDetectorCommand::cmdDAC; - ++i; - - /*! \page settings - - vcasc_pb [i] [mv] Sets/gets vcasc_pb. Normally in DAC units unless \c mv is specified at the end of the command line. \c Returns \c (int ["mV"]) - */ - descrToFuncMap[i].m_pFuncName = "vcascp_pb"; - descrToFuncMap[i].m_pFuncPtr = &slsDetectorCommand::cmdDAC; - ++i; - - /*! \page settings - - vout_cm [i] [mv] Sets/gets vout_cm. Normally in DAC units unless \c mv is specified at the end of the command line. \c Returns \c (int ["mV"]) - */ - descrToFuncMap[i].m_pFuncName = "vout_cm"; - descrToFuncMap[i].m_pFuncPtr = &slsDetectorCommand::cmdDAC; - ++i; - - /*! \page settings - - vcasc_out [i] [mv] Sets/gets vcasc_out. Normally in DAC units unless \c mv is specified at the end of the command line. \c Returns \c (int ["mV"]) - */ - descrToFuncMap[i].m_pFuncName = "vcasc_out"; - descrToFuncMap[i].m_pFuncPtr = &slsDetectorCommand::cmdDAC; - ++i; - - /*! \page settings - - vin_com [i] [mv] Sets/gets vin_com. Normally in DAC units unless \c mv is specified at the end of the command line. \c Returns \c (int ["mV"]) - */ - descrToFuncMap[i].m_pFuncName = "vin_cm"; - descrToFuncMap[i].m_pFuncPtr = &slsDetectorCommand::cmdDAC; - ++i; - - /*! \page settings - - vref_comp [i] [mv] Sets/gets vref_comp. Normally in DAC units unless \c mv is specified at the end of the command line. \c Returns \c (int ["mV"]) - */ - descrToFuncMap[i].m_pFuncName = "vref_comp"; - descrToFuncMap[i].m_pFuncPtr = &slsDetectorCommand::cmdDAC; - ++i; - - /*! \page settings - - ib_test_c [i] [mv] Sets/gets ib_test_c. Normally in DAC units unless \c mv is specified at the end of the command line. \c Returns \c (int ["mV"]) - */ - descrToFuncMap[i].m_pFuncName = "ib_test_c"; - descrToFuncMap[i].m_pFuncPtr = &slsDetectorCommand::cmdDAC; - ++i; - - /*! \page settings - - vsvp [i] [mv] Sets/gets vsvp. Normally in DAC units unless \c mv is specified at the end of the command line. \c Returns \c (int ["mV"]) - */ - descrToFuncMap[i].m_pFuncName = "vsvp"; - descrToFuncMap[i].m_pFuncPtr = &slsDetectorCommand::cmdDAC; - ++i; - - /*! \page settings - - vsvn [i] [mv] Sets/gets vsvn. Normally in DAC units unless \c mv is specified at the end of the command line. \c Returns \c (int ["mV"]) - */ - descrToFuncMap[i].m_pFuncName = "vsvn"; - descrToFuncMap[i].m_pFuncPtr = &slsDetectorCommand::cmdDAC; - ++i; - - /*! \page settings - - vtr [i] [mv] Sets/gets vtr. Normally in DAC units unless \c mv is specified at the end of the command line. \c Returns \c (int ["mV"]) - */ - descrToFuncMap[i].m_pFuncName = "vtr"; - descrToFuncMap[i].m_pFuncPtr = &slsDetectorCommand::cmdDAC; - ++i; - - /*! \page settings - - vrf [i] [mv] Sets/gets vrf. Normally in DAC units unless \c mv is specified at the end of the command line. \c Returns \c (int ["mV"]) - */ - descrToFuncMap[i].m_pFuncName = "vrf"; - descrToFuncMap[i].m_pFuncPtr = &slsDetectorCommand::cmdDAC; - ++i; - - /*! \page settings - - vrs [i] [mv] Sets/gets vrs. Normally in DAC units unless \c mv is specified at the end of the command line. \c Returns \c (int ["mV"]) - */ - descrToFuncMap[i].m_pFuncName = "vrs"; - descrToFuncMap[i].m_pFuncPtr = &slsDetectorCommand::cmdDAC; - ++i; - - /*! \page settings - - vtgstv [i] [mv] Sets/gets vtgstv. Normally in DAC units unless \c mv is specified at the end of the command line. \c Returns \c (int ["mV"]) - */ - descrToFuncMap[i].m_pFuncName = "vtgstv"; - descrToFuncMap[i].m_pFuncPtr = &slsDetectorCommand::cmdDAC; - ++i; - - /*! \page settings - - vcmp_ll [i] [mv] Sets/gets vcmp_ll. Normally in DAC units unless \c mv is specified at the end of the command line. \c Returns \c (int ["mV"]) - */ - descrToFuncMap[i].m_pFuncName = "vcmp_ll"; - descrToFuncMap[i].m_pFuncPtr = &slsDetectorCommand::cmdDAC; - ++i; - - /*! \page settings - - vcmp_lr [i] [mv] Sets/gets vcmp_lr. Normally in DAC units unless \c mv is specified at the end of the command line. \c Returns \c (int ["mV"]) - */ - descrToFuncMap[i].m_pFuncName = "vcmp_lr"; - descrToFuncMap[i].m_pFuncPtr = &slsDetectorCommand::cmdDAC; - ++i; - - /*! \page settings - - vcal_l [i] [mv] Sets/gets vcal_l. Normally in DAC units unless \c mv is specified at the end of the command line. \c Returns \c (int ["mV"]) - */ - descrToFuncMap[i].m_pFuncName = "vcall"; - descrToFuncMap[i].m_pFuncPtr = &slsDetectorCommand::cmdDAC; - ++i; - - /*! \page settings - - vcomp_rl [i] [mv] Sets/gets vcomp_rl. Normally in DAC units unless \c mv is specified at the end of the command line. \c Returns \c (int ["mV"]) - */ - descrToFuncMap[i].m_pFuncName = "vcmp_rl"; - descrToFuncMap[i].m_pFuncPtr = &slsDetectorCommand::cmdDAC; - ++i; - - /*! \page settings - - vcomp_rr [i] [mv] Sets/gets vcomp_rr. Normally in DAC units unless \c mv is specified at the end of the command line. \c Returns \c (int ["mV"]) - */ - descrToFuncMap[i].m_pFuncName = "vcmp_rr"; - descrToFuncMap[i].m_pFuncPtr = &slsDetectorCommand::cmdDAC; - ++i; - - /*! \page settings - - rxb_rb [i] [mv] Sets/gets rxb_rb. Normally in DAC units unless \c mv is specified at the end of the command line. \c Returns \c (int ["mV"]) - */ - descrToFuncMap[i].m_pFuncName = "rxb_rb"; - descrToFuncMap[i].m_pFuncPtr = &slsDetectorCommand::cmdDAC; - ++i; - - /*! \page settings - - rxb_lb [i] [mv] Sets/gets rxb_lb. Normally in DAC units unless \c mv is specified at the end of the command line. \c Returns \c (int ["mV"]) - */ - descrToFuncMap[i].m_pFuncName = "rxb_lb"; - descrToFuncMap[i].m_pFuncPtr = &slsDetectorCommand::cmdDAC; - ++i; - - /*! \page settings - - vcp [i] [mv] Sets/gets vcp. Normally in DAC units unless \c mv is specified at the end of the command line. \c Returns \c (int ["mV"]) - */ - descrToFuncMap[i].m_pFuncName = "vcp"; - descrToFuncMap[i].m_pFuncPtr = &slsDetectorCommand::cmdDAC; - ++i; - - /*! \page settings - - vcn [i] [mv] Sets/gets vcn. Normally in DAC units unless \c mv is specified at the end of the command line. \c Returns \c (int ["mV"]) - */ - descrToFuncMap[i].m_pFuncName = "vcn"; - descrToFuncMap[i].m_pFuncPtr = &slsDetectorCommand::cmdDAC; - ++i; - - /*! \page settings - - vis [i] [mv] Sets/gets vis. Normally in DAC units unless \c mv is specified at the end of the command line. \c Returns \c (int ["mV"]) - */ - descrToFuncMap[i].m_pFuncName = "vis"; - descrToFuncMap[i].m_pFuncPtr = &slsDetectorCommand::cmdDAC; - ++i; - - /*! \page settings - - iodelay [i] [mv] Sets/gets iodelay. Normally in DAC units unless \c mv is specified at the end of the command line. \c Returns \c (int ["mV"]) - */ - descrToFuncMap[i].m_pFuncName = "iodelay"; - descrToFuncMap[i].m_pFuncPtr = &slsDetectorCommand::cmdDAC; - ++i; - - /*! \page settings - - dac:j [i] [mv] Sets/gets value for DAC number j for the new chiptestboard. Normally in DAC units unless \c mv is specified at the end of the command line. \c Returns \c (int ["mV"]) - */ - descrToFuncMap[i].m_pFuncName = "dac"; - descrToFuncMap[i].m_pFuncPtr = &slsDetectorCommand::cmdDAC; - ++i; - - /*! \page settings - - vipre Sets/gets dac for the preamplifier's input transistor current for Mythen3. Normally in DAC units unless \c mv is specified at the end of the command line. \c Returns \c (int ["mV"]) - */ - descrToFuncMap[i].m_pFuncName = "vipre"; - descrToFuncMap[i].m_pFuncPtr = &slsDetectorCommand::cmdDAC; - ++i; - - /*! \page settings - - vdcsh Sets/gets dac for the reference (DC) voltage for the shaper for Mythen3. Normally in DAC units unless \c mv is specified at the end of the command line. \c Returns \c (int ["mV"]) - */ - descrToFuncMap[i].m_pFuncName = "vdcsh"; - descrToFuncMap[i].m_pFuncPtr = &slsDetectorCommand::cmdDAC; - ++i; - - /*! \page settings - - vth1 Sets/gets first detector threshold voltage for Mythen 3. Normally in DAC units unless \c mv is specified at the end of the command line. \c Returns \c (int ["mV"]) - */ - descrToFuncMap[i].m_pFuncName = "vth1"; - descrToFuncMap[i].m_pFuncPtr = &slsDetectorCommand::cmdDAC; - ++i; - - /*! \page settings - - vth2 Sets/gets second detector threshold voltage for Mythen 3. Normally in DAC units unless \c mv is specified at the end of the command line. \c Returns \c (int ["mV"]) - */ - descrToFuncMap[i].m_pFuncName = "vth2"; - descrToFuncMap[i].m_pFuncPtr = &slsDetectorCommand::cmdDAC; - ++i; - - /*! \page settings - - vth3 Sets/gets third detector threshold voltage for Mythen 3. Normally in DAC units unless \c mv is specified at the end of the command line. \c Returns \c (int ["mV"]) - */ - descrToFuncMap[i].m_pFuncName = "vth3"; - descrToFuncMap[i].m_pFuncPtr = &slsDetectorCommand::cmdDAC; - ++i; - - /*! \page settings - - vpl Sets/gets dac for the low voltage for analog pulsing for Mythen3. Normally in DAC units unless \c mv is specified at the end of the command line. \c Returns \c (int ["mV"]) - */ - descrToFuncMap[i].m_pFuncName = "vpl"; - descrToFuncMap[i].m_pFuncPtr = &slsDetectorCommand::cmdDAC; - ++i; - - /*! \page settings - - vph Sets/gets dac for the high voltage for analog pulsing for Mythen3. Normally in DAC units unless \c mv is specified at the end of the command line. \c Returns \c (int ["mV"]) - */ - descrToFuncMap[i].m_pFuncName = "vph"; - descrToFuncMap[i].m_pFuncPtr = &slsDetectorCommand::cmdDAC; - ++i; - - /*! \page settings - - vtrim Sets/gets dac for the voltage defining the trim bit size for Mythen3. Normally in DAC units unless \c mv is specified at the end of the command line. \c Returns \c (int ["mV"]) - */ - descrToFuncMap[i].m_pFuncName = "vtrim"; - descrToFuncMap[i].m_pFuncPtr = &slsDetectorCommand::cmdDAC; - ++i; - - /*! \page settings - - viinsh Sets/gets dac for the bias current for the shaper for Mythen3. Normally in DAC units unless \c mv is specified at the end of the command line. \c Returns \c (int ["mV"]) - */ - descrToFuncMap[i].m_pFuncName = "viinsh"; - descrToFuncMap[i].m_pFuncPtr = &slsDetectorCommand::cmdDAC; - ++i; - - /*! \page settings - - cas Sets/gets dac for the preamplifier's cascode voltage for Mythen3. Normally in DAC units unless \c mv is specified at the end of the command line. \c Returns \c (int ["mV"]) - */ - descrToFuncMap[i].m_pFuncName = "cas"; - descrToFuncMap[i].m_pFuncPtr = &slsDetectorCommand::cmdDAC; - ++i; - - /*! \page settings - - cassh Sets/gets dac for the shaper's cascode voltage for Mythen3. Normally in DAC units unless \c mv is specified at the end of the command line. \c Returns \c (int ["mV"]) - */ - descrToFuncMap[i].m_pFuncName = "cassh"; - descrToFuncMap[i].m_pFuncPtr = &slsDetectorCommand::cmdDAC; - ++i; - - /*! \page settings - - vicin Sets/gets dac for the bias current for the comparator for Mythen3. Normally in DAC units unless \c mv is specified at the end of the command line. \c Returns \c (int ["mV"]) - */ - descrToFuncMap[i].m_pFuncName = "vicin"; - descrToFuncMap[i].m_pFuncPtr = &slsDetectorCommand::cmdDAC; - ++i; - - /*! \page settings - - vipreout Sets/gets dac for the preamplifier's output branch current for Mythen3. Normally in DAC units unless \c mv is specified at the end of the command line. \c Returns \c (int ["mV"]) - */ - descrToFuncMap[i].m_pFuncName = "vipreout"; - descrToFuncMap[i].m_pFuncPtr = &slsDetectorCommand::cmdDAC; - ++i; - - /*! \page settings - - vref_h_adc Sets/gets dac for reference voltage high of ADC for Gotthard2. Normally in DAC units unless \c mv is specified at the end of the command line. \c Returns \c (int ["mV"]) - */ - descrToFuncMap[i].m_pFuncName = "vref_h_adc"; - descrToFuncMap[i].m_pFuncPtr = &slsDetectorCommand::cmdDAC; - ++i; - - /*! \page settings - - vb_comp_fe Sets/gets dac for comparator current of analogue front end for Gotthard2. Normally in DAC units unless \c mv is specified at the end of the command line. \c Returns \c (int ["mV"]) - */ - descrToFuncMap[i].m_pFuncName = "vb_comp_fe"; - descrToFuncMap[i].m_pFuncPtr = &slsDetectorCommand::cmdDAC; - ++i; - - /*! \page settings - - vb_comp_adc Sets/gets dac for comparator current of ADC for Gotthard2. Normally in DAC units unless \c mv is specified at the end of the command line. \c Returns \c (int ["mV"]) - */ - descrToFuncMap[i].m_pFuncName = "vb_comp_adc"; - descrToFuncMap[i].m_pFuncPtr = &slsDetectorCommand::cmdDAC; - ++i; - - /*! \page settings - - vcom_cds Sets/gets dac for common mode voltage of CDS stage for Gotthard2. Normally in DAC units unless \c mv is specified at the end of the command line. \c Returns \c (int ["mV"]) - */ - descrToFuncMap[i].m_pFuncName = "vcom_cds"; - descrToFuncMap[i].m_pFuncPtr = &slsDetectorCommand::cmdDAC; - ++i; - - /*! \page settings - - vref_restore Sets/gets dac for reference charging voltage of temparory storage cell in high gain for Gotthard2. Normally in DAC units unless \c mv is specified at the end of the command line. \c Returns \c (int ["mV"]) - */ - descrToFuncMap[i].m_pFuncName = "vref_restore"; - descrToFuncMap[i].m_pFuncPtr = &slsDetectorCommand::cmdDAC; - ++i; - - /*! \page settings - - vb_opa_1st Sets/gets dac for opa current for driving the other DACs in chip for Gotthard2. Normally in DAC units unless \c mv is specified at the end of the command line. \c Returns \c (int ["mV"]) - */ - descrToFuncMap[i].m_pFuncName = "vb_opa_1st"; - descrToFuncMap[i].m_pFuncPtr = &slsDetectorCommand::cmdDAC; - ++i; - - /*! \page settings - - vref_comp_fe Sets/gets dac for reference voltage of the comparator of analogue front end for Gotthard2. Normally in DAC units unless \c mv is specified at the end of the command line. \c Returns \c (int ["mV"]) - */ - descrToFuncMap[i].m_pFuncName = "vref_comp_fe"; - descrToFuncMap[i].m_pFuncPtr = &slsDetectorCommand::cmdDAC; - ++i; - - /*! \page settings - - vcom_adc1 Sets/gets dac for common mode voltage of ADC DAC bank 1 for Gotthard2. Normally in DAC units unless \c mv is specified at the end of the command line. \c Returns \c (int ["mV"]) - */ - descrToFuncMap[i].m_pFuncName = "vcom_adc1"; - descrToFuncMap[i].m_pFuncPtr = &slsDetectorCommand::cmdDAC; - ++i; - - /*! \page settings - - vref_prech Sets/gets dac for reference votlage for precharing the preamplifier for Gotthard2. Normally in DAC units unless \c mv is specified at the end of the command line. \c Returns \c (int ["mV"]) - */ - descrToFuncMap[i].m_pFuncName = "vref_prech"; - descrToFuncMap[i].m_pFuncPtr = &slsDetectorCommand::cmdDAC; - ++i; - - /*! \page settings - - vref_l_adc Sets/gets dac for reference voltage low for ADC for Gotthard2. Normally in DAC units unless \c mv is specified at the end of the command line. \c Returns \c (int ["mV"]) - */ - descrToFuncMap[i].m_pFuncName = "vref_l_adc"; - descrToFuncMap[i].m_pFuncPtr = &slsDetectorCommand::cmdDAC; - ++i; - - /*! \page settings - - vref_cds Sets/gets dac for reference voltage of CDS applied to the temporary storage cell in medium and low gain for Gotthard2. Normally in DAC units unless \c mv is specified at the end of the command line. \c Returns \c (int ["mV"]) - */ - descrToFuncMap[i].m_pFuncName = "vref_cds"; - descrToFuncMap[i].m_pFuncPtr = &slsDetectorCommand::cmdDAC; - ++i; - - /*! \page settings - - vb_cs Sets/gets dac for current injection into preamplifier for Gotthard2. Normally in DAC units unless \c mv is specified at the end of the command line. \c Returns \c (int ["mV"]) - */ - descrToFuncMap[i].m_pFuncName = "vb_cs"; - descrToFuncMap[i].m_pFuncPtr = &slsDetectorCommand::cmdDAC; - ++i; - - /*! \page settings - - vb_opa_fd Sets/gets dac for current for CDS opa stage for Gotthard2. Normally in DAC units unless \c mv is specified at the end of the command line. \c Returns \c (int ["mV"]) - */ - descrToFuncMap[i].m_pFuncName = "vb_opa_fd"; - descrToFuncMap[i].m_pFuncPtr = &slsDetectorCommand::cmdDAC; - ++i; - - /*! \page settings - - vcom_adc2 Sets/gets dac for common mode voltage of ADC DAC bank 2 for Gotthard2. Normally in DAC units unless \c mv is specified at the end of the command line. \c Returns \c (int ["mV"]) - */ - descrToFuncMap[i].m_pFuncName = "vcom_adc2"; - descrToFuncMap[i].m_pFuncPtr = &slsDetectorCommand::cmdDAC; - ++i; - - - - /* r/w timers */ - /*! \page settings - \section settingsadcs ADCs - commands to readout ADCs of detector - */ - - /* file name */ - - /*! \page output Output settings - Commands to setup the file destination and format - */ - - - /* communication configuration */ - - /* receiver functions */ - - /*! \page receiver Receiver commands - Commands to configure the receiver. - */ - /*! \page receiver - resetframescaught [i] resets the number of frames caught to 0. i can be any number. Use this if using status start, instead of acquire (this command is included). Only put! \c Returns \c (int) @@ -1050,391 +457,6 @@ std::string slsDetectorCommand::helpSN(int action) { return os.str(); } -std::string slsDetectorCommand::cmdDigiTest(int narg, const char * const args[], int action, int detPos) { - - char answer[1000]; - - if (action == HELP_ACTION) - return helpSN(action); - - - if (cmd == "bustest") { - if (action == PUT_ACTION) - return std::string("cannot set ") + cmd; - sprintf(answer, "%d", myDet->digitalTest(DETECTOR_BUS_TEST)); - return std::string(answer); - } - - else if (cmd == "firmwaretest") { - if (action == PUT_ACTION) - return std::string("cannot set ") + cmd; - sprintf(answer, "%d", myDet->digitalTest(DETECTOR_FIRMWARE_TEST)); - return std::string(answer); - } - - - return std::string("unknown test mode ") + cmd; -} - -std::string slsDetectorCommand::helpDigiTest(int action) { - - std::ostringstream os; - if (action == GET_ACTION || action == HELP_ACTION) { - os << "bustest \t performs test of the bus interface between FPGA and embedded Linux system. Can last up to a few minutes. Jungfrau only." << std::endl; - os << "firmwaretest \t performs the firmware test. Jungfrau only." << std::endl; - } - if (action == PUT_ACTION || action == HELP_ACTION) { - os << "bustest \t performs test of the bus interface between FPGA and embedded Linux system. Can last up to a few minutes. Jungfrau only." << std::endl; - os << "firmwaretest \t performs the firmware test. Jungfrau only." << std::endl; - } - return os.str(); -} - - -std::string slsDetectorCommand::cmdDAC(int narg, const char * const args[], int action, int detPos) { - - if (action == HELP_ACTION) - return helpDAC(action); - - dacIndex dac; - int val = -1; - char answer[1000]; - int mode = 0; - int iarg = 1; - - if (cmd == "dac") { - int idac = -1; - if (sscanf(args[iarg], "%d", &idac) != 1) { - return std::string("Could not scan dac index") + std::string(args[iarg]); - } - dac = (dacIndex)idac; - ++iarg; - --narg; - } - else if (cmd == "vthreshold") - dac = THRESHOLD; - else if (cmd == "vcalibration") - dac = CALIBRATION_PULSE; - else if (cmd == "vtrimbit") - dac = TRIMBIT_SIZE; - else if (cmd == "vpreamp") - dac = PREAMP; - else if (cmd == "vshaper1" || cmd == "vshaper") - dac = SHAPER1; - else if (cmd == "vshaper2" || cmd == "vshaperneg") - dac = SHAPER2; - else if (cmd == "vapower") - dac = VA_POT; - else if (cmd == "vddpower") - dac = VDD_POT; - else if (cmd == "vshpower") - dac = VSH_POT; - else if (cmd == "viopower") - dac = VIO_POT; - else if (cmd == "vref_ds") - dac = G_VREF_DS; - else if (cmd == "vcascn_pb") - dac = G_VCASCN_PB; - else if (cmd == "vcascp_pb") - dac = G_VCASCP_PB; - else if (cmd == "vout_cm") - dac = G_VOUT_CM; - else if (cmd == "vcasc_out") - dac = G_VCASC_OUT; - else if (cmd == "vin_cm") - dac = G_VIN_CM; - else if (cmd == "vref_comp") - dac = G_VREF_COMP; - else if (cmd == "ib_test_c") - dac = G_IB_TESTC; - - else if (cmd == "vsvp") - dac = E_SvP; - else if (cmd == "vsvn") - dac = E_SvN; - else if (cmd == "vtr") - dac = E_Vtr; - else if (cmd == "vrf") - dac = E_Vrf; - else if (cmd == "vrs") - dac = E_Vrs; - else if (cmd == "vtgstv") - dac = E_Vtgstv; - else if (cmd == "vcmp_ll") - dac = E_Vcmp_ll; - else if (cmd == "vcmp_lr") - dac = E_Vcmp_lr; - else if (cmd == "vcall") - dac = E_cal; - else if (cmd == "vcmp_rl") - dac = E_Vcmp_rl; - else if (cmd == "vcmp_rr") - dac = E_Vcmp_rr; - else if (cmd == "rxb_rb") - dac = E_rxb_rb; - else if (cmd == "rxb_lb") - dac = E_rxb_lb; - else if (cmd == "vcp") - dac = E_Vcp; - else if (cmd == "vcn") - dac = E_Vcn; - else if (cmd == "vis") - dac = E_Vis; - else if (cmd == "iodelay") - dac = IO_DELAY; - else if (cmd == "vipre") - dac = M_vIpre; - else if (cmd == "viinsh") - dac = M_vIinSh; - else if (cmd == "vdcsh") - dac = M_VdcSh; - else if (cmd == "vth1") - dac = THRESHOLD; - else if (cmd == "vth2") - dac = M_Vth2; - else if (cmd == "vth3") - dac = M_Vth3; - else if (cmd == "vpl") - dac = M_VPL; - else if (cmd == "vph") - dac = CALIBRATION_PULSE; - else if (cmd == "vtrim") - dac = TRIMBIT_SIZE; - else if (cmd == "cassh") - dac = M_casSh; - else if (cmd == "cas") - dac = M_cas; - else if (cmd == "vicin") - dac = M_vIcin; - else if (cmd == "vref_h_adc") - dac = VREF_H_ADC; - else if (cmd == "vb_comp_fe") - dac = VB_COMP_FE; - else if (cmd == "vb_comp_adc") - dac = VB_COMP_ADC; - else if (cmd == "vcom_cds") - dac = VCOM_CDS; - else if (cmd == "vref_restore") - dac = VREF_RESTORE; - else if (cmd == "vb_opa_1st") - dac = VB_OPA_1ST; - else if (cmd == "vref_comp_fe") - dac = VREF_COMP_FE; - else if (cmd == "vcom_adc1") - dac = VCOM_ADC1; - else if (cmd == "vref_prech") - dac = VREF_PRECH; - else if (cmd == "vref_l_adc") - dac = VREF_L_ADC; - else if (cmd == "vref_cds") - dac = VREF_CDS; - else if (cmd == "vb_cs") - dac = VB_CS; - else if (cmd == "vb_opa_fd") - dac = VB_OPA_FD; - else if (cmd == "vcom_adc2") - dac = VCOM_ADC2; - else - return std::string("cannot decode dac ") + cmd; - - - if (action == PUT_ACTION) { - - if (sscanf(args[iarg], "%d", &val)) - ; - else - return std::string("cannot scan DAC value ") + std::string(args[iarg]); - ++iarg; - - if ((narg >= 3) && (!strcasecmp(args[iarg], "mv"))) - mode = 1; - - myDet->setDAC(val, dac, mode, detPos); - } - - // get (dacs in dac units or mV) - else if ((narg >= 2) && (!strcasecmp(args[iarg], "mv"))) { - mode = 1; - } - sprintf(answer, "%d", myDet->setDAC(-1, dac, mode, detPos)); - if (mode) - strcat(answer, " mV"); - return std::string(answer); -} - -std::string slsDetectorCommand::helpDAC(int action) { - - std::ostringstream os; - if (action == PUT_ACTION || action == HELP_ACTION) { - os << "vthreshold dacu\t sets the detector threshold in dac units (0-1024) or mV. The energy is approx 800-15*keV" << std::endl; - os << std::endl; - - os << "vcalibration " - << "dacu\t sets the calibration pulse amplitude in dac units (0-1024)." << std::endl; - os << std::endl; - os << "vtrimbit " - << "dacu\t sets the trimbit amplitude in dac units (0-1024)." << std::endl; - os << std::endl; - os << "vpreamp " - << "dacu\t sets the preamp feedback voltage in dac units (0-1024)." << std::endl; - os << std::endl; - os << "vshaper1 " - << "dacu\t sets the shaper1 feedback voltage in dac units (0-1024)." << std::endl; - os << std::endl; - os << "vshaper2 " - << "dacu\t sets the shaper2 feedback voltage in dac units (0-1024)." << std::endl; - os << std::endl; - os << "vapower " - << "dacu\t CHIPTEST BOARD ONLY - sets the analog power supply in dac units (0-1024)." << std::endl; - os << std::endl; - os << "vddpower " - << "dacu\t CHIPTEST BOARD ONLY - sets the digital power supply in dac units (0-1024)." << std::endl; - os << std::endl; - os << "vshpower " - << "dacu\t CHIPTEST BOARD ONLY - sets the comparator power supply in dac units (0-1024)." << std::endl; - os << std::endl; - os << "viopower " - << "dacu\t CHIPTEST BOARD ONLY - sets the FPGA I/O power supply in dac units (0-1024)." << std::endl; - - os << "vrefds " - << "dacu\t sets vrefds" << std::endl; - os << "vcascn_pb " - << "dacu\t sets vcascn_pb" << std::endl; - os << "vcascp_pb " - << "dacu\t sets vcascp_pb" << std::endl; - os << "vout_cm " - << "dacu\t sets vout_cm" << std::endl; - os << "vin_cm " - << "dacu\t sets vin_cm" << std::endl; - os << "vcasc_out " - << "dacu\t sets vcasc_out" << std::endl; - os << "vref_comp " - << "dacu\t sets vref_comp" << std::endl; - os << "ib_test_c " - << "dacu\t sets ib_test_c" << std::endl; - - os << "vsvp" - << "dacu\t sets vsvp" << std::endl; - os << "vsvn" - << "dacu\t sets vsvn" << std::endl; - os << "vtr" - << "dacu\t sets vtr" << std::endl; - os << "vrf" - << "dacu\t sets vrf" << std::endl; - os << "vrs" - << "dacu\t sets vrs" << std::endl; - os << "vtgstv" - << "dacu\t sets vtgstv" << std::endl; - os << "vcmp_ll" - << "dacu\t sets vcmp_ll" << std::endl; - os << "vcmp_lr" - << "dacu\t sets vcmp_lr" << std::endl; - os << "vcall" - << "dacu\t sets vcall" << std::endl; - os << "vcmp_rl" - << "dacu\t sets vcmp_rl" << std::endl; - os << "vcmp_rr" - << "dacu\t sets vcmp_rr" << std::endl; - os << "rxb_rb" - << "dacu\t sets rxb_rb" << std::endl; - os << "rxb_lb" - << "dacu\t sets rxb_lb" << std::endl; - os << "vcp" - << "dacu\t sets vcp " << std::endl; - os << "vcn" - << "dacu\t sets vcn " << std::endl; - os << "vis" - << "dacu\t sets vis " << std::endl; - - os << " mv if you want in mV else in dac units " << std::endl; - } - - if (action == GET_ACTION || action == HELP_ACTION) { - - os << "vthreshold \t Gets the detector threshold in dac units (0-1024). The energy is approx 800-15*keV" << std::endl; - os << std::endl; - - os << "vcalibration " - << "dacu\t gets the calibration pulse amplitude in dac units (0-1024)." << std::endl; - os << std::endl; - os << "vtrimbit " - << "dacu\t gets the trimbit amplitude in dac units (0-1024)." << std::endl; - os << std::endl; - os << "vpreamp " - << "dacu\t gets the preamp feedback voltage in dac units (0-1024)." << std::endl; - os << std::endl; - os << "vshaper1 " - << "dacu\t gets the shaper1 feedback voltage in dac units (0-1024)." << std::endl; - os << std::endl; - os << "vshaper2 " - << "dacu\t gets the shaper2 feedback voltage in dac units (0-1024)." << std::endl; - os << std::endl; - os << "vapower " - << "dacu\t CHIPTEST BOARD ONLY - gets the analog power supply in dac units (0-1024)." << std::endl; - os << std::endl; - os << "vddpower " - << "dacu\t CHIPTEST BOARD ONLY - gets the digital power supply in dac units (0-1024)." << std::endl; - os << std::endl; - os << "vshpower " - << "dacu\t CHIPTEST BOARD ONLY - gets the comparator power supply in dac units (0-1024)." << std::endl; - os << std::endl; - os << "viopower " - << "dacu\t CHIPTEST BOARD ONLY - gets the FPGA I/O power supply in dac units (0-1024)." << std::endl; - os << std::endl; - - os << "vrefds " - << "\t gets vrefds" << std::endl; - os << "vcascn_pb " - << "\t gets vcascn_pb" << std::endl; - os << "vcascp_pb " - << "\t gets vcascp_pb" << std::endl; - os << "vout_cm " - << "\t gets vout_cm" << std::endl; - os << "vin_cm " - << "\t gets vin_cm" << std::endl; - os << "vcasc_out " - << "\t gets vcasc_out" << std::endl; - os << "vref_comp " - << "\t gets vref_comp" << std::endl; - os << "ib_test_c " - << "\t gets ib_test_c" << std::endl; - - os << "vsvp" - << "dacu\t gets vsvp" << std::endl; - os << "vsvn" - << "dacu\t gets vsvn" << std::endl; - os << "vtr" - << "dacu\t gets vtr" << std::endl; - os << "vrf" - << "dacu\t gets vrf" << std::endl; - os << "vrs" - << "dacu\t gets vrs" << std::endl; - os << "vtgstv" - << "dacu\t gets vtgstv" << std::endl; - os << "vcmp_ll" - << "dacu\t gets vcmp_ll" << std::endl; - os << "vcmp_lr" - << "dacu\t gets vcmp_lr" << std::endl; - os << "vcall" - << "dacu\t gets vcall" << std::endl; - os << "vcmp_rl" - << "dacu\t gets vcmp_rl" << std::endl; - os << "vcmp_rr" - << "dacu\t gets vcmp_rr" << std::endl; - os << "rxb_rb" - << "dacu\t gets rxb_rb" << std::endl; - os << "rxb_lb" - << "dacu\t gets rxb_lb" << std::endl; - os << "vcp" - << "dacu\t gets vcp " << std::endl; - os << "vcn" - << "dacu\t gets vcn " << std::endl; - os << "vis" - << "dacu\t gets vis " << std::endl; - } - return os.str(); -} - @@ -1461,7 +483,6 @@ std::string slsDetectorCommand::helpConfiguration(int action) { } std::string slsDetectorCommand::cmdReceiver(int narg, const char * const args[], int action, int detPos) { - char answer[100]; if (action == HELP_ACTION) return helpReceiver(action); diff --git a/slsDetectorSoftware/tests/test-multiSlsDetectorClient.cpp b/slsDetectorSoftware/tests/test-multiSlsDetectorClient.cpp index 6718e5ca6..fa465825c 100644 --- a/slsDetectorSoftware/tests/test-multiSlsDetectorClient.cpp +++ b/slsDetectorSoftware/tests/test-multiSlsDetectorClient.cpp @@ -9,6 +9,1053 @@ auto GET = slsDetectorDefs::GET_ACTION; auto PUT = slsDetectorDefs::PUT_ACTION; + +TEST_CASE("dacs", "[.cmd]") { + int prev_val = 0; + if (test::type == slsDetectorDefs::EIGER) { + { + std::ostringstream oss; + REQUIRE_NOTHROW(multiSlsDetectorClient("vthreshold", GET, nullptr, oss)); + std::string s = (oss.str()).erase (0, strlen("vthreshold ")); + prev_val = std::stoi(s); + } + { + REQUIRE_NOTHROW(multiSlsDetectorClient("vthreshold 1000", PUT)); + std::ostringstream oss; + REQUIRE_NOTHROW(multiSlsDetectorClient("vthreshold", GET, nullptr, oss)); + REQUIRE(oss.str() == "vthreshold 1000\n"); + } + { + std::ostringstream oss; + REQUIRE_NOTHROW(multiSlsDetectorClient("vcmp_ll", GET, nullptr, oss)); + REQUIRE(oss.str() == "vcmp_ll 1000\n"); + } + REQUIRE_NOTHROW(multiSlsDetectorClient("vthreshold " + std::to_string(prev_val), PUT)); + { + std::ostringstream oss; + REQUIRE_NOTHROW(multiSlsDetectorClient("vsvp", GET, nullptr, oss)); + std::string s = (oss.str()).erase (0, strlen("vsvp ")); + prev_val = std::stoi(s); + } + { + REQUIRE_NOTHROW(multiSlsDetectorClient("vsvp 1000", PUT)); + std::ostringstream oss; + REQUIRE_NOTHROW(multiSlsDetectorClient("vsvp", GET, nullptr, oss)); + REQUIRE(oss.str() == "vsvp 1000\n"); + } + REQUIRE_NOTHROW(multiSlsDetectorClient("vsvp " + std::to_string(prev_val), PUT)); + { + std::ostringstream oss; + REQUIRE_NOTHROW(multiSlsDetectorClient("vsvn", GET, nullptr, oss)); + std::string s = (oss.str()).erase (0, strlen("vsvn ")); + prev_val = std::stoi(s); + } + { + REQUIRE_NOTHROW(multiSlsDetectorClient("vsvn 1000", PUT)); + std::ostringstream oss; + REQUIRE_NOTHROW(multiSlsDetectorClient("vsvn", GET, nullptr, oss)); + REQUIRE(oss.str() == "vsvn 1000\n"); + } + REQUIRE_NOTHROW(multiSlsDetectorClient("vsvn " + std::to_string(prev_val), PUT)); + { + std::ostringstream oss; + REQUIRE_NOTHROW(multiSlsDetectorClient("vtr", GET, nullptr, oss)); + std::string s = (oss.str()).erase (0, strlen("vtr ")); + prev_val = std::stoi(s); + } + { + REQUIRE_NOTHROW(multiSlsDetectorClient("vtr 1000", PUT)); + std::ostringstream oss; + REQUIRE_NOTHROW(multiSlsDetectorClient("vtr", GET, nullptr, oss)); + REQUIRE(oss.str() == "vtr 1000\n"); + } + REQUIRE_NOTHROW(multiSlsDetectorClient("vtr " + std::to_string(prev_val), PUT)); + { + std::ostringstream oss; + REQUIRE_NOTHROW(multiSlsDetectorClient("vrf", GET, nullptr, oss)); + std::string s = (oss.str()).erase (0, strlen("vrf ")); + prev_val = std::stoi(s); + } + { + REQUIRE_NOTHROW(multiSlsDetectorClient("vrf 1000", PUT)); + std::ostringstream oss; + REQUIRE_NOTHROW(multiSlsDetectorClient("vrf", GET, nullptr, oss)); + REQUIRE(oss.str() == "vrf 1000\n"); + } + REQUIRE_NOTHROW(multiSlsDetectorClient("vrf " + std::to_string(prev_val), PUT)); + { + std::ostringstream oss; + REQUIRE_NOTHROW(multiSlsDetectorClient("vrs", GET, nullptr, oss)); + std::string s = (oss.str()).erase (0, strlen("vrs ")); + prev_val = std::stoi(s); + } + { + REQUIRE_NOTHROW(multiSlsDetectorClient("vrs 1000", PUT)); + std::ostringstream oss; + REQUIRE_NOTHROW(multiSlsDetectorClient("vrs", GET, nullptr, oss)); + REQUIRE(oss.str() == "vrs 1000\n"); + } + REQUIRE_NOTHROW(multiSlsDetectorClient("vrs " + std::to_string(prev_val), PUT)); + { + std::ostringstream oss; + REQUIRE_NOTHROW(multiSlsDetectorClient("vtgstv", GET, nullptr, oss)); + std::string s = (oss.str()).erase (0, strlen("vtgstv ")); + prev_val = std::stoi(s); + } + { + REQUIRE_NOTHROW(multiSlsDetectorClient("vtgstv 1000", PUT)); + std::ostringstream oss; + REQUIRE_NOTHROW(multiSlsDetectorClient("vtgstv", GET, nullptr, oss)); + REQUIRE(oss.str() == "vtgstv 1000\n"); + } + REQUIRE_NOTHROW(multiSlsDetectorClient("vtgstv " + std::to_string(prev_val), PUT)); + { + std::ostringstream oss; + REQUIRE_NOTHROW(multiSlsDetectorClient("vcmp_ll", GET, nullptr, oss)); + std::string s = (oss.str()).erase (0, strlen("vcmp_ll ")); + prev_val = std::stoi(s); + } + { + REQUIRE_NOTHROW(multiSlsDetectorClient("vcmp_ll 1000", PUT)); + std::ostringstream oss; + REQUIRE_NOTHROW(multiSlsDetectorClient("vcmp_ll", GET, nullptr, oss)); + REQUIRE(oss.str() == "vcmp_ll 1000\n"); + } + REQUIRE_NOTHROW(multiSlsDetectorClient("vcmp_ll " + std::to_string(prev_val), PUT)); + { + std::ostringstream oss; + REQUIRE_NOTHROW(multiSlsDetectorClient("vcmp_lr", GET, nullptr, oss)); + std::string s = (oss.str()).erase (0, strlen("vcmp_lr ")); + prev_val = std::stoi(s); + } + { + REQUIRE_NOTHROW(multiSlsDetectorClient("vcmp_lr 1000", PUT)); + std::ostringstream oss; + REQUIRE_NOTHROW(multiSlsDetectorClient("vcmp_lr", GET, nullptr, oss)); + REQUIRE(oss.str() == "vcmp_lr 1000\n"); + } + REQUIRE_NOTHROW(multiSlsDetectorClient("vcmp_lr " + std::to_string(prev_val), PUT)); + { + std::ostringstream oss; + REQUIRE_NOTHROW(multiSlsDetectorClient("vcall", GET, nullptr, oss)); + std::string s = (oss.str()).erase (0, strlen("vcall ")); + prev_val = std::stoi(s); + } + { + REQUIRE_NOTHROW(multiSlsDetectorClient("vcall 1000", PUT)); + std::ostringstream oss; + REQUIRE_NOTHROW(multiSlsDetectorClient("vcall", GET, nullptr, oss)); + REQUIRE(oss.str() == "vcall 1000\n"); + } + REQUIRE_NOTHROW(multiSlsDetectorClient("vcall " + std::to_string(prev_val), PUT)); + { + std::ostringstream oss; + REQUIRE_NOTHROW(multiSlsDetectorClient("vcmp_rl", GET, nullptr, oss)); + std::string s = (oss.str()).erase (0, strlen("vcmp_rl ")); + prev_val = std::stoi(s); + } + { + REQUIRE_NOTHROW(multiSlsDetectorClient("vcmp_rl 1000", PUT)); + std::ostringstream oss; + REQUIRE_NOTHROW(multiSlsDetectorClient("vcmp_rl", GET, nullptr, oss)); + REQUIRE(oss.str() == "vcmp_rl 1000\n"); + } + REQUIRE_NOTHROW(multiSlsDetectorClient("vcmp_rl " + std::to_string(prev_val), PUT)); + { + std::ostringstream oss; + REQUIRE_NOTHROW(multiSlsDetectorClient("vcmp_rr", GET, nullptr, oss)); + std::string s = (oss.str()).erase (0, strlen("vcmp_rr ")); + prev_val = std::stoi(s); + } + { + REQUIRE_NOTHROW(multiSlsDetectorClient("vcmp_rr 1000", PUT)); + std::ostringstream oss; + REQUIRE_NOTHROW(multiSlsDetectorClient("vcmp_rr", GET, nullptr, oss)); + REQUIRE(oss.str() == "vcmp_rr 1000\n"); + } + REQUIRE_NOTHROW(multiSlsDetectorClient("vcmp_rr " + std::to_string(prev_val), PUT)); + { + std::ostringstream oss; + REQUIRE_NOTHROW(multiSlsDetectorClient("rxb_rb", GET, nullptr, oss)); + std::string s = (oss.str()).erase (0, strlen("rxb_rb ")); + prev_val = std::stoi(s); + } + { + REQUIRE_NOTHROW(multiSlsDetectorClient("rxb_rb 1000", PUT)); + std::ostringstream oss; + REQUIRE_NOTHROW(multiSlsDetectorClient("rxb_rb", GET, nullptr, oss)); + REQUIRE(oss.str() == "rxb_rb 1000\n"); + } + REQUIRE_NOTHROW(multiSlsDetectorClient("rxb_rb " + std::to_string(prev_val), PUT)); + { + std::ostringstream oss; + REQUIRE_NOTHROW(multiSlsDetectorClient("rxb_lb", GET, nullptr, oss)); + std::string s = (oss.str()).erase (0, strlen("rxb_lb ")); + prev_val = std::stoi(s); + } + { + REQUIRE_NOTHROW(multiSlsDetectorClient("rxb_lb 1000", PUT)); + std::ostringstream oss; + REQUIRE_NOTHROW(multiSlsDetectorClient("rxb_lb", GET, nullptr, oss)); + REQUIRE(oss.str() == "rxb_lb 1000\n"); + } + REQUIRE_NOTHROW(multiSlsDetectorClient("rxb_lb " + std::to_string(prev_val), PUT)); + { + std::ostringstream oss; + REQUIRE_NOTHROW(multiSlsDetectorClient("vcp", GET, nullptr, oss)); + std::string s = (oss.str()).erase (0, strlen("vcp ")); + prev_val = std::stoi(s); + } + { + REQUIRE_NOTHROW(multiSlsDetectorClient("vcp 1000", PUT)); + std::ostringstream oss; + REQUIRE_NOTHROW(multiSlsDetectorClient("vcp", GET, nullptr, oss)); + REQUIRE(oss.str() == "vcp 1000\n"); + } + REQUIRE_NOTHROW(multiSlsDetectorClient("vcp " + std::to_string(prev_val), PUT)); + { + std::ostringstream oss; + REQUIRE_NOTHROW(multiSlsDetectorClient("vcn", GET, nullptr, oss)); + std::string s = (oss.str()).erase (0, strlen("vcn ")); + prev_val = std::stoi(s); + } + { + REQUIRE_NOTHROW(multiSlsDetectorClient("vcn 1000", PUT)); + std::ostringstream oss; + REQUIRE_NOTHROW(multiSlsDetectorClient("vcn", GET, nullptr, oss)); + REQUIRE(oss.str() == "vcn 1000\n"); + } + REQUIRE_NOTHROW(multiSlsDetectorClient("vcn " + std::to_string(prev_val), PUT)); + { + std::ostringstream oss; + REQUIRE_NOTHROW(multiSlsDetectorClient("vis", GET, nullptr, oss)); + std::string s = (oss.str()).erase (0, strlen("vis ")); + prev_val = std::stoi(s); + } + { + REQUIRE_NOTHROW(multiSlsDetectorClient("vis 1000", PUT)); + std::ostringstream oss; + REQUIRE_NOTHROW(multiSlsDetectorClient("vis", GET, nullptr, oss)); + REQUIRE(oss.str() == "vis 1000\n"); + } + REQUIRE_NOTHROW(multiSlsDetectorClient("vis " + std::to_string(prev_val), PUT)); + { + std::ostringstream oss; + REQUIRE_NOTHROW(multiSlsDetectorClient("iodelay", GET, nullptr, oss)); + std::string s = (oss.str()).erase (0, strlen("iodelay ")); + prev_val = std::stoi(s); + } + { + REQUIRE_NOTHROW(multiSlsDetectorClient("iodelay 1000", PUT)); + std::ostringstream oss; + REQUIRE_NOTHROW(multiSlsDetectorClient("iodelay", GET, nullptr, oss)); + REQUIRE(oss.str() == "iodelay 1000\n"); + } + REQUIRE_NOTHROW(multiSlsDetectorClient("iodelay " + std::to_string(prev_val), PUT)); + + REQUIRE_THROWS(multiSlsDetectorClient("vref_ds", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vcascn_pb", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vcascp_pb", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vout_cm", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vcasc_out", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vin_cm", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vref_comp", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("ib_test_c", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vpreamp", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vshaper1", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vshaper2", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vipre", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("viinsh", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vdcsh", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vth1", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vth2", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vth3", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vpl", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vph", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vtrim", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("cassh", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("cas", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vicin", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vref_h_adc", GET)); REQUIRE_THROWS(multiSlsDetectorClient("vb_comp_fe", GET)); REQUIRE_THROWS(multiSlsDetectorClient("vb_comp_adc", GET)); REQUIRE_THROWS(multiSlsDetectorClient("vcom_cds", GET)); REQUIRE_THROWS(multiSlsDetectorClient("vref_restore", GET)); REQUIRE_THROWS(multiSlsDetectorClient("vb_opa_1st", GET)); REQUIRE_THROWS(multiSlsDetectorClient("vref_comp_fe", GET)); REQUIRE_THROWS(multiSlsDetectorClient("vcom_adc1", GET)); REQUIRE_THROWS(multiSlsDetectorClient("vref_prech", GET)); REQUIRE_THROWS(multiSlsDetectorClient("vref_l_adc", GET)); REQUIRE_THROWS(multiSlsDetectorClient("vref_cds", GET)); REQUIRE_THROWS(multiSlsDetectorClient("vb_cs", GET)); REQUIRE_THROWS(multiSlsDetectorClient("vb_opa_fd", GET)); REQUIRE_THROWS(multiSlsDetectorClient("vcom_adc2", GET)); + + } + + else if (test::type == slsDetectorDefs::JUNGFRAU) { + + for (int i = 0; i < 8; ++i) { + { + std::ostringstream oss; + REQUIRE_NOTHROW(multiSlsDetectorClient("dac " + std::to_string(i), GET, nullptr, oss)); + std::string s = (oss.str()).erase (0, strlen("dac ")); + prev_val = std::stoi(s); + } + { + REQUIRE_NOTHROW(multiSlsDetectorClient("dac " + std::to_string(i) + " 1000", PUT)); + std::ostringstream oss; + REQUIRE_NOTHROW(multiSlsDetectorClient("dac " + std::to_string(i), GET, nullptr, oss)); + REQUIRE(oss.str() == "dac 1000\n"); + } + REQUIRE_NOTHROW(multiSlsDetectorClient("dac " + std::to_string(i) + " " + std::to_string(prev_val), PUT)); + } + + //REQUIRE_THROWS(multiSlsDetectorClient("vthreshold", GET)); dac0 + REQUIRE_THROWS(multiSlsDetectorClient("vsvp", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vsvn", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vtr", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vrf", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vrs", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vtgstv", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vcmp_ll", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vcmp_lr", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vcall", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vcmp_rl", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vcmp_rr", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("rxb_rb", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("rxb_lb", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vcp", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vcn", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vis", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("iodelay", GET)); + //REQUIRE_THROWS(multiSlsDetectorClient("vref_ds", GET)); + // REQUIRE_THROWS(multiSlsDetectorClient("vcascn_pb", GET)); + //REQUIRE_THROWS(multiSlsDetectorClient("vcascp_pb", GET)); + //REQUIRE_THROWS(multiSlsDetectorClient("vout_cm", GET)); + //REQUIRE_THROWS(multiSlsDetectorClient("vcasc_out", GET)); + //REQUIRE_THROWS(multiSlsDetectorClient("vin_cm", GET)); + //REQUIRE_THROWS(multiSlsDetectorClient("vref_comp", GET)); + //REQUIRE_THROWS(multiSlsDetectorClient("ib_test_c", GET)); + //REQUIRE_THROWS(multiSlsDetectorClient("vpreamp", GET)); + //REQUIRE_THROWS(multiSlsDetectorClient("vshaper1", GET)); + //REQUIRE_THROWS(multiSlsDetectorClient("vshaper2", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vipre", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("viinsh", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vdcsh", GET)); + // REQUIRE_THROWS(multiSlsDetectorClient("vth1", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vth2", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vth3", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vpl", GET)); + //REQUIRE_THROWS(multiSlsDetectorClient("vph", GET)); + //REQUIRE_THROWS(multiSlsDetectorClient("vtrim", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("cassh", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("cas", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vicin", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vref_h_adc", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vb_comp_fe", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vb_comp_adc", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vcom_cds", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vref_restore", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vb_opa_1st", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vref_comp_fe", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vcom_adc1", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vref_prech", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vref_l_adc", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vref_cds", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vb_cs", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vb_opa_fd", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vcom_adc2", GET)); + + } + + else if (test::type == slsDetectorDefs::GOTTHARD) { + { + std::ostringstream oss; + REQUIRE_NOTHROW(multiSlsDetectorClient("vref_ds", GET, nullptr, oss)); + std::string s = (oss.str()).erase (0, strlen("vref_ds ")); + prev_val = std::stoi(s); + } + { + REQUIRE_NOTHROW(multiSlsDetectorClient("vref_ds 1000", PUT)); + std::ostringstream oss; + REQUIRE_NOTHROW(multiSlsDetectorClient("vref_ds", GET, nullptr, oss)); + REQUIRE(oss.str() == "vref_ds 1000\n"); + } + REQUIRE_NOTHROW(multiSlsDetectorClient("vref_ds " + std::to_string(prev_val), PUT)); + { + std::ostringstream oss; + REQUIRE_NOTHROW(multiSlsDetectorClient("vcascn_pb", GET, nullptr, oss)); + std::string s = (oss.str()).erase (0, strlen("vcascn_pb ")); + prev_val = std::stoi(s); + } + { + REQUIRE_NOTHROW(multiSlsDetectorClient("vcascn_pb 1000", PUT)); + std::ostringstream oss; + REQUIRE_NOTHROW(multiSlsDetectorClient("vcascn_pb", GET, nullptr, oss)); + REQUIRE(oss.str() == "vcascn_pb 1000\n"); + } + REQUIRE_NOTHROW(multiSlsDetectorClient("vcascn_pb " + std::to_string(prev_val), PUT)); + { + std::ostringstream oss; + REQUIRE_NOTHROW(multiSlsDetectorClient("vcascp_pb", GET, nullptr, oss)); + std::string s = (oss.str()).erase (0, strlen("vcascp_pb ")); + prev_val = std::stoi(s); + } + { + REQUIRE_NOTHROW(multiSlsDetectorClient("vcascp_pb 1000", PUT)); + std::ostringstream oss; + REQUIRE_NOTHROW(multiSlsDetectorClient("vcascp_pb", GET, nullptr, oss)); + REQUIRE(oss.str() == "vcascp_pb 1000\n"); + } + REQUIRE_NOTHROW(multiSlsDetectorClient("vcascp_pb " + std::to_string(prev_val), PUT)); + { + std::ostringstream oss; + REQUIRE_NOTHROW(multiSlsDetectorClient("vout_cm", GET, nullptr, oss)); + std::string s = (oss.str()).erase (0, strlen("vout_cm ")); + prev_val = std::stoi(s); + } + { + REQUIRE_NOTHROW(multiSlsDetectorClient("vout_cm 1000", PUT)); + std::ostringstream oss; + REQUIRE_NOTHROW(multiSlsDetectorClient("vout_cm", GET, nullptr, oss)); + REQUIRE(oss.str() == "vout_cm 1000\n"); + } + REQUIRE_NOTHROW(multiSlsDetectorClient("vout_cm " + std::to_string(prev_val), PUT)); + { + std::ostringstream oss; + REQUIRE_NOTHROW(multiSlsDetectorClient("vcasc_out", GET, nullptr, oss)); + std::string s = (oss.str()).erase (0, strlen("vcasc_out ")); + prev_val = std::stoi(s); + } + { + REQUIRE_NOTHROW(multiSlsDetectorClient("vcasc_out 1000", PUT)); + std::ostringstream oss; + REQUIRE_NOTHROW(multiSlsDetectorClient("vcasc_out", GET, nullptr, oss)); + REQUIRE(oss.str() == "vcasc_out 1000\n"); + } + REQUIRE_NOTHROW(multiSlsDetectorClient("vcasc_out " + std::to_string(prev_val), PUT)); + { + std::ostringstream oss; + REQUIRE_NOTHROW(multiSlsDetectorClient("vin_cm", GET, nullptr, oss)); + std::string s = (oss.str()).erase (0, strlen("vin_cm ")); + prev_val = std::stoi(s); + } + { + REQUIRE_NOTHROW(multiSlsDetectorClient("vin_cm 1000", PUT)); + std::ostringstream oss; + REQUIRE_NOTHROW(multiSlsDetectorClient("vin_cm", GET, nullptr, oss)); + REQUIRE(oss.str() == "vin_cm 1000\n"); + } + REQUIRE_NOTHROW(multiSlsDetectorClient("vin_cm " + std::to_string(prev_val), PUT)); + { + std::ostringstream oss; + REQUIRE_NOTHROW(multiSlsDetectorClient("vref_comp", GET, nullptr, oss)); + std::string s = (oss.str()).erase (0, strlen("vref_comp ")); + prev_val = std::stoi(s); + } + { + REQUIRE_NOTHROW(multiSlsDetectorClient("vref_comp 1000", PUT)); + std::ostringstream oss; + REQUIRE_NOTHROW(multiSlsDetectorClient("vref_comp", GET, nullptr, oss)); + REQUIRE(oss.str() == "vref_comp 1000\n"); + } + REQUIRE_NOTHROW(multiSlsDetectorClient("vref_comp " + std::to_string(prev_val), PUT)); + { + std::ostringstream oss; + REQUIRE_NOTHROW(multiSlsDetectorClient("ib_test_c", GET, nullptr, oss)); + std::string s = (oss.str()).erase (0, strlen("ib_test_c ")); + prev_val = std::stoi(s); + } + { + REQUIRE_NOTHROW(multiSlsDetectorClient("ib_test_c 1000", PUT)); + std::ostringstream oss; + REQUIRE_NOTHROW(multiSlsDetectorClient("ib_test_c", GET, nullptr, oss)); + REQUIRE(oss.str() == "ib_test_c 1000\n"); + } + REQUIRE_NOTHROW(multiSlsDetectorClient("ib_test_c " + std::to_string(prev_val), PUT)); + + REQUIRE_THROWS(multiSlsDetectorClient("vthreshold", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vsvp", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vsvn", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vtr", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vrf", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vrs", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vtgstv", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vcmp_ll", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vcmp_lr", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vcall", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vcmp_rl", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vcmp_rr", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("rxb_rb", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("rxb_lb", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vcp", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vcn", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vis", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("iodelay", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vpreamp", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vshaper1", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vshaper2", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vipre", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("viinsh", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vdcsh", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vth1", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vth2", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vth3", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vpl", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vph", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vtrim", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("cassh", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("cas", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vicin", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vref_h_adc", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vb_comp_fe", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vb_comp_adc", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vcom_cds", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vref_restore", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vb_opa_1st", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vref_comp_fe", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vcom_adc1", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vref_prech", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vref_l_adc", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vref_cds", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vb_cs", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vb_opa_fd", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vcom_adc2", GET)); + + } + + else if (test::type == slsDetectorDefs::CHIPTESTBOARD) { + for (int i = 0; i < 18; ++i) { + { + std::ostringstream oss; + REQUIRE_NOTHROW(multiSlsDetectorClient("dac " + std::to_string(i), GET, nullptr, oss)); + std::string s = (oss.str()).erase (0, strlen("dac ")); + prev_val = std::stoi(s); + } + { + REQUIRE_NOTHROW(multiSlsDetectorClient("dac " + std::to_string(i) + " 1000", PUT)); + std::ostringstream oss; + REQUIRE_NOTHROW(multiSlsDetectorClient("dac " + std::to_string(i), GET, nullptr, oss)); + REQUIRE(oss.str() == "dac 1000\n"); + } + REQUIRE_NOTHROW(multiSlsDetectorClient("dac " + std::to_string(i) + " " + std::to_string(prev_val), PUT)); + } + + //REQUIRE_THROWS(multiSlsDetectorClient("vthreshold", GET)); dac 0 + //REQUIRE_THROWS(multiSlsDetectorClient("vsvp", GET)); + //REQUIRE_THROWS(multiSlsDetectorClient("vsvn", GET)); + //REQUIRE_THROWS(multiSlsDetectorClient("vtr", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vrf", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vrs", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vtgstv", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vcmp_ll", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vcmp_lr", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vcall", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vcmp_rl", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vcmp_rr", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("rxb_rb", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("rxb_lb", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vcp", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vcn", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vis", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("iodelay", GET)); + //REQUIRE_THROWS(multiSlsDetectorClient("vref_ds", GET)); + //REQUIRE_THROWS(multiSlsDetectorClient("vcascn_pb", GET)); + //REQUIRE_THROWS(multiSlsDetectorClient("vcascp_pb", GET)); + // REQUIRE_THROWS(multiSlsDetectorClient("vout_cm", GET)); + //REQUIRE_THROWS(multiSlsDetectorClient("vcasc_out", GET)); + // REQUIRE_THROWS(multiSlsDetectorClient("vin_cm", GET)); + // REQUIRE_THROWS(multiSlsDetectorClient("vref_comp", GET)); + // REQUIRE_THROWS(multiSlsDetectorClient("ib_test_c", GET)); + //REQUIRE_THROWS(multiSlsDetectorClient("vpreamp", GET)); + //REQUIRE_THROWS(multiSlsDetectorClient("vshaper1", GET)); + //REQUIRE_THROWS(multiSlsDetectorClient("vshaper2", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vipre", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("viinsh", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vdcsh", GET)); + // REQUIRE_THROWS(multiSlsDetectorClient("vth1", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vth2", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vth3", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vpl", GET)); + //REQUIRE_THROWS(multiSlsDetectorClient("vph", GET)); + //REQUIRE_THROWS(multiSlsDetectorClient("vtrim", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("cassh", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("cas", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vicin", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vref_h_adc", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vb_comp_fe", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vb_comp_adc", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vcom_cds", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vref_restore", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vb_opa_1st", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vref_comp_fe", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vcom_adc1", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vref_prech", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vref_l_adc", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vref_cds", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vb_cs", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vb_opa_fd", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vcom_adc2", GET)); + + } + + else if (test::type == slsDetectorDefs::MYTHEN3) { + { + std::ostringstream oss; + REQUIRE_NOTHROW(multiSlsDetectorClient("vthreshold", GET, nullptr, oss)); + std::string s = (oss.str()).erase (0, strlen("vthreshold ")); + prev_val = std::stoi(s); + } + { + REQUIRE_NOTHROW(multiSlsDetectorClient("vthreshold 1000 mv", PUT)); + std::ostringstream oss; + REQUIRE_NOTHROW(multiSlsDetectorClient("vthreshold mv", GET, nullptr, oss)); + REQUIRE(oss.str() == "vthreshold 1000 mv\n"); + } + REQUIRE_NOTHROW(multiSlsDetectorClient("vthreshold " + std::to_string(prev_val), PUT)); + { + std::ostringstream oss; + REQUIRE_NOTHROW(multiSlsDetectorClient("vpreamp", GET, nullptr, oss)); + std::string s = (oss.str()).erase (0, strlen("vpreamp ")); + prev_val = std::stoi(s); + } + { + REQUIRE_NOTHROW(multiSlsDetectorClient("vpreamp 1000", PUT)); + std::ostringstream oss; + REQUIRE_NOTHROW(multiSlsDetectorClient("vpreamp", GET, nullptr, oss)); + REQUIRE(oss.str() == "vpreamp 1000\n"); + } + REQUIRE_NOTHROW(multiSlsDetectorClient("vpreamp " + std::to_string(prev_val), PUT)); + { + std::ostringstream oss; + REQUIRE_NOTHROW(multiSlsDetectorClient("vshaper1", GET, nullptr, oss)); + std::string s = (oss.str()).erase (0, strlen("vshaper1 ")); + prev_val = std::stoi(s); + } + { + REQUIRE_NOTHROW(multiSlsDetectorClient("vshaper1 1000", PUT)); + std::ostringstream oss; + REQUIRE_NOTHROW(multiSlsDetectorClient("vshaper1", GET, nullptr, oss)); + REQUIRE(oss.str() == "vshaper1 1000\n"); + } + REQUIRE_NOTHROW(multiSlsDetectorClient("vshaper1 " + std::to_string(prev_val), PUT)); + { + std::ostringstream oss; + REQUIRE_NOTHROW(multiSlsDetectorClient("vshaper2", GET, nullptr, oss)); + std::string s = (oss.str()).erase (0, strlen("vshaper2 ")); + prev_val = std::stoi(s); + } + { + REQUIRE_NOTHROW(multiSlsDetectorClient("vshaper2 1000", PUT)); + std::ostringstream oss; + REQUIRE_NOTHROW(multiSlsDetectorClient("vshaper2", GET, nullptr, oss)); + REQUIRE(oss.str() == "vshaper2 1000\n"); + } + REQUIRE_NOTHROW(multiSlsDetectorClient("vshaper2 " + std::to_string(prev_val), PUT)); + { + std::ostringstream oss; + REQUIRE_NOTHROW(multiSlsDetectorClient("vipre", GET, nullptr, oss)); + std::string s = (oss.str()).erase (0, strlen("vipre ")); + prev_val = std::stoi(s); + } + { + REQUIRE_NOTHROW(multiSlsDetectorClient("vipre 1000", PUT)); + std::ostringstream oss; + REQUIRE_NOTHROW(multiSlsDetectorClient("vipre", GET, nullptr, oss)); + REQUIRE(oss.str() == "vipre 1000\n"); + } + REQUIRE_NOTHROW(multiSlsDetectorClient("vipre " + std::to_string(prev_val), PUT)); + { + std::ostringstream oss; + REQUIRE_NOTHROW(multiSlsDetectorClient("viinsh", GET, nullptr, oss)); + std::string s = (oss.str()).erase (0, strlen("viinsh ")); + prev_val = std::stoi(s); + } + { + REQUIRE_NOTHROW(multiSlsDetectorClient("viinsh 1000", PUT)); + std::ostringstream oss; + REQUIRE_NOTHROW(multiSlsDetectorClient("viinsh", GET, nullptr, oss)); + REQUIRE(oss.str() == "viinsh 1000\n"); + } + REQUIRE_NOTHROW(multiSlsDetectorClient("viinsh " + std::to_string(prev_val), PUT)); + { + std::ostringstream oss; + REQUIRE_NOTHROW(multiSlsDetectorClient("vdcsh", GET, nullptr, oss)); + std::string s = (oss.str()).erase (0, strlen("vdcsh ")); + prev_val = std::stoi(s); + } + { + REQUIRE_NOTHROW(multiSlsDetectorClient("vdcsh 1000", PUT)); + std::ostringstream oss; + REQUIRE_NOTHROW(multiSlsDetectorClient("vdcsh", GET, nullptr, oss)); + REQUIRE(oss.str() == "vdcsh 1000\n"); + } + REQUIRE_NOTHROW(multiSlsDetectorClient("vdcsh " + std::to_string(prev_val), PUT)); + { + std::ostringstream oss; + REQUIRE_NOTHROW(multiSlsDetectorClient("vth1", GET, nullptr, oss)); + std::string s = (oss.str()).erase (0, strlen("vth1 ")); + prev_val = std::stoi(s); + } + { + REQUIRE_NOTHROW(multiSlsDetectorClient("vth1 1000", PUT)); + std::ostringstream oss; + REQUIRE_NOTHROW(multiSlsDetectorClient("vth1", GET, nullptr, oss)); + REQUIRE(oss.str() == "vth1 1000\n"); + } + REQUIRE_NOTHROW(multiSlsDetectorClient("vth1 " + std::to_string(prev_val), PUT)); + { + std::ostringstream oss; + REQUIRE_NOTHROW(multiSlsDetectorClient("vth2", GET, nullptr, oss)); + std::string s = (oss.str()).erase (0, strlen("vth2 ")); + prev_val = std::stoi(s); + } + { + REQUIRE_NOTHROW(multiSlsDetectorClient("vth2 1000", PUT)); + std::ostringstream oss; + REQUIRE_NOTHROW(multiSlsDetectorClient("vth2", GET, nullptr, oss)); + REQUIRE(oss.str() == "vth2 1000\n"); + } + REQUIRE_NOTHROW(multiSlsDetectorClient("vth2 " + std::to_string(prev_val), PUT)); + { + std::ostringstream oss; + REQUIRE_NOTHROW(multiSlsDetectorClient("vth3", GET, nullptr, oss)); + std::string s = (oss.str()).erase (0, strlen("vth3 ")); + prev_val = std::stoi(s); + } + { + REQUIRE_NOTHROW(multiSlsDetectorClient("vth3 1000", PUT)); + std::ostringstream oss; + REQUIRE_NOTHROW(multiSlsDetectorClient("vth3", GET, nullptr, oss)); + REQUIRE(oss.str() == "vth3 1000\n"); + } + REQUIRE_NOTHROW(multiSlsDetectorClient("vth3 " + std::to_string(prev_val), PUT)); + { + std::ostringstream oss; + REQUIRE_NOTHROW(multiSlsDetectorClient("vpl", GET, nullptr, oss)); + std::string s = (oss.str()).erase (0, strlen("vpl ")); + prev_val = std::stoi(s); + } + { + REQUIRE_NOTHROW(multiSlsDetectorClient("vpl 1000", PUT)); + std::ostringstream oss; + REQUIRE_NOTHROW(multiSlsDetectorClient("vpl", GET, nullptr, oss)); + REQUIRE(oss.str() == "vpl 1000\n"); + } + REQUIRE_NOTHROW(multiSlsDetectorClient("vpl " + std::to_string(prev_val), PUT)); + { + std::ostringstream oss; + REQUIRE_NOTHROW(multiSlsDetectorClient("vph", GET, nullptr, oss)); + std::string s = (oss.str()).erase (0, strlen("vph ")); + prev_val = std::stoi(s); + } + { + REQUIRE_NOTHROW(multiSlsDetectorClient("vph 1000", PUT)); + std::ostringstream oss; + REQUIRE_NOTHROW(multiSlsDetectorClient("vph", GET, nullptr, oss)); + REQUIRE(oss.str() == "vph 1000\n"); + } + REQUIRE_NOTHROW(multiSlsDetectorClient("vph " + std::to_string(prev_val), PUT)); + { + std::ostringstream oss; + REQUIRE_NOTHROW(multiSlsDetectorClient("vtrim", GET, nullptr, oss)); + std::string s = (oss.str()).erase (0, strlen("vtrim ")); + prev_val = std::stoi(s); + } + { + REQUIRE_NOTHROW(multiSlsDetectorClient("vtrim 1000", PUT)); + std::ostringstream oss; + REQUIRE_NOTHROW(multiSlsDetectorClient("vtrim", GET, nullptr, oss)); + REQUIRE(oss.str() == "vtrim 1000\n"); + } + REQUIRE_NOTHROW(multiSlsDetectorClient("vtrim " + std::to_string(prev_val), PUT)); + { + std::ostringstream oss; + REQUIRE_NOTHROW(multiSlsDetectorClient("cassh", GET, nullptr, oss)); + std::string s = (oss.str()).erase (0, strlen("cassh ")); + prev_val = std::stoi(s); + } + { + REQUIRE_NOTHROW(multiSlsDetectorClient("cassh 1000", PUT)); + std::ostringstream oss; + REQUIRE_NOTHROW(multiSlsDetectorClient("cassh", GET, nullptr, oss)); + REQUIRE(oss.str() == "cassh 1000\n"); + } + REQUIRE_NOTHROW(multiSlsDetectorClient("cassh " + std::to_string(prev_val), PUT)); + { + std::ostringstream oss; + REQUIRE_NOTHROW(multiSlsDetectorClient("cas", GET, nullptr, oss)); + std::string s = (oss.str()).erase (0, strlen("cas ")); + prev_val = std::stoi(s); + } + { + REQUIRE_NOTHROW(multiSlsDetectorClient("cas 1000", PUT)); + std::ostringstream oss; + REQUIRE_NOTHROW(multiSlsDetectorClient("cas", GET, nullptr, oss)); + REQUIRE(oss.str() == "cas 1000\n"); + } + REQUIRE_NOTHROW(multiSlsDetectorClient("cas " + std::to_string(prev_val), PUT)); + { + std::ostringstream oss; + REQUIRE_NOTHROW(multiSlsDetectorClient("vicin", GET, nullptr, oss)); + std::string s = (oss.str()).erase (0, strlen("vicin ")); + prev_val = std::stoi(s); + } + { + REQUIRE_NOTHROW(multiSlsDetectorClient("vicin 1000", PUT)); + std::ostringstream oss; + REQUIRE_NOTHROW(multiSlsDetectorClient("vicin", GET, nullptr, oss)); + REQUIRE(oss.str() == "vicin 1000\n"); + } + REQUIRE_NOTHROW(multiSlsDetectorClient("vicin " + std::to_string(prev_val), PUT)); + + + + REQUIRE_THROWS(multiSlsDetectorClient("vsvp", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vsvn", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vtr", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vrf", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vrs", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vtgstv", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vcmp_ll", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vcmp_lr", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vcall", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vcmp_rl", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vcmp_rr", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("rxb_rb", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("rxb_lb", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vcp", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vcn", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vis", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("iodelay", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vref_ds", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vcascn_pb", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vcascp_pb", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vout_cm", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vcasc_out", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vin_cm", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vref_comp", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("ib_test_c", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vref_h_adc", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vb_comp_fe", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vb_comp_adc", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vcom_cds", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vref_restore", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vb_opa_1st", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vref_comp_fe", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vcom_adc1", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vref_prech", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vref_l_adc", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vref_cds", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vb_cs", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vb_opa_fd", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vcom_adc2", GET)); + } + + else if (test::type == slsDetectorDefs::GOTTHARD2) { + { + std::ostringstream oss; + REQUIRE_NOTHROW(multiSlsDetectorClient("vref_h_adc", GET, nullptr, oss)); + std::string s = (oss.str()).erase (0, strlen("vref_h_adc ")); + prev_val = std::stoi(s); + } + { + REQUIRE_NOTHROW(multiSlsDetectorClient("vref_h_adc 1000", PUT)); + std::ostringstream oss; + REQUIRE_NOTHROW(multiSlsDetectorClient("vref_h_adc", GET, nullptr, oss)); + REQUIRE(oss.str() == "vref_h_adc 1000\n"); + } + REQUIRE_NOTHROW(multiSlsDetectorClient("vref_h_adc " + std::to_string(prev_val), PUT)); + { + std::ostringstream oss; + REQUIRE_NOTHROW(multiSlsDetectorClient("vb_comp_fe", GET, nullptr, oss)); + std::string s = (oss.str()).erase (0, strlen("vb_comp_fe ")); + prev_val = std::stoi(s); + } + { + REQUIRE_NOTHROW(multiSlsDetectorClient("vb_comp_fe 1000", PUT)); + std::ostringstream oss; + REQUIRE_NOTHROW(multiSlsDetectorClient("vb_comp_fe", GET, nullptr, oss)); + REQUIRE(oss.str() == "vb_comp_fe 1000\n"); + } + REQUIRE_NOTHROW(multiSlsDetectorClient("vb_comp_fe " + std::to_string(prev_val), PUT)); + { + std::ostringstream oss; + REQUIRE_NOTHROW(multiSlsDetectorClient("vb_comp_adc", GET, nullptr, oss)); + std::string s = (oss.str()).erase (0, strlen("vb_comp_adc ")); + prev_val = std::stoi(s); + } + { + REQUIRE_NOTHROW(multiSlsDetectorClient("vb_comp_adc 1000", PUT)); + std::ostringstream oss; + REQUIRE_NOTHROW(multiSlsDetectorClient("vb_comp_adc", GET, nullptr, oss)); + REQUIRE(oss.str() == "vb_comp_adc 1000\n"); + } + REQUIRE_NOTHROW(multiSlsDetectorClient("vb_comp_adc " + std::to_string(prev_val), PUT)); + { + std::ostringstream oss; + REQUIRE_NOTHROW(multiSlsDetectorClient("vcom_cds", GET, nullptr, oss)); + std::string s = (oss.str()).erase (0, strlen("vcom_cds ")); + prev_val = std::stoi(s); + } + { + REQUIRE_NOTHROW(multiSlsDetectorClient("vcom_cds 1000", PUT)); + std::ostringstream oss; + REQUIRE_NOTHROW(multiSlsDetectorClient("vcom_cds", GET, nullptr, oss)); + REQUIRE(oss.str() == "vcom_cds 1000\n"); + } + REQUIRE_NOTHROW(multiSlsDetectorClient("vcom_cds " + std::to_string(prev_val), PUT)); + { + std::ostringstream oss; + REQUIRE_NOTHROW(multiSlsDetectorClient("vref_restore", GET, nullptr, oss)); + std::string s = (oss.str()).erase (0, strlen("vref_restore ")); + prev_val = std::stoi(s); + } + { + REQUIRE_NOTHROW(multiSlsDetectorClient("vref_restore 1000", PUT)); + std::ostringstream oss; + REQUIRE_NOTHROW(multiSlsDetectorClient("vref_restore", GET, nullptr, oss)); + REQUIRE(oss.str() == "vref_restore 1000\n"); + } + REQUIRE_NOTHROW(multiSlsDetectorClient("vref_restore " + std::to_string(prev_val), PUT)); + { + std::ostringstream oss; + REQUIRE_NOTHROW(multiSlsDetectorClient("vb_opa_1st", GET, nullptr, oss)); + std::string s = (oss.str()).erase (0, strlen("vb_opa_1st ")); + prev_val = std::stoi(s); + } + { + REQUIRE_NOTHROW(multiSlsDetectorClient("vb_opa_1st 1000", PUT)); + std::ostringstream oss; + REQUIRE_NOTHROW(multiSlsDetectorClient("vb_opa_1st", GET, nullptr, oss)); + REQUIRE(oss.str() == "vb_opa_1st 1000\n"); + } + REQUIRE_NOTHROW(multiSlsDetectorClient("vb_opa_1st " + std::to_string(prev_val), PUT)); + { + std::ostringstream oss; + REQUIRE_NOTHROW(multiSlsDetectorClient("vref_comp_fe", GET, nullptr, oss)); + std::string s = (oss.str()).erase (0, strlen("vref_comp_fe ")); + prev_val = std::stoi(s); + } + { + REQUIRE_NOTHROW(multiSlsDetectorClient("vref_comp_fe 1000", PUT)); + std::ostringstream oss; + REQUIRE_NOTHROW(multiSlsDetectorClient("vref_comp_fe", GET, nullptr, oss)); + REQUIRE(oss.str() == "vref_comp_fe 1000\n"); + } + REQUIRE_NOTHROW(multiSlsDetectorClient("vref_comp_fe " + std::to_string(prev_val), PUT)); + { + std::ostringstream oss; + REQUIRE_NOTHROW(multiSlsDetectorClient("vcom_adc1", GET, nullptr, oss)); + std::string s = (oss.str()).erase (0, strlen("vcom_adc1 ")); + prev_val = std::stoi(s); + } + { + REQUIRE_NOTHROW(multiSlsDetectorClient("vcom_adc1 1000", PUT)); + std::ostringstream oss; + REQUIRE_NOTHROW(multiSlsDetectorClient("vcom_adc1", GET, nullptr, oss)); + REQUIRE(oss.str() == "vcom_adc1 1000\n"); + } + REQUIRE_NOTHROW(multiSlsDetectorClient("vcom_adc1 " + std::to_string(prev_val), PUT)); + { + std::ostringstream oss; + REQUIRE_NOTHROW(multiSlsDetectorClient("vref_prech", GET, nullptr, oss)); + std::string s = (oss.str()).erase (0, strlen("vref_prech ")); + prev_val = std::stoi(s); + } + { + REQUIRE_NOTHROW(multiSlsDetectorClient("vref_prech 1000", PUT)); + std::ostringstream oss; + REQUIRE_NOTHROW(multiSlsDetectorClient("vref_prech", GET, nullptr, oss)); + REQUIRE(oss.str() == "vref_prech 1000\n"); + } + REQUIRE_NOTHROW(multiSlsDetectorClient("vref_prech " + std::to_string(prev_val), PUT)); + { + std::ostringstream oss; + REQUIRE_NOTHROW(multiSlsDetectorClient("vref_l_adc", GET, nullptr, oss)); + std::string s = (oss.str()).erase (0, strlen("vref_l_adc ")); + prev_val = std::stoi(s); + } + { + REQUIRE_NOTHROW(multiSlsDetectorClient("vref_l_adc 1000", PUT)); + std::ostringstream oss; + REQUIRE_NOTHROW(multiSlsDetectorClient("vref_l_adc", GET, nullptr, oss)); + REQUIRE(oss.str() == "vref_l_adc 1000\n"); + } + REQUIRE_NOTHROW(multiSlsDetectorClient("vref_l_adc " + std::to_string(prev_val), PUT)); + { + std::ostringstream oss; + REQUIRE_NOTHROW(multiSlsDetectorClient("vref_cds", GET, nullptr, oss)); + std::string s = (oss.str()).erase (0, strlen("vref_cds ")); + prev_val = std::stoi(s); + } + { + REQUIRE_NOTHROW(multiSlsDetectorClient("vref_cds 1000", PUT)); + std::ostringstream oss; + REQUIRE_NOTHROW(multiSlsDetectorClient("vref_cds", GET, nullptr, oss)); + REQUIRE(oss.str() == "vref_cds 1000\n"); + } + REQUIRE_NOTHROW(multiSlsDetectorClient("vref_cds " + std::to_string(prev_val), PUT)); + { + std::ostringstream oss; + REQUIRE_NOTHROW(multiSlsDetectorClient("vb_cs", GET, nullptr, oss)); + std::string s = (oss.str()).erase (0, strlen("vb_cs ")); + prev_val = std::stoi(s); + } + { + REQUIRE_NOTHROW(multiSlsDetectorClient("vb_cs 1000", PUT)); + std::ostringstream oss; + REQUIRE_NOTHROW(multiSlsDetectorClient("vb_cs", GET, nullptr, oss)); + REQUIRE(oss.str() == "vb_cs 1000\n"); + } + REQUIRE_NOTHROW(multiSlsDetectorClient("vb_cs " + std::to_string(prev_val), PUT)); + { + std::ostringstream oss; + REQUIRE_NOTHROW(multiSlsDetectorClient("vb_opa_fd", GET, nullptr, oss)); + std::string s = (oss.str()).erase (0, strlen("vb_opa_fd ")); + prev_val = std::stoi(s); + } + { + REQUIRE_NOTHROW(multiSlsDetectorClient("vb_opa_fd 1000", PUT)); + std::ostringstream oss; + REQUIRE_NOTHROW(multiSlsDetectorClient("vb_opa_fd", GET, nullptr, oss)); + REQUIRE(oss.str() == "vb_opa_fd 1000\n"); + } + REQUIRE_NOTHROW(multiSlsDetectorClient("vb_opa_fd " + std::to_string(prev_val), PUT)); + { + std::ostringstream oss; + REQUIRE_NOTHROW(multiSlsDetectorClient("vcom_adc2", GET, nullptr, oss)); + std::string s = (oss.str()).erase (0, strlen("vcom_adc2 ")); + prev_val = std::stoi(s); + } + { + REQUIRE_NOTHROW(multiSlsDetectorClient("vcom_adc2 1000", PUT)); + std::ostringstream oss; + REQUIRE_NOTHROW(multiSlsDetectorClient("vcom_adc2", GET, nullptr, oss)); + REQUIRE(oss.str() == "vcom_adc2 1000\n"); + } + REQUIRE_NOTHROW(multiSlsDetectorClient("vcom_adc2 " + std::to_string(prev_val), PUT)); + + + REQUIRE_THROWS(multiSlsDetectorClient("vthreshold", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vsvp", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vsvn", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vtr", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vrf", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vrs", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vtgstv", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vcmp_ll", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vcmp_lr", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vcall", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vcmp_rl", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vcmp_rr", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("rxb_rb", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("rxb_lb", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vcp", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vcn", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vis", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("iodelay", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vref_ds", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vcascn_pb", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vcascp_pb", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vout_cm", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vcasc_out", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vin_cm", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("vref_comp", GET)); + REQUIRE_THROWS(multiSlsDetectorClient("ib_test_c", GET)); + } + +} + + TEST_CASE("rx_frameindex", "[.cmd]") { REQUIRE_NOTHROW(multiSlsDetectorClient("rx_frameindex", GET)); REQUIRE_THROWS(multiSlsDetectorClient("rx_frameindex bla", PUT)); diff --git a/slsSupportLib/include/sls_detector_defs.h b/slsSupportLib/include/sls_detector_defs.h index 36ef8fb94..3cb9cd0aa 100755 --- a/slsSupportLib/include/sls_detector_defs.h +++ b/slsSupportLib/include/sls_detector_defs.h @@ -387,12 +387,6 @@ format SHAPER2, /**< shaper2 feedback */ TEMPERATURE_ADC, /**< temperature sensor (adc) */ TEMPERATURE_FPGA, /**< temperature sensor (fpga) */ - HUMIDITY, /**< humidity sensor (adc) */ - DETECTOR_BIAS, /**< detector bias */ - VA_POT, /**< power supply va */ - VDD_POT, /**< chiptest board power supply vdd */ - VSH_POT, /**< chiptest board power supply vsh */ - VIO_POT, /**< chiptest board power supply va */ G_VREF_DS, /**< gotthard */ G_VCASCN_PB, /**< gotthard */ G_VCASCP_PB, /**< gotthard */ diff --git a/slsSupportLib/include/versionAPI.h b/slsSupportLib/include/versionAPI.h index 9794af6da..911df7978 100644 --- a/slsSupportLib/include/versionAPI.h +++ b/slsSupportLib/include/versionAPI.h @@ -7,6 +7,6 @@ #define APIMYTHEN3 0x191011 #define APIGOTTHARD2 0x191017 #define APIGOTTHARD 0x191024 -#define APIJUNGFRAU 0x191024 #define APIEIGER 0x191024 #define APICTB 0x191024 +#define APIJUNGFRAU 0x191029