Added method to check whether fdaq is running

This commit is contained in:
2014-01-09 09:42:33 +01:00
parent 01260abfa1
commit 4c4c6de419
@@ -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;
}
}