CbfSubarray Class

class ska_mid_cbf_mcs.subarray.subarray_device.CbfSubarray(cl, name)[source]

Bases: CspSubElementSubarray

CBFSubarray TANGO device class for the CBFSubarray prototype

init_command_objects() None[source]

Sets up the command objects. Register the new Commands here.

SubID

TANGO property

CbfControllerAddress

FQDN of CBF CController

PssConfigAddress

TANGO property

PstConfigAddress

TANGO property

SW1Address

TANGO property

SW2Address

TANGO property

VCC

TANGO property

FSP

TANGO property

FspCorrSubarray

TANGO property

FspPssSubarray

TANGO property

FspPstSubarray

TANGO property

TalonBoard

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

frequencyOffsetK

Frequency offset (k) of all 197 receptors as an array of ints.

sysParam

the Dish ID - VCC ID mapping and frequency offset (k) in a json string

simulationMode

Device attribute.

class InitCommand(target, op_state_model, logger=None)[source]

Bases: InitCommand

A class for the CbfSubarray’s init_device() “command”.

do() Tuple[ResultCode, str][source]

Stateless hook for device initialisation. Initialize the attributes and the properties of the CbfSubarray.

Returns:

A tuple containing a return code and a string message indicating status. The message is for information purpose only.

Return type:

(ResultCode, str)

create_component_manager() CbfSubarrayComponentManager[source]

Create and return a subarray component manager.

Returns:

a subarray component manager

always_executed_hook() None[source]

methods always executed before any TANGO command is executed

delete_device() None[source]

Hook to delete device.

write_simulationMode(value: SimulationMode) None[source]

Set the Simulation Mode of the device.

Parameters:

value – SimulationMode

read_simulationMode() SimulationMode[source]

Read the Simulation Mode of the device.

Returns:

Simulation Mode of the device.

read_frequencyBand() int[source]

Return frequency band assigned to this subarray. One of [“1”, “2”, “3”, “4”, “5a”, “5b”, ]

Returns:

the frequency band

Return type:

int

read_receptors() List[str][source]

Return list of receptors assigned to subarray

Returns:

the list of receptor IDs

Return type:

List[str]

read_assignedVCCs() List[int][source]

Return list of VCCs assigned to subarray

Returns:

the list of VCC IDs

Return type:

List[int]

read_frequencyOffsetK() List[int][source]

Return frequencyOffsetK attribute: array of integers reporting receptors in subarray

write_frequencyOffsetK(value: List[int]) None[source]

Set frequencyOffsetK attribute

read_sysParam() str[source]

Return the sys param string in json format

Returns:

the sys param string in json format

Return type:

str

write_sysParam(value: str) None[source]

Set the sys param string in json format Should not be used by components external to Mid.CBF. To set the system parameters, refer to the CbfController Tango Commands at https://developer.skao.int/projects/ska-mid-cbf-mcs/en/latest/guide/interfaces/lmc_mcs_interface.html#cbfcontroller-tango-commands or the CbfController api docs at https://developer.skao.int/projects/ska-mid-cbf-mcs/en/latest/api/CbfController/index.html

Parameters:

value – the sys param string in json format

class RemoveReceptorsCommand(target, op_state_model, obs_state_model, logger=None)[source]

Bases: ReleaseResourcesCommand

A class for CbfSubarray’s RemoveReceptors() command. Equivalent to the ReleaseResourcesCommand in ADR-8.

do(argin: List[str]) Tuple[ResultCode, str][source]

Stateless hook for RemoveReceptors() command functionality.

Parameters:

argin – The receptors to be released

Returns:

A tuple containing a return code and a string message indicating status. The message is for information purpose only.

Return type:

(ResultCode, str)

validate_input(argin: List[str]) Tuple[bool, str][source]

Validate DISH/receptor IDs.

Parameters:

argin – The list of DISH/receptor IDs to remove.

Returns:

A tuple containing a boolean indicating if the configuration is valid and a string message. The message is for information purpose only.

Return type:

(bool, str)

RemoveReceptors(argin: List[str]) Tuple[ResultCode, 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)

class RemoveAllReceptorsCommand(target, op_state_model, obs_state_model, logger=None)[source]

Bases: ReleaseAllResourcesCommand

A class for CbfSubarray’s RemoveAllReceptors() command.

do() Tuple[ResultCode, str][source]

Stateless hook for RemoveAllReceptors() command functionality.

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[ResultCode, 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)

class AddReceptorsCommand(target, op_state_model, obs_state_model, logger=None)[source]

Bases: AssignResourcesCommand

A class for CbfSubarray’s AddReceptors() command.

do(argin: List[str]) Tuple[ResultCode, str][source]

Stateless hook for AddReceptors() command functionality.

Parameters:

argin – The receptors to be 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)

validate_input(argin: List[str]) Tuple[bool, str][source]

Validate DISH/receptor ID.

Parameters:

argin – The list of DISH/receptor IDs to add.

Returns:

A tuple containing a boolean indicating if the configuration is valid and a string message. The message is for information purpose only.

Return type:

(bool, str)

AddReceptors(argin: List[str]) Tuple[ResultCode, str][source]

Assign input receptors to this subarray. Set subarray to ObsState.IDLE if no receptors were previously assigned.

Parameters:

argin – list of DISH/receptors 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)

class ConfigureScanCommand(target, op_state_model, obs_state_model, logger=None)[source]

Bases: ConfigureScanCommand

A class for CbfSubarray’s ConfigureScan() command.

do(argin: str) Tuple[ResultCode, str][source]

Stateless hook for ConfigureScan() command functionality.

Parameters:

argin – The configuration as JSON formatted string.

Returns:

A tuple containing a return code and a string message indicating status. The message is for information purpose only.

Return type:

(ResultCode, str)

validate_input(argin: str) Tuple[bool, str][source]

Validate scan configuration.

Parameters:

argin – The configuration as JSON formatted string.

Returns:

A tuple containing a boolean indicating if the configuration is valid and a string message. The message is for information purpose only.

Return type:

(bool, str)

is_ConfigureScan_allowed()[source]

Check if command ConfigureScan is allowed in the current device state.

Returns:

True if the command is allowed

Return type:

boolean

ConfigureScan(argin: str) Tuple[ResultCode, str][source]

Change state to CONFIGURING. Configure attributes from input JSON. Subscribe events. Configure VCC, VCC subarray, FSP, FSP Subarray. publish output links.

Parameters:

argin – The configuration as JSON formatted string.

Returns:

A tuple containing a return code and a string message indicating status. The message is for information purpose only.

Return type:

(ResultCode, str)

class GoToIdleCommand(target, op_state_model, obs_state_model, logger=None)[source]

Bases: GoToIdleCommand

A class for the CbfSubarray’s GoToIdle command.

do()[source]

Stateless hook for GoToIdle() command functionality.

Returns:

A tuple containing a return code and a string message indicating status. The message is for information purpose only.

Return type:

(ResultCode, str)

GoToIdle()[source]

Transit the subarray from READY to IDLE obsState.

Returns:

‘DevVarLongStringArray’ A tuple containing a return code and a string message indicating status. The message is for information purpose only.

class ScanCommand(target, op_state_model, obs_state_model, logger=None)[source]

Bases: ScanCommand

A class for CbfSubarray’s Scan() command.

do(argin: str) Tuple[ResultCode, str][source]

Stateless hook for Scan() command functionality.

Parameters:

argin (str) – The scan ID as JSON formatted string.

Returns:

A tuple containing a return code and a string message indicating status. The message is for information purpose only.

Return type:

(ResultCode, str)

class EndScanCommand(target, op_state_model, obs_state_model, logger=None)[source]

Bases: EndScanCommand

A class for CbfSubarray’s EndScan() command.

do() Tuple[ResultCode, str][source]

Stateless hook for EndScan() command functionality.

Returns:

A tuple containing a return code and a string message indicating status. The message is for information purpose only.

Return type:

(ResultCode, str)

Abort()

Abort any long-running command such as Configure() or Scan().

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.

Return type:

(ResultCode, str)

AssignResources(argin)

Assign resources to this subarray.

To modify behaviour for this command, modify the do() method of the command class.

Parameters:

argin (list of str) – the resources to be 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)

CapabilityTypes

TANGO property

Configure(argin)

Redirect to ConfigureScan method. Configure a complete scan for the subarray.

Parameters:

argin – JSON configuration string

Returns:

‘DevVarLongStringArray’ A tuple containing a return code and a string message indicating status. The message is for information purpose only.

DebugDevice()

Enable remote debugging of this device.

To modify behaviour for this command, modify the do() method of the command class: DebugDeviceCommand.

End()

Transit the subarray from READY to IDLE obsState. Redirect to GoToIdle command.

Returns:

‘DevVarLongStringArray’ A tuple containing a return code and a string message indicating status. The message is for information purpose only.

EndScan()

End the scan.

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.

Return type:

(ResultCode, str)

GetVersionInfo()

Return the version information of the device.

To modify behaviour for this command, modify the do() method of the command class.

Returns:

Version details of the device.

GroupDefinitions

Device property.

Each string in the list is a JSON serialised dict defining the group_name, devices and subgroups 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 and subgroups 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()

Reset the current observation process.

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.

Return type:

(ResultCode, str)

Off()

Turn the device off.

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.

Return type:

(ResultCode, str)

On()

Turn device on.

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.

Return type:

(ResultCode, str)

ReleaseAllResources()

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 return code and a string message indicating status. The message is for information purpose only.

Return type:

(ResultCode, str)

ReleaseResources(argin)

Delta removal of assigned resources.

To modify behaviour for this command, modify the do() method of the command class.

Parameters:

argin (list of str) – the resources to be released

Returns:

A tuple containing a return code and a string message indicating status. The message is for information purpose only.

Return type:

(ResultCode, str)

Reset()

Reset the device from the FAULT state.

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.

Return type:

(ResultCode, str)

Restart()

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 return code and a string message indicating status. The message is for information purpose only.

Return type:

(ResultCode, str)

Scan(argin)

Start scanning.

To modify behaviour for this command, modify the do() method of the command class.

Parameters:

argin (Array of str) – Information about the scan

Returns:

A tuple containing a return code and a string message indicating status. The message is for information purpose only.

Return type:

(ResultCode, str)

SkaLevel

Device property.

Indication of importance of the device in the SKA hierarchy to support drill-down navigation: 1..6, with 1 highest.

Standby()

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.

Return type:

(ResultCode, str)

TangoClassClass

alias of CbfSubarrayClass

TangoClassName = 'CbfSubarray'
activationTime

Device attribute.

adminMode

Device attribute.

assignResourcesMaximumDuration

Device attribute.

assignResourcesMeasuredDuration

Device attribute.

assignResourcesProgress

Device attribute.

assignResourcesTimeoutExpiredFlag

Device attribute.

assignedResources

Device attribute.

buildState

Device attribute.

configurationDelayExpected

Device attribute.

configurationID

Device attribute.

configurationProgress

Device attribute.

configureScanMeasuredDuration

Device attribute.

configureScanTimeoutExpiredFlag

Device attribute.

configuredCapabilities

Device attribute.

controlMode

Device attribute.

healthState

Device attribute.

lastScanConfiguration

Device attribute.

listOfDevicesCompletedTasks

Device attribute.

loggingLevel

Device attribute.

See LoggingLevel

loggingTargets

Device attribute.

obsMode

Device attribute.

obsState

Device attribute.

outputDataRateToSdp

Device attribute.

releaseResourcesMaximumDuration

Device attribute.

releaseResourcesMeasuredDuration

Device attribute.

releaseResourcesProgress

Device attribute.

releaseResourcesTimeoutExpiredFlag

Device attribute.

scanID

Device attribute.

sdpDestinationAddresses

Device attribute.

sdpLinkActive

Device attribute.

testMode

Device attribute.

versionId

Device attribute.