mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-26 16:20:03 +02:00
sls_detector_acquire [id-] should finally work
This commit is contained in:
parent
d19b051860
commit
34a1dac0fe
@ -19,15 +19,32 @@ class multiSlsDetectorClient {
|
||||
public:
|
||||
multiSlsDetectorClient(int argc, char *argv[], int action, multiSlsDetector *myDetector=NULL) { \
|
||||
string answer; \
|
||||
multiSlsDetectorCommand *myCmd; \
|
||||
multiSlsDetectorCommand *myCmd; \
|
||||
int id=-1, iv=0, pos=-1; \
|
||||
int del=0; \
|
||||
if (argc==0 && action==slsDetectorDefs::READOUT_ACTION) { \
|
||||
char cmd[100]; \
|
||||
if (action==slsDetectorDefs::READOUT_ACTION) { \
|
||||
|
||||
if (argc!=0) {
|
||||
iv=sscanf(argv[0],"%d-%s",&id,cmd); \
|
||||
if (iv>0 && id>=0 && strchr(argv[0],'-')) {
|
||||
cout << "id " << id << endl; \
|
||||
if (iv>1)
|
||||
argv[0]=cmd;
|
||||
}
|
||||
iv=sscanf(argv[0],"%d:",&pos); \
|
||||
if (iv>0 && pos>=0 && strchr(argv[0],':'))
|
||||
cout << "pos " << pos << "is not allowed!" << endl; \
|
||||
}
|
||||
if (id<0)
|
||||
id=0;
|
||||
|
||||
if (myDetector==NULL) { \
|
||||
myDetector=new multiSlsDetector(); \
|
||||
myDetector=new multiSlsDetector(id); \
|
||||
//myDetector->registerDataCallback(&dummyCallback, NULL);
|
||||
del=1; \
|
||||
};
|
||||
cout << "noid" <<endl;
|
||||
// cout << "noid" <<endl;
|
||||
myCmd=new multiSlsDetectorCommand(myDetector); \
|
||||
answer=myCmd->executeLine(argc, argv, action); \
|
||||
cout << answer<< endl; \
|
||||
@ -35,8 +52,6 @@ class multiSlsDetectorClient {
|
||||
if (del) delete myDetector; \
|
||||
return; \
|
||||
}; \
|
||||
int id=-1, iv=0, pos=-1; \
|
||||
char cmd[100]; \
|
||||
if (action==slsDetectorDefs::PUT_ACTION && argc<2) { \
|
||||
cout << "Wrong usage - should be: "<< argv[0] << \
|
||||
"[id-][pos:]channel arg" << endl; \
|
||||
|
Loading…
x
Reference in New Issue
Block a user