Skip to content
Snippets Groups Projects
Commit bb492480 authored by Stefano Di Frischia's avatar Stefano Di Frischia
Browse files

L2SS-1512: fix dth and dab in state transitions

parent f2f94de2
Branches
Tags
1 merge request!736L2SS-1512: fix dth and dab in state transitions
...@@ -9,6 +9,7 @@ from integration_test import base ...@@ -9,6 +9,7 @@ from integration_test import base
from integration_test.device_proxy import TestDeviceProxy from integration_test.device_proxy import TestDeviceProxy
from tango import DevState, DeviceProxy from tango import DevState, DeviceProxy
from tangostationcontrol.common.constants import N_rcu, N_rcu_inp
from tangostationcontrol.common.case_insensitive_string import CaseInsensitiveString from tangostationcontrol.common.case_insensitive_string import CaseInsensitiveString
from tangostationcontrol.devices.base_device_classes.hierarchy_device import ( from tangostationcontrol.devices.base_device_classes.hierarchy_device import (
NotFoundException, NotFoundException,
...@@ -160,7 +161,8 @@ class TestPowerHierarchyDevice(base.IntegrationTestCase): ...@@ -160,7 +161,8 @@ class TestPowerHierarchyDevice(base.IntegrationTestCase):
self.assertEqual(self.ccd_proxy.state(), DevState.ON) self.assertEqual(self.ccd_proxy.state(), DevState.ON)
logger.info( logger.info(
f"Exceptions suppressed in test_off_to_hibernate: {self.stationmanager_proxy.last_requested_transition_exceptions_R}" "Exceptions suppressed in test_off_to_hibernate: %s",
self.stationmanager_proxy.last_requested_transition_exceptions_R,
) )
self.assertListEqual([], self._unacceptable_exceptions()) self.assertListEqual([], self._unacceptable_exceptions())
...@@ -204,7 +206,8 @@ class TestPowerHierarchyDevice(base.IntegrationTestCase): ...@@ -204,7 +206,8 @@ class TestPowerHierarchyDevice(base.IntegrationTestCase):
) )
logger.info( logger.info(
f"Exceptions suppressed: {self.stationmanager_proxy.last_requested_transition_exceptions_R}" "Exceptions suppressed: %s",
self.stationmanager_proxy.last_requested_transition_exceptions_R,
) )
self.assertListEqual([], self._unacceptable_exceptions()) self.assertListEqual([], self._unacceptable_exceptions())
...@@ -227,8 +230,19 @@ class TestPowerHierarchyDevice(base.IntegrationTestCase): ...@@ -227,8 +230,19 @@ class TestPowerHierarchyDevice(base.IntegrationTestCase):
self.assertEqual(self.sdp_proxy.state(), DevState.ON) self.assertEqual(self.sdp_proxy.state(), DevState.ON)
self.assertEqual(self.antennafield_proxy.state(), DevState.ON) self.assertEqual(self.antennafield_proxy.state(), DevState.ON)
# Test if DTH and DAB are disabled
self.assertListEqual(
self.recvh_proxy.RCU_DTH_on_R.tolist(),
[[False] * N_rcu_inp] * N_rcu,
)
self.assertListEqual(
self.antennafield_proxy.RCU_DAB_filter_on_RW.tolist(),
[False] * self.antennafield_proxy.nr_antennas_R,
)
logger.info( logger.info(
f"Exceptions suppressed: {self.stationmanager_proxy.last_requested_transition_exceptions_R}" "Exceptions suppressed: %s",
self.stationmanager_proxy.last_requested_transition_exceptions_R,
) )
self.assertListEqual([], self._unacceptable_exceptions()) self.assertListEqual([], self._unacceptable_exceptions())
...@@ -252,7 +266,8 @@ class TestPowerHierarchyDevice(base.IntegrationTestCase): ...@@ -252,7 +266,8 @@ class TestPowerHierarchyDevice(base.IntegrationTestCase):
self.assertEqual(self.antennafield_proxy.state(), DevState.OFF) self.assertEqual(self.antennafield_proxy.state(), DevState.OFF)
logger.info( logger.info(
f"Exceptions suppressed: {self.stationmanager_proxy.last_requested_transition_exceptions_R}" "Exceptions suppressed: %s",
self.stationmanager_proxy.last_requested_transition_exceptions_R,
) )
self.assertListEqual([], self._unacceptable_exceptions()) self.assertListEqual([], self._unacceptable_exceptions())
...@@ -281,7 +296,8 @@ class TestPowerHierarchyDevice(base.IntegrationTestCase): ...@@ -281,7 +296,8 @@ class TestPowerHierarchyDevice(base.IntegrationTestCase):
self.assertEqual(self.sdpfirmware_proxy.state(), DevState.OFF) self.assertEqual(self.sdpfirmware_proxy.state(), DevState.OFF)
logger.info( logger.info(
f"Exceptions suppressed: {self.stationmanager_proxy.last_requested_transition_exceptions_R}" "Exceptions suppressed: %s",
self.stationmanager_proxy.last_requested_transition_exceptions_R,
) )
self.assertListEqual([], self._unacceptable_exceptions()) self.assertListEqual([], self._unacceptable_exceptions())
......
...@@ -1075,6 +1075,12 @@ class AntennaField(LOFARDevice): ...@@ -1075,6 +1075,12 @@ class AntennaField(LOFARDevice):
# Configure the devices that process our antennas # Configure the devices that process our antennas
self.configure_recv() self.configure_recv()
self.configure_sdp() self.configure_sdp()
# Disable DAB filters for HBAs
if self.Antenna_Type == "HBA":
self.proxy.write_attribute(
"RCU_DAB_filter_on_RW",
[False] * self.read_nr_antennas_R(),
)
def _power_hardware_off(self): def _power_hardware_off(self):
# Save actual mask values # Save actual mask values
......
...@@ -388,6 +388,10 @@ class RECVDevice(OPCUADevice): ...@@ -388,6 +388,10 @@ class RECVDevice(OPCUADevice):
self.RCU_on() self.RCU_on()
self.wait_attribute("RECVTR_translator_busy_R", False, self.RCU_On_Off_timeout) self.wait_attribute("RECVTR_translator_busy_R", False, self.RCU_On_Off_timeout)
self.RCU_DTH_off()
self.wait_attribute(
"RECVTR_translator_busy_R", False, self.RCU_DTH_On_Off_timeout
)
def _power_hardware_off(self): def _power_hardware_off(self):
"""Turns off the RCUs.""" """Turns off the RCUs."""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment