mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-22 14:38:14 +02:00
some changes for quitting gui and continuing with acquire from command line
This commit is contained in:
parent
dc16d52d49
commit
1545d37f36
@ -5058,7 +5058,7 @@ void multiSlsDetector::startReceivingDataThread(){
|
|||||||
void *context;
|
void *context;
|
||||||
void *zmqsocket;
|
void *zmqsocket;
|
||||||
context = zmq_ctx_new();
|
context = zmq_ctx_new();
|
||||||
zmqsocket = zmq_socket(context, ZMQ_SUB);
|
zmqsocket = zmq_socket(context, ZMQ_PULL);
|
||||||
zmq_connect(zmqsocket, hostname);
|
zmq_connect(zmqsocket, hostname);
|
||||||
cout << "ZMQ Client of " << ithread << " at " << hostname << endl;
|
cout << "ZMQ Client of " << ithread << " at " << hostname << endl;
|
||||||
cprintf(BLUE,"%d Created socket\n",ithread);
|
cprintf(BLUE,"%d Created socket\n",ithread);
|
||||||
@ -5537,6 +5537,7 @@ int multiSlsDetector::enableDataStreamingFromReceiver(int enable){
|
|||||||
|
|
||||||
if(enable >= 0){
|
if(enable >= 0){
|
||||||
|
|
||||||
|
if(threadStarted != enable){
|
||||||
//destroy data threads
|
//destroy data threads
|
||||||
if(threadStarted)
|
if(threadStarted)
|
||||||
createReceivingDataThreads(true);
|
createReceivingDataThreads(true);
|
||||||
@ -5551,6 +5552,7 @@ int multiSlsDetector::enableDataStreamingFromReceiver(int enable){
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
int ret=-100, ret1;
|
int ret=-100, ret1;
|
||||||
@ -5566,10 +5568,10 @@ int multiSlsDetector::enableDataStreamingFromReceiver(int enable){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ret < 0)
|
if(enable == -1)
|
||||||
return -1;
|
return threadStarted;
|
||||||
else
|
else
|
||||||
return (ret & threadStarted);
|
return (threadStarted & ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
int multiSlsDetector::enableReceiverCompression(int i){
|
int multiSlsDetector::enableReceiverCompression(int i){
|
||||||
|
@ -67,17 +67,25 @@ int slsDetectorUtils::acquire(int delflag){
|
|||||||
|
|
||||||
//start data streaming threads in receiver if enabled
|
//start data streaming threads in receiver if enabled
|
||||||
ret = enableDataStreamingFromReceiver(-1);
|
ret = enableDataStreamingFromReceiver(-1);
|
||||||
if(dataReady == NULL){
|
cout<<"getting datastream:"<<ret<<endl;
|
||||||
|
cout<<"result of enabledatastream:"<<enableDataStreamingFromReceiver(ret)<<endl;
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
ret = enableDataStreamingFromReceiver(-1);
|
||||||
|
cout<<"ret of datastream:"<<ret<<endl;
|
||||||
|
if(dataReady == NULL){cout<<"dataready is null"<<endl;
|
||||||
if(ret){
|
if(ret){
|
||||||
cout << "Disabling Data Streaming from Receiver" << endl;
|
cout << "Disabling Data Streaming from Receiver" << endl;
|
||||||
enableDataStreamingFromReceiver(0); //no call back but streaming enabled, then dont stream.
|
enableDataStreamingFromReceiver(0); //no call back but streaming enabled, then dont stream.
|
||||||
}
|
}
|
||||||
}else{
|
}else{cout<<"dataeady is not nul"<<endl;
|
||||||
if(*threadedProcessing && (!ret || ret == -1)){
|
if(*threadedProcessing && (ret <= 0)){
|
||||||
cout << "Enabling Data Streaming from Receiver" << endl;
|
cout << "Enabling Data Streaming from Receiver" << endl;
|
||||||
enableDataStreamingFromReceiver(1); //call back exists, threaded but streaming disabled, then stream.
|
enableDataStreamingFromReceiver(1); //call back exists, threaded but streaming disabled, then stream.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user