mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2026-01-16 11:13:44 +01:00
Merge branch 'developer' into versioning
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
#include <math.h>
|
||||
#include "gitInfoLib.h"
|
||||
|
||||
using namespace std;
|
||||
int slsDetector::initSharedMemory(detectorType type, int id) {
|
||||
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
#include <fstream>
|
||||
|
||||
|
||||
using namespace std;
|
||||
//
|
||||
|
||||
/**
|
||||
|
||||
@@ -38,7 +38,7 @@ class slsDetectorActions : public virtual slsDetectorBase
|
||||
\param par for script
|
||||
\returns 0 if action disabled, >0 otherwise
|
||||
*/
|
||||
int setAction(int iaction, string fname="", string par="");
|
||||
int setAction(int iaction,std::string fname="",std::string par="");
|
||||
|
||||
/**
|
||||
set action script
|
||||
@@ -46,7 +46,7 @@ class slsDetectorActions : public virtual slsDetectorBase
|
||||
\param fname for script ("" disable)
|
||||
\returns 0 if action disabled, >0 otherwise
|
||||
*/
|
||||
int setActionScript(int iaction, string fname="");
|
||||
int setActionScript(int iaction, std::string fname="");
|
||||
|
||||
|
||||
/**
|
||||
@@ -55,7 +55,7 @@ class slsDetectorActions : public virtual slsDetectorBase
|
||||
\param par for script
|
||||
\returns 0 if action disabled, >0 otherwise
|
||||
*/
|
||||
int setActionParameter(int iaction, string par="");
|
||||
int setActionParameter(int iaction, std::string par="");
|
||||
|
||||
|
||||
/**
|
||||
@@ -63,14 +63,14 @@ class slsDetectorActions : public virtual slsDetectorBase
|
||||
\param iaction can be enum {startScript, scriptBefore, headerBefore, headerAfter,scriptAfter, stopScript}
|
||||
\returns action script
|
||||
*/
|
||||
string getActionScript(int iaction);
|
||||
std::string getActionScript(int iaction);
|
||||
|
||||
/**
|
||||
returns action parameter
|
||||
\param iaction can be enum {startScript, scriptBefore, headerBefore, headerAfter,scriptAfter, stopScript}
|
||||
\returns action parameter
|
||||
*/
|
||||
string getActionParameter(int iaction);
|
||||
std::string getActionParameter(int iaction);
|
||||
|
||||
/**
|
||||
returns action mode
|
||||
@@ -89,20 +89,20 @@ class slsDetectorActions : public virtual slsDetectorBase
|
||||
\param precision to write the scan varaible in the scan name (-1 unchanged)
|
||||
\returns 0 is scan disabled, >0 otherwise
|
||||
*/
|
||||
int setScan(int index, string script="", int nvalues=-1, double *values=NULL, string par="", int precision=-1);
|
||||
int setScan(int index, std::string script="", int nvalues=-1, double *values=NULL, std::string par="", int precision=-1);
|
||||
|
||||
/** set scan script
|
||||
\param index of the scan (0,1)
|
||||
\param script fname for script ("" disables, "none" disables and overwrites current, "threshold" threshold scan, "trimbits", trimbits scan)
|
||||
\returns 0 is scan disabled, >0 otherwise
|
||||
*/
|
||||
int setScanScript(int index, string script="");
|
||||
int setScanScript(int index, std::string script="");
|
||||
/** set scan script parameter
|
||||
\param index of the scan (0,1)
|
||||
\param script parameter for scan
|
||||
\returns 0 is scan disabled, >0 otherwise
|
||||
*/
|
||||
int setScanParameter(int index, string par="");
|
||||
int setScanParameter(int index, std::string par="");
|
||||
/** set scan script parameter
|
||||
\param index of the scan (0,1)
|
||||
\param precision scan varaible precision to be printed in file name
|
||||
@@ -130,14 +130,14 @@ class slsDetectorActions : public virtual slsDetectorBase
|
||||
\param iscan can be (0,1)
|
||||
\returns scan script
|
||||
*/
|
||||
string getScanScript(int iscan);
|
||||
std::string getScanScript(int iscan);
|
||||
|
||||
/**
|
||||
returns scan parameter
|
||||
\param iscan can be (0,1)
|
||||
\returns scan parameter
|
||||
*/
|
||||
string getScanParameter(int iscan);
|
||||
std::string getScanParameter(int iscan);
|
||||
|
||||
/**
|
||||
returns scan mode
|
||||
@@ -273,7 +273,7 @@ class slsDetectorActions : public virtual slsDetectorBase
|
||||
int startIndex;
|
||||
int lastIndex;
|
||||
int nowIndex;
|
||||
string fName;
|
||||
std::string fName;
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -54,8 +54,6 @@
|
||||
|
||||
#include <string>
|
||||
|
||||
|
||||
using namespace std;
|
||||
/**
|
||||
|
||||
@libdoc The slsDetectorBase contains also a set of purely virtual functions useful for the implementation of the derived classes
|
||||
@@ -83,7 +81,7 @@ class slsDetectorBase : public virtual slsDetectorDefs, public virtual errorDef
|
||||
*/
|
||||
virtual detectorType getDetectorsType(int pos=-1)=0;
|
||||
|
||||
string getDetectorDeveloper(){return string("PSI");};
|
||||
std::string getDetectorDeveloper(){return std::string("PSI");};
|
||||
// protected:
|
||||
|
||||
/**
|
||||
@@ -91,14 +89,14 @@ class slsDetectorBase : public virtual slsDetectorDefs, public virtual errorDef
|
||||
\param fname file with angular conversion constants ("" disable)
|
||||
\returns 0 if angular conversion disabled, >0 otherwise
|
||||
*/
|
||||
virtual int setAngularConversionFile(string fname="")=0;
|
||||
virtual int setAngularConversionFile(std::string fname="")=0;
|
||||
|
||||
|
||||
/**
|
||||
pure virtual function
|
||||
returns the angular conversion file
|
||||
*/
|
||||
virtual string getAngularConversionFile()=0;
|
||||
virtual std::string getAngularConversionFile()=0;
|
||||
|
||||
|
||||
|
||||
@@ -108,7 +106,7 @@ class slsDetectorBase : public virtual slsDetectorDefs, public virtual errorDef
|
||||
\param fname for script ("" disable)
|
||||
\returns 0 if action disabled, >0 otherwise
|
||||
*/
|
||||
virtual int setActionScript(int iaction, string fname="")=0;
|
||||
virtual int setActionScript(int iaction, std::string fname="")=0;
|
||||
|
||||
/**
|
||||
set action
|
||||
@@ -116,21 +114,21 @@ class slsDetectorBase : public virtual slsDetectorDefs, public virtual errorDef
|
||||
\param par for script ("" disable)
|
||||
\returns 0 if action disabled, >0 otherwise
|
||||
*/
|
||||
virtual int setActionParameter(int iaction, string par="")=0;
|
||||
virtual int setActionParameter(int iaction, std::string par="")=0;
|
||||
|
||||
/**
|
||||
returns action script
|
||||
\param iaction can be enum {startScript, scriptBefore, headerBefore, headerAfter,scriptAfter, stopScript}
|
||||
\returns action script
|
||||
*/
|
||||
virtual string getActionScript(int iaction)=0;
|
||||
virtual std::string getActionScript(int iaction)=0;
|
||||
|
||||
/**
|
||||
returns action parameter
|
||||
\param iaction can be enum {startScript, scriptBefore, headerBefore, headerAfter,scriptAfter, stopScript}
|
||||
\returns action parameter
|
||||
*/
|
||||
virtual string getActionParameter(int iaction)=0;
|
||||
virtual std::string getActionParameter(int iaction)=0;
|
||||
|
||||
/**
|
||||
set scan script
|
||||
@@ -138,7 +136,7 @@ class slsDetectorBase : public virtual slsDetectorDefs, public virtual errorDef
|
||||
\param script fname for script ("" disable, "none" disables and overwrites current, "threshold" makes threshold scan, "trimbits" make trimbits scan, "energy" makes energy scan)
|
||||
\returns 0 if scan disabled, >0 otherwise
|
||||
*/
|
||||
virtual int setScanScript(int index, string script="")=0;
|
||||
virtual int setScanScript(int index, std::string script="")=0;
|
||||
|
||||
/**
|
||||
set scan script parameter
|
||||
@@ -146,7 +144,7 @@ class slsDetectorBase : public virtual slsDetectorDefs, public virtual errorDef
|
||||
\param spar parameter to be passed to the scan script with syntax par=spar
|
||||
\returns 0 if scan disabled, >0 otherwise
|
||||
*/
|
||||
virtual int setScanParameter(int index, string spar="")=0;
|
||||
virtual int setScanParameter(int index, std::string spar="")=0;
|
||||
|
||||
|
||||
/** set scan precision
|
||||
@@ -169,14 +167,14 @@ class slsDetectorBase : public virtual slsDetectorDefs, public virtual errorDef
|
||||
\param index is the scan index (0 or 1)
|
||||
\returns "none" if disables, "threshold" threshold scan, "trimbits" trimbits scan, "energy" energy scan or scan script name
|
||||
*/
|
||||
virtual string getScanScript(int index)=0;
|
||||
virtual std::string getScanScript(int index)=0;
|
||||
|
||||
/**
|
||||
get scan script
|
||||
\param index is the scan index (0 or 1)
|
||||
\returns scan script parameter
|
||||
*/
|
||||
virtual string getScanParameter(int index)=0;
|
||||
virtual std::string getScanParameter(int index)=0;
|
||||
|
||||
/**
|
||||
get scan precision
|
||||
@@ -199,7 +197,7 @@ class slsDetectorBase : public virtual slsDetectorDefs, public virtual errorDef
|
||||
\param fname file name
|
||||
\returns OK or FAIL
|
||||
*/
|
||||
virtual int writeConfigurationFile(string const fname)=0;
|
||||
virtual int writeConfigurationFile(std::string const fname)=0;
|
||||
|
||||
|
||||
/**
|
||||
@@ -208,7 +206,7 @@ class slsDetectorBase : public virtual slsDetectorDefs, public virtual errorDef
|
||||
\param fname file name to load data from
|
||||
\returns OK or FAIL
|
||||
*/
|
||||
virtual int loadImageToDetector(imageType index,string const fname)=0;
|
||||
virtual int loadImageToDetector(imageType index,std::string const fname)=0;
|
||||
|
||||
/**
|
||||
\returns number of positions
|
||||
@@ -241,7 +239,7 @@ class slsDetectorBase : public virtual slsDetectorDefs, public virtual errorDef
|
||||
virtual int getTotalNumberOfChannels(dimension d)=0;
|
||||
|
||||
/** generates file name without extension */
|
||||
virtual string createFileName()=0;
|
||||
virtual std::string createFileName()=0;
|
||||
|
||||
|
||||
virtual void incrementProgress()=0;
|
||||
@@ -254,12 +252,12 @@ class slsDetectorBase : public virtual slsDetectorDefs, public virtual errorDef
|
||||
virtual double* decodeData(int *datain, int &nn, double *fdata=NULL)=0;
|
||||
|
||||
|
||||
virtual string getCurrentFileName()=0;
|
||||
virtual std::string getCurrentFileName()=0;
|
||||
|
||||
|
||||
virtual int getFileIndexFromFileName(string fname)=0;
|
||||
virtual int getFileIndexFromFileName(std::string fname)=0;
|
||||
|
||||
virtual int getIndicesFromFileName(string fname,int &index)=0;
|
||||
virtual int getIndicesFromFileName(std::string fname,int &index)=0;
|
||||
|
||||
virtual double *convertAngles()=0;
|
||||
/**
|
||||
@@ -282,9 +280,9 @@ class slsDetectorBase : public virtual slsDetectorDefs, public virtual errorDef
|
||||
*/
|
||||
virtual int getRateCorrection()=0;
|
||||
|
||||
virtual int setFlatFieldCorrection(string fname="")=0;
|
||||
virtual int setFlatFieldCorrection(std::string fname="")=0;
|
||||
|
||||
int setFlatFieldCorrectionFile(string fname=""){return setFlatFieldCorrection(fname);};
|
||||
int setFlatFieldCorrectionFile(std::string fname=""){return setFlatFieldCorrection(fname);};
|
||||
|
||||
/**
|
||||
set/get dynamic range
|
||||
@@ -532,12 +530,12 @@ class slsDetectorBase : public virtual slsDetectorDefs, public virtual errorDef
|
||||
\param fname file name
|
||||
\returns OK or FAIL
|
||||
*/
|
||||
virtual int readConfigurationFile(string const fname)=0;
|
||||
virtual int readConfigurationFile(std::string const fname)=0;
|
||||
|
||||
virtual int dumpDetectorSetup(string const fname, int level)=0;
|
||||
int dumpDetectorSetup(string const fname){return dumpDetectorSetup(fname,0);};
|
||||
virtual int retrieveDetectorSetup(string const fname, int level)=0;
|
||||
int retrieveDetectorSetup(string const fname){return retrieveDetectorSetup(fname,0);};
|
||||
virtual int dumpDetectorSetup(std::string const fname, int level)=0;
|
||||
int dumpDetectorSetup(std::string const fname){return dumpDetectorSetup(fname,0);};
|
||||
virtual int retrieveDetectorSetup(std::string const fname, int level)=0;
|
||||
int retrieveDetectorSetup(std::string const fname){return retrieveDetectorSetup(fname,0);};
|
||||
/**
|
||||
@short
|
||||
\returns the default output file index
|
||||
@@ -628,29 +626,29 @@ virtual int enableDataStreamingFromReceiver(int enable=-1)=0;
|
||||
virtual runStatus startReceiverReadout()=0;
|
||||
|
||||
|
||||
/** returns detector type string from detector type index
|
||||
\param t string can be Mythen, Pilatus, Eiger, Gotthard, Agipd, Unknown
|
||||
/** returns detector type std::string from detector type index
|
||||
\param t std::string can be Mythen, Pilatus, Eiger, Gotthard, Agipd, Unknown
|
||||
\returns MYTHEN, PILATUS, EIGER, GOTTHARD, AGIPD, MÖNCH, GENERIC
|
||||
*/
|
||||
static string getDetectorType(detectorType t){\
|
||||
static std::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"); \
|
||||
case MOENCH: return string("Moench"); \
|
||||
case JUNGFRAU: return string("Jungfrau"); \
|
||||
case JUNGFRAUCTB: return string("JungfrauCTB"); \
|
||||
case PROPIX: return string("Propix"); \
|
||||
default: return string("Unknown"); \
|
||||
case MYTHEN: return std::string("Mythen"); \
|
||||
case PILATUS: return std::string("Pilatus"); \
|
||||
case EIGER: return std::string("Eiger"); \
|
||||
case GOTTHARD: return std::string("Gotthard"); \
|
||||
case AGIPD: return std::string("Agipd"); \
|
||||
case MOENCH: return std::string("Moench"); \
|
||||
case JUNGFRAU: return std::string("Jungfrau"); \
|
||||
case JUNGFRAUCTB: return std::string("JungfrauCTB"); \
|
||||
case PROPIX: return std::string("Propix"); \
|
||||
default: return std::string("Unknown"); \
|
||||
}};
|
||||
|
||||
/** returns detector type index from detector type string
|
||||
/** returns detector type index from detector type std::string
|
||||
\param type can be MYTHEN, PILATUS, EIGER, GOTTHARD, AGIPD, GENERIC
|
||||
\returns Mythen, Pilatus, Eiger, Gotthard, Agipd, Mönch, Unknown
|
||||
*/
|
||||
static detectorType getDetectorType(string const type){\
|
||||
static detectorType getDetectorType(std::string const type){\
|
||||
if (type=="Mythen") return MYTHEN;\
|
||||
if (type=="Pilatus") return PILATUS; \
|
||||
if (type=="Eiger") return EIGER; \
|
||||
@@ -664,11 +662,11 @@ virtual int enableDataStreamingFromReceiver(int enable=-1)=0;
|
||||
|
||||
|
||||
|
||||
/** returns synchronization type index from string
|
||||
/** returns synchronization type index from std::string
|
||||
\param type can be none, gating, trigger, complementary
|
||||
\returns ONE, MASTER_GATES, MASTER_TRIGGERS, SLAVE_STARTS_WHEN_MASTER_STOPS
|
||||
*/
|
||||
static synchronizationMode getSyncType(string const type){\
|
||||
static synchronizationMode getSyncType(std::string const type){\
|
||||
if (type=="none") return NO_SYNCHRONIZATION;\
|
||||
if (type=="gating") return MASTER_GATES;\
|
||||
if (type=="trigger") return MASTER_TRIGGERS; \
|
||||
@@ -676,55 +674,55 @@ virtual int enableDataStreamingFromReceiver(int enable=-1)=0;
|
||||
return GET_SYNCHRONIZATION_MODE; \
|
||||
};
|
||||
|
||||
/** returns synchronization type string from index
|
||||
/** returns synchronization type std::string from index
|
||||
\param s can be NONE, MASTER_GATES, MASTER_TRIGGERS, SLAVE_STARTS_WHEN_MASTER_STOPS
|
||||
\returns none, gating, trigger, complementary, unknown
|
||||
*/
|
||||
static string getSyncType(synchronizationMode s ){\
|
||||
static std::string getSyncType(synchronizationMode s ){\
|
||||
switch(s) { \
|
||||
case NO_SYNCHRONIZATION: 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"); \
|
||||
case NO_SYNCHRONIZATION: return std::string("none"); \
|
||||
case MASTER_GATES: return std::string("gating"); \
|
||||
case MASTER_TRIGGERS: return std::string("trigger"); \
|
||||
case SLAVE_STARTS_WHEN_MASTER_STOPS: return std::string("complementary"); \
|
||||
default: return std::string("unknown"); \
|
||||
}};
|
||||
|
||||
|
||||
|
||||
/** returns string from external signal type index
|
||||
/** returns std::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, OUTPUT_LOW, OUTPUT_HIGH, MASTER_SLAVE_SYNCHRONIZATION, GET_EXTERNAL_SIGNAL_FLAG
|
||||
\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, gnd, vcc, sync, unknown
|
||||
\returns std::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, gnd, vcc, sync, unknown
|
||||
*/
|
||||
static string externalSignalType(externalSignalFlag f){\
|
||||
static std::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"); \
|
||||
case MASTER_SLAVE_SYNCHRONIZATION: return string("sync"); \
|
||||
case OUTPUT_LOW: return string("gnd"); \
|
||||
case OUTPUT_HIGH: return string("vcc"); \
|
||||
default: return string( "unknown"); \
|
||||
case SIGNAL_OFF: return std::string( "off"); \
|
||||
case GATE_IN_ACTIVE_HIGH: return std::string( "gate_in_active_high"); \
|
||||
case GATE_IN_ACTIVE_LOW: return std::string( "gate_in_active_low"); \
|
||||
case TRIGGER_IN_RISING_EDGE: return std::string( "trigger_in_rising_edge"); \
|
||||
case TRIGGER_IN_FALLING_EDGE: return std::string( "trigger_in_falling_edge"); \
|
||||
case RO_TRIGGER_IN_RISING_EDGE: return std::string( "ro_trigger_in_rising_edge"); \
|
||||
case RO_TRIGGER_IN_FALLING_EDGE: return std::string( "ro_trigger_in_falling_edge"); \
|
||||
case GATE_OUT_ACTIVE_HIGH: return std::string( "gate_out_active_high"); \
|
||||
case GATE_OUT_ACTIVE_LOW: return std::string( "gate_out_active_low"); \
|
||||
case TRIGGER_OUT_RISING_EDGE: return std::string( "trigger_out_rising_edge"); \
|
||||
case TRIGGER_OUT_FALLING_EDGE: return std::string( "trigger_out_falling_edge"); \
|
||||
case RO_TRIGGER_OUT_RISING_EDGE: return std::string( "ro_trigger_out_rising_edge"); \
|
||||
case RO_TRIGGER_OUT_FALLING_EDGE: return std::string( "ro_trigger_out_falling_edge"); \
|
||||
case MASTER_SLAVE_SYNCHRONIZATION: return std::string("sync"); \
|
||||
case OUTPUT_LOW: return std::string("gnd"); \
|
||||
case OUTPUT_HIGH: return std::string("vcc"); \
|
||||
default: return std::string( "unknown"); \
|
||||
} };
|
||||
|
||||
|
||||
|
||||
|
||||
/** returns external signal type index from string
|
||||
/** returns external signal type index from std::string
|
||||
\param sval 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, gnd, vcc, sync, unknown
|
||||
\returns 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, OUTPUT_LOW, OUTPUT_HIGH, MASTER_SLAVE_SYNCHRONIZATION, GET_EXTERNAL_SIGNAL_FLAG (if unknown)
|
||||
*/
|
||||
|
||||
static externalSignalFlag externalSignalType(string sval){\
|
||||
static externalSignalFlag externalSignalType(std::string sval){\
|
||||
if (sval=="off") return SIGNAL_OFF;\
|
||||
if (sval=="gate_in_active_high") return GATE_IN_ACTIVE_HIGH; \
|
||||
if (sval=="gate_in_active_low") return GATE_IN_ACTIVE_LOW;\
|
||||
@@ -743,39 +741,39 @@ virtual int enableDataStreamingFromReceiver(int enable=-1)=0;
|
||||
if (sval=="vcc") return OUTPUT_HIGH;\
|
||||
return GET_EXTERNAL_SIGNAL_FLAG ;};
|
||||
|
||||
/** returns detector settings string from index
|
||||
/** returns detector settings std::string from index
|
||||
\param s can be STANDARD, FAST, HIGHGAIN, DYNAMICGAIN, LOWGAIN, MEDIUMGAIN, VERYHIGHGAIN, LOWNOISE,
|
||||
DYNAMICHG0, FIXGAIN1, FIXGAIN2, FORCESWITCHG1, FORCESWITCHG2, GET_SETTINGS
|
||||
\returns standard, fast, highgain, dynamicgain, lowgain, mediumgain, veryhighgain, lownoise,
|
||||
dynamichg0, fixgain1, fixgain2, forceswitchg1, forceswitchg2, verylowgain, undefined
|
||||
*/
|
||||
static string getDetectorSettings(detectorSettings s){\
|
||||
static std::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"); \
|
||||
case LOWNOISE: return string("lownoise"); \
|
||||
case DYNAMICHG0: return string("dynamichg0"); \
|
||||
case FIXGAIN1: return string("fixgain1"); \
|
||||
case FIXGAIN2: return string("fixgain2"); \
|
||||
case FORCESWITCHG1: return string("forceswitchg1");\
|
||||
case FORCESWITCHG2: return string("forceswitchg2");\
|
||||
case VERYLOWGAIN: return string("verylowgain");\
|
||||
default: return string("undefined"); \
|
||||
case STANDARD: return std::string("standard"); \
|
||||
case FAST: return std::string("fast"); \
|
||||
case HIGHGAIN: return std::string("highgain"); \
|
||||
case DYNAMICGAIN: return std::string("dynamicgain"); \
|
||||
case LOWGAIN: return std::string("lowgain"); \
|
||||
case MEDIUMGAIN: return std::string("mediumgain"); \
|
||||
case VERYHIGHGAIN: return std::string("veryhighgain"); \
|
||||
case LOWNOISE: return std::string("lownoise"); \
|
||||
case DYNAMICHG0: return std::string("dynamichg0"); \
|
||||
case FIXGAIN1: return std::string("fixgain1"); \
|
||||
case FIXGAIN2: return std::string("fixgain2"); \
|
||||
case FORCESWITCHG1: return std::string("forceswitchg1");\
|
||||
case FORCESWITCHG2: return std::string("forceswitchg2");\
|
||||
case VERYLOWGAIN: return std::string("verylowgain");\
|
||||
default: return std::string("undefined"); \
|
||||
}};
|
||||
|
||||
/** returns detector settings string from index
|
||||
/** returns detector settings std::string from index
|
||||
\param s can be standard, fast, highgain, dynamicgain, lowgain, mediumgain, veryhighgain, lownoise,
|
||||
dynamichg0, fixgain1, fixgain2, forceswitchg1, forceswitchg2, undefined
|
||||
\returns setting index STANDARD, FAST, HIGHGAIN, DYNAMICGAIN, LOWGAIN, MEDIUMGAIN, VERYHIGHGAIN,LOWNOISE,
|
||||
DYNAMICHG0, FIXGAIN1, FIXGAIN2, FORCESWITCHG1, FORCESWITCHG2, VERYLOWGAIN, GET_SETTINGS
|
||||
*/
|
||||
|
||||
static detectorSettings getDetectorSettings(string s){ \
|
||||
static detectorSettings getDetectorSettings(std::string s){ \
|
||||
if (s=="standard") return STANDARD; \
|
||||
if (s=="fast") return FAST; \
|
||||
if (s=="highgain") return HIGHGAIN; \
|
||||
@@ -795,31 +793,31 @@ virtual int enableDataStreamingFromReceiver(int enable=-1)=0;
|
||||
|
||||
|
||||
/**
|
||||
returns external communication mode string from index
|
||||
returns external communication mode std::string from index
|
||||
\param f can be AUTO_TIMING, TRIGGER_EXPOSURE, TRIGGER_READOUT, GATE_FIX_NUMBER, GATE_WITH_START_TRIGGER, BURST_TRIGGER, GET_EXTERNAL_COMMUNICATION_MODE
|
||||
\returns auto, trigger, ro_trigger, gating, triggered_gating, unknown
|
||||
*/
|
||||
|
||||
static string externalCommunicationType(externalCommunicationMode f){ \
|
||||
static std::string externalCommunicationType(externalCommunicationMode f){ \
|
||||
switch(f) { \
|
||||
case AUTO_TIMING: return string( "auto"); \
|
||||
case TRIGGER_EXPOSURE: return string("trigger"); \
|
||||
case TRIGGER_READOUT: return string("ro_trigger"); \
|
||||
case GATE_FIX_NUMBER: return string("gating"); \
|
||||
case GATE_WITH_START_TRIGGER: return string("triggered_gating"); \
|
||||
case BURST_TRIGGER: return string("burst_trigger"); \
|
||||
default: return string( "unknown"); \
|
||||
case AUTO_TIMING: return std::string( "auto"); \
|
||||
case TRIGGER_EXPOSURE: return std::string("trigger"); \
|
||||
case TRIGGER_READOUT: return std::string("ro_trigger"); \
|
||||
case GATE_FIX_NUMBER: return std::string("gating"); \
|
||||
case GATE_WITH_START_TRIGGER: return std::string("triggered_gating"); \
|
||||
case BURST_TRIGGER: return std::string("burst_trigger"); \
|
||||
default: return std::string( "unknown"); \
|
||||
} };
|
||||
|
||||
|
||||
|
||||
/**
|
||||
returns external communication mode index from string
|
||||
returns external communication mode index from std::string
|
||||
\param sval can be auto, trigger, ro_trigger, gating, triggered_gating
|
||||
\returns AUTO_TIMING, TRIGGER_EXPOSURE, TRIGGER_READOUT, GATE_FIX_NUMBER, GATE_WITH_START_TRIGGER, BURST_TRIGGER, GET_EXTERNAL_COMMUNICATION_MODE
|
||||
*/
|
||||
|
||||
static externalCommunicationMode externalCommunicationType(string sval){\
|
||||
static externalCommunicationMode externalCommunicationType(std::string sval){\
|
||||
if (sval=="auto") return AUTO_TIMING;\
|
||||
if (sval=="trigger") return TRIGGER_EXPOSURE; \
|
||||
if (sval=="ro_trigger") return TRIGGER_READOUT;\
|
||||
@@ -829,66 +827,66 @@ virtual int enableDataStreamingFromReceiver(int enable=-1)=0;
|
||||
return GET_EXTERNAL_COMMUNICATION_MODE; \
|
||||
};
|
||||
|
||||
/** returns string from run status index
|
||||
/** returns std::string from run status index
|
||||
\param s can be ERROR, WAITING, RUNNING, TRANSMITTING, RUN_FINISHED
|
||||
\returns string error, waiting, running, data, finished
|
||||
\returns std::string error, waiting, running, data, finished
|
||||
*/
|
||||
static string runStatusType(runStatus s){\
|
||||
static std::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"); \
|
||||
case ERROR: return std::string("error"); \
|
||||
case WAITING: return std::string("waiting"); \
|
||||
case RUNNING: return std::string("running");\
|
||||
case TRANSMITTING: return std::string("data"); \
|
||||
case RUN_FINISHED: return std::string("finished"); \
|
||||
default: return std::string("idle"); \
|
||||
}};
|
||||
|
||||
/** returns string from file format index
|
||||
/** returns std::string from file format index
|
||||
\param s can be RAW, HDF5
|
||||
\returns string raw, hdf5
|
||||
\returns std::string raw, hdf5
|
||||
*/
|
||||
static string fileFormats(fileFormat f){\
|
||||
static std::string fileFormats(fileFormat f){\
|
||||
switch (f) { \
|
||||
case BINARY: return string("binary"); \
|
||||
case ASCII: return string("ascii"); \
|
||||
case HDF5: return string("hdf5"); \
|
||||
default: return string("unknown"); \
|
||||
case BINARY: return std::string("binary"); \
|
||||
case ASCII: return std::string("ascii"); \
|
||||
case HDF5: return std::string("hdf5"); \
|
||||
default: return std::string("unknown"); \
|
||||
}};
|
||||
|
||||
/** returns string from timer index
|
||||
/** returns std::string from timer index
|
||||
\param s can be FRAME_NUMBER,ACQUISITION_TIME,FRAME_PERIOD, DELAY_AFTER_TRIGGER,GATES_NUMBER,PROBES_NUMBER, CYCLES_NUMBER, ACTUAL_TIME,MEASUREMENT_TIME, PROGRESS,MEASUREMENTS_NUMBER,FRAMES_FROM_START,FRAMES_FROM_START_PG,SAMPLES_JCTB,SUBFRAME_ACQUISITION_TIME,STORAGE_CELL_NUMBER, SUBFRAME_PERIOD
|
||||
\returns string frame_number,acquisition_time,frame_period, delay_after_trigger,gates_number,probes_number, cycles_number, actual_time,measurement_time, progress,measurements_number,frames_from_start,frames_from_start_pg,samples_jctb,subframe_acquisition_time,storage_cell_number, subframe_period
|
||||
\returns std::string frame_number,acquisition_time,frame_period, delay_after_trigger,gates_number,probes_number, cycles_number, actual_time,measurement_time, progress,measurements_number,frames_from_start,frames_from_start_pg,samples_jctb,subframe_acquisition_time,storage_cell_number, subframe_period
|
||||
*/
|
||||
static string getTimerType(timerIndex t){ \
|
||||
static std::string getTimerType(timerIndex t){ \
|
||||
switch (t) { \
|
||||
case FRAME_NUMBER: return string("frame_number"); \
|
||||
case ACQUISITION_TIME: return string("acquisition_time"); \
|
||||
case FRAME_PERIOD: return string("frame_period"); \
|
||||
case DELAY_AFTER_TRIGGER: return string("delay_after_trigger"); \
|
||||
case GATES_NUMBER: return string("gates_number"); \
|
||||
case PROBES_NUMBER: return string("probes_number"); \
|
||||
case CYCLES_NUMBER: return string("cycles_number"); \
|
||||
case ACTUAL_TIME: return string("actual_time"); \
|
||||
case MEASUREMENT_TIME: return string("measurement_time"); \
|
||||
case PROGRESS: return string("progress"); \
|
||||
case MEASUREMENTS_NUMBER: return string("measurements_number"); \
|
||||
case FRAMES_FROM_START: return string("frames_from_start"); \
|
||||
case FRAMES_FROM_START_PG: return string("frames_from_start_pg"); \
|
||||
case SAMPLES_JCTB: return string("samples_jctb"); \
|
||||
case SUBFRAME_ACQUISITION_TIME: return string("subframe_acquisition_time"); \
|
||||
case SUBFRAME_PERIOD: return string("subframe_period"); \
|
||||
case STORAGE_CELL_NUMBER: return string("storage_cell_number"); \
|
||||
default: return string("unknown"); \
|
||||
case FRAME_NUMBER: return std::string("frame_number"); \
|
||||
case ACQUISITION_TIME: return std::string("acquisition_time"); \
|
||||
case FRAME_PERIOD: return std::string("frame_period"); \
|
||||
case DELAY_AFTER_TRIGGER: return std::string("delay_after_trigger"); \
|
||||
case GATES_NUMBER: return std::string("gates_number"); \
|
||||
case PROBES_NUMBER: return std::string("probes_number"); \
|
||||
case CYCLES_NUMBER: return std::string("cycles_number"); \
|
||||
case ACTUAL_TIME: return std::string("actual_time"); \
|
||||
case MEASUREMENT_TIME: return std::string("measurement_time"); \
|
||||
case PROGRESS: return std::string("progress"); \
|
||||
case MEASUREMENTS_NUMBER: return std::string("measurements_number"); \
|
||||
case FRAMES_FROM_START: return std::string("frames_from_start"); \
|
||||
case FRAMES_FROM_START_PG: return std::string("frames_from_start_pg"); \
|
||||
case SAMPLES_JCTB: return std::string("samples_jctb"); \
|
||||
case SUBFRAME_ACQUISITION_TIME: return std::string("subframe_acquisition_time"); \
|
||||
case SUBFRAME_PERIOD: return std::string("subframe_period"); \
|
||||
case STORAGE_CELL_NUMBER: return std::string("storage_cell_number"); \
|
||||
default: return std::string("unknown"); \
|
||||
}};
|
||||
|
||||
|
||||
/**
|
||||
@short returns adc index from string
|
||||
@short returns adc index from std::string
|
||||
\param s can be temp_fpga, temp_fpgaext, temp_10ge, temp_dcdc, temp_sodl, temp_sodr, temp_fpgafl, temp_fpgafr
|
||||
\returns TEMPERATURE_FPGA, TEMPERATURE_FPGAEXT, TEMPERATURE_10GE, TEMPERATURE_DCDC, TEMPERATURE_SODL,
|
||||
TEMPERATURE_SODR, TEMPERATURE_FPGA2, TEMPERATURE_FPGA3, -1 when unknown mode
|
||||
*/
|
||||
static int getADCIndex(string s){
|
||||
static int getADCIndex(std::string s){
|
||||
if (s=="temp_fpga") return TEMPERATURE_FPGA;
|
||||
if (s=="temp_fpgaext") return TEMPERATURE_FPGAEXT;
|
||||
if (s=="temp_10ge") return TEMPERATURE_10GE;
|
||||
@@ -902,11 +900,11 @@ virtual int enableDataStreamingFromReceiver(int enable=-1)=0;
|
||||
|
||||
|
||||
/**
|
||||
@short returns dac index from string
|
||||
@short returns dac index from std::string
|
||||
\param s can be vcmp_ll, vcmp_lr, vcmp_rl, vcmp_rr, vthreshold, vrf, vrs, vtr, vcall, vcp
|
||||
\returns E_Vcmp_ll, E_Vcmp_lr, E_Vcmp_rl, E_Vcmp_rr, THRESHOLD, E_Vrf, E_Vrs, E_Vtr, E_cal, E_Vcp , -1 when unknown mode
|
||||
*/
|
||||
static int getDACIndex(string s){
|
||||
static int getDACIndex(std::string s){
|
||||
if (s=="vcmp_ll") return E_Vcmp_ll;
|
||||
if (s=="vcmp_lr") return E_Vcmp_lr;
|
||||
if (s=="vcmp_rl") return E_Vcmp_rl;
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
#include <cstdlib>
|
||||
|
||||
#include <iomanip>
|
||||
using namespace std;
|
||||
|
||||
/*! \mainpage Introduction
|
||||
|
||||
This program is intended to control the SLS detectors via command line interface.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
#include "sls_detector_defs.h"
|
||||
#include "slsDetectorUtils.h"
|
||||
using namespace std;
|
||||
|
||||
|
||||
|
||||
/** @short This class handles the command line I/Os, help etc. of the text clients */
|
||||
@@ -26,68 +26,68 @@ class slsDetectorCommand : public virtual slsDetectorDefs {
|
||||
/* \param action can be PUT_ACTION or GET_ACTION (from text client even READOUT_ACTION for acquisition) */
|
||||
/* \returns answer string */
|
||||
/* *\/ */
|
||||
virtual string executeLine(int narg, char *args[], int action);
|
||||
virtual std::string executeLine(int narg, char *args[], int action);
|
||||
|
||||
/* /\** */
|
||||
/* returns the help for the executeLine command */
|
||||
/* \param os output stream to return the help to */
|
||||
/* \param action can be PUT_ACTION or GET_ACTION (from text client even READOUT_ACTION for acquisition) */
|
||||
/* *\/ */
|
||||
string helpLine(int narg, char *args[], int action=HELP_ACTION);
|
||||
static string helpAcquire(int narg, char *args[], int action);
|
||||
static string helpData(int narg, char *args[], int action);
|
||||
static string helpFrame(int narg, char *args[], int action);
|
||||
static string helpStatus(int narg, char *args[], int action);
|
||||
static string helpDataStream(int narg, char *args[], int action);
|
||||
static string helpFree(int narg, char *args[], int action);
|
||||
static string helpAdd(int narg, char *args[], int action);
|
||||
static string helpRemove(int narg, char *args[], int action);
|
||||
static string helpHostname(int narg, char *args[], int action);
|
||||
static string helpId(int narg, char *args[], int action);
|
||||
static string helpMaster(int narg, char *args[], int action);
|
||||
static string helpSync(int narg, char *args[], int action);
|
||||
static string helpExitServer(int narg, char *args[], int action);
|
||||
static string helpSettingsDir(int narg, char *args[], int action);
|
||||
static string helpCalDir(int narg, char *args[], int action);
|
||||
static string helpTrimEn(int narg, char *args[], int action);
|
||||
static string helpOutDir(int narg, char *args[], int action);
|
||||
static string helpFileName(int narg, char *args[], int action);
|
||||
static string helpFileIndex(int narg, char *args[], int action);
|
||||
static string helpFlatField(int narg, char *args[], int action);
|
||||
static string helpRateCorr(int narg, char *args[], int action);
|
||||
static string helpBadChannels(int narg, char *args[], int action);
|
||||
static string helpAngConv(int narg, char *args[], int action);
|
||||
static string helpThreaded(int narg, char *args[], int action);
|
||||
static string helpPositions(int narg, char *args[], int action);
|
||||
static string helpScripts(int narg, char *args[], int action);
|
||||
static string helpScans(int narg, char *args[], int action);
|
||||
static string helpNetworkParameter(int narg, char *args[], int action);
|
||||
static string helpPort(int narg, char *args[], int action);
|
||||
static string helpLock(int narg, char *args[], int action);
|
||||
static string helpLastClient(int narg, char *args[], int action);
|
||||
static string helpOnline(int narg, char *args[], int action);
|
||||
static string helpConfigureMac(int narg, char *args[], int action);
|
||||
static string helpDetectorSize(int narg, char *args[], int action);
|
||||
static string helpSettings(int narg, char *args[], int action);
|
||||
static string helpSN(int narg, char *args[], int action);
|
||||
static string helpDigiTest(int narg, char *args[], int action);
|
||||
static string helpRegister(int narg, char *args[], int action);
|
||||
static string helpDAC(int narg, char *args[], int action);
|
||||
static string helpTimer(int narg, char *args[], int action);
|
||||
static string helpTiming(int narg, char *args[], int action);
|
||||
static string helpTimeLeft(int narg, char *args[], int action);
|
||||
static string helpSpeed(int narg, char *args[], int action);
|
||||
static string helpAdvanced(int narg, char *args[], int action);
|
||||
static string helpConfiguration(int narg, char *args[], int action);
|
||||
static string helpImage(int narg, char *args[], int action);
|
||||
static string helpCounter(int narg, char *args[], int action);
|
||||
static string helpADC(int narg, char *args[], int action);
|
||||
static string helpTempControl(int narg, char *args[], int action);
|
||||
static string helpEnablefwrite(int narg, char *args[], int action);
|
||||
static string helpOverwrite(int narg, char *args[], int action);
|
||||
static string helpReceiver(int narg, char *args[], int action);
|
||||
static string helpPattern(int narg, char *args[], int action);
|
||||
static string helpPulse(int narg, char *args[], int action);
|
||||
std::string helpLine(int narg, char *args[], int action=HELP_ACTION);
|
||||
static std::string helpAcquire(int narg, char *args[], int action);
|
||||
static std::string helpData(int narg, char *args[], int action);
|
||||
static std::string helpFrame(int narg, char *args[], int action);
|
||||
static std::string helpStatus(int narg, char *args[], int action);
|
||||
static std::string helpDataStream(int narg, char *args[], int action);
|
||||
static std::string helpFree(int narg, char *args[], int action);
|
||||
static std::string helpAdd(int narg, char *args[], int action);
|
||||
static std::string helpRemove(int narg, char *args[], int action);
|
||||
static std::string helpHostname(int narg, char *args[], int action);
|
||||
static std::string helpId(int narg, char *args[], int action);
|
||||
static std::string helpMaster(int narg, char *args[], int action);
|
||||
static std::string helpSync(int narg, char *args[], int action);
|
||||
static std::string helpExitServer(int narg, char *args[], int action);
|
||||
static std::string helpSettingsDir(int narg, char *args[], int action);
|
||||
static std::string helpCalDir(int narg, char *args[], int action);
|
||||
static std::string helpTrimEn(int narg, char *args[], int action);
|
||||
static std::string helpOutDir(int narg, char *args[], int action);
|
||||
static std::string helpFileName(int narg, char *args[], int action);
|
||||
static std::string helpFileIndex(int narg, char *args[], int action);
|
||||
static std::string helpFlatField(int narg, char *args[], int action);
|
||||
static std::string helpRateCorr(int narg, char *args[], int action);
|
||||
static std::string helpBadChannels(int narg, char *args[], int action);
|
||||
static std::string helpAngConv(int narg, char *args[], int action);
|
||||
static std::string helpThreaded(int narg, char *args[], int action);
|
||||
static std::string helpPositions(int narg, char *args[], int action);
|
||||
static std::string helpScripts(int narg, char *args[], int action);
|
||||
static std::string helpScans(int narg, char *args[], int action);
|
||||
static std::string helpNetworkParameter(int narg, char *args[], int action);
|
||||
static std::string helpPort(int narg, char *args[], int action);
|
||||
static std::string helpLock(int narg, char *args[], int action);
|
||||
static std::string helpLastClient(int narg, char *args[], int action);
|
||||
static std::string helpOnline(int narg, char *args[], int action);
|
||||
static std::string helpConfigureMac(int narg, char *args[], int action);
|
||||
static std::string helpDetectorSize(int narg, char *args[], int action);
|
||||
static std::string helpSettings(int narg, char *args[], int action);
|
||||
static std::string helpSN(int narg, char *args[], int action);
|
||||
static std::string helpDigiTest(int narg, char *args[], int action);
|
||||
static std::string helpRegister(int narg, char *args[], int action);
|
||||
static std::string helpDAC(int narg, char *args[], int action);
|
||||
static std::string helpTimer(int narg, char *args[], int action);
|
||||
static std::string helpTiming(int narg, char *args[], int action);
|
||||
static std::string helpTimeLeft(int narg, char *args[], int action);
|
||||
static std::string helpSpeed(int narg, char *args[], int action);
|
||||
static std::string helpAdvanced(int narg, char *args[], int action);
|
||||
static std::string helpConfiguration(int narg, char *args[], int action);
|
||||
static std::string helpImage(int narg, char *args[], int action);
|
||||
static std::string helpCounter(int narg, char *args[], int action);
|
||||
static std::string helpADC(int narg, char *args[], int action);
|
||||
static std::string helpTempControl(int narg, char *args[], int action);
|
||||
static std::string helpEnablefwrite(int narg, char *args[], int action);
|
||||
static std::string helpOverwrite(int narg, char *args[], int action);
|
||||
static std::string helpReceiver(int narg, char *args[], int action);
|
||||
static std::string helpPattern(int narg, char *args[], int action);
|
||||
static std::string helpPulse(int narg, char *args[], int action);
|
||||
|
||||
|
||||
|
||||
@@ -105,74 +105,74 @@ class slsDetectorCommand : public virtual slsDetectorDefs {
|
||||
|
||||
slsDetectorUtils *myDet;
|
||||
|
||||
string cmdUnderDevelopment(int narg, char *args[], int action);
|
||||
string cmdUnknown(int narg, char *args[], int action);
|
||||
string cmdAcquire(int narg, char *args[], int action);
|
||||
string cmdData(int narg, char *args[], int action);
|
||||
string cmdFrame(int narg, char *args[], int action);
|
||||
string cmdStatus(int narg, char *args[], int action);
|
||||
string cmdDataStream(int narg, char *args[], int action);
|
||||
string cmdFree(int narg, char *args[], int action);
|
||||
string cmdAdd(int narg, char *args[], int action);
|
||||
string cmdRemove(int narg, char *args[], int action);
|
||||
string cmdHostname(int narg, char *args[], int action);
|
||||
string cmdId(int narg, char *args[], int action);
|
||||
string cmdMaster(int narg, char *args[], int action);
|
||||
string cmdSync(int narg, char *args[], int action);
|
||||
string cmdHelp(int narg, char *args[], int action);
|
||||
string cmdExitServer(int narg, char *args[], int action);
|
||||
string cmdSettingsDir(int narg, char *args[], int action);
|
||||
string cmdCalDir(int narg, char *args[], int action);
|
||||
string cmdTrimEn(int narg, char *args[], int action);
|
||||
string cmdOutDir(int narg, char *args[], int action);
|
||||
string cmdFileName(int narg, char *args[], int action);
|
||||
string cmdFileIndex(int narg, char *args[], int action);
|
||||
string cmdFlatField(int narg, char *args[], int action);
|
||||
string cmdRateCorr(int narg, char *args[], int action);
|
||||
string cmdBadChannels(int narg, char *args[], int action);
|
||||
string cmdAngConv(int narg, char *args[], int action);
|
||||
string cmdThreaded(int narg, char *args[], int action);
|
||||
string cmdPositions(int narg, char *args[], int action);
|
||||
string cmdScripts(int narg, char *args[], int action);
|
||||
string cmdScans(int narg, char *args[], int action);
|
||||
string cmdNetworkParameter(int narg, char *args[], int action);
|
||||
string cmdPort(int narg, char *args[], int action);
|
||||
string cmdLock(int narg, char *args[], int action);
|
||||
string cmdLastClient(int narg, char *args[], int action);
|
||||
string cmdOnline(int narg, char *args[], int action);
|
||||
string cmdConfigureMac(int narg, char *args[], int action);
|
||||
string cmdDetectorSize(int narg, char *args[], int action);
|
||||
string cmdSettings(int narg, char *args[], int action);
|
||||
string cmdSN(int narg, char *args[], int action);
|
||||
string cmdDigiTest(int narg, char *args[], int action);
|
||||
string cmdRegister(int narg, char *args[], int action);
|
||||
string cmdDAC(int narg, char *args[], int action);
|
||||
string cmdTiming(int narg, char *args[], int action);
|
||||
string cmdTimer(int narg, char *args[], int action);
|
||||
string cmdTimeLeft(int narg, char *args[], int action);
|
||||
string cmdSpeed(int narg, char *args[], int action);
|
||||
string cmdAdvanced(int narg, char *args[], int action);
|
||||
string cmdConfiguration(int narg, char *args[], int action);
|
||||
string cmdImage(int narg, char *args[], int action);
|
||||
string cmdCounter(int narg, char *args[], int action);
|
||||
string cmdADC(int narg, char *args[], int action);
|
||||
string cmdTempControl(int narg, char *args[], int action);
|
||||
string cmdEnablefwrite(int narg, char *args[], int action);
|
||||
string cmdOverwrite(int narg, char *args[], int action);
|
||||
string cmdReceiver(int narg, char *args[], int action);
|
||||
string cmdPattern(int narg, char *args[], int action);
|
||||
string cmdPulse(int narg, char *args[], int action);
|
||||
std::string cmdUnderDevelopment(int narg, char *args[], int action);
|
||||
std::string cmdUnknown(int narg, char *args[], int action);
|
||||
std::string cmdAcquire(int narg, char *args[], int action);
|
||||
std::string cmdData(int narg, char *args[], int action);
|
||||
std::string cmdFrame(int narg, char *args[], int action);
|
||||
std::string cmdStatus(int narg, char *args[], int action);
|
||||
std::string cmdDataStream(int narg, char *args[], int action);
|
||||
std::string cmdFree(int narg, char *args[], int action);
|
||||
std::string cmdAdd(int narg, char *args[], int action);
|
||||
std::string cmdRemove(int narg, char *args[], int action);
|
||||
std::string cmdHostname(int narg, char *args[], int action);
|
||||
std::string cmdId(int narg, char *args[], int action);
|
||||
std::string cmdMaster(int narg, char *args[], int action);
|
||||
std::string cmdSync(int narg, char *args[], int action);
|
||||
std::string cmdHelp(int narg, char *args[], int action);
|
||||
std::string cmdExitServer(int narg, char *args[], int action);
|
||||
std::string cmdSettingsDir(int narg, char *args[], int action);
|
||||
std::string cmdCalDir(int narg, char *args[], int action);
|
||||
std::string cmdTrimEn(int narg, char *args[], int action);
|
||||
std::string cmdOutDir(int narg, char *args[], int action);
|
||||
std::string cmdFileName(int narg, char *args[], int action);
|
||||
std::string cmdFileIndex(int narg, char *args[], int action);
|
||||
std::string cmdFlatField(int narg, char *args[], int action);
|
||||
std::string cmdRateCorr(int narg, char *args[], int action);
|
||||
std::string cmdBadChannels(int narg, char *args[], int action);
|
||||
std::string cmdAngConv(int narg, char *args[], int action);
|
||||
std::string cmdThreaded(int narg, char *args[], int action);
|
||||
std::string cmdPositions(int narg, char *args[], int action);
|
||||
std::string cmdScripts(int narg, char *args[], int action);
|
||||
std::string cmdScans(int narg, char *args[], int action);
|
||||
std::string cmdNetworkParameter(int narg, char *args[], int action);
|
||||
std::string cmdPort(int narg, char *args[], int action);
|
||||
std::string cmdLock(int narg, char *args[], int action);
|
||||
std::string cmdLastClient(int narg, char *args[], int action);
|
||||
std::string cmdOnline(int narg, char *args[], int action);
|
||||
std::string cmdConfigureMac(int narg, char *args[], int action);
|
||||
std::string cmdDetectorSize(int narg, char *args[], int action);
|
||||
std::string cmdSettings(int narg, char *args[], int action);
|
||||
std::string cmdSN(int narg, char *args[], int action);
|
||||
std::string cmdDigiTest(int narg, char *args[], int action);
|
||||
std::string cmdRegister(int narg, char *args[], int action);
|
||||
std::string cmdDAC(int narg, char *args[], int action);
|
||||
std::string cmdTiming(int narg, char *args[], int action);
|
||||
std::string cmdTimer(int narg, char *args[], int action);
|
||||
std::string cmdTimeLeft(int narg, char *args[], int action);
|
||||
std::string cmdSpeed(int narg, char *args[], int action);
|
||||
std::string cmdAdvanced(int narg, char *args[], int action);
|
||||
std::string cmdConfiguration(int narg, char *args[], int action);
|
||||
std::string cmdImage(int narg, char *args[], int action);
|
||||
std::string cmdCounter(int narg, char *args[], int action);
|
||||
std::string cmdADC(int narg, char *args[], int action);
|
||||
std::string cmdTempControl(int narg, char *args[], int action);
|
||||
std::string cmdEnablefwrite(int narg, char *args[], int action);
|
||||
std::string cmdOverwrite(int narg, char *args[], int action);
|
||||
std::string cmdReceiver(int narg, char *args[], int action);
|
||||
std::string cmdPattern(int narg, char *args[], int action);
|
||||
std::string cmdPulse(int narg, char *args[], int action);
|
||||
|
||||
|
||||
int numberOfCommands;
|
||||
string cmd;
|
||||
std::string cmd;
|
||||
|
||||
typedef string (slsDetectorCommand::*MemFuncGetter)(int narg, char *args[], int action);
|
||||
typedef std::string (slsDetectorCommand::*MemFuncGetter)(int narg, char *args[], int action);
|
||||
|
||||
|
||||
struct FuncTable
|
||||
{
|
||||
string m_pFuncName;
|
||||
std::string m_pFuncName;
|
||||
//const char* m_pFuncName;
|
||||
MemFuncGetter m_pFuncPtr;
|
||||
};
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
#include "multiSlsDetectorCommand.h"
|
||||
|
||||
|
||||
using namespace std;
|
||||
|
||||
slsDetectorUsers::slsDetectorUsers(int id) : myDetector(NULL){
|
||||
|
||||
myDetector=new multiSlsDetector(id);
|
||||
|
||||
@@ -22,7 +22,7 @@ class multiSlsDetectorCommand;
|
||||
#include <string>
|
||||
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -100,7 +100,7 @@ class slsDetectorUsers
|
||||
@short useful to define subset of working functions
|
||||
\returns "PSI" or "Dectris"
|
||||
*/
|
||||
string getDetectorDeveloper();
|
||||
std::string getDetectorDeveloper();
|
||||
|
||||
|
||||
|
||||
@@ -138,20 +138,20 @@ class slsDetectorUsers
|
||||
/**
|
||||
@short returns the default output files path
|
||||
*/
|
||||
string getFilePath();
|
||||
std::string getFilePath();
|
||||
|
||||
/**
|
||||
@short sets the default output files path
|
||||
\param s file path
|
||||
\returns file path
|
||||
*/
|
||||
string setFilePath(string s);
|
||||
std::string setFilePath(std::string s);
|
||||
|
||||
/**
|
||||
@short
|
||||
\returns the default output files root name
|
||||
*/
|
||||
string getFileName();
|
||||
std::string getFileName();
|
||||
|
||||
/**
|
||||
@short sets the default output files path
|
||||
@@ -159,7 +159,7 @@ class slsDetectorUsers
|
||||
\returns the default output files root name
|
||||
|
||||
*/
|
||||
string setFileName(string s);
|
||||
std::string setFileName(std::string s);
|
||||
|
||||
/**
|
||||
@short
|
||||
@@ -178,27 +178,27 @@ class slsDetectorUsers
|
||||
@short get flat field corrections file directory
|
||||
\returns flat field correction file directory
|
||||
*/
|
||||
string getFlatFieldCorrectionDir();
|
||||
std::string getFlatFieldCorrectionDir();
|
||||
|
||||
/**
|
||||
@short set flat field corrections file directory
|
||||
\param dir flat field correction file directory
|
||||
\returns flat field correction file directory
|
||||
*/
|
||||
string setFlatFieldCorrectionDir(string dir);
|
||||
std::string setFlatFieldCorrectionDir(std::string dir);
|
||||
|
||||
/**
|
||||
@short get flat field corrections file name
|
||||
\returns flat field correction file name
|
||||
*/
|
||||
string getFlatFieldCorrectionFile();
|
||||
std::string getFlatFieldCorrectionFile();
|
||||
|
||||
/**
|
||||
@short set flat field correction file
|
||||
\param fname name of the flat field file (or "" if disable)
|
||||
\returns 0 if disable (or file could not be read), >0 otherwise
|
||||
*/
|
||||
int setFlatFieldCorrectionFile(string fname="");
|
||||
int setFlatFieldCorrectionFile(std::string fname="");
|
||||
|
||||
|
||||
|
||||
@@ -380,7 +380,7 @@ class slsDetectorUsers
|
||||
\param fname file name
|
||||
\returns OK or FAIL
|
||||
*/
|
||||
int readConfigurationFile(string const fname);
|
||||
int readConfigurationFile(std::string const fname);
|
||||
|
||||
|
||||
/**
|
||||
@@ -389,20 +389,20 @@ class slsDetectorUsers
|
||||
\returns OK or FAIL
|
||||
|
||||
*/
|
||||
int dumpDetectorSetup(string const fname);
|
||||
int dumpDetectorSetup(std::string const fname);
|
||||
/**
|
||||
@short Loads the detector setup from file
|
||||
\param fname file to read from
|
||||
\returns OK or FAIL
|
||||
|
||||
*/
|
||||
int retrieveDetectorSetup(string const fname);
|
||||
int retrieveDetectorSetup(std::string const fname);
|
||||
|
||||
/**
|
||||
@short useful for data plotting etc.
|
||||
\returns Mythen, Eiger, Gotthard etc.
|
||||
*/
|
||||
string getDetectorType();
|
||||
std::string getDetectorType();
|
||||
|
||||
/**
|
||||
@short sets the mode by which gui requests data from receiver
|
||||
@@ -443,7 +443,7 @@ class slsDetectorUsers
|
||||
\param var optional parameter - unused.
|
||||
*/
|
||||
|
||||
virtual void addFrame(double *data, double pos, double i0, double t, string fname, double var);
|
||||
virtual void addFrame(double *data, double pos, double i0, double t, std::string fname, double var);
|
||||
|
||||
/**
|
||||
@short finalizes the data set returning the array of angles, values and errors to be used as final data - can be overcome by the user's functions thanks to the virtual property
|
||||
@@ -488,18 +488,18 @@ class slsDetectorUsers
|
||||
/** (for expert users)
|
||||
* Set/Get receiver streaming out ZMQ IP
|
||||
* By default, it is the IP of receiver hostname
|
||||
* @param ip sets, empty string gets
|
||||
* @param ip sets, empty std::string gets
|
||||
* @returns receiver streaming out ZMQ IP
|
||||
*/
|
||||
string setReceiverDataStreamingOutIP(string ip="");
|
||||
std::string setReceiverDataStreamingOutIP(std::string ip="");
|
||||
|
||||
/** (for expert users)
|
||||
* Set/Get client streaming in ZMQ IP
|
||||
* By default, it is the IP of receiver hostname
|
||||
* @param i sets, empty string gets
|
||||
* @param i sets, empty std::string gets
|
||||
* @returns client streaming in ZMQ IP
|
||||
*/
|
||||
string setClientDataStreamingInIP(string ip="");
|
||||
std::string setClientDataStreamingInIP(std::string ip="");
|
||||
|
||||
/**
|
||||
get get Module Firmware Version
|
||||
@@ -590,18 +590,18 @@ class slsDetectorUsers
|
||||
\param narg value to be set
|
||||
\param args value to be set
|
||||
\param pos position of detector in multislsdetector list
|
||||
\returns answer string
|
||||
\returns answer std::string
|
||||
*/
|
||||
string putCommand(int narg, char *args[], int pos=-1);
|
||||
std::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
|
||||
\returns answer std::string
|
||||
*/
|
||||
string getCommand(int narg, char *args[], int pos=-1);
|
||||
std::string getCommand(int narg, char *args[], int pos=-1);
|
||||
|
||||
/************************************************************************
|
||||
|
||||
@@ -639,20 +639,20 @@ class slsDetectorUsers
|
||||
|
||||
/**
|
||||
@short set dac value
|
||||
\param dac dac as string. can be vcmp_ll, vcmp_lr, vcmp_rl, vcmp_rr, vthreshold, vrf, vrs, vtr, vcall, vcp. others not supported
|
||||
\param dac dac as std::string. can be vcmp_ll, vcmp_lr, vcmp_rl, vcmp_rr, vthreshold, vrf, vrs, vtr, vcall, vcp. others not supported
|
||||
\param val value to be set (-1 gets)
|
||||
\param id module index (-1 for all)
|
||||
\returns dac value or -1 (if id=-1 & dac value is different for all modules) or -9999 if dac string does not match
|
||||
\returns dac value or -1 (if id=-1 & dac value is different for all modules) or -9999 if dac std::string does not match
|
||||
*/
|
||||
int setDAC(string dac, int val, int id = -1);
|
||||
int setDAC(std::string dac, int val, int id = -1);
|
||||
|
||||
/**
|
||||
@short get adc value
|
||||
\param adc adc as string. can be temp_fpga, temp_fpgaext, temp_10ge, temp_dcdc, temp_sodl, temp_sodr, temp_fpgafl, temp_fpgafr. others not supported
|
||||
\param adc adc as std::string. can be temp_fpga, temp_fpgaext, temp_10ge, temp_dcdc, temp_sodl, temp_sodr, temp_fpgafl, temp_fpgafr. others not supported
|
||||
\param id module index (-1 for all)
|
||||
\returns adc value in millidegree Celsius or -1 (if id=-1 & adc value is different for all modules) or -9999 if adc string does not match
|
||||
\returns adc value in millidegree Celsius or -1 (if id=-1 & adc value is different for all modules) or -9999 if adc std::string does not match
|
||||
*/
|
||||
int getADC(string adc, int id = -1);
|
||||
int getADC(std::string adc, int id = -1);
|
||||
|
||||
/**
|
||||
@short start receiver listening mode
|
||||
@@ -750,29 +750,29 @@ class slsDetectorUsers
|
||||
|
||||
*********************************************************************/
|
||||
|
||||
/** @short returns string from run status index
|
||||
/** @short returns std::string from run status index
|
||||
\param s run status index
|
||||
\returns string error, waiting, running, data, finished or unknown when wrong index
|
||||
\returns std::string error, waiting, running, data, finished or unknown when wrong index
|
||||
*/
|
||||
static string runStatusType(int s){ \
|
||||
static std::string runStatusType(int s){ \
|
||||
switch (s) { \
|
||||
case 0: return string("idle"); \
|
||||
case 1: return string("error"); \
|
||||
case 2: return string("waiting"); \
|
||||
case 3: return string("finished"); \
|
||||
case 4: return string("data"); \
|
||||
case 5: return string("running"); \
|
||||
default: return string("unknown"); \
|
||||
case 0: return std::string("idle"); \
|
||||
case 1: return std::string("error"); \
|
||||
case 2: return std::string("waiting"); \
|
||||
case 3: return std::string("finished"); \
|
||||
case 4: return std::string("data"); \
|
||||
case 5: return std::string("running"); \
|
||||
default: return std::string("unknown"); \
|
||||
}};
|
||||
|
||||
|
||||
|
||||
/** @short returns detector settings string from index
|
||||
/** @short returns detector settings std::string from index
|
||||
\param s can be standard, fast, highgain, dynamicgain, lowgain, mediumgain, veryhighgain
|
||||
\returns setting index (-1 unknown string)
|
||||
\returns setting index (-1 unknown std::string)
|
||||
*/
|
||||
|
||||
static int getDetectorSettings(string s){ \
|
||||
static int getDetectorSettings(std::string s){ \
|
||||
if (s=="standard") return 0; \
|
||||
if (s=="fast") return 1; \
|
||||
if (s=="highgain") return 2; \
|
||||
@@ -782,47 +782,47 @@ class slsDetectorUsers
|
||||
if (s=="veryhighgain") return 6; \
|
||||
return -1; };
|
||||
|
||||
/** @short returns detector settings string from index
|
||||
/** @short returns detector settings std::string from index
|
||||
\param s settings index
|
||||
\returns standard, fast, highgain, dynamicgain, lowgain, mediumgain, veryhighgain, undefined when wrong index
|
||||
*/
|
||||
static string getDetectorSettings(int s){\
|
||||
static std::string getDetectorSettings(int s){\
|
||||
switch(s) { \
|
||||
case 0: return string("standard");\
|
||||
case 1: return string("fast");\
|
||||
case 2: return string("highgain");\
|
||||
case 3: return string("dynamicgain"); \
|
||||
case 4: return string("lowgain"); \
|
||||
case 5: return string("mediumgain"); \
|
||||
case 6: return string("veryhighgain"); \
|
||||
default: return string("undefined"); \
|
||||
case 0: return std::string("standard");\
|
||||
case 1: return std::string("fast");\
|
||||
case 2: return std::string("highgain");\
|
||||
case 3: return std::string("dynamicgain"); \
|
||||
case 4: return std::string("lowgain"); \
|
||||
case 5: return std::string("mediumgain"); \
|
||||
case 6: return std::string("veryhighgain"); \
|
||||
default: return std::string("undefined"); \
|
||||
}};
|
||||
|
||||
|
||||
|
||||
/**
|
||||
@short returns external communication mode string from index
|
||||
@short returns external communication mode std::string from index
|
||||
\param f index for communication mode
|
||||
\returns auto, trigger, ro_trigger, gating, triggered_gating, unknown when wrong mode
|
||||
*/
|
||||
|
||||
static string getTimingMode(int f){ \
|
||||
static std::string getTimingMode(int f){ \
|
||||
switch(f) { \
|
||||
case 0: return string( "auto"); \
|
||||
case 1: return string("trigger"); \
|
||||
case 2: return string("ro_trigger"); \
|
||||
case 3: return string("gating"); \
|
||||
case 4: return string("triggered_gating"); \
|
||||
default: return string( "unknown"); \
|
||||
case 0: return std::string( "auto"); \
|
||||
case 1: return std::string("trigger"); \
|
||||
case 2: return std::string("ro_trigger"); \
|
||||
case 3: return std::string("gating"); \
|
||||
case 4: return std::string("triggered_gating"); \
|
||||
default: return std::string( "unknown"); \
|
||||
} };
|
||||
|
||||
/**
|
||||
@short returns external communication mode string from index
|
||||
@short returns external communication mode std::string from index
|
||||
\param s index for communication mode
|
||||
\returns auto, trigger, ro_trigger, gating, triggered_gating, unknown when wrong mode
|
||||
*/
|
||||
|
||||
static int getTimingMode(string s){ \
|
||||
static int getTimingMode(std::string s){ \
|
||||
if (s== "auto") return 0; \
|
||||
if (s== "trigger") return 1; \
|
||||
if (s== "ro_trigger") return 2; \
|
||||
|
||||
@@ -9,7 +9,9 @@
|
||||
#include <sys/ipc.h>
|
||||
#include <sys/shm.h>
|
||||
#include <time.h> //clock()
|
||||
#include <string>
|
||||
using namespace std;
|
||||
|
||||
slsDetectorUtils::slsDetectorUtils() {
|
||||
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ extern "C" {
|
||||
#include <math.h>
|
||||
#include <semaphore.h>
|
||||
#include <cstdlib>
|
||||
using namespace std;
|
||||
|
||||
|
||||
|
||||
//#include "slsDetectorActions_Standalone.h"
|
||||
@@ -110,7 +110,7 @@ class slsDetectorUtils : public slsDetectorActions, public postProcessing {
|
||||
*/
|
||||
int setReceiverDataStreamingOutPort(int i) { \
|
||||
if (i >= 0) { \
|
||||
ostringstream ss; ss << i; string s = ss.str(); \
|
||||
std::ostringstream ss; ss << i; std::string s = ss.str(); \
|
||||
int prev_streaming = enableDataStreamingFromReceiver(); \
|
||||
setNetworkParameter(RECEIVER_STREAMING_PORT, s); \
|
||||
if (prev_streaming) { \
|
||||
@@ -126,7 +126,7 @@ class slsDetectorUtils : public slsDetectorActions, public postProcessing {
|
||||
*/
|
||||
int setClientDataStreamingInPort(int i){ \
|
||||
if (i >= 0) { \
|
||||
ostringstream ss; ss << i; string s = ss.str(); \
|
||||
std::ostringstream ss; ss << i; std::string s = ss.str(); \
|
||||
int prev_streaming = enableDataStreamingToClient(); \
|
||||
setNetworkParameter(CLIENT_STREAMING_PORT, s); \
|
||||
if (prev_streaming) { \
|
||||
@@ -140,7 +140,7 @@ class slsDetectorUtils : public slsDetectorActions, public postProcessing {
|
||||
* @param i sets, -1 gets
|
||||
* @returns receiver streaming out ZMQ port
|
||||
*/
|
||||
string setReceiverDataStreamingOutIP(string ip) { \
|
||||
std::string setReceiverDataStreamingOutIP(std::string ip) { \
|
||||
if (ip.length()) { \
|
||||
int prev_streaming = enableDataStreamingFromReceiver(); \
|
||||
setNetworkParameter(RECEIVER_STREAMING_SRC_IP, ip); \
|
||||
@@ -155,7 +155,7 @@ class slsDetectorUtils : public slsDetectorActions, public postProcessing {
|
||||
* @param i sets, -1 gets
|
||||
* @returns client streaming in ZMQ port
|
||||
*/
|
||||
string setClientDataStreamingInIP(string ip){ \
|
||||
std::string setClientDataStreamingInIP(std::string ip){ \
|
||||
if (ip.length()) { \
|
||||
int prev_streaming = enableDataStreamingToClient(); \
|
||||
setNetworkParameter(CLIENT_STREAMING_SRC_IP, ip); \
|
||||
@@ -199,7 +199,7 @@ class slsDetectorUtils : public slsDetectorActions, public postProcessing {
|
||||
\param pos position in the multi detector structure (is -1 returns concatenated hostnames divided by a +)
|
||||
\returns hostname
|
||||
*/
|
||||
virtual string getHostname(int pos=-1)=0;
|
||||
virtual std::string getHostname(int pos=-1)=0;
|
||||
|
||||
|
||||
/** sets the detector hostname
|
||||
@@ -207,22 +207,22 @@ class slsDetectorUtils : public slsDetectorActions, public postProcessing {
|
||||
\param pos position in the multi detector structure (is -1 expects concatenated hostnames divided by a +)
|
||||
\returns hostname
|
||||
*/
|
||||
virtual string setHostname(const char* name, int pos=-1)=0;
|
||||
virtual std::string setHostname(const char* name, int pos=-1)=0;
|
||||
|
||||
|
||||
/** returns the detector type
|
||||
\param pos position in the multi detector structure (is -1 returns type of detector with id -1)
|
||||
\returns type
|
||||
*/
|
||||
virtual string sgetDetectorsType(int pos=-1)=0;
|
||||
virtual std::string sgetDetectorsType(int pos=-1)=0;
|
||||
|
||||
/** returns the detector type
|
||||
\param pos position in the multi detector structure (is -1 returns type of detector with id -1)
|
||||
\returns type
|
||||
*/
|
||||
virtual detectorType setDetectorsType(detectorType t=GET_DETECTOR_TYPE, int pos=-1)=0;
|
||||
virtual string ssetDetectorsType(detectorType t=GET_DETECTOR_TYPE, int pos=-1)=0;
|
||||
virtual string ssetDetectorsType(string s, int pos=-1)=0;
|
||||
virtual std::string ssetDetectorsType(detectorType t=GET_DETECTOR_TYPE, int pos=-1)=0;
|
||||
virtual std::string ssetDetectorsType(std::string s, int pos=-1)=0;
|
||||
|
||||
|
||||
|
||||
@@ -247,7 +247,7 @@ class slsDetectorUtils : public slsDetectorActions, public postProcessing {
|
||||
\returns parameter
|
||||
|
||||
*/
|
||||
virtual string getNetworkParameter(networkParameter i)=0;
|
||||
virtual std::string getNetworkParameter(networkParameter i)=0;
|
||||
|
||||
/**
|
||||
sets the network parameters
|
||||
@@ -257,14 +257,14 @@ class slsDetectorUtils : public slsDetectorActions, public postProcessing {
|
||||
\returns parameter
|
||||
|
||||
*/
|
||||
virtual string setNetworkParameter(networkParameter i, string s)=0;
|
||||
virtual std::string setNetworkParameter(networkParameter i, std::string s)=0;
|
||||
|
||||
int setFlowControl10G(int i = -1) {
|
||||
string sret="";
|
||||
std::string sret="";
|
||||
if (i != -1) {
|
||||
ostringstream o;
|
||||
std::ostringstream o;
|
||||
o << ((i >= 1) ? 1 : 0);
|
||||
string sval = o.str();
|
||||
std::string sval = o.str();
|
||||
sret = setNetworkParameter(FLOW_CONTROL_10G, sval);
|
||||
} else
|
||||
sret = getNetworkParameter(FLOW_CONTROL_10G);
|
||||
@@ -284,7 +284,7 @@ class slsDetectorUtils : public slsDetectorActions, public postProcessing {
|
||||
checks if the detector(s) are online/offline
|
||||
\returns hostname if offline
|
||||
*/
|
||||
virtual string checkOnline()=0;
|
||||
virtual std::string checkOnline()=0;
|
||||
|
||||
/**
|
||||
Digital test of the modules
|
||||
@@ -308,7 +308,7 @@ class slsDetectorUtils : public slsDetectorActions, public postProcessing {
|
||||
/**
|
||||
returns currently the loaded trimfile/settingsfile name
|
||||
*/
|
||||
virtual string getSettingsFile()=0;
|
||||
virtual std::string getSettingsFile()=0;
|
||||
|
||||
|
||||
/**
|
||||
@@ -382,7 +382,7 @@ class slsDetectorUtils : public slsDetectorActions, public postProcessing {
|
||||
|
||||
|
||||
|
||||
int setBadChannelCorrection(string fname, int &nbadtot, int *badchanlist, int off=0);
|
||||
int setBadChannelCorrection(std::string fname, int &nbadtot, int *badchanlist, int off=0);
|
||||
|
||||
|
||||
|
||||
@@ -408,7 +408,7 @@ class slsDetectorUtils : public slsDetectorActions, public postProcessing {
|
||||
virtual char* getSettingsDir()=0;
|
||||
|
||||
/** sets the detector trimbit/settings directory */
|
||||
virtual char* setSettingsDir(string s)=0;
|
||||
virtual char* setSettingsDir(std::string s)=0;
|
||||
|
||||
/**
|
||||
returns the location of the calibration files
|
||||
@@ -418,7 +418,7 @@ class slsDetectorUtils : public slsDetectorActions, public postProcessing {
|
||||
/**
|
||||
sets the location of the calibration files
|
||||
*/
|
||||
virtual char* setCalDir(string s)=0;
|
||||
virtual char* setCalDir(std::string s)=0;
|
||||
|
||||
/** Frees the shared memory - should not be used except for debugging*/
|
||||
virtual int freeSharedMemory()=0;
|
||||
@@ -467,7 +467,7 @@ class slsDetectorUtils : public slsDetectorActions, public postProcessing {
|
||||
\fname file name to load data from
|
||||
\returns OK or FAIL
|
||||
*/
|
||||
virtual int loadImageToDetector(imageType index,string const fname)=0;
|
||||
virtual int loadImageToDetector(imageType index,std::string const fname)=0;
|
||||
|
||||
|
||||
/**
|
||||
@@ -476,7 +476,7 @@ class slsDetectorUtils : public slsDetectorActions, public postProcessing {
|
||||
\fname file fname to load data from
|
||||
\returns OK or FAIL
|
||||
*/
|
||||
virtual int writeCounterBlockFile(string const fname,int startACQ=0)=0;
|
||||
virtual int writeCounterBlockFile(std::string const fname,int startACQ=0)=0;
|
||||
|
||||
|
||||
/**
|
||||
@@ -606,7 +606,7 @@ class slsDetectorUtils : public slsDetectorActions, public postProcessing {
|
||||
/**
|
||||
Returns the IP of the last client connecting to the detector
|
||||
*/
|
||||
virtual string getLastClientIP()=0;
|
||||
virtual std::string getLastClientIP()=0;
|
||||
|
||||
|
||||
|
||||
@@ -623,13 +623,13 @@ class slsDetectorUtils : public slsDetectorActions, public postProcessing {
|
||||
\param imod module number, -1 means all modules
|
||||
\returns OK or FAIL
|
||||
*/
|
||||
virtual int loadSettingsFile(string fname, int imod=-1)=0;
|
||||
virtual int loadSettingsFile(std::string fname, int imod=-1)=0;
|
||||
|
||||
/** programs FPGA with pof file
|
||||
\param fname file name
|
||||
\returns OK or FAIL
|
||||
*/
|
||||
virtual int programFPGA(string fname)=0;
|
||||
virtual int programFPGA(std::string fname)=0;
|
||||
|
||||
/** resets FPGA
|
||||
\returns OK or FAIL
|
||||
@@ -653,7 +653,7 @@ class slsDetectorUtils : public slsDetectorActions, public postProcessing {
|
||||
\param imod module number, -1 means all modules
|
||||
\returns OK or FAIL
|
||||
*/
|
||||
virtual int saveSettingsFile(string fname, int imod=-1)=0;
|
||||
virtual int saveSettingsFile(std::string fname, int imod=-1)=0;
|
||||
|
||||
/** sets all the trimbits to a particular value
|
||||
\param val trimbit value
|
||||
@@ -723,7 +723,7 @@ class slsDetectorUtils : public slsDetectorActions, public postProcessing {
|
||||
\param fname file name
|
||||
\returns OK or FAIL
|
||||
*/
|
||||
virtual int writeConfigurationFile(string const fname)=0;
|
||||
virtual int writeConfigurationFile(std::string const fname)=0;
|
||||
|
||||
|
||||
void registerGetPositionCallback( double (*func)(void*),void *arg){get_position=func; POarg=arg;};
|
||||
@@ -747,7 +747,7 @@ class slsDetectorUtils : public slsDetectorActions, public postProcessing {
|
||||
\returns OK or FAIL
|
||||
|
||||
*/
|
||||
int dumpDetectorSetup(string const fname, int level=0);
|
||||
int dumpDetectorSetup(std::string const fname, int level=0);
|
||||
|
||||
|
||||
/**
|
||||
@@ -757,7 +757,7 @@ class slsDetectorUtils : public slsDetectorActions, public postProcessing {
|
||||
\returns OK or FAIL
|
||||
|
||||
*/
|
||||
int retrieveDetectorSetup(string const fname, int level=0);
|
||||
int retrieveDetectorSetup(std::string const fname, int level=0);
|
||||
|
||||
static int dummyAcquisitionFinished(double prog,int status,void* p){cout <<"Acquisition finished callback! " << prog << " " << status << endl; return 0;}
|
||||
static int dummyMeasurementFinished(int im,int findex,void* p){cout <<"Measurement finished callback! " << im << " " << findex << endl; return 0;}
|
||||
@@ -771,12 +771,12 @@ class slsDetectorUtils : public slsDetectorActions, public postProcessing {
|
||||
/**
|
||||
Checks if the receiver is really online
|
||||
*/
|
||||
virtual string checkReceiverOnline()=0;
|
||||
virtual std::string checkReceiverOnline()=0;
|
||||
|
||||
/**
|
||||
Returns the IP of the last client connecting to the receiver
|
||||
*/
|
||||
virtual string getReceiverLastClientIP()=0;
|
||||
virtual std::string getReceiverLastClientIP()=0;
|
||||
|
||||
|
||||
/**
|
||||
@@ -784,14 +784,14 @@ class slsDetectorUtils : public slsDetectorActions, public postProcessing {
|
||||
@param fileName fileDir file directory
|
||||
\returns file dir
|
||||
*/
|
||||
virtual string setFilePath(string s="")=0;
|
||||
virtual std::string setFilePath(std::string s="")=0;
|
||||
|
||||
/**
|
||||
Sets up the file name
|
||||
@param fileName file name
|
||||
\returns file name
|
||||
*/
|
||||
virtual string setFileName(string s="")=0;
|
||||
virtual std::string setFileName(std::string s="")=0;
|
||||
|
||||
/**
|
||||
Sets the max frames per file in receiver
|
||||
@@ -811,12 +811,12 @@ class slsDetectorUtils : public slsDetectorActions, public postProcessing {
|
||||
/**
|
||||
\returns file dir
|
||||
*/
|
||||
virtual string getFilePath()=0;
|
||||
virtual std::string getFilePath()=0;
|
||||
|
||||
/**
|
||||
\returns file name
|
||||
*/
|
||||
virtual string getFileName()=0;
|
||||
virtual std::string getFileName()=0;
|
||||
|
||||
/**
|
||||
\returns file name
|
||||
@@ -950,7 +950,7 @@ virtual int setReceiverSilentMode(int i = -1)=0;
|
||||
@param fname pattern file to open
|
||||
@returns OK/FAIL
|
||||
*/
|
||||
virtual int setCTBPattern(string fname)=0;
|
||||
virtual int setCTBPattern(std::string fname)=0;
|
||||
|
||||
|
||||
/** Writes a pattern word to the CTB
|
||||
|
||||
Reference in New Issue
Block a user