* roi structure expanded to have ymin and ymax

* compile with 'detector roi'

* wip

* wip, rx_roi, rx_clearroi

* wip rxroi

* rxroi wip

* wip rxroi

* merge fix

* wip

* rx_roi works, impl wip, test

* tests in, impl left

* wip, rxroi impl

* wip, rxroi impl

* wip

* setrx_Roi works, getrx_roi, wip

* rx_roi impl done

* wip, rxroi

* wip, getrx_roi rxr ports

* fix ports

* wip

* wip

* fix positions on server side

* wip

* numports wip

* wip

* jungfrau top inner interface row increment

* x, y detpos, wip

* removed eiger row indices flipping in gui (bottom flipping maintained)

* wip

* wip, jungfrau numinterfaces2

* jungfrau virtual works

* eiger, jungfrau, g2 virtual server works

* eiger positions fix, wip

* binaries in

* minor printout

* binaries in

* merge fix

* merge fix

* removing getposition

* setrxroi wip

* set upto port

* get messed, wip

* roi multi to module works, wip

* wip

* roi dont return -1

* added rxroi metadata in master file

* added rxroifromshm, not yet in detector

* rx roi in gui with box, also for gap pixels (gappixels for jungfrau mess)

* fix for segfault in gui with detaching roi box in gui

* wip

* m3 gui: slave timing modes should be discarded when squashing

* fixed m3 virtual data, and fixed counters in gui asthetics

* m3 roi works

* wip, g2

* wip

* handling g225um boards, and showing roi for gainplot as well

* udpate python functions

* fix for 1d and a2d roi written

* fixed actual roi written to file

* no virtual hdf5 when handling rx roi

* test

* minor

* binarie in
This commit is contained in:
Dhanya Thattil
2022-05-16 12:35:06 +02:00
committed by GitHub
parent 9808376207
commit fcc7f7aef8
53 changed files with 1713 additions and 859 deletions

View File

@ -49,9 +49,6 @@
// ctb/ moench 1g udp (read from fifo)
#define UDP_PACKET_DATA_BYTES (1344)
/** maximum rois */
#define MAX_ROIS 100
/** maximum trim en */
#define MAX_TRIMEN 100
@ -172,13 +169,38 @@ class slsDetectorDefs {
struct ROI {
int xmin{-1};
int xmax{-1};
int ymin{-1};
int ymax{-1};
ROI() = default;
ROI(int xmin, int xmax) : xmin(xmin), xmax(xmax){};
ROI(int xmin, int xmax, int ymin, int ymax)
: xmin(xmin), xmax(xmax), ymin(ymin), ymax(ymax){};
constexpr std::array<int, 4> getIntArray() const {
return std::array<int, 4> ({xmin, xmax, ymin, ymax});
}
constexpr bool completeRoi() const {
return (xmin == -1 && xmax == -1 && ymin == -1 && ymax == -1);
}
constexpr bool noRoi() const {
return (xmin == 0 && xmax == 0 && ymin == 0 && ymax == 0);
}
void setNoRoi() {
xmin = 0;
xmax = 0;
ymin = 0;
ymax = 0;
}
constexpr bool operator==(const ROI &other) const {
return ((xmin == other.xmin) && (xmax == other.xmax) &&
(ymin == other.ymin) && (ymax == other.ymax));
}
} __attribute__((packed));
#else
typedef struct {
int xmin;
int xmax;
int ymin;
int ymax;
} ROI;
#endif

View File

@ -279,7 +279,7 @@ enum detFuncs {
F_LOCK_RECEIVER,
F_GET_LAST_RECEIVER_CLIENT_IP,
F_GET_RECEIVER_VERSION,
F_RECEIVER_SET_ROI,
F_RECEIVER_SET_DETECTOR_ROI,
F_RECEIVER_SET_NUM_FRAMES,
F_SET_RECEIVER_NUM_TRIGGERS,
F_SET_RECEIVER_NUM_BURSTS,
@ -375,6 +375,9 @@ enum detFuncs {
F_RECEIVER_SET_DATASTREAM,
F_GET_RECEIVER_ARPING,
F_SET_RECEIVER_ARPING,
F_RECEIVER_GET_RECEIVER_ROI,
F_RECEIVER_SET_RECEIVER_ROI,
F_RECEIVER_SET_RECEIVER_ROI_METADATA,
NUM_REC_FUNCTIONS
};
@ -652,7 +655,7 @@ const char* getFunctionNameFromEnum(enum detFuncs func) {
case F_LOCK_RECEIVER: return "F_LOCK_RECEIVER";
case F_GET_LAST_RECEIVER_CLIENT_IP: return "F_GET_LAST_RECEIVER_CLIENT_IP";
case F_GET_RECEIVER_VERSION: return "F_GET_RECEIVER_VERSION";
case F_RECEIVER_SET_ROI: return "F_RECEIVER_SET_ROI";
case F_RECEIVER_SET_DETECTOR_ROI: return "F_RECEIVER_SET_DETECTOR_ROI";
case F_RECEIVER_SET_NUM_FRAMES: return "F_RECEIVER_SET_NUM_FRAMES";
case F_SET_RECEIVER_NUM_TRIGGERS: return "F_SET_RECEIVER_NUM_TRIGGERS";
case F_SET_RECEIVER_NUM_BURSTS: return "F_SET_RECEIVER_NUM_BURSTS";
@ -748,6 +751,9 @@ const char* getFunctionNameFromEnum(enum detFuncs func) {
case F_RECEIVER_SET_DATASTREAM: return "F_RECEIVER_SET_DATASTREAM";
case F_GET_RECEIVER_ARPING: return "F_GET_RECEIVER_ARPING";
case F_SET_RECEIVER_ARPING: return "F_SET_RECEIVER_ARPING";
case F_RECEIVER_GET_RECEIVER_ROI: return "F_RECEIVER_GET_RECEIVER_ROI";
case F_RECEIVER_SET_RECEIVER_ROI: return "F_RECEIVER_SET_RECEIVER_ROI";
case F_RECEIVER_SET_RECEIVER_ROI_METADATA: return "F_RECEIVER_SET_RECEIVER_ROI_METADATA";
case NUM_REC_FUNCTIONS: return "NUM_REC_FUNCTIONS";
default: return "Unknown Function";

View File

@ -1,15 +1,14 @@
// SPDX-License-Identifier: LGPL-3.0-or-other
// Copyright (C) 2021 Contributors to the SLS Detector Package
/** API versions */
#define GITBRANCH "developer"
#define APILIB 0x220408
#define APIRECEIVER 0x220408
#define APIGUI 0x220328
#define APICTB 0x220428
#define APIGOTTHARD 0x220428
#define APIGOTTHARD2 0x220428
#define APIJUNGFRAU 0x220428
#define APIMOENCH 0x220427
#define APIEIGER 0x220428
#define APIMYTHEN3 0x220510
#define GITBRANCH "developer"
#define APILIB 0x220408
#define APIRECEIVER 0x220408
#define APIGUI 0x220328
#define APICTB 0x220516
#define APIGOTTHARD 0x220516
#define APIGOTTHARD2 0x220516
#define APIJUNGFRAU 0x220516
#define APIMYTHEN3 0x220516
#define APIMOENCH 0x220503
#define APIEIGER 0x220516