mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-28 09:10:01 +02:00
added advanced user stuff for esrf
This commit is contained in:
parent
5b0fd60775
commit
15b86a50d5
@ -380,6 +380,54 @@ class slsDetectorBase : public virtual slsDetectorDefs, public virtual errorDef
|
|||||||
int64_t setNumberOfFrames(int64_t t=-1){return setTimer(FRAME_NUMBER,t);};
|
int64_t setNumberOfFrames(int64_t t=-1){return setTimer(FRAME_NUMBER,t);};
|
||||||
int64_t setNumberOfCycles(int64_t t=-1){return setTimer(CYCLES_NUMBER,t);};
|
int64_t setNumberOfCycles(int64_t t=-1){return setTimer(CYCLES_NUMBER,t);};
|
||||||
|
|
||||||
|
|
||||||
|
/** sets/gets the value of important readout speed parameters
|
||||||
|
\param sp is the parameter to be set/get
|
||||||
|
\param value is the value to be set, if -1 get value
|
||||||
|
\returns current value for the specified parameter
|
||||||
|
\sa speedVariable
|
||||||
|
*/
|
||||||
|
virtual int setSpeed(speedVariable sp, int value=-1)=0;
|
||||||
|
int setClockDivider(int s=-1){return setSpeed(CLOCK_DIVIDER,s);};
|
||||||
|
|
||||||
|
/**
|
||||||
|
set/get readout flags
|
||||||
|
\param flag readout flag to be set
|
||||||
|
\returns current flag
|
||||||
|
*/
|
||||||
|
virtual int setReadOutFlags(readOutFlags flag=GET_READOUT_FLAGS)=0;
|
||||||
|
int getContinuousReadoutFlag(){if(setReadOutFlags()&CONTINOUS_RO) return OK; return FAIL;};
|
||||||
|
void setContinuousReadoutFlag(){setReadOutFlags(CONTINOUS_RO); };
|
||||||
|
int getStoreInRamReadoutFlag(){if(setReadOutFlags()&STORE_IN_RAM) return OK; return FAIL;};
|
||||||
|
void setStoreInRamReadoutFlag(){setReadOutFlags(STORE_IN_RAM); };
|
||||||
|
int getParallelReadoutFlag(){if(setReadOutFlags()&PARALLEL) return OK; return FAIL;};
|
||||||
|
void setParallelReadoutFlag(){setReadOutFlags(PARALLEL); };
|
||||||
|
int getNonParallelReadoutFlag(){if(setReadOutFlags()&NONPARALLEL) return OK; return FAIL;};
|
||||||
|
void setNonParallelReadoutFlag(){setReadOutFlags(NONPARALLEL); };
|
||||||
|
int getSafeReadoutFlag(){if(setReadOutFlags()&SAFE) return OK; return FAIL;};
|
||||||
|
void setSafeReadoutFlag(){setReadOutFlags(SAFE); };
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
set dacs value
|
||||||
|
\param val value (in V)
|
||||||
|
\param index DAC index
|
||||||
|
\param mV 0 in dac units or 1 in mV
|
||||||
|
\param imod module number (if -1 alla modules)
|
||||||
|
\returns current DAC value
|
||||||
|
*/
|
||||||
|
virtual dacs_t setDAC(dacs_t val, dacIndex index , int mV, int imod=-1)=0;
|
||||||
|
int setDACValue(int val, int index , int mV, int imod=-1) { return (int)setDAC((dacs_t)val,(dacIndex)index, mV,imod);};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
gets ADC value
|
||||||
|
\param index ADC index
|
||||||
|
\param imod module number
|
||||||
|
\returns current ADC value
|
||||||
|
*/
|
||||||
|
virtual dacs_t getADC(dacIndex index, int imod=-1)=0;
|
||||||
|
int getADCValue(int index, int imod=-1){return (int)getADC((dacIndex)index, imod);};
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////
|
||||||
/**
|
/**
|
||||||
@short get run status
|
@short get run status
|
||||||
|
@ -316,3 +316,70 @@ string slsDetectorUsers::getCommand(int narg, char *args[], int pos){
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
int slsDetectorUsers::setClockDivider(int value) {
|
||||||
|
return myDetector->setClockDivider(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int slsDetectorUsers::getContinuousReadoutFlag(){
|
||||||
|
return myDetector->getContinuousReadoutFlag();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void slsDetectorUsers::setContinuousReadoutFlag(){
|
||||||
|
myDetector->setContinuousReadoutFlag();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int slsDetectorUsers::getStoreInRamReadoutFlag(){
|
||||||
|
return myDetector->getStoreInRamReadoutFlag();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void slsDetectorUsers::setStoreInRamReadoutFlag(){
|
||||||
|
myDetector->setStoreInRamReadoutFlag();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int slsDetectorUsers::getParallelReadoutFlag(){
|
||||||
|
return myDetector->getParallelReadoutFlag();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void slsDetectorUsers::setParallelReadoutFlag(){
|
||||||
|
myDetector->setParallelReadoutFlag();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int slsDetectorUsers::getNonParallelReadoutFlag(){
|
||||||
|
return myDetector->getNonParallelReadoutFlag();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void slsDetectorUsers::setNonParallelReadoutFlag(){
|
||||||
|
myDetector->setNonParallelReadoutFlag();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int slsDetectorUsers::getSafeReadoutFlag(){
|
||||||
|
return myDetector->getSafeReadoutFlag();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void slsDetectorUsers::setSafeReadoutFlag(){
|
||||||
|
myDetector->setSafeReadoutFlag();
|
||||||
|
}
|
||||||
|
|
||||||
|
int slsDetectorUsers::setAllTrimbits(int val) {
|
||||||
|
return myDetector->setAllTrimbits(val);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int slsDetectorUsers::setDAC(int id, int dacindex, int val) {
|
||||||
|
return myDetector->setDACValue(val, dacindex, id);
|
||||||
|
}
|
||||||
|
|
||||||
|
int slsDetectorUsers::getADC(int id, int adcindex) {
|
||||||
|
return myDetector->getADCValue(adcindex, id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -541,6 +541,102 @@ class slsDetectorUsers
|
|||||||
*/
|
*/
|
||||||
string getCommand(int narg, char *args[], int pos=-1);
|
string getCommand(int narg, char *args[], int pos=-1);
|
||||||
|
|
||||||
|
/************************************************************************
|
||||||
|
|
||||||
|
ADVANCED FUNCTIONS
|
||||||
|
|
||||||
|
*********************************************************************/
|
||||||
|
/**
|
||||||
|
@short sets clock divider of detector
|
||||||
|
\param value value to be set (-1 gets)
|
||||||
|
\returns speed of detector
|
||||||
|
*/
|
||||||
|
int setClockDivider(int value);
|
||||||
|
|
||||||
|
/**
|
||||||
|
@short gets continuous readout flag
|
||||||
|
\returns gets continuous readout flag
|
||||||
|
*/
|
||||||
|
int getContinuousReadoutFlag();
|
||||||
|
|
||||||
|
/**
|
||||||
|
@short sets continuous readout flag
|
||||||
|
\returns OK if successful, else false
|
||||||
|
*/
|
||||||
|
void setContinuousReadoutFlag();
|
||||||
|
|
||||||
|
/**
|
||||||
|
@short gets store in ram readout flag
|
||||||
|
\returns gets store in ram readout flag
|
||||||
|
*/
|
||||||
|
int getStoreInRamReadoutFlag();
|
||||||
|
|
||||||
|
/**
|
||||||
|
@short sets store in ram readout flag
|
||||||
|
\returns OK if successful, else false
|
||||||
|
*/
|
||||||
|
void setStoreInRamReadoutFlag();
|
||||||
|
|
||||||
|
/**
|
||||||
|
@short gets parallel readout flag
|
||||||
|
\returns gets parallel readout flag
|
||||||
|
*/
|
||||||
|
int getParallelReadoutFlag();
|
||||||
|
|
||||||
|
/**
|
||||||
|
@short sets parallel readout flag
|
||||||
|
\returns OK if successful, else false
|
||||||
|
*/
|
||||||
|
void setParallelReadoutFlag();
|
||||||
|
|
||||||
|
/**
|
||||||
|
@short gets non parallel readout flag
|
||||||
|
\returns gets non parallel readout flag
|
||||||
|
*/
|
||||||
|
int getNonParallelReadoutFlag();
|
||||||
|
|
||||||
|
/**
|
||||||
|
@short sets non parallel readout flag
|
||||||
|
\returns OK if successful, else false
|
||||||
|
*/
|
||||||
|
void setNonParallelReadoutFlag();
|
||||||
|
|
||||||
|
/**
|
||||||
|
@short gets safe readout flag
|
||||||
|
\returns gets safe readout flag
|
||||||
|
*/
|
||||||
|
int getSafeReadoutFlag();
|
||||||
|
|
||||||
|
/**
|
||||||
|
@short sets safe readout flag
|
||||||
|
\returns OK if successful, else false
|
||||||
|
*/
|
||||||
|
void setSafeReadoutFlag();
|
||||||
|
|
||||||
|
/**
|
||||||
|
@short sets all trimbits to value (only available for eiger)
|
||||||
|
\param val value to be set (-1 gets)
|
||||||
|
\returns value set
|
||||||
|
*/
|
||||||
|
int setAllTrimbits(int val);
|
||||||
|
|
||||||
|
/**
|
||||||
|
@short set dac value
|
||||||
|
\param id module index (-1 for all)
|
||||||
|
\param dacindex dac index \sa dacIndex
|
||||||
|
\param val value to be set (-1 gets)
|
||||||
|
\returns dac value
|
||||||
|
*/
|
||||||
|
int setDAC(int id, int dacindex, int val);
|
||||||
|
|
||||||
|
/**
|
||||||
|
@short get adc value
|
||||||
|
\param id module index (-1 for all)
|
||||||
|
\param adcindex adc index \sa dacIndex
|
||||||
|
\returns adc value
|
||||||
|
*/
|
||||||
|
int getADC(int id, int adcindex);
|
||||||
|
|
||||||
/************************************************************************
|
/************************************************************************
|
||||||
|
|
||||||
STATIC FUNCTIONS
|
STATIC FUNCTIONS
|
||||||
@ -627,6 +723,7 @@ class slsDetectorUsers
|
|||||||
if (s== "triggered_gating") return 4; \
|
if (s== "triggered_gating") return 4; \
|
||||||
return -1; };
|
return -1; };
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
multiSlsDetector *myDetector;
|
multiSlsDetector *myDetector;
|
||||||
multiSlsDetectorCommand *myCmd;
|
multiSlsDetectorCommand *myCmd;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user