mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-24 02:27:59 +02:00
ctb 1g non blocking acquire (#555)
* allowing ctb and moench 1g to have non blocking acquisition also send data, refactoring wait for acquisition finished for all others
This commit is contained in:
Binary file not shown.
@ -1729,7 +1729,7 @@ void *start_timer(void *arg) {
|
||||
closeUDPSocket(0);
|
||||
|
||||
sharedMemory_setStatus(IDLE);
|
||||
LOG(logINFOBLUE, ("Finished Acquiring\n"));
|
||||
LOG(logINFOBLUE, ("Transmitting frames done\n"));
|
||||
return NULL;
|
||||
}
|
||||
#endif
|
||||
@ -1854,28 +1854,17 @@ enum runStatus getRunStatus() {
|
||||
return s;
|
||||
}
|
||||
|
||||
void readFrame(int *ret, char *mess) {
|
||||
#ifdef VIRTUAL
|
||||
while (sharedMemory_getStatus() == RUNNING) {
|
||||
// LOG(logERROR, ("Waiting for finished flag\n");
|
||||
usleep(5000);
|
||||
}
|
||||
return;
|
||||
#endif
|
||||
// wait for status to be done
|
||||
void waitForAcquisitionEnd() {
|
||||
while (runBusy()) {
|
||||
usleep(500);
|
||||
}
|
||||
|
||||
// frames left to give status
|
||||
*ret = (int)OK;
|
||||
#ifndef VIRTUAL
|
||||
int64_t retval = getNumFramesLeft() + 1;
|
||||
if (retval > -1) {
|
||||
LOG(logERROR, ("No data and run stopped: %lld frames left\n",
|
||||
(long long int)retval));
|
||||
} else {
|
||||
LOG(logINFOGREEN, ("Acquisition successfully finished\n"));
|
||||
LOG(logINFORED, ("%lld frames left\n", (long long int)retval));
|
||||
}
|
||||
#endif
|
||||
LOG(logINFOGREEN, ("Blocking Acquisition done\n"));
|
||||
}
|
||||
|
||||
u_int32_t runBusy() {
|
||||
|
Reference in New Issue
Block a user