mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-23 18:17:59 +02:00
rxr: fixed all updates from rxParameters, connected them in masterAttributes, added json header and scan parametes in metadata
This commit is contained in:
@ -403,60 +403,6 @@ typedef struct {
|
||||
enum timingSourceType { TIMING_INTERNAL, TIMING_EXTERNAL };
|
||||
|
||||
#ifdef __cplusplus
|
||||
/**
|
||||
* structure to udpate receiver
|
||||
*/
|
||||
struct rxParameters {
|
||||
detectorType detType{GENERIC};
|
||||
xy numberOfDetector;
|
||||
int moduleId{0};
|
||||
char hostname[MAX_STR_LENGTH];
|
||||
int udpInterfaces{1};
|
||||
int udp_dstport{0};
|
||||
uint32_t udp_dstip{0U};
|
||||
uint64_t udp_dstmac{0LU};
|
||||
int udp_dstport2{0};
|
||||
uint32_t udp_dstip2{0U};
|
||||
uint64_t udp_dstmac2{0LU};
|
||||
int64_t frames{0};
|
||||
int64_t triggers{0};
|
||||
int64_t bursts{0};
|
||||
int analogSamples{0};
|
||||
int digitalSamples{0};
|
||||
int64_t expTimeNs{0};
|
||||
int64_t periodNs{0};
|
||||
int64_t subExpTimeNs{0};
|
||||
int64_t subDeadTimeNs{0};
|
||||
int activate{0};
|
||||
int quad{0};
|
||||
int dynamicRange{16};
|
||||
timingMode timMode{AUTO_TIMING};
|
||||
int tenGiga{0};
|
||||
readoutMode roMode{ANALOG_ONLY};
|
||||
uint32_t adcMask{0};
|
||||
uint32_t adc10gMask{0};
|
||||
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));
|
||||
|
||||
/** pattern structure */
|
||||
struct patternParameters {
|
||||
uint64_t word[MAX_PATTERN_LENGTH]{};
|
||||
uint64_t patioctrl{0};
|
||||
uint32_t patlimits[2]{};
|
||||
uint32_t patloop[6]{};
|
||||
uint32_t patnloop[3]{};
|
||||
uint32_t patwait[3]{};
|
||||
uint64_t patwaittime[3]{};
|
||||
} __attribute__((packed));
|
||||
|
||||
/** scan structure */
|
||||
struct scanParameters {
|
||||
@ -487,6 +433,66 @@ typedef struct {
|
||||
(dacSettleTime_ns == other.dacSettleTime_ns));
|
||||
}
|
||||
} __attribute__((packed));
|
||||
|
||||
/**
|
||||
* structure to udpate receiver
|
||||
*/
|
||||
struct rxParameters {
|
||||
detectorType detType{GENERIC};
|
||||
xy numberOfDetector;
|
||||
int moduleId{0};
|
||||
char hostname[MAX_STR_LENGTH];
|
||||
int udpInterfaces{1};
|
||||
int udp_dstport{0};
|
||||
uint32_t udp_dstip{0U};
|
||||
uint64_t udp_dstmac{0LU};
|
||||
int udp_dstport2{0};
|
||||
uint32_t udp_dstip2{0U};
|
||||
uint64_t udp_dstmac2{0LU};
|
||||
int64_t frames{0};
|
||||
int64_t triggers{0};
|
||||
int64_t bursts{0};
|
||||
int additionalStorageCells{0};
|
||||
int analogSamples{0};
|
||||
int digitalSamples{0};
|
||||
int64_t expTimeNs{0};
|
||||
int64_t periodNs{0};
|
||||
int64_t subExpTimeNs{0};
|
||||
int64_t subDeadTimeNs{0};
|
||||
int activate{0};
|
||||
int quad{0};
|
||||
int numLinesReadout{0};
|
||||
int thresholdEnergyeV{0};
|
||||
int dynamicRange{16};
|
||||
timingMode timMode{AUTO_TIMING};
|
||||
int tenGiga{0};
|
||||
readoutMode roMode{ANALOG_ONLY};
|
||||
uint32_t adcMask{0};
|
||||
uint32_t adc10gMask{0};
|
||||
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};
|
||||
scanParameters scanParams{};
|
||||
} __attribute__((packed));
|
||||
|
||||
/** pattern structure */
|
||||
struct patternParameters {
|
||||
uint64_t word[MAX_PATTERN_LENGTH]{};
|
||||
uint64_t patioctrl{0};
|
||||
uint32_t patlimits[2]{};
|
||||
uint32_t patloop[6]{};
|
||||
uint32_t patnloop[3]{};
|
||||
uint32_t patwait[3]{};
|
||||
uint64_t patwaittime[3]{};
|
||||
} __attribute__((packed));
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -313,6 +313,7 @@ enum detFuncs {
|
||||
F_SET_RECEIVER_STREAMING_START_FNUM,
|
||||
F_SET_RECEIVER_RATE_CORRECT,
|
||||
F_SET_RECEIVER_SCAN,
|
||||
F_RECEIVER_SET_THRESHOLD,
|
||||
|
||||
NUM_REC_FUNCTIONS
|
||||
};
|
||||
@ -627,6 +628,7 @@ const char* getFunctionNameFromEnum(enum detFuncs func) {
|
||||
case F_SET_RECEIVER_STREAMING_START_FNUM: return "F_SET_RECEIVER_STREAMING_START_FNUM";
|
||||
case F_SET_RECEIVER_RATE_CORRECT: return "F_SET_RECEIVER_RATE_CORRECT";
|
||||
case F_SET_RECEIVER_SCAN: return "F_SET_RECEIVER_SCAN";
|
||||
case F_RECEIVER_SET_THRESHOLD: return "F_RECEIVER_SET_THRESHOLD";
|
||||
|
||||
case NUM_REC_FUNCTIONS: return "NUM_REC_FUNCTIONS";
|
||||
default: return "Unknown Function";
|
||||
|
@ -40,6 +40,7 @@ std::string ToString(const slsDetectorDefs::rxParameters &r) {
|
||||
<< "frames:" << r.frames << std::endl
|
||||
<< "triggers:" << r.triggers << std::endl
|
||||
<< "bursts:" << r.bursts << std::endl
|
||||
<< "additionalStorageCells:" << r.additionalStorageCells << std::endl
|
||||
<< "analogSamples:" << r.analogSamples << std::endl
|
||||
<< "digitalSamples:" << r.digitalSamples << std::endl
|
||||
<< "expTime:" << ToString(std::chrono::nanoseconds(r.expTimeNs))
|
||||
@ -52,6 +53,8 @@ std::string ToString(const slsDetectorDefs::rxParameters &r) {
|
||||
<< std::endl
|
||||
<< "activate:" << r.activate << std::endl
|
||||
<< "quad:" << r.quad << std::endl
|
||||
<< "numLinesReadout:" << r.numLinesReadout << std::endl
|
||||
<< "thresholdEnergyeV:" << r.thresholdEnergyeV << std::endl
|
||||
<< "dynamicRange:" << r.dynamicRange << std::endl
|
||||
<< "timMode:" << r.timMode << std::endl
|
||||
<< "tenGiga:" << r.tenGiga << std::endl
|
||||
@ -75,6 +78,7 @@ std::string ToString(const slsDetectorDefs::rxParameters &r) {
|
||||
<< "gateDelay3:" << ToString(std::chrono::nanoseconds(r.gateDelay3Ns))
|
||||
<< std::endl
|
||||
<< "gates:" << r.gates << std::endl
|
||||
<< "scanParams:" << sls::ToString(r.scanParams) << std::endl
|
||||
<< ']';
|
||||
return oss.str();
|
||||
}
|
||||
|
Reference in New Issue
Block a user