DSP Simulator
Module for providing the Simulated DSP capability for PST.
- class ska_pst_lmc.dsp.dsp_simulator.PstDspSimulator(num_subbands: Optional[int] = None, disk_capacity: Optional[int] = None, available_disk_space: Optional[int] = None, subband_data_record_rates: Optional[List[float]] = None)[source]
Simulator for the DSP process of the PST.LMC sub-system.
This is used to generate random data and simulate what for the DSP subsystem. This simulator is used for all the subbands. For the LMC state model most methods are no-op operations but when a scan is in process the
get_data()
method will randomly update the monitoring data.For DSP.DSK functionality the following properties can be set: * Total disk size * Availabe disk size * Subband write rates * Subband bytes written
To be able to simulate situation where the disk is near full, or is full, the method
simulate_disk_capacity()
should be called to override the current value.Initialise the DSP simulator.
- Parameters
num_subbands (int) – number of subbands, if None a random number is used.
disk_capacity (int) – the max size of the size to simulate, default is is determined from shutil
available_disk_space (int) – initial available space on disk to simulate, default is determined from shutil
subband_data_record_rates (List[float]) – the write rates per subband. Default is a random array.
- configure_scan(configuration: dict) None [source]
Simulate configuring a scan.
Only the “num_subbands” parameter is used by this simulator.
- Parameters
configuration (dict) – the configuration to be configured
- get_data() DspDiskMonitorData [source]
Get current DSP data.
Updates the current simulated data and returns the latest data.
- Returns
current simulated DSP data.
- Return type
DspDiskMonitorData
- get_subband_data() Dict[int, DspDiskSubbandMonitorData] [source]
Get simulated subband data.