CbfController Class

class ska_mid_cbf_mcs.controller.controller_device.CbfController(cl, name)[source]

Bases: SKAController

CbfController TANGO device class. Primary point of contact for monitoring and control of Mid.CBF. Implements state and mode indicators, and a set of state transition commmands.

CbfSubarray

TANGO property

VCC

TANGO property

FSP

TANGO property

TalonLRU

TANGO property

TalonBoard

TANGO property

PowerSwitch

TANGO property

FsSLIM

TANGO property

VisSLIM

TANGO property

TalonDxConfigPath

TANGO property

HWConfigPath

TANGO property

FsSLIMConfigPath

TANGO property

VisSLIMConfigPath

TANGO property

LruTimeout

TANGO property

commandProgress

Percentage progress implemented for commands that result in state/mode transitions for a large number of components and/or are executed in stages (e.g power up, power down)

sysParam

Maps Dish ID to VCC and frequency offset k. The string is in JSON format.

sourceSysParam

Source and file path to the file to be retrieved through the Telescope Model. The string is in JSON format.

simulationMode

Device attribute.

init_command_objects() None[source]

Sets up the command objects

get_num_capabilities() None[source]

Get number of capabilities for _init_Device. If property not found in db, then assign a default amount(197,27,16)

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

Bases: InitCommand

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

Stateless hook for device initialisation. :return: A tuple containing a return code and a string message indicating status. The message is for information purpose only. :return: (ResultCode, str)

always_executed_hook() None[source]

Hook to be executed before any command.

create_component_manager() ControllerComponentManager[source]

Create and return a component manager for this device.

Returns:

a component manager for this device.

delete_device() None[source]

Unsubscribe to events, turn all the subarrays, VCCs and FSPs off

read_commandProgress() int[source]

Return commandProgress attribute: percentage progress implemented for commands that result in state/mode transitions for a large number of components and/or are executed in stages (e.g power up, power down)

read_sysParam() str[source]

Return the mapping from Dish ID to VCC and frequency offset k. The string is in JSON format.

read_sourceSysParam() str[source]

Return the location of the json file that contains the mapping from Dish ID to VCC and frequency offset k, to be retrieved using the Telescope Model.

read_dishToVcc() List[str][source]

Return ‘dishID:vccID’

read_vccToDish() List[str][source]

Return dishToVcc attribute: ‘vccID:dishID’

write_simulationMode(value: SimulationMode) None[source]

Set the Simulation Mode of the device.

Parameters:

value – SimulationMode

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

Bases: OnCommand

A class for the CbfController’s On() command.

is_allowed(raise_if_disallowed=False) bool[source]

Determine if OnCommand is allowed.

Returns:

if OnCommand is allowed

Return type:

bool

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

Stateless hook for On() 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)

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

Bases: OffCommand

A class for the CbfController’s Off() command.

is_allowed(raise_if_disallowed=False) bool[source]

Determine if OffCommand is allowed.

Returns:

if OffCommand is allowed

Return type:

bool

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

Stateless hook for Off() 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)

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

Bases: StandbyCommand

A class for the CbfController’s Standby() command.

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

Stateless hook for Standby() command functionality. Turn off subarray, vcc, fsp, turn CbfController to standby

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 InitSysParamCommand(target, *args, logger=None, **kwargs)[source]

Bases: ResponseCommand

A class for the CbfController’s InitSysParam() command.

is_allowed() bool[source]

Determine if InitSysParamCommand is allowed (allowed when state is OFF).

Returns:

if InitSysParamCommand is allowed

Return type:

bool

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

This command sets the Dish ID - VCC ID mapping and k values

Parameters:

argin – the Dish ID - VCC ID mapping and frequency offset (k) in a json 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)

InitSysParam(argin: str) tango.DevVarLongStringArray[source]

‘InitSysParam’ TANGO command

Parameters:

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

Returns:

Tuple containing a return code and a string message indicating the status of the command.

Return type:

DevVarLongStringArray

DebugDevice()

Enable remote debugging of this device.

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

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.

MaxCapabilities

TANGO property

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)

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)

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 CbfControllerClass

TangoClassName = 'CbfController'
adminMode

Device attribute.

availableCapabilities

Device attribute.

buildState

Device attribute.

controlMode

Device attribute.

elementAlarmAddress

Device attribute.

elementDatabaseAddress

Device attribute.

elementLoggerAddress

Device attribute.

elementTelStateAddress

Device attribute.

healthState

Device attribute.

isCapabilityAchievable(argin)

Check if provided capabilities can be achieved by the resource(s).

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

Parameters:

argin (tango.DevVarLongStringArray.) –

An array consisting pair of

  • [nrInstances]: DevLong. Number of instances of the capability.

  • [Capability types]: DevString. Type of capability.

Returns:

True if capability can be achieved, False if cannot

Return type:

DevBoolean

loggingLevel

Device attribute.

See LoggingLevel

loggingTargets

Device attribute.

maxCapabilities

Device attribute.

testMode

Device attribute.

versionId

Device attribute.