slsDetector/slsDetectorCommand.cpp

This commit is contained in:
Dhanya Maliakal
2016-10-20 07:31:53 +02:00
12 changed files with 132 additions and 29 deletions

View File

@ -795,10 +795,19 @@ slsDetectorCommand::slsDetectorCommand(slsDetectorUtils *det) {
descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdADC;
i++;
descrToFuncMap[i].m_pFuncName="adc"; //
descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdADC;
i++;
descrToFuncMap[i].m_pFuncName="temp_fpgafl"; //
descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdADC;
i++;
descrToFuncMap[i].m_pFuncName="temp_fpgafr"; //
descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdADC;
i++;
/* r/w timers */
@ -3894,6 +3903,10 @@ string slsDetectorCommand::cmdADC(int narg, char *args[], int action) {
adc=TEMPERATURE_SODL;
else if (cmd=="temp_sodr")
adc=TEMPERATURE_SODR;
else if (cmd=="temp_fpgafl")
adc=TEMPERATURE_FPGA2;
else if (cmd=="temp_fpgafr")
adc=TEMPERATURE_FPGA3;
else
return string("cannot decode adc ")+cmd;
@ -3926,6 +3939,8 @@ string slsDetectorCommand::helpADC(int narg, char *args[], int action) {
os << "temp_dcdc " << "Cannot be set" << std::endl;
os << "temp_sodl " << "Cannot be set" << std::endl;
os << "temp_sodr " << "Cannot be set" << std::endl;
os << "temp_fpgafl " << "Cannot be set" << std::endl;
os << "temp_fpgafr " << "Cannot be set" << std::endl;
}
if (action==GET_ACTION || action==HELP_ACTION) {
os << "temp_adc " << "\t gets the temperature of the adc" << std::endl;
@ -3935,6 +3950,8 @@ string slsDetectorCommand::helpADC(int narg, char *args[], int action) {
os << "temp_dcdc " << "\t gets the temperature close to the dc dc converter" << std::endl;
os << "temp_sodl " << "\t gets the temperature close to the left so-dimm memory" << std::endl;
os << "temp_sodr " << "\t gets the temperature close to the right so-dimm memory" << std::endl;
os << "temp_fpgafl " << "\t gets the temperature of the left front end board fpga" << std::endl;
os << "temp_fpgafr " << "\t gets the temperature of the left front end board fpga" << std::endl;
}
return os.str();
}

View File

@ -171,7 +171,9 @@ int slsDetectorUtils::acquire(int delflag){
//resets frames caught in receiver
if(receiver){
pthread_mutex_lock(&mg);
resetFramesCaught();
pthread_mutex_unlock(&mg);
}
for(int im=0;im<nm;im++) {
@ -340,9 +342,9 @@ int slsDetectorUtils::acquire(int delflag){
//offline
pthread_mutex_lock(&mg);
if(setReceiverOnline()==OFFLINE_FLAG){
// wait until data processing thread has finished the data
pthread_mutex_lock(&mg);
acquiringDone = 1;
pthread_mutex_unlock(&mg);
if (*threadedProcessing) {
@ -372,7 +374,6 @@ int slsDetectorUtils::acquire(int delflag){
//online
else{
pthread_mutex_lock(&mg);
acquiringDone = 1;
pthread_mutex_unlock(&mg);