somewhere

This commit is contained in:
Dhanya Maliakal
2017-11-16 09:12:54 +01:00
parent fd34bab34b
commit 7dee07b9c5
3 changed files with 93 additions and 78 deletions

View File

@ -777,8 +777,9 @@ int slsDetector::initializeDetectorSize(detectorType type) {
thisDetector->acquiringFlag = false;
thisDetector->flippedData[0] = 0;
thisDetector->flippedData[1] = 0;
thisDetector->zmqport = DEFAULT_ZMQ_CL_PORTNO + (posId * (thisDetector->myDetectorType == EIGER) ? 2 : 1);
thisDetector->receiver_zmqport = DEFAULT_ZMQ_RX_PORTNO + (posId * (thisDetector->myDetectorType == EIGER) ? 2 : 1);
thisDetector->zmqport = 0;
thisDetector->receiver_zmqport = 0;
thisDetector->receiver_datastream = false;
for (int ia=0; ia<MAX_ACTIONS; ++ia) {
strcpy(thisDetector->actionScript[ia],"none");
@ -923,6 +924,14 @@ int slsDetector::initializeDetectorSize(detectorType type) {
delete thisReceiver;
thisReceiver = new receiverInterface(dataSocket);
// zmq ports
if (posId != -1) {
if (thisDetector->zmqport == 0)
thisDetector->zmqport = DEFAULT_ZMQ_CL_PORTNO + (posId * ((thisDetector->myDetectorType == EIGER) ? 2 : 1));
if (thisDetector->receiver_zmqport == 0)
thisDetector->receiver_zmqport = DEFAULT_ZMQ_RX_PORTNO + (posId * ((thisDetector->myDetectorType == EIGER) ? 2 : 1));
}
// setAngularConversionPointer(thisDetector->angOff,&thisDetector->nMods, thisDetector->nChans*thisDetector->nChips);
#ifdef VERBOSE
@ -5967,6 +5976,8 @@ string slsDetector::getNetworkParameter(networkParameter index) {
case DETECTOR_TXN_DELAY_FRAME:
case FLOW_CONTROL_10G:
return setDetectorNetworkParameter(index, -1);
case CLIENT_STREAMING_PORT:
return getClientStreamingPort();
case RECEIVER_STREAMING_PORT:
return getReceiverStreamingPort();
default:
@ -8261,6 +8272,10 @@ int slsDetector::updateReceiverNoWait() {
n += dataSocket->ReceiveDataOnly(&ind,sizeof(ind));
thisDetector->receiver_zmqport = ind;
// receiver streaming enable
n += dataSocket->ReceiveDataOnly(&ind,sizeof(ind));
thisDetector->receiver_datastream = ind;
if (!n) printf("n: %d\n", n);
return OK;