merge from 7.0.0

This commit is contained in:
2023-02-24 10:39:51 +01:00
101 changed files with 4009 additions and 2128 deletions

View File

@ -76,7 +76,7 @@ void Module::setHostname(const std::string &hostname,
initialDetectorServerChecks();
checkDetectorVersionCompatibility();
LOG(logINFO) << "Module Version Compatibility - Success";
} catch (const DetectorError &e) {
} catch (const RuntimeError &e) {
if (!initialChecks) {
LOG(logWARNING) << "Bypassing Initial Checks at your own risk!";
} else {
@ -876,26 +876,25 @@ void Module::startReadout() {
}
void Module::stopAcquisition() {
// get status before stopping acquisition
runStatus s = ERROR, r = ERROR;
bool zmqstreaming = false;
// get det status before stopping acq
runStatus detStatus = ERROR;
try {
if (shm()->useReceiverFlag && getReceiverStreaming()) {
zmqstreaming = true;
s = getRunStatus();
r = getReceiverStatus();
}
detStatus = getRunStatus();
} catch (...) {
// if receiver crashed, stop detector in any case
zmqstreaming = false;
}
sendToDetectorStop(F_STOP_ACQUISITION);
shm()->stoppedFlag = true;
// if rxr streaming and acquisition finished, restream dummy stop packet
if (zmqstreaming && (s == IDLE) && (r == IDLE)) {
restreamStopFromReceiver();
// restream dummy header, if rxr streaming and det idle before stop
try {
if (shm()->useReceiverFlag && getReceiverStreaming()) {
if (detStatus == IDLE && getReceiverStatus() == IDLE) {
restreamStopFromReceiver();
}
}
} catch (...) {
}
}