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.

CspSubElementSubarray

Subarray device for SKA CSP SubElement

Tango Device Class

class ska_tango_base.CspSubElementSubarray(*args: Any, **kwargs: Any)[source]

Subarray device for SKA CSP SubElement

scanID = tango.server.attribute(dtype=DevULong64, label=scanID, doc=The scan identification number to be inserted in the output products.)

Device attribute.

configurationID = tango.server.attribute(dtype=DevString, label=configurationID, doc=The configuration ID specified into the JSON configuration.)

Device attribute.

sdpDestinationAddresses = tango.server.attribute(dtype=DevString, access=tango.AttrWriteType.READ_WRITE, label=sdpDestinationAddresses, doc=JSON formatted string. Report the list of all the SDP addresses provided by SDP to receive the output products. Specifies the Mac, IP, Port for each resource:CBF visibility channels, Pss pipelines, PSTBeam)

Device attribute.

outputDataRateToSdp = tango.server.attribute(dtype=DevFloat, label=outputDataRateToSdp, unit=GB/s, doc=The output data rate (GB/s) on the link for each scan.)

Device attribute.

lastScanConfiguration = tango.server.attribute(dtype=DevString, label=lastScanConfiguration, doc=The last valid scan configuration.)

Device attribute.

sdpLinkActive = tango.server.attribute(dtype=('DevBoolean',), max_dim_x=100, label=sdpLinkActive, doc=Flag reporting if the SDP links are active.)

Device attribute.

listOfDevicesCompletedTasks = tango.server.attribute(dtype=DevString, label=listOfDevicesCompletedTasks, doc=JSON formatted string reporting for each task/command the list of devices that completed successfully the task. Ex. {``cmd1``: [``device1``, ``device2``], ``cmd2``: [``device2``, ``device3``]})

Device attribute.

configureScanMeasuredDuration = tango.server.attribute(dtype=DevFloat, label=configureScanMeasuredDuration, unit=sec, doc=The measured time (sec) taken to execute the command)

Device attribute.

configureScanTimeoutExpiredFlag = tango.server.attribute(dtype=DevBoolean, label=configureScanTimeoutExpiredFlag, doc=Flag reporting  ConfigureScan command timeout expiration.)

Device attribute.

assignResourcesMaximumDuration = tango.server.attribute(dtype=DevFloat, access=tango.AttrWriteType.READ_WRITE, label=assignResourcesMaximumDuration, unit=sec, doc=The maximum expected command duration.)

Device attribute.

assignResourcesMeasuredDuration = tango.server.attribute(dtype=DevFloat, label=assignResourcesMeasuredDuration, unit=sec, doc=The measured command execution duration.)

Device attribute.

assignResourcesProgress = tango.server.attribute(dtype=DevUShort, label=assignResourcesProgress, max_value=100, min_value=0, doc=The percentage progress of the command in the [0,100].)

Device attribute.

assignResourcesTimeoutExpiredFlag = tango.server.attribute(dtype=DevBoolean, label=assignResourcesTimeoutExpiredFlag, doc=Flag reporting  AssignResources command timeout expiration.)

Device attribute.

releaseResourcesMaximumDuration = tango.server.attribute(dtype=DevFloat, access=tango.AttrWriteType.READ_WRITE, label=releaseResourcesMaximumDuration, unit=sec, doc=The maximum expected command duration.)

Device attribute.

releaseResourcesMeasuredDuration = tango.server.attribute(dtype=DevFloat, label=releaseResourcesMeasuredDuration, unit=sec, doc=The measured command execution duration.)

Device attribute.

releaseResourcesProgress = tango.server.attribute(dtype=DevUShort, label=releaseResourcesProgress, max_value=100, min_value=0, doc=The percentage progress of the command in the [0,100].)

Device attribute.

releaseResourcesTimeoutExpiredFlag = tango.server.attribute(dtype=DevBoolean, label=timeoutExpiredFlag, doc=Flag reporting  command timeout expiration.)

Device attribute.

init_command_objects()[source]

Sets up the command objects

class InitCommand(target, state_model, logger=None)[source]

A class for the CspSubElementObsDevice’s init_device() “command”.

Create a new InitCommand

Parameters
  • target (object) – the object that this command acts upon; for example, the SKASubarray device for which this class implements the command

  • state_model (DeviceStateModel) – the state model that this command uses to check that it is allowed to run, and that it drives with actions.

  • logger (a logger that implements the standard library logger interface) – the logger to be used by this Command. If not provided, then a default module logger will be used.

do()[source]

Stateless hook for device initialisation.

Returns

A tuple containing a return code and a string message indicating status. The message is for information purpose only.

Return type

(ResultCode, str)

always_executed_hook()[source]

Method always executed before any TANGO command is executed.

delete_device()[source]

Hook to delete resources allocated in init_device.

This method allows for any memory or other resources allocated in the init_device method to be released. This method is called by the device destructor and by the device Init command.

read_scanID()[source]

Return the scanID attribute.

read_configurationID()[source]

Return the configurationID attribute.

read_sdpDestinationAddresses()[source]

Return the sdpDestinationAddresses attribute.

write_sdpDestinationAddresses(value)[source]

Set the sdpDestinationAddresses attribute.

read_outputDataRateToSdp()[source]

Return the outputDataRateToSdp attribute.

read_lastScanConfiguration()[source]

Return the lastScanConfiguration attribute.

read_configureScanMeasuredDuration()[source]

Return the configureScanMeasuredDuration attribute.

read_configureScanTimeoutExpiredFlag()[source]

Return the configureScanTimeoutExpiredFlag attribute.

read_listOfDevicesCompletedTasks()[source]

Return the listOfDevicesCompletedTasks attribute.

read_assignResourcesMaximumDuration()[source]

Return the assignResourcesMaximumDuration attribute.

write_assignResourcesMaximumDuration(value)[source]

Set the assignResourcesMaximumDuration attribute.

read_assignResourcesMeasuredDuration()[source]

Return the assignResourcesMeasuredDuration attribute.

read_assignResourcesProgress()[source]

Return the assignResourcesProgress attribute.

read_assignResourcesTimeoutExpiredFlag()[source]

Return the assignResourcesTimeoutExpiredFlag attribute.

read_releaseResourcesMaximumDuration()[source]

Return the releaseResourcesMaximumDuration attribute.

write_releaseResourcesMaximumDuration(value)[source]

Set the releaseResourcesMaximumDuration attribute.

read_releaseResourcesMeasuredDuration()[source]

Return the releaseResourcesMeasuredDuration attribute.

read_releaseResourcesProgress()[source]

Return the releaseResourcesProgress attribute.

read_releaseResourcesTimeoutExpiredFlag()[source]

Return the releaseResourcesTimeoutExpiredFlag attribute.

read_sdpLinkActive()[source]

Return the sdpLinkActive attribute.

class ConfigureScanCommand(target, state_model, logger=None)[source]

A class for the CspSubElementObsDevices’s ConfigureScan command.

Constructor for ConfigureScanCommand

Parameters
  • target (object) – the object that this command acts upon; for example, the CspSubElementObsDevice device for which this class implements the command

  • state_model (SKASubarrayStateModel) – the state model that this command uses to check that it is allowed to run, and that it drives with actions.

  • logger (a logger that implements the standard library logger interface) – the logger to be used by this Command. If not provided, then a default module logger will be used.

do(argin)[source]

Stateless hook for ConfigureScan() command functionality.

Parameters

argin (str) – The configuration as JSON formatted string

Returns

A tuple containing a return code and a string message indicating status. The message is for information purpose only.

Return type

(ResultCode, str)

validate_input(argin)[source]

Validate the configuration parameters against allowed values, as needed. :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)

class GoToIdleCommand(target, state_model, logger=None)[source]

A class for the CspSubElementObsDevices’s GoToIdle command.

Constructor for GoToIdle Command.

Parameters
  • target (object) – the object that this command acts upon; for example, the CspSubElementObsDevice device for which this class implements the command

  • state_model (SKASubarrayStateModel) – the state model that this command uses to check that it is allowed to run, and that it drives with actions.

  • logger (a logger that implements the standard library logger interface) – the logger to be used by this Command. If not provided, then a default module logger will be used.

do()[source]

Stateless hook for GoToIdle() command functionality.

Returns

A tuple containing a return code and a string message indicating status. The message is for information purpose only.

Return type

(ResultCode, str)

ConfigureScan(argin)[source]

Configure a complete scan for the subarray.

Parameters

argin ('DevString') – JSON formatted string with the scan configuration.

Returns

A tuple containing a return code and a string message indicating status. The message is for information purpose only.

Return type

(ResultCode, str)

Configure(argin)[source]

Redirect to ConfigureScan method. Configure a complete scan for the subarray.

:return:’DevVarLongStringArray’

A tuple containing a return code and a string message indicating status. The message is for information purpose only.

GoToIdle()[source]

Transit the subarray from READY to IDLE obsState.

:return:’DevVarLongStringArray’

A tuple containing a return code and a string message indicating status. The message is for information purpose only.

End()[source]

Transit the subarray from READY to IDLE obsState. Redirect to GoToIdle command.

:return:’DevVarLongStringArray’

A tuple containing a return code and a string message indicating status. The message is for information purpose only.