Daq Client

An implementation of a client interface for a DAQ receiver.

class ska_low_mccs_daq_interface.client.DaqClient(address)

A client for a DAQ gRPC server.

configure_daq(daq_config)

Tell the DAQ server to apply the given DAQ configuration.

Parameters:

daq_config (str) – the configuration to be applied, in the form of a JSON string.

Return type:

tuple[ResultCode, str]

Returns:

a (result code, message) tuple

get_configuration()

Tell the DAQ server to return the current DAQ configuration.

Return type:

dict[str, Any]

Returns:

the current DAQ configuration

get_data_rate()

Get the data rate if being monitored, None if not being monitored.

Return type:

Optional[float]

get_status()

Request the status of the DAQ from the DAQ server.

Return type:

str

Returns:

the DAQ status as a JSON-encoded string

initialise(configuration, libaavsdaq_filepath='')

Tell the DAQ server to initialise the DAQ by applying a configuration.

Parameters:
  • configuration (str) – the configuration to apply, as a JSON string.

  • libaavsdaq_filepath (str) – Filepath to a custom version of libaavsdaq.so

Return type:

dict[str, Any]

Returns:

the result of the call

start_bandpass_monitor(argin)

Begin monitoring antenna bandpasses.

Parameters:

argin (str) – A json string with keywords - station_config_path Path to a station configuration file. - plot_directory Directory in which to store bandpass plots. - monitor_rms Whether or not to additionally produce RMS plots. Default: False. - auto_handle_daq Whether DAQ should be automatically reconfigured, started and stopped without user action if necessary. This set to False means we expect DAQ to already be properly configured and listening for traffic and DAQ will not be stopped when StopBandpassMonitor is called. Default: False.

Return type:

Iterator[dict[str, Any]]

start_daq(modes_to_start)

Tell the DAQ server to start the DAQ.

Parameters:

modes_to_start (str) – the DAQ modes to be started.

Yields:

updates on DAQ status.

Return type:

Iterator[dict[str, Any]]

start_data_rate_monitor(interval)

Start monitoring the data rate over the receiver interface.

Parameters:

interval (float) – the interval over which to measure data rate.

Return type:

tuple[ResultCode, str]

stop_bandpass_monitor()

Cease monitoring antenna bandpasses.

Return type:

tuple[ResultCode, str]

stop_daq()

Tell the DAQ server to stop the DAQ.

Return type:

tuple[ResultCode, str]

Returns:

a (result_code, message) tuple

stop_data_rate_monitor()

Stop monitoring the data rate over the receiver interface.

Return type:

tuple[ResultCode, str]