mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-24 23:30:03 +02:00
opened client command interface to the users class
This commit is contained in:
parent
0720625360
commit
1bd69fa18f
@ -45,7 +45,18 @@ class multiSlsDetectorCommand : public slsDetectorCommand {
|
|||||||
return s;
|
return s;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* calls executeLine with PUT_ACTION
|
||||||
|
*/
|
||||||
|
string putCommand(int narg, char *args[], int pos=-1){\
|
||||||
|
return executeLine(narg, args,slsDetectorDefs::PUT_ACTION,pos);\
|
||||||
|
};
|
||||||
|
/**
|
||||||
|
* calls executeLine with GET_ACTION
|
||||||
|
*/
|
||||||
|
string getCommand(int narg, char *args[], int pos=-1){\
|
||||||
|
return executeLine(narg, args,slsDetectorDefs::GET_ACTION,pos);\
|
||||||
|
};
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
@ -1,11 +1,13 @@
|
|||||||
#include "slsDetectorUsers.h"
|
#include "slsDetectorUsers.h"
|
||||||
#include "detectorData.h"
|
#include "detectorData.h"
|
||||||
#include "multiSlsDetector.h"
|
#include "multiSlsDetector.h"
|
||||||
|
#include "multiSlsDetectorCommand.h"
|
||||||
|
|
||||||
|
|
||||||
slsDetectorUsers::slsDetectorUsers(int id) : myDetector(NULL){
|
slsDetectorUsers::slsDetectorUsers(int id) : myDetector(NULL){
|
||||||
|
|
||||||
myDetector=new multiSlsDetector(id);
|
myDetector=new multiSlsDetector(id);
|
||||||
|
myCmd=new multiSlsDetectorCommand(myDetector);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -303,5 +305,18 @@ void slsDetectorUsers::registerGetI0Callback( double (*func)(int,void*),void *ar
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
string slsDetectorUsers::putCommand(int narg, char *args[], int pos){
|
||||||
|
if(narg < 2)
|
||||||
|
return string("Error: Insufficient Parameters");
|
||||||
|
return myCmd->putCommand(narg, args, pos);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
string slsDetectorUsers::getCommand(int narg, char *args[], int pos){
|
||||||
|
if(narg < 1)
|
||||||
|
return string("Error: Insufficient Parameters");
|
||||||
|
return myCmd->getCommand(narg, args, pos);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
class detectorData;
|
class detectorData;
|
||||||
class multiSlsDetector;
|
class multiSlsDetector;
|
||||||
|
class multiSlsDetectorCommand;
|
||||||
|
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
@ -525,7 +525,25 @@ class slsDetectorUsers
|
|||||||
\param func function for reading the I0 (called with parameter 0 before the acquisition, 1 after and the return value used as I0)
|
\param func function for reading the I0 (called with parameter 0 before the acquisition, 1 after and the return value used as I0)
|
||||||
*/
|
*/
|
||||||
void registerGetI0Callback( double (*func)(int,void*),void *arg);
|
void registerGetI0Callback( double (*func)(int,void*),void *arg);
|
||||||
|
|
||||||
|
/**
|
||||||
|
@short sets parameters in command interface http://www.psi.ch/detectors/UsersSupportEN/slsDetectorClientHowTo.pdf
|
||||||
|
\param narg value to be set
|
||||||
|
\param args value to be set
|
||||||
|
\param pos position of detector in multislsdetector list
|
||||||
|
\returns answer string
|
||||||
|
*/
|
||||||
|
string putCommand(int narg, char *args[], int pos=-1);
|
||||||
|
|
||||||
|
/**
|
||||||
|
@short gets parameters in command interface http://www.psi.ch/detectors/UsersSupportEN/slsDetectorClientHowTo.pdf
|
||||||
|
\param narg value to be set
|
||||||
|
\param args value to be set
|
||||||
|
\param pos position of detector in multislsdetector list
|
||||||
|
\returns answer string
|
||||||
|
*/
|
||||||
|
string getCommand(int narg, char *args[], int pos=-1);
|
||||||
|
|
||||||
/************************************************************************
|
/************************************************************************
|
||||||
|
|
||||||
STATIC FUNCTIONS
|
STATIC FUNCTIONS
|
||||||
@ -614,7 +632,7 @@ class slsDetectorUsers
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
multiSlsDetector *myDetector;
|
multiSlsDetector *myDetector;
|
||||||
|
multiSlsDetectorCommand *myCmd;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user