mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-23 15:00:02 +02:00
instatiates slsDetectorCmd
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@394 951219d9-93cf-4727-9268-0efd64621fa3
This commit is contained in:
parent
e2c0181d92
commit
25dc6f1b63
@ -1,15 +1,17 @@
|
||||
CFLAGS= -DC_ONLY
|
||||
FLAGS=-DVERBOSE
|
||||
INCLUDES= -I../slsDetectorSoftware/commonFiles -I../slsDetectorSoftware/slsDetector -I ../slsDetectorSoftware/MySocketTCP -I../slsDetectorSoftware/mythenDetector -I../slsDetectorSoftware/gotthardDetector -I../slsDetectorSoftware/usersFunctions -I../slsDetectorSoftware/multiSlsDetector
|
||||
#FLAGS=-DVERBOSE
|
||||
INCLUDES= -I../slsDetectorSoftware/commonFiles -I../slsDetectorSoftware/slsDetector -I ../slsDetectorSoftware/MySocketTCP -I../slsDetectorSoftware/usersFunctions -I../slsDetectorSoftware/multiSlsDetector
|
||||
#LIBS=-L../TMythenDetector/bin/ -L$(QTDIR)/lib
|
||||
LIBS= -L../slsDetectorSoftware/
|
||||
LDFLAG= -lSlsDetector -lpthread
|
||||
|
||||
BIN=bin
|
||||
|
||||
SRC_CLNT=multi_sls_detector_client.cpp
|
||||
SRC_CLNT=sls_detector_client.cpp
|
||||
|
||||
all: lib sls_detector_put sls_detector_get sls_detector_acquire sls_detector_help
|
||||
clients: sls_detector_put sls_detector_get sls_detector_acquire sls_detector_help
|
||||
|
||||
all: lib clients
|
||||
|
||||
lib:
|
||||
cd ../slsDetectorSoftware && $(MAKE) lib
|
||||
@ -45,6 +47,7 @@ install_sls_detector: all
|
||||
cp -P $(BIN)/sls_detector_put $(DESTDIR)
|
||||
cp -P $(BIN)/sls_detector_get $(DESTDIR)
|
||||
cp -P $(BIN)/sls_detector_acquire $(DESTDIR)
|
||||
cp -P $(BIN)/sls_detector_help $(DESTDIR)
|
||||
|
||||
|
||||
|
||||
|
@ -4,6 +4,7 @@
|
||||
|
||||
#include "multiSlsDetector.h"
|
||||
#include "slsDetector.h"
|
||||
#include "slsDetectorCommand.h"
|
||||
|
||||
|
||||
#include <stdlib.h>
|
||||
@ -19,7 +20,8 @@ int main(int argc, char *argv[])
|
||||
string answer;
|
||||
char cmd[100];
|
||||
int action;
|
||||
slsDetectorCommand *myDetector;
|
||||
slsDetectorBase *myDetector;
|
||||
slsDetectorCommand *myCmd;
|
||||
|
||||
|
||||
|
||||
@ -73,7 +75,7 @@ int main(int argc, char *argv[])
|
||||
} else {
|
||||
#ifdef GET
|
||||
cout << "Wrong usage - should be: "<< argv[0] << "[id:/id-]channel" << endl;
|
||||
cout << myDetector->helpLine(argc-1, argv, action);
|
||||
cout << slsDetectorCommand::helpLine(argc-1, argv, action);
|
||||
cout << endl;
|
||||
return -1;
|
||||
#endif
|
||||
@ -81,7 +83,7 @@ int main(int argc, char *argv[])
|
||||
#ifdef PUT
|
||||
if (argc<3) {
|
||||
cout << "Wrong usage - should be: "<< argv[0] << "[id:/id-]channel arg" << endl;
|
||||
cout << myDetector->helpLine(argc-1, argv+1, action);
|
||||
cout << slsDetectorCommand::helpLine(argc-1, argv+1, action);
|
||||
cout << endl;
|
||||
return -1;
|
||||
}
|
||||
@ -90,26 +92,23 @@ int main(int argc, char *argv[])
|
||||
cout << "Using default multiSlsDetector" << id << endl;
|
||||
#endif
|
||||
myDetector=new multiSlsDetector();
|
||||
answer=myDetector->executeLine(argc-1, argv, action);
|
||||
cout << answer<< endl;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
#ifdef PUT
|
||||
if (argc<3) {
|
||||
cout << "Wrong usage - should be: "<< argv[0] <<" " << argv[1]<< " arg" << endl;
|
||||
cout << myDetector->helpLine(argc-1, argv+1, action);
|
||||
cout << slsDetectorCommand::helpLine(argc-1, argv+1, action);
|
||||
cout << endl;
|
||||
return -1;
|
||||
}
|
||||
#endif
|
||||
|
||||
myCmd=new slsDetectorCommand(myDetector);
|
||||
|
||||
if (argc<2) {
|
||||
answer=myDetector->executeLine(argc-1, argv, action);
|
||||
answer=myCmd->executeLine(argc-1, argv, action);
|
||||
} else {
|
||||
answer=myDetector->executeLine(argc-1, argv+1, action);
|
||||
answer=myCmd->executeLine(argc-1, argv+1, action);
|
||||
}
|
||||
cout << answer<< endl;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user