Class FlowThroughManager

Nested Relationships

Nested Types

Inheritance Relationships

Base Type

Class Documentation

class FlowThroughManager : public ska::pst::dsp::DspsrApplicationManager

The FlowThroughManager combines instances of the DataBlockRead, FlowThroughProcessor (TBC) and FileStreamWriter (TBC) classes to provide the monitoring and control functions of the PST Flow Through processing mode.

This class extended the ska::pst::common::ApplicationManager, implementing the required commands to step through state model common to PST C++ applications. The class also utilises the DiskMonitor class, providing monitoring of the file system to which output data products are being written.

Public Types

typedef struct ska::pst::dsp::FlowThroughManager::stats stats_t

Statistics structure of the Flow Through app manager.

Public Functions

FlowThroughManager(const std::string &base_path, bool use_o_direct, bool create_files)

Construct a new Flow Through Manager object.

Parameters
  • base_path – absolute path to the base directory where data products should be written.

  • use_o_direct – use the O_DIRECT option when writing data product files, weights files never use O_DIRECT

  • create_files – flag to control creation of data and weights files, useful for testing on slow file systems

~FlowThroughManager()

Destroy the Flow Through Manager object.

virtual void validate_configure_beam(const ska::pst::common::AsciiHeader &config, ska::pst::common::ValidationContext *context) override

Validate the beam configuration parameters, reporting any errors found.

Parameters
  • config – beam configuration parameters, that must contain the beam_config_keys.

  • context – A validation context where errors should be added.

virtual void validate_configure_scan(const ska::pst::common::AsciiHeader &config, ska::pst::common::ValidationContext *context) override

Validate the scan configuration parameters, reporting any errors found.

Parameters
  • config – scan configuration parameters, that must contain the scan_config_keys.

  • context – A validation context where errors should be added.

stats_t get_flow_through_stats()

Return the statistics of the Flow Through Manager.

Returns

stats_t struct of the flow through manager statistics.

virtual ska::pst::common::AsciiHeader &get_beam_configuration() override

Get the beam configuration.

Throws

std::runtime_exception – if the beam is not configured.

Returns

const ska::pst::common::AsciiHeader& header containing beam configuration.

virtual ska::pst::common::AsciiHeader &get_scan_configuration() override

Get the scan configuration.

Throws

std::runtime_exception – if the scan is not configured.

Returns

const ska::pst::common::AsciiHeader& header containing scan configuration.

inline std::pair<int32_t, int32_t> get_channels()

The indices of the first and last (inclusive) frequency channels that define the single contiguous range of frequency channels to be recorded.

inline uint32_t get_nchan() const

Return the number of channels being selected.

inline uint32_t get_npol() const

Return the number of polarisations being selected.

inline const std::string get_output_data_key()

helper function for getting the output data buffer key

inline const std::string get_output_weights_key()

helper function for getting the output weights buffer key

inline const std::map<std::string, std::string> &get_log_context() const

return mapped diagnostic context key/value pairs

std::string generate_output_key(const std::string &input_key_str)

Helper function that produces an output key based on an input key.

Parameters

input_key_str – input key in a string format

Returns

output key in a string format

struct stats

Statistics structure of the Flow Through app manager.

Public Members

uint64_t capacity

Size of the recording disk in bytes.

uint64_t bytes_written

Bytes recorded to disk.

double data_write_rate

Write rate to disk in bytes per second.

double expected_data_write_rate

Expected write rate to disk in bytes per second.

uint64_t available

Available space on the recording disk in bytes.