Subarray Component Manager
This module implements component management for subarrays.
- class SubarrayComponentManager(*args: Any, **kwargs: Any)[source]
A component manager for a subarray.
- __init__(subarray_id: int, skuid_url: str, logger: Logger, obs_command_timeout: int, communication_state_callback: Callable[[ska_control_model.CommunicationStatus], None], component_state_callback: Callable[[...], None]) None[source]
Initialise a new instance.
- Parameters:
subarray_id – the subarray ID for this device
skuid_url – The address at which a SKUID service is running.
obs_command_timeout – the default timeout for obs commands in seconds.
logger – the logger to be used by this object.
communication_state_callback – callback to be called when the status of the communications channel between the component manager and its component changes
component_state_callback – callback to be called when the component state changes.
- abort(task_callback: Callable | None = None) tuple[ska_control_model.TaskStatus, str][source]
Abort the observation.
- Parameters:
task_callback – callback to be called when the status of the command changes
- Returns:
A task status and response message.
- abort_device(task_callback: Callable | None = None) tuple[ska_control_model.TaskStatus, str][source]
Abort only this device, for use in RestartSubarray().
- Parameters:
task_callback – callback to be called when the status of the command changes
- Returns:
A task status and response message.
- assign(task_callback: Callable | None = None, **kwargs: Any) tuple[ska_control_model.TaskStatus, str][source]
Submit the AssignResources slow command.
This method returns immediately after it is submitted for execution.
- Parameters:
task_callback – Update task state, defaults to None
kwargs – keyword arguments to the command. Required keys are “subarray_id” (the ID of the subarray), and subarray_beams (resource specification for each beam).
- Returns:
a result code and response message.
- property assigned_resources: list[str]
Return this subarray’s resources.
- Returns:
this subarray’s resources.
- property assigned_resources_dict: dict[str, Sequence[Any]]
Return a dictionary of resource types and TRLs.
- Returns:
this subarray’s resources.
- configure(task_callback: Callable | None = None, **kwargs: Any) tuple[ska_control_model.TaskStatus, str][source]
Submit the configure slow command.
This method returns immediately after it is submitted for execution.
- Parameters:
task_callback – Update task state, defaults to None
kwargs – keyword arguments to the command. The only required key is “subarray_beams”, which contains the beam configuration.
- Returns:
A task status and response message.
- deconfigure(task_callback: Callable | None = None) tuple[ska_control_model.TaskStatus, str][source]
Submit the deconfigure (End) slow command.
- Parameters:
task_callback – Update task state, defaults to None
- Returns:
A task status and response message.
- end_scan(task_callback: Callable | None = None) tuple[ska_control_model.TaskStatus, str][source]
Submit the end_scan slow command.
- Parameters:
task_callback – Update task state, defaults to None
- Returns:
A task status and response message.
- property max_executing_tasks: int
Get the max number of tasks that can be executing at once.
- Returns:
max number of simultaneously executing tasks.
- obsreset(task_callback: Callable | None = None) tuple[ska_control_model.TaskStatus, str][source]
Submit the ObsReset slow command.
- Parameters:
task_callback – Update task state, defaults to None
- Returns:
A task status and response message.
- property power_state: ska_control_model.PowerState | None
Return my power state.
- Returns:
my power state
- release(task_callback: Callable | None = None, **kwargs: Any) tuple[ska_control_model.TaskStatus, str][source]
Submit the release slow command.
- Parameters:
task_callback – Update task state, defaults to None
kwargs – keyword arguments to the command. The only required key is “resources”, which contains a list of resource names to release
- Returns:
A task status and response message.
- release_all(task_callback: Callable | None = None) tuple[ska_control_model.TaskStatus, str][source]
Submit the ReleaseAllResources slow command.
Release all resources from this subarray. :param task_callback: Update task state, defaults to None :return: a task status and response message
- restart(task_callback: Callable | None = None) tuple[ska_control_model.TaskStatus, str][source]
Submit the Restart slow command.
- Parameters:
task_callback – Update task state, defaults to None
- Returns:
A task status and response message.
- scan(task_callback: Callable | None = None, *, interface: str | None = None, scan_id: int, start_time: str | None = None, duration: float | None = 0.0) tuple[ska_control_model.TaskStatus, str][source]
Submit the Scan command.
- Parameters:
task_callback – Update task state, defaults to None
interface – the schema version this is running against.
scan_id – The ID for this scan
start_time – UTC time for begin of scan, None for immediate start
duration – Scan duration in seconds. 0.0 or omitted means foreve
- Returns:
A task status and response message.
- property scan_id: int | None
Return the scan id, or None if a scan is not current.
- Returns:
the scan id, or None if a scan is not current.
- send_transient_buffer(argin: list[int], task_callback: Callable | None = None) tuple[ska_control_model.TaskStatus, str][source]
Submit the send_transient_buffer slow task.
This method returns immediately after it is submitted for execution.
- Parameters:
argin – list of requested segments.
task_callback – Update task state. Defaults to None.
- Returns:
Task status and response message.
- property station_beam_trls: set[str]
Return the set of TRLs of station beams assigned to this subarray.
- Returns:
the set of TRLs of station beams assigned to this subarray.