Antenna subpackage
This subpackage implements antenna functionality for MCCS.
- 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 usemax_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 changescomponent_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:
- Return type:
- Returns:
a result code and response string
- off(task_callback=None)
Submit the off slow task.
This method returns immediately after it submitted self._off for execution.
- on(task_callback=None)
Submit the on slow task.
This method returns immediately after it submitted self._on for execution.
- 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:
- 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:
- start_communicating()
Establish communication with the component, then start monitoring.
- Return type:
- stop_communicating()
Cease monitoring the component, and break off all communication with it.
- Return type:
- class AntennaHealthModel(component_state_callback, thresholds=None)
A health model for an antenna.
- __init__(component_state_callback, thresholds=None)
Initialise a new instance.
- evaluate_health()
Compute overall health of the station.
The overall health is based on the fault and communication status of the station overall, together with the health of the FieldStation, antennas and tiles that it manages.
This implementation simply sets the health of the station to the health of its least healthy component.
- Return type:
- Returns:
an overall health of the station
- fieldstation_health_changed(fieldstation_health)
Handle a change in FieldStation health.
- Parameters:
fieldstation_health (
Optional
[HealthState
]) – the health state of the FieldStation- Return type:
- tile_adc_rms_changed(tile_adc_rms)
Handle a change in tile adc reading.
- tile_health_changed(tile_health)
Handle a change in tile health.
- Parameters:
tile_health (
Optional
[HealthState
]) – the health state of the tile- Return type:
- class MccsAntenna(*args, **kwargs)
An implementation of an antenna Tango device for MCCS.
- Configure(argin)
Configure the antenna device attributes.
Also configures children device that are connected to the antenna.
- class InitCommand(*args, **kwargs)
Class that implements device initialisation for the MCCS antenna device.
- do(*args, **kwargs)
Stateless hook for device initialisation.
Initialises the attributes and properties of the
MccsAntenna
.- Parameters:
- Return type:
- 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.
- bandpassCoefficient()
Return the bandpassCoefficient attribute.
- calibrationCoefficient()
Get the Calibration coefficients.
The coefficients to be applied for the next frequency channel in the calibration cycle.
- create_component_manager()
Create and return a component manager for this device.
- Return type:
- Returns:
a component manager for this device.
- delayRates()
Return the delayRates attribute.
- fieldNodeLatitude()
Return the fieldNodeLatitude attribute.
- Return type:
- Returns:
the Latitude of field node centre
- fieldNodeLongitude()
Return the fieldNodeLongitude attribute.
- Return type:
- Returns:
the Longitude of field node centre
- healthModelParams(argin)
Set the params for health transition rules.
- init_command_objects()
Initialise the command handlers for commands supported by this device.
- Return type:
- init_device()
Initialise the device.
This is overridden here to change the Tango serialisation model.
- Return type:
- is_On_allowed()
Check if command On is allowed in the current device state.
- Return type:
- Returns:
True
if the command is allowed
- logicalAntennaId()
Return the logical antenna ID attribute.
- Return type:
- Returns:
the logical antenna ID
- pointingCoefficient()
Return the pointingCoefficient attribute.
- simulationMode(value)
Set the simulation mode of this device.
- Parameters:
value (
SimulationMode
) – the new simulation mode- Raises:
ValueError – because this device cannot be put into simulation mode.
- Return type:
- timestampOfLastSpectrum()
Return the timestampOfLastSpectrum attribute.
- Return type:
- Returns:
the timestamp of the last spectrum
- xDisplacement()
Return the horizontal displacement east attribute.
- Return type:
- Returns:
the horizontal displacement eastwards from station reference position
- xPolarisationFaulty()
Return the xPolarisationFaulty attribute.
- Return type:
- Returns:
the x-polarisation faulty flag
- xPolarisationScalingFactor()
Return the logical antenna ID attribute.
- yDisplacement()
Return the horizontal displacement north attribute.
- Return type:
- Returns:
the horizontal displacement northwards from station reference position
- yPolarisationFaulty()
Return the yPolarisationFaulty attribute.
- Return type:
- Returns:
the y-polarisation faulty flag
- yPolarisationScalingFactor()
Return the yPolarisationScalingFactor attribute.
- Antenna component manager
AntennaComponentManager
AntennaComponentManager.__init__()
AntennaComponentManager.configure()
AntennaComponentManager.current
AntennaComponentManager.off()
AntennaComponentManager.on()
AntennaComponentManager.power_state
AntennaComponentManager.power_state_lock
AntennaComponentManager.reset()
AntennaComponentManager.standby()
AntennaComponentManager.start_communicating()
AntennaComponentManager.stop_communicating()
AntennaComponentManager.temperature
AntennaComponentManager.voltage
- Antenna device
MccsAntenna
MccsAntenna.Configure()
MccsAntenna.InitCommand
MccsAntenna.__init__()
MccsAntenna.altitude()
MccsAntenna.antennaId()
MccsAntenna.bandpassCoefficient()
MccsAntenna.calibrationCoefficient()
MccsAntenna.create_component_manager()
MccsAntenna.current()
MccsAntenna.delayRates()
MccsAntenna.delays()
MccsAntenna.fieldNodeLatitude()
MccsAntenna.fieldNodeLongitude()
MccsAntenna.first()
MccsAntenna.gain()
MccsAntenna.healthModelParams()
MccsAntenna.init_command_objects()
MccsAntenna.init_device()
MccsAntenna.is_On_allowed()
MccsAntenna.logicalAntennaId()
MccsAntenna.pointingCoefficient()
MccsAntenna.position()
MccsAntenna.rms()
MccsAntenna.simulationMode()
MccsAntenna.spectrumX()
MccsAntenna.spectrumY()
MccsAntenna.temperature()
MccsAntenna.timestampOfLastSpectrum()
MccsAntenna.voltage()
MccsAntenna.xDisplacement()
MccsAntenna.xPolarisationFaulty()
MccsAntenna.xPolarisationScalingFactor()
MccsAntenna.yDisplacement()
MccsAntenna.yPolarisationFaulty()
MccsAntenna.yPolarisationScalingFactor()
MccsAntenna.zDisplacement()
main()
- Antenna health model
- Antenna health rules