From 1fec15baee7d7544dfe7cc0d1613f6aba4fbe102 Mon Sep 17 00:00:00 2001 From: toor <elisabetta.giani@inaf.it> Date: Mon, 16 Nov 2020 08:37:02 +0100 Subject: [PATCH] CT-126: Added documentation. --- docs/source/CspSubElementSubarray.rst | 19 +++++++++++++++++++ docs/source/index.rst | 1 + setup.py | 1 + src/ska/base/csp_subelement_subarray.py | 13 ++++--------- 4 files changed, 25 insertions(+), 9 deletions(-) create mode 100644 docs/source/CspSubElementSubarray.rst diff --git a/docs/source/CspSubElementSubarray.rst b/docs/source/CspSubElementSubarray.rst new file mode 100644 index 00000000..3eeacf60 --- /dev/null +++ b/docs/source/CspSubElementSubarray.rst @@ -0,0 +1,19 @@ +.. LMC Base Classes documentation master file, created by + sphinx-quickstart on Fri Jan 11 10:03:42 2019. + You can adapt this file completely to your liking, but it should at least + contain the root `toctree` directive. + +SKA CSP Sub-element Subarray +============================================ +This module implements a generic Subarray device for a CSP Sub-element. +The scope of this module is to provide a uniform access to a CSP Sub-element +subarray from the CSP.LMC side. + + +.. toctree:: + :maxdepth: 2 + +.. automodule:: ska.base.csp_subelement_subarray +.. autoclass:: ska.base.CspSubElementSubarray + :members: + :undoc-members: diff --git a/docs/source/index.rst b/docs/source/index.rst index 241bd9bf..6f75ef50 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -21,6 +21,7 @@ Welcome to LMC Base Classes documentation! Device: SKA Subarray<SKASubarray> Device: SKA CSP Sub-element Master<CspSubElementMaster> + Device: SKA CSP Sub-element Subarray<CspSubElementSubarray> SKA Control Model<Control_Model> SKA Commands<Commands> diff --git a/setup.py b/setup.py index 3377cef2..a8c1f930 100644 --- a/setup.py +++ b/setup.py @@ -49,6 +49,7 @@ setuptools.setup( "SKASubarray=ska.base.subarray_device:main", "SKATelState=ska.base.tel_state_device:main", "CspSubelementMaster=ska.base.csp_subelement_master:main", + "CspSubelementSubarray=ska.base.csp_subelement_subarray:main", ] }, keywords="lmc base classes ska", diff --git a/src/ska/base/csp_subelement_subarray.py b/src/ska/base/csp_subelement_subarray.py index 984b1545..4da2dd82 100644 --- a/src/ska/base/csp_subelement_subarray.py +++ b/src/ska/base/csp_subelement_subarray.py @@ -38,10 +38,6 @@ __all__ = ["CspSubElementSubarray", "main"] class CspSubElementSubarray(SKASubarray): """ Subarray device for SKA CSP SubElement - - **Properties:** - - - Device Property """ # PROTECTED REGION ID(CspSubElementSubarray.class_variable) ENABLED START # # PROTECTED REGION END # // CspSubElementSubarray.class_variable @@ -232,7 +228,7 @@ class CspSubElementSubarray(SKASubarray): # configure the flag to push event from the device server device.set_change_event('timeoutExpiredFlag', True, True) - message = "CspSubElementSubarray Init comma,nd completed OK" + message = "CspSubElementSubarray Init command completed OK" device.logger.info(message) return (ResultCode.OK, message) @@ -305,7 +301,7 @@ class CspSubElementSubarray(SKASubarray): def read_configureScanMeasuredDuration(self): # PROTECTED REGION ID(CspSubElementSubarray.configureScanMeasuredDuration_read) ENABLED START # """Return the configureScanMeasuredDuration attribute.""" - return 0.0 + return self._cmd_measured_duration['configurescan'] # PROTECTED REGION END # // CspSubElementSubarray.configureScanMeasuredDuration_read def read_listOfDevicesCompletedTasks(self): @@ -427,9 +423,8 @@ class CspSubElementSubarray(SKASubarray): def validate_configuration_data(self, argin): """ Validate the configuration parameters against allowed values, as needed. - :param argin: - The JSON formatted string with configuration for the device. - : type argin: 'DevString' + :param argin: The JSON formatted string with configuration for the device. + :type argin: 'DevString' :return: A tuple containing a return code and a string message. :rtype: (ResultCode, str) """ -- GitLab