mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-17 07:17:13 +02:00
configuremac after starting receiver, also telling the server to send packets to receiver or cpu with receiver start and receiver stop
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@290 951219d9-93cf-4727-9268-0efd64621fa3
This commit is contained in:
@ -5543,10 +5543,35 @@ int slsDetector::startReceiver(){
|
||||
}
|
||||
dataSocket->Disconnect();
|
||||
if (ret==FORCE_UPDATE)
|
||||
updateReceiver();
|
||||
ret=updateReceiver();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//configuremac for gotthard
|
||||
if(ret==OK)
|
||||
if(thisDetector->myDetectorType==GOTTHARD)
|
||||
ret=configureMAC();
|
||||
|
||||
//tell the server to send to receiver and not CPU
|
||||
if(ret==OK){
|
||||
if (thisDetector->onlineFlag==ONLINE_FLAG) {
|
||||
if (controlSocket) {
|
||||
if (controlSocket->Connect()>=0) {
|
||||
controlSocket->SendDataOnly(&fnum,sizeof(fnum));
|
||||
controlSocket->ReceiveDataOnly(&ret,sizeof(ret));
|
||||
if (ret==FAIL){
|
||||
controlSocket->ReceiveDataOnly(mess,sizeof(mess));
|
||||
std::cout<< "Detector returned error: " << mess << std::endl;
|
||||
}
|
||||
controlSocket->Disconnect();
|
||||
if (ret==FORCE_UPDATE)
|
||||
ret=updateDetector();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -5574,10 +5599,30 @@ int slsDetector::stopReceiver(){
|
||||
|
||||
dataSocket->Disconnect();
|
||||
if (ret==FORCE_UPDATE)
|
||||
updateReceiver();
|
||||
ret=updateReceiver();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//tell the server to NOT send to receiver and instead to CPU
|
||||
if(ret==OK){
|
||||
if (thisDetector->onlineFlag==ONLINE_FLAG) {
|
||||
if (controlSocket) {
|
||||
if (controlSocket->Connect()>=0) {
|
||||
controlSocket->SendDataOnly(&fnum,sizeof(fnum));
|
||||
controlSocket->ReceiveDataOnly(&ret,sizeof(ret));
|
||||
if (ret==FAIL){
|
||||
controlSocket->ReceiveDataOnly(mess,sizeof(mess));
|
||||
std::cout<< "Detector returned error: " << mess << std::endl;
|
||||
}
|
||||
controlSocket->Disconnect();
|
||||
if (ret==FORCE_UPDATE)
|
||||
ret=updateDetector();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user