CspSubarray

class ska_csp_lmc_common.subarray_device.CspSubarray(*args: Any, **kwargs: Any)

CSP subarray functionality is modeled via a TANGO CSP.LMC Common Class for the CSPSubarray TANGO Device.

Device Properties

CspController
  • The TANGO address of the CspController.

  • Type:’DevString’

CbfSubarray
  • CBF sub-element sub-array TANGO device FQDN

  • Type:’DevString’

PssSubarray
  • PST sub-element sub-array TANGO device FQDN.

  • Type:’DevString’

PstBeams
  • PST sub-element PstBeams TANGO devices FQDNs

  • Type:’DevVarStringArray’

init_device() None

Override the Base Classes init_device method to change the asynchronous callback sub-model from pull to push sub-model.

_init_state_model() None

Override the health, operational and observing State models:

current CSP.LMC implementation does no longer rely on the SKA State models and associated State Machine library.

class CspSubmittedSlowCommand(*args: Any, **kwargs: Any)

Specialize the the SKA SubmittedSlowCommand class for CSP.LMC long running commands.

init_command_with_validator(_callback, validator=<class 'ska_csp_lmc_common.subarray.json_schema_validator.CspJsonValidator'>, schema=None)

Set up command objects with the Json Validator

init_command_objects() None

Set up the command objects.

class ForceHealthStateCommand(*args: Any, **kwargs: Any)

A class for CSP.LMC Subarray’s ForceHealthState() command.

do(argin: bool) tuple[ska_tango_base.commands.ResultCode, str]

Stateless hook for ForceHealthState() command functionality.

Parameters:
  • args – positional arguments to the command. This command does not take any, so this should be empty.

  • kwargs – keyword arguments to the command. This command does not take any, so this should be empty.

Returns:

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

set_component_manager(cm_configuration: ComponentManagerConfiguration) CSPSubarrayComponentManager

Configure the ComponentManager for the CspSubarray TANGO device.

This method has to be specialized in Mid.CSP and Low.CSP.

Parameters:

cm_configuration (ComponentManagerConfiguration) – A class with all the device properties accessible as attributes

create_component_manager() CSPSubarrayComponentManager

Override the SKA BC method.

Returns:

The CSP SubarrayComponentManager

Return type:

:py:class`CSPSubarrayComponentManager`

class InitCommand(*args: Any, **kwargs: Any)

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

do() Tuple[ska_tango_base.commands.ResultCode, str]

Stateless hook for device initialization.

Returns:

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

is_GoToIdle_allowed() bool

Return whether the GoToIdle command may be called in the current device state.

Raises:

StateModelError – command not permitted in observation state

Returns:

whether the command may be called in the current device state

is_Reset_allowed() bool

Return whether the Reset command may be called in the current device state.

Returns:

whether the command may be called in the current device state

is_AbortCommands_allowed() bool

Execution of AbortCommands is disabled for CSPSubarray. An exception is raised every time that the command is invoked

update_subarray_state(value: tango.DevState) None

Update the CSP Subarray state to the value from the aggregation of CSP Subarray subordinate components’ states. Update is performed only when no CSP command is running.

The method re-calculate the CSP Subarray healthState as result of the State change in one or more CSP Subarray sub-systems.

Parameters:

value – the CSP Subarray state calculated aggregating the state of the CSP Subarray sub-systems

update_subarray_health_state(value: ska_control_model.HealthState) None

Method invoked when a change happens in the CSP healthState.

Parameters:

value – the updated value via events

update_subarray_obs_state(value: ska_control_model.ObsState) None

Update the CSP Subarray obsState to the value returned by the EventManager that aggregates the obsState of the CSP Subarray subordinate components. Update is performed only when no CSP command is running.

Parameters:

value – the updated value via events

update_property(property_name: str, property_value: Any) None

General method invoked by the SubarrayComponentManager to push an event on a device attribute properly configured to push events from the device.

Parameters:
  • property_name – the TANGO attribute name

  • property_value – the attribute value

_update_csp_command_result(command_id: str, command_result: tuple[ska_tango_base.commands.ResultCode, str]) None

Method to update the result code returned from a task execution. On updating, the device pushes archive and change events.

Parameters:
  • command_id – the ID of the CSP task as returned from the CommandTracker.

  • command_result – the tuple with result code and message returned when the task completes.

_update_command_result(command_id: str, command_result: tuple[ska_tango_base.commands.ResultCode, str]) None
testAlarm(argin: bool) None

Set the flag to test the alarm in CSP.LMC AlarmHandler

Parameters:

argin – True/False

configurationID() str

Report the configuration ID string.

return: a string with the ID of the received configuration

when correctly validated, otherwise an empty string.

always_executed_hook()

Method always executed before any TANGO command is executed.

delete_device() None

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.

buildState() str

Read the Build State of the device.

Returns:

the build state of the device

versionId() str

Read the Version Id of the device.

Returns:

the version id of the device

read_adminMode()

Read the Admin Mode of the device.

Returns:

Admin Mode of the device

Return type:

AdminMode

write_adminMode(value: ska_control_model.AdminMode) None

Set the administration mode for the whole CSP element.

Parameters:

value (AdminMode) – one of the administration mode value (ON-LINE, OFF-LINE, MAINTENANCE, NOT-FITTED, RESERVED).

read_scanID() int

Return the scanID attribute.

Returns:

the Subarray scanID

write_scanID(value: int) None

Set the scanID attribute.

:param The Subarray scanID

read_cbfSubarrayState() tango.DevState

Return the state of the CBF Subarray.

Returns:

The correspondent CBF Subarray Operational State

read_pssSubarrayState() tango.DevState

Return the state of the PSS Subarray, if deployed. If the PSS sub-system is not deployed, the state is reported as UNKNOWN.

Returns:

The correspondent PSS Subarray Operational State

read_cbfSubarrayHealthState() ska_control_model.HealthState

Return the health state of the CBF Subarray.

Returns:

The correspondent CBF Subarray Health State

read_pssSubarrayHealthState() ska_control_model.HealthState

Return the health state of the PSS Subarray. If the PSS sub-system is not deployed, the health state is reported as UNKNOWN.

Returns:

The correspondent PSS Subarray Health State

read_cbfSubarrayAdminMode() ska_control_model.AdminMode

Return admin mode of the CBF subarray. If the sub-system is not deployed, the admin mode is reported as NOT_FITTED.

Returns:

The correspondent CBF Subarray Administration Mode

read_pssSubarrayAdminMode() ska_control_model.AdminMode

Return admin mode of the PSS subarray. If the sub-system is not deployed, the admin mode is reported as NOT_FITTED.

Returns:

The correspondent PSS Subarray Administration Mode

read_cbfSubarrayObsState() ska_control_model.ObsState

Return the cbfSubarrayObsState attribute.

Returns:

The correspondent CBF Subarray Observing State

read_pssSubarrayObsState() ska_control_model.ObsState

Return the pssSubarrayObsState attribute.

Returns:

The correspondent PSS Subarray Observational State

read_pssSubarrayAddress() str

Return the pssSubarrayAddress attribute.

Returns:

The PSS sub-element sub-array FQDN.

read_cbfSubarrayAddress() str

Return the cbfSubarrayAddress attribute.

Returns:

The CBF sub-element sub-array FQDN.

read_validScanConfiguration() str

Return the validScanConfiguration attribute.

Returns:

the JSON string containing the last valid scan configuration.

read_commandTimeout() int

Return the commandTimeout attribute.

Returns:

The duration of the command timeout.

write_commandTimeout(value)

Set the value of the command timeout.

Configure the timeout applied to each command. The specified value shall be > 0.

Negative values raise a TypeError exception. This is the expected behavior because the attribute has been defined as DevUShort. A zero value raises a ValueError exception.

Raises:

TypeError or tango.DevFailed depending on whether the specified value is negative or zero if a negative value.

read_numOfDevCompletedTask() int

Return the numOfDevCompletedTask attribute.

Returns:

Number of devices that completed the task

NOTE: not implemented

read_assignedTimingBeamIDs() Tuple[int]

Return the assignedTimingBeamIDs attribute.

Returns:

List of TimingBeam IDs assigned to the CSP sub-array

read_assignedTimingBeams() None

Return the assignedTimingBeamIDs attribute.

Returns:

Write the TimingBeam IDams assigned to the CSP sub-array

NOTE: not implemented

write_assignedTimingBeams(assigned_timing_beams) None

Return the assignedTimingBeamIDs attribute.

Returns:

Write the string with TimingBeam IDs assigned to the CSP sub-array. This attribute is memorized so that at device restart it can be recovered. The correspondent Spectrum attribute can’t be configured as memorized attribute. Temporary solution to use until the introduction of the PST Processing Mode Capability device. CSP sub-array. This attribute is memorized so that at device restart it can be recovered. The correspondent Spectrum attribute can’t be configured as memorized attribute. Temporary solution to use until the introduction of the PST Processing Mode Capability device.

read_assignedTimingBeamsState() Tuple[tango.DevState]

Return the assignedTimingBeamsState attribute.

Returns:

a tuple with the state of the assigned timing beams. Otherwise an empty tuple.

read_assignedTimingBeamsHealthState() Tuple[int]

Return the assignedTimingBeamsHealthState attribute.

Returns:

a tuple with the health state of the assigned timing beams. Otherwise an empty tuple.

read_assignedTimingBeamsObsState() Tuple[int]

Return the assignedTimingBeamsObsState attribute.

Returns:

ObsState of the assigned TimingBeams

NOTE: not implemented

read_assignedTimingBeamsAdminMode() Tuple[int]

Return the assignedTimingBeamsAdminMode attribute.

Returns:

AdminMode of the assigned TimingBeams

NOTE: not implemented

read_pstBeamsAddress() List[str]

The list with the FQDNs of the deployed PST Beams.

Returns:

PST sub-element PstBeam TANGO device FQDNs.

read_pstBeamsState() str

Return the JSON string with the state of the assigned PST Beams.

Returns:

A JSON formatted string with the state of the pst Beams assigned to the subarray.

read_pstBeamsObsState() str

Return the obsState values for the PST Beams.

Returns:

A JSON formatted string with the observing state of the PST Beams assigned to the subarray.

read_pstBeamsHealthState() str

Return the health state values of the PST Beams.

Returns:

A JSON formatted string with the health state of the PST beams assigned to the subarray.

read_pstBeamsAdminMode() str

Return the administration Mode of the PST Beams.

Returns:

A JSON formatted string with the administration mode of the PST Beams assigned to the subarray.

read_timeoutExpiredFlag() bool

Return the timeoutExpiredFlag attribute.

Returns:

The timeout flag for a CspSubarray command.

read_failureRaisedFlag() bool

Return the failureRaisedFlag attribute.

Returns:

The failure flag for a CspSubarray command

read_isCmdInProgress() bool

Return the isCmdInProgress attribute.

NOTE: not implemented

read_cmdFailureMessage() str

Return the cmdFailureMessage attribute.

Returns:

The failure message on command execution

read_listOfDevCompletedTask() List[str]

Return the listOfDevCompletedTask attribute.

Returns:

List of devices that completed the task

NOTE: not implemented

read_commandResult() Tuple[ska_tango_base.commands.ResultCode, str]

Return the command result attribute.

Returns:

the name and the result_code of latest command execution

read_isCommunicating() bool

Whether the TANGO device is communicating with the controlled component.

Returns:

Whether the device is communicating with the component under control.