mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-12 04:47:14 +02:00
Readoutflags (#61)
* WIP * eiger binary back wih versioning * fixed readout flag in ctbgui, added speedLevel enum * ctbgui: fixed a print out error * ctb readout bug fix * WIP * WIP * WIP
This commit is contained in:
@ -499,36 +499,23 @@ format
|
||||
DBIT_PIPELINE, /**< adc pipeline */
|
||||
MAX_ADC_PHASE_SHIFT, /** max adc phase shift */
|
||||
MAX_DBIT_PHASE_SHIFT, /** max adc phase shift */
|
||||
SYNC_CLOCK,
|
||||
SYNC_CLOCK
|
||||
};
|
||||
|
||||
/**
|
||||
readout flags
|
||||
*/
|
||||
enum readOutFlags {
|
||||
GET_READOUT_FLAGS = -1, /**< return readout flags */
|
||||
NORMAL_READOUT = 0, /**< no flag */
|
||||
STORE_IN_RAM = 0x1, /**< data are stored in ram and sent only after end
|
||||
of acquisition for faster frame rate */
|
||||
READ_HITS = 0x2, /**< return only the number of the channel which
|
||||
counted ate least one */
|
||||
ZERO_COMPRESSION = 0x4, /**< returned data are 0-compressed */
|
||||
PUMP_PROBE_MODE = 0x8, /**<pump-probe mode */
|
||||
BACKGROUND_CORRECTIONS = 0x1000, /**<background corrections */
|
||||
TOT_MODE = 0x2000, /**< pump-probe mode */
|
||||
CONTINOUS_RO = 0x4000, /**< pump-probe mode */
|
||||
PARALLEL = 0x10000, /**< eiger parallel mode */
|
||||
NONPARALLEL = 0x20000, /**< eiger serial mode */
|
||||
DIGITAL_ONLY = 0x80000, /** chiptest board read only digital bits (not
|
||||
adc values)*/
|
||||
ANALOG_AND_DIGITAL = 0x100000, /** chiptest board read adc values and
|
||||
digital bits digital bits */
|
||||
DUT_CLK = 0x200000, /** chiptest board fifo clock comes from device
|
||||
under test */
|
||||
SHOW_OVERFLOW = 0x400000, /** eiger 32 bit mode, show saturated for
|
||||
overflow of single subframes */
|
||||
NOOVERFLOW = 0x800000 /** eiger 32 bit mode, do not show saturated for
|
||||
overflow of single subframes */
|
||||
* read out mode (ctb, moench)
|
||||
*/
|
||||
enum readoutMode {
|
||||
ANALOG_ONLY,
|
||||
DIGITAL_ONLY,
|
||||
ANALOG_AND_DIGITAL
|
||||
};
|
||||
|
||||
/** chip speed */
|
||||
enum speedLevel {
|
||||
FULL_SPEED,
|
||||
HALF_SPEED,
|
||||
QUARTER_SPEED
|
||||
};
|
||||
|
||||
/** port type */
|
||||
@ -900,6 +887,56 @@ format
|
||||
}
|
||||
};
|
||||
|
||||
/** returns string from readoutMode */
|
||||
static std::string getReadoutModeType(readoutMode mode) {
|
||||
switch(mode) {
|
||||
case ANALOG_ONLY:
|
||||
return "analog";
|
||||
case DIGITAL_ONLY:
|
||||
return "digital";
|
||||
case ANALOG_AND_DIGITAL:
|
||||
return "analog_digital";
|
||||
default:
|
||||
return "Unknown";
|
||||
}
|
||||
};
|
||||
|
||||
/** returns readoutMode from string */
|
||||
static readoutMode getReadoutModeType(std::string smode) {
|
||||
if (smode == "analog")
|
||||
return ANALOG_ONLY;
|
||||
if (smode == "digital")
|
||||
return DIGITAL_ONLY;
|
||||
if (smode == "analog_digital")
|
||||
return ANALOG_AND_DIGITAL;
|
||||
throw sls::RuntimeError("Unknown readout mode " + smode);
|
||||
};
|
||||
|
||||
/** returns string from speedLevel */
|
||||
static std::string getSpeedLevelType(speedLevel mode) {
|
||||
switch(mode) {
|
||||
case FULL_SPEED:
|
||||
return "full_speed";
|
||||
case HALF_SPEED:
|
||||
return "half_speed";
|
||||
case QUARTER_SPEED:
|
||||
return "quarter_speed";
|
||||
default:
|
||||
return "Unknown";
|
||||
}
|
||||
};
|
||||
|
||||
/** returns speedLevel from string */
|
||||
static speedLevel getSpeedLevelType(std::string smode) {
|
||||
if (smode == "full_speed")
|
||||
return FULL_SPEED;
|
||||
if (smode == "half_speed")
|
||||
return HALF_SPEED;
|
||||
if (smode == "quarter_speed")
|
||||
return QUARTER_SPEED;
|
||||
throw sls::RuntimeError("Unknown speed level mode " + smode);
|
||||
};
|
||||
|
||||
/**
|
||||
@short returns adc index from std::string
|
||||
\param s can be temp_fpga, temp_fpgaext, temp_10ge, temp_dcdc, temp_sodl,
|
||||
|
@ -33,7 +33,6 @@ enum detFuncs{
|
||||
F_SET_TIMER, /**< set/get timer value */
|
||||
F_GET_TIME_LEFT, /**< get current value of the timer (time left) */
|
||||
F_SET_DYNAMIC_RANGE, /**< set/get detector dynamic range */
|
||||
F_SET_READOUT_FLAGS, /**< set/get readout flags */
|
||||
F_SET_ROI, /**< set/get region of interest */
|
||||
F_GET_ROI,
|
||||
F_SET_SPEED, /**< set/get readout speed parameters */
|
||||
@ -93,6 +92,14 @@ enum detFuncs{
|
||||
F_GET_INTERRUPT_SUBFRAME,
|
||||
F_SET_READ_N_LINES,
|
||||
F_GET_READ_N_LINES,
|
||||
F_SET_PARALLEL_MODE,
|
||||
F_GET_PARALLEL_MODE,
|
||||
F_SET_OVERFLOW_MODE,
|
||||
F_GET_OVERFLOW_MODE,
|
||||
F_SET_STOREINRAM_MODE,
|
||||
F_GET_STOREINRAM_MODE,
|
||||
F_SET_READOUT_MODE,
|
||||
F_GET_READOUT_MODE,
|
||||
NUM_DET_FUNCTIONS,
|
||||
|
||||
RECEIVER_ENUM_START = 128, /**< detector function should not exceed this (detector server should not compile anyway) */
|
||||
@ -145,7 +152,7 @@ enum detFuncs{
|
||||
F_RECEIVER_DISCARD_POLICY, /** < frames discard policy */
|
||||
F_RECEIVER_PADDING_ENABLE, /** < partial frames padding enable */
|
||||
F_RECEIVER_DEACTIVATED_PADDING_ENABLE, /** < deactivated receiver padding enable */
|
||||
F_RECEIVER_SET_READOUT_FLAGS, /**< set/get receiver readout flags */
|
||||
F_RECEIVER_SET_READOUT_MODE, /**< set/get receiver readout mode */
|
||||
F_RECEIVER_SET_ADC_MASK, /**< set adc mask */
|
||||
F_SET_RECEIVER_DBIT_LIST, /** < set receiver digital bit list */
|
||||
F_GET_RECEIVER_DBIT_LIST, /** < get receiver digital bit list */
|
||||
@ -181,7 +188,6 @@ static const char* getFunctionNameFromEnum(enum detFuncs func) {
|
||||
case F_SET_TIMER: return "F_SET_TIMER";
|
||||
case F_GET_TIME_LEFT: return "F_GET_TIME_LEFT";
|
||||
case F_SET_DYNAMIC_RANGE: return "F_SET_DYNAMIC_RANGE";
|
||||
case F_SET_READOUT_FLAGS: return "F_SET_READOUT_FLAGS";
|
||||
case F_SET_ROI: return "F_SET_ROI";
|
||||
case F_GET_ROI: return "F_GET_ROI";
|
||||
case F_SET_SPEED: return "F_SET_SPEED";
|
||||
@ -241,6 +247,14 @@ static const char* getFunctionNameFromEnum(enum detFuncs func) {
|
||||
case F_GET_INTERRUPT_SUBFRAME: return "F_GET_INTERRUPT_SUBFRAME";
|
||||
case F_SET_READ_N_LINES: return "F_SET_READ_N_LINES";
|
||||
case F_GET_READ_N_LINES: return "F_GET_READ_N_LINES";
|
||||
case F_SET_PARALLEL_MODE: return "F_SET_PARALLEL_MODE";
|
||||
case F_GET_PARALLEL_MODE: return "F_GET_PARALLEL_MODE";
|
||||
case F_SET_OVERFLOW_MODE: return "F_SET_OVERFLOW_MODE";
|
||||
case F_GET_OVERFLOW_MODE: return "F_GET_OVERFLOW_MODE";
|
||||
case F_SET_STOREINRAM_MODE: return "F_SET_STOREINRAM_MODE";
|
||||
case F_GET_STOREINRAM_MODE: return "F_GET_STOREINRAM_MODE";
|
||||
case F_SET_READOUT_MODE: return "F_SET_READOUT_MODE";
|
||||
case F_GET_READOUT_MODE: return "F_GET_READOUT_MODE";
|
||||
case NUM_DET_FUNCTIONS: return "NUM_DET_FUNCTIONS";
|
||||
case RECEIVER_ENUM_START: return "RECEIVER_ENUM_START";
|
||||
|
||||
@ -293,7 +307,7 @@ static const char* getFunctionNameFromEnum(enum detFuncs func) {
|
||||
case F_RECEIVER_DISCARD_POLICY: return "F_RECEIVER_DISCARD_POLICY";
|
||||
case F_RECEIVER_PADDING_ENABLE: return "F_RECEIVER_PADDING_ENABLE";
|
||||
case F_RECEIVER_DEACTIVATED_PADDING_ENABLE: return "F_RECEIVER_DEACTIVATED_PADDING_ENABLE";
|
||||
case F_RECEIVER_SET_READOUT_FLAGS: return "F_RECEIVER_SET_READOUT_FLAGS";
|
||||
case F_RECEIVER_SET_READOUT_MODE: return "F_RECEIVER_SET_READOUT_MODE";
|
||||
case F_RECEIVER_SET_ADC_MASK: return "F_RECEIVER_SET_ADC_MASK";
|
||||
case F_SET_RECEIVER_DBIT_LIST: return "F_SET_RECEIVER_DBIT_LIST";
|
||||
case F_GET_RECEIVER_DBIT_LIST: return "F_GET_RECEIVER_DBIT_LIST";
|
||||
|
@ -4,9 +4,9 @@
|
||||
#define APIRECEIVER 0x190722
|
||||
#define APIGUI 0x190723
|
||||
#define APIMOENCH 0x190820
|
||||
#define APICTB 0x190830
|
||||
#define APIGOTTHARD 0x190830
|
||||
#define APIJUNGFRAU 0x190830
|
||||
#define APIMYTHEN3 0x190830
|
||||
#define APIEIGER 0x190830
|
||||
#define APIGOTTHARD2 0x190902
|
||||
#define APIEIGER 0x190902
|
||||
#define APIJUNGFRAU 0x190902
|
||||
#define APICTB 0x190902
|
||||
|
Reference in New Issue
Block a user