Controller Device
This module contains the SKA Low MCCS Controller device prototype.
- class MccsController(*args, **kwargs)
An implementation of a controller Tango device for MCCS.
- Allocate(argin)
Allocate a set of unallocated MCCS resources to a sub-array.
The JSON argument specifies the overall sub-array composition in terms of which stations should be allocated to the specified Sub-Array.
- Parameters:
argin (
str
) – JSON-formatted string containing an integer subarray ID, and resources to be allocated to that subarray- Return type:
- Returns:
A tuple containing a return code, a string message indicating status and message UID. The string message is for information purposes only, but the message UID is for message management use.
- Example:
>>> proxy = tango.DeviceProxy("ska-low-mccs/control/control") >>> proxy.Allocate( json.dumps( { "interface": "https://schema.skao.int/ska-low-mccs-controller-allocate/3.0" "subarray_id": 1, "subarray_beams": [ { "subarray_beam_id": 3, "apertures": [ {"station_id": 1, "aperture_id": "1.1" }, {"station_id": 2, "aperture_id": "2.2" }, {"station_id": 2, "aperture_id": "2.3" }, {"station_id": 3, "aperture_id": "3.1" }, {"station_id": 4, "aperture_id": "4.1" }, ], } "number_of_channels": 32, ], } ) )
- class AllocateCommand(command_tracker, component_manager, callback=None, logger=None)
Class for handling the Allocate() command.
This command takes as input a JSON string that conforms to the following schema:
schemas/MccsController_Allocate_3_0.json
- __init__(command_tracker, component_manager, callback=None, logger=None)
Initialise a new AllocateCommand instance.
- Parameters:
command_tracker (
CommandTracker
) – the command tracker used to track this commandcomponent_manager (
ControllerComponentManager
) – the component manager to which this command belongs.callback (
Optional
[Callable
]) – the callback to be called at command completionlogger (
Optional
[Logger
]) – a logger for this command to use.
- GetAssignedResources(subarray_id)
Return a dictionary of the resources assigned to a given subarray.
- GetHealthTrl(argin)
Return health of device given by TRL.
- class InitCommand(*args, **kwargs)
A class for
MccsController
’s Init command.- The
do()
method below is called during
MccsController
’s initialisation.
- do(*args, **kwargs)
Initialise the attributes and properties of the MccsController.
- Parameters:
- Return type:
- Returns:
A tuple containing a return code and a string message indicating status. The message is for information purpose only.
- The
- Release(argin)
Release resources from an MCCS Sub-Array.
- Parameters:
argin (
str
) – JSON-formatted string- Return type:
- Returns:
A tuple containing a return code, a string message indicating status and message UID. The string message is for information purposes only, but the message UID is for message management use.
- Example:
>>> proxy = tango.DeviceProxy("ska-low-mccs/control/control") >>> proxy.Release( json.dumps( { "subarray_id": 1, "release_all": true } ) )
- ReleaseAll()
Release all resources from an MCCS Array.
- Return type:
- Returns:
A tuple containing a return code, a string message indicating status and message UID. The string message is for information purposes only, but the message UID is for message management use.
- Example:
>>> proxy = tango.DeviceProxy("ska-low-mccs/control/control") >>> proxy.ReleaseAll()
- class ReleaseAllCommand(component_manager, logger=None)
Class for handling the ReleaseAll() command.
schemas/MccsController_Release_2_0.json
- __init__(component_manager, logger=None)
Initialise a new ReleaseAllCommand instance.
- Parameters:
component_manager (
ControllerComponentManager
) – the device to which this command belongs.logger (
Optional
[Logger
]) – a logger for this command to use.
- do(*args, **kwargs)
Implement
MccsController.Release()
command functionality.- Parameters:
- Return type:
- Returns:
A tuple containing a return code and a string message indicating status. The message is for information purpose only.
- class ReleaseCommand(component_manager, logger=None)
Class for handling the Release() command.
This command takes as input a JSON string that conforms to the following schema:
schemas/MccsController_Release_2_0.json
- __init__(component_manager, logger=None)
Initialise a new ReleaseCommand instance.
- Parameters:
component_manager (
ControllerComponentManager
) – the device to which this command belongs.logger (
Optional
[Logger
]) – a logger for this command to use.
- do(*args, **kwargs)
Implement
MccsController.Release()
command functionality.- Parameters:
- Return type:
- Returns:
A tuple containing a return code and a string message indicating status. The message is for information purpose only.
- RestartSubarray(argin)
Restart an MCCS subarray.
- StandbyFull()
Put MCCS into standby mode.
Some elements of SKA Mid have both low and full standby modes, but SKA Low has no such elements. We just need a Standby command, not separate StandbyLow and StandbyFull.
- StandbyLow()
Put MCCS into standby mode.
Some elements of SKA Mid have both low and full standby modes, but SKA Low has no such elements. We just need a Standby command, not separate StandbyLow and StandbyFull.
- __init__(*args, **kwargs)
Initialise this device object.
- buildState()
Read the Build State of the device.
- Return type:
- Returns:
the build state of the device
- create_component_manager()
Create and return a component manager for this device.
- Return type:
- Returns:
a component manager for this device.
- healthModelParams(argin)
Set the params for health transition rules.
- init_device()
Initialise the device.
This is overridden here to change the Tango serialisation model.
- Return type:
- stationBeamHealths()
Read the health of station beams controlled by the device.
- Return type:
- Returns:
health of station beams in a json format
- stationHealths()
Read the health of stations controlled by the device.
- Return type:
- Returns:
health of stations in a json format
- subDeviceHealths()
Read the health of all subdevices controlled by the device.
- Return type:
- Returns:
health of subdevices in a json tree format
- subarrayBeamHealths()
Read the health of subarray beams controlled by the device.
- Return type:
- Returns:
health of subarray beams in a json format
- subarrayHealths()
Read the health of subarrays controlled by the device.
- Return type:
- Returns:
health of subarrays in a json format