diff --git a/tangostationcontrol/tangostationcontrol/integration_test/default/devices/test_device_digitalbeam.py b/tangostationcontrol/tangostationcontrol/integration_test/default/devices/test_device_digitalbeam.py index d13b16a1ef4cdfbc8e2e02d22805fa92314fb3bf..c62076477d0596d2fbf9993b9e81db69a15c12d7 100644 --- a/tangostationcontrol/tangostationcontrol/integration_test/default/devices/test_device_digitalbeam.py +++ b/tangostationcontrol/tangostationcontrol/integration_test/default/devices/test_device_digitalbeam.py @@ -36,8 +36,18 @@ class TestDeviceDigitalBeam(AbstractTestBases.TestDeviceBase): beamlet_proxy.warm_boot() beamlet_proxy.set_defaults() return beamlet_proxy + + def setup_sdp_proxy(self): + # setup SDP, on which this device depends + sdp_proxy = TestDeviceProxy("STAT/SDP/1") + sdp_proxy.off() + sdp_proxy.warm_boot() + sdp_proxy.set_defaults() + return sdp_proxy def test_pointing_to_zenith(self): + self.setup_sdp_proxy() + self.setup_recv_proxy() # Setup beamlet configuration self.beamlet_proxy.clock_RW = 200 * 1000000 self.beamlet_proxy.subband_select = list(range(488)) diff --git a/tangostationcontrol/tangostationcontrol/integration_test/default/statistics_writer/test_statistics_writer_sst.py b/tangostationcontrol/tangostationcontrol/integration_test/default/statistics_writer/test_statistics_writer_sst.py index fea84464ecb0aa0a4de0fef8423200a619da9cbb..f7f9c913c6ca6ba49a486a2afb4066be082ec7ca 100644 --- a/tangostationcontrol/tangostationcontrol/integration_test/default/statistics_writer/test_statistics_writer_sst.py +++ b/tangostationcontrol/tangostationcontrol/integration_test/default/statistics_writer/test_statistics_writer_sst.py @@ -68,10 +68,10 @@ class TestStatisticsWriterSST(BaseIntegrationTestCase): stat = stat_parser.get_statistic('2021-09-20T12:17:40.000+00:00') # same as stat_parser.statistics[0] self.assertIsNotNone(stat) self.assertEqual(121, stat.data_id_signal_input_index) - # Test RECV attributes - self.assertListEqual(stat.rcu_attenuator_dB.tolist(), [0] * 96) - self.assertListEqual(stat.rcu_band_select.tolist(), [0] * 96) - self.assertListEqual(stat.rcu_dth_on.tolist(), [False] * 96) + # RECV attributes are not present since the stats-writer is not connecting to any host + self.assertEqual(stat.rcu_attenuator_dB.tolist(), None) + self.assertEqual(stat.rcu_band_select.tolist(), None) + self.assertEqual(stat.rcu_dth_on.tolist(), None) def test_no_tango_SST_statistics(self): diff --git a/tangostationcontrol/tangostationcontrol/statistics_writer/statistics_writer.py b/tangostationcontrol/tangostationcontrol/statistics_writer/statistics_writer.py index 806dd6303e12fdc5dedf017bd67b8d04ae573ef2..49add415ca7905446488d56416c5437b994acf9e 100644 --- a/tangostationcontrol/tangostationcontrol/statistics_writer/statistics_writer.py +++ b/tangostationcontrol/tangostationcontrol/statistics_writer/statistics_writer.py @@ -139,11 +139,11 @@ def main(): logger.debug("Setting loglevel to DEBUG") # sets the Tango connection in order to retrieve attribute values - if tango_disabled: + if tango_disabled or not host: logger.warning("Tango connection is DISABLED") device = None else: - device = DeviceProxy(args.device) if mode=='SST' else None + device = DeviceProxy(f"tango://{host}:10000/{args.device}".lower()) if mode=='SST' else None # creates the TCP receiver that is given to the writer receiver = _create_receiver(filename, host, port)