RECV Process API
Module for providing the API to be communicate with the RECV process.
The PstReceiveProcessApiSimulator
is used in testing or
simulation mode, while the PstReceiveProcessApiGrpc
is used
to connect to a remote application that exposes a gRPC API.
- class ska_pst_lmc.receive.receive_process_api.PstReceiveProcessApi(logger: Logger, component_state_callback: Callable)[source]
Abstract class for the API of the RECV process.
This extends from
PstProcessApi
but provides the specific method of getting the monitoring data.Initialise the API.
- Parameters
simulator – the simulator instance to use in the API.
logger – the logger to use for the API.
component_state_callback – this allows the API to call back to the component manager / TANGO device to deal with state model changes.
- class ska_pst_lmc.receive.receive_process_api.PstReceiveProcessApiSimulator(logger: Logger, component_state_callback: Callable, simulator: Optional[PstReceiveSimulator] = None)[source]
A simulator implemenation version of the API of PstReceiveProcessApi.
Initialise the API.
- Parameters
logger – the logger to use for the API.
component_state_callback – this allows the API to call back to the component manager / TANGO device to deal with state model changes.
simulator – the simulator instance to use in the API.
- configure_beam(configuration: Dict[str, Any], task_callback: Callable) None [source]
Configure beam for the service.
- Parameters
configuration – dictionary of parameters to be configured and their requested values.
task_callback – callable to connect back to the component manager.
- deconfigure_beam(task_callback: Callable) None [source]
Deconfigure the beam.
- Parameters
task_callback – callable to connect back to the component manager.
- configure_scan(configuration: Dict[str, Any], task_callback: Callable) None [source]
Configure a scan.
- Parameters
configuration – the configuration of for the scan.
task_callback – callable to connect back to the component manager.
- deconfigure_scan(task_callback: Callable) None [source]
Deconfigure a scan.
- Parameters
task_callback – callable to connect back to the component manager.
- start_scan(args: Dict[str, Any], task_callback: Callable) None [source]
Start scanning.
- Parameters
args – arguments for the scan.
task_callback – callable to connect back to the component manager.
- stop_scan(task_callback: Callable) None [source]
End a scan.
- Parameters
task_callback – callable to connect back to the component manager.
- abort(task_callback: Callable) None [source]
Abort a scan.
- Parameters
task_callback – callable to connect back to the component manager.
- class ska_pst_lmc.receive.receive_process_api.PstReceiveProcessApiGrpc(client_id: str, grpc_endpoint: str, logger: Logger, component_state_callback: Callable, background_task_processor: Optional[BackgroundTaskProcessor] = None)[source]
This is an gRPC implementation of the PstReceiveProcessApi.
This uses an instance of a PstGrpcLmcClient to send requests through to the RECV.CORE application. Instances of this class should be per subband, rather than one for all of RECV as a whole.
Initialise the API.
- Parameters
client_id – the identification of the client, this should be based off the FQDN of the MGMT device.
grpc_endpoint – the service endpoint to connect to. As the SMRB.RB instances are for each subband this forces this class to be per subband.
logger – the logger to use for the API.
component_state_callback – this allows the API to call back to the component manager / TANGO device to deal with state model changes.
background_task_processor – an optional background processor that will run background tasks like monitor.