CspSubarray
- class ska_csp_lmc_common.subarray.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
PSS sub-element sub-array TANGO device FQDN.
Type:’DevString’
- PstBeams
PST sub-element PstBeams TANGO devices FQDNs
Type:’DevVarStringArray’
- CspResourceManager
TANGO FQDN of the CSP Resource Manager
Type:’DevString’
- 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, 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
- 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
Update a device attribute and push related events. This method is invoked by the component manager callback path. Concurrent invocations are serialized by the component manager.
- 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
- _get_schema_validator() CspJsonValidator
Retrieve the class that handles the validation of the input JSON files sent as argument of AssignResources, Configure and Scan.
This class is specialized in Mid.CSP and Low.CSP.
- _create_attrs_dict(cm: CSPSubarrayComponentManager)
Helper function to create a device attributes dictionary which must be semantically checked in the CspJsonValidator
- adminMode(value: ska_control_model.AdminMode) None
Set the administration mode for the whole CSP element.
- Parameters:
value – one of the administration mode value (ONLINE, OFFLINE, ENGINEERING, NOT_FITTED, RESERVED).
- Raises:
ValueError if an invalid adminmode value is specified.
- is_adminMode_allowed(request_type: tango.AttReqType)
Verify the adminMode can be modified .
- cbfSubarrayState() tango.DevState
Return the state of the CBF Subarray.
- Returns:
The correspondent CBF Subarray Operational State
- 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
- cbfSubarrayHealthState() ska_control_model.HealthState
Return the health state of the CBF Subarray.
- Returns:
The correspondent CBF Subarray Health State
- 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
- 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
- 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
- cbfSubarrayObsState() ska_control_model.ObsState
Return the cbfSubarrayObsState attribute.
- Returns:
The correspondent CBF Subarray Observing State
- pssSubarrayObsState() ska_control_model.ObsState
Return the pssSubarrayObsState attribute.
- Returns:
The correspondent PSS Subarray Observational State
- cbfSubarrayObsMode() ska_control_model.ObsMode
Return the cbfSubarrayObsMode attribute.
- Returns:
The correspondent CBF Subarray Observational Mode
- pssSubarrayObsMode() ska_control_model.ObsMode
Return the pssSubarrayObsMode attribute.
- Returns:
The correspondent PSS Subarray Observational Mode
- pssSubarrayAddress() str
Return the pssSubarrayAddress attribute.
- Returns:
The PSS sub-element sub-array FQDN.
- cbfSubarrayAddress() str
Return the cbfSubarrayAddress attribute.
- Returns:
The CBF sub-element sub-array FQDN.
- validScanConfiguration() str
Return the validScanConfiguration attribute.
- Returns:
the JSON string containing the last valid scan configuration.
- numOfDevCompletedTask() int
Return the numOfDevCompletedTask attribute.
- Returns:
Number of devices that completed the task
NOTE: not implemented
- timeoutExpiredFlag() bool
Return the timeoutExpiredFlag attribute.
- Returns:
The timeout flag for a CspSubarray command.
- failureRaisedFlag() bool
Return the failureRaisedFlag attribute.
- Returns:
The failure flag for a CspSubarray command
- cmdFailureMessage() str
Return the cmdFailureMessage attribute.
- Returns:
The failure message on command execution
- isCmdInProgress() bool
Return the isCmdInProgress attribute.
NOTE: not implemented
- listOfDevCompletedTask() List[str]
Return the listOfDevCompletedTask attribute.
- Returns:
List of devices that completed the task
NOTE: not implemented
- assignedTimingBeamIDs() Tuple[int]
Return the assignedTimingBeamIDs attribute.
- Returns:
List of TimingBeam IDs assigned to the CSP sub-array
- assignedTimingBeamsHealthState() Tuple[int]
Return the assignedTimingBeamsHealthState attribute.
- Returns:
a tuple with the health state of the assigned timing beams. Otherwise an empty tuple.
- assignedTimingBeamsObsState() Tuple[int]
Return the assignedTimingBeamsObsState attribute.
- Returns:
ObsState of the assigned TimingBeams
NOTE: not implemented
- assignedTimingBeamsAdminMode() Tuple[int]
Return the assignedTimingBeamsAdminMode attribute.
- Returns:
AdminMode of the assigned TimingBeams
NOTE: not implemented
- assignedTimingBeamsState() Tuple[tango.DevState]
Return the assignedTimingBeamsState attribute.
- Returns:
a tuple with the state of the assigned timing beams. Otherwise an empty tuple.
- pstBeamsAddress() List[str]
The list with the FQDNs of the deployed PST Beams.
- Returns:
PST sub-element PstBeam TANGO device FQDNs.
- 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.
- 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.
- 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.
- 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.
- 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.
- commandResult() Tuple[ska_tango_base.commands.ResultCode, str]
Return the command result attribute.
- Returns:
the name and the result_code of latest command execution
- isCommunicating() bool
Whether the TANGO device is communicating with the controlled component.
- Returns:
Whether the device is communicating with the component under control.
- 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.
- obsMode() List[ska_control_model.ObsMode]
Return the obsModes attribute. TODO: implementation will be moved to CM and rewritten so that it relies on the content of the configuration json file.
- Returns:
a tuple with the state of the assigned timing beams. Otherwise an empty tuple.
- assignedCheetahs() str
Return the assigned PSS Cheetahs attribute
- 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
- healthInfo() str
- Return a JSON formatted string with the cause for the health”
degradation or failure.
- Returns:
JSON formatted string.
- scanConsistencyErrorMsg() str
Return the scanConsistencyErrorMsg attribute.
- Returns:
the JSON string containing the error message in case of an inconsistent observation.
- scanConsistencyErrorFlag() bool
Return the scanConsistencyErrorFlag attribute.
- Returns:
the boolean value containing the hard fault flag in case of an inconsistent observation.
- 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.
- qualityAssuranceMetrics() str
Return a JSON formatted string with the quality attributes aggregated per subsystem.
- Returns:
JSON formatted string.