mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-23 18:17:59 +02:00
eiger server: interrupt subframe, quad change flipping, registers set left and right separately
This commit is contained in:
@ -9761,6 +9761,9 @@ int slsDetector::setQuad(int val) {
|
||||
int ret = FAIL;
|
||||
int retval = -1;
|
||||
|
||||
#ifdef VERBOSE
|
||||
std::cout<<"Setting Quad to " <<val << std::endl;
|
||||
#endif
|
||||
// set row column header in detector
|
||||
if (val >= 0) {
|
||||
if (thisDetector->onlineFlag==ONLINE_FLAG) {
|
||||
@ -9803,3 +9806,32 @@ int slsDetector::setQuad(int val) {
|
||||
}
|
||||
return retval;
|
||||
}
|
||||
|
||||
int slsDetector::setInterruptSubframe(int val) {
|
||||
int fnum = F_INTERRUPT_SUBFRAME;
|
||||
int ret = FAIL;
|
||||
int retval = -1;
|
||||
|
||||
#ifdef VERBOSE
|
||||
std::cout<<"Setting Interrupt Sub frame to " <<val << std::endl;
|
||||
#endif
|
||||
if (thisDetector->onlineFlag==ONLINE_FLAG) {
|
||||
if (connectControl() == OK){
|
||||
controlSocket->SendDataOnly(&fnum,sizeof(fnum));
|
||||
controlSocket->SendDataOnly(&val,sizeof(val));
|
||||
controlSocket->ReceiveDataOnly(&ret,sizeof(ret));
|
||||
if (ret==FAIL){
|
||||
char mess[MAX_STR_LENGTH] = {};
|
||||
controlSocket->ReceiveDataOnly(mess,sizeof(mess));
|
||||
std::cout<< "Detector returned error: " << mess << std::endl;
|
||||
setErrorMask((getErrorMask())|(SOME_ERROR));
|
||||
}
|
||||
controlSocket->ReceiveDataOnly(&retval,sizeof(retval));
|
||||
disconnectControl();
|
||||
if (ret==FORCE_UPDATE)
|
||||
updateDetector();
|
||||
}
|
||||
}
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
@ -2281,6 +2281,13 @@ public:
|
||||
*/
|
||||
int setQuad(int val = -1);
|
||||
|
||||
/**
|
||||
* Set or Get Interrupt last sub frame(Only for Eiger)
|
||||
* @param val 1 if interrupt last subframe set, else 0, -1 gets
|
||||
* @returns 1 if interrupt last subframe set, else 0, -1 different values
|
||||
*/
|
||||
int setInterruptSubframe(int val = -1);
|
||||
|
||||
private:
|
||||
|
||||
/**
|
||||
|
@ -428,6 +428,14 @@ slsDetectorCommand::slsDetectorCommand(slsDetectorUtils *det) {
|
||||
descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdAdvanced;
|
||||
++i;
|
||||
|
||||
/*! \page config
|
||||
- <b>interruptsubframe [i]</b> sets/gets the interrupt subframe flag. Setting it to 1 will interrupt the last subframe at the required exposure time. By default, this is disabled and set to 0, ie. it will wait for the last sub frame to finish exposing. Used for EIGER in 32 bit mode only. \c Returns \c (int).
|
||||
*/
|
||||
descrToFuncMap[i].m_pFuncName="interruptsubframe";
|
||||
descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdAdvanced;
|
||||
++i;
|
||||
|
||||
|
||||
/*! \page config
|
||||
- <b>extsig:[i] [flag]</b> sets/gets the mode of the external signal i. Options: \c off, \c gate_in_active_high, \c gate_in_active_low, \c trigger_in_rising_edge, \c trigger_in_falling_edge,
|
||||
\c ro_trigger_in_rising_edge, \c ro_trigger_in_falling_edge, \c gate_out_active_high, \c gate_out_active_low, \c trigger_out_rising_edge, \c trigger_out_falling_edge, \c ro_trigger_out_rising_edge,
|
||||
@ -6062,7 +6070,18 @@ string slsDetectorCommand::cmdAdvanced(int narg, char *args[], int action) {
|
||||
|
||||
return string("unknown");
|
||||
|
||||
} else if (cmd=="extsig") {
|
||||
} else if (cmd=="interruptsubframe") {
|
||||
myDet->setOnline(ONLINE_FLAG);
|
||||
if (action==PUT_ACTION) {
|
||||
int ival = -1;
|
||||
if (!sscanf(args[1],"%d",&ival))
|
||||
return string("could not scan interrupt sub frame parameter " + string(args[1]));
|
||||
myDet->setInterruptSubframe(ival);
|
||||
}
|
||||
char ans[100];
|
||||
sprintf(ans,"%d",myDet->setInterruptSubframe(-1));
|
||||
return std::string(ans);
|
||||
} else if (cmd=="extsig") {
|
||||
externalSignalFlag flag=GET_EXTERNAL_SIGNAL_FLAG;
|
||||
int is=-1;
|
||||
if (sscanf(args[0],"extsig:%d",&is))
|
||||
@ -6162,6 +6181,7 @@ string slsDetectorCommand::helpAdvanced(int narg, char *args[], int action) {
|
||||
|
||||
os << "extsig:i mode \t sets the mode of the external signal i. can be \n \t \t \t off, \n \t \t \t gate_in_active_high, \n \t \t \t gate_in_active_low, \n \t \t \t trigger_in_rising_edge, \n \t \t \t trigger_in_falling_edge, \n \t \t \t ro_trigger_in_rising_edge, \n \t \t \t ro_trigger_in_falling_edge, \n \t \t \t gate_out_active_high, \n \t \t \t gate_out_active_low, \n \t \t \t trigger_out_rising_edge, \n \t \t \t trigger_out_falling_edge, \n \t \t \t ro_trigger_out_rising_edge, \n \t \t \t ro_trigger_out_falling_edge" << std::endl;
|
||||
os << "flags mode \t sets the readout flags to mode. can be none, storeinram, tot, continous, parallel, nonparallel, safe, digital, analog_digital, overlow, nooverflow, unknown." << std::endl;
|
||||
os << "interruptsubframe flag \t sets the interrupt subframe flag. Setting it to 1 will interrupt the last subframe at the required exposure time. By default, this is disabled and set to 0, ie. it will wait for the last sub frame to finish exposing. Used for EIGER in 32 bit mode only." << std::endl;
|
||||
|
||||
os << "programfpga f \t programs the fpga with file f (with .pof extension)." << std::endl;
|
||||
os << "resetfpga f \t resets fpga, f can be any value" << std::endl;
|
||||
@ -6175,6 +6195,7 @@ string slsDetectorCommand::helpAdvanced(int narg, char *args[], int action) {
|
||||
os << "extsig:i \t gets the mode of the external signal i. can be \n \t \t \t off, \n \t \t \t gate_in_active_high, \n \t \t \t gate_in_active_low, \n \t \t \t trigger_in_rising_edge, \n \t \t \t trigger_in_falling_edge, \n \t \t \t ro_trigger_in_rising_edge, \n \t \t \t ro_trigger_in_falling_edge, \n \t \t \t gate_out_active_high, \n \t \t \t gate_out_active_low, \n \t \t \t trigger_out_rising_edge, \n \t \t \t trigger_out_falling_edge, \n \t \t \t ro_trigger_out_rising_edge, \n \t \t \t ro_trigger_out_falling_edge" << std::endl;
|
||||
|
||||
os << "flags \t gets the readout flags. can be none, storeinram, tot, continous, parallel, nonparallel, safe, digital, analog_digital, overflow, nooverflow, unknown" << std::endl;
|
||||
os << "interruptsubframe \t gets the interrupt subframe flag. Setting it to 1 will interrupt the last subframe at the required exposure time. By default, this is disabled and set to 0, ie. it will wait for the last sub frame to finish exposing. Used for EIGER in 32 bit mode only." << std::endl;
|
||||
os << "led \t returns led status (0 off, 1 on)" << std::endl;
|
||||
os << "powerchip \t gets if the chip has been powered on or off" << std::endl;
|
||||
os << "auto_comp_disable \t Currently not implemented. gets if the automatic comparator diable mode is enabled/disabled" << std::endl;
|
||||
|
@ -1028,11 +1028,15 @@ virtual int setReceiverSilentMode(int i = -1)=0;
|
||||
*/
|
||||
virtual int setQuad(int val = -1) = 0;
|
||||
|
||||
/**
|
||||
* Set or Get Interrupt last sub frame(Only for Eiger)
|
||||
* @param val 1 if interrupt last subframe set, else 0, -1 gets
|
||||
* @returns 1 if interrupt last subframe set, else 0, -1 different values
|
||||
*/
|
||||
virtual int setInterruptSubframe(int val = -1) = 0;
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
static const int64_t thisSoftwareVersion=0x20141013;
|
||||
|
||||
|
||||
|
||||
//protected:
|
||||
|
Reference in New Issue
Block a user