Tile Cli

The command line interface for the MCCS Tile device server.

class CliMeta(name: str, bases: tuple[ska_low_mccs_spshw.tile.tile_cli.CliMeta], attrs: dict)

Metaclass to catch and dissect exceptions for all class methods.

They get turned into fire.core.FireError exceptions.

classmethod fire_except(method)

Wrap the method to handle exceptions.

Any tango.DevFailed exception raised by a method is converted to a fire.core.FireError, so that the CLI framework handles it nicely.

Parameters:

method (Callable) – the method to be wrapped

Return type:

Callable

Returns:

the wrapped method

class MccsTileCli

CLI interface to ska_low_mccs_spshw.tile.tile_device.MccsTile.

ConfigureIntegratedBeamData(integration_time=0.5)

Configure the transmission of integrated beam data with the integration time.

Parameters:

integration_time (float) – integration time in seconds, defaults to 0.5

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.

ConfigureIntegratedChannelData(integration_time=0.5)

Configure the transmission of integrated channel data with the integration time.

Parameters:

integration_time (float) – integration_time in seconds (defaults to 0.5)

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.

LoadPointingDelay(load_time=0)

Load the pointing delays at the specified time delay.

Parameters:

load_time (int) – time delay (default = 0)

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.

SendBeamData(timestamp=None, seconds=0.2)

Transmit a snapshot containing beamformed data.

Parameters:
  • timestamp (Optional[str]) – when to start(?), defaults to None

  • seconds (float) – when to synchronise, defaults to 0.2

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.

SendChannelisedData(num_samples=128, first_channel=0, last_channel=511, timestamp=None, seconds=0.2)

Transmit a snapshot 0f channelized data totalling number_of_samples spectra.

Parameters:
  • num_samples (int) – number of spectra to send, defaults to 1024

  • first_channel (int) – first channel to send, defaults to 0

  • last_channel (int) – last channel to send, defaults to 511

  • timestamp (Optional[str]) – when to start(?), defaults to None

  • seconds (float) – when to synchronise, defaults to 0.2

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.

SendChannelisedDataContinuous(channel_id=None, num_samples=128, wait_seconds=0, timestamp=None, seconds=0.2)

Transmit channelised data continuously.

Parameters:
  • channel_id (Optional[int]) – index of channel to send

  • num_samples (int) – number of spectra to send, defaults to 1024

  • wait_seconds (int) – wait time before sending data

  • timestamp (Optional[str]) – when to start(?), defaults to None

  • seconds (float) – when to synchronise, defaults to 0.2

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.

Raises:

ValueError – if a general failure occurred in device

SendRawData(sync=False, timestamp=None, seconds=0.2)

Transmit a snapshot containing raw antenna data.

Parameters:
  • sync (bool) – whether synchronised, defaults to False

  • timestamp (Optional[str]) – when to start(?), defaults to None

  • seconds (float) – when to synchronise, defaults to 0.2

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.

StartBeamformer(start_time=0, duration=-1)

Start the beamformer at the specified time delay.

Parameters:
  • start_time (int) – the start time

  • duration (int) – how long to run (default is -1, meaning run forever)

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.

StopBeamformer()

Stop the beamformer.

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.

__init__()

Initialise a new CLI instance.

Hardcoded to connect to “low-mccs/tile/0001”.

connect()

Connect to the hardware.

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.

logginglevel(level=None)

Get and/or set the logging level of the device.

Parameters:

level (Optional[str]) – the logging level to be set. If omited, return the current logging level

Return type:

str

Returns:

logging level value

subarrayid()

Return the id of the subarray the tile has been allocated to.

Return type:

int

Returns:

subarray ID

command_result_as_string(method)

Wrap and format device command results as a two-line string.

Parameters:

method (Callable) – function handle of the method to wrap

Return type:

Callable

Returns:

function handle of the wrapped method

main(*args, **kwargs)

Entry point for module.

Parameters:
  • args (str) – positional arguments

  • kwargs (str) – named arguments

Return type:

int

Returns:

exit code