SMRB Process API
Module for providing the API to be communicate with the SMRB process.
The PstSmrbProcessApiSimulator
is used in testing or
simulation.)
- class ska_pst_lmc.smrb.smrb_process_api.PstSmrbProcessApi(logger: Logger, component_state_callback: Callable)[source]
Abstract class for the API of the SMRB 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.smrb.smrb_process_api.PstSmrbProcessApiSimulator(logger: Logger, component_state_callback: Callable, simulator: Optional[PstSmrbSimulator] = None)[source]
A simulator implemenation version of the API of PstSmrbProcessApi.
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, task_callback: Callable) None [source]
Configure beam resources.
- 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, 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, 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.
- class ska_pst_lmc.smrb.smrb_process_api.PstSmrbProcessApiGrpc(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 PstSmrbProcessApi API.
This uses an instance of a PstGrpcLmcClient to send requests through to the SMRB.RB application. Instances of this class should be per subband, rather than one for all of SMRB 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.