Controller Resource Manager
This module implements component management for the MCCS controller.
- class ControllerResourceManager(subarrays, subarray_beams, station_beams, channel_blocks)
A resource manager for the controller component manager.
- __init__(subarrays, subarray_beams, station_beams, channel_blocks)
Initialise a new instance.
- Parameters:
subarrays (
Iterable
[str
]) – all subarrays to be managed by this resource managersubarray_beams (
Iterable
[str
]) – all subarray beams to be managed by this resource managerstation_beams (
Iterable
[str
]) – all station beams to be managed by this resource manager (as a resource pool)channel_blocks (
Iterable
[int
]) – all channel blocks to be managed by this resource manager
- allocate(subarray, **resources)
Allocate resources to a subarray.
- Parameters:
subarray (
str
) – the subarray to which resources are to be allocatedresources (
Iterable
[Hashable
]) –the resources to allocate. Each keyword specifies a resource type, with the value a list of the resources of that type to be allocated. For example:
controller_resource_manager.allocate( "low-mccs/subarray/01", stations=[ ["low-mccs/station/001", "low-mccs/station/002"] ], station_beams=[["low-mccs/beam/01", "low-mccs/beam/02"]] channel_blocks=[2, 3], )
- Return type:
- deallocate(**resources)
Deallocate resources (regardless of what subarray they are allocated to.
- Parameters:
resources (
Iterable
[Hashable
]) –the resources to deallocate. Each keyword specifies a resource type, with the value a list of the resources of that type to be deallocated. For example:
controller_resource_manager.deallocate( stations=[ "low-mccs/station/001", "low-mccs/station/002" ], channel_blocks=[2, 3], )
- Return type:
- deallocate_from(subarray)
Deallocate all resources from a subarray.
- get_allocated(subarray)
Return the resources allocated to a given subarray.
- set_health(resource_type, resource, is_healthy)
Set the health of a resource.