From 60620dc600cf0abddcc46652e7a75e82ea16058d Mon Sep 17 00:00:00 2001 From: Jan David Mol <mol@astron.nl> Date: Tue, 16 May 2023 16:09:51 +0200 Subject: [PATCH] L2SS-1356: Remove unused StationSSTCollector that queries RECV for every packet --- README.md | 1 + VERSION | 2 +- lofar_station_client/statistics/collector.py | 47 -------------------- 3 files changed, 2 insertions(+), 48 deletions(-) diff --git a/README.md b/README.md index 5a0ffa2..a57bd01 100644 --- a/README.md +++ b/README.md @@ -105,6 +105,7 @@ tox -e debug tests.requests.test_prometheus ``` ## Releasenotes +- 0.14.6 - Removed deprecated StationSSTCollector - 0.14.5 - Added `gn_indices` and support for global node indices > 16. - 0.14.4 - Fixed bug on `writer_version` retrieval - 0.14.3 - Added `rcu_pcb_id` and `rcu_pcb_version` to Hdf5 file header diff --git a/VERSION b/VERSION index 436d0ce..226468e 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.14.5 +0.14.6 diff --git a/lofar_station_client/statistics/collector.py b/lofar_station_client/statistics/collector.py index 55fbc70..18bc27b 100644 --- a/lofar_station_client/statistics/collector.py +++ b/lofar_station_client/statistics/collector.py @@ -16,7 +16,6 @@ import abc import logging import numpy -from tango import DeviceProxy, DevState, DevFailed from lofar_station_client.math.baseline import baseline_from_index from lofar_station_client.math.baseline import baseline_index @@ -505,49 +504,3 @@ class BSTCollector(StatisticsCollector): self.parameters["integration_intervals"][ block_index ] = fields.integration_interval() - - -class DeviceCollectorInterface(abc.ABC): - """Small interface for deviceproxy enabled collectors""" - - def __init__(self, device: DeviceProxy = None): - self.device = device - - @abc.abstractmethod - def parse_device_attributes(self): - """Update information based on device attributes""" - raise NotImplementedError - - -class StationSSTCollector(DeviceCollectorInterface, SSTCollector): - """Collects attribute parameters from station""" - - def __init__(self, device: DeviceProxy = None): - """Manually combine the constructors with appropriate arguments""" - - DeviceCollectorInterface.__init__(self, device=device) - SSTCollector.__init__(self) - - def _parse_packet(self, packet): - super()._parse_packet(packet) - - # add tango values to packet - self.parse_device_attributes() - - def parse_device_attributes(self): - # If Tango connection has been disabled, set explicitly to None, - # because otherwise default_values are inserted - if not self.device or self.device.state() != DevState.ON: - self.parameters["rcu_attenuator_dB"] = None - self.parameters["rcu_band_select"] = None - self.parameters["rcu_dth_on"] = None - else: - try: - self.parameters["rcu_attenuator_dB"] = self.device.RCU_Attenuator_dB_R - self.parameters["rcu_band_select"] = self.device.RCU_Band_Select_R - self.parameters["rcu_dth_on"] = self.device.RCU_DTH_on_R - except DevFailed: - logger.warning("Device: %s not responding.", self.device.name()) - self.parameters["rcu_attenuator_dB"] = None - self.parameters["rcu_band_select"] = None - self.parameters["rcu_dth_on"] = None -- GitLab