diff --git a/tangostationcontrol/tangostationcontrol/devices/boot.py b/tangostationcontrol/tangostationcontrol/devices/boot.py index 3e1dbcb6f4746422e6b3b9502f32a0594c0e1b0d..d5834e231da0423df69ba48050da5abd08d8865c 100644 --- a/tangostationcontrol/tangostationcontrol/devices/boot.py +++ b/tangostationcontrol/tangostationcontrol/devices/boot.py @@ -233,7 +233,7 @@ class Boot(lofar_device): dtype='DevVarStringArray', mandatory=False, default_value=["STAT/Docker/1", # Docker controls the device containers, so it goes before anything else - "STAT/PDU/1", # PDU boot early to detect power delivery failure as fast as possible + "STAT/PSOC/1", # PSOC boot early to detect power delivery failure as fast as possible "STAT/APSPU/1", # APS Power Units control other hardware we want to initialise "STAT/APSCT/1", "STAT/RECV/1", # RCUs are input for SDP, so initialise them first diff --git a/tangostationcontrol/tangostationcontrol/devices/pdu.py b/tangostationcontrol/tangostationcontrol/devices/pdu.py index 99b4269decf0f7266141c60f17c1e8ec2128fe34..e599563fd4f1ad3120d86da937aac31f27dcc53e 100644 --- a/tangostationcontrol/tangostationcontrol/devices/pdu.py +++ b/tangostationcontrol/tangostationcontrol/devices/pdu.py @@ -3,7 +3,7 @@ # Distributed under the terms of the APACHE license. # See LICENSE.txt for more info. -""" PDU Device Server for LOFAR2.0 +""" PSOC Device Server for LOFAR2.0 """ @@ -29,11 +29,11 @@ debug.setLogger(debug.Debug('searcher', "compiler", "borrower", "reader")) logger = logging.getLogger() -__all__ = ["PDU", "main"] +__all__ = ["PSOC", "main"] @device_logging_to_python() -class PDU(lofar_device): +class PSOC(lofar_device): # ----------------- # Device Properties # ----------------- @@ -70,9 +70,9 @@ class PDU(lofar_device): # ---------- # Attributes # ---------- - sockets_state_R = attribute_wrapper(comms_annotation={"mib": "PowerNet-MIB", "name": "sPDUOutletCtl", "index": 1}, dims=(8,), datatype=str) - master_state_R = attribute_wrapper(comms_annotation={"mib": "PowerNet-MIB", "name": "sPDUMasterState"}, datatype=str) - current_load_R = attribute_wrapper(comms_annotation={"mib": "PowerNet-MIB", "name": "rPDULoadStatusLoad", "index": 1}, datatype=numpy.int64) + sockets_state_R = attribute_wrapper(comms_annotation={"mib": "PowerNet-MIB", "name": "sPSOCOutletCtl", "index": 1}, dims=(8,), datatype=str) + master_state_R = attribute_wrapper(comms_annotation={"mib": "PowerNet-MIB", "name": "sPSOCMasterState"}, datatype=str) + current_load_R = attribute_wrapper(comms_annotation={"mib": "PowerNet-MIB", "name": "rPSOCLoadStatusLoad", "index": 1}, datatype=numpy.int64) uptime_R = attribute_wrapper(comms_annotation={"mib": "SNMPv2-MIB", "name": "sysUpTime"}, datatype=numpy.int64) # -------- @@ -116,7 +116,7 @@ class PDU(lofar_device): def _toggle_socket(self, socket_name, on: bool): """ - This function is tailored to the "APS switched rack PDU", changing the psoc will require some changes to this function + This function is tailored to the "APS switched rack PSOC", changing the psoc will require some changes to this function """ try: @@ -131,7 +131,7 @@ class PDU(lofar_device): socket_set = "outletOff" # create the snmp_attribute for the correct socket - attr = snmp_attribute(self.snmp_manager.SNMP_comm, "PowerNet-MIB", name="sPDUOutletCtl", idx=socket_nr, dtype=str, dim_x=1, dim_y=0) + attr = snmp_attribute(self.snmp_manager.SNMP_comm, "PowerNet-MIB", name="sPSOCOutletCtl", idx=socket_nr, dtype=str, dim_x=1, dim_y=0) # write the correct value attr.write_function([socket_set]) @@ -189,5 +189,5 @@ class PDU(lofar_device): # Run server # ---------- def main(**kwargs): - """Main function of the PDU module.""" - return entry(PDU, **kwargs) + """Main function of the PSOC module.""" + return entry(PSOC, **kwargs) diff --git a/tangostationcontrol/tangostationcontrol/devices/temperature_manager.py b/tangostationcontrol/tangostationcontrol/devices/temperature_manager.py index b4671a47ee7819acc551562cd0e0f224acdc0448..912753f82c655a65d785af891fbf03222db86c3b 100644 --- a/tangostationcontrol/tangostationcontrol/devices/temperature_manager.py +++ b/tangostationcontrol/tangostationcontrol/devices/temperature_manager.py @@ -153,7 +153,7 @@ class TemperatureManager(lofar_device): DeviceProxy("STAT/RECV/1").off() DeviceProxy("STAT/APSCT/1").off() DeviceProxy("STAT/APSPU/1").off() - DeviceProxy("STAT/PDU/1").off() + DeviceProxy("STAT/PSOC/1").off() logger.warning(f"Temperature alarm triggered auto shutdown of all hardware devices") # ---------- diff --git a/tangostationcontrol/tangostationcontrol/integration_test/default/devices/test_device_pdu.py b/tangostationcontrol/tangostationcontrol/integration_test/default/devices/test_device_pdu.py index 661c21c88d31d4306eea879d147374d90109162f..e1c3f2b20ad275542b186337adceaa2eed13eec7 100644 --- a/tangostationcontrol/tangostationcontrol/integration_test/default/devices/test_device_pdu.py +++ b/tangostationcontrol/tangostationcontrol/integration_test/default/devices/test_device_pdu.py @@ -10,10 +10,10 @@ from tangostationcontrol.integration_test.default.devices.base import AbstractTestBases -class TestDevicePDU(AbstractTestBases.TestDeviceBase): +class TestDevicePSOC(AbstractTestBases.TestDeviceBase): def setUp(self): - super().setUp("STAT/PDU/1") + super().setUp("STAT/PSOC/1") def test_device_read_all_attributes(self): """Mask reading attributes not possible without SNMP""" diff --git a/tangostationcontrol/tangostationcontrol/integration_test/default/devices/test_device_temperature_manager.py b/tangostationcontrol/tangostationcontrol/integration_test/default/devices/test_device_temperature_manager.py index 198a4cba29453a2e60665362edfa44b1cc52f63f..7944ac7434b94ad2268f642a711470ac2190640f 100644 --- a/tangostationcontrol/tangostationcontrol/integration_test/default/devices/test_device_temperature_manager.py +++ b/tangostationcontrol/tangostationcontrol/integration_test/default/devices/test_device_temperature_manager.py @@ -60,7 +60,7 @@ class TestDeviceTemperatureManager(AbstractTestBases.TestDeviceBase): self.proxy.on() devices = [DeviceProxy("STAT/SDP/1"), DeviceProxy("STAT/UNB2/1"), DeviceProxy("STAT/RECV/1"), - DeviceProxy("STAT/APSCT/1"), DeviceProxy("STAT/APSPU/1"), DeviceProxy("STAT/PDU/1")] + DeviceProxy("STAT/APSCT/1"), DeviceProxy("STAT/APSPU/1"), DeviceProxy("STAT/PSOC/1")] # make sure none of the devices are in the OFF state. Any other state is fine for dev in devices: diff --git a/tangostationcontrol/tangostationcontrol/test/devices/test_pdu_device.py b/tangostationcontrol/tangostationcontrol/test/devices/test_pdu_device.py index 7ae03cbeaea266c7017c17566c77db4e52d77e1a..f6951904d8f09b9279bcb48d2fd3a744cf4d65fa 100644 --- a/tangostationcontrol/tangostationcontrol/test/devices/test_pdu_device.py +++ b/tangostationcontrol/tangostationcontrol/test/devices/test_pdu_device.py @@ -10,7 +10,7 @@ from tangostationcontrol.test.devices import device_base -class TestPDUDevice(device_base.DeviceTestCase): +class TestPSOCDevice(device_base.DeviceTestCase): # some dummy values for mandatory properties @@ -28,4 +28,4 @@ class TestPDUDevice(device_base.DeviceTestCase): def setUp(self): # DeviceTestCase setUp patches lofar_device DeviceProxy - super(TestPDUDevice, self).setUp() + super(TestPSOCDevice, self).setUp()