Skip to content
Snippets Groups Projects
Commit 60620dc6 authored by Jan David Mol's avatar Jan David Mol
Browse files

L2SS-1356: Remove unused StationSSTCollector that queries RECV for every packet

parent a7fb6bd8
No related branches found
No related tags found
1 merge request!46L2SS-1356: Remove unused StationSSTCollector that queries RECV for every packet
Pipeline #49890 passed
...@@ -105,6 +105,7 @@ tox -e debug tests.requests.test_prometheus ...@@ -105,6 +105,7 @@ tox -e debug tests.requests.test_prometheus
``` ```
## Releasenotes ## Releasenotes
- 0.14.6 - Removed deprecated StationSSTCollector
- 0.14.5 - Added `gn_indices` and support for global node indices > 16. - 0.14.5 - Added `gn_indices` and support for global node indices > 16.
- 0.14.4 - Fixed bug on `writer_version` retrieval - 0.14.4 - Fixed bug on `writer_version` retrieval
- 0.14.3 - Added `rcu_pcb_id` and `rcu_pcb_version` to Hdf5 file header - 0.14.3 - Added `rcu_pcb_id` and `rcu_pcb_version` to Hdf5 file header
......
0.14.5 0.14.6
...@@ -16,7 +16,6 @@ import abc ...@@ -16,7 +16,6 @@ import abc
import logging import logging
import numpy 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_from_index
from lofar_station_client.math.baseline import baseline_index from lofar_station_client.math.baseline import baseline_index
...@@ -505,49 +504,3 @@ class BSTCollector(StatisticsCollector): ...@@ -505,49 +504,3 @@ class BSTCollector(StatisticsCollector):
self.parameters["integration_intervals"][ self.parameters["integration_intervals"][
block_index block_index
] = fields.integration_interval() ] = 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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment