merge from developer (mythen3 branch)

This commit is contained in:
2020-05-27 14:19:33 +02:00
52 changed files with 3684 additions and 1201 deletions

View File

@ -12,6 +12,7 @@
#include "sls_detector_defs.h"
#include "sls_detector_exceptions.h"
#include "string_utils.h"
#include <array>
#include <chrono>
#include <iomanip>
#include <map>
@ -38,9 +39,6 @@ std::string ToString(const defs::timingSourceType s);
std::string ToString(const slsDetectorDefs::ROI &roi);
std::ostream &operator<<(std::ostream &os, const slsDetectorDefs::ROI &roi);
const std::string &ToString(const std::string &s);
/** Convert std::chrono::duration with specified output unit */

View File

@ -207,29 +207,10 @@ typedef struct {
use of the external signals
*/
enum externalSignalFlag {
GET_EXTERNAL_SIGNAL_FLAG = -1, /**<return flag for signal */
SIGNAL_OFF, /**<signal unused - tristate*/
GATE_IN_ACTIVE_HIGH, /**<input gate active high*/
GATE_IN_ACTIVE_LOW, /**<input gate active low */
TRIGGER_IN_RISING_EDGE, /**<input exposure trigger on rising edge */
TRIGGER_IN_FALLING_EDGE, /**<input exposure trigger on falling edge */
RO_TRIGGER_IN_RISING_EDGE, /**<input raedout trigger on rising edge */
RO_TRIGGER_IN_FALLING_EDGE, /**<input readout trigger on falling edge */
GATE_OUT_ACTIVE_HIGH, /**<output active high when detector is exposing*/
GATE_OUT_ACTIVE_LOW, /**<output active low when detector is exposing*/
TRIGGER_OUT_RISING_EDGE, /**<output trigger rising edge at start of
exposure */
TRIGGER_OUT_FALLING_EDGE, /**<output trigger falling edge at start of
exposure */
RO_TRIGGER_OUT_RISING_EDGE, /**<output trigger rising edge at start of
readout */
RO_TRIGGER_OUT_FALLING_EDGE, /**<output trigger falling edge at start of
readout */
OUTPUT_LOW, /**< output always low */
OUTPUT_HIGH, /**< output always high */
MASTER_SLAVE_SYNCHRONIZATION /**< reserved for master/slave
synchronization in multi detector
systems */
TRIGGER_IN_RISING_EDGE,
TRIGGER_IN_FALLING_EDGE,
INVERSION_ON,
INVERSION_OFF
};
/**
@ -241,6 +222,7 @@ typedef struct {
TRIGGER_EXPOSURE, /**< trigger mode i.e. exposure is triggered */
GATED, /**< gated */
BURST_TRIGGER, /**< trigger a burst of frames */
TRIGGER_GATED, /**< trigger and gating */
NUM_TIMING_MODES
};
@ -476,6 +458,13 @@ typedef struct {
ROI roi;
uint32_t countermask{0};
burstMode burstType{BURST_OFF};
int64_t expTime1Ns{0};
int64_t expTime2Ns{0};
int64_t expTime3Ns{0};
int64_t gateDelay1Ns{0};
int64_t gateDelay2Ns{0};
int64_t gateDelay3Ns{0};
int gates{0};
} __attribute__((packed));
#endif
@ -483,9 +472,9 @@ typedef struct {
protected:
#endif
// #ifndef MYROOT
// #include "sls_detector_funcs.h"
// #endif
// #ifndef MYROOT
// #include "sls_detector_funcs.h"
// #endif
#ifdef __cplusplus
};

View File

@ -11,6 +11,7 @@
enum detFuncs {
F_EXEC_COMMAND = 0,
F_GET_DETECTOR_TYPE,
F_GET_EXTERNAL_SIGNAL_FLAG,
F_SET_EXTERNAL_SIGNAL_FLAG,
F_SET_TIMING_MODE,
F_GET_FIRMWARE_VERSION,
@ -197,6 +198,13 @@ enum detFuncs {
F_GET_NUM_CHANNELS,
F_UPDATE_RATE_CORRECTION,
F_GET_RECEIVER_PARAMETERS,
F_START_PATTERN,
F_SET_NUM_GATES,
F_GET_NUM_GATES,
F_SET_GATE_DELAY,
F_GET_GATE_DELAY,
F_GET_EXPTIME_ALL_GATES,
F_GET_GATE_DELAY_ALL_GATES,
NUM_DET_FUNCTIONS,
RECEIVER_ENUM_START = 256, /**< detector function should not exceed this
@ -291,6 +299,8 @@ enum detFuncs {
F_GET_ADDITIONAL_JSON_PARAMETER,
F_GET_RECEIVER_PROGRESS,
F_SETUP_RECEIVER,
F_SET_RECEIVER_NUM_GATES,
F_SET_RECEIVER_GATE_DELAY,
NUM_REC_FUNCTIONS
};
@ -304,6 +314,7 @@ const char* getFunctionNameFromEnum(enum detFuncs func) {
switch (func) {
case F_EXEC_COMMAND: return "F_EXEC_COMMAND";
case F_GET_DETECTOR_TYPE: return "F_GET_DETECTOR_TYPE";
case F_GET_EXTERNAL_SIGNAL_FLAG: return "F_GET_EXTERNAL_SIGNAL_FLAG";
case F_SET_EXTERNAL_SIGNAL_FLAG: return "F_SET_EXTERNAL_SIGNAL_FLAG";
case F_SET_TIMING_MODE: return "F_SET_TIMING_MODE";
case F_GET_FIRMWARE_VERSION: return "F_GET_FIRMWARE_VERSION";
@ -490,6 +501,14 @@ const char* getFunctionNameFromEnum(enum detFuncs func) {
case F_GET_NUM_CHANNELS: return "F_GET_NUM_CHANNELS";
case F_UPDATE_RATE_CORRECTION: return "F_UPDATE_RATE_CORRECTION";
case F_GET_RECEIVER_PARAMETERS: return "F_GET_RECEIVER_PARAMETERS";
case F_START_PATTERN: return "F_START_PATTERN";
case F_SET_NUM_GATES: return "F_SET_NUM_GATES";
case F_GET_NUM_GATES: return "F_GET_NUM_GATES";
case F_SET_GATE_DELAY: return "F_SET_GATE_DELAY";
case F_GET_GATE_DELAY: return "F_GET_GATE_DELAY";
case F_GET_EXPTIME_ALL_GATES: return "F_GET_EXPTIME_ALL_GATES";
case F_GET_GATE_DELAY_ALL_GATES: return "F_GET_GATE_DELAY_ALL_GATES";
case NUM_DET_FUNCTIONS: return "NUM_DET_FUNCTIONS";
case RECEIVER_ENUM_START: return "RECEIVER_ENUM_START";
@ -583,6 +602,8 @@ const char* getFunctionNameFromEnum(enum detFuncs func) {
case F_GET_ADDITIONAL_JSON_PARAMETER: return "F_GET_ADDITIONAL_JSON_PARAMETER";
case F_GET_RECEIVER_PROGRESS: return "F_GET_RECEIVER_PROGRESS";
case F_SETUP_RECEIVER: return "F_SETUP_RECEIVER";
case F_SET_RECEIVER_NUM_GATES: return "F_SET_RECEIVER_NUM_GATES" ;
case F_SET_RECEIVER_GATE_DELAY: return "F_SET_RECEIVER_GATE_DELAY" ;
case NUM_REC_FUNCTIONS: return "NUM_REC_FUNCTIONS";
default: return "Unknown Function";
@ -590,4 +611,3 @@ const char* getFunctionNameFromEnum(enum detFuncs func) {
// clang-format on
}

View File

@ -1,13 +1,12 @@
/** API versions */
#define GITBRANCH "setrxhostname"
#define APILIB 0x200409
#define APIRECEIVER 0x200409
#define APIGUI 0x200409
#define APIEIGER 0x200515
#define APICTB 0x200515
#define APIGOTTHARD 0x200515
#define APIJUNGFRAU 0x200515
#define APIMYTHEN3 0x200515
#define APIMOENCH 0x200515
#define APIGOTTHARD2 0x200526
#define GITBRANCH "setrxhostname"
#define APILIB 0x200409
#define APIRECEIVER 0x200409
#define APIGUI 0x200409
#define APICTB 0x200520
#define APIGOTTHARD 0x200520
#define APIJUNGFRAU 0x200520
#define APIMOENCH 0x200515
#define APIEIGER 0x200520
#define APIMYTHEN3 0x200526
#define APIGOTTHARD2 0x200527