diff --git a/serverBin/gotthardDetectorServerv4.0.0.0 b/serverBin/gotthardDetectorServerv4.0.0.0 deleted file mode 120000 index 50e12c935..000000000 --- a/serverBin/gotthardDetectorServerv4.0.0.0 +++ /dev/null @@ -1 +0,0 @@ -../slsDetectorSoftware/gotthardDetectorServer/gotthardDetectorServerv4.0.0.0 \ No newline at end of file diff --git a/serverBin/gotthardDetectorServerv4.0.0.1 b/serverBin/gotthardDetectorServerv4.0.0.1 new file mode 120000 index 000000000..337eccaed --- /dev/null +++ b/serverBin/gotthardDetectorServerv4.0.0.1 @@ -0,0 +1 @@ +../slsDetectorSoftware/gotthardDetectorServer/gotthardDetectorServerv4.0.0.1 \ No newline at end of file diff --git a/slsDetectorSoftware/commonFiles/versionAPI.h b/slsDetectorSoftware/commonFiles/versionAPI.h index 6dae9daa0..13f1e1d5a 100644 --- a/slsDetectorSoftware/commonFiles/versionAPI.h +++ b/slsDetectorSoftware/commonFiles/versionAPI.h @@ -2,4 +2,4 @@ #define APIRECEIVER 0x180718 #define APIEIGER 0x180820 #define APIJUNGFRAU 0x180820 -#define APIGOTTHARD 0x180820 +#define APIGOTTHARD 0x180918 diff --git a/slsDetectorSoftware/gotthardDetectorServer/Makefile b/slsDetectorSoftware/gotthardDetectorServer/Makefile index a5f1667a6..b43f65031 100755 --- a/slsDetectorSoftware/gotthardDetectorServer/Makefile +++ b/slsDetectorSoftware/gotthardDetectorServer/Makefile @@ -31,6 +31,7 @@ versioning: $(PROGS): $(OBJS) # echo $(OBJS) $(CC) $(CFLAGS) -o $@ $^ $(LDLIBS_$@) $(LDFLAGS_$@) + rm gotthardDetectorServer.gdb install: $(PROGS) diff --git a/slsDetectorSoftware/gotthardDetectorServer/firmware_funcs.c b/slsDetectorSoftware/gotthardDetectorServer/firmware_funcs.c index 312165ef1..5e28d88a6 100755 --- a/slsDetectorSoftware/gotthardDetectorServer/firmware_funcs.c +++ b/slsDetectorSoftware/gotthardDetectorServer/firmware_funcs.c @@ -1261,6 +1261,7 @@ int setADC(int adc){ int configureMAC(int ipad,long long int macad,long long int detectormacad, int detipad, int ival, int udpport){ + startReceiver(1); #ifdef DDEBUG printf("Chip of Intrst Reg:%x\n",bus_r(CHIP_OF_INTRST_REG)); diff --git a/slsDetectorSoftware/gotthardDetectorServer/gitInfo.txt b/slsDetectorSoftware/gotthardDetectorServer/gitInfo.txt index 2f5bf5ec9..485b59dec 100644 --- a/slsDetectorSoftware/gotthardDetectorServer/gitInfo.txt +++ b/slsDetectorSoftware/gotthardDetectorServer/gitInfo.txt @@ -1,9 +1,9 @@ Path: slsDetectorsPackage/slsDetectorSoftware/gotthardDetectorServer URL: origin git@github.com:slsdetectorgroup/slsDetectorPackage.git Repository Root: origin git@github.com:slsdetectorgroup/slsDetectorPackage.git -Repsitory UUID: 63c130a3806b47332b1532ab00f9f344c5839e0e -Revision: 236 -Branch: 4.0.0-rc +Repsitory UUID: 255931bbde2721a1d7ddf3422ba9ee79ec7655f5 +Revision: 237 +Branch: 4.0.0 Last Changed Author: Dhanya_Thattil -Last Changed Rev: 3986 -Last Changed Date: 2018-08-20 11:38:13.000000002 +0200 ./server_funcs.h +Last Changed Rev: 4000 +Last Changed Date: 2018-09-18 17:37:25.000000002 +0200 ./server_funcs.c diff --git a/slsDetectorSoftware/gotthardDetectorServer/gitInfoGotthard.h b/slsDetectorSoftware/gotthardDetectorServer/gitInfoGotthard.h index 7a917f824..e5944cb43 100644 --- a/slsDetectorSoftware/gotthardDetectorServer/gitInfoGotthard.h +++ b/slsDetectorSoftware/gotthardDetectorServer/gitInfoGotthard.h @@ -1,6 +1,6 @@ #define GITURL "git@github.com:slsdetectorgroup/slsDetectorPackage.git" -#define GITREPUUID "63c130a3806b47332b1532ab00f9f344c5839e0e" +#define GITREPUUID "255931bbde2721a1d7ddf3422ba9ee79ec7655f5" #define GITAUTH "Dhanya_Thattil" -#define GITREV 0x3986 -#define GITDATE 0x20180820 -#define GITBRANCH "4.0.0-rc" +#define GITREV 0x4000 +#define GITDATE 0x20180918 +#define GITBRANCH "4.0.0" diff --git a/slsDetectorSoftware/gotthardDetectorServer/gotthardDetectorServer_virtual b/slsDetectorSoftware/gotthardDetectorServer/gotthardDetectorServer_virtual index 05e41e470..bb670e711 100755 Binary files a/slsDetectorSoftware/gotthardDetectorServer/gotthardDetectorServer_virtual and b/slsDetectorSoftware/gotthardDetectorServer/gotthardDetectorServer_virtual differ diff --git a/slsDetectorSoftware/gotthardDetectorServer/gotthardDetectorServerv4.0.0.0 b/slsDetectorSoftware/gotthardDetectorServer/gotthardDetectorServerv4.0.0.0 deleted file mode 100755 index 6d9ea118f..000000000 Binary files a/slsDetectorSoftware/gotthardDetectorServer/gotthardDetectorServerv4.0.0.0 and /dev/null differ diff --git a/slsDetectorSoftware/gotthardDetectorServer/gotthardDetectorServerv4.0.0.1 b/slsDetectorSoftware/gotthardDetectorServer/gotthardDetectorServerv4.0.0.1 new file mode 100755 index 000000000..6e2053f3c Binary files /dev/null and b/slsDetectorSoftware/gotthardDetectorServer/gotthardDetectorServerv4.0.0.1 differ diff --git a/slsDetectorSoftware/gotthardDetectorServer/mcb_funcs.c b/slsDetectorSoftware/gotthardDetectorServer/mcb_funcs.c index 3e16ddc2e..79879e4d1 100755 --- a/slsDetectorSoftware/gotthardDetectorServer/mcb_funcs.c +++ b/slsDetectorSoftware/gotthardDetectorServer/mcb_funcs.c @@ -2486,7 +2486,7 @@ ROI* setROI(int n, ROI arg[], int *retvalsize, int *ret){ } } } - + printf("\tGoing to enable adc: %d\n", adc); //set rois for just 1 adc - take only 1st roi if(adc!=-1){ @@ -2495,10 +2495,14 @@ ROI* setROI(int n, ROI arg[], int *retvalsize, int *ret){ rois[0].ymin=-1; rois[0].ymax=-1; nROI = 1; + printf("\tActual xmin:%d xmax:%d\n",rois[0].xmin,rois[0].xmax); }else nROI = 0; - if((arg[0].xmin!=rois[0].xmin)||(arg[0].xmax!=rois[0].xmax)||(arg[0].ymin!=rois[0].ymin)||(arg[0].ymax!=rois[0].ymax)) + if((n!=0) && ((arg[0].xmin!=rois[0].xmin)|| + (arg[0].xmax!=rois[0].xmax)|| + (arg[0].ymin!=rois[0].ymin)|| + (arg[0].ymax!=rois[0].ymax))) *ret=FAIL; if(n!=nROI) *ret=FAIL; @@ -2508,9 +2512,11 @@ ROI* setROI(int n, ROI arg[], int *retvalsize, int *ret){ } //#ifdef VERBOSE - printf("Rois:\n"); - for( i=0;imyDetectorType==GOTTHARD){ - //set frames per file - only for gotthard - pthread_mutex_lock(&ms); - if(retval==-1) - setFramesPerFile(MAX_FRAMES_PER_FILE); - else - setFramesPerFile(SHORT_MAX_FRAMES_PER_FILE); - pthread_mutex_unlock(&ms); - //connect to receiver + + // update roi in update receiver if(thisDetector->receiverOnlineFlag==ONLINE_FLAG){ + int fnum=F_RECEIVER_SHORT_FRAME; #ifdef VERBOSE std::cout << "Sending adc val to receiver " << retval << std::endl; #endif if (connectData() == OK){ - ret=thisReceiver->sendInt(fnum2,retval,retval); + ret=thisReceiver->sendInt(fnum,retval,retval); disconnectData(); } if(ret==FAIL) - setErrorMask((getErrorMask())|(COULD_NOT_CONFIGURE_MAC)); + setErrorMask((getErrorMask())|(COULDNOT_SET_ROI)); } } @@ -6132,17 +6127,23 @@ int slsDetector::sendROI(int n,ROI roiLimits[]) { } //update client - if(ret!=FAIL){ + if(ret==FAIL){ + setErrorMask((getErrorMask())|(COULDNOT_SET_ROI)); + } else { for(int i=0;iroiLimits[i]=retval[i]; thisDetector->nROI = retvalsize; } - //#ifdef VERBOSE +#ifdef VERBOSE for(int j=0;jnROI;++j) - cout<<"get"<< roiLimits[j].xmin<<"\t"<myDetectorType == GOTTHARD) + configureMAC(); return ret; } @@ -9026,13 +9027,6 @@ int slsDetector::startReceiver() { } } - - // tell detector to send to receiver (if start receiver failed, this is not executed) - if(((thisDetector->myDetectorType == GOTTHARD || - thisDetector->myDetectorType == PROPIX) && ret!= FAIL)) - return prepareAcquisition(); // send data to receiver for these detectors - - return ret; } @@ -9044,11 +9038,6 @@ int slsDetector::stopReceiver() { int ret = FAIL; char mess[MAX_STR_LENGTH] = ""; - if(thisDetector->myDetectorType == GOTTHARD || - thisDetector->myDetectorType == PROPIX) - cleanupAcquisition(); // reset (send data to receiver) for these detectors, - //so back to CPU (dont care about ok/fail at this point) - if (thisDetector->receiverOnlineFlag==ONLINE_FLAG) { #ifdef VERBOSE std::cout << "Stopping Receiver " << std::endl; diff --git a/slsDetectorSoftware/slsDetector/slsDetectorCommand.cpp b/slsDetectorSoftware/slsDetector/slsDetectorCommand.cpp index 9752e946e..398c937f9 100644 --- a/slsDetectorSoftware/slsDetector/slsDetectorCommand.cpp +++ b/slsDetectorSoftware/slsDetector/slsDetectorCommand.cpp @@ -4464,6 +4464,9 @@ string slsDetectorCommand::cmdDetectorSize(int narg, char *args[], int action) { myDet->setOnline(ONLINE_FLAG); + if (cmd == "roi") + myDet->setReceiverOnline(ONLINE_FLAG); + if (action==PUT_ACTION) { if (cmd=="maxmod") return string("cannot put!"); @@ -4481,10 +4484,10 @@ string slsDetectorCommand::cmdDetectorSize(int narg, char *args[], int action) { ROI allroi[val]; pos=2; for(i=0;isetROI(val,allroi);