diff --git a/ch.psi.fda.fdaq/pom.xml b/ch.psi.fda.fdaq/pom.xml
index 3c7aa40..803439e 100644
--- a/ch.psi.fda.fdaq/pom.xml
+++ b/ch.psi.fda.fdaq/pom.xml
@@ -3,7 +3,7 @@
4.0.0
ch.psi
ch.psi.fda.fdaq
- 1.0.8
+ 1.0.9
diff --git a/ch.psi.fda.fdaq/src/main/java/ch/psi/fda/fdaq/FdaqService.java b/ch.psi.fda.fdaq/src/main/java/ch/psi/fda/fdaq/FdaqService.java
index 77e69e1..b60897f 100644
--- a/ch.psi.fda.fdaq/src/main/java/ch/psi/fda/fdaq/FdaqService.java
+++ b/ch.psi.fda.fdaq/src/main/java/ch/psi/fda/fdaq/FdaqService.java
@@ -69,6 +69,7 @@ public class FdaqService {
DataOutputStream out = null;
DataInputStream in = null;
+ boolean first = true;
while(running){
try {
@@ -79,12 +80,19 @@ public class FdaqService {
out = new DataOutputStream(echoSocket.getOutputStream());
in = new DataInputStream(echoSocket.getInputStream());
- // st ruct fdaqbloc_in {int fnum;int nsample;};
- ByteBuffer bytebuffer = ByteBuffer.allocate(2 * 4); // 2 times
- // Integers
+ ByteBuffer bytebuffer = ByteBuffer.allocate(3 * 4); // 3 times Integer
bytebuffer.order(ByteOrder.LITTLE_ENDIAN);
- bytebuffer.putInt(26);
+ bytebuffer.putInt(26); // Function number (index of pointer to function)
bytebuffer.putInt(numberOfElements);
+ // TODO
+ if(first){
+ bytebuffer.putInt(1); // Reset FIFO flag - The first time there need to be a 1 in int to reset the fifo buffer on the box
+ first=false;
+ }
+ else{
+ bytebuffer.putInt(0);
+ }
+
out.write(bytebuffer.array());
out.flush();