Commit f1da8522 authored by Elisabetta Giani's avatar Elisabetta Giani
Browse files

AT5-382: added attribute scanCmdProgress and associated method.

Updated decorators code to use failure instead of alarm attributes.
parent 6bb6243c
Loading
Loading
Loading
Loading
Loading
+18 −0
Original line number Diff line number Diff line
@@ -1675,6 +1675,18 @@ class CspSubarray(SKASubarray):
        return 0
        # PROTECTED REGION END #    //  CspSubarray.endScanDurationMeasured_read

    def read_removeResourcesCmdProgress(self):
        # PROTECTED REGION ID(CspSubarray.removeResourcesCmdProgress_read) ENABLED START #
        """Return the removeResourcesCmdProgress attribute."""
        return 0
        # PROTECTED REGION END #    //  CspSubarray.removeResourcesCmdProgress_read

    def read_goToIdleCmdProgress(self):
        # PROTECTED REGION ID(CspSubarray.goToIdleCmdProgress_read) ENABLED START #
        """Return the goToIdleCmdProgress attribute."""
        return 0
        # PROTECTED REGION END #    //  CspSubarray.goToIdleCmdProgress_read

    def read_endScanCmdProgress(self):
        # PROTECTED REGION ID(CspSubarray.endScanCmdProgress_read) ENABLED START #
        """Return the endScanCmdProgress attribute."""
@@ -1796,6 +1808,12 @@ class CspSubarray(SKASubarray):
        return self.PSTBeams
        # PROTECTED REGION END #    //  CspSubarray.pstBeams_read
        
    def read_scanCmdProgress(self):
        # PROTECTED REGION ID(CspSubarray.scanCmdProgress_read) ENABLED START #
        """Return the scanCmdProgress attribute."""
        return 0
        # PROTECTED REGION END #    //  CspSubarray.scanCmdProgress_read

    def read_timeoutExpiredFlag(self):
        # PROTECTED REGION ID(CspSubarray.timeoutExpiredFlag_read) ENABLED START #
        """Return the timeoutExpiredFlag attribute."""
+8 −8
Original line number Diff line number Diff line
@@ -219,10 +219,10 @@ class CmdInputArgsCheck(object):
                dev_instance.logger.debug("Processing device:", device)
                # set to QUEUED. This state can be useful in case of command abort.
                dev_instance._se_cmd_execution_state[device][cmd_to_exec] = CmdExecState.QUEUED
                # reset the timeout and alarm attribute content
                # reset the timeout and failure attribute content
                dev_instance._timeout_expired[cmd_to_exec] = False
                # TODO: how check if the alarm condition has been reset by AlarmHandler?
                dev_instance._alarm_raised[cmd_to_exec] = False
                # TODO: how check if the failure condition has been reset by AlarmHandler?
                dev_instance._failure_raised[cmd_to_exec] = False
                device_proxy = dev_instance._se_proxies[device]
                try:
                    # get the sub-element value for the onCommandDurationExpected attribute.
@@ -310,15 +310,15 @@ class SubarrayRejectCmd(object):
                                             err_msg,
                                             "SubarrayRejectCmd decorator",
                                             tango.ErrSeverity.ERR)
            # reset alarm/timeout condition
            if dev_instance._alarm_raised:
            # reset failure/timeout condition
            if dev_instance._failure_raised:
                dev_instance.logger.info(
                    "A previous alarm condition is present")
                dev_instance._alarm_raised = False
                    "A previous failure condition is present")
                dev_instance._failure_raised = False
            if dev_instance._timeout_expired:
                dev_instance.logger.info(
                    "A previous timeout condition is present")
                dev_instance._timeout_expired = False
            # TODO: how check if the alarm condition has been reset by AlarmHandler?
            # TODO: how check if the failure condition has been reset by AlarmHandler?
            return f(*args, **kwargs)
        return input_args_check
+1 −1
Original line number Diff line number Diff line
@@ -604,7 +604,7 @@
      <properties description="The progress percentage for the remove resoures command." label="Remove resources command progress percentage" unit="" standardUnit="" displayUnit="" format="" maxValue="" minValue="" maxAlarm="" minAlarm="" maxWarning="" minWarning="" deltaTime="" deltaValue=""/>
      <eventCriteria relChange="" absChange="5" period=""/>
    </attributes>
    <attributes name="gotoIdleCmdProgress" attType="Scalar" rwType="READ" displayLevel="OPERATOR" polledPeriod="1500" maxX="" maxY="" allocReadMember="true" isDynamic="false">
    <attributes name="goToIdleCmdProgress" attType="Scalar" rwType="READ" displayLevel="OPERATOR" polledPeriod="1500" maxX="" maxY="" allocReadMember="true" isDynamic="false">
      <dataType xsi:type="pogoDsl:UShortType"/>
      <changeEvent fire="false" libCheckCriteria="false"/>
      <archiveEvent fire="false" libCheckCriteria="false"/>