CbfSubarray Class
- class ska_mid_cbf_mcs.subarray.subarray_device.CbfSubarray(*args: Any, **kwargs: Any)[source]
Bases:
CbfObsDevice
CbfSubarray TANGO device class for the prototype
- CbfControllerAddress
FQDN of CBF CController
- VCC
TANGO property
- FSP
TANGO property
- FspCorrSubarray
TANGO property
- TalonBoard
TANGO property
- VisSLIM
TANGO property
- frequencyBand
Frequency band; an int in the range [0, 5]
- receptors
list of DISH/receptor string IDs assigned to subarray
- assignedVCCs
list of VCC integer IDs assigned to subarray
- assignedFSPs
list of FSP integer IDs assigned to subarray
- frequencyOffsetK
Frequency offset (k) of up to 197 receptors as an array of ints.
- sysParam
the Dish ID - VCC ID mapping and frequency offset (k) in a json string
- lastDelayModel
The last valid delay model received.
- create_component_manager() CbfSubarrayComponentManager [source]
Create and return a subarray component manager.
- Returns:
a subarray component manager
- class InitCommand(device: Device, logger: Logger | None = None, validator: ArgumentValidator | None = None)[source]
Bases:
InitCommand
A class for the Subarray’s init_device() “command”.
- do(*args: any, **kwargs: any) tuple[list[ska_control_model.result_code.ResultCode], list[str]] [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)
- AddReceptors(argin: list[str]) tuple[list[ska_control_model.result_code.ResultCode], list[str]] [source]
Assign input receptors to this subarray. Set subarray to ObsState.IDLE if no receptors were previously assigned, i.e. subarray was previously in ObsState.EMPTY.
- Parameters:
argin – list[str] of DISH IDs to add
- Returns:
A tuple containing a return code and a string message indicating status. The message is for information purpose only.
- Return type:
(ResultCode, str)
- RemoveReceptors(argin: list[str]) tuple[list[ska_control_model.result_code.ResultCode], list[str]] [source]
Remove input from list of assigned receptors. Set subarray to ObsState.EMPTY if no receptors assigned.
- Parameters:
argin – list of DISH/receptor IDs to remove
- Returns:
A tuple containing a return code and a string message indicating status. The message is for information purpose only.
- Return type:
(ResultCode, str)
- RemoveAllReceptors() tuple[list[ska_control_model.result_code.ResultCode], list[str]] [source]
Remove all assigned receptors. Set subarray to ObsState.EMPTY if no receptors assigned.
- Returns:
A tuple containing a return code and a string message indicating status. The message is for information purpose only.
- Return type:
(ResultCode, str)
- Scan(argin: str) tuple[list[ska_control_model.result_code.ResultCode], list[str]] [source]
Start an observing scan. Overrides CbfObsDevice as subarray’s scan input is a JSON string
- Parameters:
argin – JSON formatted string with the scan ID.
- Returns:
A tuple containing a return code and a string message indicating status. The message is for information purpose only.
- Abort() tuple[list[ska_control_model.result_code.ResultCode], list[str]]
Abort the current observing process and move to ABORTED obsState.
- Returns:
A tuple containing a return code and a string message indicating status. The message is for information purpose only.
- AbortCommands() tuple[list[ska_control_model.result_code.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.
- CheckLongRunningCommandStatus(argin: str) str
Check the status of a long running command by ID.
- Parameters:
argin – the command id
- Returns:
command status
- ConfigureScan(argin: str) tuple[list[ska_control_model.result_code.ResultCode], list[str]]
Configure the observing device parameters for the current scan.
- Parameters:
argin – 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.
- 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
- DeviceID
TANGO property
- End() tuple[list[ska_control_model.result_code.ResultCode], list[str]]
Set obs device from READY to IDLE; currently unimplemented in Mid.CBF, as this is accomplished by GoToIdle.
- Returns:
A tuple containing a return code and a string message indicating status. The message is for information purpose only.
- EndScan() tuple[list[ska_control_model.result_code.ResultCode], list[str]]
End a running scan.
- Returns:
A tuple containing a return code and a string message indicating status. The message is for information purpose only.
- 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.
- 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[list[ska_control_model.result_code.ResultCode], list[str]]
Transit the device from READY to IDLE obsState. To keep in line with LMC, using “GoToIdle” rather than the SKA base class equivalent “End”.
- 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
,devices
andsubgroups
in 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
devices
andsubgroups
keys:[ {"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[ska_control_model.result_code.ResultCode], list[str]]
Reset the observing device from a FAULT/ABORTED obsState to IDLE.
- Returns:
A tuple containing a return code and a string message indicating status. The message is for information purpose only.
- Off() tuple[list[ska_control_model.result_code.ResultCode], list[str]]
Turn device off.
- Returns:
A tuple containing a return code and a string message indicating status. The message is for information purpose only.
- On() tuple[list[ska_control_model.result_code.ResultCode], list[str]]
Turn device on.
- Returns:
A tuple containing a return code and a string message indicating status. The message is for information purpose only.
- Reset() tuple[list[ska_control_model.result_code.ResultCode], list[str]]
Reset the device; currently unimplemented in Mid.CBF
- Returns:
A tuple containing a return code and a string message indicating status. The message is for information purpose only.
- Restart() tuple[list[ska_control_model.result_code.ResultCode], list[str]] [source]
Restart the observing device from a FAULT/ABORTED obsState to EMPTY.
- Returns:
A tuple containing a return code and a string message indicating status. The message is for information purpose only.
- 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[ska_control_model.result_code.ResultCode], list[str]]
Put the device into standby mode; currently unimplemented in Mid.CBF
- Returns:
A tuple containing a return code and a string message indicating status. The message is for information purpose only.
- TangoClassClass
alias of
CbfSubarrayClass
- TangoClassName = 'CbfSubarray'
- adminMode
Read the Admin Mode of the device.
- It may interpret the current device condition and condition of all managed
devices to set this. Most possibly an aggregate attribute.
- Returns:
Admin Mode of the device
- buildState
Read the Build State of the device.
- Returns:
the build state of the device
- 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 ID specified into the JSON configuration.
- configurationProgress
Read the percentage configuration progress of the device.
- Returns:
the percentage configuration progress
- 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
- deviceID
The observing device ID.
- 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
- lastScanConfiguration
The last valid scan configuration.
- 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.
- obsMode
Read the Observation Mode of the device.
- Returns:
the current obs_mode value
- obsState
Read the Observation State of the device.
- Returns:
the current ObsState enum value
- scanID
The scan identification number to be inserted in the output products.
- simulationMode
Read the Simulation Mode of the device.
- Returns:
Simulation Mode of the device.
- 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
- versionId
Read the Version Id of the device.
- Returns:
the version id of the device