mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-23 10:07:59 +02:00
jungfrau server: added storage start, connected auto_comp_disable, changed adcphase, added ADC_PORT_INVERT_VAL, ADC_OFST_HALF_SPEED_VAL, minimum exposure time
This commit is contained in:
@ -5267,6 +5267,38 @@ int64_t slsDetector::getTimeLeft(timerIndex index){
|
||||
};
|
||||
|
||||
|
||||
int slsDetector::setStoragecellStart(int pos) {
|
||||
int ret=FAIL;
|
||||
int fnum=F_STORAGE_CELL_START;
|
||||
char mess[MAX_STR_LENGTH];
|
||||
memset(mess, 0, MAX_STR_LENGTH);
|
||||
int retval=-1;
|
||||
|
||||
#ifdef VERBOSE
|
||||
std::cout<< "Sending storage cell start index " << pos << endl;
|
||||
#endif
|
||||
if (thisDetector->onlineFlag==ONLINE_FLAG) {
|
||||
if (connectControl() == OK){
|
||||
controlSocket->SendDataOnly(&fnum,sizeof(fnum));
|
||||
controlSocket->SendDataOnly(&pos,sizeof(pos));
|
||||
//check opening error
|
||||
controlSocket->ReceiveDataOnly(&ret,sizeof(ret));
|
||||
if (ret==FAIL) {
|
||||
controlSocket->ReceiveDataOnly(mess,sizeof(mess));
|
||||
std::cout<< "Detector returned error: " << mess << std::endl;
|
||||
setErrorMask((getErrorMask())|(STORAGE_CELL_START));
|
||||
}else
|
||||
controlSocket->ReceiveDataOnly(&retval,sizeof(retval));
|
||||
disconnectControl();
|
||||
if (ret==FORCE_UPDATE)
|
||||
updateDetector();
|
||||
}
|
||||
}
|
||||
return retval;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Flags
|
||||
int slsDetector::setDynamicRange(int n){
|
||||
|
||||
|
@ -1246,7 +1246,12 @@ class slsDetector : public slsDetectorUtils, public energyConversion {
|
||||
*/
|
||||
int64_t getTimeLeft(timerIndex index);
|
||||
|
||||
|
||||
/**
|
||||
* set storage cell that stores first acquisition of the series (Jungfrau only)
|
||||
* \param value storage cell index. Value can be 0 to 15. (-1 gets)
|
||||
* \returns the storage cell that stores the first acquisition of the series
|
||||
*/
|
||||
int setStoragecellStart(int pos=-1);
|
||||
|
||||
|
||||
/** sets/gets the value of important readout speed parameters
|
||||
|
@ -642,6 +642,12 @@ slsDetectorCommand::slsDetectorCommand(slsDetectorUtils *det) {
|
||||
descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdTimer;
|
||||
++i;
|
||||
|
||||
/*! \page timing
|
||||
- <b>storagecell_start [i]</b> sets/gets the storage cell that stores the first acquisition of the series. Default is 0. For very advanced users only! For JUNGFRAU only. Range: 0-15. \c Returns \c (int)
|
||||
*/
|
||||
descrToFuncMap[i].m_pFuncName="storagecell_start"; //
|
||||
descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdTimer;
|
||||
++i;
|
||||
|
||||
/* read only timers */
|
||||
|
||||
@ -5631,6 +5637,17 @@ string slsDetectorCommand::cmdTimer(int narg, char *args[], int action) {
|
||||
index=SAMPLES_JCTB;
|
||||
else if (cmd=="storagecells")
|
||||
index=STORAGE_CELL_NUMBER;
|
||||
else if (cmd=="storagecell_start") {
|
||||
myDet->setOnline(ONLINE_FLAG);
|
||||
if (action==PUT_ACTION) {
|
||||
int ival =-1;
|
||||
if (!sscanf(args[1],"%d", &ival))
|
||||
return string("cannot scan storage cell start value ")+string(args[1]);
|
||||
myDet->setStoragecellStart(ival);
|
||||
}
|
||||
sprintf(answer,"%d", myDet->setStoragecellStart());
|
||||
return string(answer);
|
||||
}
|
||||
else
|
||||
return string("could not decode timer ")+cmd;
|
||||
|
||||
@ -5683,6 +5700,7 @@ string slsDetectorCommand::helpTimer(int narg, char *args[], int action) {
|
||||
os << "probes t \t sets the number of probes to accumulate (max 3! cycles should be set to 1, frames to the number of pump-probe events)" << std::endl;
|
||||
os << "samples t \t sets the number of samples expected from the jctb" << std::endl;
|
||||
os << "storagecells t \t sets number of storage cells per acquisition. For very advanced users only! For JUNGFRAU only. Range: 0-15. The #images = #frames * #cycles * (#storagecells+1)." << std::endl;
|
||||
os << "storagecell_start t \t sets the storage cell that stores the first acquisition of the series. Default is 0. For very advanced users only! For JUNGFRAU only. Range: 0-15." << std::endl;
|
||||
os << std::endl;
|
||||
|
||||
|
||||
@ -5698,6 +5716,7 @@ string slsDetectorCommand::helpTimer(int narg, char *args[], int action) {
|
||||
os << "probes \t gets the number of probes to accumulate" << std::endl;
|
||||
os << "samples \t gets the number of samples expected from the jctb" << std::endl;
|
||||
os << "storagecells \t gets number of storage cells per acquisition.For JUNGFRAU only." << std::endl;
|
||||
os << "storagecell_start \t gets the storage cell that stores the first acquisition of the series." << std::endl;
|
||||
os << std::endl;
|
||||
|
||||
}
|
||||
|
@ -318,6 +318,13 @@ class slsDetectorUtils : public slsDetectorActions, public postProcessing {
|
||||
*/
|
||||
virtual int64_t getTimeLeft(timerIndex index)=0;
|
||||
|
||||
/**
|
||||
* set storage cell that stores first acquisition of the series (Jungfrau only)
|
||||
* \param value storage cell index. Value can be 0 to 15. (-1 gets)
|
||||
* \returns the storage cell that stores the first acquisition of the series
|
||||
*/
|
||||
virtual int setStoragecellStart(int pos=-1)=0;
|
||||
|
||||
|
||||
|
||||
/** sets the number of trim energies and their value \sa sharedSlsDetector
|
||||
|
Reference in New Issue
Block a user