From 8443969545680355e466ad6ebfc102ec837e25e1 Mon Sep 17 00:00:00 2001
From: Johannes Schumann <johannes.schumann@fau.de>
Date: Thu, 16 Jan 2020 16:51:25 +0100
Subject: [PATCH] Extract the number of UDP packets based on the dq_status
 value

---
 km3io/daq.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/km3io/daq.py b/km3io/daq.py
index e9dba81..8694728 100644
--- a/km3io/daq.py
+++ b/km3io/daq.py
@@ -27,6 +27,9 @@ def get_rate(value):
     else:
         return MINIMAL_RATE_HZ * np.exp(value * RATE_FACTOR)
 
+def get_number_udp_packets(value):
+    """Return the number of received UDP packets based on the dq_status value"""
+    return value & 0x7FFF
 
 class DAQReader:
     """Reader for DAQ ROOT files"""
-- 
GitLab