Station Component Manager
This module implements component management for stations.
- class StationComponentManager(station_id, ref_latitude, ref_longitude, ref_height, field_station_trl, antenna_trls, station_calibrator_trl, sps_station_trl, logger, max_workers, communication_state_callback, component_state_callback)
A component manager for a station.
- __init__(station_id, ref_latitude, ref_longitude, ref_height, field_station_trl, antenna_trls, station_calibrator_trl, sps_station_trl, logger, max_workers, communication_state_callback, component_state_callback)
Initialise a new instance.
- Parameters:
station_id (
int
) – the id of this stationref_latitude (
float
) – reference latitude of the station.ref_longitude (
float
) – reference longitude of the station.ref_height (
float
) – reference ellipsoidal height of the station.field_station_trl (
str
) – TRL of the Tango device that manages this station’s FieldStationantenna_trls (
Sequence
[str
]) – TRLs of the Tango devices and manage this station’s antennasstation_calibrator_trl (
str
) – TRL of the Tango devices and manage this station’s station calibratorsps_station_trl (
str
) – TRL of the Tango devices and manage this station’s Spshw stationlogger (
Logger
) – the logger to be used by this object.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 changescomponent_state_callback (
Callable
[...
,None
]) – callback to be called when the component state changes
- apply_configuration(transaction_id, task_callback=None)
Apply the beamformer and calibration configuration to SpsStation.
- apply_pointing_delays(load_time, task_callback=None)
Submit the apply_pointing method.
This method returns immediately after it submitted self._apply_pointing for execution.
- property beamformer_table: list[list[int]]
Return the channel table reformatted as would be needed by ConfigureChannels.
- Returns:
reformatted channel table
- configure_channels(channel_blocks)
Configure channels for a station beam in the channel table.
- Parameters:
- Return type:
- Returns:
a result code and response string
- configure_semi_static(task_callback=None, *, interface=None, station_config, field_station_config, antenna_config)
Submit the configure method.
TODO Check if this is required anymore This method returns immediately after it submitted self._configure_semi_static for execution.
- Parameters:
interface (
Optional
[str
]) – the schema version this is running against.station_config (
dict
) – Configuration specification for the station device.field_station_config (
Optional
[dict
]) – Configuration specification for the field station device.antenna_config (
Optional
[dict
]) – Configuration specification for the antenna deviced.task_callback (
Optional
[Callable
]) – Update task state, defaults to None
- Return type:
- Returns:
a result code and response string
- deallocate_subarray(subarray_id)
Clear channels for a station beam in the channel table.
- Parameters:
subarray_id (
int
) – subarray_id to clear- Return type:
- Returns:
a result code and response string
- end_scan(subarray_id, task_callback=None, task_abort_event=None)
Submit the EndScan slow task.
This method returns immediately after it is submitted for execution.
- get_pointing_delays(task_callback=None, *, interface=None, pointing_type, values, time_step=10.0, reference_time=None)
Get the pointing delays for this station.
- Parameters:
interface (
Optional
[str
]) – the schema version this is running against.pointing_type (
str
) – the type of pointing requestedvalues (
dict
) – the pointing values, either in alt_az or ra_decreference_time (
Optional
[str
]) – time in which coordinates are equal, in ISO8601 formatted astropy.Time timetime_step (
float
) – How long between each time step in secondstask_callback (
Optional
[Callable
]) – callback to signal end of command
- Return type:
- Returns:
list of pointing delays
- initialise(task_callback=None)
Submit the initialise method.
This method returns immediately after it submitted self._initialise for execution.
- property is_configured: bool
Return whether this station component manager is configured.
- Returns:
whether this station component manager is configured.
- load_pointing_delays(delays, task_callback=None)
Load the pointing delays for this station.
- property number_of_channels: int
Return the total number of channels in the beamformer.
- Returns:
the total numebr of channels
- off(task_callback=None)
Submit the _off method.
This method returns immediately after it submitted self._off for execution.
- on(task_callback=None)
Submit the _on method.
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.
- property ref_latitude: float
Return whether this stations latitude.
- Returns:
this stations latitude.
- property ref_longitude: float
Return whether this stations longitude.
- Returns:
this stations longitude.
- scan(task_callback=None, *, interface=None, subarray_id, scan_id, start_time=None, duration=0.0)
Submit the Scan slow task.
This method returns immediately after it is submitted for execution.
- Parameters:
interface (
Optional
[str
]) – the schema version this is running against.subarray_id (
int
) – The subarray for whic the command appliesscan_id (
int
) – The ID for this scanstart_time (
Optional
[str
]) – UTC time for begin of scan, None for immediate startduration (
Optional
[float
]) – Scan duration in seconds. 0.0 or omitted means forevertask_callback (
Optional
[Callable
]) – Update task state, defaults to None
- Return type:
- Returns:
Task status and response message
- property scan_ids: list[int]
Return the current scan IDs for each subarray.
- Returns:
list of scan IDs starting from subarray 1, 0 = subarray not scanning
- start_acquisition(task_callback=None, *, start_time=None, delay=2)
Submit the start acquisition method.
This method returns immediately after it submitted self._start_acquisition for execution.
- Parameters:
- Return type:
- Returns:
a task staus and response message
- stop_tracking(track_id, task_callback=None)
Stop a tracking thread.
- stop_tracking_all(task_callback=None)
Stop all tracking threads.
- property tileprogrammingstate: tuple[str]
Return the tileprogrammingstate of the SpsStation.
- Returns:
the tileprogrammingstate of the SpsStation.
- track_object(task_callback=None, task_abort_event=None, *, interface=None, pointing_type, values, scan_time, reference_time=None, station_beam_number=0, time_step=1.0)
Submit the track_object slow task.
This method returns immediately after it is submitted for execution.
- Parameters:
task_callback (
Optional
[Callable
]) – Update task state, defaults to Nonetask_abort_event (
Optional
[Event
]) – Check for abort, defaults to Noneinterface (
Optional
[str
]) – the schema version this is running against.pointing_type (
str
) – the type of pointing requestedvalues (
dict
) – Coordinates for object to be trackedscan_time (
float
) – Time to scan object in secondsreference_time (
Optional
[str
]) – time in which coordinates are equal, in ISO8601 formatted astropy.Time timestation_beam_number (
Optional
[int
]) – The station beam number to be usedtime_step (
Optional
[float
]) – How long between each time step in seconds
- Return type:
- Returns:
A return code and a unique command ID.
- update_communication_state(communication_state)
Update the status of communication with the component.
Overridden here to fire the “is configured” callback whenever communication is freshly established
- Parameters:
communication_state (
CommunicationStatus
) – the status of communication with the component- Return type: