From da6091600c94e91adeb70deaf65269d1b15a350d Mon Sep 17 00:00:00 2001
From: Dantali0n <info@dantalion.nl>
Date: Fri, 19 Aug 2022 14:10:13 +0200
Subject: [PATCH] L2SS-863: Make _parse_packet internal and remove passable
 object

---
 lofar_station_client/statistics/collector.py | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/lofar_station_client/statistics/collector.py b/lofar_station_client/statistics/collector.py
index 28b0971..dff6bc8 100644
--- a/lofar_station_client/statistics/collector.py
+++ b/lofar_station_client/statistics/collector.py
@@ -61,13 +61,13 @@ class StatisticsCollector(abc.ABC):
             "last_invalid_packet": numpy.zeros((9000,), dtype=numpy.uint8),
         }
 
-    def process_packet(self, packet, obj=None):
+    def process_packet(self, packet):
         """Baseclass wrapper around performing parse_packet"""
 
         self.parameters["nof_packets"] += numpy.uint64(1)
 
         try:
-            self.parse_packet(packet, obj)
+            self._parse_packet(packet)
         except Exception as err:
             self.parameters["last_invalid_packet"] = numpy.frombuffer(
                 packet, dtype=numpy.uint8
@@ -77,7 +77,7 @@ class StatisticsCollector(abc.ABC):
             raise ValueError("Could not parse statistics packet") from err
 
     @abc.abstractmethod
-    def parse_packet(self, packet, obj):
+    def _parse_packet(self, packet):
         """Update any information based on this packet."""
 
         raise NotImplementedError
@@ -124,7 +124,7 @@ class SSTCollector(StatisticsCollector):
 
         return defaults
 
-    def parse_packet(self, packet, obj):
+    def _parse_packet(self, packet):
         fields = SSTPacket(packet)
 
         # determine which input this packet contains data for
@@ -265,7 +265,7 @@ class XSTCollector(StatisticsCollector):
         # prefer the first one in case of multiple minima
         return numpy.where(self.parameters["xst_timestamps"] == oldest_timestamp)[0][0]
 
-    def parse_packet(self, packet, obj=None):
+    def _parse_packet(self, packet):
         fields = XSTPacket(packet)
 
         if fields.payload_error:
@@ -466,7 +466,7 @@ class BSTCollector(StatisticsCollector):
 
         return defaults
 
-    def parse_packet(self, packet, obj=None):
+    def _parse_packet(self, packet):
         fields = BSTPacket(packet)
 
         # To get the block_index we floor divide this beamlet_index by the max amount
-- 
GitLab