Dev/g2 stop frame number (#980)

* get/set next frame number in G2 (firmware only has set, no get)
* firmware has issues: each stop keeps 2 frame header in fifo and the resetting frame number happens after that
* removed the option to set burstmode to burst external or continuwous internal
* needs to be revisited before 9.0.0
This commit is contained in:
2024-10-02 15:26:06 +02:00
committed by GitHub
parent e59de85a33
commit 5e024153bc
12 changed files with 235 additions and 105 deletions

View File

@ -764,7 +764,7 @@ readnrows:
function: setReadNRows
nextframenumber:
help: "[n_value]\n\t[Eiger][Jungfrau][Moench][Ctb][Xilinx Ctb] Next frame number. Stopping acquisition might result in different frame numbers for different modules."
help: "[n_value]\n\t[Eiger][Jungfrau][Moench][Ctb][Xilinx Ctb][Gotthard2] Next frame number. Stopping acquisition might result in different frame numbers for different modules. So, after stopping, next frame number (max + 1) is set for all the modules afterwards."
inherit_actions: INTEGER_COMMAND_VEC_ID
actions:
GET:

View File

@ -661,11 +661,13 @@ class Detector {
Result<std::vector<int64_t>>
getRxCurrentFrameIndex(Positions pos = {}) const;
/** [Eiger][Jungfrau][Moench][CTB][Xilinx CTB] */
/** [Eiger][Jungfrau][Moench][CTB][Xilinx CTB][Gotthard2] */
Result<uint64_t> getNextFrameNumber(Positions pos = {}) const;
/** [Eiger][Jungfrau][Moench][CTB][Xilinx CTB] Stopping acquisition might
* result in different frame numbers for different modules.*/
/** [Eiger][Jungfrau][Moench][CTB][Xilinx CTB][Gotthard2] Stopping
* acquisition might result in different frame numbers for different
* modules. So, after stopping, next frame number (max + 1) is set for all
* the modules afterwards.*/
void setNextFrameNumber(uint64_t value, Positions pos = {});
/** [Eiger][Mythen3][Jungfrau][Moench] Sends an internal software trigger to

View File

@ -911,7 +911,8 @@ void Detector::stopDetector(Positions pos) {
case defs::JUNGFRAU:
case defs::MOENCH:
case defs::CHIPTESTBOARD:
case defs::XILINX_CHIPTESTBOARD: {
case defs::XILINX_CHIPTESTBOARD:
case defs::GOTTHARD2: {
auto res = getNextFrameNumber(pos);
if (!res.equal()) {
uint64_t maxVal = 0;

View File

@ -2403,7 +2403,7 @@ TEST_CASE("nextframenumber", "[.cmdcall]") {
auto det_type = det.getDetectorType().squash();
if (det_type == defs::EIGER || det_type == defs::JUNGFRAU ||
det_type == defs::MOENCH || det_type == defs::CHIPTESTBOARD ||
det_type == defs::XILINX_CHIPTESTBOARD) {
det_type == defs::XILINX_CHIPTESTBOARD || det_type == defs::GOTTHARD2) {
auto prev_sfnum = det.getNextFrameNumber();
REQUIRE_THROWS(caller.call("nextframenumber", {"0"}, -1, PUT));
{