mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-26 00:00:02 +02:00
ll
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@146 951219d9-93cf-4727-9268-0efd64621fa3
This commit is contained in:
parent
794ab4fdfc
commit
2076fb75f5
@ -142,8 +142,7 @@ slsDetector::slsDetector(int id) :slsDetectorUtils(),
|
||||
|
||||
{
|
||||
detectorType type=(detectorType)getDetectorType(id);
|
||||
|
||||
|
||||
|
||||
while (shmId<0) {
|
||||
/**Initlializes shared memory \sa initSharedMemory
|
||||
|
||||
@ -278,7 +277,7 @@ detectorType slsDetector::getDetectorType(char *name, int cport) {
|
||||
char m[100];
|
||||
#ifdef VERBOSE
|
||||
cout << "Getting detector type " << endl;
|
||||
#endif
|
||||
#endif
|
||||
if (s->Connect()>=0) {
|
||||
s->SendDataOnly(&fnum,sizeof(fnum));
|
||||
s->ReceiveDataOnly(&retval,sizeof(retval));
|
||||
@ -288,7 +287,7 @@ detectorType slsDetector::getDetectorType(char *name, int cport) {
|
||||
|
||||
#ifdef VERBOSE
|
||||
cout << "Detector type is "<< t << endl;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
} else {
|
||||
s->ReceiveDataOnly(m,sizeof(m));
|
||||
@ -2780,18 +2779,17 @@ int slsDetector::updateDetectorNoWait() {
|
||||
// int it;
|
||||
int64_t retval;// tns=-1;
|
||||
char lastClientIP[INET_ADDRSTRLEN];
|
||||
|
||||
switch(thisDetector->myDetectorType){
|
||||
case GOTTHARD:
|
||||
n = controlSocket->ReceiveDataOnly(lastClientIP,sizeof(lastClientIP));
|
||||
#ifdef VERBOSE
|
||||
cout << "Updating detector last modified by " << lastClientIP << endl;// commented out by dhanya for now
|
||||
cout << "Updating detector last modighfied by " << lastClientIP << std::endl;// commented out by dhanya for now
|
||||
#endif
|
||||
break;
|
||||
default:
|
||||
n = controlSocket->ReceiveDataOnly(lastClientIP,sizeof(lastClientIP));
|
||||
#ifdef VERBOSE
|
||||
cout << "Updating detector last modified by " << lastClientIP << endl;
|
||||
cout << "Updating detector last modified by " << lastClientIP << std::endl;
|
||||
#endif
|
||||
n = controlSocket->ReceiveDataOnly(&nm,sizeof(nm));
|
||||
thisDetector->nMod[X]=nm;
|
||||
|
@ -962,7 +962,7 @@ string slsDetectorCommand::cmdHostname(int narg, char *args[], int action){
|
||||
if (vvstr.fail())
|
||||
ivar=-1;
|
||||
}
|
||||
|
||||
|
||||
if (action==PUT_ACTION) {
|
||||
//add by hostname
|
||||
if (ivar==-1) {
|
||||
@ -2711,9 +2711,9 @@ string slsDetectorCommand::cmdADC(int narg, char *args[], int action) {
|
||||
adc=TEMPERATURE_FPGA;
|
||||
else
|
||||
return string("cannot decode adc ")+cmd;
|
||||
|
||||
|
||||
myDet->setOnline(ONLINE_FLAG);
|
||||
|
||||
|
||||
sprintf(answer,"%f",myDet->getADC(adc));
|
||||
return string(answer);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user