mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-05-04 03:40:04 +02:00
in between separating datastreaming in client and receiver
This commit is contained in:
parent
52a9303a5e
commit
eb4ab306c7
@ -323,7 +323,6 @@ void qDrawPlot::SetupWidgetWindow(){
|
|||||||
|
|
||||||
|
|
||||||
// callbacks
|
// callbacks
|
||||||
|
|
||||||
// Setting the callback function to get data from detector class
|
// Setting the callback function to get data from detector class
|
||||||
myDet->registerDataCallback(&(GetDataCallBack),this);
|
myDet->registerDataCallback(&(GetDataCallBack),this);
|
||||||
//Setting the callback function to alert when acquisition finished from detector class
|
//Setting the callback function to alert when acquisition finished from detector class
|
||||||
@ -333,6 +332,13 @@ void qDrawPlot::SetupWidgetWindow(){
|
|||||||
//Setting the callback function to get progress from detector class(using receivers)
|
//Setting the callback function to get progress from detector class(using receivers)
|
||||||
myDet->registerProgressCallback(&(GetProgressCallBack),this);
|
myDet->registerProgressCallback(&(GetProgressCallBack),this);
|
||||||
|
|
||||||
|
|
||||||
|
// if receiver, enable data streaming from receiver and client
|
||||||
|
if(myDet->setReceiverOnline() == slsDetectorDefs::ONLINE_FLAG) {
|
||||||
|
myDet->enableDataStreamingFromReceiver(1);
|
||||||
|
myDet->enableDataStreamingToClient(1);
|
||||||
|
}
|
||||||
|
|
||||||
qDefs::checkErrorMessage(myDet,"qDrawPlot::SetupWidgetWindow");
|
qDefs::checkErrorMessage(myDet,"qDrawPlot::SetupWidgetWindow");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -732,17 +738,15 @@ void qDrawPlot::SetupMeasurement(){
|
|||||||
|
|
||||||
void* qDrawPlot::DataStartAcquireThread(void *this_pointer){
|
void* qDrawPlot::DataStartAcquireThread(void *this_pointer){
|
||||||
// stream data from receiver to the gui
|
// stream data from receiver to the gui
|
||||||
if(((qDrawPlot*)this_pointer)->myDet->setReceiverOnline(slsDetectorDefs::GET_ONLINE_FLAG) == slsDetectorDefs::ONLINE_FLAG) {
|
if(((qDrawPlot*)this_pointer)->myDet->setReceiverOnline() == slsDetectorDefs::ONLINE_FLAG) {
|
||||||
//if it was not on
|
|
||||||
if ( (((qDrawPlot*)this_pointer)->myDet->getStreamingSocketsCreatedInClient() != 1)
|
// if receiver data up streaming not on, switch it on
|
||||||
|| (((qDrawPlot*)this_pointer)->myDet->enableDataStreamingFromReceiver(-1)!= 1) ){
|
if (((qDrawPlot*)this_pointer)->myDet->enableDataStreamingFromReceiver() != 1)
|
||||||
//switch it on, if error
|
|
||||||
if (((qDrawPlot*)this_pointer)->myDet->enableDataStreamingFromReceiver(1) != 1) {
|
if (((qDrawPlot*)this_pointer)->myDet->enableDataStreamingFromReceiver(1) != 1) {
|
||||||
qDefs::checkErrorMessage(((qDrawPlot*)this_pointer)->myDet,"qDrawPlot::DataStartAcquireThread");
|
qDefs::checkErrorMessage(((qDrawPlot*)this_pointer)->myDet,"qDrawPlot::DataStartAcquireThread");
|
||||||
return this_pointer;
|
return this_pointer;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
((qDrawPlot*)this_pointer)->myDet->acquire(1);
|
((qDrawPlot*)this_pointer)->myDet->acquire(1);
|
||||||
return this_pointer;
|
return this_pointer;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user