mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-09 03:20:42 +02:00
restream stop if stop called, temp solution (#1092)
* restream stop if stop called, temp solution until new command for it * chekckrestream is ambiguous when only checking receiver * moved restreaming in background to receiver stop instead of detector stop (was in stop before due to gui stop button access), increase to 2s time to restream in client acquire * minor * moved stop to module class * fix from before
This commit is contained in:
parent
60ce31bb17
commit
84e83bf551
@ -1179,7 +1179,8 @@ int DetectorImpl::acquire() {
|
|||||||
} else if (receiver) {
|
} else if (receiver) {
|
||||||
while (numZmqRunning != 0) {
|
while (numZmqRunning != 0) {
|
||||||
Parallel(&Module::restreamStopFromReceiver, {});
|
Parallel(&Module::restreamStopFromReceiver, {});
|
||||||
std::this_thread::sleep_for(std::chrono::milliseconds(200));
|
// increase time for fewer dummy packets to process
|
||||||
|
std::this_thread::sleep_for(std::chrono::seconds(2));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
dataProcessingThread.join();
|
dataProcessingThread.join();
|
||||||
|
@ -905,8 +905,13 @@ void Module::startReceiver() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Module::stopReceiver() {
|
void Module::stopReceiver() {
|
||||||
|
auto rxStatusPrior = getReceiverStatus();
|
||||||
sendToReceiver(F_STOP_RECEIVER, static_cast<int>(shm()->stoppedFlag),
|
sendToReceiver(F_STOP_RECEIVER, static_cast<int>(shm()->stoppedFlag),
|
||||||
nullptr);
|
nullptr);
|
||||||
|
|
||||||
|
if (rxStatusPrior == IDLE && getReceiverStreaming()) {
|
||||||
|
restreamStopFromReceiver();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Module::startAcquisition() {
|
void Module::startAcquisition() {
|
||||||
@ -920,26 +925,8 @@ void Module::startReadout() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Module::stopAcquisition() {
|
void Module::stopAcquisition() {
|
||||||
|
|
||||||
// get det status before stopping acq
|
|
||||||
runStatus detStatus = ERROR;
|
|
||||||
try {
|
|
||||||
detStatus = getRunStatus();
|
|
||||||
} catch (...) {
|
|
||||||
}
|
|
||||||
|
|
||||||
sendToDetectorStop(F_STOP_ACQUISITION);
|
sendToDetectorStop(F_STOP_ACQUISITION);
|
||||||
shm()->stoppedFlag = true;
|
shm()->stoppedFlag = true;
|
||||||
|
|
||||||
// restream dummy header, if rxr streaming and det idle before stop
|
|
||||||
try {
|
|
||||||
if (shm()->useReceiverFlag && getReceiverStreaming()) {
|
|
||||||
if (detStatus == IDLE && getReceiverStatus() == IDLE) {
|
|
||||||
restreamStopFromReceiver();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} catch (...) {
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Module::restreamStopFromReceiver() {
|
void Module::restreamStopFromReceiver() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user