Antenna Component Manager

This module implements an component manager for an MCCS antenna Tango device.

class AntennaComponentManager(field_station_name, antenna_id, tile_trl, tile_channels, logger, max_workers, communication_state_callback, component_state_callback)

A component manager for managing the component of an MCCS antenna Tango device.

Since there is no way to monitor and control an antenna directly, this component manager simply proxies certain commands to the FieldStation and/or tile Tango device.

__init__(field_station_name, antenna_id, tile_trl, tile_channels, logger, max_workers, communication_state_callback, component_state_callback)

Initialise a new instance.

Parameters:
  • field_station_name (str) – the TRL of the Tango device for this antenna’s FieldStation.

  • antenna_id (int) – the logical id of this antenna (1-256)

  • tile_trl (str) – the TRL of the Tango device for this antenna’s tile.

  • tile_channels (tuple[int, int]) – the tile ADC channels containing Y and X signal from this antenna.

  • logger (Logger) – a logger for this object to use

  • max_workers (int) – the maximum worker threads for the slow commands associated with this component manager.

  • communication_state_callback (Callable[[CommunicationStatus], None]) – callback to be called when the status of the communications channel between the component manager and its component changes

  • component_state_callback (Callable[..., None]) – callback to be called when the component state changes

configure(task_callback=None, *, interface=None, antenna_config, tile_config)

Submit the configure method.

This method returns immediately after it submitted self._configure for execution.

Parameters:
  • interface (Optional[str]) – the schema version this is running against.

  • antenna_config (dict) – antenna config

  • tile_config (dict) – tile config

  • task_callback (Optional[Callable]) – Update task state, defaults to None

Return type:

tuple[TaskStatus, str]

Returns:

a result code and response string

property current: float

Return the antenna’s current.

Returns:

the current of this antenna

off(task_callback=None)

Submit the off slow task.

This method returns immediately after it submitted self._off for execution.

Parameters:

task_callback (Optional[Callable]) – Update task state, defaults to None

Return type:

tuple[TaskStatus, str]

Returns:

task status and message

on(task_callback=None)

Submit the on slow task.

This method returns immediately after it submitted self._on for execution.

Parameters:

task_callback (Optional[Callable]) – Update task state, defaults to None

Return type:

tuple[TaskStatus, str]

Returns:

task status and message

property power_state: ska_control_model.PowerState | None

Return my power state.

Returns:

my power state

property power_state_lock: RLock

Return the power state lock of this component manager.

Returns:

the power state lock of this component manager.

reset(task_callback=None)

Reset the antenna; this is not implemented.

This raises NotImplementedError because the antenna is passive hardware and cannot meaningfully be reset.

Parameters:

task_callback (Optional[Callable]) – Update task state, defaults to None

Raises:

NotImplementedError – because the antenna’s power state is not controlled via the Tile device; it is controlled via the FieldStation device.

Return type:

tuple[TaskStatus, str]

standby(task_callback=None)

Put the antenna into standby state; this is not implemented.

This raises NotImplementedError because the antenna has no standby state.

Parameters:

task_callback (Optional[Callable]) – Update task state, defaults to None

Raises:

NotImplementedError – because the antenna has no standby state.

Return type:

tuple[TaskStatus, str]

start_communicating()

Establish communication with the component, then start monitoring.

Return type:

None

stop_communicating()

Cease monitoring the component, and break off all communication with it.

Return type:

None

property temperature: float

Return the antenna’s temperature.

Returns:

the temperature of this antenna

property voltage: float

Return the antenna’s voltage.

Returns:

the voltage of this antenna