MID CSP Subarray
- class ska_csp_lmc_mid.subarray.mid_subarray_device.MidCspSubarray(*args: Any, **kwargs: Any)
Bases:
CspSubarrayThe base class for MID CspSubarray.
Functionality to monitor assigned CSP.LMC Capabilities, as well as inherent Capabilities, are implemented in separate TANGO Devices.
- set_component_manager(cm_configuration: ComponentManagerConfiguration) MidCspSubarrayComponentManager
Set the CM for the Mid CSP Subarray device.
- Parameters:
cm_configuration – A class with all the device properties accessible as attributes
- Returns:
The Mid.CSP SubarrayComponentManager
- update_property(property_name: str, property_value: Any) None
Specialization of the CspSubarray method. This method is registered within the Component Manager of the Mid Subarray device and is invoked by the ComponentManager to update the value of a device attribute and push an event on it. The attribute has to be properly configured to push events from the device.
- Parameters:
property_name – the TANGO attribute name
property_value – the attribute value
- commandResultName
The first entry of commandResult attribute, i.e. the name of latest command executed. For Taranta visualization
- commandResultCode
The second entry of commandResult attribute, i.e. the resultCode of latest command executed. For Taranta visualization
- assignedFsp
List of assigned FSPs.
- assignedVcc
List of assigned VCCs.
- addReceptorsCmdProgress
The progress percentage for the AddReceptors command.
- removeReceptorsCmdProgress
The progress percentage for the RemoveReceptors command.
- assignedVccState
The State of the assigned VCCs.
- assignedVccHealthState
The health state of the assigned VCCs.
- assignedFspState
The State of the assigned FSPs.
- assignedFspHealthState
The health state of the assigned FSPs.
- assignedFspFunctionMode
The Function Mode of the assigned FSPs.
- assignedReceptors
The list of receptors assigned to the subarray.
- capabilityConnected
Whether the device is communicating with the component under control
- dishVccConfig
The Dish ID - VCC ID mapping in a json string
- read_commandResultName() str
Return the name of the last executed CSP task.
- Returns:
The name of the CSP task.
- read_commandResultCode() str
Return the ResultCode of the last executed CSP task.
- Returns:
The result code (see
ResultCode) of the last executed task.
- read_addReceptorsCmdProgress() int
Return the addReceptorsCmdProgress attribute.
- Returns:
The progress percentage for the AddReceptors command.
NOTE: not implemented
- read_removeReceptorsCmdProgress() int
Return the removeReceptorsCmdProgress attribute.
- Returns:
The progress percentage for the RemoveReceptors command.
NOTE: not implemented
- read_assignedFsp() Tuple[int]
Return the assignedFsp attribute.
- Returns:
List of assigned FSPs.
NOTE: not implemented
- read_assignedVcc() List[int]
Attribute method
- Returns:
The list of VCC IDs assigned to the subarray.
- read_assignedVccState() List[DevState]
Return the assignedVccState attribute.
- Returns:
The State of the assigned VCCs.
- read_assignedVccHealthState() List[str]
Return the assignedVccHealthState attribute.
- Returns:
The health state of the assigned VCCs.
- read_assignedFspState() List[DevState]
Return the assignedFspState attribute.
- Returns:
The State of the assigned FSPs.
- read_assignedFspHealthState() List[str]
Return the assignedFspHealthState attribute.
- Returns:
The health state of the assigned FSPs.
- read_assignedFspFunctionMode() List[str]
Return the assignedFspHealthState attribute.
- Returns:
The health state of the assigned FSPs.
- read_assignedReceptors() List[str]
Return the assignedReceptors attribute.
- Returns:
The list of receptors assigned to the subarray.
- read_capabilityConnected() bool
Whether the TANGO device is communicating with the Capability Devices.
- Returns:
Whether the device is communicating with the component under control.
- read_dishVccConfig() DevState
Return the dishVccConfig attribute.
- Returns:
The corresponding Cbf Subarray sysParam attribute
- Raise:
ValueError exception if attribute reading from the device fails
- Raise:
KeyError exception.
- Abort() tuple[list[ResultCode], list[str]]
Abort any executing long running command(s) and empty the queue.
- Returns:
A tuple containing a result code and the unique ID of the command
- AbortCommands() tuple[list[ResultCode], list[str]]
Empty out long running commands in queue.
- Returns:
A tuple containing a return code and a string message indicating status. The message is for information purpose only.
- AssignResources(argin: str) tuple[list[ResultCode], list[str]]
Assign resources to this subarray.
To modify behaviour for this command, modify the do() method of the command class.
- Parameters:
argin – the resources to be assigned
- Returns:
A tuple containing a result code and a string message. If the result code indicates that the command was accepted, the message is the unique ID of the task that will execute the command. If the result code indicates that the command was not excepted, the message explains why.
- CapabilityTypes
TANGO property
- CbfSubarray
TANGO property
- CheckLongRunningCommandStatus(argin: str) str
Check the status of a long running command by ID.
- Parameters:
argin – the command id
- Returns:
command status
- Configure(argin: str) tuple[list[ResultCode], list[str]]
Configure the capabilities of this subarray.
To modify behaviour for this command, modify the do() method of the command class.
- Parameters:
argin – JSON-encoded string with the scan configuration”, configuration specification
- Returns:
A tuple containing a result code and the unique ID of the command
- ConnectionTimeout
TANGO property
- CspController
TANGO property
- CspResourceManager
TANGO property
- DebugDevice() int
Enable remote debugging of this device.
To modify behaviour for this command, modify the do() method of the command class:
DebugDeviceCommand.- Returns:
the port the debugger is listening on
- DefaultCommandTimeout
TANGO property
- End() tuple[list[ResultCode], list[str]]
End the scan block.
To modify behaviour for this command, modify the do() method of the command class.
- Returns:
A tuple containing a result code and the unique ID of the command
- EndScan() tuple[list[ResultCode], list[str]]
End the scan.
To modify behaviour for this command, modify the do() method of the command class.
- Returns:
A tuple containing a result code and the unique ID of the command
- ExecutePendingOperations() None
Execute any Tango operations that have been pushed on the queue.
The poll time is initially 5ms, to circumvent the problem of device initialisation, but is reset to 100ms after the first pass.
- ForceHealthState(argin: bool) Tuple[ResultCode, str]
Force health_state attribute
- Parameters:
task_callback – method called to update the task result related attributes
argin – flag to force the health state to FAILED
- Returns:
a tuple with ResultCode and an informative message.
- GetVersionInfo() list[str]
Return the version information of the device.
To modify behaviour for this command, modify the do() method of the command class.
- Returns:
The result code and the command unique ID
- GoToIdle() Tuple[ResultCode, str]
Set the subarray obsState to IDLE.
- Returns:
A tuple containing a return code and a string message indicating status. The message is for information purpose only.
- GroupDefinitions
Device property.
Each string in the list is a JSON serialised dict defining the
group_name,devicesandsubgroupsin the group. A Tango Group object is created for each item in the list, according to the hierarchy defined. This provides easy access to the managed devices in bulk, or individually.The general format of the list is as follows, with optional
devicesandsubgroupskeys:[ {"group_name": "<name>", "devices": ["<dev name>", ...]}, {"group_name": "<name>", "devices": ["<dev name>", "<dev name>", ...], "subgroups" : [{<nested group>}, {<nested group>}, ...]}, ... ]
For example, a hierarchy of racks, servers and switches:
[ {"group_name": "servers", "devices": ["elt/server/1", "elt/server/2", "elt/server/3", "elt/server/4"]}, {"group_name": "switches", "devices": ["elt/switch/A", "elt/switch/B"]}, {"group_name": "pdus", "devices": ["elt/pdu/rackA", "elt/pdu/rackB"]}, {"group_name": "racks", "subgroups": [ {"group_name": "rackA", "devices": ["elt/server/1", "elt/server/2", "elt/switch/A", "elt/pdu/rackA"]}, {"group_name": "rackB", "devices": ["elt/server/3", "elt/server/4", "elt/switch/B", "elt/pdu/rackB"], "subgroups": []} ]} ]
- LoggingLevelDefault
Device property.
Default logging level at device startup. See
LoggingLevel
- LoggingTargetsDefault
Device property.
Default logging targets at device startup. See the project readme for details.
- ObsReset() tuple[list[ResultCode], list[str]]
Reset the current observation process.
To modify behaviour for this command, modify the do() method of the command class.
- Returns:
A tuple containing a result code and the unique ID of the command
- Off() Tuple[ResultCode, str]
Turn the device off.
Override base class command to accept the command also when the subarray device is in Off state
- Returns:
A tuple containing a return code and a string message indicating status. The message is for information purpose only.
- On() Tuple[ResultCode, str]
Turn device on.
Override base class command to accept the command also when the subarray device is in On state
- Returns:
A tuple containing a return code and a string message indicating status. The message is for information purpose only.
- PingConnectionTime
TANGO property
- PssSubarray
TANGO property
- PstBeams
TANGO property
- ReleaseAllResources() tuple[list[ResultCode], list[str]]
Remove all resources to tear down to an empty subarray.
To modify behaviour for this command, modify the do() method of the command class.
- Returns:
A tuple containing a result code and the unique ID of the command
- ReleaseResources(argin: str) tuple[list[ResultCode], list[str]]
Delta removal of assigned resources.
To modify behaviour for this command, modify the do() method of the command class.
- Parameters:
argin – the resources to be released
- Returns:
A tuple containing a result code and the unique ID of the command
- Reset() tuple[list[ResultCode], list[str]]
Reset the device.
To modify behaviour for this command, modify the do() method of the command class.
For a device that directly monitors and controls hardware, this command should put that hardware into a known state, for example by clearing buffers and loading default values into registers, or if necessary even by power-cycling and re-initialising the hardware.
Logical devices should generally implement this command to perform a sensible reset of that logical device. For example, aborting any current activities and clearing internal state.
Reset generally should not change the power state of the device or its hardware:
If invoking Reset() from STANDBY state, the device would usually be expected to remain in STANDBY.
If invoking Reset() from ON state, the device would usually be expected to remain in ON.
If invoking Reset() from FAULT state, the device would usually be expected to transition to ON or remain in FAULT, depending on whether the reset was successful in clearing then fault.
Reset generally should not propagate to subservient devices. For example, a subsystem controller device should implement Reset to reset the subsystem as a whole, but that probably should not result in all of the subsystem’s hardware being power-cycled.
- Returns:
A tuple containing a return code and a string message indicating status. The message is for information purpose only.
- Restart() tuple[list[ResultCode], list[str]]
Restart the subarray. That is, deconfigure and release all resources.
To modify behaviour for this command, modify the do() method of the command class.
- Returns:
A tuple containing a result code and the unique ID of the command
- Scan(argin: str) tuple[list[ResultCode], list[str]]
Start scanning.
To modify behaviour for this command, modify the do() method of the command class.
- Parameters:
argin – JSON-encoded string with the per-scan configuration
- Returns:
A tuple containing a result code and the unique ID of the command
- SkaLevel
Device property.
Indication of importance of the device in the SKA hierarchy to support drill-down navigation: 1..6, with 1 highest.
- Standby() tuple[list[ResultCode], list[str]]
Put the device into standby mode.
To modify behaviour for this command, modify the do() method of the command class.
- Returns:
A tuple containing a return code and a string message indicating status. The message is for information purpose only.
- SubID
TANGO property
- TangoClassClass
alias of
MidCspSubarrayClass
- TangoClassName = 'MidCspSubarray'
- activationTime
Read the time of activation in seconds since Unix epoch.
- Returns:
Time of activation in seconds since Unix epoch.
- adminMode
The admin mode reported for this device. It may interpret thecurrent device condition and condition of all managed devicesto set this. Most possibly an aggregate attribute.
- assignedCheetahs
Assigned PSS Cheetahs pipeline
- assignedResources
Read the resources assigned to the device.
The list of resources assigned to the subarray.
- Returns:
Resources assigned to the device.
- assignedTimingBeamIDs
List of TimingBeam IDs assigned to the CSP sub-array
- assignedTimingBeamsAdminMode
AdminMode of the assigned TimingBeams
- assignedTimingBeamsHealthState
HealthState of the assigned TimingBeams
- assignedTimingBeamsObsState
ObsState of the assigned TimingBeams
- assignedTimingBeamsState
State of the assigned TimingBeams
- buildState
Read the Build State of the device.
- Returns:
the build state of the device
- cbfSubarrayAddress
The CBF sub-element sub-array FQDN.
- cbfSubarrayAdminMode
CBF Subarray Admin Mode
- cbfSubarrayHealthState
CBF Subarray Health State
- cbfSubarrayObsMode
The CBF subarray observing mode.
- cbfSubarrayObsState
The CBF subarray observing state.
- cbfSubarrayState
Return the state of the CBF Subarray.
- Returns:
The correspondent CBF Subarray Operational State
- cmdFailureMessage
The failure message on command execution
- commandResult
command_name, result_code Gives the name and the result_code of latest command execution
- commandTimeout
Report the set command timeout
- commandedObsState
Read the last commanded stable Observation State of the device.
Initial value is EMPTY. The only stable (nontransitional) state values it can change to is EMPTY, IDLE, READY or ABORTED following the start of any of the SKASubarray device’s long running commands.
- Returns:
the commanded ObsState enum value.
- commandedState
Read the last commanded operating state of the device.
Initial string is “None”. Only other strings it can change to is “OFF”, “STANDBY” or “ON”, following the start of the Off(), Standby(), On() or Reset() long running commands.
- Returns:
commanded operating state string.
- configurationDelayExpected
Read the expected Configuration Delay in seconds.
- Returns:
the expected configuration delay
- configurationID
The configuration identifier (string)
- configurationProgress
Read the percentage configuration progress of the device.
- Returns:
the percentage configuration progress
- configuredCapabilities
Read capabilities configured in the Subarray.
A list of capability types with no. of instances in use on this subarray; e.g. Correlators:512, PssBeams:4 PstBeams:4, VlbiBeams:0.
- Returns:
A list of capability types with no. of instances used in the Subarray
- controlMode
Read the Control Mode of the device.
The control mode of the device are REMOTE, LOCAL Tango Device accepts only from a ‘local’ client and ignores commands and queries received from TM or any other ‘remote’ clients. The Local clients has to release LOCAL control before REMOTE clients can take control again.
- Returns:
Control Mode of the device
- failureRaisedFlag
The failure flag for a CspSubarray command.
- healthInfo
Attribute used to specifies the cause for the healthdegradation or failure
- healthState
Read the Health State of the device.
It interprets the current device condition and condition of all managed devices to set this. Most possibly an aggregate attribute.
- Returns:
Health State of the device
- isCmdInProgress
Return the isCmdInProgress attribute.
NOTE: not implemented
- isCommunicating
Whether the device is communicating with the component under control
- listOfDevCompletedTask
List of devices that completed the task
- loggingLevel
Read the logging level of the device.
Initialises to LoggingLevelDefault on startup. See
LoggingLevel- Returns:
Logging level of the device.
- loggingTargets
Read the additional logging targets of the device.
Note that this excludes the handlers provided by the ska_ser_logging library defaults - initialises to LoggingTargetsDefault on startup.
- Returns:
Logging level of the device.
- longRunningCommandResult
Read the result of the completed long running command.
Reports unique_id, json-encoded result. Clients can subscribe to on_change event and wait for the ID they are interested in.
- Returns:
ID, result.
- lrcFinished
Read info of the finished long running commands.
- Returns:
a list of info JSON blobs of the finished long running commands.
- lrcProtocolVersions
Return supported protocol versions.
- Returns:
A tuple containing the lower and upper bounds of supported long running command protocol versions.
- numOfDevCompletedTask
Number of devices that completed the task
- obsMode
Active observation modes
- obsState
Read the Observation State of the device.
- Returns:
the current ObsState enum value
- pssSubarrayAddress
The PSS sub-element sub-array FQDN.
- pssSubarrayAdminMode
PSS Subarray Admin Mode
- pssSubarrayHealthState
PSS Subarray Health State
- pssSubarrayObsMode
The PSS subarray observing Mode.
- pssSubarrayObsState
The PSS subarray observing state.
- pssSubarrayState
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
- pstBeamsAddress
PST sub-element PstBeam TANGO device FQDNs.
- pstBeamsAdminMode
Report the administration mode of the beams assigned to the subarray as JSON formatted string
- pstBeamsHealthState
Report the health state of the pst beams assigned to the subarray as a JSON formatted string
- pstBeamsObsState
Report the observing state of the pst beams assigned to the subarray as a JSON formatted string
- pstBeamsState
Report the state of the pst beams assigned to the subarray as a JSON formatted string.
- qualityAssuranceMetrics
Attribute used to aggregate quality metrics of the subsystemsin order to improve monitoring capabilities.
- scanConsistencyErrorFlag
The hard fault flag in case of an inconsistent observation.
- scanConsistencyErrorMsg
The error message in case of an inconsistent observation.
- scanID
Return the scanID attribute.
- Returns:
the Subarray scanID
- simulationMode
Read the Simulation Mode of the device.
Some devices may implement both modes, while others will have simulators that set simulationMode to True while the real devices always set simulationMode to False.
- Returns:
Simulation Mode of the device.
- testAlarm
flag to test alarm
- testMode
Read the Test Mode of the device.
Either no test mode or an indication of the test mode.
- Returns:
Test Mode of the device
- timeoutExpiredFlag
The timeout flag for a CspSubarray command.
- validScanConfiguration
Store the last valid scan configuration.
- versionId
Read the Version Id of the device.
- Returns:
the version id of the device