From e86e9361b635d8d2e705e85d25f9492cbf03036f Mon Sep 17 00:00:00 2001 From: Dhanya Maliakal Date: Fri, 3 Mar 2017 16:00:22 +0100 Subject: [PATCH 1/6] removed std:: to make round compile --- slsDetectorSoftware/slsDetectorAnalysis/energyConversion.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/slsDetectorSoftware/slsDetectorAnalysis/energyConversion.h b/slsDetectorSoftware/slsDetectorAnalysis/energyConversion.h index fa3410d73..54a104e03 100644 --- a/slsDetectorSoftware/slsDetectorAnalysis/energyConversion.h +++ b/slsDetectorSoftware/slsDetectorAnalysis/energyConversion.h @@ -75,7 +75,7 @@ class energyConversion V linearInterpolation(const E x, const E x1, const E x2, const V y1, const V y2){ double k = static_cast(y2-y1)/(x2-x1); double m = y1-k*x1; - int y = std::round( k*x+m ); + int y = round( k*x+m ); return static_cast(y); } From 0a1aaec708c055e06f326eb5eb37bf7041ea7e16 Mon Sep 17 00:00:00 2001 From: Dhanya Maliakal Date: Fri, 10 Mar 2017 13:24:00 +0100 Subject: [PATCH 2/6] resolved the recovering from receiver start error , but still does not acknowledge error in gui --- slsDetectorSoftware/slsDetector/slsDetector.cpp | 9 ++++++--- slsDetectorSoftware/slsDetector/slsDetectorUtils.cpp | 8 +++++--- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/slsDetectorSoftware/slsDetector/slsDetector.cpp b/slsDetectorSoftware/slsDetector/slsDetector.cpp index 980c317f4..1e5a87d9d 100644 --- a/slsDetectorSoftware/slsDetector/slsDetector.cpp +++ b/slsDetectorSoftware/slsDetector/slsDetector.cpp @@ -7525,9 +7525,12 @@ int slsDetector::startReceiver(){ setErrorMask((getErrorMask())|(COULDNOT_START_RECEIVER)); } } - //let detector prepare anyway even if receiver didnt work - if((thisDetector->myDetectorType != JUNGFRAU)) - ret=detectorSendToReceiver(true); + //let detector prepare anyway even if receiver didnt work (for those not using the receiver) + if((thisDetector->myDetectorType != JUNGFRAU)) { + int ret1 = detectorSendToReceiver(true); + if (ret != FAIL) + ret = ret1; + } return ret; } diff --git a/slsDetectorSoftware/slsDetector/slsDetectorUtils.cpp b/slsDetectorSoftware/slsDetector/slsDetectorUtils.cpp index 0e6d5e763..ec3d1dae5 100644 --- a/slsDetectorSoftware/slsDetector/slsDetectorUtils.cpp +++ b/slsDetectorSoftware/slsDetector/slsDetectorUtils.cpp @@ -226,9 +226,6 @@ int slsDetectorUtils::acquire(int delflag){ for (int ip=0; ip0) { @@ -297,12 +294,17 @@ int slsDetectorUtils::acquire(int delflag){ setFileName(fileIO::getFileName()); //start receiver if(startReceiver() == FAIL) { + cout << "Start receiver failed " << endl; stopReceiver(); *stoppedFlag=1; pthread_mutex_unlock(&mg); break; } pthread_mutex_unlock(&mg); + + //let processing thread listen to these packets + sem_post(&sem_newRTAcquisition); + } #ifdef VERBOSE cout << "Acquiring " << endl; From ecaa8e45a4595843b8ab2e143d62294612726341 Mon Sep 17 00:00:00 2001 From: Dhanya Maliakal Date: Wed, 15 Mar 2017 14:52:19 +0100 Subject: [PATCH 3/6] some changes to the command help --- .../slsDetector/slsDetectorCommand.cpp | 36 ++++++++++--------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/slsDetectorSoftware/slsDetector/slsDetectorCommand.cpp b/slsDetectorSoftware/slsDetector/slsDetectorCommand.cpp index e8c5e91ac..f977bd28e 100644 --- a/slsDetectorSoftware/slsDetector/slsDetectorCommand.cpp +++ b/slsDetectorSoftware/slsDetector/slsDetectorCommand.cpp @@ -647,10 +647,6 @@ slsDetectorCommand::slsDetectorCommand(slsDetectorUtils *det) { descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdDAC; i++; - descrToFuncMap[i].m_pFuncName="ib_test_c"; // - descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdDAC; - i++; - descrToFuncMap[i].m_pFuncName="dac0"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdDAC; i++; @@ -900,6 +896,10 @@ slsDetectorCommand::slsDetectorCommand(slsDetectorUtils *det) { descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdTimeLeft; i++; + descrToFuncMap[i].m_pFuncName="probesl"; // + descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdTimeLeft; + i++; + // descrToFuncMap[i].m_pFuncName="progress"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdTimer; // i++; @@ -1926,9 +1926,9 @@ string slsDetectorCommand::cmdEnablefwrite(int narg, char *args[], int action){ string slsDetectorCommand::helpEnablefwrite(int narg, char *args[], int action){ ostringstream os; if (action==GET_ACTION || action==HELP_ACTION) - os << string("When Enabled writes the data into the file\n"); + os << string("enablefwrite \t When Enabled writes the data into the file\n"); if (action==PUT_ACTION || action==HELP_ACTION) - os << string(" i \t should be 1 or 0 or -1\n"); + os << string("enablefwrite i \t should be 1 or 0 or -1\n"); return os.str(); } @@ -1958,9 +1958,9 @@ string slsDetectorCommand::cmdOverwrite(int narg, char *args[], int action){ string slsDetectorCommand::helpOverwrite(int narg, char *args[], int action){ ostringstream os; if (action==GET_ACTION || action==HELP_ACTION) - os << string("When Enabled overwrites files\n"); + os << string("overwrite \t When Enabled overwrites files\n"); if (action==PUT_ACTION || action==HELP_ACTION) - os << string(" i \t should be 1 or 0 or -1\n"); + os << string("overwrite i \t should be 1 or 0 or -1\n"); return os.str(); } @@ -1990,7 +1990,7 @@ string slsDetectorCommand::helpFileIndex(int narg, char *args[], int action){ if (action==GET_ACTION || action==HELP_ACTION) os << string("index \t gets the file index for the next the data file\n"); if (action==PUT_ACTION || action==HELP_ACTION) - os << string("fname i \t sets the fileindex for the next data file\n"); + os << string("index i \t sets the fileindex for the next data file\n"); return os.str(); } @@ -2866,7 +2866,7 @@ string slsDetectorCommand::helpNetworkParameter(int narg, char *args[], int acti os << "txndelay_left \n gets detector transmission delay of the left port"<< std::endl; os << "txndelay_right \n gets detector transmission delay of the right port"<< std::endl; os << "txndelay_frame \n gets detector transmission delay of the entire frame"<< std::endl; - os << "flowcontrol_10g \n sets flow control for 10g for eiger"<< std::endl; + os << "flowcontrol_10g \n gets flow control for 10g for eiger"<< std::endl; } return os.str(); @@ -3957,13 +3957,13 @@ string slsDetectorCommand::helpDAC(int narg, char *args[], int action) { os << "dac0 " << "\t gets dac 0" << std::endl; - os << "dac1 " << "\t gets dac 0" << std::endl; - os << "dac2 " << "\t gets dac 0" << std::endl; - os << "dac3 " << "\t gets dac 0" << std::endl; - os << "dac4 " << "\t gets dac 0" << std::endl; - os << "dac5 " << "\t gets dac 0" << std::endl; - os << "dac6 " << "\t gets dac 0" << std::endl; - os << "dac7 " << "\t gets dac 0" << std::endl; + os << "dac1 " << "\t gets dac 1" << std::endl; + os << "dac2 " << "\t gets dac 2" << std::endl; + os << "dac3 " << "\t gets dac 3" << std::endl; + os << "dac4 " << "\t gets dac 4" << std::endl; + os << "dac5 " << "\t gets dac 5" << std::endl; + os << "dac6 " << "\t gets dac 6" << std::endl; + os << "dac7 " << "\t gets dac 7" << std::endl; os << "vsvp" << "dacu\t gets vsvp" << std::endl; os << "vsvn" << "dacu\t gets vsvn" << std::endl; @@ -4527,11 +4527,13 @@ string slsDetectorCommand::helpAdvanced(int narg, char *args[], int action) { os << "flags mode \t sets the readout flags to mode. can be none, storeinram, tot, continous, parallel, nonparallel, safe, unknown" << std::endl; os << "programfpga f \t programs the fpga with file f (with .pof extension)." << std::endl; os << "resetfpga f \t resets fpga, f can be any value" << std::endl; + os << "powerchip i \t powers on or off the chip. i = 1 for on, i = 0 for off" << std::endl; } if (action==GET_ACTION || action==HELP_ACTION) { os << "extsig:i \t gets the mode of the external signal i. can be \n \t \t \t off, \n \t \t \t gate_in_active_high, \n \t \t \t gate_in_active_low, \n \t \t \t trigger_in_rising_edge, \n \t \t \t trigger_in_falling_edge, \n \t \t \t ro_trigger_in_rising_edge, \n \t \t \t ro_trigger_in_falling_edge, \n \t \t \t gate_out_active_high, \n \t \t \t gate_out_active_low, \n \t \t \t trigger_out_rising_edge, \n \t \t \t trigger_out_falling_edge, \n \t \t \t ro_trigger_out_rising_edge, \n \t \t \t ro_trigger_out_falling_edge" << std::endl; os << "flags \t gets the readout flags. can be none, storeinram, tot, continous, parallel, nonparallel, safe, unknown" << std::endl; + os << "powerchip \t gets if the chip has been powered on or off" << std::endl; } return os.str(); From dc77b07c92c7f72eac56a0165df221887a7b8f00 Mon Sep 17 00:00:00 2001 From: Dhanya Maliakal Date: Wed, 15 Mar 2017 15:02:22 +0100 Subject: [PATCH 4/6] update rev --- slsDetectorSoftware/eigerDetectorServer/gitInfo.txt | 8 ++++---- slsDetectorSoftware/eigerDetectorServer/gitInfoEiger.h | 8 ++++---- slsDetectorSoftware/gitInfo.txt | 8 ++++---- slsDetectorSoftware/slsDetector/gitInfoLib.h | 8 ++++---- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/slsDetectorSoftware/eigerDetectorServer/gitInfo.txt b/slsDetectorSoftware/eigerDetectorServer/gitInfo.txt index d80274262..3595d0984 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/eigerDetectorServer Repository Root: origin git@git.psi.ch:sls_detectors_software/sls_detector_software.git -Repsitory UUID: 44df2b221f9f06f7d4361ed0291e026ecbefcab2 -Revision: 270 +Repsitory UUID: d377e39dfb25b3d8a11652bf6ede0f185c86bd21 +Revision: 272 Branch: 2.3-rc Last Changed Author: Dhanya_Maliakal -Last Changed Rev: 1326 -Last Changed Date: 2017-02-10 11:51:05 +0100 +Last Changed Rev: 1333 +Last Changed Date: 2017-03-15 14:52:19 +0100 diff --git a/slsDetectorSoftware/eigerDetectorServer/gitInfoEiger.h b/slsDetectorSoftware/eigerDetectorServer/gitInfoEiger.h index f460f2d6f..caf86cc15 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/eigerDetectorServer" //#define SVNREPPATH "" -#define SVNREPUUID "44df2b221f9f06f7d4361ed0291e026ecbefcab2" -//#define SVNREV 0x1326 +#define SVNREPUUID "d377e39dfb25b3d8a11652bf6ede0f185c86bd21" +//#define SVNREV 0x1333 //#define SVNKIND "" //#define SVNSCHED "" #define SVNAUTH "Dhanya_Maliakal" -#define SVNREV 0x1326 -#define SVNDATE 0x20170210 +#define SVNREV 0x1333 +#define SVNDATE 0x20170315 // diff --git a/slsDetectorSoftware/gitInfo.txt b/slsDetectorSoftware/gitInfo.txt index d3cf1b598..1fcf849bd 100644 --- a/slsDetectorSoftware/gitInfo.txt +++ b/slsDetectorSoftware/gitInfo.txt @@ -1,9 +1,9 @@ Path: slsDetectorsPackage/slsDetectorSoftware 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: 44df2b221f9f06f7d4361ed0291e026ecbefcab2 -Revision: 1326 +Repsitory UUID: d377e39dfb25b3d8a11652bf6ede0f185c86bd21 +Revision: 1333 Branch: 2.3-rc Last Changed Author: Dhanya_Maliakal -Last Changed Rev: 1326 -Last Changed Date: 2017-02-10 11:51:05 +0100 +Last Changed Rev: 1333 +Last Changed Date: 2017-03-15 14:52:19 +0100 diff --git a/slsDetectorSoftware/slsDetector/gitInfoLib.h b/slsDetectorSoftware/slsDetector/gitInfoLib.h index 311cab137..9d7a32e9d 100644 --- a/slsDetectorSoftware/slsDetector/gitInfoLib.h +++ b/slsDetectorSoftware/slsDetector/gitInfoLib.h @@ -1,11 +1,11 @@ //#define SVNPATH "" #define SVNURLLIB "git@git.psi.ch:sls_detectors_software/sls_detector_software.git" //#define SVNREPPATH "" -#define SVNREPUUIDLIB "44df2b221f9f06f7d4361ed0291e026ecbefcab2" -//#define SVNREV 0x1326 +#define SVNREPUUIDLIB "d377e39dfb25b3d8a11652bf6ede0f185c86bd21" +//#define SVNREV 0x1333 //#define SVNKIND "" //#define SVNSCHED "" #define SVNAUTHLIB "Dhanya_Maliakal" -#define SVNREVLIB 0x1326 -#define SVNDATELIB 0x20170210 +#define SVNREVLIB 0x1333 +#define SVNDATELIB 0x20170315 // From 4b388f56b2c590f5bbcf8c01441fe71b014e076b Mon Sep 17 00:00:00 2001 From: Dhanya Maliakal Date: Mon, 20 Mar 2017 09:27:38 +0100 Subject: [PATCH 5/6] fixed gui for new header --- .../multiSlsDetector/multiSlsDetector.cpp | 23 +++++++++++-------- .../multiSlsDetector/multiSlsDetector.h | 2 +- slsDetectorSoftware/slsDetector/gitInfoLib.h | 6 ++--- 3 files changed, 18 insertions(+), 13 deletions(-) diff --git a/slsDetectorSoftware/multiSlsDetector/multiSlsDetector.cpp b/slsDetectorSoftware/multiSlsDetector/multiSlsDetector.cpp index c0c642c3e..80f4f1e9b 100644 --- a/slsDetectorSoftware/multiSlsDetector/multiSlsDetector.cpp +++ b/slsDetectorSoftware/multiSlsDetector/multiSlsDetector.cpp @@ -5162,12 +5162,13 @@ int multiSlsDetector::createReceivingDataSockets(const bool destroy){ -int multiSlsDetector::getData(const int isocket, const bool masking, int* image, const int size, int &acqIndex, int &frameIndex, int &subframeIndex, string &filename){ +int multiSlsDetector::getData(const int isocket, const bool masking, int* image, const int size, uint64_t &acqIndex, uint64_t &frameIndex, uint32_t &subframeIndex, string &filename){ zmq_msg_t message; //scan header------------------------------------------------------------------- zmq_msg_init (&message); + //cprintf(BLUE,"%d going to receive message\n", isocket); int len = zmq_msg_recv(&message, zmqsocket[isocket], 0); if (len == -1) { cprintf(BG_RED,"Could not read header for socket %d\n",isocket); @@ -5178,7 +5179,7 @@ int multiSlsDetector::getData(const int isocket, const bool masking, int* image, // error if you print it - // cout << isocket << " header len:"< Date: Mon, 20 Mar 2017 09:28:02 +0100 Subject: [PATCH 6/6] updaterev --- slsDetectorSoftware/eigerDetectorServer/gitInfo.txt | 8 ++++---- slsDetectorSoftware/eigerDetectorServer/gitInfoEiger.h | 8 ++++---- slsDetectorSoftware/gitInfo.txt | 8 ++++---- slsDetectorSoftware/slsDetector/gitInfoLib.h | 8 ++++---- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/slsDetectorSoftware/eigerDetectorServer/gitInfo.txt b/slsDetectorSoftware/eigerDetectorServer/gitInfo.txt index 3595d0984..73a292e8d 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/eigerDetectorServer Repository Root: origin git@git.psi.ch:sls_detectors_software/sls_detector_software.git -Repsitory UUID: d377e39dfb25b3d8a11652bf6ede0f185c86bd21 -Revision: 272 +Repsitory UUID: f54cba156ce79a2b50445326a8ca4d1dc7d3cc5a +Revision: 273 Branch: 2.3-rc Last Changed Author: Dhanya_Maliakal -Last Changed Rev: 1333 -Last Changed Date: 2017-03-15 14:52:19 +0100 +Last Changed Rev: 1335 +Last Changed Date: 2017-03-20 09:27:38 +0100 diff --git a/slsDetectorSoftware/eigerDetectorServer/gitInfoEiger.h b/slsDetectorSoftware/eigerDetectorServer/gitInfoEiger.h index caf86cc15..daff8cd94 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/eigerDetectorServer" //#define SVNREPPATH "" -#define SVNREPUUID "d377e39dfb25b3d8a11652bf6ede0f185c86bd21" -//#define SVNREV 0x1333 +#define SVNREPUUID "f54cba156ce79a2b50445326a8ca4d1dc7d3cc5a" +//#define SVNREV 0x1335 //#define SVNKIND "" //#define SVNSCHED "" #define SVNAUTH "Dhanya_Maliakal" -#define SVNREV 0x1333 -#define SVNDATE 0x20170315 +#define SVNREV 0x1335 +#define SVNDATE 0x20170320 // diff --git a/slsDetectorSoftware/gitInfo.txt b/slsDetectorSoftware/gitInfo.txt index 1fcf849bd..01b4cedad 100644 --- a/slsDetectorSoftware/gitInfo.txt +++ b/slsDetectorSoftware/gitInfo.txt @@ -1,9 +1,9 @@ Path: slsDetectorsPackage/slsDetectorSoftware 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: d377e39dfb25b3d8a11652bf6ede0f185c86bd21 -Revision: 1333 +Repsitory UUID: f54cba156ce79a2b50445326a8ca4d1dc7d3cc5a +Revision: 1335 Branch: 2.3-rc Last Changed Author: Dhanya_Maliakal -Last Changed Rev: 1333 -Last Changed Date: 2017-03-15 14:52:19 +0100 +Last Changed Rev: 1335 +Last Changed Date: 2017-03-20 09:27:38 +0100 diff --git a/slsDetectorSoftware/slsDetector/gitInfoLib.h b/slsDetectorSoftware/slsDetector/gitInfoLib.h index 99cccc54e..d2e095d8f 100644 --- a/slsDetectorSoftware/slsDetector/gitInfoLib.h +++ b/slsDetectorSoftware/slsDetector/gitInfoLib.h @@ -1,11 +1,11 @@ //#define SVNPATH "" #define SVNURLLIB "git@git.psi.ch:sls_detectors_software/sls_detector_software.git" //#define SVNREPPATH "" -#define SVNREPUUIDLIB "47364f3d330963633264a8dcfcbdf4195b916068" -//#define SVNREV 0x1334 +#define SVNREPUUIDLIB "f54cba156ce79a2b50445326a8ca4d1dc7d3cc5a" +//#define SVNREV 0x1335 //#define SVNKIND "" //#define SVNSCHED "" #define SVNAUTHLIB "Dhanya_Maliakal" -#define SVNREVLIB 0x1334 -#define SVNDATELIB 0x20170315 +#define SVNREVLIB 0x1335 +#define SVNDATELIB 0x20170320 //