Station module (ska_low_mccs.station)

@startuml
class MccsStation
MccsStation : +__init__()
MccsStation : +do()
MccsStation : -_initialise_connections()
MccsStation : -_initialise_device_pool()
MccsStation : -_initialise_health_monitoring()
MccsStation : +interrupt()
MccsStation : +always_executed_hook()
MccsStation : +delete_device()
MccsStation : +health_changed()
MccsStation : +subarrayId()
MccsStation : +transientBufferFQDN()
MccsStation : +isCalibrated()
MccsStation : +isConfigured()
MccsStation : +calibrationJobId()
MccsStation : +daqJobId()
MccsStation : +dataDirectory()
MccsStation : +beamFQDNs()
MccsStation : +delayCentre()
MccsStation : +calibrationCoefficients()
MccsStation : +init_command_objects()
MccsStation : +Configure()
MccsStation : +InitialSetup()
MccsStation : -_thread
MccsStation : -_lock
MccsStation : -_interrupt
MccsStation : -_health_state
MccsStation : -_subarray_id
MccsStation : -_delay_centre

SKAObsDevice <|-- MccsStation
@enduml

MCCS Station.

MccsStation is the Tango device class for the MCCS Station prototype.

class MccsStation(*args, **kwargs)[source]

MccsStation is the Tango device class for the MCCS Station prototype.

This is a subclass of ska_tango_base.SKAObsDevice.

Properties:

  • Device Property
    StationId
    • MCCS station ID for this station

    • Type: int (scalar attribute)

    APIUFQDNs
    • The FQDN of this station’s APIU

    • Type: str (spectrum attribute)

    TileFQDNs
    • List of Tile FQDNs

    • Type: str (spectrum attribute)

    AntennaFQDNs
    • List of Antenna FQDNs

    • Type: str (spectrum attribute)

ApplyPointing(argin)[source]

Set the pointing delay parameters of this Station’s Tiles.

Parameters

argin (list(float)) – an array containing a beam index followed by antenna delays

Returns

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

Return type

(ResultCode, str)

Example

>>> dp = tango.DeviceProxy("mccs/station/01")
>>> dp.command_inout("ApplyPointing", delay_list)
class ApplyPointingCommand(*args, **kwargs)[source]

Class for handling the ApplyPointing(argin) command.

do(argin)[source]

Implementation of MccsStation.ApplyPointing() command functionality.

Parameters

argin (list(float)) – an array containing a beam index and antenna delays

Returns

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

Return type

(ResultCode, str)

Configure(argin)[source]

Configure the station with all relevant parameters.

Parameters

argin (str) – Configuration parameters encoded 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)

Example

>>> dp = tango.DeviceProxy("mccs/station/01")
>>> dp.command_inout("Configure", json_str)
class ConfigureCommand(*args, **kwargs)[source]

Class for handling the Configure() command.

do(argin)[source]

Stateless hook implementing the functionality of the MccsStation.Configure() command

Parameters

argin (str) – Configuration specification dict as 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)

class DisableCommand(*args, **kwargs)[source]

Class for handling the Disable() command.

do()[source]

Stateless hook implementing the functionality of the (inherited) ska_tango_base.SKABaseDevice.Disable() command for this MccsStation device.

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 InitCommand(target, state_model, logger=None)[source]

Class that implements device initialisation for the MCCS Station is managed under the hood; the basic sequence is:

  1. Device state is set to INIT

  2. The do() method is run

  3. Device state is set to the appropriate outgoing state, usually off

__init__(target, state_model, logger=None)[source]

Create a new InitCommand.

Parameters
  • target (object) – the object that this command acts upon; for example, the device for which this class implements the command

  • state_model (DeviceStateModel) – the state model that this command uses to check that it is allowed to run, and that it drives with actions.

  • logger (logging.Logger) – the logger to be used by this Command. If not provided, then a default module logger will be used.

do()[source]

Initialises the attributes and properties of the MccsStation.

Returns

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

Return type

(ResultCode, str)

interrupt()[source]

Interrupt the initialisation thread (if one is running)

Returns

whether the initialisation thread was interrupted

Return type

bool

InitialSetup()[source]

Initial setup the station.

Returns

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

Return type

(ResultCode, str)

Example

>>> dp = tango.DeviceProxy("mccs/station/01")
>>> dp.command_inout("InitialSetup")
class InitialSetupCommand(*args, **kwargs)[source]

Class for handling the InitialSetup() command.

do()[source]

Stateless hook implementing the functionality of the MccsStation.InitialSetup() command

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(*args, **kwargs)[source]

Class for handling the Off() command.

do()[source]

Stateless hook implementing the functionality of the (inherited) ska_tango_base.SKABaseDevice.Off() command for this MccsStation device.

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(json_args)[source]

Send a message to turn the station on.

Method returns as soon as the message has been enqueued.

Parameters

json_args – JSON encoded messaging system and command arguments

Returns

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

Return type

(ResultCode, str)

OnCallback(json_args)[source]

On callback method.

Parameters

json_args – Argument containing JSON encoded command message and result

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 OnCallbackCommand(*args, **kwargs)[source]

Class for handling the On Callback command.

do(argin)[source]

Stateless do hook for implementing the functionality of the MccsStation.OnCallback() command.

Parameters

argin – Argument containing JSON encoded command message and result

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 OnCommand(*args, **kwargs)[source]

Class for handling the On() command.

do(argin)[source]

Stateless hook implementing the functionality of the (inherited) ska_tango_base.SKABaseDevice.On() command for this MccsStation device.

Parameters

argin – JSON encoded messaging system and command arguments

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(*args, **kwargs)[source]

Class for handling the Standby() command.

do()[source]

Stateless hook implementing the functionality of the (inherited) ska_tango_base.SKABaseDevice.Standby() command for this MccsStation device.

Returns

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

Return type

(ResultCode, str)

aHeartBeat()[source]

Return the Heartbeat attribute value.

Returns

heart beat as a percentage

aPoolStats()[source]

Return the aPoolStats attribute.

Returns

aPoolStats attribute

aQueueDebug(debug_string)[source]

Update the queue debug attribute.

Parameters

debug_string (str) – the new debug string for this attribute

always_executed_hook()[source]

Method always executed before any TANGO command is executed.

beamFQDNs()[source]

Return the FQDNs of station beams associated with this station.

Returns

the FQDNs of station beams associated with this station

Return type

list(str)

calibrationCoefficients()[source]

Return the calibration coefficients for the station.

Todo

How big should this array be? Gain and offset per antenna per channel. This station can have up to 16 tiles of up to 16 antennas, so that is 2 x 16 x 16 = 512 coefficients per channel. But how many channels?

Returns

the calibration coefficients

Return type

list(float)

calibrationJobId()[source]

Return the calibration job id.

Returns

the calibration job id

Return type

int

commandProgress()[source]

Return the commandProgress attribute value.

Returns

command progress as a percentage

daqJobId()[source]

Return the DAQ job id.

Returns

the DAQ job id

Return type

int

dataDirectory()[source]

Return the data directory (the parent directory for all files generated by this station)

Returns

the data directory

Return type

str

delayCentre(value)[source]

Set the delay centre of the station.

Parameters

value (list(float)) – WGS84 position

delete_device()[source]

Hook to delete resources allocated in the do() method of the nested InitCommand class.

This method allows for any memory or other resources allocated in the do() method to be released. This method is called by the device destructor, and by the Init command when the Tango device server is re-initialised.

health_changed(health)[source]

Callback to be called whenever the HealthModel’s health state changes; responsible for updating the tango side of things i.e. making sure the attribute is up to date, and events are pushed.

Parameters

health (HealthState) – the new health value

init_command_objects()[source]

Set up the handler objects for Commands.

init_device()[source]

Initialise the device; overridden here to change the Tango serialisation model.

isCalibrated()[source]

Return a flag indicating whether this station is currently calibrated or not.

Returns

a flag indicating whether this station is currently calibrated or not.

Return type

bool

isConfigured()[source]

Return a flag indicating whether this station is currently configured or not.

Returns

a flag indicating whether this station is currently configured or not.

Return type

bool

subarrayId(subarray_id)[source]

Set the ID of the Subarray to which this Station is allocated Note: ID propogates to each tile in this station too

Parameters

subarray_id (int) – the new subarray id for this station

transientBufferFQDN()[source]

Return the FQDN of the TANGO device that managers the transient buffer.

Returns

the FQDN of the TANGO device that managers the transient buffer

Return type

str

main(args=None, **kwargs)[source]

Entry point for module.

Parameters
  • args (list) – positional arguments

  • kwargs (dict) – named arguments

Returns

exit code

Return type

int