mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-26 16:20:03 +02:00
Merge branch '3.0.1' into developer
This commit is contained in:
commit
2067f47f34
@ -3733,10 +3733,12 @@ string multiSlsDetector::setNetworkParameter(networkParameter p, string s){
|
|||||||
case RECEIVER_STREAMING_PORT:
|
case RECEIVER_STREAMING_PORT:
|
||||||
prev_streaming = enableDataStreamingFromReceiver();
|
prev_streaming = enableDataStreamingFromReceiver();
|
||||||
enableDataStreamingFromReceiver(0);
|
enableDataStreamingFromReceiver(0);
|
||||||
|
enableDataStreamingToClient(0);
|
||||||
break;
|
break;
|
||||||
case CLIENT_STREAMING_PORT:
|
case CLIENT_STREAMING_PORT:
|
||||||
prev_streaming = enableDataStreamingToClient();
|
prev_streaming = enableDataStreamingToClient();
|
||||||
enableDataStreamingToClient(0);
|
enableDataStreamingToClient(0);
|
||||||
|
enableDataStreamingFromReceiver(0);
|
||||||
break;
|
break;
|
||||||
case RECEIVER_STREAMING_SRC_IP:
|
case RECEIVER_STREAMING_SRC_IP:
|
||||||
prev_streaming = enableDataStreamingFromReceiver();
|
prev_streaming = enableDataStreamingFromReceiver();
|
||||||
@ -3807,9 +3809,11 @@ string multiSlsDetector::setNetworkParameter(networkParameter p, string s){
|
|||||||
switch (p) {
|
switch (p) {
|
||||||
case RECEIVER_STREAMING_PORT:
|
case RECEIVER_STREAMING_PORT:
|
||||||
enableDataStreamingFromReceiver(1);
|
enableDataStreamingFromReceiver(1);
|
||||||
|
enableDataStreamingToClient(1);
|
||||||
break;
|
break;
|
||||||
case CLIENT_STREAMING_PORT:
|
case CLIENT_STREAMING_PORT:
|
||||||
enableDataStreamingToClient(1);
|
enableDataStreamingToClient(1);
|
||||||
|
enableDataStreamingFromReceiver(1);
|
||||||
break;
|
break;
|
||||||
case RECEIVER_STREAMING_SRC_IP:
|
case RECEIVER_STREAMING_SRC_IP:
|
||||||
enableDataStreamingFromReceiver(1);
|
enableDataStreamingFromReceiver(1);
|
||||||
|
@ -8764,31 +8764,35 @@ int slsDetector::setReceiverReadTimer(int time_in_ms){
|
|||||||
|
|
||||||
|
|
||||||
int slsDetector::enableDataStreamingFromReceiver(int enable){
|
int slsDetector::enableDataStreamingFromReceiver(int enable){
|
||||||
int fnum=F_STREAM_DATA_FROM_RECEIVER;
|
|
||||||
int ret = FAIL;
|
if (enable >= 0) {
|
||||||
int retval=-1;
|
int fnum=F_STREAM_DATA_FROM_RECEIVER;
|
||||||
int arg = enable;
|
int ret = FAIL;
|
||||||
|
int retval=-1;
|
||||||
|
int arg = enable;
|
||||||
|
|
||||||
|
|
||||||
if(thisDetector->receiverOnlineFlag==ONLINE_FLAG){
|
if(thisDetector->receiverOnlineFlag==ONLINE_FLAG){
|
||||||
#ifdef VERBOSE
|
#ifdef VERBOSE
|
||||||
std::cout << "***************Sending Data Streaming in Receiver " << arg << std::endl;
|
std::cout << "***************Sending Data Streaming in Receiver " << arg << std::endl;
|
||||||
#endif
|
#endif
|
||||||
if (connectData() == OK){
|
if (connectData() == OK){
|
||||||
ret=thisReceiver->sendInt(fnum,retval,arg);
|
ret=thisReceiver->sendInt(fnum,retval,arg);
|
||||||
disconnectData();
|
disconnectData();
|
||||||
|
}
|
||||||
|
if(ret==FAIL) {
|
||||||
|
retval = -1;
|
||||||
|
cout << "could not set data streaming in receiver to " << enable <<" Returned:" << retval << endl;
|
||||||
|
setErrorMask((getErrorMask())|(DATA_STREAMING));
|
||||||
|
} else {
|
||||||
|
thisDetector->receiver_datastream = retval;
|
||||||
|
if(ret==FORCE_UPDATE)
|
||||||
|
updateReceiver();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if(ret==FAIL)
|
|
||||||
retval = -1;
|
|
||||||
if(ret==FORCE_UPDATE)
|
|
||||||
updateReceiver();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((enable > 0) && (retval != enable)){
|
return thisDetector->receiver_datastream;
|
||||||
cout << "could not set data streaming in receiver to " << enable <<" Returned:" << retval << endl;
|
|
||||||
setErrorMask((getErrorMask())|(DATA_STREAMING));
|
|
||||||
}
|
|
||||||
return retval;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -2338,6 +2338,15 @@ string slsDetectorCommand::cmdAcquire(int narg, char *args[], int action) {
|
|||||||
myDet->setOnline(ONLINE_FLAG);
|
myDet->setOnline(ONLINE_FLAG);
|
||||||
int r_online = myDet->setReceiverOnline(ONLINE_FLAG);
|
int r_online = myDet->setReceiverOnline(ONLINE_FLAG);
|
||||||
|
|
||||||
|
// switch off data streaming to prevent extra images in zmq gui buffer
|
||||||
|
if (r_online == ONLINE_FLAG) {
|
||||||
|
if (myDet->enableDataStreamingFromReceiver() != 0) {
|
||||||
|
if (myDet->enableDataStreamingFromReceiver(0) != 0) {
|
||||||
|
std::cout << "Error: Unable to switch off data streaming in receiver. If GUI on, extra image(s) in zmq GUI buffer" << std::endl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if(myDet->acquire() == FAIL)
|
if(myDet->acquire() == FAIL)
|
||||||
return string("acquire unsuccessful");
|
return string("acquire unsuccessful");
|
||||||
if(r_online){
|
if(r_online){
|
||||||
@ -5934,10 +5943,18 @@ string slsDetectorCommand::cmdReceiver(int narg, char *args[], int action) {
|
|||||||
|
|
||||||
|
|
||||||
myDet->setOnline(ONLINE_FLAG);
|
myDet->setOnline(ONLINE_FLAG);
|
||||||
myDet->setReceiverOnline(ONLINE_FLAG);
|
int r_online = myDet->setReceiverOnline(ONLINE_FLAG);
|
||||||
|
|
||||||
if(cmd=="receiver"){
|
if(cmd=="receiver"){
|
||||||
if (action==PUT_ACTION) {
|
if (action==PUT_ACTION) {
|
||||||
|
// switch off data streaming to prevent extra images in zmq gui buffer
|
||||||
|
if (r_online == ONLINE_FLAG) {
|
||||||
|
if (myDet->enableDataStreamingFromReceiver() != 0) {
|
||||||
|
if (myDet->enableDataStreamingFromReceiver(0) != 0) {
|
||||||
|
std::cout << "Error: Unable to switch off data streaming in receiver. If GUI on, extra image(s) in zmq GUI buffer" << std::endl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
if(!strcasecmp(args[1],"start"))
|
if(!strcasecmp(args[1],"start"))
|
||||||
myDet->startReceiver();
|
myDet->startReceiver();
|
||||||
else if(!strcasecmp(args[1],"stop"))
|
else if(!strcasecmp(args[1],"stop"))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user