diff --git a/devices/clients/sst_client.py b/devices/clients/sst_client.py index 17aad5dae1b3400f0e7f8d305d719c7a461ecb10..a63b0406733077a6c23e99b14407deba7a7693c0 100644 --- a/devices/clients/sst_client.py +++ b/devices/clients/sst_client.py @@ -202,7 +202,7 @@ class SST_collector(Thread): super().join(timeout) def process_packet(self, packet): - self.parameters["nof_packets"] += 1 + self.parameters["nof_packets"] += numpy.uint64(1) self.parameters["last_packet_timestamp"] = numpy.uint64(int(time.time())) self.parameters["queue_fill_percentage"] = numpy.double(100 * self.queue.qsize() / self.queue.maxsize if self.queue.maxsize else 0) @@ -210,28 +210,28 @@ class SST_collector(Thread): fields = StatisticsPacket(packet) except ValueError: # could not parse header - self.parameters["nof_invalid_packets"] += 1 + self.parameters["nof_invalid_packets"] += numpy.uint64(1) return if fields.marker != 'S': # packet is not SST - self.parameters["nof_invalid_packets"] += 1 + self.parameters["nof_invalid_packets"] += numpy.uint64(1) return input_index = fields.sst_signal_input_index if input_index >= self.MAX_INPUTS: # packet describes an input that is out of bounds for us - self.parameters["nof_invalid_packets"] += 1 + self.parameters["nof_invalid_packets"] += numpy.uint64(1) return if fields.payload_error: # cannot trust the data if a payload error is reported - self.parameters["nof_payload_errors"][input_index] += 1 + self.parameters["nof_payload_errors"][input_index] += numpy.uint64(1) return # process the packet - self.parameters["nof_valid_packets"][input_index] += 1 + self.parameters["nof_valid_packets"][input_index] += numpy.uint64(1) self.parameters["last_values"][input_index][:fields.nof_statistics_per_packet] = fields.payload_sst self.parameters["last_timestamps"][input_index] = numpy.float64(fields.timestamp().timestamp()) self.parameters["integration_intervals"][input_index] = fields.integration_interval()