diff --git a/lofar_station_client/statistics/collector.py b/lofar_station_client/statistics/collector.py index 28b0971c964a31eca6322eb49cf3cc46d59dd58f..dff6bc84acd719bf048d069fadf29fbf4406c8bd 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