Merge branch 'developer' of github.com:slsdetectorgroup/slsDetectorPackage into developer

This commit is contained in:
2018-05-28 19:17:37 +02:00
10 changed files with 5234 additions and 6175 deletions

View File

@ -1316,7 +1316,7 @@ int slsDetector::setOnline(int off) {
string slsDetector::checkOnline() {
string retval = string("");
string retval;
if(!controlSocket){
//this already sets the online/offline flag
setTCPSocket();

View File

@ -490,9 +490,9 @@ class slsDetector : public slsDetectorUtils, public energyConversion {
/* I/O */
/** returns the detector trimbit/settings directory \sa sharedSlsDetector */
char* getSettingsDir() {return thisDetector->settingsDir;};
std::string getSettingsDir() {return std::string(thisDetector->settingsDir);};
/** sets the detector trimbit/settings directory \sa sharedSlsDetector */
char* setSettingsDir(string s) {sprintf(thisDetector->settingsDir, s.c_str()); return thisDetector->settingsDir;};
std::string setSettingsDir(string s) {sprintf(thisDetector->settingsDir, s.c_str()); return thisDetector->settingsDir;};
@ -500,12 +500,12 @@ class slsDetector : public slsDetectorUtils, public energyConversion {
returns the location of the calibration files
\sa sharedSlsDetector
*/
char* getCalDir() {return thisDetector->calDir;};
std::string getCalDir() {return thisDetector->calDir;};
/**
sets the location of the calibration files
\sa sharedSlsDetector
*/
char* setCalDir(string s) {sprintf(thisDetector->calDir, s.c_str()); return thisDetector->calDir;};
std::string setCalDir(string s) {sprintf(thisDetector->calDir, s.c_str()); return thisDetector->calDir;};

View File

@ -3047,9 +3047,9 @@ string slsDetectorCommand::cmdSettingsDir(int narg, char *args[], int action){
if (action==PUT_ACTION) {
myDet->setSettingsDir(string(args[1]));
}
if (myDet->getSettingsDir()==NULL)
if (myDet->getSettingsDir()=="")
return string("undefined");
return string(myDet->getSettingsDir());
return myDet->getSettingsDir();
}
@ -3077,9 +3077,9 @@ string slsDetectorCommand::cmdCalDir(int narg, char *args[], int action){
if (action==PUT_ACTION) {
myDet->setCalDir(string(args[1]));
}
if (myDet->getCalDir()==NULL)
if ( (myDet->getCalDir()).empty() )
return string("undefined");
return string(myDet->getCalDir());
return myDet->getCalDir();
}

View File

@ -405,20 +405,20 @@ class slsDetectorUtils : public slsDetectorActions, public postProcessing {
/**
returns the detector trimbit/settings directory
*/
virtual char* getSettingsDir()=0;
virtual std::string getSettingsDir()=0;
/** sets the detector trimbit/settings directory */
virtual char* setSettingsDir(std::string s)=0;
virtual std::string setSettingsDir(std::string s)=0;
/**
returns the location of the calibration files
*/
virtual char* getCalDir()=0;
virtual std::string getCalDir()=0;
/**
sets the location of the calibration files
*/
virtual char* setCalDir(std::string s)=0;
virtual std::string setCalDir(std::string s)=0;
/** Frees the shared memory - should not be used except for debugging*/
virtual int freeSharedMemory()=0;