diff --git a/examples/moench03_T1.config b/examples/moench03_T1.config index a67fca6ce..e51643b29 100644 --- a/examples/moench03_T1.config +++ b/examples/moench03_T1.config @@ -1,7 +1,8 @@ -initialchecks 0 +#initialchecks 0 ############################################# ### edit with hostname or IP address of your detector ############################################ +#hostname bchip181+ hostname bchip181+ ############################################# @@ -27,7 +28,7 @@ rx_zmqport 50003 ############################################# ### edit with 1 Gbs IP of PC where you will run the GUI ############################################ -zmqip 129.129.202.136 +zmqip 129.129.202.98 zmqport 50001 @@ -39,11 +40,12 @@ rx_zmqstream 1 frames 100000 period 0.0006 +exptime 0.00035 ############################################# ### edit with directory you want to write to ############################################ -fpath /mnt/moench_data/scratch/ +fpath /mnt/moench_data/scratch1/ fwrite 0 diff --git a/python/slsdet/detector.py b/python/slsdet/detector.py index f03551ce3..061e70193 100755 --- a/python/slsdet/detector.py +++ b/python/slsdet/detector.py @@ -1749,7 +1749,7 @@ class Detector(CppDetectorApi): Note ---- [Eiger] Sets vcmp_ll, vcmp_lr, vcmp_rl, vcmp_rr and vcp to the same value. \n - [Mythen3] Sets vth1, vth2 and vth3 to the same value. + [Mythen3] Sets vth1, vth2 and vth3 to the same value for enabled counters. """ return self.getDAC(dacIndex.VTHRESHOLD) @@ -2381,6 +2381,7 @@ class Detector(CppDetectorApi): Note ----- Each element in list can be 0 - 2 and must be non repetitive. + Enabling counters sets vth dacs to remembered values and disabling sets them to disabled values. Example ----------- diff --git a/settingsdir/mythen3/fast/11200eV/trim.sn0000 b/settingsdir/mythen3/fast/11200eV/trim.sn0000 deleted file mode 100644 index e82819eba..000000000 Binary files a/settingsdir/mythen3/fast/11200eV/trim.sn0000 and /dev/null differ diff --git a/settingsdir/mythen3/fast/11200eV/trim.snxxxx b/settingsdir/mythen3/fast/11200eV/trim.snxxxx deleted file mode 100644 index e82819eba..000000000 Binary files a/settingsdir/mythen3/fast/11200eV/trim.snxxxx and /dev/null differ diff --git a/settingsdir/mythen3/fast/12000eV/trim.sn0000 b/settingsdir/mythen3/fast/12000eV/trim.sn0000 new file mode 100644 index 000000000..14c7074fc Binary files /dev/null and b/settingsdir/mythen3/fast/12000eV/trim.sn0000 differ diff --git a/settingsdir/mythen3/fast/4000eV/trim.sn0000 b/settingsdir/mythen3/fast/4000eV/trim.sn0000 new file mode 100644 index 000000000..de315dc1f Binary files /dev/null and b/settingsdir/mythen3/fast/4000eV/trim.sn0000 differ diff --git a/settingsdir/mythen3/fast/4500eV/trim.sn0000 b/settingsdir/mythen3/fast/4500eV/trim.sn0000 deleted file mode 100644 index 30f6400a2..000000000 Binary files a/settingsdir/mythen3/fast/4500eV/trim.sn0000 and /dev/null differ diff --git a/settingsdir/mythen3/fast/4500eV/trim.snxxxx b/settingsdir/mythen3/fast/4500eV/trim.snxxxx deleted file mode 100644 index 30f6400a2..000000000 Binary files a/settingsdir/mythen3/fast/4500eV/trim.snxxxx and /dev/null differ diff --git a/settingsdir/mythen3/fast/5400eV/trim.sn0000 b/settingsdir/mythen3/fast/5400eV/trim.sn0000 deleted file mode 100644 index bd2169933..000000000 Binary files a/settingsdir/mythen3/fast/5400eV/trim.sn0000 and /dev/null differ diff --git a/settingsdir/mythen3/fast/5400eV/trim.snxxxx b/settingsdir/mythen3/fast/5400eV/trim.snxxxx deleted file mode 100644 index bd2169933..000000000 Binary files a/settingsdir/mythen3/fast/5400eV/trim.snxxxx and /dev/null differ diff --git a/settingsdir/mythen3/fast/6000eV/trim.sn0000 b/settingsdir/mythen3/fast/6000eV/trim.sn0000 new file mode 100644 index 000000000..d18ae5013 Binary files /dev/null and b/settingsdir/mythen3/fast/6000eV/trim.sn0000 differ diff --git a/settingsdir/mythen3/fast/6400eV/trim.sn0000 b/settingsdir/mythen3/fast/6400eV/trim.sn0000 deleted file mode 100644 index 3210033e2..000000000 Binary files a/settingsdir/mythen3/fast/6400eV/trim.sn0000 and /dev/null differ diff --git a/settingsdir/mythen3/fast/6400eV/trim.snxxxx b/settingsdir/mythen3/fast/6400eV/trim.snxxxx deleted file mode 100644 index 3210033e2..000000000 Binary files a/settingsdir/mythen3/fast/6400eV/trim.snxxxx and /dev/null differ diff --git a/settingsdir/mythen3/fast/8000eV/trim.sn0000 b/settingsdir/mythen3/fast/8000eV/trim.sn0000 index b5bf94569..cc6a3c5f4 100644 Binary files a/settingsdir/mythen3/fast/8000eV/trim.sn0000 and b/settingsdir/mythen3/fast/8000eV/trim.sn0000 differ diff --git a/settingsdir/mythen3/fast/8000eV/trim.snxxxx b/settingsdir/mythen3/fast/8000eV/trim.snxxxx deleted file mode 100644 index b5bf94569..000000000 Binary files a/settingsdir/mythen3/fast/8000eV/trim.snxxxx and /dev/null differ diff --git a/settingsdir/mythen3/fast/9900eV/trim.sn0000 b/settingsdir/mythen3/fast/9900eV/trim.sn0000 deleted file mode 100644 index cb986b6a7..000000000 Binary files a/settingsdir/mythen3/fast/9900eV/trim.sn0000 and /dev/null differ diff --git a/settingsdir/mythen3/fast/9900eV/trim.snxxxx b/settingsdir/mythen3/fast/9900eV/trim.snxxxx deleted file mode 100644 index cb986b6a7..000000000 Binary files a/settingsdir/mythen3/fast/9900eV/trim.snxxxx and /dev/null differ diff --git a/settingsdir/mythen3/highgain/11200eV/trim.sn0000 b/settingsdir/mythen3/highgain/11200eV/trim.sn0000 deleted file mode 100644 index e82819eba..000000000 Binary files a/settingsdir/mythen3/highgain/11200eV/trim.sn0000 and /dev/null differ diff --git a/settingsdir/mythen3/highgain/11200eV/trim.snxxxx b/settingsdir/mythen3/highgain/11200eV/trim.snxxxx deleted file mode 100644 index e82819eba..000000000 Binary files a/settingsdir/mythen3/highgain/11200eV/trim.snxxxx and /dev/null differ diff --git a/settingsdir/mythen3/highgain/12000eV/trim.sn0000 b/settingsdir/mythen3/highgain/12000eV/trim.sn0000 new file mode 100644 index 000000000..08ecc6cca Binary files /dev/null and b/settingsdir/mythen3/highgain/12000eV/trim.sn0000 differ diff --git a/settingsdir/mythen3/highgain/4000eV/trim.sn0000 b/settingsdir/mythen3/highgain/4000eV/trim.sn0000 new file mode 100644 index 000000000..440b0518a Binary files /dev/null and b/settingsdir/mythen3/highgain/4000eV/trim.sn0000 differ diff --git a/settingsdir/mythen3/highgain/4500eV/trim.sn0000 b/settingsdir/mythen3/highgain/4500eV/trim.sn0000 deleted file mode 100644 index 30f6400a2..000000000 Binary files a/settingsdir/mythen3/highgain/4500eV/trim.sn0000 and /dev/null differ diff --git a/settingsdir/mythen3/highgain/4500eV/trim.snxxxx b/settingsdir/mythen3/highgain/4500eV/trim.snxxxx deleted file mode 100644 index 30f6400a2..000000000 Binary files a/settingsdir/mythen3/highgain/4500eV/trim.snxxxx and /dev/null differ diff --git a/settingsdir/mythen3/highgain/5400eV/trim.sn0000 b/settingsdir/mythen3/highgain/5400eV/trim.sn0000 deleted file mode 100644 index bd2169933..000000000 Binary files a/settingsdir/mythen3/highgain/5400eV/trim.sn0000 and /dev/null differ diff --git a/settingsdir/mythen3/highgain/5400eV/trim.snxxxx b/settingsdir/mythen3/highgain/5400eV/trim.snxxxx deleted file mode 100644 index bd2169933..000000000 Binary files a/settingsdir/mythen3/highgain/5400eV/trim.snxxxx and /dev/null differ diff --git a/settingsdir/mythen3/highgain/6000eV/trim.sn0000 b/settingsdir/mythen3/highgain/6000eV/trim.sn0000 new file mode 100644 index 000000000..5a02d1ecc Binary files /dev/null and b/settingsdir/mythen3/highgain/6000eV/trim.sn0000 differ diff --git a/settingsdir/mythen3/highgain/6400eV/trim.sn0000 b/settingsdir/mythen3/highgain/6400eV/trim.sn0000 deleted file mode 100644 index 3210033e2..000000000 Binary files a/settingsdir/mythen3/highgain/6400eV/trim.sn0000 and /dev/null differ diff --git a/settingsdir/mythen3/highgain/6400eV/trim.snxxxx b/settingsdir/mythen3/highgain/6400eV/trim.snxxxx deleted file mode 100644 index 3210033e2..000000000 Binary files a/settingsdir/mythen3/highgain/6400eV/trim.snxxxx and /dev/null differ diff --git a/settingsdir/mythen3/highgain/8000eV/trim.sn0000 b/settingsdir/mythen3/highgain/8000eV/trim.sn0000 index b5bf94569..09408f420 100644 Binary files a/settingsdir/mythen3/highgain/8000eV/trim.sn0000 and b/settingsdir/mythen3/highgain/8000eV/trim.sn0000 differ diff --git a/settingsdir/mythen3/highgain/8000eV/trim.snxxxx b/settingsdir/mythen3/highgain/8000eV/trim.snxxxx deleted file mode 100644 index b5bf94569..000000000 Binary files a/settingsdir/mythen3/highgain/8000eV/trim.snxxxx and /dev/null differ diff --git a/settingsdir/mythen3/highgain/9900eV/trim.sn0000 b/settingsdir/mythen3/highgain/9900eV/trim.sn0000 deleted file mode 100644 index cb986b6a7..000000000 Binary files a/settingsdir/mythen3/highgain/9900eV/trim.sn0000 and /dev/null differ diff --git a/settingsdir/mythen3/highgain/9900eV/trim.snxxxx b/settingsdir/mythen3/highgain/9900eV/trim.snxxxx deleted file mode 100644 index cb986b6a7..000000000 Binary files a/settingsdir/mythen3/highgain/9900eV/trim.snxxxx and /dev/null differ diff --git a/settingsdir/mythen3/standard/11200eV/trim.sn0000 b/settingsdir/mythen3/standard/11200eV/trim.sn0000 deleted file mode 100644 index e82819eba..000000000 Binary files a/settingsdir/mythen3/standard/11200eV/trim.sn0000 and /dev/null differ diff --git a/settingsdir/mythen3/standard/11200eV/trim.snxxxx b/settingsdir/mythen3/standard/11200eV/trim.snxxxx deleted file mode 100644 index e82819eba..000000000 Binary files a/settingsdir/mythen3/standard/11200eV/trim.snxxxx and /dev/null differ diff --git a/settingsdir/mythen3/standard/12000eV/trim.sn0000 b/settingsdir/mythen3/standard/12000eV/trim.sn0000 new file mode 100644 index 000000000..47ef29619 Binary files /dev/null and b/settingsdir/mythen3/standard/12000eV/trim.sn0000 differ diff --git a/settingsdir/mythen3/standard/4000eV/trim.sn0000 b/settingsdir/mythen3/standard/4000eV/trim.sn0000 new file mode 100644 index 000000000..69e9b0f57 Binary files /dev/null and b/settingsdir/mythen3/standard/4000eV/trim.sn0000 differ diff --git a/settingsdir/mythen3/standard/4500eV/trim.sn0000 b/settingsdir/mythen3/standard/4500eV/trim.sn0000 deleted file mode 100644 index 30f6400a2..000000000 Binary files a/settingsdir/mythen3/standard/4500eV/trim.sn0000 and /dev/null differ diff --git a/settingsdir/mythen3/standard/4500eV/trim.snxxxx b/settingsdir/mythen3/standard/4500eV/trim.snxxxx deleted file mode 100644 index 30f6400a2..000000000 Binary files a/settingsdir/mythen3/standard/4500eV/trim.snxxxx and /dev/null differ diff --git a/settingsdir/mythen3/standard/5400eV/trim.sn0000 b/settingsdir/mythen3/standard/5400eV/trim.sn0000 deleted file mode 100644 index bd2169933..000000000 Binary files a/settingsdir/mythen3/standard/5400eV/trim.sn0000 and /dev/null differ diff --git a/settingsdir/mythen3/standard/5400eV/trim.snxxxx b/settingsdir/mythen3/standard/5400eV/trim.snxxxx deleted file mode 100644 index bd2169933..000000000 Binary files a/settingsdir/mythen3/standard/5400eV/trim.snxxxx and /dev/null differ diff --git a/settingsdir/mythen3/standard/6000eV/trim.sn0000 b/settingsdir/mythen3/standard/6000eV/trim.sn0000 new file mode 100644 index 000000000..103a0fb57 Binary files /dev/null and b/settingsdir/mythen3/standard/6000eV/trim.sn0000 differ diff --git a/settingsdir/mythen3/standard/6400eV/trim.sn0000 b/settingsdir/mythen3/standard/6400eV/trim.sn0000 deleted file mode 100644 index 3210033e2..000000000 Binary files a/settingsdir/mythen3/standard/6400eV/trim.sn0000 and /dev/null differ diff --git a/settingsdir/mythen3/standard/6400eV/trim.snxxxx b/settingsdir/mythen3/standard/6400eV/trim.snxxxx deleted file mode 100644 index 3210033e2..000000000 Binary files a/settingsdir/mythen3/standard/6400eV/trim.snxxxx and /dev/null differ diff --git a/settingsdir/mythen3/standard/8000eV/trim.sn0000 b/settingsdir/mythen3/standard/8000eV/trim.sn0000 index b5bf94569..37a770ed1 100644 Binary files a/settingsdir/mythen3/standard/8000eV/trim.sn0000 and b/settingsdir/mythen3/standard/8000eV/trim.sn0000 differ diff --git a/settingsdir/mythen3/standard/8000eV/trim.snxxxx b/settingsdir/mythen3/standard/8000eV/trim.snxxxx deleted file mode 100644 index b5bf94569..000000000 Binary files a/settingsdir/mythen3/standard/8000eV/trim.snxxxx and /dev/null differ diff --git a/settingsdir/mythen3/standard/9900eV/trim.sn0000 b/settingsdir/mythen3/standard/9900eV/trim.sn0000 deleted file mode 100644 index cb986b6a7..000000000 Binary files a/settingsdir/mythen3/standard/9900eV/trim.sn0000 and /dev/null differ diff --git a/settingsdir/mythen3/standard/9900eV/trim.snxxxx b/settingsdir/mythen3/standard/9900eV/trim.snxxxx deleted file mode 100644 index cb986b6a7..000000000 Binary files a/settingsdir/mythen3/standard/9900eV/trim.snxxxx and /dev/null differ diff --git a/slsDetectorCalibration/interpolations/slsInterpolation.h b/slsDetectorCalibration/interpolations/slsInterpolation.h index 958f8ce0a..ed99160c0 100644 --- a/slsDetectorCalibration/interpolations/slsInterpolation.h +++ b/slsDetectorCalibration/interpolations/slsInterpolation.h @@ -447,19 +447,6 @@ class slsInterpolation etax=(-l+r)/sum; etay=(-b+t)/sum; } - /* if (etax<-1 || etax>1 || etay<-1 || etay>1) { */ - /* cout << "**********" << etax << " " << etay << endl; */ - /* for (int ix=0; ix<3; ix++) { */ - /* for (int iy=0; iy<3; iy++) { */ - /* cout << cl[iy+3*ix] << "\t" ; */ - - /* } */ - /* cout << endl; */ - /* } */ - /* cout << sum << " " << l << " " << r << " " << t << " " << b << endl; */ - - /* } */ - if (etax>=0 && etay>=0) return TOP_RIGHT; @@ -479,6 +466,29 @@ class slsInterpolation } + + static int calcEta3X(double *cl, double &etax, double &etay, double &sum) { + double l,r,t,b; + sum=cl[0]+cl[1]+cl[2]+cl[3]+cl[4]+cl[5]+cl[6]+cl[7]+cl[8]; + if (sum>0) { + l=cl[3]; + r=cl[5]; + b=cl[1]; + t=cl[7]; + etax=(-l+r)/sum; + etay=(-b+t)/sum; + } + return -1; + } + + static int calcEta3X(int *cl, double &etax, double &etay, double &sum) { + double cli[9]; + for (int ix=0; ix<9; ix++) cli[ix]=cl[ix]; + + return calcEta3X(cli, etax, etay, sum); + } + + /* static int calcMyEta(double totquad, int quad, double *cl, double &etax, double &etay) { */ /* double l,r,t,b, sum; */ /* int yoff; */ @@ -537,21 +547,6 @@ class slsInterpolation - /* static int calcEta3X(double *cl, double &etax, double &etay, double &sum) { */ - /* double l,r,t,b; */ - /* sum=cl[0]+cl[1]+cl[2]+cl[3]+cl[4]+cl[5]+cl[6]+cl[7]+cl[8]; */ - /* if (sum>0) { */ - /* l=cl[3]; */ - /* r=cl[5]; */ - /* b=cl[1]; */ - /* t=cl[7]; */ - /* etax=(-l+r)/sum; */ - /* etay=(-b+t)/sum; */ - /* } */ - /* return -1; */ - /* } */ - - /* static int calcEta3X(int *cl, double &etax, double &etay, double &sum) { */ /* double l,r,t,b; */ /* sum=cl[0]+cl[1]+cl[2]+cl[3]+cl[4]+cl[5]+cl[6]+cl[7]+cl[8]; */ diff --git a/slsDetectorServers/mythen3DetectorServer/RegisterDefs.h b/slsDetectorServers/mythen3DetectorServer/RegisterDefs.h index a07a24a50..0a04b7916 100644 --- a/slsDetectorServers/mythen3DetectorServer/RegisterDefs.h +++ b/slsDetectorServers/mythen3DetectorServer/RegisterDefs.h @@ -109,6 +109,9 @@ #define SYSTEM_STATUS_R_PLL_LCKD_MSK (0x00000001 << SYSTEM_STATUS_R_PLL_LCKD_OFST) #define SYSTEM_STATUS_RDO_PLL_LCKD_OFST (2) #define SYSTEM_STATUS_RDO_PLL_LCKD_MSK (0x00000001 << SYSTEM_STATUS_RDO_PLL_LCKD_OFST) +#define SYSTEM_STATUS_SLV_BRD_DTCT_OFST (31) +#define SYSTEM_STATUS_SLV_BRD_DTCT_MSK (0x00000001 << SYSTEM_STATUS_SLV_BRD_DTCT_OFST) + /* Config RW regiseter */ #define CONFIG_REG (0x20 * REG_OFFSET + BASE_CONTROL) diff --git a/slsDetectorServers/mythen3DetectorServer/bin/mythen3DetectorServer_developer b/slsDetectorServers/mythen3DetectorServer/bin/mythen3DetectorServer_developer index 85cab48bd..f05d63bc2 100755 Binary files a/slsDetectorServers/mythen3DetectorServer/bin/mythen3DetectorServer_developer and b/slsDetectorServers/mythen3DetectorServer/bin/mythen3DetectorServer_developer differ diff --git a/slsDetectorServers/mythen3DetectorServer/slsDetectorFunctionList.c b/slsDetectorServers/mythen3DetectorServer/slsDetectorFunctionList.c index 7e0c737b1..aa7c0b88f 100644 --- a/slsDetectorServers/mythen3DetectorServer/slsDetectorFunctionList.c +++ b/slsDetectorServers/mythen3DetectorServer/slsDetectorFunctionList.c @@ -5,8 +5,8 @@ #include "RegisterDefs.h" #include "clogger.h" #include "common.h" -#include "mythen3.h" #include "loadPattern.h" +#include "mythen3.h" #include "sharedMemory.h" #include "sls/versionAPI.h" #ifdef VIRTUAL @@ -21,7 +21,6 @@ #include #endif - // Global variable from slsDetectorServer_funcs extern int debugflag; extern int updateFlag; @@ -47,7 +46,7 @@ enum detectorSettings thisSettings; sls_detector_module *detectorModules = NULL; int *detectorChans = NULL; int *detectorDacs = NULL; -int *channelMask=NULL; +int *channelMask = NULL; int32_t clkPhase[NUM_CLOCKS] = {}; uint32_t clkDivider[NUM_CLOCKS] = {}; @@ -379,7 +378,6 @@ void allocateDetectorStructureMemory() { memset(channelMask, 0, NCHIP * NCHAN * sizeof(char)); detectorDacs = malloc(NDAC * sizeof(int)); - LOG(logDEBUG1, ("modules from 0x%x to 0x%x\n", detectorModules, detectorModules)); LOG(logDEBUG1, ("chans from 0x%x to 0x%x\n", detectorChans, detectorChans)); @@ -519,7 +517,7 @@ void setupDetector() { powerChip(1); if (!initError) { - setChipStatusRegister(CSR_default); + setChipStatusRegister(CSR_default); } setAllTrimbits(DEFAULT_TRIMBIT_VALUE); @@ -935,11 +933,17 @@ void setCounterMask(uint32_t arg) { } LOG(logINFO, ("\tUpdating Vth dacs\n")); + enum DACINDEX vthdacs[] = {M_VTH1, M_VTH2, M_VTH3}; for (int i = 0; i < NCOUNTERS; ++i) { // if change in enable if ((arg & (1 << i)) ^ (oldmask & (1 << i))) { - // will disable if counter disabled - setDAC(VTH1, vthEnabledVals[i], 0); + // disable, disable value + int value = DEFAULT_COUNTER_DISABLED_VTH_VAL; + // enable, set saved values + if (arg & (1 << i)) { + value = vthEnabledVals[i]; + } + setGeneralDAC(vthdacs[i], value, 0); } } } @@ -1057,7 +1061,7 @@ int64_t getMeasurementTime() { /* parameters - module, speed, readout */ -int setDACS(int* dacs){ +int setDACS(int *dacs) { for (int i = 0; i < NDAC; ++i) { if (dacs[i] != -1) { setDAC((enum DACINDEX)i, dacs[i], 0); @@ -1074,17 +1078,16 @@ int setDACS(int* dacs){ return OK; } - int setModule(sls_detector_module myMod, char *mess) { LOG(logINFO, ("Setting module\n")); - if (setChipStatusRegister(myMod.reg)){ + if (setChipStatusRegister(myMod.reg)) { sprintf(mess, "Could not CSR from module\n"); LOG(logERROR, (mess)); return FAIL; } - if (setDACS(myMod.dacs)){ + if (setDACS(myMod.dacs)) { sprintf(mess, "Could not set dacs\n"); LOG(logERROR, (mess)); return FAIL; @@ -1093,7 +1096,7 @@ int setModule(sls_detector_module myMod, char *mess) { for (int i = 0; i < NCOUNTERS; ++i) { if (myMod.eV[i] >= 0) { setThresholdEnergy(i, myMod.eV[i]); - }else{ + } else { setThresholdEnergy(i, -1); } } @@ -1114,6 +1117,7 @@ int setModule(sls_detector_module myMod, char *mess) { } int setTrimbits(int *trimbits) { + LOG(logINFOBLUE, ("Setting trimbits\n")); // remember previous run clock uint32_t prevRunClk = clkDivider[SYSTEM_C0]; patternParameters *pat = NULL; @@ -1130,7 +1134,7 @@ int setTrimbits(int *trimbits) { pat = setChannelRegisterChip(ichip, channelMask, trimbits); // change here!!! if (pat) { - error |= loadPattern(pat); + error |= loadPattern(logDEBUG5, pat); if (error == 0) startPattern(); free(pat); @@ -1263,45 +1267,52 @@ void setThresholdEnergy(int counterIndex, int eV) { /* parameters - dac, hv */ void setDAC(enum DACINDEX ind, int val, int mV) { + // invalid value if (val < 0) { return; } - - if (ind == M_VTHRESHOLD) { - LOG(logINFO, - ("Setting Threshold voltages to %d %s\n", val, (mV ? "mv" : ""))); - setDAC(M_VTH1, val, mV); - setDAC(M_VTH2, val, mV); - setDAC(M_VTH3, val, mV); + // out of scope, NDAC + 1 for vthreshold + if ((int)ind > NDAC + 1) { + LOG(logERROR, ("Unknown dac index %d\n", ind)); return; } - char *dac_names[] = {DAC_NAMES}; - // remember vthx values and set 2800 if counter disabled - uint32_t counters = getCounterMask(); - int vthdacs[] = {M_VTH1, M_VTH2, M_VTH3}; - for (int i = 0; i < NCOUNTERS; ++i) { - if (vthdacs[i] == (int)ind) { - // remember enabled values for vthx - if (val != DEFAULT_COUNTER_DISABLED_VTH_VAL) { - int vthval = val; - if (mV) { - if (LTC2620_D_VoltageToDac(val, &vthval) == FAIL) { - return; + // threshold dacs (remember value, vthreshold: skip disabled) + if (ind == M_VTHRESHOLD || ind == M_VTH1 || ind == M_VTH2 || + ind == M_VTH3) { + char *dac_names[] = {DAC_NAMES}; + int vthdacs[] = {M_VTH1, M_VTH2, M_VTH3}; + uint32_t counters = getCounterMask(); + for (int i = 0; i < NCOUNTERS; ++i) { + if ((int)ind == vthdacs[i] || ind == M_VTHRESHOLD) { + int dacval = val; + // if not disabled value, remember value + if (dacval != DEFAULT_COUNTER_DISABLED_VTH_VAL) { + // convert mv to dac + if (mV) { + if (LTC2620_D_VoltageToDac(val, &dacval) == FAIL) { + return; + } } + vthEnabledVals[i] = dacval; + LOG(logINFO, + ("Remembering %s [%d]\n", dac_names[ind], dacval)); } - vthEnabledVals[i] = vthval; - LOG(logINFO, ("Remembering %s [%d]\n", dac_names[ind], vthval)); - } - // set vthx to disable val, if counter disabled - if (!(counters & (1 << i))) { - LOG(logINFO, ("Disabling %s\n", dac_names[ind])); - val = DEFAULT_COUNTER_DISABLED_VTH_VAL; - mV = 0; + // if vthreshold,skip for disabled counters + if ((ind == M_VTHRESHOLD) && (!(counters & (1 << i)))) { + continue; + } + setGeneralDAC(vthdacs[i], val, mV); } } + return; } + setGeneralDAC(ind, val, mV); +} + +void setGeneralDAC(enum DACINDEX ind, int val, int mV) { + char *dac_names[] = {DAC_NAMES}; LOG(logDEBUG1, ("Setting dac[%d - %s]: %d %s \n", (int)ind, dac_names[ind], val, (mV ? "mV" : "dac units"))); int dacval = val; @@ -1329,20 +1340,29 @@ void setDAC(enum DACINDEX ind, int val, int mV) { int getDAC(enum DACINDEX ind, int mV) { if (ind == M_VTHRESHOLD) { - int ret[NCOUNTERS] = {0}; - ret[0] = getDAC(M_VTH1, mV); - ret[1] = getDAC(M_VTH2, mV); - ret[2] = getDAC(M_VTH3, mV); - - if ((ret[0] == ret[1]) && (ret[1] == ret[2])) { - LOG(logINFO, ("\tvthreshold match\n")); - return ret[0]; - } else { - LOG(logERROR, ("\tvthreshold mismatch vth1:%d vth2:%d " - "vth3:%d\n", - ret[0], ret[1], ret[2])); - return -1; + int ret = -1, ret1 = -1; + // get only for enabled counters + uint32_t counters = getCounterMask(); + int vthdacs[] = {M_VTH1, M_VTH2, M_VTH3}; + for (int i = 0; i < NCOUNTERS; ++i) { + if (counters & (1 << i)) { + ret1 = getDAC(vthdacs[i], mV); + // first enabled counter + if (ret == -1) { + ret = ret1; + } + // different values for enabled counters + else if (ret1 != ret) { + return -1; + } + } } + if (ret == -1) { + LOG(logERROR, ("\tvthreshold mismatch (of enabled counters)\n")); + } else { + LOG(logINFO, ("\tvthreshold match %d\n", ret)); + } + return ret; } if (!mV) { @@ -1373,13 +1393,14 @@ int setHighVoltage(int val) { return highvoltage; } -int isMaster(){ - return !(bus_r(0x18) >> 31); +int isMaster() { + return !((bus_r(SYSTEM_STATUS_REG) & SYSTEM_STATUS_SLV_BRD_DTCT_MSK) >> + SYSTEM_STATUS_SLV_BRD_DTCT_OFST); } /* parameters - timing */ void setTiming(enum timingMode arg) { - + if (!isMaster() && arg == AUTO_TIMING) arg = TRIGGER_EXPOSURE; @@ -2643,7 +2664,7 @@ int setChipStatusRegister(int csr) { pat = setChipStatusRegisterPattern(csr); if (pat) { - error |= loadPattern(pat); + error |= loadPattern(logDEBUG5, pat); if (!error) startPattern(); free(pat); @@ -2663,7 +2684,7 @@ int setChipStatusRegister(int csr) { return OK; } -int setGainCaps(int caps){ +int setGainCaps(int caps) { // Update only gain caps, leave the rest of the CSR unchanged int csr = getChipStatusRegister(); csr &= ~GAIN_MASK; @@ -2674,8 +2695,8 @@ int setGainCaps(int caps){ return setChipStatusRegister(csr); } -int getGainCaps(){ +int getGainCaps() { int csr = getChipStatusRegister(); int caps = csrToGainCaps(csr); - return caps; + return caps; } diff --git a/slsDetectorServers/slsDetectorServer/include/loadPattern.h b/slsDetectorServers/slsDetectorServer/include/loadPattern.h index 261c0f148..aa81d9a49 100644 --- a/slsDetectorServers/slsDetectorServer/include/loadPattern.h +++ b/slsDetectorServers/slsDetectorServer/include/loadPattern.h @@ -1,6 +1,7 @@ #ifndef LOADPATTERN_H #define LOADPATTERN_H #include "Pattern.h" +#include "clogger.h" -int loadPattern(patternParameters *pat); +int loadPattern(enum TLogLevel printLevel, patternParameters *pat); #endif diff --git a/slsDetectorServers/slsDetectorServer/include/slsDetectorFunctionList.h b/slsDetectorServers/slsDetectorServer/include/slsDetectorFunctionList.h index e1670ea48..e7ea0db93 100644 --- a/slsDetectorServers/slsDetectorServer/include/slsDetectorFunctionList.h +++ b/slsDetectorServers/slsDetectorServer/include/slsDetectorFunctionList.h @@ -25,7 +25,7 @@ #include "blackfin.h" #endif -#if defined(MYTHEN3D) +#ifdef MYTHEN3D #include "mythen3.h" #endif @@ -289,8 +289,6 @@ int64_t getMeasurementTime(); int setModule(sls_detector_module myMod, char *mess); #endif #ifdef MYTHEN3D -int setBit(int ibit, int patword); -int clearBit(int ibit, int patword); int setTrimbits(int *trimbits); int setAllTrimbits(int val); int getAllTrimbits(); @@ -319,6 +317,9 @@ int setOnChipDAC(enum ONCHIP_DACINDEX ind, int chipIndex, int val); int getOnChipDAC(enum ONCHIP_DACINDEX ind, int chipIndex); #endif void setDAC(enum DACINDEX ind, int val, int mV); +#ifdef MYTHEN3D +void setGeneralDAC(enum DACINDEX ind, int val, int mV); +#endif int getDAC(enum DACINDEX ind, int mV); int getMaxDacSteps(); #if defined(CHIPTESTBOARDD) || defined(MOENCHD) diff --git a/slsDetectorServers/slsDetectorServer/src/loadPattern.c b/slsDetectorServers/slsDetectorServer/src/loadPattern.c index 77de0e686..f26a92570 100644 --- a/slsDetectorServers/slsDetectorServer/src/loadPattern.c +++ b/slsDetectorServers/slsDetectorServer/src/loadPattern.c @@ -1,7 +1,7 @@ -#include "readDefaultPattern.h" #include "loadPattern.h" #include "clogger.h" #include "common.h" +#include "readDefaultPattern.h" #include "sls/ansi.h" #include "sls/sls_detector_defs.h" #include "slsDetectorServer_defs.h" @@ -14,6 +14,7 @@ #include extern char initErrorMessage[MAX_STR_LENGTH]; +extern enum TLogLevel trimmingPrint; #ifndef MYTHEN3D extern uint64_t writePatternIOControl(uint64_t word); @@ -24,82 +25,83 @@ extern uint64_t setPatternWaitTime(int level, uint64_t t); extern void setPatternLoop(int level, int *startAddr, int *stopAddr, int *nLoop); -int loadPattern(patternParameters *pat) { +int loadPattern(enum TLogLevel printLevel, patternParameters *pat) { + LOG(logINFOBLUE, ("Loading Pattern\n")); + int ret = OK; + trimmingPrint = printLevel; - int ret=OK; - - for (int i = 0; i < MAX_PATTERN_LENGTH; ++i) { - if ((i % 10 == 0) && pat->word[i] != 0) { - LOG(logINFO, ("Setting Pattern Word (addr:0x%x, word:0x%llx)\n", - i, (long long int)pat->word[i])); - } - writePatternWord(i, pat->word[i]); - } -#ifndef MYTHEN3D - if (ret == OK) { - uint64_t retval64 = writePatternIOControl(pat->ioctrl); - //validate64(pat->ioctrl, retval64, "set pattern IO Control", HEX); - } -#endif - if (ret == OK) { - int numLoops = -1; - int retval0 = pat->limits[0]; - int retval1 = pat->limits[1]; - setPatternLoop(-1, &retval0, &retval1, &numLoops); - //validate(pat->limits[0], retval0, - // "set pattern Limits start address", HEX); - //validate(pat->limits[1], retval1, - // "set pattern Limits start address", HEX); + for (int i = 0; i < MAX_PATTERN_LENGTH; ++i) { + if ((i % 10 == 0) && pat->word[i] != 0) { + LOG(logDEBUG5, ("Setting Pattern Word (addr:0x%x, word:0x%llx)\n", + i, (long long int)pat->word[i])); } - uint64_t retval64; - if (ret == OK) { - for (int i = 0; i <= 2; ++i) { - char msg[128]; - int retval0 = -1, retval1 = -1, numLoops = -1; + writePatternWord(i, pat->word[i]); + } +#ifndef MYTHEN3D + if (ret == OK) { + uint64_t retval64 = writePatternIOControl(pat->ioctrl); + // validate64(pat->ioctrl, retval64, "set pattern IO Control", HEX); + } +#endif + if (ret == OK) { + int numLoops = -1; + int retval0 = pat->limits[0]; + int retval1 = pat->limits[1]; + setPatternLoop(-1, &retval0, &retval1, &numLoops); + // validate(pat->limits[0], retval0, + // "set pattern Limits start address", HEX); + // validate(pat->limits[1], retval1, + // "set pattern Limits start address", HEX); + } + uint64_t retval64; + if (ret == OK) { + for (int i = 0; i <= 2; ++i) { + char msg[128]; + int retval0 = -1, retval1 = -1, numLoops = -1; - // patloop - retval0 = pat->loop[i * 2 + 0]; - retval1 = pat->loop[i * 2 + 1]; - numLoops = pat->nloop[i]; - setPatternLoop(i, &retval0, &retval1, &numLoops); - memset(msg, 0, sizeof(msg)); - sprintf(msg, "set pattern Loop %d start address", i); - //validate(pat->loop[i * 2 + 0], retval0, msg, HEX); - if (ret == FAIL) { - break; - } - memset(msg, 0, sizeof(msg)); - sprintf(msg, "set pattern Loop %d stop address", i); - //validate(pat->loop[i * 2 + 1], retval1, msg, HEX); - if (ret == FAIL) { - break; - } - memset(msg, 0, sizeof(msg)); - sprintf(msg, "set pattern Loop %d num loops", i); - //validate(pat->nloop[i], numLoops, msg, HEX); - if (ret == FAIL) { - break; - } - // patwait - memset(msg, 0, sizeof(msg)); - sprintf(msg, "set pattern Loop %d wait address", i); - retval0 = setPatternWaitAddress(i, pat->wait[i]); - //validate(pat->wait[i], retval0, msg, HEX); - if (ret == FAIL) { - break; - } + // patloop + retval0 = pat->loop[i * 2 + 0]; + retval1 = pat->loop[i * 2 + 1]; + numLoops = pat->nloop[i]; + setPatternLoop(i, &retval0, &retval1, &numLoops); + memset(msg, 0, sizeof(msg)); + sprintf(msg, "set pattern Loop %d start address", i); + // validate(pat->loop[i * 2 + 0], retval0, msg, HEX); + if (ret == FAIL) { + break; + } + memset(msg, 0, sizeof(msg)); + sprintf(msg, "set pattern Loop %d stop address", i); + // validate(pat->loop[i * 2 + 1], retval1, msg, HEX); + if (ret == FAIL) { + break; + } + memset(msg, 0, sizeof(msg)); + sprintf(msg, "set pattern Loop %d num loops", i); + // validate(pat->nloop[i], numLoops, msg, HEX); + if (ret == FAIL) { + break; + } + // patwait + memset(msg, 0, sizeof(msg)); + sprintf(msg, "set pattern Loop %d wait address", i); + retval0 = setPatternWaitAddress(i, pat->wait[i]); + // validate(pat->wait[i], retval0, msg, HEX); + if (ret == FAIL) { + break; + } - // patwaittime - memset(msg, 0, sizeof(msg)); - sprintf(msg, "set pattern Loop %d wait time", i); - retval64 = setPatternWaitTime(i, pat->waittime[i]); - //validate64(pat->waittime[i], retval64, msg, HEX); - if (retval64 == FAIL) { - break; - } - } - } - return ret; + // patwaittime + memset(msg, 0, sizeof(msg)); + sprintf(msg, "set pattern Loop %d wait time", i); + retval64 = setPatternWaitTime(i, pat->waittime[i]); + // validate64(pat->waittime[i], retval64, msg, HEX); + if (retval64 == FAIL) { + break; + } + } + } + trimmingPrint = logINFO; + + return ret; } - - diff --git a/slsDetectorServers/slsDetectorServer/src/slsDetectorServer_funcs.c b/slsDetectorServers/slsDetectorServer/src/slsDetectorServer_funcs.c index 64e62f3bd..1fb9f6763 100644 --- a/slsDetectorServers/slsDetectorServer/src/slsDetectorServer_funcs.c +++ b/slsDetectorServers/slsDetectorServer/src/slsDetectorServer_funcs.c @@ -1238,8 +1238,8 @@ int validateAndSetDac(enum dacIndex ind, int val, int mV) { ret = OK; } else { ret = FAIL; - sprintf(mess, "Setting dac %d : wrote %d but read %d\n", - serverDacIndex, val, retval); + sprintf(mess, "Setting dac %d : wrote %d but read %d\n", + serverDacIndex, val, retval); LOG(logERROR, (mess)); } } diff --git a/slsDetectorSoftware/include/sls/Detector.h b/slsDetectorSoftware/include/sls/Detector.h index 1d08dde69..8004065db 100644 --- a/slsDetectorSoftware/include/sls/Detector.h +++ b/slsDetectorSoftware/include/sls/Detector.h @@ -1275,7 +1275,9 @@ class Detector { /** [Mythen3] */ Result getCounterMask(Positions pos = {}) const; - /** [Mythen3] countermask bit set for each counter index enabled */ + /** [Mythen3] countermask bit set for each counter index enabled. Enabling + * counters sets vth dacs to remembered values and disabling sets them to + * disabled values. Setting vth dacs explicitly overwrites them. */ void setCounterMask(uint32_t countermask, Positions pos = {}); Result getNumberOfGates(Positions pos = {}) const; diff --git a/slsDetectorSoftware/src/CmdProxy.cpp b/slsDetectorSoftware/src/CmdProxy.cpp index a23052b00..bd7fdce80 100644 --- a/slsDetectorSoftware/src/CmdProxy.cpp +++ b/slsDetectorSoftware/src/CmdProxy.cpp @@ -1902,7 +1902,8 @@ std::string CmdProxy::Counters(int action) { if (action == defs::HELP_ACTION) { os << "[i0] [i1] [i2]... \n\t[Mythen3] List of counters indices " "enabled. Each element in list can be 0 - 2 and must be non " - "repetitive." + "repetitive. Enabling counters sets vth dacs to remembered " + "values and disabling sets them to disabled values." << '\n'; } else if (action == defs::GET_ACTION) { if (!args.empty()) { diff --git a/slsDetectorSoftware/src/HelpDacs.h b/slsDetectorSoftware/src/HelpDacs.h index 71f2f9c4d..93d2af134 100644 --- a/slsDetectorSoftware/src/HelpDacs.h +++ b/slsDetectorSoftware/src/HelpDacs.h @@ -10,7 +10,8 @@ std::string GetHelpDac(std::string dac) { "[dac or mV value][(optional unit) mV] \n\t[Eiger][Mythen3] " "Detector threshold voltage for single photon counters.\n\t[Eiger] " "Sets vcmp_ll, vcmp_lr, vcmp_rl, vcmp_rr and vcp to the same " - "value. \n\t[Mythen3] Sets vth1, vth2 and vth3 to the same value."); + "value. \n\t[Mythen3] Sets vth1, vth2 and vth3 to the same value " + "for enabled counters."); } if (dac == "vsvp") { return std::string( @@ -134,17 +135,18 @@ std::string GetHelpDac(std::string dac) { if (dac == "vth1") { return std::string( "[dac or mV value][(optional unit) mV] \n\t[Mythen3] Dac for first " - "detector threshold voltage."); + "detector threshold voltage. Overwrites even if counter disabled."); } if (dac == "vth2") { return std::string( "[dac or mV value][(optional unit) mV] \n\t[Mythen3] Dac for " - "second detector threshold voltage."); + "second detector threshold voltage. Overwrites even if counter " + "disabled."); } if (dac == "vth3") { return std::string( "[dac or mV value][(optional unit) mV] \n\t[Mythen3] Dac for third " - "detector threshold voltage."); + "detector threshold voltage. Overwrites even if counter disabled."); } if (dac == "vcal_n") { return std::string( diff --git a/slsDetectorSoftware/tests/test-CmdProxy-chiptestboard.cpp b/slsDetectorSoftware/tests/test-CmdProxy-chiptestboard.cpp index 3c2ccfe97..be2df1248 100644 --- a/slsDetectorSoftware/tests/test-CmdProxy-chiptestboard.cpp +++ b/slsDetectorSoftware/tests/test-CmdProxy-chiptestboard.cpp @@ -30,73 +30,73 @@ TEST_CASE("dac", "[.cmd][.dacs]") { } } // eiger - // REQUIRE_THROWS(proxy.Call("vthreshold", {}, -1, GET)); - // REQUIRE_THROWS(proxy.Call("vsvp", {}, -1, GET)); - // REQUIRE_THROWS(proxy.Call("vsvn", {}, -1, GET)); - // REQUIRE_THROWS(proxy.Call("vtrim", {}, -1, GET)); - // REQUIRE_THROWS(proxy.Call("vrpreamp", {}, -1, GET)); - // REQUIRE_THROWS(proxy.Call("vrshaper", {}, -1, GET)); - // REQUIRE_THROWS(proxy.Call("vtgstv", {}, -1, GET)); - // REQUIRE_THROWS(proxy.Call("vcmp_ll", {}, -1, GET)); - // REQUIRE_THROWS(proxy.Call("vcmp_lr", {}, -1, GET)); - // REQUIRE_THROWS(proxy.Call("vcal", {}, -1, GET)); - // REQUIRE_THROWS(proxy.Call("vcmp_rl", {}, -1, GET)); - // REQUIRE_THROWS(proxy.Call("vcmp_rr", {}, -1, GET)); - // REQUIRE_THROWS(proxy.Call("rxb_rb", {}, -1, GET)); - // REQUIRE_THROWS(proxy.Call("rxb_lb", {}, -1, GET)); - // REQUIRE_THROWS(proxy.Call("vcp", {}, -1, GET)); - // REQUIRE_THROWS(proxy.Call("vcn", {}, -1, GET)); - // REQUIRE_THROWS(proxy.Call("vishaper", {}, -1, GET)); - // REQUIRE_THROWS(proxy.Call("iodelay", {}, -1, GET)); + // REQUIRE_THROWS(proxy.Call("dac", {"vthreshold"}, -1, GET)); + // REQUIRE_THROWS(proxy.Call("dac", {"vsvp"}, -1, GET)); + // REQUIRE_THROWS(proxy.Call("dac", {"vsvn"}, -1, GET)); + // REQUIRE_THROWS(proxy.Call("dac", {"vtrim"}, -1, GET)); + // REQUIRE_THROWS(proxy.Call("dac", {"vrpreamp"}, -1, GET)); + // REQUIRE_THROWS(proxy.Call("dac", {"vrshaper"}, -1, GET)); + // REQUIRE_THROWS(proxy.Call("dac", {"vtgstv"}, -1, GET)); + // REQUIRE_THROWS(proxy.Call("dac", {"vcmp_ll"}, -1, GET)); + // REQUIRE_THROWS(proxy.Call("dac", {"vcmp_lr"}, -1, GET)); + // REQUIRE_THROWS(proxy.Call("dac", {"vcal"}, -1, GET)); + // REQUIRE_THROWS(proxy.Call("dac", {"vcmp_rl"}, -1, GET)); + // REQUIRE_THROWS(proxy.Call("dac", {"vcmp_rr"}, -1, GET)); + // REQUIRE_THROWS(proxy.Call("dac", {"rxb_rb"}, -1, GET)); + // REQUIRE_THROWS(proxy.Call("dac", {"rxb_lb"}, -1, GET)); + // REQUIRE_THROWS(proxy.Call("dac", {"vcp"}, -1, GET)); + // REQUIRE_THROWS(proxy.Call("dac", {"vcn"}, -1, GET)); + // REQUIRE_THROWS(proxy.Call("dac", {"vishaper"}, -1, GET)); + // REQUIRE_THROWS(proxy.Call("dac", {"iodelay"}, -1, GET)); // jungfrau - REQUIRE_THROWS(proxy.Call("vb_comp", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vdd_prot", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vin_com", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vref_prech", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vb_pixbuf", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vb_ds", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vref_ds", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vref_comp", {}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vb_comp"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vdd_prot"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vin_com"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vref_prech"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vb_pixbuf"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vb_ds"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vref_ds"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vref_comp"}, -1, GET)); // gotthard - REQUIRE_THROWS(proxy.Call("vref_ds", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vcascn_pb", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vcascp_pb", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vout_cm", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vcasc_out", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vin_cm", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vref_comp", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("ib_test_c", {}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vref_ds"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vcascn_pb"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vcascp_pb"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vout_cm"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vcasc_out"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vin_cm"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vref_comp"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"ib_test_c"}, -1, GET)); // mythen3 - REQUIRE_THROWS(proxy.Call("vrpreamp", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vrshaper", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vrshaper_n", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vipre", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vishaper", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vdcsh", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vth1", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vth2", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vth3", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vcal_n", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vcal_p", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vtrim", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vcassh", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vcas", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vicin", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vipre_out", {}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vrpreamp"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vrshaper"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vrshaper_n"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vipre"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vishaper"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vdcsh"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vth1"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vth2"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vth3"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vcal_n"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vcal_p"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vtrim"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vcassh"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vcas"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vicin"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vipre_out"}, -1, GET)); // gotthard2 - REQUIRE_THROWS(proxy.Call("vref_h_adc", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vb_comp_fe", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vb_comp_adc", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vcom_cds", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vref_rstore", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vb_opa_1st", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vref_comp_fe", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vcom_adc1", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vref_l_adc", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vref_cds", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vb_cs", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vb_opa_fd", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vcom_adc2", {}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vref_h_adc"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vb_comp_fe"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vb_comp_adc"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vcom_cds"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vref_rstore"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vb_opa_1st"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vref_comp_fe"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vcom_adc1"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vref_l_adc"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vref_cds"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vb_cs"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vb_opa_fd"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vcom_adc2"}, -1, GET)); } } diff --git a/slsDetectorSoftware/tests/test-CmdProxy-global.cpp b/slsDetectorSoftware/tests/test-CmdProxy-global.cpp index 3e149ef78..64289f722 100644 --- a/slsDetectorSoftware/tests/test-CmdProxy-global.cpp +++ b/slsDetectorSoftware/tests/test-CmdProxy-global.cpp @@ -27,9 +27,9 @@ void test_dac(defs::dacIndex index, const std::string &dacname, int dacvalue) { } // other detectors else { - proxy.Call(dacname, {dacstr}, -1, PUT, oss_set); + proxy.Call("dac", {dacname, dacstr}, -1, PUT, oss_set); REQUIRE(oss_set.str() == "dac " + dacname + " " + dacstr + "\n"); - proxy.Call(dacname, {}, -1, GET, oss_get); + proxy.Call("dac", {dacname}, -1, GET, oss_get); REQUIRE(oss_get.str() == "dac " + dacname + " " + dacstr + "\n"); } // Reset all dacs to previous value diff --git a/slsDetectorSoftware/tests/test-CmdProxy-gotthard.cpp b/slsDetectorSoftware/tests/test-CmdProxy-gotthard.cpp index 38f5559bc..84c084766 100644 --- a/slsDetectorSoftware/tests/test-CmdProxy-gotthard.cpp +++ b/slsDetectorSoftware/tests/test-CmdProxy-gotthard.cpp @@ -34,64 +34,64 @@ TEST_CASE("Setting and reading back GOTTHARD dacs", "[.cmd][.dacs]") { SECTION("vref_comp") { test_dac(defs::VREF_COMP, "vref_comp", 350); } SECTION("ib_test_c") { test_dac(defs::IB_TESTC, "ib_test_c", 2001); } // eiger - REQUIRE_THROWS(proxy.Call("vthreshold", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vsvp", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vsvn", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vtrim", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vrpreamp", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vrshaper", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vtgstv", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vcmp_ll", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vcmp_lr", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vcal", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vcmp_rl", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vcmp_rr", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("rxb_rb", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("rxb_lb", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vcp", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vcn", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vishaper", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("iodelay", {}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vthreshold"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vsvp"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vsvn"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vtrim"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vrpreamp"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vrshaper"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vtgstv"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vcmp_ll"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vcmp_lr"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vcal"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vcmp_rl"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vcmp_rr"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"rxb_rb"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"rxb_lb"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vcp"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vcn"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vishaper"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"iodelay"}, -1, GET)); // jungfrau - REQUIRE_THROWS(proxy.Call("vb_comp", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vdd_prot", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vin_com", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vref_prech", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vb_pixbuf", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vb_ds", {}, -1, GET)); - // REQUIRE_THROWS(proxy.Call("vref_ds", {}, -1, GET)); - // REQUIRE_THROWS(proxy.Call("vref_comp", {}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vb_comp"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vdd_prot"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vin_com"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vref_prech"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vb_pixbuf"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vb_ds"}, -1, GET)); + // REQUIRE_THROWS(proxy.Call("dac", {"vref_ds"}, -1, GET)); + // REQUIRE_THROWS(proxy.Call("dac", {"vref_comp"}, -1, GET)); // mythen3 - REQUIRE_THROWS(proxy.Call("vrpreamp", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vrshaper", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vrshaper_n", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vipre", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vishaper", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vdcsh", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vth1", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vth2", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vth3", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vcal_n", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vcal_p", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vtrim", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vcassh", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vcas", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vicin", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vipre_out", {}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vrpreamp"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vrshaper"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vrshaper_n"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vipre"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vishaper"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vdcsh"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vth1"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vth2"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vth3"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vcal_n"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vcal_p"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vtrim"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vcassh"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vcas"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vicin"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vipre_out"}, -1, GET)); // gotthard2 - REQUIRE_THROWS(proxy.Call("vref_h_adc", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vb_comp_fe", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vb_comp_adc", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vcom_cds", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vref_rstore", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vb_opa_1st", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vref_comp_fe", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vcom_adc1", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vref_l_adc", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vref_cds", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vb_cs", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vb_opa_fd", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vcom_adc2", {}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vref_h_adc"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vb_comp_fe"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vb_comp_adc"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vcom_cds"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vref_rstore"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vb_opa_1st"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vref_comp_fe"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vcom_adc1"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vref_l_adc"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vref_cds"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vb_cs"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vb_opa_fd"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vcom_adc2"}, -1, GET)); } } diff --git a/slsDetectorSoftware/tests/test-CmdProxy-gotthard2.cpp b/slsDetectorSoftware/tests/test-CmdProxy-gotthard2.cpp index 53cc11120..7ac251826 100644 --- a/slsDetectorSoftware/tests/test-CmdProxy-gotthard2.cpp +++ b/slsDetectorSoftware/tests/test-CmdProxy-gotthard2.cpp @@ -52,59 +52,59 @@ TEST_CASE("Setting and reading back GOTTHARD2 dacs", "[.cmd][.dacs]") { SECTION("vb_opa_fd") { test_dac(defs::VB_OPA_FD, "vb_opa_fd", 0); } SECTION("vcom_adc2") { test_dac(defs::VCOM_ADC2, "vcom_adc2", 1400); } // eiger - REQUIRE_THROWS(proxy.Call("vthreshold", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vsvp", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vsvn", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vtrim", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vrpreamp", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vrshaper", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vtgstv", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vcmp_ll", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vcmp_lr", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vcal", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vcmp_rl", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vcmp_rr", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("rxb_rb", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("rxb_lb", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vcp", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vcn", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vishaper", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("iodelay", {}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vthreshold"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vsvp"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vsvn"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vtrim"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vrpreamp"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vrshaper"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vtgstv"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vcmp_ll"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vcmp_lr"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vcal"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vcmp_rl"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vcmp_rr"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"rxb_rb"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"rxb_lb"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vcp"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vcn"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vishaper"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"iodelay"}, -1, GET)); // gotthard - REQUIRE_THROWS(proxy.Call("vref_ds", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vcascn_pb", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vcascp_pb", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vout_cm", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vcasc_out", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vin_cm", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vref_comp", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("ib_test_c", {}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vref_ds"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vcascn_pb"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vcascp_pb"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vout_cm"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vcasc_out"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vin_cm"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vref_comp"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"ib_test_c"}, -1, GET)); // jungfrau - REQUIRE_THROWS(proxy.Call("vb_comp", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vdd_prot", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vin_com", {}, -1, GET)); - // REQUIRE_THROWS(proxy.Call("vref_prech", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vb_pixbuf", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vb_ds", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vref_ds", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vref_comp", {}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vb_comp"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vdd_prot"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vin_com"}, -1, GET)); + // REQUIRE_THROWS(proxy.Call("dac", {"vref_prech"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vb_pixbuf"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vb_ds"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vref_ds"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vref_comp"}, -1, GET)); // mythen3 - REQUIRE_THROWS(proxy.Call("vrpreamp", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vrshaper", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vrshaper_n", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vipre", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vishaper", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vdcsh", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vth1", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vth2", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vth3", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vcal_n", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vcal_p", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vtrim", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vcassh", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vcas", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vicin", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vipre_out", {}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vrpreamp"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vrshaper"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vrshaper_n"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vipre"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vishaper"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vdcsh"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vth1"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vth2"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vth3"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vcal_n"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vcal_p"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vtrim"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vcassh"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vcas"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vicin"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vipre_out"}, -1, GET)); } } diff --git a/slsDetectorSoftware/tests/test-CmdProxy-moench.cpp b/slsDetectorSoftware/tests/test-CmdProxy-moench.cpp index 0b307c8a3..f8431f7a9 100644 --- a/slsDetectorSoftware/tests/test-CmdProxy-moench.cpp +++ b/slsDetectorSoftware/tests/test-CmdProxy-moench.cpp @@ -37,72 +37,72 @@ TEST_CASE("Setting and reading back MOENCH dacs", "[.cmd][.dacs]") { SECTION("ibias_sfp") { test_dac(defs::IBIAS_SFP, "ibias_sfp", 900); } // eiger - REQUIRE_THROWS(proxy.Call("vthreshold", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vsvp", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vsvn", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vtrim", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vrpreamp", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vrshaper", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vtgstv", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vcmp_ll", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vcmp_lr", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vcal", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vcmp_rl", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vcmp_rr", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("rxb_rb", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("rxb_lb", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vcp", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vcn", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vishaper", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("iodelay", {}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vthreshold"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vsvp"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vsvn"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vtrim"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vrpreamp"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vrshaper"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vtgstv"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vcmp_ll"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vcmp_lr"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vcal"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vcmp_rl"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vcmp_rr"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"rxb_rb"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"rxb_lb"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vcp"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vcn"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vishaper"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"iodelay"}, -1, GET)); // jungfrau - REQUIRE_THROWS(proxy.Call("vb_comp", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vdd_prot", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vin_com", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vref_prech", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vb_pixbuf", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vb_ds", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vref_ds", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vref_comp", {}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vb_comp"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vdd_prot"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vin_com"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vref_prech"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vb_pixbuf"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vb_ds"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vref_ds"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vref_comp"}, -1, GET)); // gotthard - REQUIRE_THROWS(proxy.Call("vref_ds", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vcascn_pb", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vcascp_pb", {}, -1, GET)); - // REQUIRE_THROWS(proxy.Call("vout_cm", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vcasc_out", {}, -1, GET)); - // REQUIRE_THROWS(proxy.Call("vin_cm", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vref_comp", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("ib_test_c", {}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vref_ds"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vcascn_pb"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vcascp_pb"}, -1, GET)); + // REQUIRE_THROWS(proxy.Call("dac", {"vout_cm"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vcasc_out"}, -1, GET)); + // REQUIRE_THROWS(proxy.Call("dac", {"vin_cm"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vref_comp"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"ib_test_c"}, -1, GET)); // mythen3 - REQUIRE_THROWS(proxy.Call("vrpreamp", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vrshaper", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vrshaper_n", {}, -1, GET)); - // REQUIRE_THROWS(proxy.Call("vipre", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vishaper", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vdcsh", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vth1", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vth2", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vth3", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vcal_n", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vcal_p", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vtrim", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vcassh", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vcas", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vicin", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vipre_out", {}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vrpreamp"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vrshaper"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vrshaper_n"}, -1, GET)); + // REQUIRE_THROWS(proxy.Call("dac", {"vipre"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vishaper"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vdcsh"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vth1"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vth2"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vth3"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vcal_n"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vcal_p"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vtrim"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vcassh"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vcas"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vicin"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vipre_out"}, -1, GET)); // gotthard2 - REQUIRE_THROWS(proxy.Call("vref_h_adc", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vb_comp_fe", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vb_comp_adc", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vcom_cds", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vref_rstore", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vb_opa_1st", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vref_comp_fe", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vcom_adc1", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vref_l_adc", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vref_cds", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vb_cs", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vb_opa_fd", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vcom_adc2", {}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vref_h_adc"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vb_comp_fe"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vb_comp_adc"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vcom_cds"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vref_rstore"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vb_opa_1st"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vref_comp_fe"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vcom_adc1"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vref_l_adc"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vref_cds"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vb_cs"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vb_opa_fd"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vcom_adc2"}, -1, GET)); } } diff --git a/slsDetectorSoftware/tests/test-CmdProxy-mythen3.cpp b/slsDetectorSoftware/tests/test-CmdProxy-mythen3.cpp index c9d853836..e6d0b63bc 100644 --- a/slsDetectorSoftware/tests/test-CmdProxy-mythen3.cpp +++ b/slsDetectorSoftware/tests/test-CmdProxy-mythen3.cpp @@ -49,69 +49,125 @@ TEST_CASE("Setting and reading back MYTHEN3 dacs", "[.cmd][.dacs]") { auto vth1 = det.getDAC(defs::VTH1, false); auto vth2 = det.getDAC(defs::VTH2, false); auto vth3 = det.getDAC(defs::VTH3, false); + auto mask = det.getCounterMask(); { std::ostringstream oss; - proxy.Call("vthreshold", {"1234"}, -1, PUT, oss); + proxy.Call("dac", {"vthreshold", "1234"}, -1, PUT, oss); REQUIRE(oss.str() == "dac vthreshold 1234\n"); } { std::ostringstream oss; - proxy.Call("vthreshold", {}, -1, GET, oss); + proxy.Call("dac", {"vthreshold"}, -1, GET, oss); REQUIRE(oss.str() == "dac vthreshold 1234\n"); } + // disabling counters change vth values + proxy.Call("counters", {"0"}, -1, PUT); + { + std::ostringstream oss1, oss2, oss3; + proxy.Call("dac", {"vth1"}, -1, GET, oss1); + REQUIRE(oss1.str() == "dac vth1 1234\n"); + proxy.Call("dac", {"vth2"}, -1, GET, oss2); + REQUIRE(oss2.str() == "dac vth2 2800\n"); + proxy.Call("dac", {"vth3"}, -1, GET, oss3); + REQUIRE(oss3.str() == "dac vth3 2800\n"); + } + // vthreshold changes vth for only enabled counters + REQUIRE_NOTHROW(proxy.Call("dac", {"vthreshold", "2100"}, -1, PUT)); + { + std::ostringstream oss; + proxy.Call("dac", {"vthreshold"}, -1, GET, oss); + REQUIRE(oss.str() == "dac vthreshold 2100\n"); + std::ostringstream oss1, oss2, oss3; + proxy.Call("dac", {"vth1"}, -1, GET, oss1); + REQUIRE(oss1.str() == "dac vth1 2100\n"); + proxy.Call("dac", {"vth2"}, -1, GET, oss2); + REQUIRE(oss2.str() == "dac vth2 2800\n"); + proxy.Call("dac", {"vth3"}, -1, GET, oss3); + REQUIRE(oss3.str() == "dac vth3 2800\n"); + } + // vth overwrite vth even if counter disabled + { + std::ostringstream oss; + proxy.Call("dac", {"vth2", "2200"}, -1, PUT); + proxy.Call("dac", {"vth2"}, -1, GET, oss); + REQUIRE(oss.str() == "dac vth2 2200\n"); + } + // counters enabled, sets remembered values + proxy.Call("counters", {"0", "1", "2"}, -1, PUT); + { + std::ostringstream oss1, oss2, oss3; + proxy.Call("dac", {"vth1"}, -1, GET, oss1); + REQUIRE(oss1.str() == "dac vth1 2100\n"); + proxy.Call("dac", {"vth2"}, -1, GET, oss2); + REQUIRE(oss2.str() == "dac vth2 2200\n"); + proxy.Call("dac", {"vth3"}, -1, GET, oss3); + REQUIRE(oss3.str() == "dac vth3 2100\n"); + } + // counters enabled, sets remembered values + proxy.Call("counters", {"0", "1"}, -1, PUT); + { + std::ostringstream oss1, oss2, oss3; + proxy.Call("dac", {"vth1"}, -1, GET, oss1); + REQUIRE(oss1.str() == "dac vth1 2100\n"); + proxy.Call("dac", {"vth2"}, -1, GET, oss2); + REQUIRE(oss2.str() == "dac vth2 2200\n"); + proxy.Call("dac", {"vth3"}, -1, GET, oss3); + REQUIRE(oss3.str() == "dac vth3 2800\n"); + } // Reset dacs after test for (int i = 0; i != det.size(); ++i) { + det.setCounterMask(mask[i], {i}); det.setDAC(defs::VTH1, vth1[i], false, {i}); det.setDAC(defs::VTH2, vth2[i], false, {i}); det.setDAC(defs::VTH3, vth3[i], false, {i}); } } - REQUIRE_THROWS(proxy.Call("vsvp", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vsvn", {}, -1, GET)); - // REQUIRE_THROWS(proxy.Call("vtrim", {}, -1, GET)); - // REQUIRE_THROWS(proxy.Call("vrpreamp", {}, -1, GET)); - // REQUIRE_THROWS(proxy.Call("vrshaper", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vtgstv", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vcmp_ll", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vcmp_lr", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vcal", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vcmp_rl", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vcmp_rr", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("rxb_rb", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("rxb_lb", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vcp", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vcn", {}, -1, GET)); - // REQUIRE_THROWS(proxy.Call("vishaper", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("iodelay", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vref_ds", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vcascn_pb", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vcascp_pb", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vout_cm", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vcasc_out", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vin_cm", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vref_comp", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("ib_test_c", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vref_h_adc", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vb_comp_fe", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vb_comp_adc", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vcom_cds", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vref_rstore", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vb_opa_1st", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vref_comp_fe", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vcom_adc1", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vref_prech", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vref_l_adc", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vref_cds", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vb_cs", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vb_opa_fd", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vcom_adc2", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vb_ds", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vb_comp", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vb_pixbuf", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vin_com", {}, -1, GET)); - REQUIRE_THROWS(proxy.Call("vdd_prot", {}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vsvp"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vsvn"}, -1, GET)); + // REQUIRE_THROWS(proxy.Call("dac", {"vtrim"}, -1, GET)); + // REQUIRE_THROWS(proxy.Call("dac", {"vrpreamp"}, -1, GET)); + // REQUIRE_THROWS(proxy.Call("dac", {"vrshaper"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vtgstv"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vcmp_ll"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vcmp_lr"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vcal"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vcmp_rl"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vcmp_rr"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"rxb_rb"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"rxb_lb"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vcp"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vcn"}, -1, GET)); + // REQUIRE_THROWS(proxy.Call("dac", {"vishaper"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"iodelay"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vref_ds"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vcascn_pb"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vcascp_pb"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vout_cm"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vcasc_out"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vin_cm"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vref_comp"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"ib_test_c"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vref_h_adc"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vb_comp_fe"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vb_comp_adc"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vcom_cds"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vref_rstore"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vb_opa_1st"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vref_comp_fe"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vcom_adc1"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vref_prech"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vref_l_adc"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vref_cds"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vb_cs"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vb_opa_fd"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vcom_adc2"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vb_ds"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vb_comp"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vb_pixbuf"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vin_com"}, -1, GET)); + REQUIRE_THROWS(proxy.Call("dac", {"vdd_prot"}, -1, GET)); } } diff --git a/slsSupportLib/include/sls/versionAPI.h b/slsSupportLib/include/sls/versionAPI.h index b601a1ee4..9e19cb524 100644 --- a/slsSupportLib/include/sls/versionAPI.h +++ b/slsSupportLib/include/sls/versionAPI.h @@ -1,12 +1,12 @@ /** API versions */ #define GITBRANCH "developer" -#define APICTB 0x210225 -#define APIGOTTHARD 0x210225 +#define APICTB 0x210225 +#define APIGOTTHARD 0x210225 #define APIGOTTHARD2 0x210225 -#define APIJUNGFRAU 0x210225 -#define APIMOENCH 0x210225 -#define APIMYTHEN3 0x210225 -#define APILIB 0x210225 -#define APIRECEIVER 0x210225 -#define APIGUI 0x210225 -#define APIEIGER 0x210607 +#define APIJUNGFRAU 0x210225 +#define APIMOENCH 0x210225 +#define APIMYTHEN3 0x210608 +#define APILIB 0x210225 +#define APIRECEIVER 0x210225 +#define APIGUI 0x210225 +#define APIEIGER 0x210607