slsDetectorCommand does not inherit slsDetectorBase but rather uses its methods

git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@132 951219d9-93cf-4727-9268-0efd64621fa3
This commit is contained in:
bergamaschi 2012-02-24 15:32:39 +00:00
parent c2a24e2c73
commit 1064bd21ff
7 changed files with 395 additions and 965 deletions

View File

@ -12,6 +12,7 @@ ID: $Id$
#include "multiSlsDetector.h"
#include "slsDetector.h"
#include "slsDetectorCommand.h"
#include "usersFunctions.h"
#include <sys/types.h>
#include <sys/ipc.h>
@ -2709,6 +2710,8 @@ int multiSlsDetector::readRegister(int addr){
int multiSlsDetector::readConfigurationFile(string const fname){
slsDetectorCommand *cmd=new slsDetectorCommand(this);
char ext[100];
@ -2763,7 +2766,7 @@ int multiSlsDetector::readConfigurationFile(string const fname){
iargval++;
//}
}
ans=executeLine(iargval,args,PUT_ACTION);
ans=cmd->executeLine(iargval,args,PUT_ACTION);
#ifdef VERBOSE
std::cout<< ans << std::endl;
#endif
@ -2797,6 +2800,9 @@ int multiSlsDetector::readConfigurationFile(string const fname){
#ifdef VERBOSE
std::cout<< "Read configuration file of " << iline << " lines" << std::endl;
#endif
delete cmd;
return iline;
@ -2811,6 +2817,8 @@ int multiSlsDetector::writeConfigurationFile(string const fname){
slsDetectorCommand *cmd=new slsDetectorCommand(this);
string names[]={ \
"hostname", \
"master", \
@ -2851,7 +2859,7 @@ int multiSlsDetector::writeConfigurationFile(string const fname){
for (iv=0; iv<nvar; iv++) {
strcpy(args[0],names[iv].c_str());
outfile << names[iv] << " " << executeLine(1,args,GET_ACTION) << std::endl;
outfile << names[iv] << " " << cmd->executeLine(1,args,GET_ACTION) << std::endl;
}
@ -2873,13 +2881,26 @@ int multiSlsDetector::writeConfigurationFile(string const fname){
#ifdef VERBOSE
std::cout<< "wrote " <<ret << " lines to configuration file " << std::endl;
#endif
delete cmd;
return iv;
};
int multiSlsDetector::dumpDetectorSetup(string const fname, int level){
slsDetectorCommand *cmd=new slsDetectorCommand(this);
string names[]={
"fname",\
"index",\
@ -2956,7 +2977,7 @@ int multiSlsDetector::dumpDetectorSetup(string const fname, int level){
if (outfile.is_open()) {
for (iv=0; iv<nvar-5; iv++) {
strcpy(args[0],names[iv].c_str());
outfile << names[iv] << " " << executeLine(1,args,GET_ACTION) << std::endl;
outfile << names[iv] << " " << cmd->executeLine(1,args,GET_ACTION) << std::endl;
}
@ -2965,7 +2986,7 @@ int multiSlsDetector::dumpDetectorSetup(string const fname, int level){
fname1=fname+string(".ff");
strcpy(args[1],fname1.c_str());
}
outfile << names[iv] << " " << executeLine(nargs,args,GET_ACTION) << std::endl;
outfile << names[iv] << " " << cmd->executeLine(nargs,args,GET_ACTION) << std::endl;
iv++;
strcpy(args[0],names[iv].c_str());
@ -2973,7 +2994,7 @@ int multiSlsDetector::dumpDetectorSetup(string const fname, int level){
fname1=fname+string(".bad");
strcpy(args[1],fname1.c_str());
}
outfile << names[iv] << " " << executeLine(nargs,args,GET_ACTION) << std::endl;
outfile << names[iv] << " " << cmd->executeLine(nargs,args,GET_ACTION) << std::endl;
iv++;
@ -2982,7 +3003,7 @@ int multiSlsDetector::dumpDetectorSetup(string const fname, int level){
fname1=fname+string(".angoff");
strcpy(args[1],fname1.c_str());
}
outfile << names[iv] << " " << executeLine(nargs,args,GET_ACTION) << std::endl;
outfile << names[iv] << " " << cmd->executeLine(nargs,args,GET_ACTION) << std::endl;
iv++;
outfile.close();
@ -3006,6 +3027,8 @@ int multiSlsDetector::dumpDetectorSetup(string const fname, int level){
#ifdef VERBOSE
std::cout<< "wrote " <<iv << " lines to "<< fname1 << std::endl;
#endif
delete cmd;
return 0;
@ -3027,6 +3050,8 @@ int multiSlsDetector::retrieveDetectorSetup(string const fname1, int level){
slsDetectorCommand *cmd=new slsDetectorCommand(this);
char ext[100];
@ -3080,7 +3105,7 @@ int multiSlsDetector::retrieveDetectorSetup(string const fname1, int level){
// }
}
if (level==2) {
executeLine(iargval,args,PUT_ACTION);
cmd->executeLine(iargval,args,PUT_ACTION);
} else {
if (string(args[0])==string("flatfield"))
;
@ -3090,8 +3115,10 @@ int multiSlsDetector::retrieveDetectorSetup(string const fname1, int level){
;
else if (string(args[0])==string("trimbits"))
;
else
executeLine(iargval,args,PUT_ACTION);
else {
;
cmd->executeLine(iargval,args,PUT_ACTION);
}
}
}
iline++;
@ -3115,20 +3142,10 @@ int multiSlsDetector::retrieveDetectorSetup(string const fname1, int level){
#ifdef VERBOSE
std::cout<< "Read " << iline << " lines" << std::endl;
#endif
delete cmd;
return iline;
};

View File

@ -1,5 +1,6 @@
#include "slsDetector.h"
#include "usersFunctions.h"
#include "slsDetectorCommand.h"
#include <sys/types.h>
#include <sys/ipc.h>
#include <sys/shm.h>
@ -1208,7 +1209,6 @@ int slsDetector::setDetectorType(string const stype){
};
string slsDetector::getDetectorType(){
return getDetectorType(thisDetector->myDetectorType);
}
@ -4702,6 +4702,9 @@ int slsDetector::readConfigurationFile(ifstream &infile){
slsDetectorCommand *cmd=new slsDetectorCommand(this);
string ans;
string str;
int iargval;
@ -4746,13 +4749,14 @@ int slsDetector::readConfigurationFile(ifstream &infile){
iargval++;
//}
}
ans=executeLine(iargval,args,PUT_ACTION);
ans=cmd->executeLine(iargval,args,PUT_ACTION);
#ifdef VERBOSE
std::cout<< ans << std::endl;
#endif
}
iline++;
}
delete cmd;
return iline;
}
@ -4792,6 +4796,7 @@ int slsDetector::writeConfigurationFile(string const fname){
int slsDetector::writeConfigurationFile(ofstream &outfile){
slsDetectorCommand *cmd=new slsDetectorCommand(this);
int nvar;
string names[]={ \
"hostname", \
@ -4838,9 +4843,9 @@ int slsDetector::writeConfigurationFile(ofstream &outfile){
for (iv=0; iv<nvar; iv++) {
strcpy(args[0],names[iv].c_str());
outfile << names[iv] << " " << executeLine(1,args,GET_ACTION) << std::endl;
outfile << names[iv] << " " << cmd->executeLine(1,args,GET_ACTION) << std::endl;
}
delete cmd;
return iv;
}
@ -4862,6 +4867,7 @@ int slsDetector::writeConfigurationFile(ofstream &outfile){
in a file and retrieve it for repeating the measurement with identicals settings, if necessary
*/
int slsDetector::dumpDetectorSetup(string const fname, int level){
slsDetectorCommand *cmd=new slsDetectorCommand(this);
string names[]={
"fname",\
"index",\
@ -4930,7 +4936,7 @@ int slsDetector::dumpDetectorSetup(string const fname, int level){
if (outfile.is_open()) {
for (iv=0; iv<nvar-5; iv++) {
strcpy(args[0],names[iv].c_str());
outfile << names[iv] << " " << executeLine(1,args,GET_ACTION) << std::endl;
outfile << names[iv] << " " << cmd->executeLine(1,args,GET_ACTION) << std::endl;
}
@ -4939,7 +4945,7 @@ int slsDetector::dumpDetectorSetup(string const fname, int level){
fname1=fname+string(".ff");
strcpy(args[1],fname1.c_str());
}
outfile << names[iv] << " " << executeLine(nargs,args,GET_ACTION) << std::endl;
outfile << names[iv] << " " << cmd->executeLine(nargs,args,GET_ACTION) << std::endl;
iv++;
strcpy(args[0],names[iv].c_str());
@ -4947,7 +4953,7 @@ int slsDetector::dumpDetectorSetup(string const fname, int level){
fname1=fname+string(".bad");
strcpy(args[1],fname1.c_str());
}
outfile << names[iv] << " " << executeLine(nargs,args,GET_ACTION) << std::endl;
outfile << names[iv] << " " << cmd->executeLine(nargs,args,GET_ACTION) << std::endl;
iv++;
@ -4956,7 +4962,7 @@ int slsDetector::dumpDetectorSetup(string const fname, int level){
fname1=fname+string(".angoff");
strcpy(args[1],fname1.c_str());
}
outfile << names[iv] << " " << executeLine(nargs,args,GET_ACTION) << std::endl;
outfile << names[iv] << " " << cmd->executeLine(nargs,args,GET_ACTION) << std::endl;
iv++;
strcpy(args[0],names[iv].c_str());
@ -4972,12 +4978,12 @@ int slsDetector::dumpDetectorSetup(string const fname, int level){
std::cout<< "writing to file " << fname1 << std::endl;
#endif
}
outfile << names[iv] << " " << executeLine(nargs,args,GET_ACTION) << std::endl;
outfile << names[iv] << " " << cmd->executeLine(nargs,args,GET_ACTION) << std::endl;
iv++;
for (int is=0; is<4; is++) {
sprintf(args[0],"%s:%d",names[iv].c_str(),is);
outfile << args[0] << " " << executeLine(1,args,GET_ACTION) << std::endl;
outfile << args[0] << " " << cmd->executeLine(1,args,GET_ACTION) << std::endl;
}
iv++;
outfile.close();
@ -4990,6 +4996,7 @@ int slsDetector::dumpDetectorSetup(string const fname, int level){
#ifdef VERBOSE
std::cout<< "wrote " <<iv << " lines to "<< fname1 << std::endl;
#endif
delete cmd;
return 0;
}
@ -4998,6 +5005,7 @@ int slsDetector::dumpDetectorSetup(string const fname, int level){
int slsDetector::retrieveDetectorSetup(string fname1, int level){
slsDetectorCommand *cmd=new slsDetectorCommand(this);
string fname;
string str;
ifstream infile;
@ -5047,7 +5055,8 @@ int slsDetector::retrieveDetectorSetup(string fname1, int level){
// }
}
if (level==2) {
executeLine(iargval,args,PUT_ACTION);
;
cmd->executeLine(iargval,args,PUT_ACTION);
} else {
if (string(args[0])==string("flatfield"))
;
@ -5057,8 +5066,10 @@ int slsDetector::retrieveDetectorSetup(string fname1, int level){
;
else if (string(args[0])==string("trimbits"))
;
else
executeLine(iargval,args,PUT_ACTION);
else {
;
cmd->executeLine(iargval,args,PUT_ACTION);
}
}
}
iline++;
@ -5071,6 +5082,7 @@ int slsDetector::retrieveDetectorSetup(string fname1, int level){
#ifdef VERBOSE
std::cout<< "Read " << iline << " lines" << std::endl;
#endif
delete cmd;
return iline;
};

View File

@ -1314,7 +1314,7 @@ typedef struct sharedSlsDetector {
\param flag can be GET_MASTER, NO_MASTER, IS_MASTER, IS_SLAVE
\returns master flag of the detector
*/
masterFlags setMaster(masterFlags flag){};
masterFlags setMaster(masterFlags flag){return GET_MASTER;};
@ -1323,7 +1323,7 @@ typedef struct sharedSlsDetector {
\param sync syncronization mode
\returns current syncronization mode
*/
synchronizationMode setSynchronization(synchronizationMode sync=GET_SYNCHRONIZATION_MODE){};
synchronizationMode setSynchronization(synchronizationMode sync=GET_SYNCHRONIZATION_MODE){return GET_SYNCHRONIZATION_MODE;};
int loadImageToDetector(imageType index,string const fname);

View File

@ -805,6 +805,160 @@ class slsDetectorBase {
*/
virtual int testFunction(int times=0)=0;
/************************************************************************
STATIC FUNCTIONS
*********************************************************************/
/** returns string from run status index
\param s can be ERROR, WAITING, RUNNING, TRANSMITTING, RUN_FINISHED
\returns string error, waiting, running, data, finished
*/
static string runStatusType(runStatus s){\
switch (s) { \
case ERROR: return string("error"); \
case WAITING: return string("waiting"); \
case RUNNING: return string("running");\
case TRANSMITTING: return string("data"); \
case RUN_FINISHED: return string("finished"); \
default: return string("idle"); \
}};
/** returns detector type string from detector type index
\param type string can be Mythen, Pilatus, Eiger, Gotthard, Agipd, Unknown
\returns MYTHEN, PILATUS, EIGER, GOTTHARD, AGIPD, GENERIC
*/
static string getDetectorType(detectorType t){\
switch (t) {\
case MYTHEN: return string("Mythen"); \
case PILATUS: return string("Pilatus"); \
case EIGER: return string("Eiger"); \
case GOTTHARD: return string("Gotthard"); \
case AGIPD: return string("Agipd"); \
default: return string("Unknown"); \
}};
/** returns detector type index from detector type string
\param t can be MYTHEN, PILATUS, EIGER, GOTTHARD, AGIPD, GENERIC
\returns Mythen, Pilatus, Eiger, Gotthard, Agipd, Unknown
*/
static detectorType getDetectorType(string const type){\
if (type=="Mythen") return MYTHEN;\
else if (type=="Pilatus") return PILATUS; \
else if (type=="Eiger") return EIGER; \
else if (type=="Gotthard") return GOTTHARD; \
else if (type=="Agipd") return AGIPD; \
return GENERIC;};
/** returns synchronization type index from string
\param t can be none, gating, trigger, complementary
\returns ONE, MASTER_GATES, MASTER_TRIGGERS, SLAVE_STARTS_WHEN_MASTER_STOPS
*/
static synchronizationMode getSyncType(string const type){\
if (type=="none") return NONE;\
else if (type=="gating") return MASTER_GATES;\
else if (type=="trigger") return MASTER_TRIGGERS; \
else if (type=="complementary") return SLAVE_STARTS_WHEN_MASTER_STOPS; \
else return GET_SYNCHRONIZATION_MODE; \
};
/** returns synchronization type string from index
\param t can be NONE, MASTER_GATES, MASTER_TRIGGERS, SLAVE_STARTS_WHEN_MASTER_STOPS
\returns none, gating, trigger, complementary
*/
static string getSyncType(synchronizationMode s ){\
switch(s) { \
case NONE: return string("none"); \
case MASTER_GATES: return string("gating"); \
case MASTER_TRIGGERS: return string("trigger"); \
case SLAVE_STARTS_WHEN_MASTER_STOPS: return string("complementary"); \
default: return string("unknown"); \
}};
/** returns string from external signal type index
\param f can be SIGNAL_OFF, GATE_IN_ACTIVE_HIGH, GATE_IN_ACTIVE_LOW, TRIGGER_IN_RISING_EDGE, TRIGGER_IN_FALLING_EDGE, RO_TRIGGER_IN_RISING_EDGE, RO_TRIGGER_IN_FALLING_EDGE, GATE_OUT_ACTIVE_HIGH, GATE_OUT_ACTIVE_LOW, =TRIGGER_OUT_RISING_EDGE, TRIGGER_OUT_FALLING_EDGE, RO_TRIGGER_OUT_RISING_EDGE, RO_TRIGGER_OUT_FALLING_EDGE
\returns string off, gate_in_active_high, gate_in_active_low, trigger_in_rising_edge, trigger_in_falling_edge, ro_trigger_in_rising_edge, ro_trigger_in_falling_edge, gate_out_active_high, gate_out_active_low, trigger_out_rising_edge, trigger_out_falling_edge, ro_trigger_out_rising_edge, ro_trigger_out_falling_edge, unknown
*/
static string externalSignalType(externalSignalFlag f){\
switch(f) { \
case SIGNAL_OFF: return string( "off"); \
case GATE_IN_ACTIVE_HIGH: return string( "gate_in_active_high"); \
case GATE_IN_ACTIVE_LOW: return string( "gate_in_active_low"); \
case TRIGGER_IN_RISING_EDGE: return string( "trigger_in_rising_edge"); \
case TRIGGER_IN_FALLING_EDGE: return string( "trigger_in_falling_edge"); \
case RO_TRIGGER_IN_RISING_EDGE: return string( "ro_trigger_in_rising_edge"); \
case RO_TRIGGER_IN_FALLING_EDGE: return string( "ro_trigger_in_falling_edge"); \
case GATE_OUT_ACTIVE_HIGH: return string( "gate_out_active_high"); \
case GATE_OUT_ACTIVE_LOW: return string( "gate_out_active_low"); \
case TRIGGER_OUT_RISING_EDGE: return string( "trigger_out_rising_edge"); \
case TRIGGER_OUT_FALLING_EDGE: return string( "trigger_out_falling_edge"); \
case RO_TRIGGER_OUT_RISING_EDGE: return string( "ro_trigger_out_rising_edge");\
case RO_TRIGGER_OUT_FALLING_EDGE: return string( "ro_trigger_out_falling_edge"); \
default: return string( "unknown"); \
} };
/** returns external signal type index from string
\param string off, gate_in_active_high, gate_in_active_low, trigger_in_rising_edge, trigger_in_falling_edge, ro_trigger_in_rising_edge, ro_trigger_in_falling_edge, gate_out_active_high, gate_out_active_low, trigger_out_rising_edge, trigger_out_falling_edge, ro_trigger_out_rising_edge, ro_trigger_out_falling_edge, unknown
\returns f can be SIGNAL_OFF, GATE_IN_ACTIVE_HIGH, GATE_IN_ACTIVE_LOW, TRIGGER_IN_RISING_EDGE, TRIGGER_IN_FALLING_EDGE, RO_TRIGGER_IN_RISING_EDGE, RO_TRIGGER_IN_FALLING_EDGE, GATE_OUT_ACTIVE_HIGH, GATE_OUT_ACTIVE_LOW, =TRIGGER_OUT_RISING_EDGE, TRIGGER_OUT_FALLING_EDGE, RO_TRIGGER_OUT_RISING_EDGE, RO_TRIGGER_OUT_FALLING_EDGE,GET_EXTERNAL_SIGNAL_FLAG (if unknown)
*/
static externalSignalFlag externalSignalType(string sval){\
externalSignalFlag flag=GET_EXTERNAL_SIGNAL_FLAG;\
if (sval=="off") flag=SIGNAL_OFF;\
else if (sval=="gate_in_active_high") flag=GATE_IN_ACTIVE_HIGH; \
else if (sval=="gate_in_active_low") flag=GATE_IN_ACTIVE_LOW;\
else if (sval=="trigger_in_rising_edge") flag=TRIGGER_IN_RISING_EDGE;\
else if (sval=="trigger_in_falling_edge") flag=TRIGGER_IN_FALLING_EDGE;\
else if (sval=="ro_trigger_in_rising_edge") flag=RO_TRIGGER_IN_RISING_EDGE;\
else if (sval=="ro_trigger_in_falling_edge") flag=RO_TRIGGER_IN_FALLING_EDGE;\
else if (sval=="gate_out_active_high") flag=GATE_OUT_ACTIVE_HIGH;\
else if (sval=="gate_out_active_low") flag=GATE_OUT_ACTIVE_LOW;\
else if (sval=="trigger_out_rising_edge") flag=TRIGGER_OUT_RISING_EDGE;\
else if (sval=="trigger_out_falling_edge") flag=TRIGGER_OUT_FALLING_EDGE;\
else if (sval=="ro_trigger_out_rising_edge") flag=RO_TRIGGER_OUT_RISING_EDGE;\
else if (sval=="ro_trigger_out_falling_edge") flag=RO_TRIGGER_OUT_FALLING_EDGE;\
return flag;};
/** returns synchronization type string from index
\param t can be NONE, MASTER_GATES, MASTER_TRIGGERS, SLAVE_STARTS_WHEN_MASTER_STOPS
\returns none, gating, trigger, complementary
*/
static detectorSettings getDetectorSettings(string s){\
if (s=="standard") return STANDARD;\
if (s=="fast") return FAST;\
if (s=="highgain") return HIGHGAIN; \
if (s=="dynamicgain") return DYNAMICGAIN; \
if (s=="lowgain") return LOWGAIN; \
if (s=="mediumgain") return MEDIUMGAIN; \
if (s=="veryhighgain") return VERYHIGHGAIN; \
return GET_SETTINGS;\
};
/** returns detector settings string from index
\param t can be STANDARD, FAST, HIGHGAIN, DYNAMICGAIN, LOWGAIN, MEDIUMGAIN, VERYHIGHGAIN, GET_SETTINGS
\returns standard, fast, highgain, dynamicgain, lowgain, mediumgain, veryhighgain, undefined
*/
static string getDetectorSettings(detectorSettings s){\
switch(s) {\
case STANDARD: return string("standard");\
case FAST: return string("fast");\
case HIGHGAIN: return string("highgain");\
case DYNAMICGAIN: return string("dynamicgain"); \
case LOWGAIN: return string("lowgain"); \
case MEDIUMGAIN: return string("mediumgain"); \
case VERYHIGHGAIN: return string("veryhighgain"); \
default: return string("undefined"); \
}};
};

File diff suppressed because it is too large Load Diff

View File

@ -12,12 +12,12 @@ using namespace std;
/* It is inherited by both slsDetector and multiSlsDetector */
/* *\/ */
class slsDetectorCommand : public slsDetectorBase{
class slsDetectorCommand {
public:
slsDetectorCommand();
slsDetectorCommand(slsDetectorBase *det);
/* /\** */
@ -87,71 +87,6 @@ class slsDetectorCommand : public slsDetectorBase{
/** returns string from run status index
\param s can be ERROR, WAITING, RUNNING, TRANSMITTING, RUN_FINISHED
\returns string error, waiting, running, data, finished
*/
static string runStatusType(runStatus);
/** returns detector type string from detector type index
\param type string can be Mythen, Pilatus, Eiger, Gotthard, Agipd, Unknown
\returns MYTHEN, PILATUS, EIGER, GOTTHARD, AGIPD, GENERIC
*/
static string getDetectorType(detectorType t);
/** returns detector type index from detector type string
\param t can be MYTHEN, PILATUS, EIGER, GOTTHARD, AGIPD, GENERIC
\returns Mythen, Pilatus, Eiger, Gotthard, Agipd, Unknown
*/
static detectorType getDetectorType(string const type);
/** returns synchronization type index from string
\param t can be none, gating, trigger, complementary
\returns ONE, MASTER_GATES, MASTER_TRIGGERS, SLAVE_STARTS_WHEN_MASTER_STOPS
*/
static synchronizationMode getSyncType(string const type);
/** returns synchronization type string from index
\param t can be NONE, MASTER_GATES, MASTER_TRIGGERS, SLAVE_STARTS_WHEN_MASTER_STOPS
\returns none, gating, trigger, complementary
*/
static string getSyncType(synchronizationMode s );
/** returns string from external signal type index
\param f can be SIGNAL_OFF, GATE_IN_ACTIVE_HIGH, GATE_IN_ACTIVE_LOW, TRIGGER_IN_RISING_EDGE, TRIGGER_IN_FALLING_EDGE, RO_TRIGGER_IN_RISING_EDGE, RO_TRIGGER_IN_FALLING_EDGE, GATE_OUT_ACTIVE_HIGH, GATE_OUT_ACTIVE_LOW, =TRIGGER_OUT_RISING_EDGE, TRIGGER_OUT_FALLING_EDGE, RO_TRIGGER_OUT_RISING_EDGE, RO_TRIGGER_OUT_FALLING_EDGE
\returns string off, gate_in_active_high, gate_in_active_low, trigger_in_rising_edge, trigger_in_falling_edge, ro_trigger_in_rising_edge, ro_trigger_in_falling_edge, gate_out_active_high, gate_out_active_low, trigger_out_rising_edge, trigger_out_falling_edge, ro_trigger_out_rising_edge, ro_trigger_out_falling_edge, unknown
*/
static string externalSignalType(externalSignalFlag f);
/** returns external signal type index from string
\param string off, gate_in_active_high, gate_in_active_low, trigger_in_rising_edge, trigger_in_falling_edge, ro_trigger_in_rising_edge, ro_trigger_in_falling_edge, gate_out_active_high, gate_out_active_low, trigger_out_rising_edge, trigger_out_falling_edge, ro_trigger_out_rising_edge, ro_trigger_out_falling_edge, unknown
\returns f can be SIGNAL_OFF, GATE_IN_ACTIVE_HIGH, GATE_IN_ACTIVE_LOW, TRIGGER_IN_RISING_EDGE, TRIGGER_IN_FALLING_EDGE, RO_TRIGGER_IN_RISING_EDGE, RO_TRIGGER_IN_FALLING_EDGE, GATE_OUT_ACTIVE_HIGH, GATE_OUT_ACTIVE_LOW, =TRIGGER_OUT_RISING_EDGE, TRIGGER_OUT_FALLING_EDGE, RO_TRIGGER_OUT_RISING_EDGE, RO_TRIGGER_OUT_FALLING_EDGE,GET_EXTERNAL_SIGNAL_FLAG (if unknown)
*/
static externalSignalFlag externalSignalType(string sval);
/** returns synchronization type string from index
\param t can be NONE, MASTER_GATES, MASTER_TRIGGERS, SLAVE_STARTS_WHEN_MASTER_STOPS
\returns none, gating, trigger, complementary
*/
static detectorSettings getDetectorSettings(string s);
/** returns detector settings string from index
\param t can be STANDARD, FAST, HIGHGAIN, DYNAMICGAIN, LOWGAIN, MEDIUMGAIN, VERYHIGHGAIN, GET_SETTINGS
\returns standard, fast, highgain, dynamicgain, lowgain, mediumgain, veryhighgain, undefined
*/
static string getDetectorSettings(detectorSettings s);
@ -163,7 +98,7 @@ class slsDetectorCommand : public slsDetectorBase{
private:
slsDetectorBase *myDet;
string cmdUnderDevelopment(int narg, char *args[], int action);

View File

@ -24,8 +24,8 @@ using namespace std;
#include "sls_detector_defs.h"
#include "slsDetectorCommand.h"
//#include "slsDetectorBase.h"
//#include "slsDetectorCommand.h"
#include "slsDetectorBase.h"
#define MAX_TIMERS 10
#define MAX_ROIS 100
@ -79,7 +79,7 @@ class detectorData {
class slsDetectorUtils : public slsDetectorCommand {
class slsDetectorUtils : public slsDetectorBase {