Commit 9136bc23 authored by Elisabetta Giani's avatar Elisabetta Giani
Browse files

AT5-259: moved connection to capability monitor devices to instance (MID/LOW) CspMaster device.

Added ReceptorsMonitor device to MidCspMaster Device properties.
Add Piplock files to csp-lmc-common and csp-lmc-mid.
parent 34916201
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -127,7 +127,6 @@ class CspCapabilityMonitor(with_metaclass(DeviceMeta,SKABaseDevice)):
        # PROTECTED REGION ID(CspCapabilityMonitor.init_device) ENABLED START #
        self.set_state(tango.DevState.INIT)
        self._capability_fqdn = self.CapabilityDevices
        print("self._capability_fqdn:", self._capability_fqdn)
        self._capability_proxies = {}
        self._event_id = defaultdict(lambda: defaultdict(lambda: 0))
        self._capability_state = {}
+4 −5
Original line number Diff line number Diff line
@@ -623,9 +623,6 @@ class CspMaster(with_metaclass(DeviceMeta, SKAMaster)):
        """
        """
        # build the list with the Capability monitor devices
        self._capability_fqdn = [self.SearchBeamsMonitor,
                                 self.TimingBeamsMonitor,
                                 self.VlbiBeamsMonitor]
        for fqdn in self._capability_fqdn:
            try:
                self._capability_proxy[fqdn] = tango.DeviceProxy(fqdn)
@@ -1334,10 +1331,12 @@ class CspMaster(with_metaclass(DeviceMeta, SKAMaster)):
        # keys: the Capability Monitor devices FQDNs
        # values: DeviceProxy proxies
        self._capability_proxy = {}

        # _capability_fqdn: list of CapabilityMonitor FQDN devices
        self._capability_fqdn = []

        # Try connection with sub-elements
        self._connect_to_subelements()
        # start CSP Capbilities monitoring
        self._connect_capabilities_monitor()       
              
        # to use the push model in command_inout_asynch (the one with the callback parameter),
        # change the global TANGO model to PUSH_CALLBACK.
+15 −24
Original line number Diff line number Diff line
@@ -29,7 +29,7 @@ from tango.server import attribute, command
from tango.server import device_property
from tango import AttrQuality, DispLevel, DevState
from tango import AttrWriteType, PipeWriteType
from csp_lmc_common.CspBeamCapabilityBaseClass import CspBeamCapabilityBaseClass
from skabase.SKACapability import SKACapability
# Additional import
# PROTECTED REGION ID(CspSearchBeamCapability.additionnal_import) ENABLED START #
# PROTECTED REGION END #    //  CspSearchBeamCapability.additionnal_import
@@ -37,7 +37,7 @@ from csp_lmc_common.CspBeamCapabilityBaseClass import CspBeamCapabilityBaseClass
__all__ = ["CspSearchBeamCapability", "main"]


class CspSearchBeamCapability(with_metaclass(DeviceMeta, CspBeamCapabilityBaseClass)):
class CspSearchBeamCapability(with_metaclass(DeviceMeta, SKACapability)):
    """
    The class models the Capability Search Beam exsposing
     the attributes and commands used to monitor and control beamforming
@@ -64,31 +64,10 @@ class CspSearchBeamCapability(with_metaclass(DeviceMeta, CspBeamCapabilityBaseCl
    # Device Properties
    # -----------------








    # ----------
    # Attributes
    # ----------















    pssPipelineTangoAddr = attribute(
        dtype='DevString',
        label="The PSS pipeline name",
@@ -132,6 +111,11 @@ class CspSearchBeamCapability(with_metaclass(DeviceMeta, CspBeamCapabilityBaseCl
        doc="The obsMode of the PSsPipeline TANGO Device.",
    )

    subarrayMembership = attribute(
        dtype='DevUShort',
        label="The Beam Capability subarray affiliation.",
        doc="The subarray ID the CSP Beam Capability belongs to.",
    )



@@ -141,7 +125,7 @@ class CspSearchBeamCapability(with_metaclass(DeviceMeta, CspBeamCapabilityBaseCl

    def init_device(self):
        """Initialises the attributes and properties of the CspSearchBeamCapability."""
        CspBeamCapabilityBaseClass.init_device(self)
        SKACapability.init_device(self)
        # PROTECTED REGION ID(CspSearchBeamCapability.init_device) ENABLED START #
        # PROTECTED REGION END #    //  CspSearchBeamCapability.init_device

@@ -211,6 +195,11 @@ class CspSearchBeamCapability(with_metaclass(DeviceMeta, CspBeamCapabilityBaseCl
        return 0
        # PROTECTED REGION END #    //  CspSearchBeamCapability.pssPipelineObsMode_read

    def read_subarrayMembership(self):
        # PROTECTED REGION ID(CspSearchBeamCapability.subarrayMembership_read) ENABLED START #
        """Return the subarrayMembership attribute."""
        return 0
        # PROTECTED REGION END #    //  CspSearchBeamCapability.subarrayMembership_read

    # --------
    # Commands
@@ -222,9 +211,11 @@ class CspSearchBeamCapability(with_metaclass(DeviceMeta, CspBeamCapabilityBaseCl


def main(args=None, **kwargs):
    """Main function of the CspSearchBeamCapability module."""
    # PROTECTED REGION ID(CspSearchBeamCapability.main) ENABLED START #
    return run((CspSearchBeamCapability,), args=args, **kwargs)
    # PROTECTED REGION END #    //  CspSearchBeamCapability.main


if __name__ == '__main__':
    main()
+2 −2
Original line number Diff line number Diff line
FROM nexus.engageska-portugal.pt/ska-docker/ska-python-buildenv:0.2.2 AS buildenv
FROM nexus.engageska-portugal.pt/ska-docker/ska-python-runtime:0.2.2 AS runtime
FROM nexus.engageska-portugal.pt/ska-docker/ska-python-buildenv:latest AS buildenv
FROM nexus.engageska-portugal.pt/ska-docker/ska-python-runtime:latest AS runtime

# create ipython profile to so that itango doesn't fail if ipython hasn't run yet
RUN ipython profile create
+718 −0

File added.

Preview size limit exceeded, changes collapsed.

Loading