diff --git a/slsDetectorSoftware/eigerDetectorServer/9mhvserial_bf.c b/slsDetectorSoftware/eigerDetectorServer/9mhvserial_bf.c index 41f1760f2..0746c4ac1 100644 --- a/slsDetectorSoftware/eigerDetectorServer/9mhvserial_bf.c +++ b/slsDetectorSoftware/eigerDetectorServer/9mhvserial_bf.c @@ -95,6 +95,7 @@ int main(int argc, char* argv[]) { cprintf(RED,"Warning: Unable to open port %s\n", PORTNAME); return -1; } + cprintf(GREEN,"opened port at %s\n",PORTNAME); struct termios serial_conf; // reset structure @@ -132,33 +133,21 @@ int main(int argc, char* argv[]) { cprintf(GREEN,"Ready...\n"); - /* - int once = 1; - while(strcmp(buffer,"start")){ - if(once){ - once=0; - cprintf(MAGENTA,"in the loop, checking\n"); - } - memset(buffer,0,BUFFERSIZE); - n = read(fd,buffer,BUFFERSIZE); - //#ifdef VERBOSE - cprintf(BLUE,"Received %d Bytes\n", n); - //#endif - cprintf(BLUE,"Got message: %s\n",buffer); - } - cprintf(GREEN,"started\n"); - */ - - while(ret != GOODBYE){ memset(buffer,0,BUFFERSIZE); n = read(fd,buffer,BUFFERSIZE); #ifdef VERBOSE cprintf(BLUE,"Received %d Bytes\n", n); #endif - cprintf(BLUE,"Got message: %s\n",buffer); + cprintf(BLUE,"Got message: '%s'\n",buffer); switch(buffer[0]){ + case '\0': + cprintf(GREEN,"Got Start (Detector restart)\n"); + break; + case 's': + cprintf(GREEN,"Got Start \n"); + break; case 'p': if (!sscanf(&buffer[1],"%d",&ival)){ cprintf(RED,"Warning: cannot scan voltage value\n"); @@ -171,10 +160,10 @@ int main(int argc, char* argv[]) { strcpy(buffer,"fail "); else strcpy(buffer,"success "); - cprintf(GREEN,"%s\n",buffer); + cprintf(GREEN,"Sending: '%s'\n",buffer); n = write(fd, buffer, BUFFERSIZE); #ifdef VERBOSE - cprintf(BLUE,"Sent %d Bytes\n", n); + cprintf(GREEN,"Sent %d Bytes\n", n); #endif break; @@ -188,20 +177,21 @@ int main(int argc, char* argv[]) { else strcpy(buffer,"success "); n = write(fd, buffer, BUFFERSIZE); + cprintf(GREEN,"Sending: '%s'\n",buffer); #ifdef VERBOSE - cprintf(BLUE,"Sent %d Bytes\n", n); + cprintf(GREEN,"Sent %d Bytes\n", n); #endif //value memset(buffer,0,BUFFERSIZE); buffer[BUFFERSIZE-1] = '\n'; if(ival >= 0){ - cprintf(GREEN,"%d\n",ival); + cprintf(GREEN,"Sending: '%d'\n",ival); sprintf(buffer,"%d ",ival); n = write(fd, buffer, BUFFERSIZE); #ifdef VERBOSE - cprintf(BLUE,"Sent %d Bytes\n", n); + cprintf(GREEN,"Sent %d Bytes\n", n); #endif - }else cprintf(GREEN,"%s\n",buffer); + }else cprintf(RED,"%s\n",buffer); break; case 'e': @@ -209,7 +199,7 @@ int main(int argc, char* argv[]) { ret = GOODBYE; break; default: - printf("Unknown Command. buffer:[%s]\n",buffer); + cprintf(RED,"Unknown Command. buffer:'%s'\n",buffer); break; } } diff --git a/slsDetectorSoftware/eigerDetectorServer/FebControl.c b/slsDetectorSoftware/eigerDetectorServer/FebControl.c index 807bc3977..d7996ea6a 100644 --- a/slsDetectorSoftware/eigerDetectorServer/FebControl.c +++ b/slsDetectorSoftware/eigerDetectorServer/FebControl.c @@ -224,7 +224,7 @@ int Feb_Control_Init(int master, int top, int normal, int module_num){ int Feb_Control_OpenSerialCommunication(){ - cprintf(BG_BLUE,"opening serial communication of hv\n"); + cprintf(GREEN,"opening serial communication of hv\n"); //if(Feb_Control_hv_fd != -1) close(Feb_Control_hv_fd); Feb_Control_hv_fd = open(SPECIAL9M_HIGHVOLTAGE_PORT, O_RDWR | O_NOCTTY | O_SYNC); @@ -232,7 +232,7 @@ int Feb_Control_OpenSerialCommunication(){ cprintf(RED,"Warning: Unable to open port %s to set up high voltage serial communciation to the blackfin\n", SPECIAL9M_HIGHVOLTAGE_PORT); return 0; } - + cprintf(GREEN,"Serial Port opened at %s\n",SPECIAL9M_HIGHVOLTAGE_PORT); struct termios serial_conf; // reset structure memset (&serial_conf, 0, sizeof(serial_conf)); @@ -265,12 +265,15 @@ int Feb_Control_OpenSerialCommunication(){ memset(buffer,0,SPECIAL9M_HIGHVOLTAGE_BUFFERSIZE); buffer[SPECIAL9M_HIGHVOLTAGE_BUFFERSIZE-1] = '\n'; strcpy(buffer,"start"); + cprintf(GREEN,"sending start: '%s'\n",buffer); int n = write(Feb_Control_hv_fd, buffer, SPECIAL9M_HIGHVOLTAGE_BUFFERSIZE); if (n < 0) { cprintf(RED,"\nWarning: Error writing to i2c bus\n"); return 0; } - +#ifdef VERBOSE + cprintf(GREEN,"Sent: %d bytes\n",n); +#endif return 1; } @@ -629,13 +632,14 @@ int Feb_Control_SendHighVoltage(int dacvalue){ buffer[SPECIAL9M_HIGHVOLTAGE_BUFFERSIZE-1]='\n'; int n; sprintf(buffer,"p%d",dacvalue); + cprintf(GREEN,"Sending HV: '%s'\n",buffer); n = write(Feb_Control_hv_fd, buffer, SPECIAL9M_HIGHVOLTAGE_BUFFERSIZE); if (n < 0) { cprintf(RED,"\nWarning: Error writing to i2c bus\n"); return 0; } #ifdef VERBOSEI - cprintf(BLUE,"Sent %d Bytes\n", n); + cprintf(GREEN,"Sent %d Bytes\n", n); #endif //ok/fail memset(buffer,0,SPECIAL9M_HIGHVOLTAGE_BUFFERSIZE); @@ -646,8 +650,9 @@ int Feb_Control_SendHighVoltage(int dacvalue){ return 0; } #ifdef VERBOSEI - cprintf(BLUE,"Received %d Bytes\n", n); + cprintf(GREEN,"Received %d Bytes\n", n); #endif + cprintf(GREEN,"Received HV: '%s'\n",buffer); fflush(stdout); /*Feb_Control_CloseSerialCommunication();*/ if(buffer[0] != 's'){ @@ -715,13 +720,14 @@ int Feb_Control_ReceiveHighVoltage(unsigned int* value){ //request strcpy(buffer,"g "); + cprintf(GREEN,"\nSending HV: '%s'\n",buffer); n = write(Feb_Control_hv_fd, buffer, SPECIAL9M_HIGHVOLTAGE_BUFFERSIZE); if (n < 0) { cprintf(RED,"\nWarning: Error writing to i2c bus\n"); return 0; } #ifdef VERBOSEI - cprintf(BLUE,"Sent %d Bytes\n", n); + cprintf(GREEN,"Sent %d Bytes\n", n); #endif //ok/fail @@ -733,8 +739,9 @@ int Feb_Control_ReceiveHighVoltage(unsigned int* value){ return 0; } #ifdef VERBOSEI - cprintf(BLUE,"Received %d Bytes\n", n); + cprintf(GREEN,"Received %d Bytes\n", n); #endif + cprintf(GREEN,"Received HV: '%s'\n",buffer); if(buffer[0] != 's'){ cprintf(RED,"\nWarning: failed to read high voltage\n"); return 0; @@ -748,8 +755,9 @@ int Feb_Control_ReceiveHighVoltage(unsigned int* value){ return 0; } #ifdef VERBOSEI - cprintf(BLUE,"Received %d Bytes\n", n); + cprintf(GREEN,"Received %d Bytes\n", n); #endif + cprintf(GREEN,"Received HV: '%s'\n",buffer); /*Feb_Control_OpenSerialCommunication();*/ if (!sscanf(buffer,"%d",value)){ cprintf(RED,"\nWarning: failed to scan high voltage read\n"); diff --git a/slsDetectorSoftware/eigerDetectorServer/bin/eigerDetectorServerv3.0.0.16.6 b/slsDetectorSoftware/eigerDetectorServer/bin/eigerDetectorServerv3.0.0.16.8 similarity index 69% rename from slsDetectorSoftware/eigerDetectorServer/bin/eigerDetectorServerv3.0.0.16.6 rename to slsDetectorSoftware/eigerDetectorServer/bin/eigerDetectorServerv3.0.0.16.8 index 1d201568e..b485fa5dd 100755 Binary files a/slsDetectorSoftware/eigerDetectorServer/bin/eigerDetectorServerv3.0.0.16.6 and b/slsDetectorSoftware/eigerDetectorServer/bin/eigerDetectorServerv3.0.0.16.8 differ diff --git a/slsDetectorSoftware/eigerDetectorServer/bin/hv9m_blackfin_serverv3.0.0.1 b/slsDetectorSoftware/eigerDetectorServer/bin/hv9m_blackfin_serverv3.0.0.1 new file mode 100755 index 000000000..4ab730239 Binary files /dev/null and b/slsDetectorSoftware/eigerDetectorServer/bin/hv9m_blackfin_serverv3.0.0.1 differ diff --git a/slsDetectorSoftware/eigerDetectorServer/gitInfo.txt b/slsDetectorSoftware/eigerDetectorServer/gitInfo.txt index 5314965df..1c9d5a4d6 100644 --- a/slsDetectorSoftware/eigerDetectorServer/gitInfo.txt +++ b/slsDetectorSoftware/eigerDetectorServer/gitInfo.txt @@ -1,9 +1,9 @@ Path: slsDetectorsPackage/slsDetectorSoftware/eigerDetectorServer URL: origin git@git.psi.ch:sls_detectors_software/sls_detector_software.git Repository Root: origin git@git.psi.ch:sls_detectors_software/sls_detector_software.git -Repsitory UUID: 2dfbd9016b501eca6ee2c00a08e49a3f7e7990d8 -Revision: 296 +Repsitory UUID: 177efa2636a7cee812707537ad90489a61832942 +Revision: 299 Branch: 3.0-rc Last Changed Author: Dhanya_Maliakal -Last Changed Rev: 1457 -Last Changed Date: 2017-08-08 15:23:10.000000002 +0200 ./Makefile +Last Changed Rev: 1480 +Last Changed Date: 2017-08-17 09:06:21.000000002 +0200 ./Makefile diff --git a/slsDetectorSoftware/eigerDetectorServer/gitInfoEiger.h b/slsDetectorSoftware/eigerDetectorServer/gitInfoEiger.h index c01ec39e8..dec316953 100644 --- a/slsDetectorSoftware/eigerDetectorServer/gitInfoEiger.h +++ b/slsDetectorSoftware/eigerDetectorServer/gitInfoEiger.h @@ -1,11 +1,11 @@ //#define SVNPATH "" #define SVNURL "git@git.psi.ch:sls_detectors_software/sls_detector_software.git" //#define SVNREPPATH "" -#define SVNREPUUID "2dfbd9016b501eca6ee2c00a08e49a3f7e7990d8" -//#define SVNREV 0x1457 +#define SVNREPUUID "177efa2636a7cee812707537ad90489a61832942" +//#define SVNREV 0x1480 //#define SVNKIND "" //#define SVNSCHED "" #define SVNAUTH "Dhanya_Maliakal" -#define SVNREV 0x1457 -#define SVNDATE 0x20170808 +#define SVNREV 0x1480 +#define SVNDATE 0x20170817 // diff --git a/slsDetectorSoftware/eigerDetectorServer/slsDetectorFunctionList.c b/slsDetectorSoftware/eigerDetectorServer/slsDetectorFunctionList.c index 9ab1467ab..515aa3a61 100644 --- a/slsDetectorSoftware/eigerDetectorServer/slsDetectorFunctionList.c +++ b/slsDetectorSoftware/eigerDetectorServer/slsDetectorFunctionList.c @@ -299,6 +299,12 @@ void allocateDetectorStructureMemory(){ (detectorModules)->offset=0; (detectorModules)->reg=0; thisSettings = UNINITIALIZED; + + // if trimval requested, should return -1 to acknowledge unknown + int ichan=0; + for (ichan=0; ichan<(detectorModules->nchan); ichan++) { + *((detectorModules->chanregs)+ichan) = -1; + } } @@ -554,7 +560,7 @@ int setModule(sls_detector_module myMod, int delay){ if(myMod.nchan==0 && myMod.nchip == 0) cprintf(BLUE,"Setting module without trimbits\n"); else{ - cprintf(GREEN,"Setting module with trimbits\n"); + printf("Setting module with trimbits\n"); //includ gap pixels unsigned int tt[263680]; int iy,ichip,ix,ip=0,ich=0; @@ -1063,11 +1069,24 @@ int setAllTrimbits(int val){ } } } + cprintf(GREEN, "All trimbits have been set to %d\n", val); return OK; } int getAllTrimbits(){ - return *((detectorModules->chanregs)); + int ichan=0; + int value = *((detectorModules->chanregs)); + if (detectorModules){ + for (ichan=0; ichan<(detectorModules->nchan); ichan++) { + if(*((detectorModules->chanregs)+ichan) != value) { + value= -1; + break; + } + + } + } + printf("Value of all Trimbits: %d\n", value); + return value; } int getBebFPGATemp(){ diff --git a/slsDetectorSoftware/slsDetector/slsDetectorCommand.cpp b/slsDetectorSoftware/slsDetector/slsDetectorCommand.cpp index bc05fdd3c..96fc6b284 100644 --- a/slsDetectorSoftware/slsDetector/slsDetectorCommand.cpp +++ b/slsDetectorSoftware/slsDetector/slsDetectorCommand.cpp @@ -96,6 +96,72 @@ slsDetectorCommand::slsDetectorCommand(slsDetectorUtils *det) { descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdExitServer; i++; + /*! \page test + - flippeddatay [i] enables/disables data being flipped across y axis. 1 enables, 0 disables. Not implemented. + */ + descrToFuncMap[i].m_pFuncName="flippeddatay"; // + descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdDetectorSize; + i++; + + /* digital test and debugging */ + + /*! \page test + - digitest [i] will perform test which will plot the unique channel identifier, instead of data. Only get! + */ + descrToFuncMap[i].m_pFuncName="digitest"; // /* find command! */ + descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdDigiTest; + i++; + + /*! \page test + - bustest performs test of the bus interface between FPGA and embedded Linux system. Can last up to a few minutes. Cannot set! Used for Mythen only. Only get! + */ + descrToFuncMap[i].m_pFuncName="bustest"; // + descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdDigiTest; + i++; + + /*! \page test + - digibittest:[i] performs digital test of the module i. Returns 0 if succeeded, otherwise error mask. Only put! + */ + descrToFuncMap[i].m_pFuncName="digibittest"; // + descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdDigiTest; + i++; + + /*! \page test + - reg [addr] [val] ??? writes to an register \c addr with \c value in hexadecimal format. + */ + descrToFuncMap[i].m_pFuncName="reg"; // + descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdRegister; + i++; + + /*! \page test + - adcreg [addr] [val] ??? writes to an adc register \c addr with \c value in hexadecimal format. Only put! + */ + descrToFuncMap[i].m_pFuncName="adcreg"; // + descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdRegister; + i++; + + /*! \page test + - setbit ??? Only put! + */ + descrToFuncMap[i].m_pFuncName="setbit"; // + descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdRegister; + i++; + + /*! \page test + - clearbit ??? Only put! + */ + descrToFuncMap[i].m_pFuncName="clearbit"; // + descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdRegister; + i++; + + /*! \page test + - getbit ??? Only get! + */ + descrToFuncMap[i].m_pFuncName="getbit"; // + descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdRegister; + i++; + + @@ -164,17 +230,23 @@ slsDetectorCommand::slsDetectorCommand(slsDetectorUtils *det) { /*! \page config Configuration commands Commands to configure the detector. these commands are often left to the configuration file. - - \ref detstructure "Detector Structure": commands to configure detector structure - - \ref detstatus "Detector Status": commands to configure detector status - - \ref detsize "Detector Data Size": commands to configure detector data size - - \ref versions "Versions": commands to check version of each subsytem + - \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 configfpga "FPGA": commands to configure FPGA of the detector + - \ref configchip "Chip": commands to configure chip of the detector + - \ref configversions "Versions": commands to check version of each subsytem + - \ref configtimers "Timers": commands to configure the timers of the detector + - \ref configrotimers "RO Timers": commands to configure the read only timers of the detector + - \ref configspeed "Speed": commands to configure speed of detector + - \ref configsettings "Detector Parameters": commands to configure/retrieve configuration of detector */ /* Detector structure configuration and debugging commands */ - /*! \page config - \section detstructure Detector Structure - commands to configure detector structure + \section configstructure Data Structure + commands to configure detector data structure */ /*! \page config @@ -241,7 +313,7 @@ slsDetectorCommand::slsDetectorCommand(slsDetectorUtils *det) { i++; /*! \page config - \section detstatus Detector Status + \section configstatus Status commands to configure detector status */ @@ -267,9 +339,8 @@ slsDetectorCommand::slsDetectorCommand(slsDetectorUtils *det) { /* detector and data size */ - /*! \page config - \section detsize Detector Data Size + \section configsize Data Size commands to configure detector data size */ @@ -324,6 +395,447 @@ slsDetectorCommand::slsDetectorCommand(slsDetectorUtils *det) { + /* flags */ + /*! \page config + \section configflags Flags + commands to configure detector flags + */ + + /*! \page config + - flags [flag] sets/gets the readout flags to mode. Options: none, storeinram, tot, continous, parallel, nonparallel, safe, digital, analog_digital, unknown. Used for MYTHEN and EIGER only. + */ + descrToFuncMap[i].m_pFuncName="flags"; + descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdAdvanced; + i++; + + /*! \page config + - extsig:[i] [flag] sets/gets the mode of the external signal i. Options: \c off, \c gate_in_active_high, \c gate_in_active_low, \c trigger_in_rising_edge, \c trigger_in_falling_edge, + \c ro_trigger_in_rising_edge, \c ro_trigger_in_falling_edge, \c gate_out_active_high, \c gate_out_active_low, \c trigger_out_rising_edge, \c trigger_out_falling_edge, \c ro_trigger_out_rising_edge, + \c ro_trigger_out_falling_edge. \n Used in MYTHEN, GOTTHARD, PROPIX only. + */ + descrToFuncMap[i].m_pFuncName="extsig"; /* find command! */ + descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdAdvanced; + i++; + + + /* fpga */ + /*! \page config + \section configfpga FPGA + commands to configure FPGA of the detector + */ + + /*! \page config + - programfpga [file] programs the FPGA with file f (with .pof extension). Used for JUNGFRAU, MOENCH only. Only put! + */ + descrToFuncMap[i].m_pFuncName="programfpga"; + descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdAdvanced; + i++; + + /*! \page config + - resetfpga [f] resets FPGA, where f can be any value. Used for JUNGFRAU only. Only put! + */ + descrToFuncMap[i].m_pFuncName="resetfpga"; + descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdAdvanced; + i++; + + + /* chip */ + /*! \page config + \section configchip Chip + commands to configure chip of the detector + */ + + /*! \page config + - powerchip [i] Powers on/off the chip. 1 powers on, 0 powers off. Can also get the power status. Used for JUNGFRAU only. + */ + descrToFuncMap[i].m_pFuncName="powerchip"; + descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdAdvanced; + i++; + + /*! \page config + - led [i] sets/gets the led status. 1 on, 0 off. Used for MOENCH only ?? + */ + descrToFuncMap[i].m_pFuncName="led"; + descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdAdvanced; + i++; + + /*! \page config + - pulse [n] [x] [y] pulses pixel at coordinates (x,y) n number of times. Used in EIGER only. Only put!" + */ + descrToFuncMap[i].m_pFuncName="pulse"; // + descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdPulse; + i++; + + /*! \page config + - pulsenmove [n] [x] [y] pulses pixel n number of times and moves relatively by x value (x axis) and y value(y axis). Used in EIGER only. Only put!" + */ + descrToFuncMap[i].m_pFuncName="pulsenmove"; // + descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdPulse; + i++; + + /*! \page config + - pulsechip [n]pulses chip n number of times, while n=-1 will reset it to normal mode. Used in EIGER only. Only put!" + */ + descrToFuncMap[i].m_pFuncName="pulsechip"; // + descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdPulse; + i++; + + + + + /* versions/ serial numbers getId */ + /*! \page config + \section configversions Versions + Commands to check versions of each subsystem + */ + + /*! \page config + - moduleversion:[i] Gets the firmware version of module i. Used for MYTHEN only. Only get! + */ + descrToFuncMap[i].m_pFuncName="moduleversion"; // + descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdSN; + i++; + + /*! \page config + - detectornumber Gets the serial number or MAC of detector. Only get! + */ + descrToFuncMap[i].m_pFuncName="detectornumber"; // + descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdSN; + i++; + + /*! \page config + - modulenumber:[i] Gets the serial number of module i. Used for MYTHEN only. Only get! + */ + descrToFuncMap[i].m_pFuncName="modulenumber"; /* find command! */ + descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdSN; + i++; + + /*! \page config + - detectorversion Gets the firmware version of detector. Only get! + */ + descrToFuncMap[i].m_pFuncName="detectorversion"; // + descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdSN; + i++; + + /*! \page config + - softwareversion Gets the software version of detector server. Only get! + */ + descrToFuncMap[i].m_pFuncName="softwareversion"; // + descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdSN; + i++; + + /*! \page config + - thisversion Gets the software version of this client software. Only get! + */ + descrToFuncMap[i].m_pFuncName="thisversion"; // + descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdSN; + i++; + + /*! \page config + - receiverversion Gets the software version of receiver. Only get! + */ + descrToFuncMap[i].m_pFuncName="receiverversion"; // + descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdSN; + i++; + + /* r/w timers */ + /*! \page config + \section configtimers Timers + commands to configure the timers of the detector + */ + + /*! \page config + - timing [mode] sets/gets synchronization mode of the detector. Mode: auto, trigger, ro_trigger, gating, triggered_gating + */ + descrToFuncMap[i].m_pFuncName="timing"; // + descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdTiming; + i++; + + /*! \page config + - exptime [i] sets/gets exposure time in s + */ + descrToFuncMap[i].m_pFuncName="exptime"; // + descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdTimer; + i++; + + /*! \page config + - subexptime [i] sets/gets sub exposure time in s. Used in EIGER only in 32 bit mode. + */ + descrToFuncMap[i].m_pFuncName="subexptime"; // + descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdTimer; + i++; + + /*! \page config + - period [i] sets/gets frame period in s. + */ + descrToFuncMap[i].m_pFuncName="period"; // + descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdTimer; + i++; + + /*! \page config + - delay [i] sets/gets delay in s. Used in MYTHEN, GOTTHARD only + */ + descrToFuncMap[i].m_pFuncName="delay"; // + descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdTimer; + i++; + + /*! \page config + - gates [i] sets/gets number of gates. Used in MYTHEN, GOTTHARD, EIGER only + */ + descrToFuncMap[i].m_pFuncName="gates"; // + descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdTimer; + i++; + + /*! \page config + - gates [i] sets/gets number of frames. If \c timing is not \c auto, then it is the number of frames per cycle/trigger. + */ + descrToFuncMap[i].m_pFuncName="frames"; // + descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdTimer; + i++; + + /*! \page config + - cycles [i] sets/gets number of triggers. Timing mode should be set appropriately. + */ + descrToFuncMap[i].m_pFuncName="cycles"; // + descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdTimer; + i++; + + /*! \page config + - probes [i] sets/gets number of probes to accumulate. When setting, max 3! cycles should be set to 1, frames to the number of pump-probe events. Used in MYTHEN only + */ + descrToFuncMap[i].m_pFuncName="probes"; // + descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdTimer; + i++; + + /*! \page config + - measurements [i] sets/gets number of measurements. + */ + descrToFuncMap[i].m_pFuncName="measurements"; // + descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdTimer; + i++; + + /*! \page config + - samples [i] sets/gets number of samples expected from the jctb. Used in CHIP TEST BOARD only. + */ + descrToFuncMap[i].m_pFuncName="samples"; // + descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdTimer; + i++; + + /* read only timers */ + /*! \page config + \section configrotimers RO Timers + commands to configure the read only timers of the detector + */ + + /*! \page config + - exptimel gets exposure time left. Used in MYTHEN, GOTTHARD only. Only get! + */ + descrToFuncMap[i].m_pFuncName="exptimel"; // + descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdTimeLeft; + i++; + + /*! \page config + - periodl gets frame period left. Used in MYTHEN, GOTTHARD only. Only get! + */ + descrToFuncMap[i].m_pFuncName="periodl"; // + descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdTimeLeft; + i++; + + /*! \page config + - delayl gets delay left. Used in MYTHEN, GOTTHARD only. Only get! + */ + descrToFuncMap[i].m_pFuncName="delayl"; // + descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdTimeLeft; + i++; + + /*! \page config + - gatesl gets number of gates left. Used in MYTHEN, GOTTHARD only. Only get! + */ + descrToFuncMap[i].m_pFuncName="gatesl"; // + descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdTimeLeft; + i++; + + /*! \page config + - framesl gets number of frames left. Used in MYTHEN, GOTTHARD only. Only get! + */ + descrToFuncMap[i].m_pFuncName="framesl"; // + descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdTimeLeft; + i++; + + /*! \page config + - cyclesl gets number of cylces left. Used in MYTHEN, GOTTHARD only. Only get! + */ + descrToFuncMap[i].m_pFuncName="cyclesl"; // + descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdTimeLeft; + i++; + + /*! \page config + - probesl gets number of probes left. Used in MYTHEN, GOTTHARD only. Only get! + */ + descrToFuncMap[i].m_pFuncName="probesl"; // + descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdTimeLeft; + i++; + + // descrToFuncMap[i].m_pFuncName="progress"; + // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdTimer; + // i++; + + /*! \page config + - now ??? Only get! + */ + descrToFuncMap[i].m_pFuncName="now"; // + descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdTimeLeft; + i++; + + /*! \page config + - timestamp ??? Only get! + */ + descrToFuncMap[i].m_pFuncName="timestamp"; // + descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdTimeLeft; + i++; + + /*! \page config + - nframes ??? Only get! + */ + descrToFuncMap[i].m_pFuncName="nframes"; // + descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdTimeLeft; + i++; + + /* speed */ + /*! \page config + \section configspeed Speed + commands to configure speed of detector + */ + + /*! \page config + - clkdivider [i] sets/gets the readout clock divider. EIGER, JUNGFRAU [0(fast speed), 1(half speed), 2(quarter speed)]. MYTHEN[???] + */ + descrToFuncMap[i].m_pFuncName="clkdivider"; // + descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdSpeed; + i++; + + /*! \page config + - clkdivider [i] sets/gets length of set/reset signals (in clock cycles). Used in MYTHEN only + */ + descrToFuncMap[i].m_pFuncName="setlength"; // + descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdSpeed; + i++; + + /*! \page config + - clkdivider [i] sets/gets waitstates of the bus interface (in clock cycles). Used in MYTHEN only + */ + descrToFuncMap[i].m_pFuncName="waitstates"; // + descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdSpeed; + i++; + + /*! \page config + - clkdivider [i] sets/gets clock divider in tot mode. Used in MYTHEN only + */ + descrToFuncMap[i].m_pFuncName="totdivider"; // + descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdSpeed; + i++; + + /*! \page config + - clkdivider [i] sets/gets duty cycle of the tot clock. Used in MYTHEN only + */ + descrToFuncMap[i].m_pFuncName="totdutycycle"; // + descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdSpeed; + i++; + + /*! \page config + - phasestep [i] ??? + */ + descrToFuncMap[i].m_pFuncName="phasestep"; // + descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdSpeed; + i++; + + /*! \page config + - oversampling [i] ??? + */ + descrToFuncMap[i].m_pFuncName="oversampling"; // + descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdSpeed; + i++; + + /*! \page config + - adcclk [i] ??? + */ + descrToFuncMap[i].m_pFuncName="adcclk"; // + descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdSpeed; + i++; + + /*! \page config + - adcphase [i] ??? Used in MYTHEN, JUNGFRAU only. + */ + descrToFuncMap[i].m_pFuncName="adcphase"; // + descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdSpeed; + i++; + + /*! \page config + - adcpipeline [i] ??? + */ + descrToFuncMap[i].m_pFuncName="adcpipeline"; // + descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdSpeed; + i++; + + /*! \page config + - dbitclk [i] ??? + */ + descrToFuncMap[i].m_pFuncName="dbitclk"; // + descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdSpeed; + i++; + + /*! \page config + - dbitphase [i] ??? + */ + descrToFuncMap[i].m_pFuncName="dbitphase"; // + descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdSpeed; + i++; + + /*! \page config + - dbitpipeline [i] ??? + */ + descrToFuncMap[i].m_pFuncName="dbitpipeline"; // + descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdSpeed; + i++; + + + /* settings dump/retrieve */ + /*! \page config + \section configsettings Detector Parameters + commands to configure/retrieve configuration of detector + */ + + /*! \page config + - config [fname] sets/saves detector/receiver to configuration contained in fname. Same as executing sls_detector_put for every line. Normally a one time operation. + */ + descrToFuncMap[i].m_pFuncName="config"; + descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdConfiguration; + i++; + + /* settings dump/retrieve */ + /*! \page config + - rx_printconfig prints the receiver configuration. Only get! + */ + descrToFuncMap[i].m_pFuncName="rx_printconfig"; + descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdConfiguration; + i++; + + /*! \page config + - parameters [fname] sets/saves detector parameters contained in fname. Normally once per different measurement. + */ + descrToFuncMap[i].m_pFuncName="parameters"; + descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdConfiguration; + i++; + + /*! \page config + - setup [fname] sets/saves detector complete setup contained in fname (extensions automatically generated), including trimfiles, ff coefficients etc. + */ + descrToFuncMap[i].m_pFuncName="setup"; + descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdConfiguration; + i++; + + + /* data processing commands */ @@ -389,7 +901,7 @@ slsDetectorCommand::slsDetectorCommand(slsDetectorUtils *det) { i++; /*! \page data - - angdir [i] Sets/gets the angular direction. 1 means increasing channels number as increasing angle, -1 increasing channel number decreasing angle. + - angdir [i] Sets/gets the angular direction. 1 means increasing channels number as increasing angle, -1 increasing channel number decreasing angle. */ descrToFuncMap[i].m_pFuncName="angdir" ;// descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdAngConv; @@ -444,8 +956,6 @@ slsDetectorCommand::slsDetectorCommand(slsDetectorUtils *det) { /* trim/cal directories */ - - /*! \page settings Detector settings commands Commands to setup the settings of the detector */ @@ -477,571 +987,6 @@ slsDetectorCommand::slsDetectorCommand(slsDetectorUtils *det) { descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdTrimEn; i++; - - - /* file name */ - - /*! \page output Output settings - Commands to setup the file destination and format - */ - - /*! \page output - - outdir [dir] Sets/gets the file output directory (string) - */ - descrToFuncMap[i].m_pFuncName="outdir"; //OK - descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdOutDir; - i++; - - /*! \page output - - fname [fn] Sets/gets the root of the output file name (string) - */ - descrToFuncMap[i].m_pFuncName="fname"; //OK - descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdFileName; - i++; - - /*! \page output - - index [i] Sets/gets the current file index (int) - */ - descrToFuncMap[i].m_pFuncName="index"; //OK - descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdFileIndex; - i++; - - /*! \page output - - enablefwrite [i] Enables/disables file writing. 1 enables, 0 disables. - */ - descrToFuncMap[i].m_pFuncName="enablefwrite"; // - descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdEnablefwrite; - i++; - - /*! \page output - - overwrite [i] enables(1) /disables(0) file overwriting - */ - descrToFuncMap[i].m_pFuncName="overwrite"; // - descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdOverwrite; - i++; - - /*! \page output - - currentfname gets the filename for the data without index and extension - */ - descrToFuncMap[i].m_pFuncName="currentfname"; //OK - descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdFileName; - i++; - - /*! \page output - - fileformat sets/gets the file format for data in receiver. Options: [ascii, binary, hdf5]. Ascii is not implemented in Receiver. - */ - descrToFuncMap[i].m_pFuncName="fileformat"; //OK - descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdFileName; - i++; - - - - - /* Acquisition actions */ - - /*! \page actions Actions - Commands to define scripts to be executed during the acquisition flow - */ - - /*! \page actions - - positions [n [p0..pn-1]] sets/gets number of angular position and positions to be acquired. - */ - descrToFuncMap[i].m_pFuncName="positions"; // - descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdPositions; - i++; - - /*! \page actions - - startscript [s] sets/gets the script to be executed at the beginning of the acquisition. \c none unsets. - */ - descrToFuncMap[i].m_pFuncName="startscript"; // - descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdScripts; - i++; - - /*! \page actions - - startscriptpar [s] sets/gets a string to be passed as a parameter to the startscript - */ - descrToFuncMap[i].m_pFuncName="startscriptpar"; // - descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdScripts; - i++; - - /*! \page actions - - stopscript [s] sets/gets the script to be executed at the end of the acquisition. \c none unsets. - */ - descrToFuncMap[i].m_pFuncName="stopscript"; // - descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdScripts; - i++; - - /*! \page actions - - stopscriptpar [s] sets/gets a string to be passed as a parameter to the stopscript - */ - descrToFuncMap[i].m_pFuncName="stopscriptpar"; // - descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdScripts; - i++; - - /*! \page actions - - scriptbefore [s] sets/gets the script to be executed before starting the detector every time in the acquisition. \c none unsets. - */ - descrToFuncMap[i].m_pFuncName="scriptbefore"; // - descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdScripts; - i++; - - /*! \page actions - - scriptbeforepar [s] sets/gets a string to be passed as a parameter to the scriptbefore - */ - descrToFuncMap[i].m_pFuncName="scriptbeforepar"; // - descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdScripts; - i++; - - /*! \page actions - - scriptafter [s] sets/gets the script to be executed after the detector has finished every time in the acquisition. \c none unsets. - */ - descrToFuncMap[i].m_pFuncName="scriptafter"; // - descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdScripts; - i++; - - /*! \page actions - - scriptafterpar [s] sets/gets a string to be passed as a parameter to the scriptafter - */ - descrToFuncMap[i].m_pFuncName="scriptafterpar"; // - descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdScripts; - i++; - - /*! \page actions - - headerafter [s] sets/gets the script to be executed for logging the detector parameters. \c none unsets. - */ - descrToFuncMap[i].m_pFuncName="headerafter"; // - descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdScripts; - i++; - - /*! \page actions - - headerbefore [s] sets/gets the script to be executed for logging the detector parameters. \c none unsets. - */ - descrToFuncMap[i].m_pFuncName="headerbefore"; // - descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdScripts; - i++; - - /*! \page actions - - headerbeforepar [s] sets/gets a string to be passed as a parameter to the headerbefore script - */ - descrToFuncMap[i].m_pFuncName="headerbeforepar"; // - descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdScripts; - i++; - - /*! \page actions - - headerafterpar [s] sets/gets a string to be passed as a parameter to the headerafter script - */ - descrToFuncMap[i].m_pFuncName="headerafterpar"; // - descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdScripts; - i++; - - /*! \page actions - - enacallog [i] enables/disables logging of the parameters necessary for the energy calibration. 1 sets, 0 unsets. - */ - descrToFuncMap[i].m_pFuncName="encallog"; // - descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdScripts; - i++; - - /*! \page actions - - angcallog [i] enables/disables logging of the parameters necessary for the angular calibration. 1 sets, 0 unsets. - */ - descrToFuncMap[i].m_pFuncName="angcallog"; // - descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdScripts; - i++; - - /*! \page actions - - scan0script [s] sets/gets the script to be executed for the scan 0 level. \c none unsets. - */ - descrToFuncMap[i].m_pFuncName="scan0script"; // - descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdScans; - i++; - - /*! \page actions - - scan0par [s] sets/gets a string to be passed as a parameter to the scan0script - */ - descrToFuncMap[i].m_pFuncName="scan0par"; // - descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdScans; - i++; - - /*! \page actions - - scan0prec [i] sets/gets number of digits to be used for the scan0 variable in the file name. - */ - descrToFuncMap[i].m_pFuncName="scan0prec"; // - descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdScans; - i++; - - /*! \page actions - - scan0steps [i [s0..sn-1]] sets/gets number of steps (int) of the scan0 level and their values (float). - */ - descrToFuncMap[i].m_pFuncName="scan0steps"; // - descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdScans; - i++; - - - /*! \page actions - - scan0range [smin smax sstep] sets scan0 min, max and step, returns the number of steps and their values as scan0steps. - */ - descrToFuncMap[i].m_pFuncName="scan0range"; // - descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdScans; - i++; - - /*! \page actions - - scan1script [s] sets/gets the script to be executed for the scan1 level. \c none unsets. - */ - descrToFuncMap[i].m_pFuncName="scan1script"; // - descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdScans; - i++; - - /*! \page actions - - scan1par [s] sets/gets a string to be passed as a parameter to the scan1script - */ - descrToFuncMap[i].m_pFuncName="scan1par"; // - descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdScans; - i++; - - /*! \page actions - - scan1prec [i] sets/gets number of digits to be used for the scan1 variable in the file name. - */ - descrToFuncMap[i].m_pFuncName="scan1prec"; // - descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdScans; - i++; - - /*! \page actions - - scan1steps [i [s0..sn-1]] sets/gets number of steps (int) of the scan1 level and their values (float). - */ - descrToFuncMap[i].m_pFuncName="scan1steps"; // - descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdScans; - i++; - - /*! \page actions - - scan1range [smin smax sstep] sets scan1 min, max and step, returns the number of steps and their values as scan1steps. - */ - descrToFuncMap[i].m_pFuncName="scan1range"; // - descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdScans; - i++; - - - - - - /* communication configuration */ - - /*! \page network Network - Commands to setup the network between client, detector and receiver - - rx_hostname [s] sets/gets the receiver hostname or IP address, configures detector mac with all network parameters and updates receiver with acquisition parameters. Normally used for single detectors (Can be multi-detector). \c none disables. If used, use as last network command in configuring detector MAC. - */ - descrToFuncMap[i].m_pFuncName="rx_hostname"; // - descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdNetworkParameter; - i++; - /*! \page network - - rx_udpip [ip] sets/gets the ip address of the receiver UDP interface where the data from the detector will be streamed to. Normally used for single detectors (Can be multi-detector). Used if different from eth0. - */ - descrToFuncMap[i].m_pFuncName="rx_udpip"; // - descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdNetworkParameter; - i++; - - /*! \page network - - rx_udpmac [mac] sets/gets the mac address of the receiver UDP interface where the data from the detector will be streamed to. Normally used for single detectors (Can be multi-detector). - */ - descrToFuncMap[i].m_pFuncName="rx_udpmac"; // - descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdNetworkParameter; - i++; - - /*! \page network - - rx_udpport [port] sets/gets the port of the receiver UDP interface where the data from the detector will be streamed to. Use single-detector command. - */ - descrToFuncMap[i].m_pFuncName="rx_udpport"; // - descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdNetworkParameter; - i++; - - /*! \page network - - rx_udpport2 [port] sets/gets the second port of the receiver UDP interface where the data from the second half of the detector will be streamed to. Use single-detector command. Used for EIGER only. - */ - descrToFuncMap[i].m_pFuncName="rx_udpport2"; // - descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdNetworkParameter; - i++; - - /*! \page network - - detectormac [mac] sets/gets the mac address of the detector UDP interface from where the detector will stream data. Use single-detector command. Normally unused. - */ - descrToFuncMap[i].m_pFuncName="detectormac"; // - descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdNetworkParameter; - i++; - - /*! \page network - - detectorip [ip] sets/gets the ip address of the detector UDP interface from where the detector will stream data. Use single-detector command. Keep in same subnet as rx_udpip (if rx_udpip specified). - */ - descrToFuncMap[i].m_pFuncName="detectorip"; // - descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdNetworkParameter; - i++; - - /*! \page network - - txndelay_left [delay] sets/gets the transmission delay of first packet in an image being streamed out from the detector's left UDP port. Use single-detector command. Used for EIGER only. - */ - descrToFuncMap[i].m_pFuncName="txndelay_left"; // - descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdNetworkParameter; - i++; - - /*! \page network - - txndelay_right [delay] sets/gets the transmission delay of first packet in an image being streamed out from the detector's right UDP port. Use single-detector command. Used for EIGER only. - */ - descrToFuncMap[i].m_pFuncName="txndelay_right"; // - descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdNetworkParameter; - i++; - - /*! \page network - - txndelay_frame [delay] sets/gets the transmission frame period of entire frame being streamed out from the detector for both ports. Use single-detector command. Used for EIGER only. - */ - descrToFuncMap[i].m_pFuncName="txndelay_frame"; // - descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdNetworkParameter; - i++; - - /*! \page network - - flowcontrol_10g [delay] Enables/disables 10 GbE flow control. 1 enables, 0 disables. Used for EIGER only. - */ - descrToFuncMap[i].m_pFuncName="flowcontrol_10g"; // - descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdNetworkParameter; - i++; - - /*! \page network - - zmqport [port] sets/gets the 0MQ (TCP) port of the receiver from where data is streamed to the client. Use single-detector command to set individually or multi-detector command to calculate based on \c port for the rest. - */ - descrToFuncMap[i].m_pFuncName="zmqport"; // - descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdNetworkParameter; - i++; - - /*! \page network - - configuremac [i] configures the MAC of the detector with these parameters: detectorip, detectormac, rx_udpip, rx_udpmac, rx_udpport, rx_udpport2 (if applicable). Only put! - */ - descrToFuncMap[i].m_pFuncName="configuremac"; // - descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdConfigureMac; - i++; - - /*! \page network - - rx_tcpport [port] sets/gets the port of the client-receiver TCP interface. Use single-detector command. Is different for each detector if same \c rx_hostname used. Must be first command to communicate with receiver. - */ - descrToFuncMap[i].m_pFuncName="rx_tcpport"; // - descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdPort; - i++; - - /*! \page network - - port [port] sets/gets the port of the client-detector control server TCP interface. Use single-detector command. Default value is 1952 for all detectors. Normally not changed. - */ - descrToFuncMap[i].m_pFuncName="port"; // - descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdPort; - i++; - - /*! \page network - - stopport [port] sets/gets the port of the client-detector stop server TCP interface. Use single-detector command. Default value is 1953 for all detectors. Normally not changed. - */ - descrToFuncMap[i].m_pFuncName="stopport"; // - descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdPort; - i++; - - /*! \page config - - lock [i] Locks/Unlocks the detector to communicate with this client. 1 locks, 0 unlocks. - */ - descrToFuncMap[i].m_pFuncName="lock"; // - descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdLock; - i++; - - /*! \page network - - lastclient Gets the last client communicating with the detector. Cannot put! - */ - descrToFuncMap[i].m_pFuncName="lastclient"; // - descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdLastClient; - i++; - - - - /*! \page test - - flippeddatay [i] enables/disables data being flipped across y axis. 1 enables, 0 disables. Not implemented. - */ - descrToFuncMap[i].m_pFuncName="flippeddatay"; // - descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdDetectorSize; - i++; - - /* flags */ - - /*! \page config - - flags [flag] sets/gets the readout flags to mode. Options: none, storeinram, tot, continous, parallel, nonparallel, safe, digital, analog_digital, unknown. Used for MYTHEN and EIGER only. - */ - descrToFuncMap[i].m_pFuncName="flags"; - descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdAdvanced; - i++; - - /*! \page config - - extsig:[i] [flag] sets/gets the mode of the external signal i. Options: \c off, \c gate_in_active_high, \c gate_in_active_low, \c trigger_in_rising_edge, \c trigger_in_falling_edge, - \c ro_trigger_in_rising_edge, \c ro_trigger_in_falling_edge, \c gate_out_active_high, \c gate_out_active_low, \c trigger_out_rising_edge, \c trigger_out_falling_edge, \c ro_trigger_out_rising_edge, - \c ro_trigger_out_falling_edge. \n Used in MYTHEN, GOTTHARD, PROPIX only. - */ - descrToFuncMap[i].m_pFuncName="extsig"; /* find command! */ - descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdAdvanced; - i++; - - - /* fpga */ - - /*! \page config - - programfpga [file] programs the FPGA with file f (with .pof extension). Used for JUNGFRAU, MOENCH only. Only put! - */ - descrToFuncMap[i].m_pFuncName="programfpga"; - descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdAdvanced; - i++; - - /*! \page config - - resetfpga [f] resets FPGA, where f can be any value. Used for JUNGFRAU only. Only put! - */ - descrToFuncMap[i].m_pFuncName="resetfpga"; - descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdAdvanced; - i++; - - - /* chip */ - - /*! \page config - - powerchip [i] Powers on/off the chip. 1 powers on, 0 powers off. Can also get the power status. Used for JUNGFRAU only. - */ - descrToFuncMap[i].m_pFuncName="powerchip"; - descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdAdvanced; - i++; - - - - /* chip */ - - /*! \page config - - led [i] sets/gets the led status. 1 on, 0 off. Used for MOENCH only ?? - */ - descrToFuncMap[i].m_pFuncName="led"; - descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdAdvanced; - i++; - - - - /* versions/ serial numbers getId */ - - /*! \page config - \section versions Versions - Commands to check versions of each subsystem - */ - - /*! - - moduleversion:[i] Gets the firmware version of module i. Used for MYTHEN only. Only get! - */ - descrToFuncMap[i].m_pFuncName="moduleversion"; // - descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdSN; - i++; - - /*! - - detectornumber Gets the serial number or MAC of detector. Only get! - */ - descrToFuncMap[i].m_pFuncName="detectornumber"; // - descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdSN; - i++; - - /*! - - modulenumber:[i] Gets the serial number of module i. Used for MYTHEN only. Only get! - */ - descrToFuncMap[i].m_pFuncName="modulenumber"; /* find command! */ - descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdSN; - i++; - - /*! - - detectorversion Gets the firmware version of detector. Only get! - */ - descrToFuncMap[i].m_pFuncName="detectorversion"; // - descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdSN; - i++; - - /*! - - softwareversion Gets the software version of detector server. Only get! - */ - descrToFuncMap[i].m_pFuncName="softwareversion"; // - descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdSN; - i++; - - /*! - - thisversion Gets the software version of this client software. Only get! - */ - descrToFuncMap[i].m_pFuncName="thisversion"; // - descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdSN; - i++; - - /*! - - receiverversion Gets the software version of receiver. Only get! - */ - descrToFuncMap[i].m_pFuncName="receiverversion"; // - descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdSN; - i++; - - - /* digital test and debugging */ - - /*! \page test - - digitest [i] will perform test which will plot the unique channel identifier, instead of data. Only get! - */ - descrToFuncMap[i].m_pFuncName="digitest"; // /* find command! */ - descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdDigiTest; - i++; - - /*! \page test - - bustest performs test of the bus interface between FPGA and embedded Linux system. Can last up to a few minutes. Cannot set! Used for Mythen only. Only get! - */ - descrToFuncMap[i].m_pFuncName="bustest"; // - descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdDigiTest; - i++; - - /*! \page test - - digibittest:[i] performs digital test of the module i. Returns 0 if succeeded, otherwise error mask. Only put! - */ - descrToFuncMap[i].m_pFuncName="digibittest"; // - descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdDigiTest; - i++; - - /*! \page test - - reg [addr] [val] ??? writes to an register \c addr with \c value in hexadecimal format. - */ - descrToFuncMap[i].m_pFuncName="reg"; // - descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdRegister; - i++; - - /*! \page test - - adcreg [addr] [val] ??? writes to an adc register \c addr with \c value in hexadecimal format. Only put! - */ - descrToFuncMap[i].m_pFuncName="adcreg"; // - descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdRegister; - i++; - - /*! \page test - - setbit ??? Only put! - */ - descrToFuncMap[i].m_pFuncName="setbit"; // - descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdRegister; - i++; - - /*! \page test - - clearbit ??? Only put! - */ - descrToFuncMap[i].m_pFuncName="clearbit"; // - descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdRegister; - i++; - - /*! \page test - - getbit ??? Only get! - */ - descrToFuncMap[i].m_pFuncName="getbit"; // - descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdRegister; - i++; - - - - - - - - - - /* settings, threshold */ /*! \page settings @@ -1597,283 +1542,394 @@ slsDetectorCommand::slsDetectorCommand(slsDetectorUtils *det) { descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdADC; i++; - /* r/w timers */ - /*! \page config - - timing [mode] sets/gets synchronization mode of the detector. Mode: auto, trigger, ro_trigger, gating, triggered_gating + + + /* file name */ + + /*! \page output Output settings + Commands to setup the file destination and format */ - descrToFuncMap[i].m_pFuncName="timing"; // - descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdTiming; - i++; - /*! \page config - - exptime [i] sets/gets exposure time in s + /*! \page output + - outdir [dir] Sets/gets the file output directory (string) */ - descrToFuncMap[i].m_pFuncName="exptime"; // - descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdTimer; + descrToFuncMap[i].m_pFuncName="outdir"; //OK + descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdOutDir; i++; - /*! \page config - - subexptime [i] sets/gets sub exposure time in s. Used in EIGER only in 32 bit mode. + /*! \page output + - fname [fn] Sets/gets the root of the output file name (string) */ - descrToFuncMap[i].m_pFuncName="subexptime"; // - descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdTimer; + descrToFuncMap[i].m_pFuncName="fname"; //OK + descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdFileName; i++; - /*! \page config - - period [i] sets/gets frame period in s. + /*! \page output + - index [i] Sets/gets the current file index (int) */ - descrToFuncMap[i].m_pFuncName="period"; // - descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdTimer; + descrToFuncMap[i].m_pFuncName="index"; //OK + descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdFileIndex; i++; - /*! \page config - - delay [i] sets/gets delay in s. Used in MYTHEN, GOTTHARD only + /*! \page output + - enablefwrite [i] Enables/disables file writing. 1 enables, 0 disables. */ - descrToFuncMap[i].m_pFuncName="delay"; // - descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdTimer; + descrToFuncMap[i].m_pFuncName="enablefwrite"; // + descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdEnablefwrite; i++; - /*! \page config - - gates [i] sets/gets number of gates. Used in MYTHEN, GOTTHARD, EIGER only + /*! \page output + - overwrite [i] enables(1) /disables(0) file overwriting */ - descrToFuncMap[i].m_pFuncName="gates"; // - descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdTimer; + descrToFuncMap[i].m_pFuncName="overwrite"; // + descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdOverwrite; i++; - /*! \page config - - gates [i] sets/gets number of frames. If \c timing is not \c auto, then it is the number of frames per cycle/trigger. + /*! \page output + - currentfname gets the filename for the data without index and extension */ - descrToFuncMap[i].m_pFuncName="frames"; // - descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdTimer; + descrToFuncMap[i].m_pFuncName="currentfname"; //OK + descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdFileName; i++; - /*! \page config - - cycles [i] sets/gets number of triggers. Timing mode should be set appropriately. + /*! \page output + - fileformat sets/gets the file format for data in receiver. Options: [ascii, binary, hdf5]. Ascii is not implemented in Receiver. */ - descrToFuncMap[i].m_pFuncName="cycles"; // - descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdTimer; + descrToFuncMap[i].m_pFuncName="fileformat"; //OK + descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdFileName; i++; - /*! \page config - - probes [i] sets/gets number of probes to accumulate. When setting, max 3! cycles should be set to 1, frames to the number of pump-probe events. Used in MYTHEN only + + + + /* Acquisition actions */ + + /*! \page actions Actions + Commands to define scripts to be executed during the acquisition flow */ - descrToFuncMap[i].m_pFuncName="probes"; // - descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdTimer; - i++; - /*! \page config - - measurements [i] sets/gets number of measurements. + /*! \page actions + - positions [n [p0..pn-1]] sets/gets number of angular position and positions to be acquired. */ - descrToFuncMap[i].m_pFuncName="measurements"; // - descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdTimer; + descrToFuncMap[i].m_pFuncName="positions"; // + descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdPositions; i++; - /*! \page config - - samples [i] sets/gets number of samples expected from the jctb. Used in CHIP TEST BOARD only. + /*! \page actions + - startscript [s] sets/gets the script to be executed at the beginning of the acquisition. \c none unsets. */ - descrToFuncMap[i].m_pFuncName="samples"; // - descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdTimer; + descrToFuncMap[i].m_pFuncName="startscript"; // + descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdScripts; i++; - /* read only timers */ - - /*! \page config - - exptimel gets exposure time left. Used in MYTHEN, GOTTHARD only. Only get! + /*! \page actions + - startscriptpar [s] sets/gets a string to be passed as a parameter to the startscript */ - descrToFuncMap[i].m_pFuncName="exptimel"; // - descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdTimeLeft; + descrToFuncMap[i].m_pFuncName="startscriptpar"; // + descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdScripts; i++; - /*! \page config - - periodl gets frame period left. Used in MYTHEN, GOTTHARD only. Only get! + /*! \page actions + - stopscript [s] sets/gets the script to be executed at the end of the acquisition. \c none unsets. */ - descrToFuncMap[i].m_pFuncName="periodl"; // - descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdTimeLeft; + descrToFuncMap[i].m_pFuncName="stopscript"; // + descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdScripts; i++; - /*! \page config - - delayl gets delay left. Used in MYTHEN, GOTTHARD only. Only get! + /*! \page actions + - stopscriptpar [s] sets/gets a string to be passed as a parameter to the stopscript */ - descrToFuncMap[i].m_pFuncName="delayl"; // - descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdTimeLeft; + descrToFuncMap[i].m_pFuncName="stopscriptpar"; // + descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdScripts; i++; - /*! \page config - - gatesl gets number of gates left. Used in MYTHEN, GOTTHARD only. Only get! + /*! \page actions + - scriptbefore [s] sets/gets the script to be executed before starting the detector every time in the acquisition. \c none unsets. */ - descrToFuncMap[i].m_pFuncName="gatesl"; // - descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdTimeLeft; + descrToFuncMap[i].m_pFuncName="scriptbefore"; // + descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdScripts; i++; - /*! \page config - - framesl gets number of frames left. Used in MYTHEN, GOTTHARD only. Only get! + /*! \page actions + - scriptbeforepar [s] sets/gets a string to be passed as a parameter to the scriptbefore */ - descrToFuncMap[i].m_pFuncName="framesl"; // - descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdTimeLeft; + descrToFuncMap[i].m_pFuncName="scriptbeforepar"; // + descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdScripts; i++; - /*! \page config - - cyclesl gets number of cylces left. Used in MYTHEN, GOTTHARD only. Only get! + /*! \page actions + - scriptafter [s] sets/gets the script to be executed after the detector has finished every time in the acquisition. \c none unsets. */ - descrToFuncMap[i].m_pFuncName="cyclesl"; // - descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdTimeLeft; + descrToFuncMap[i].m_pFuncName="scriptafter"; // + descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdScripts; i++; - /*! \page config - - probesl gets number of probes left. Used in MYTHEN, GOTTHARD only. Only get! + /*! \page actions + - scriptafterpar [s] sets/gets a string to be passed as a parameter to the scriptafter */ - descrToFuncMap[i].m_pFuncName="probesl"; // - descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdTimeLeft; + descrToFuncMap[i].m_pFuncName="scriptafterpar"; // + descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdScripts; i++; - // descrToFuncMap[i].m_pFuncName="progress"; - // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdTimer; - // i++; - - /*! \page config - - now ??? Only get! + /*! \page actions + - headerafter [s] sets/gets the script to be executed for logging the detector parameters. \c none unsets. */ - descrToFuncMap[i].m_pFuncName="now"; // - descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdTimeLeft; + descrToFuncMap[i].m_pFuncName="headerafter"; // + descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdScripts; i++; - /*! \page config - - timestamp ??? Only get! + /*! \page actions + - headerbefore [s] sets/gets the script to be executed for logging the detector parameters. \c none unsets. */ - descrToFuncMap[i].m_pFuncName="timestamp"; // - descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdTimeLeft; + descrToFuncMap[i].m_pFuncName="headerbefore"; // + descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdScripts; i++; - /*! \page config - - nframes ??? Only get! + /*! \page actions + - headerbeforepar [s] sets/gets a string to be passed as a parameter to the headerbefore script */ - descrToFuncMap[i].m_pFuncName="nframes"; // - descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdTimeLeft; + descrToFuncMap[i].m_pFuncName="headerbeforepar"; // + descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdScripts; i++; - /* speed */ - /*! \page config - - clkdivider [i] sets/gets the readout clock divider. EIGER, JUNGFRAU [0(fast speed), 1(half speed), 2(quarter speed)]. MYTHEN[???] + /*! \page actions + - headerafterpar [s] sets/gets a string to be passed as a parameter to the headerafter script */ - descrToFuncMap[i].m_pFuncName="clkdivider"; // - descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdSpeed; + descrToFuncMap[i].m_pFuncName="headerafterpar"; // + descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdScripts; i++; - /*! \page config - - clkdivider [i] sets/gets length of set/reset signals (in clock cycles). Used in MYTHEN only + /*! \page actions + - enacallog [i] enables/disables logging of the parameters necessary for the energy calibration. 1 sets, 0 unsets. */ - descrToFuncMap[i].m_pFuncName="setlength"; // - descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdSpeed; + descrToFuncMap[i].m_pFuncName="encallog"; // + descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdScripts; i++; - /*! \page config - - clkdivider [i] sets/gets waitstates of the bus interface (in clock cycles). Used in MYTHEN only + /*! \page actions + - angcallog [i] enables/disables logging of the parameters necessary for the angular calibration. 1 sets, 0 unsets. */ - descrToFuncMap[i].m_pFuncName="waitstates"; // - descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdSpeed; + descrToFuncMap[i].m_pFuncName="angcallog"; // + descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdScripts; i++; - /*! \page config - - clkdivider [i] sets/gets clock divider in tot mode. Used in MYTHEN only + /*! \page actions + - scan0script [s] sets/gets the script to be executed for the scan 0 level. \c none unsets. */ - descrToFuncMap[i].m_pFuncName="totdivider"; // - descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdSpeed; + descrToFuncMap[i].m_pFuncName="scan0script"; // + descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdScans; i++; - /*! \page config - - clkdivider [i] sets/gets duty cycle of the tot clock. Used in MYTHEN only + /*! \page actions + - scan0par [s] sets/gets a string to be passed as a parameter to the scan0script */ - descrToFuncMap[i].m_pFuncName="totdutycycle"; // - descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdSpeed; + descrToFuncMap[i].m_pFuncName="scan0par"; // + descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdScans; i++; - /*! \page config - - phasestep [i] ??? + /*! \page actions + - scan0prec [i] sets/gets number of digits to be used for the scan0 variable in the file name. */ - descrToFuncMap[i].m_pFuncName="phasestep"; // - descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdSpeed; + descrToFuncMap[i].m_pFuncName="scan0prec"; // + descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdScans; i++; - /*! \page config - - oversampling [i] ??? + /*! \page actions + - scan0steps [i [s0..sn-1]] sets/gets number of steps (int) of the scan0 level and their values (float). */ - descrToFuncMap[i].m_pFuncName="oversampling"; // - descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdSpeed; + descrToFuncMap[i].m_pFuncName="scan0steps"; // + descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdScans; i++; - /*! \page config - - adcclk [i] ??? + + /*! \page actions + - scan0range [smin smax sstep] sets scan0 min, max and step, returns the number of steps and their values as scan0steps. */ - descrToFuncMap[i].m_pFuncName="adcclk"; // - descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdSpeed; + descrToFuncMap[i].m_pFuncName="scan0range"; // + descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdScans; i++; - /*! \page config - - adcphase [i] ??? Used in MYTHEN, JUNGFRAU only. + /*! \page actions + - scan1script [s] sets/gets the script to be executed for the scan1 level. \c none unsets. */ - descrToFuncMap[i].m_pFuncName="adcphase"; // - descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdSpeed; + descrToFuncMap[i].m_pFuncName="scan1script"; // + descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdScans; i++; - /*! \page config - - adcpipeline [i] ??? + /*! \page actions + - scan1par [s] sets/gets a string to be passed as a parameter to the scan1script */ - descrToFuncMap[i].m_pFuncName="adcpipeline"; // - descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdSpeed; + descrToFuncMap[i].m_pFuncName="scan1par"; // + descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdScans; i++; - /*! \page config - - dbitclk [i] ??? + /*! \page actions + - scan1prec [i] sets/gets number of digits to be used for the scan1 variable in the file name. */ - descrToFuncMap[i].m_pFuncName="dbitclk"; // - descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdSpeed; + descrToFuncMap[i].m_pFuncName="scan1prec"; // + descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdScans; i++; - /*! \page config - - dbitphase [i] ??? + /*! \page actions + - scan1steps [i [s0..sn-1]] sets/gets number of steps (int) of the scan1 level and their values (float). */ - descrToFuncMap[i].m_pFuncName="dbitphase"; // - descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdSpeed; + descrToFuncMap[i].m_pFuncName="scan1steps"; // + descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdScans; i++; - - descrToFuncMap[i].m_pFuncName="dbitpipeline"; // - descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdSpeed; - i++; - - - /* settings dump/retrieve */ - - /*! \page config - - config [fname] sets/saves detector/receiver to configuration contained in fname. Same as executing sls_detector_put for every line. Normally a one time operation. + /*! \page actions + - scan1range [smin smax sstep] sets scan1 min, max and step, returns the number of steps and their values as scan1steps. */ - descrToFuncMap[i].m_pFuncName="config"; - descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdConfiguration; + descrToFuncMap[i].m_pFuncName="scan1range"; // + descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdScans; i++; - /* settings dump/retrieve */ - /*! \page config - - rx_printconfig prints the receiver configuration. Only get! + + + + + /* communication configuration */ + + /*! \page network Network + Commands to setup the network between client, detector and receiver + - rx_hostname [s] sets/gets the receiver hostname or IP address, configures detector mac with all network parameters and updates receiver with acquisition parameters. Normally used for single detectors (Can be multi-detector). \c none disables. If used, use as last network command in configuring detector MAC. */ - descrToFuncMap[i].m_pFuncName="rx_printconfig"; - descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdConfiguration; + descrToFuncMap[i].m_pFuncName="rx_hostname"; // + descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdNetworkParameter; + i++; + /*! \page network + - rx_udpip [ip] sets/gets the ip address of the receiver UDP interface where the data from the detector will be streamed to. Normally used for single detectors (Can be multi-detector). Used if different from eth0. + */ + descrToFuncMap[i].m_pFuncName="rx_udpip"; // + descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdNetworkParameter; i++; - /*! \page config - - parameters [fname] sets/saves detector parameters contained in fname. Normally once per different measurement. + /*! \page network + - rx_udpmac [mac] sets/gets the mac address of the receiver UDP interface where the data from the detector will be streamed to. Normally used for single detectors (Can be multi-detector). */ - descrToFuncMap[i].m_pFuncName="parameters"; - descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdConfiguration; + descrToFuncMap[i].m_pFuncName="rx_udpmac"; // + descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdNetworkParameter; i++; - /*! \page config - - setup [fname] sets/saves detector complete setup contained in fname (extensions automatically generated), including trimfiles, ff coefficients etc. + /*! \page network + - rx_udpport [port] sets/gets the port of the receiver UDP interface where the data from the detector will be streamed to. Use single-detector command. */ - descrToFuncMap[i].m_pFuncName="setup"; - descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdConfiguration; + descrToFuncMap[i].m_pFuncName="rx_udpport"; // + descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdNetworkParameter; i++; + /*! \page network + - rx_udpport2 [port] sets/gets the second port of the receiver UDP interface where the data from the second half of the detector will be streamed to. Use single-detector command. Used for EIGER only. + */ + descrToFuncMap[i].m_pFuncName="rx_udpport2"; // + descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdNetworkParameter; + i++; + + /*! \page network + - detectormac [mac] sets/gets the mac address of the detector UDP interface from where the detector will stream data. Use single-detector command. Normally unused. + */ + descrToFuncMap[i].m_pFuncName="detectormac"; // + descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdNetworkParameter; + i++; + + /*! \page network + - detectorip [ip] sets/gets the ip address of the detector UDP interface from where the detector will stream data. Use single-detector command. Keep in same subnet as rx_udpip (if rx_udpip specified). + */ + descrToFuncMap[i].m_pFuncName="detectorip"; // + descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdNetworkParameter; + i++; + + /*! \page network + - txndelay_left [delay] sets/gets the transmission delay of first packet in an image being streamed out from the detector's left UDP port. Use single-detector command. Used for EIGER only. + */ + descrToFuncMap[i].m_pFuncName="txndelay_left"; // + descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdNetworkParameter; + i++; + + /*! \page network + - txndelay_right [delay] sets/gets the transmission delay of first packet in an image being streamed out from the detector's right UDP port. Use single-detector command. Used for EIGER only. + */ + descrToFuncMap[i].m_pFuncName="txndelay_right"; // + descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdNetworkParameter; + i++; + + /*! \page network + - txndelay_frame [delay] sets/gets the transmission frame period of entire frame being streamed out from the detector for both ports. Use single-detector command. Used for EIGER only. + */ + descrToFuncMap[i].m_pFuncName="txndelay_frame"; // + descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdNetworkParameter; + i++; + + /*! \page network + - flowcontrol_10g [delay] Enables/disables 10 GbE flow control. 1 enables, 0 disables. Used for EIGER only. + */ + descrToFuncMap[i].m_pFuncName="flowcontrol_10g"; // + descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdNetworkParameter; + i++; + + /*! \page network + - zmqport [port] sets/gets the 0MQ (TCP) port of the receiver from where data is streamed to the client. Use single-detector command to set individually or multi-detector command to calculate based on \c port for the rest. + */ + descrToFuncMap[i].m_pFuncName="zmqport"; // + descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdNetworkParameter; + i++; + + /*! \page network + - configuremac [i] configures the MAC of the detector with these parameters: detectorip, detectormac, rx_udpip, rx_udpmac, rx_udpport, rx_udpport2 (if applicable). Only put! + */ + descrToFuncMap[i].m_pFuncName="configuremac"; // + descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdConfigureMac; + i++; + + /*! \page network + - rx_tcpport [port] sets/gets the port of the client-receiver TCP interface. Use single-detector command. Is different for each detector if same \c rx_hostname used. Must be first command to communicate with receiver. + */ + descrToFuncMap[i].m_pFuncName="rx_tcpport"; // + descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdPort; + i++; + + /*! \page network + - port [port] sets/gets the port of the client-detector control server TCP interface. Use single-detector command. Default value is 1952 for all detectors. Normally not changed. + */ + descrToFuncMap[i].m_pFuncName="port"; // + descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdPort; + i++; + + /*! \page network + - stopport [port] sets/gets the port of the client-detector stop server TCP interface. Use single-detector command. Default value is 1953 for all detectors. Normally not changed. + */ + descrToFuncMap[i].m_pFuncName="stopport"; // + descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdPort; + i++; + + + /*! \page network + - lock [i] Locks/Unlocks the detector to communicate with this client. 1 locks, 0 unlocks. + */ + descrToFuncMap[i].m_pFuncName="lock"; // + descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdLock; + i++; + + /*! \page network + - lastclient Gets the last client communicating with the detector. Cannot put! + */ + descrToFuncMap[i].m_pFuncName="lastclient"; // + descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdLastClient; + i++; + + + + + + + + + + + + + /* receiver functions */ @@ -1966,9 +2022,10 @@ slsDetectorCommand::slsDetectorCommand(slsDetectorUtils *det) { descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdReceiver; i++; - /* pattern generator */ + /* pattern generator */ + /*! \page ctb Chiptest board Commands specific for the new chiptest board as pattern generator */ @@ -1994,7 +2051,6 @@ slsDetectorCommand::slsDetectorCommand(slsDetectorUtils *det) { descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdPattern; i++; - /*! \page ctb - patword addr [word] sets/gets 64 bit word at address addr of pattern memory. Both address and word in hex format. Advanced! */ @@ -2002,7 +2058,6 @@ slsDetectorCommand::slsDetectorCommand(slsDetectorUtils *det) { descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdPattern; i++; - /*! \page ctb - patioctrl [word] sets/gets 64 bit mask defining input (0) and output (1) signals. hex format. */ @@ -2010,8 +2065,6 @@ slsDetectorCommand::slsDetectorCommand(slsDetectorUtils *det) { descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdPattern; i++; - - /*! \page ctb - patclkctrl [word] sets/gets 64 bit mask defining if output signal is a clock and runs. hex format. Unused at the moment. */ @@ -2019,7 +2072,6 @@ slsDetectorCommand::slsDetectorCommand(slsDetectorUtils *det) { descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdPattern; i++; - /*! \page ctb - patlimits [addr1 addr2] sets/gets the start and stop limits of the pattern to be executed. hex format. Advanced! */ @@ -2034,7 +2086,6 @@ slsDetectorCommand::slsDetectorCommand(slsDetectorUtils *det) { descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdPattern; i++; - /*! \page ctb - patnloop0 [n] sets/gets the number of cyclesof the level 0 loop (int). */ @@ -2042,7 +2093,6 @@ slsDetectorCommand::slsDetectorCommand(slsDetectorUtils *det) { descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdPattern; i++; - /*! \page ctb - patwait0 [addr] sets/gets the address of the level 0 wait point. hex format. Advanced! */ @@ -2050,7 +2100,6 @@ slsDetectorCommand::slsDetectorCommand(slsDetectorUtils *det) { descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdPattern; i++; - /*! \page ctb - patwaittime0 [n] sets/gets the duration of the witing of the 0 waiting point in clock cycles (int). */ @@ -2058,7 +2107,6 @@ slsDetectorCommand::slsDetectorCommand(slsDetectorUtils *det) { descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdPattern; i++; - /*! \page ctb - patloop1 [addr1 addr2] sets/gets the start and stop limits of the level 1 loop. hex format. Advanced! */ @@ -2066,7 +2114,6 @@ slsDetectorCommand::slsDetectorCommand(slsDetectorUtils *det) { descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdPattern; i++; - /*! \page ctb - patnloop1 [n] sets/gets the number of cyclesof the level 1 loop (int). */ @@ -2074,7 +2121,6 @@ slsDetectorCommand::slsDetectorCommand(slsDetectorUtils *det) { descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdPattern; i++; - /*! \page ctb - patwait1 [addr] sets/gets the address of the level 1 wait point. hex format. Advanced! */ @@ -2082,7 +2128,6 @@ slsDetectorCommand::slsDetectorCommand(slsDetectorUtils *det) { descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdPattern; i++; - /*! \page ctb - patwaittime1 [n] sets/gets the duration of the witing of the 1 waiting point in clock cycles (int). */ @@ -2090,7 +2135,6 @@ slsDetectorCommand::slsDetectorCommand(slsDetectorUtils *det) { descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdPattern; i++; - /*! \page ctb - patloop2 [addr1 addr2] sets/gets the start and stop limits of the level 2 loop. hex format. Advanced! */ @@ -2098,7 +2142,6 @@ slsDetectorCommand::slsDetectorCommand(slsDetectorUtils *det) { descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdPattern; i++; - /*! \page ctb - patnloop2 [n] sets/gets the number of cyclesof the level 2 loop (int). */ @@ -2106,7 +2149,6 @@ slsDetectorCommand::slsDetectorCommand(slsDetectorUtils *det) { descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdPattern; i++; - /*! \page ctb - patwait2 [addr] sets/gets the address of the level 2 wait point. hex format. Advanced! */ @@ -2114,8 +2156,6 @@ slsDetectorCommand::slsDetectorCommand(slsDetectorUtils *det) { descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdPattern; i++; - - /*! \page ctb - patwaittime2 [n] sets/gets the duration of the waiting of the 2 waiting point in clock cycles (int). */ @@ -2123,7 +2163,6 @@ slsDetectorCommand::slsDetectorCommand(slsDetectorUtils *det) { descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdPattern; i++; - /*! \page ctb - dut_clk [i] sets/gets the signal to be used as a clock for the digital data coming from the device under test. Advanced! */ @@ -2132,29 +2171,6 @@ slsDetectorCommand::slsDetectorCommand(slsDetectorUtils *det) { i++; - /* pulse */ - - /*! \page config - - pulse [n] [x] [y] pulses pixel at coordinates (x,y) n number of times. Used in EIGER only. Only put!" - */ - descrToFuncMap[i].m_pFuncName="pulse"; // - descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdPulse; - i++; - - /*! \page config - - pulsenmove [n] [x] [y] pulses pixel n number of times and moves relatively by x value (x axis) and y value(y axis). Used in EIGER only. Only put!" - */ - descrToFuncMap[i].m_pFuncName="pulsenmove"; // - descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdPulse; - i++; - - /*! \page config - - pulsechip [n]pulses chip n number of times, while n=-1 will reset it to normal mode. Used in EIGER only. Only put!" - */ - descrToFuncMap[i].m_pFuncName="pulsechip"; // - descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdPulse; - i++; - numberOfCommands=i;