Added method to check whether fdaq is running
This commit is contained in:
@@ -44,6 +44,7 @@ public class FdaqService {
|
||||
private static final Logger logger = Logger.getLogger(FdaqService.class.getName());
|
||||
|
||||
private volatile boolean stopAcquisition = false;
|
||||
private volatile boolean running = false;
|
||||
|
||||
private final EventBus bus;
|
||||
|
||||
@@ -71,7 +72,8 @@ public class FdaqService {
|
||||
* @param numberOfElements
|
||||
*/
|
||||
public void acquire() {
|
||||
|
||||
running = true; // potential threading problem
|
||||
|
||||
Socket echoSocket = null;
|
||||
DataOutputStream out = null;
|
||||
DataInputStream in = null;
|
||||
@@ -145,6 +147,8 @@ public class FdaqService {
|
||||
} catch (IOException e) {
|
||||
// Ignore because not relevant at this stage
|
||||
}
|
||||
|
||||
running = false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -172,4 +176,7 @@ public class FdaqService {
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isRunning() {
|
||||
return running;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user