mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-07 18:40:42 +02:00
adding exptime to receiver for file header
This commit is contained in:
parent
b980640a4c
commit
c639477f28
@ -39,40 +39,43 @@ using namespace std;
|
|||||||
#define RECEIVER_DET_HOSTTYPE_NOT_SET 0x0020000000000000ULL
|
#define RECEIVER_DET_HOSTTYPE_NOT_SET 0x0020000000000000ULL
|
||||||
#define DETECTOR_TEN_GIGA 0x0010000000000000ULL
|
#define DETECTOR_TEN_GIGA 0x0010000000000000ULL
|
||||||
#define DETECTOR_ACTIVATE 0x0008000000000000ULL
|
#define DETECTOR_ACTIVATE 0x0008000000000000ULL
|
||||||
|
#define COULD_NOT_CONFIGURE_MAC 0x0004000000000000ULL
|
||||||
|
#define COULDNOT_START_RECEIVER 0x0002000000000000ULL // default error like starting threads
|
||||||
|
#define COULDNOT_STOP_RECEIVER 0x0001000000000000ULL
|
||||||
|
|
||||||
// 0xFFFFFFFF00000000ULL
|
// 0xFFFFFFFF00000000ULL
|
||||||
|
|
||||||
#define COULD_NOT_CONFIGURE_MAC 0x0000000000000001ULL
|
|
||||||
#define COULDNOT_SET_NETWORK_PARAMETER 0x0000000000000002ULL
|
#define COULDNOT_SET_NETWORK_PARAMETER 0x0000000000000001ULL
|
||||||
#define COULDNOT_SET_ROI 0x0000000000000004ULL
|
#define COULDNOT_SET_ROI 0x0000000000000002ULL
|
||||||
#define RECEIVER_READ_FREQUENCY 0x0000000000000008ULL
|
#define RECEIVER_READ_FREQUENCY 0x0000000000000004ULL
|
||||||
#define SETTINGS_NOT_SET 0x0000000000000010ULL
|
#define SETTINGS_NOT_SET 0x0000000000000008ULL
|
||||||
#define SETTINGS_FILE_NOT_OPEN 0x0000000000000020ULL
|
#define SETTINGS_FILE_NOT_OPEN 0x0000000000000010ULL
|
||||||
#define COULDNOT_START_RECEIVER 0x0000000000000040ULL // default error like starting threads
|
#define DETECTOR_TIMER_VALUE_NOT_SET 0x0000000000000020ULL
|
||||||
#define COULDNOT_STOP_RECEIVER 0x0000000000000080ULL
|
#define RECEIVER_ACQ_PERIOD_NOT_SET 0x0000000000000040ULL
|
||||||
#define DETECTOR_TIMER_VALUE_NOT_SET 0x0000000000000100ULL
|
#define RECEIVER_FRAME_NUM_NOT_SET 0x0000000000000080ULL
|
||||||
#define RECEIVER_ACQ_PERIOD_NOT_SET 0x0000000000000200ULL
|
#define RECEIVER_DYNAMIC_RANGE 0x0000000000000100ULL
|
||||||
#define RECEIVER_FRAME_NUM_NOT_SET 0x0000000000000400ULL
|
#define RECEIVER_TEN_GIGA 0x0000000000000200ULL
|
||||||
#define RECEIVER_DYNAMIC_RANGE 0x0000000000000800ULL
|
#define ALLTIMBITS_NOT_SET 0x0000000000000400ULL
|
||||||
#define RECEIVER_TEN_GIGA 0x0000000000001000ULL
|
#define COULD_NOT_SET_SPEED_PARAMETERS 0x0000000000000800ULL
|
||||||
#define ALLTIMBITS_NOT_SET 0x0000000000002000ULL
|
#define COULD_NOT_SET_READOUT_FLAGS 0x0000000000001000ULL
|
||||||
#define COULD_NOT_SET_SPEED_PARAMETERS 0x0000000000004000ULL
|
#define COULD_NOT_SET_FIFO_DEPTH 0x0000000000002000ULL
|
||||||
#define COULD_NOT_SET_READOUT_FLAGS 0x0000000000008000ULL
|
#define COULD_NOT_SET_COUNTER_BIT 0x0000000000004000ULL
|
||||||
#define COULD_NOT_SET_FIFO_DEPTH 0x0000000000010000ULL
|
#define COULD_NOT_PULSE_PIXEL 0x0000000000008000ULL
|
||||||
#define COULD_NOT_SET_COUNTER_BIT 0x0000000000020000ULL
|
#define COULD_NOT_PULSE_PIXEL_NMOVE 0x0000000000010000ULL
|
||||||
#define COULD_NOT_PULSE_PIXEL 0x0000000000040000ULL
|
#define COULD_NOT_PULSE_CHIP 0x0000000000020000ULL
|
||||||
#define COULD_NOT_PULSE_PIXEL_NMOVE 0x0000000000080000ULL
|
#define COULD_NOT_SET_RATE_CORRECTION 0x0000000000040000ULL
|
||||||
#define COULD_NOT_PULSE_CHIP 0x0000000000100000ULL
|
#define DETECTOR_NETWORK_PARAMETER 0x0000000000080000ULL
|
||||||
#define COULD_NOT_SET_RATE_CORRECTION 0x0000000000200000ULL
|
#define RATE_CORRECTION_NOT_32or16BIT 0x0000000000100000ULL
|
||||||
#define DETECTOR_NETWORK_PARAMETER 0x0000000000400000ULL
|
#define RATE_CORRECTION_NO_TAU_PROVIDED 0x0000000000200000ULL
|
||||||
#define RATE_CORRECTION_NOT_32or16BIT 0x0000000000800000ULL
|
#define PROGRAMMING_ERROR 0x0000000000400000ULL
|
||||||
#define RATE_CORRECTION_NO_TAU_PROVIDED 0x0000000001000000ULL
|
#define RECEIVER_ACTIVATE 0x0000000000800000ULL
|
||||||
#define PROGRAMMING_ERROR 0x0000000002000000ULL
|
#define DATA_STREAMING 0x0000000001000000ULL
|
||||||
#define RECEIVER_ACTIVATE 0x0000000004000000ULL
|
#define RESET_ERROR 0x0000000002000000ULL
|
||||||
#define DATA_STREAMING 0x0000000008000000ULL
|
#define POWER_CHIP 0x0000000004000000ULL
|
||||||
#define RESET_ERROR 0x0000000010000000ULL
|
#define RECEIVER_READ_TIMER 0x0000000008000000ULL
|
||||||
#define POWER_CHIP 0x0000000020000000ULL
|
#define RECEIVER_ACQ_TIME_NOT_SET 0x0000000010000000ULL
|
||||||
#define RECEIVER_READ_TIMER 0x0000000040000000ULL
|
|
||||||
// 0x00000000FFFFFFFFULL
|
// 0x00000000FFFFFFFFULL
|
||||||
/** @short class returning all error messages for error mask */
|
/** @short class returning all error messages for error mask */
|
||||||
class errorDefs {
|
class errorDefs {
|
||||||
|
@ -4061,7 +4061,7 @@ int64_t slsDetector::setTimer(timerIndex index, int64_t t){
|
|||||||
|
|
||||||
|
|
||||||
//send acquisiton period/frame number to receiver
|
//send acquisiton period/frame number to receiver
|
||||||
if((index==FRAME_NUMBER)||(index==FRAME_PERIOD)||(index==CYCLES_NUMBER)){
|
if((index==FRAME_NUMBER)||(index==FRAME_PERIOD)||(index==CYCLES_NUMBER)||(index==ACQUISITION_TIME)){
|
||||||
if(ret != FAIL){
|
if(ret != FAIL){
|
||||||
int64_t args[2];
|
int64_t args[2];
|
||||||
retval = -1;
|
retval = -1;
|
||||||
@ -4073,21 +4073,21 @@ int64_t slsDetector::setTimer(timerIndex index, int64_t t){
|
|||||||
//set #frames, #cycles
|
//set #frames, #cycles
|
||||||
if((index==FRAME_NUMBER)||(index==CYCLES_NUMBER)){
|
if((index==FRAME_NUMBER)||(index==CYCLES_NUMBER)){
|
||||||
#ifdef VERBOSE
|
#ifdef VERBOSE
|
||||||
std::cout << "Setting/Getting number of frames " << index <<" to/from receiver " << args[1] << std::endl;
|
std::cout << "Setting/Getting number of frames*cycles " << index <<" to/from receiver " << args[1] << std::endl;
|
||||||
#endif
|
#endif
|
||||||
if(thisDetector->timerValue[CYCLES_NUMBER]==0)
|
if(thisDetector->timerValue[CYCLES_NUMBER]==0)
|
||||||
args[1] = thisDetector->timerValue[FRAME_NUMBER];
|
args[1] = thisDetector->timerValue[FRAME_NUMBER];
|
||||||
else
|
else
|
||||||
args[1] = thisDetector->timerValue[FRAME_NUMBER]*thisDetector->timerValue[CYCLES_NUMBER];
|
args[1] = thisDetector->timerValue[FRAME_NUMBER]*thisDetector->timerValue[CYCLES_NUMBER];
|
||||||
}
|
}
|
||||||
//set period
|
//set period/exptime
|
||||||
else{
|
else{
|
||||||
#ifdef VERBOSE
|
#ifdef VERBOSE
|
||||||
std::cout << "Setting/Getting acquisition period " << index << " to/from receiver " << args[1] << std::endl;
|
if(index==ACQUISITION_TIME)
|
||||||
|
std::cout << "Setting/Getting acquisition time " << index << " to/from receiver " << args[1] << std::endl;
|
||||||
|
else
|
||||||
|
std::cout << "Setting/Getting acquisition period " << index << " to/from receiver " << args[1] << std::endl;
|
||||||
#endif
|
#endif
|
||||||
//if acquisition period is zero, then #frames/buffer depends on exposure time and not acq period
|
|
||||||
if(!args[1])
|
|
||||||
args[1] = timerValue[ACQUISITION_TIME];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
char mess[MAX_STR_LENGTH]="";
|
char mess[MAX_STR_LENGTH]="";
|
||||||
@ -4097,20 +4097,20 @@ int64_t slsDetector::setTimer(timerIndex index, int64_t t){
|
|||||||
}
|
}
|
||||||
if((args[1] != retval)|| (ret==FAIL)){
|
if((args[1] != retval)|| (ret==FAIL)){
|
||||||
ret = FAIL;
|
ret = FAIL;
|
||||||
if(index==FRAME_PERIOD){
|
if(index==ACQUISITION_TIME){
|
||||||
//exptime sent if acq period = 0
|
if(strstr(mess,"receiver not idle")==NULL)
|
||||||
if(retval){
|
cout << "ERROR:Acquisition Time in receiver set incorrectly to " << retval << " instead of " << args[1] << endl;
|
||||||
if(strstr(mess,"receiver not idle")==NULL)
|
setErrorMask((getErrorMask())|(RECEIVER_ACQ_TIME_NOT_SET));
|
||||||
cout << "ERROR:Acquisition Period in receiver set incorrectly to " << retval << " instead of " << args[1] << endl;
|
}else if(index==FRAME_PERIOD){
|
||||||
setErrorMask((getErrorMask())|(RECEIVER_ACQ_PERIOD_NOT_SET));
|
if(strstr(mess,"receiver not idle")==NULL)
|
||||||
}
|
cout << "ERROR:Acquisition Period in receiver set incorrectly to " << retval << " instead of " << args[1] << endl;
|
||||||
|
setErrorMask((getErrorMask())|(RECEIVER_ACQ_PERIOD_NOT_SET));
|
||||||
}else{
|
}else{
|
||||||
if(strstr(mess,"receiver not idle")==NULL)
|
if(strstr(mess,"receiver not idle")==NULL)
|
||||||
cout << "ERROR:Number of Frames (* Number of cycles) in receiver set incorrectly to " << retval << " instead of " << args[1] << endl;
|
cout << "ERROR:Number of Frames (* Number of cycles) in receiver set incorrectly to " << retval << " instead of " << args[1] << endl;
|
||||||
setErrorMask((getErrorMask())|(RECEIVER_FRAME_NUM_NOT_SET));
|
setErrorMask((getErrorMask())|(RECEIVER_FRAME_NUM_NOT_SET));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ret==FORCE_UPDATE)
|
if(ret==FORCE_UPDATE)
|
||||||
updateReceiver();
|
updateReceiver();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user