Station Beam Device

@startuml
class StationBeamHealthEvaluator
StationBeamHealthEvaluator : +evaluate_health()
class StationBeamDriver
StationBeamDriver : +__init__()
StationBeamDriver : +connection_status()
StationBeamDriver : +is_locked()
class StationBeamHardwareFactory
StationBeamHardwareFactory : +__init__()
StationBeamHardwareFactory : +hardware()
class StationBeamHardwareManager
StationBeamHardwareManager : +__init__()
StationBeamHardwareManager : +is_locked()
class MccsStationBeam
MccsStationBeam : +__init__()
MccsStationBeam : +do()
MccsStationBeam : -_initialise_connections()
MccsStationBeam : -_initialise_hardware_management()
MccsStationBeam : -_initialise_health_monitoring()
MccsStationBeam : +interrupt()
MccsStationBeam : +init_command_objects()
MccsStationBeam : +always_executed_hook()
MccsStationBeam : +delete_device()
MccsStationBeam : +health_changed()
MccsStationBeam : +beamId()
MccsStationBeam : +stationIds()
MccsStationBeam : +stationTrl()
MccsStationBeam : +logicalBeamId()
MccsStationBeam : +updateRate()
MccsStationBeam : +isBeamLocked()
MccsStationBeam : +channels()
MccsStationBeam : +desiredPointing()
MccsStationBeam : +pointingDelay()
MccsStationBeam : +pointingDelayRate()
MccsStationBeam : +antennaWeights()
MccsStationBeam : +Configure()
StationBeamDriver : -_is_locked
StationBeamHardwareFactory : -_hardware
MccsStationBeam : -_thread
MccsStationBeam : -_lock
MccsStationBeam : -_interrupt
MccsStationBeam : -_health_state
MccsStationBeam : -_station_ids
MccsStationBeam : -_station_trl
MccsStationBeam : -_logical_beam_id
MccsStationBeam : -_desired_pointing
MccsStationBeam : -_antenna_weights

HardwareHealthEvaluator <|-- StationBeamHealthEvaluator
HardwareDriver <|-- StationBeamDriver
HardwareFactory <|-- StationBeamHardwareFactory
HardwareManager <|-- StationBeamHardwareManager
SKAObsDevice <|-- MccsStationBeam
StationBeamHardwareFactory -- StationBeamDriver
StationBeamHardwareManager -- StationBeamHardwareFactory
StationBeamHardwareManager -- StationBeamHealthEvaluator
MccsStationBeam -- StationBeamHardwareManager
@enduml

This module implements the MCCS station beam device.

class MccsStationBeam(*args, **kwargs)

An implementation of a station beam Tango device for MCCS.

Abort()

Abort the current scan associated with the station_beam.

Return type:

tuple[list[ResultCode], list[Optional[str]]]

Returns:

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

class AbortCommand(command_tracker, component_manager, callback, logger=None)

A class for MccsSubarrayBeam’s Abort() command.

__init__(command_tracker, component_manager, callback, logger=None)

Initialise a new AbortCommand instance.

Parameters:
  • command_tracker (CommandTracker) – the device’s command tracker

  • component_manager (StationBeamComponentManager) – the device’s component manager

  • callback (Callable[[bool], None]) – callback to be called when this command states and finishes

  • logger (Optional[Logger]) – a logger for this command object to yuse

do(*args, **kwargs)

Stateless hook for Abort() command functionality.

Parameters:
  • args (Any) – positional arguments to the command. This command does not take any, so this should be empty.

  • kwargs (Any) – keyword arguments to the command. This command does not take any, so this should be empty.

Return type:

tuple[ResultCode, str]

Returns:

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

ApplyPointing()

Apply pointing delays to antennas associated with the station_beam.

Return type:

tuple[list[ResultCode], list[Optional[str]]]

Returns:

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

AssignResources(argin)

Assign resources to the station beam with all relevant parameters.

Parameters:

argin (str) – Assign Resources parameters encoded in a json string

Return type:

tuple[list[ResultCode], list[Optional[str]]]

Returns:

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

Configure(argin)

Configure the station_beam with all relevant parameters.

Parameters:

argin (str) – Configuration parameters encoded in a json string

Return type:

tuple[list[ResultCode], list[Optional[str]]]

Returns:

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

End()

Deconfigure the station_beam.

Return type:

tuple[list[ResultCode], list[Optional[str]]]

Returns:

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

EndScan()

Stop the current scan associated with the station_beam.

Return type:

tuple[list[ResultCode], list[Optional[str]]]

Returns:

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

class InitCommand(*args, **kwargs)

A class for MccsStationBeam’s Init command.

The do() method below is

called upon MccsStationBeam’s initialisation.

do()

Initialise the attributes and properties of the MccsStationBeam.

Return type:

tuple[ResultCode, str]

Returns:

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

ObsReset()

Reset to IDLE the station_beam.

Return type:

tuple[list[ResultCode], list[Optional[str]]]

Returns:

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

ReleaseAllResources()

Release all allocated resources from the station_beam.

Return type:

tuple[list[ResultCode], list[Optional[str]]]

Returns:

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

Restart()

Restart to EMPTY the station_beam.

Return type:

tuple[list[ResultCode], list[Optional[str]]]

Returns:

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

Scan(argin)

Start the scan associated with the station_beam.

Parameters:

argin (str) – Configuration parameters encoded in a json string

Return type:

tuple[list[ResultCode], list[Optional[str]]]

Returns:

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

ToFault()

Put this station beam in ObsState.FAULT.

This is for use in testing only.

Return type:

tuple[list[ResultCode], list[Optional[str]]]

Returns:

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

__init__(*args, **kwargs)

Initialise this device object.

Parameters:
  • args (Any) – positional args to the init

  • kwargs (Any) – keyword args to the init

antennaWeights()

Return the antenna weights configured for this beam.

Return type:

list[float]

Returns:

antenna weightd

apertureId()

Return the Aperture Id.

Return type:

str

Returns:

the station beam Aperture Id, in the form APx.y y=substation

beamId()

Return the station beam id.

Return type:

int

Returns:

the station beam id

channels()

Return the ids of the channels configured for this beam.

Return type:

list[list[int]]

Returns:

channel ids

create_component_manager()

Create and return a component manager for this device.

Return type:

StationBeamComponentManager

Returns:

a component manager for this device.

desiredPointing()

Return the desired pointing of this beam.

Return type:

list[float]

Returns:

the desired point of this beam, conforming to the Sky Coordinate Set definition

hardwareBeamId()

Return the timestamp used for the pointing coordinates.

Return type:

int

Returns:

the timestamp used for the pointing coordinates.

healthModelParams(argin)

Set the params for health transition rules.

Parameters:

argin (str) – JSON-string of dictionary of health states

Return type:

None

init_command_objects()

Initialise the command handlers for commands supported by this device.

Return type:

None

init_device()

Initialise the device.

Return type:

None

isBeamLocked()

Return a flag indicating whether the beam is locked or not.

Return type:

bool

Returns:

whether the beam is locked or not

logicalBeamId()

Return the logical beam id.

Todo:

this documentation needs to differentiate logical beam id from beam id

Return type:

int

Returns:

the logical beam id

phaseCentre()

Return the phase centre.

Return type:

list[float]

Returns:

the phase centre

pointingDelay()

Return the pointing delay of this beam.

Return type:

list[float]

Returns:

the pointing delay of this beam

pointingDelayRate()

Return the pointing delay rate of this beam.

Return type:

list[float]

Returns:

the pointing delay rate of this beam

pointingReferenceFrame()

Return the Reference Frame ID for the pointing coordinates.

Return type:

str

Returns:

the Reference Frame ID for the pointing coordinates

pointingTimestamp()

Return the timestamp used for the pointing coordinates.

Return type:

str

Returns:

the timestamp used for the pointing coordinates.

scanId()

Return the scan ID for the current scan.

Return type:

int

Returns:

the scan ID or 0 if not scanning

stationId()

Return the station id.

Return type:

int

Returns:

the station id

stationTrl()

Return the station TRL.

Return type:

str

Returns:

the station TRL

subarrayId()

Return the subarray id.

Return type:

int

Returns:

the subarray id

updateRate()

Return the update rate (in seconds) for this station beam.

Return type:

float

Returns:

the update rate for this station beam

main(*args, **kwargs)

Entry point for module.

Parameters:
  • args (str) – positional arguments

  • kwargs (str) – named arguments

Return type:

int

Returns:

exit code