From e0dc25905b3dcf9d380c7bc3704fe5d909c963f7 Mon Sep 17 00:00:00 2001 From: Dhanya Maliakal Date: Fri, 16 Sep 2016 12:48:32 +0200 Subject: [PATCH 1/5] done --- slsDetectorGui/src/qDrawPlot.cpp | 5 ++++- slsDetectorGui/src/qTabPlot.cpp | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/slsDetectorGui/src/qDrawPlot.cpp b/slsDetectorGui/src/qDrawPlot.cpp index 67f3ed720..8e308071d 100644 --- a/slsDetectorGui/src/qDrawPlot.cpp +++ b/slsDetectorGui/src/qDrawPlot.cpp @@ -333,6 +333,9 @@ void qDrawPlot::SetupWidgetWindow(){ myDet->registerMeasurementFinishedCallback(&(GetMeasurementFinishedCallBack),this); //Setting the callback function to get progress from detector class(using receivers) myDet->registerProgressCallback(&(GetProgressCallBack),this); + //stream data to the gui + myDet->setDataStreamingFromReceiver(1); + qDefs::checkErrorMessage(myDet,"qDrawPlot::SetupWidgetWindow"); } @@ -1946,7 +1949,7 @@ void qDrawPlot::SetFrameFactor(int frame){ frameFactor = frame; if(myDet->setReceiverOnline()==slsDetectorDefs::ONLINE_FLAG){ frame = myDet->setReadReceiverFrequency(1,frame); - if(frame > 0) frameFactor = 1; + /*if(frame > 0) frameFactor = 1;*//**what is this*/ #ifdef VERBOSE cout << "Receiver read frequency set to : " << frame << endl; #endif diff --git a/slsDetectorGui/src/qTabPlot.cpp b/slsDetectorGui/src/qTabPlot.cpp index 2c46f07f1..9cd16607b 100644 --- a/slsDetectorGui/src/qTabPlot.cpp +++ b/slsDetectorGui/src/qTabPlot.cpp @@ -1007,7 +1007,7 @@ void qTabPlot::SetScanArgument(){ } - cout <<"min:"<SetHistogram(radioHistogram->isChecked(),histArg,min,max,size); From 6abb1d2ae97abe0089bc75d94e3d12a1aacc242e Mon Sep 17 00:00:00 2001 From: Dhanya Maliakal Date: Fri, 16 Sep 2016 17:19:29 +0200 Subject: [PATCH 2/5] included json example with dummy values --- slsDetectorGui/CMakeLists.txt | 13 +++++++++++++ slsDetectorGui/src/qDrawPlot.cpp | 2 ++ 2 files changed, 15 insertions(+) diff --git a/slsDetectorGui/CMakeLists.txt b/slsDetectorGui/CMakeLists.txt index 343cabdc0..b3e57434a 100644 --- a/slsDetectorGui/CMakeLists.txt +++ b/slsDetectorGui/CMakeLists.txt @@ -88,6 +88,11 @@ include_directories( ${QWT_INCLUDE_DIR} ${CMAKE_CURRENT_BINARY_DIR} ) + +add_definitions( + -DDACS_INT -DVERBOSE -DPRINT_LOG +) + add_executable(slsDetectorGui ${SOURCES} ${HEADERS} @@ -100,12 +105,20 @@ set_target_properties(slsDetectorGui PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin ) +add_library(zmq STATIC IMPORTED ) + +set_target_properties(zmq PROPERTIES + IMPORTED_LOCATION ${CMAKE_CURRENT_SOURCE_DIR}/../slsReceiverSoftware/include/libzmq.a +) + target_link_libraries(slsDetectorGui slsDetectorShared ${QT_QTCORE_LIBRARIES} ${QT_QTGUI_LIBRARIES} ${QWT_LIBRARIES} pthread + zmq + rt ) add_executable(gui_client diff --git a/slsDetectorGui/src/qDrawPlot.cpp b/slsDetectorGui/src/qDrawPlot.cpp index 8e308071d..b35ceb470 100644 --- a/slsDetectorGui/src/qDrawPlot.cpp +++ b/slsDetectorGui/src/qDrawPlot.cpp @@ -1165,7 +1165,9 @@ int qDrawPlot::GetData(detectorData *data,int fIndex, int subIndex){ int qDrawPlot::GetAcquisitionFinishedCallBack(double currentProgress,int detectorStatus, void *this_pointer){ ((qDrawPlot*)this_pointer)->AcquisitionFinished(currentProgress,detectorStatus); +#ifdef VERYVERBOSE cout << "acquisition finished callback worked ok" << endl; +#endif return 0; } From 9f2430cace06bebb9981e1e6acbbfd214639fc81 Mon Sep 17 00:00:00 2001 From: Dhanya Maliakal Date: Tue, 20 Sep 2016 14:42:01 +0200 Subject: [PATCH 3/5] enablingdatastream name change --- slsDetectorGui/src/qDrawPlot.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/slsDetectorGui/src/qDrawPlot.cpp b/slsDetectorGui/src/qDrawPlot.cpp index b35ceb470..c5b884215 100644 --- a/slsDetectorGui/src/qDrawPlot.cpp +++ b/slsDetectorGui/src/qDrawPlot.cpp @@ -334,7 +334,7 @@ void qDrawPlot::SetupWidgetWindow(){ //Setting the callback function to get progress from detector class(using receivers) myDet->registerProgressCallback(&(GetProgressCallBack),this); //stream data to the gui - myDet->setDataStreamingFromReceiver(1); + myDet->enableDataStreamingFromReceiver(1); qDefs::checkErrorMessage(myDet,"qDrawPlot::SetupWidgetWindow"); From 723df0e9fbd53b150f2022b14cbfacbba188e3d1 Mon Sep 17 00:00:00 2001 From: Dhanya Maliakal Date: Thu, 6 Oct 2016 08:43:14 +0200 Subject: [PATCH 4/5] somewhere --- slsDetectorGui/src/qDrawPlot.cpp | 2 +- slsDetectorGui/src/qTabActions.cpp | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/slsDetectorGui/src/qDrawPlot.cpp b/slsDetectorGui/src/qDrawPlot.cpp index c5b884215..2bcc5a271 100644 --- a/slsDetectorGui/src/qDrawPlot.cpp +++ b/slsDetectorGui/src/qDrawPlot.cpp @@ -334,7 +334,7 @@ void qDrawPlot::SetupWidgetWindow(){ //Setting the callback function to get progress from detector class(using receivers) myDet->registerProgressCallback(&(GetProgressCallBack),this); //stream data to the gui - myDet->enableDataStreamingFromReceiver(1); + //myDet->enableDataStreamingFromReceiver(1); qDefs::checkErrorMessage(myDet,"qDrawPlot::SetupWidgetWindow"); diff --git a/slsDetectorGui/src/qTabActions.cpp b/slsDetectorGui/src/qTabActions.cpp index bbaf462fa..eb4022d4c 100644 --- a/slsDetectorGui/src/qTabActions.cpp +++ b/slsDetectorGui/src/qTabActions.cpp @@ -529,6 +529,9 @@ void qTabActions::Refresh(){ #ifdef VERBOSE cout << "**Updated all action widgets: " << endl << endl; #endif + + myDet->enableDataStreamingFromReceiver(1); + qDefs::checkErrorMessage(myDet,"qTabActions::Refresh"); } From 54b78363b03c279fbf62b688315b9b132e58ab83 Mon Sep 17 00:00:00 2001 From: Dhanya Maliakal Date: Thu, 6 Oct 2016 14:22:08 +0200 Subject: [PATCH 5/5] enabling datastream back to qdrawplot --- slsDetectorGui/src/qDrawPlot.cpp | 2 +- slsDetectorGui/src/qTabActions.cpp | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/slsDetectorGui/src/qDrawPlot.cpp b/slsDetectorGui/src/qDrawPlot.cpp index 2bcc5a271..c5b884215 100644 --- a/slsDetectorGui/src/qDrawPlot.cpp +++ b/slsDetectorGui/src/qDrawPlot.cpp @@ -334,7 +334,7 @@ void qDrawPlot::SetupWidgetWindow(){ //Setting the callback function to get progress from detector class(using receivers) myDet->registerProgressCallback(&(GetProgressCallBack),this); //stream data to the gui - //myDet->enableDataStreamingFromReceiver(1); + myDet->enableDataStreamingFromReceiver(1); qDefs::checkErrorMessage(myDet,"qDrawPlot::SetupWidgetWindow"); diff --git a/slsDetectorGui/src/qTabActions.cpp b/slsDetectorGui/src/qTabActions.cpp index eb4022d4c..ebc0ee140 100644 --- a/slsDetectorGui/src/qTabActions.cpp +++ b/slsDetectorGui/src/qTabActions.cpp @@ -530,8 +530,6 @@ void qTabActions::Refresh(){ cout << "**Updated all action widgets: " << endl << endl; #endif - myDet->enableDataStreamingFromReceiver(1); - qDefs::checkErrorMessage(myDet,"qTabActions::Refresh"); }