fixed receiver toalso get frames*cycles as number of frames

This commit is contained in:
Dhanya Maliakal 2016-02-10 17:03:10 +01:00
parent dbedc9b7df
commit 1e3f9e8ead
2 changed files with 97 additions and 101 deletions

View File

@ -3931,30 +3931,27 @@ int64_t slsDetector::setTimer(timerIndex index, int64_t t){
//send acquisiton period/frame number to receiver //send acquisiton period/frame number to receiver
if((index==FRAME_NUMBER)||(index==FRAME_PERIOD)) if((index==FRAME_NUMBER)||(index==FRAME_PERIOD)||(index==CYCLES_NUMBER)){
{
if(ret != FAIL){ if(ret != FAIL){
if(setReceiverOnline(ONLINE_FLAG)==ONLINE_FLAG){ if(setReceiverOnline(ONLINE_FLAG)==ONLINE_FLAG){
int64_t args[2]; int64_t args[2];
args[1] = retval; args[1] = retval;
if(t == -1) if(t == -1) args[1] = -1;
args[1] = -1;
if((index==FRAME_NUMBER)||(index==CYCLES_NUMBER)){
if(index==FRAME_NUMBER){
#ifdef VERBOSE #ifdef VERBOSE
std::cout << "Setting/Getting number of frames " << index <<" to/from receiver " << args[1] << std::endl; std::cout << "Setting/Getting number of frames " << index <<" to/from receiver " << args[1] << std::endl;
#endif #endif
args[0] = FRAME_NUMBER; args[0] = FRAME_NUMBER;
retval = thisDetector->timerValue[FRAME_NUMBER]*thisDetector->timerValue[CYCLES_NUMBER];
if(args[1] != -1) args[1]=retval;
}else{ }else{
#ifdef VERBOSE #ifdef VERBOSE
std::cout << "Setting/Getting acquisition period " << index << " to/from receiver " << args[1] << std::endl; std::cout << "Setting/Getting acquisition period " << index << " to/from receiver " << args[1] << std::endl;
#endif #endif
args[0] = FRAME_PERIOD; args[0] = FRAME_PERIOD;
//if acquisition period is zero, then #frames/buffer depends on exposure time and not acq period //if acquisition period is zero, then #frames/buffer depends on exposure time and not acq period
if(!retval) if(!retval) args[1] = timerValue[ACQUISITION_TIME];
args[1] = timerValue[ACQUISITION_TIME];
} }
@ -3970,7 +3967,7 @@ int64_t slsDetector::setTimer(timerIndex index, int64_t t){
setErrorMask((getErrorMask())|(RECEIVER_ACQ_PERIOD_NOT_SET)); setErrorMask((getErrorMask())|(RECEIVER_ACQ_PERIOD_NOT_SET));
} }
}else{ }else{
cout << "ERROR:Number of Frames in receiver set incorrectly to " << ut << " instead of " << retval << endl; cout << "ERROR:Number of Frames (* Number of cycles) in receiver set incorrectly to " << ut << " instead of " << retval << endl;
setErrorMask((getErrorMask())|(RECEIVER_FRAME_NUM_NOT_SET)); setErrorMask((getErrorMask())|(RECEIVER_FRAME_NUM_NOT_SET));
} }
} }
@ -3981,7 +3978,6 @@ int64_t slsDetector::setTimer(timerIndex index, int64_t t){
} }
} }
return thisDetector->timerValue[index]; return thisDetector->timerValue[index];
}; };
int slsDetector::lockServer(int lock) { int slsDetector::lockServer(int lock) {

View File

@ -1954,7 +1954,7 @@ string slsDetectorCommand::helpRateCorr(int narg, char *args[], int action){
if (action==GET_ACTION || action==HELP_ACTION) if (action==GET_ACTION || action==HELP_ACTION)
os << string("ratecorr \t returns the dead time used for rate correections in ns \n"); os << string("ratecorr \t returns the dead time used for rate correections in ns \n");
if (action==PUT_ACTION || action==HELP_ACTION) if (action==PUT_ACTION || action==HELP_ACTION)
os << string("ratecorr ns \t sets the deadtime correction constant in ns, -1 in Eiger will set it to default tau of that settings\n"); os << string("ratecorr ns \t sets the deadtime correction constant in ns, -1 in Eiger will set it to default tau of settings\n");
return os.str(); return os.str();
} }