Loading csp-lmc-common/.gitlab-ci.yml +7 −2 Original line number Diff line number Diff line Loading @@ -21,12 +21,15 @@ script: - cd $BUILD_PATH - python setup.py egg_info -b+dev.$CI_COMMIT_SHORT_SHA sdist bdist_wheel only: # build development package only when source code changes changes: - "**/*.py" .build_python_release_common: extends: .build_python_common script: - cd $BUILD_PATH - python setup.py sdist bdist_wheel - python setup.py egg_info -b+$CI_COMMIT_SHORT_SHA sdist bdist_wheel build:csp-lmc-common_pkg_dev: # Executed on a commit extends: .build_python_dev_common Loading Loading @@ -100,7 +103,9 @@ test:csp-lmc-common: script: - cd $BUILD_PATH - twine upload --repository-url $PYPI_REPOSITORY_URL dist/* || true when: manual only: # publish development package only when source code changes changes: - "**/*.py" .publish_python_release_common: extends: .publish_python_common Loading csp-lmc-common/csp_lmc_common/CspMaster.py +37 −37 Original line number Diff line number Diff line Loading @@ -257,7 +257,7 @@ class CspMaster(SKAMaster): msg += " Desc: {}".format(evt.errors[0].desc) self.logger.error(msg) self._se_cmd_execution_state[evt.device.dev_name()][evt.cmd_name.lower()] = CmdExecState.FAILED self._alarm_message[evt.cmd_name] = msg self._failure_message[evt.cmd_name] = msg # obsState and obsMode values take on the CbfSubarray's values via # the subscribe/publish mechanism else: Loading Loading @@ -454,7 +454,7 @@ class CspMaster(SKAMaster): self._list_dev_completed_task[cmd_name] = [] self._cmd_progress[cmd_name] = 0 self._cmd_duration_measured[cmd_name] = 0 self._alarm_message[cmd_name] = '' self._failure_message[cmd_name] = '' # sub-element command execution measured time se_cmd_duration_measured = defaultdict(lambda:defaultdict(lambda:0)) # loop on the devices and power-on them sequentially Loading Loading @@ -503,8 +503,8 @@ class CspMaster(SKAMaster): # check for other sub-element FAULT values if self._se_state[device] == tango.DevState.FAULT: self._se_cmd_execution_state[device][cmd_name] = CmdExecState.FAILED self._alarm_message[cmd_name] += ("Device {} is {}".format(device, self.get_status())) self.logger.warn(self._alarm_message[cmd_name]) self._failure_message[cmd_name] += ("Device {} is {}".format(device, self.get_status())) self.logger.warn(self._failure_message[cmd_name]) num_of_failed_device += 1 break # check if sub-element command ended throwing an exception: in this case the Loading Loading @@ -576,7 +576,7 @@ class CspMaster(SKAMaster): # reset the CSP command execution flag self._cmd_execution_state[cmd_name] = CmdExecState.IDLE self._last_executed_command = cmd_name # if one or more sub-elements goes in timeout or alarm, set the CSP # if one or more sub-elements goes in timeout or failure, set the CSP # corresponding attribute for device in device_list: # reset the CSP sub-element command execution flag Loading @@ -585,7 +585,7 @@ class CspMaster(SKAMaster): self._timeout_expired[cmd_name] = True if self._se_cmd_execution_state[device][cmd_name] == CmdExecState.FAILED: # set the CSP timeout flag self._alarm_raised[cmd_name] = True self._failure_raised[cmd_name] = True # reset the CSP sub-element command execution flag self._se_cmd_execution_state[device][cmd_name] = CmdExecState.IDLE Loading Loading @@ -911,42 +911,42 @@ class CspMaster(SKAMaster): doc="Number of devices that completed the task", ) onCmdAlarm = attribute( onCmdFailure = attribute( dtype='DevBoolean', label="CBF command alarm flag", label="CBF command failure flag", polling_period=1000, doc="Alarm flag set when the On command fails with error(s).", ) onAlarmMessage = attribute( dtype='DevString', label="On execution alarm message", label="On execution failure message", doc="Alarm message when the On command fails with error(s).", ) offCmdAlarm = attribute( offCmdFailure = attribute( dtype='DevBoolean', label="Off execution alarm flag", label="Off execution failure flag", polling_period=1000, doc="Alarm flag set when the Off command fails with error(s).", ) offAlarmMessage = attribute( dtype='DevString', label="Off execution alarm message", label="Off execution failure message", doc="Alarm message when the Off command fails with error(s).", ) standbyCmdAlarm = attribute( standbyCmdFailure = attribute( dtype='DevBoolean', label="Standby execution alarm message", label="Standby execution failure message", polling_period=1000, doc="Alarm flag set when the Standby command fails with error(s).", ) standbyAlarmMessage = attribute( dtype='DevString', label="Standby execution alarm message", label="Standby execution failure message", doc="Alarm message when the Standby command fails with error(s).", ) Loading Loading @@ -1300,17 +1300,17 @@ class CspMaster(SKAMaster): # values: True/False self._timeout_expired = defaultdict(lambda: False) # _alarm_raised: report the alarm flag # _failure_raised: report the failure flag # Implemented as a dictionary # keys: command name ('on', 'off', 'standby'..) # values: True/False self._alarm_raised = defaultdict(lambda: False) self._failure_raised = defaultdict(lambda: False) # _alarm_message: report the alarm message # _failure_message: report the failure message # Implemented as a dictionary # keys: command name ('on', 'off', 'standby'..) # values: the message self._alarm_message = defaultdict(lambda: '') self._failure_message = defaultdict(lambda: '') # _list_dev_completed_task: for each long-running command report the list of subordinate # components that completed the task Loading Loading @@ -1638,40 +1638,40 @@ class CspMaster(SKAMaster): return self._num_dev_completed_task[self._last_executed_command] # PROTECTED REGION END # // CspMaster.numOfDevCompletedTask_read def read_onCmdAlarm(self): # PROTECTED REGION ID(CspMaster.onCmdAlarm_read) ENABLED START # """Return the onCmdAlarm attribute.""" return self._alarm_raised['on'] # PROTECTED REGION END # // CspMaster.onCmdAlarm_read def read_onCmdFailure(self): # PROTECTED REGION ID(CspMaster.onCmdFailure_read) ENABLED START # """Return the onCmdFailure attribute.""" return self._failure_raised['on'] # PROTECTED REGION END # // CspMaster.onCmdFailure_read def read_onAlarmMessage(self): # PROTECTED REGION ID(CspMaster.onAlarmMessage_read) ENABLED START # """Return the onAlarmMessage attribute.""" return self._alarm_message['on'] return self._failure_message['on'] # PROTECTED REGION END # // CspMaster.onAlarmMessage_read def read_offCmdAlarm(self): # PROTECTED REGION ID(CspMaster.offCmdAlarm_read) ENABLED START # """Return the offCmdAlarm attribute.""" return self._alarm_raised['off'] # PROTECTED REGION END # // CspMaster.offCmdAlarm_read def read_offCmdFailure(self): # PROTECTED REGION ID(CspMaster.offCmdFailure_read) ENABLED START # """Return the offCmdFailure attribute.""" return self._failure_raised['off'] # PROTECTED REGION END # // CspMaster.offCmdFailure_read def read_offAlarmMessage(self): # PROTECTED REGION ID(CspMaster.offAlarmMessage_read) ENABLED START # """Return the offAlarmMessage attribute.""" return self._alarm_message['off'] return self._failure_message['off'] # PROTECTED REGION END # // CspMaster.offAlarmMessage_read def read_standbyCmdAlarm(self): # PROTECTED REGION ID(CspMaster.standbyCmdAlarm_read) ENABLED START # """Return the standbyCmdAlarm attribute.""" return self._alarm_raised['standby'] # PROTECTED REGION END # // CspMaster.standbyCmdAlarm_read def read_standbyCmdFailure(self): # PROTECTED REGION ID(CspMaster.standbyCmdFailure_read) ENABLED START # """Return the standbyCmdFailure attribute.""" return self._failure_raised['standby'] # PROTECTED REGION END # // CspMaster.standbyCmdFailure_read def read_standbyAlarmMessage(self): # PROTECTED REGION ID(CspMaster.standbyAlarmMessage_read) ENABLED START # """Return the standbyAlarmMessage attribute.""" return self._alarm_message['standby'] return self._failure_message['standby'] # PROTECTED REGION END # // CspMaster.standbyAlarmMessage_read def read_cspSubarrayAddresses(self): Loading csp-lmc-common/csp_lmc_common/CspSubarray.py +122 −152 File changed.Preview size limit exceeded, changes collapsed. Show changes csp-lmc-common/csp_lmc_common/release.py +1 −1 Original line number Diff line number Diff line Loading @@ -10,7 +10,7 @@ """Release information for Python Package""" name = """csp-lmc-common""" version = "0.4.0" version = "0.4.1" version_info = version.split(".") description = """SKA CSP.LMC Common Software""" author = "INAF-OAA" Loading csp-lmc-common/docker/.release +3 −3 Original line number Diff line number Diff line Loading @@ -9,7 +9,7 @@ """Release information for Python Package""" name = """csplmc-common""" version = "0.4.0" version = "0.4.1" version_info = version.split(".") description = """SKA CSP.LMC Common Classe""" author = "E.G" Loading @@ -18,5 +18,5 @@ license = """BSD-3-Clause""" url = """www.tango-controls.org""" copyright = """""" release=0.4.0 tag=csp-lmc-common-0.4.0 release=0.4.1 tag=csp-lmc-common-0.4.1 Loading
csp-lmc-common/.gitlab-ci.yml +7 −2 Original line number Diff line number Diff line Loading @@ -21,12 +21,15 @@ script: - cd $BUILD_PATH - python setup.py egg_info -b+dev.$CI_COMMIT_SHORT_SHA sdist bdist_wheel only: # build development package only when source code changes changes: - "**/*.py" .build_python_release_common: extends: .build_python_common script: - cd $BUILD_PATH - python setup.py sdist bdist_wheel - python setup.py egg_info -b+$CI_COMMIT_SHORT_SHA sdist bdist_wheel build:csp-lmc-common_pkg_dev: # Executed on a commit extends: .build_python_dev_common Loading Loading @@ -100,7 +103,9 @@ test:csp-lmc-common: script: - cd $BUILD_PATH - twine upload --repository-url $PYPI_REPOSITORY_URL dist/* || true when: manual only: # publish development package only when source code changes changes: - "**/*.py" .publish_python_release_common: extends: .publish_python_common Loading
csp-lmc-common/csp_lmc_common/CspMaster.py +37 −37 Original line number Diff line number Diff line Loading @@ -257,7 +257,7 @@ class CspMaster(SKAMaster): msg += " Desc: {}".format(evt.errors[0].desc) self.logger.error(msg) self._se_cmd_execution_state[evt.device.dev_name()][evt.cmd_name.lower()] = CmdExecState.FAILED self._alarm_message[evt.cmd_name] = msg self._failure_message[evt.cmd_name] = msg # obsState and obsMode values take on the CbfSubarray's values via # the subscribe/publish mechanism else: Loading Loading @@ -454,7 +454,7 @@ class CspMaster(SKAMaster): self._list_dev_completed_task[cmd_name] = [] self._cmd_progress[cmd_name] = 0 self._cmd_duration_measured[cmd_name] = 0 self._alarm_message[cmd_name] = '' self._failure_message[cmd_name] = '' # sub-element command execution measured time se_cmd_duration_measured = defaultdict(lambda:defaultdict(lambda:0)) # loop on the devices and power-on them sequentially Loading Loading @@ -503,8 +503,8 @@ class CspMaster(SKAMaster): # check for other sub-element FAULT values if self._se_state[device] == tango.DevState.FAULT: self._se_cmd_execution_state[device][cmd_name] = CmdExecState.FAILED self._alarm_message[cmd_name] += ("Device {} is {}".format(device, self.get_status())) self.logger.warn(self._alarm_message[cmd_name]) self._failure_message[cmd_name] += ("Device {} is {}".format(device, self.get_status())) self.logger.warn(self._failure_message[cmd_name]) num_of_failed_device += 1 break # check if sub-element command ended throwing an exception: in this case the Loading Loading @@ -576,7 +576,7 @@ class CspMaster(SKAMaster): # reset the CSP command execution flag self._cmd_execution_state[cmd_name] = CmdExecState.IDLE self._last_executed_command = cmd_name # if one or more sub-elements goes in timeout or alarm, set the CSP # if one or more sub-elements goes in timeout or failure, set the CSP # corresponding attribute for device in device_list: # reset the CSP sub-element command execution flag Loading @@ -585,7 +585,7 @@ class CspMaster(SKAMaster): self._timeout_expired[cmd_name] = True if self._se_cmd_execution_state[device][cmd_name] == CmdExecState.FAILED: # set the CSP timeout flag self._alarm_raised[cmd_name] = True self._failure_raised[cmd_name] = True # reset the CSP sub-element command execution flag self._se_cmd_execution_state[device][cmd_name] = CmdExecState.IDLE Loading Loading @@ -911,42 +911,42 @@ class CspMaster(SKAMaster): doc="Number of devices that completed the task", ) onCmdAlarm = attribute( onCmdFailure = attribute( dtype='DevBoolean', label="CBF command alarm flag", label="CBF command failure flag", polling_period=1000, doc="Alarm flag set when the On command fails with error(s).", ) onAlarmMessage = attribute( dtype='DevString', label="On execution alarm message", label="On execution failure message", doc="Alarm message when the On command fails with error(s).", ) offCmdAlarm = attribute( offCmdFailure = attribute( dtype='DevBoolean', label="Off execution alarm flag", label="Off execution failure flag", polling_period=1000, doc="Alarm flag set when the Off command fails with error(s).", ) offAlarmMessage = attribute( dtype='DevString', label="Off execution alarm message", label="Off execution failure message", doc="Alarm message when the Off command fails with error(s).", ) standbyCmdAlarm = attribute( standbyCmdFailure = attribute( dtype='DevBoolean', label="Standby execution alarm message", label="Standby execution failure message", polling_period=1000, doc="Alarm flag set when the Standby command fails with error(s).", ) standbyAlarmMessage = attribute( dtype='DevString', label="Standby execution alarm message", label="Standby execution failure message", doc="Alarm message when the Standby command fails with error(s).", ) Loading Loading @@ -1300,17 +1300,17 @@ class CspMaster(SKAMaster): # values: True/False self._timeout_expired = defaultdict(lambda: False) # _alarm_raised: report the alarm flag # _failure_raised: report the failure flag # Implemented as a dictionary # keys: command name ('on', 'off', 'standby'..) # values: True/False self._alarm_raised = defaultdict(lambda: False) self._failure_raised = defaultdict(lambda: False) # _alarm_message: report the alarm message # _failure_message: report the failure message # Implemented as a dictionary # keys: command name ('on', 'off', 'standby'..) # values: the message self._alarm_message = defaultdict(lambda: '') self._failure_message = defaultdict(lambda: '') # _list_dev_completed_task: for each long-running command report the list of subordinate # components that completed the task Loading Loading @@ -1638,40 +1638,40 @@ class CspMaster(SKAMaster): return self._num_dev_completed_task[self._last_executed_command] # PROTECTED REGION END # // CspMaster.numOfDevCompletedTask_read def read_onCmdAlarm(self): # PROTECTED REGION ID(CspMaster.onCmdAlarm_read) ENABLED START # """Return the onCmdAlarm attribute.""" return self._alarm_raised['on'] # PROTECTED REGION END # // CspMaster.onCmdAlarm_read def read_onCmdFailure(self): # PROTECTED REGION ID(CspMaster.onCmdFailure_read) ENABLED START # """Return the onCmdFailure attribute.""" return self._failure_raised['on'] # PROTECTED REGION END # // CspMaster.onCmdFailure_read def read_onAlarmMessage(self): # PROTECTED REGION ID(CspMaster.onAlarmMessage_read) ENABLED START # """Return the onAlarmMessage attribute.""" return self._alarm_message['on'] return self._failure_message['on'] # PROTECTED REGION END # // CspMaster.onAlarmMessage_read def read_offCmdAlarm(self): # PROTECTED REGION ID(CspMaster.offCmdAlarm_read) ENABLED START # """Return the offCmdAlarm attribute.""" return self._alarm_raised['off'] # PROTECTED REGION END # // CspMaster.offCmdAlarm_read def read_offCmdFailure(self): # PROTECTED REGION ID(CspMaster.offCmdFailure_read) ENABLED START # """Return the offCmdFailure attribute.""" return self._failure_raised['off'] # PROTECTED REGION END # // CspMaster.offCmdFailure_read def read_offAlarmMessage(self): # PROTECTED REGION ID(CspMaster.offAlarmMessage_read) ENABLED START # """Return the offAlarmMessage attribute.""" return self._alarm_message['off'] return self._failure_message['off'] # PROTECTED REGION END # // CspMaster.offAlarmMessage_read def read_standbyCmdAlarm(self): # PROTECTED REGION ID(CspMaster.standbyCmdAlarm_read) ENABLED START # """Return the standbyCmdAlarm attribute.""" return self._alarm_raised['standby'] # PROTECTED REGION END # // CspMaster.standbyCmdAlarm_read def read_standbyCmdFailure(self): # PROTECTED REGION ID(CspMaster.standbyCmdFailure_read) ENABLED START # """Return the standbyCmdFailure attribute.""" return self._failure_raised['standby'] # PROTECTED REGION END # // CspMaster.standbyCmdFailure_read def read_standbyAlarmMessage(self): # PROTECTED REGION ID(CspMaster.standbyAlarmMessage_read) ENABLED START # """Return the standbyAlarmMessage attribute.""" return self._alarm_message['standby'] return self._failure_message['standby'] # PROTECTED REGION END # // CspMaster.standbyAlarmMessage_read def read_cspSubarrayAddresses(self): Loading
csp-lmc-common/csp_lmc_common/CspSubarray.py +122 −152 File changed.Preview size limit exceeded, changes collapsed. Show changes
csp-lmc-common/csp_lmc_common/release.py +1 −1 Original line number Diff line number Diff line Loading @@ -10,7 +10,7 @@ """Release information for Python Package""" name = """csp-lmc-common""" version = "0.4.0" version = "0.4.1" version_info = version.split(".") description = """SKA CSP.LMC Common Software""" author = "INAF-OAA" Loading
csp-lmc-common/docker/.release +3 −3 Original line number Diff line number Diff line Loading @@ -9,7 +9,7 @@ """Release information for Python Package""" name = """csplmc-common""" version = "0.4.0" version = "0.4.1" version_info = version.split(".") description = """SKA CSP.LMC Common Classe""" author = "E.G" Loading @@ -18,5 +18,5 @@ license = """BSD-3-Clause""" url = """www.tango-controls.org""" copyright = """""" release=0.4.0 tag=csp-lmc-common-0.4.0 release=0.4.1 tag=csp-lmc-common-0.4.1