mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-13 05:17:13 +02:00
gotthard:adding the temperature in the client part and getting rid of gettemperature,gotthardString functions
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@53 951219d9-93cf-4727-9268-0efd64621fa3
This commit is contained in:
@ -5,74 +5,6 @@
|
||||
|
||||
//using namespace std;
|
||||
|
||||
|
||||
char* gotthardDetector::gotthardStringname(string name) {
|
||||
|
||||
char retval[100];
|
||||
int fnum, set=0;
|
||||
char val[100];
|
||||
|
||||
|
||||
if (name.length()==0){
|
||||
fnum=F_GET_GOTTHARD;
|
||||
}
|
||||
else
|
||||
{
|
||||
fnum=F_SET_GOTTHARD;
|
||||
set=1;
|
||||
strcpy(val,name.c_str());
|
||||
}
|
||||
int ret=FAIL;
|
||||
|
||||
|
||||
char mess[100];
|
||||
// int arg[1];
|
||||
// arg[0]=name;
|
||||
|
||||
|
||||
//#ifdef VERBOSE
|
||||
std::cout<< std::endl;
|
||||
if(set)
|
||||
std::cout<< "Setting Stringname" << std::endl;
|
||||
else
|
||||
std::cout<< "Retreiving stringname" << std::endl;
|
||||
//#endif
|
||||
|
||||
|
||||
if (controlSocket) {
|
||||
std::cout<< "controlsocket worked\n";
|
||||
if (controlSocket->Connect()>=0) {
|
||||
std::cout<< "connectsocket worked\n";
|
||||
std::cout<<"fnum:"<<fnum<<endl;
|
||||
controlSocket->SendDataOnly(&fnum,sizeof(fnum));
|
||||
//controlSocket->SendDataOnly(arg,sizeof(arg));
|
||||
if(set)
|
||||
controlSocket->SendDataOnly(val,sizeof(val));
|
||||
controlSocket->ReceiveDataOnly(&ret,sizeof(ret));
|
||||
if (ret==OK) {
|
||||
controlSocket->ReceiveDataOnly(&retval,sizeof(retval));
|
||||
} else {
|
||||
controlSocket->ReceiveDataOnly(mess,sizeof(mess));
|
||||
std::cout<< "Detector returned error: " << mess << std::endl;
|
||||
}
|
||||
controlSocket->Disconnect();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//#ifdef VERBOSE
|
||||
std::cout<< "Stringname set to "<< retval << std::endl;
|
||||
//#endif
|
||||
if (ret==FAIL) {
|
||||
std::cout<< "Setting/Getting stringname failed " << std::endl;
|
||||
}
|
||||
return retval;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/* detector configuration (no communication to server) */
|
||||
|
||||
/*
|
||||
@ -819,46 +751,3 @@ int gotthardDetector::writeCalibrationFile(string fname, float gain, float offse
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
/* Please use getDAC(TEMPERATURE) instead of writing your own function*/
|
||||
|
||||
// float gotthardDetector::getTemperature(int imod){
|
||||
|
||||
// float retval;
|
||||
// int fnum=F_GET_TEMPERATURE;
|
||||
// int ret=FAIL;
|
||||
// char mess[100];
|
||||
// //int arg = imod;
|
||||
|
||||
// //#ifdef VERBOSE
|
||||
// std::cout<< "GOTTHARD Getting Temperature of module "<< imod << std::endl;
|
||||
// //#endif
|
||||
// if (thisDetector->onlineFlag==ONLINE_FLAG) {
|
||||
|
||||
// std::cout<< "onlineflag worked\n";
|
||||
// if (controlSocket) {
|
||||
// std::cout<< "controlsocket worked\n";
|
||||
// if (controlSocket->Connect()>=0) {
|
||||
// controlSocket->SendDataOnly(&fnum,sizeof(fnum));
|
||||
// controlSocket->SendDataOnly(&imod,sizeof(imod));
|
||||
// controlSocket->ReceiveDataOnly(&ret,sizeof(ret));
|
||||
// if (ret==OK) {
|
||||
// controlSocket->ReceiveDataOnly(&retval,sizeof(retval));
|
||||
// } else {
|
||||
// controlSocket->ReceiveDataOnly(mess,sizeof(mess));
|
||||
// std::cout<< "Detector returned error: " << mess << std::endl;
|
||||
// }
|
||||
// controlSocket->Disconnect();
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// //#ifdef VERBOSE
|
||||
// std::cout<< "Temperature is "<< retval << std::endl;
|
||||
// //#endif
|
||||
// if (ret==FAIL) {
|
||||
// std::cout<< "Getting temperature failed " << std::endl;
|
||||
// }
|
||||
// return retval;
|
||||
|
||||
// }
|
||||
|
@ -37,10 +37,6 @@ class gotthardDetector : public slsDetector{
|
||||
virtual ~gotthardDetector(){};
|
||||
|
||||
|
||||
char* gotthardStringname(string name);
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
reads configuration file fname calling executeLine
|
||||
|
Reference in New Issue
Block a user