diff --git a/slsDetectorSoftware/commonFiles/communication_funcs.c b/slsDetectorSoftware/commonFiles/communication_funcs.c index 71f180ae1..e00783c33 100755 --- a/slsDetectorSoftware/commonFiles/communication_funcs.c +++ b/slsDetectorSoftware/commonFiles/communication_funcs.c @@ -335,7 +335,7 @@ int sendDataOnly(int file_des, void* buf,int length) { int rc = write(file_des, (char*)((char*)buf + bytesSent), bytesToSend); // error if (rc < 0) { - cprintf(BG_RED, "Error writing to socket. Possible socket crash\n"); + cprintf(BG_RED, "Error writing to socket. Possible socket crash: left=%d rc=%d length=%d sent=%d\n", bytesToSend, rc, length, bytesSent); return bytesSent; } // also error, wrote nothing, buffer blocked up, too fast sending for client diff --git a/slsDetectorSoftware/jctbDetectorServer/gitInfo.txt b/slsDetectorSoftware/jctbDetectorServer/gitInfo.txt index 9580403d0..bb85eb2b5 100644 --- a/slsDetectorSoftware/jctbDetectorServer/gitInfo.txt +++ b/slsDetectorSoftware/jctbDetectorServer/gitInfo.txt @@ -1,9 +1,9 @@ Path: slsDetectorsPackage/slsDetectorSoftware/jctbDetectorServer URL: origin git@github.com:slsdetectorgroup/slsDetectorPackage.git Repository Root: origin git@github.com:slsdetectorgroup/slsDetectorPackage.git -Repsitory UUID: 40dedb8b07886171334c85a6f0035f02f868ac6d -Revision: 28 +Repsitory UUID: 2815458652a93d861e8bd082e537ac63d945f3fb +Revision: 31 Branch: developer -Last Changed Author: Gemma_Tinti -Last Changed Rev: 4052 -Last Changed Date: 2018-11-21 11:31:54.000000002 +0100 ./server_funcs.c +Last Changed Author: Anna_Bergamaschi +Last Changed Rev: 4057 +Last Changed Date: 2018-12-06 10:55:32.000000002 +0100 ./server_funcs.c diff --git a/slsDetectorSoftware/jctbDetectorServer/gitInfoMoench.h b/slsDetectorSoftware/jctbDetectorServer/gitInfoMoench.h index b058ce2e2..a033256cf 100644 --- a/slsDetectorSoftware/jctbDetectorServer/gitInfoMoench.h +++ b/slsDetectorSoftware/jctbDetectorServer/gitInfoMoench.h @@ -1,6 +1,6 @@ #define GITURL "git@github.com:slsdetectorgroup/slsDetectorPackage.git" -#define GITREPUUID "40dedb8b07886171334c85a6f0035f02f868ac6d" -#define GITAUTH "Gemma_Tinti" -#define GITREV 0x4052 -#define GITDATE 0x20181121 +#define GITREPUUID "2815458652a93d861e8bd082e537ac63d945f3fb" +#define GITAUTH "Anna_Bergamaschi" +#define GITREV 0x4057 +#define GITDATE 0x20181206 #define GITBRANCH "developer" diff --git a/slsDetectorSoftware/multiSlsDetector/multiSlsDetector.cpp b/slsDetectorSoftware/multiSlsDetector/multiSlsDetector.cpp index 200b0c51c..ecc9c213c 100644 --- a/slsDetectorSoftware/multiSlsDetector/multiSlsDetector.cpp +++ b/slsDetectorSoftware/multiSlsDetector/multiSlsDetector.cpp @@ -2380,7 +2380,7 @@ int* multiSlsDetector::startAndReadAll() { while ((retval = getDataFromDetector())) { ++i; #ifdef VERBOSE - std::cout << i << std::endl; + std::cout << i << " " retval << std::endl; #endif dataQueue.push(retval); } @@ -2458,7 +2458,7 @@ int* multiSlsDetector::getDataFromDetector() { int nodatadet = -1; int nodatadetectortype = false; detectorType types = getDetectorsType(); - if (types == EIGER || types == JUNGFRAU || GOTTHARD || PROPIX) { + if (types == EIGER || types == JUNGFRAU || types == GOTTHARD || types == PROPIX) { nodatadetectortype = true; } diff --git a/slsDetectorSoftware/slsDetector/slsDetector.cpp b/slsDetectorSoftware/slsDetector/slsDetector.cpp index dda709b13..2415e1164 100644 --- a/slsDetectorSoftware/slsDetector/slsDetector.cpp +++ b/slsDetectorSoftware/slsDetector/slsDetector.cpp @@ -145,7 +145,7 @@ double* slsDetector::decodeData(int *datain, int &nn, double *fdata) { dataout[ichan]=*((u_int16_t*)ptr); ptr+=2; } - std::cout<< "decoded "<< ichan << " channels" << std::endl; + //std::cout<< "decoded "<< ichan << " channels" << std::endl; } else { switch (nbits) { case 1: @@ -3821,8 +3821,8 @@ int* slsDetector::startAndReadAll() { //#ifdef VERBOSE #ifdef VERBOSE int i=0; -#endif //#endif +#endif if(thisDetector->myDetectorType == EIGER) { if (prepareAcquisition() == FAIL) return NULL; @@ -3832,15 +3832,15 @@ int* slsDetector::startAndReadAll() { // std::cout<< "started" << std::endl; //#endif while ((retval=getDataFromDetector())){ -#ifdef VERBOSE + #ifdef VERBOSE ++i; - std::cout<< i << std::endl; + // std::cout<< i << std::endl; //#else //std::cout<< "-" << flush; -#endif + #endif dataQueue.push(retval); - //std::cout<< "pushed" << std::endl; + // std::cout<< "pushed" << retval << std::endl; } disconnectControl(); @@ -3848,7 +3848,7 @@ int* slsDetector::startAndReadAll() { std::cout<< "received "<< i<< " frames" << std::endl; //#else // std::cout << std::endl; -#endif + #endif return dataQueue.front(); // check what we return! /* while ((retval=getDataFromDetectorNoWait())) ++i; @@ -3892,10 +3892,13 @@ int* slsDetector::getDataFromDetector(int *retval) { int nodatadetectortype = false; detectorType types = getDetectorsType(); - if(types == EIGER || types == JUNGFRAU || GOTTHARD || PROPIX){ + // cout << types << endl; + + if(types == EIGER || types == JUNGFRAU || types == GOTTHARD || types == PROPIX){ nodatadetectortype = true; } + //cout << "nodata det" << nodatadetectortype << endl; if (!nodatadetectortype && retval==NULL) retval=new int[nel]; @@ -3917,22 +3920,22 @@ int* slsDetector::getDataFromDetector(int *retval) { std::cout<< "Detector returned: " << mess << " " << n << std::endl; } else { ; -#ifdef VERBOSE + #ifdef VERBOSE std::cout<< "Detector successfully returned: " << mess << " " << n << std::endl; -#endif + #endif } if ((!nodatadetectortype) && (r==NULL)){ delete [] retval; } return NULL; } else if (!nodatadetectortype){ + // cout <<"??" << endl; + n=controlSocket->ReceiveDataOnly(retval,thisDetector->dataBytes); - n=controlSocket->ReceiveDataOnly(retval,thisDetector->dataBytes); - -#ifdef VERBOSE + #ifdef VERBOSE std::cout<< "Received "<< n << " data bytes" << std::endl; -#endif + #endif if (n!=thisDetector->dataBytes) { std::cout<< "wrong data size received from detector: received " << n << " but expected " << thisDetector->dataBytes << std::endl; @@ -3948,7 +3951,8 @@ int* slsDetector::getDataFromDetector(int *retval) { } - // cout << "get data returning " << endl; + + // cout << "get data returning " << retval << endl; // cout << endl; return retval; diff --git a/slsDetectorSoftware/slsDetectorAnalysis/fileIO.cpp b/slsDetectorSoftware/slsDetectorAnalysis/fileIO.cpp index 051094145..3bf92d45a 100644 --- a/slsDetectorSoftware/slsDetectorAnalysis/fileIO.cpp +++ b/slsDetectorSoftware/slsDetectorAnalysis/fileIO.cpp @@ -125,7 +125,7 @@ int fileIO::writeDataFile(void *data, int iframe) { int fileIO::closeDataFile() { - cout << "close file...." << endl; + // cout << "close file...." << endl; if (filefd) fclose(filefd); filefd=NULL; diff --git a/slsReceiverSoftware/include/genericSocket.h b/slsReceiverSoftware/include/genericSocket.h index a4833b62b..819e68cbc 100644 --- a/slsReceiverSoftware/include/genericSocket.h +++ b/slsReceiverSoftware/include/genericSocket.h @@ -666,9 +666,9 @@ public: if (tcpfd<0) return -1; while(length>0){ nsending = (length>packet_size) ? packet_size:length; - std::cout << "*"<0)