Class FlowThroughManager
Defined in File FlowThroughManager.h
Nested Relationships
Nested Types
Inheritance Relationships
Base Type
public ska::pst::common::ApplicationManager
(Class ApplicationManager)
Class Documentation
-
class FlowThroughManager : public ska::pst::common::ApplicationManager
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)
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.
-
~FlowThroughManager()
Destroy the Flow Through Manager object.
-
void configure_from_file(const std::string &config_file)
Configure beam and scan as described by the configuration file.
- Parameters
config_file – configuration file containing beam and scan configuration parameters
-
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.
-
virtual void validate_start_scan(const ska::pst::common::AsciiHeader &config) override
Validate the start_scan configuration parameters, reporting any errors found.
- Parameters
config – Start Scan configuration parameters, that must contain the start_scan_config_keys.
- Throws
std::runtime_error – if the required parameters are not present in the start_scan_config_keys.
-
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 void set_timeout(int timeout_secs)
Set the timeout to use during connection to DataBlocks.
- Parameters
timeout_secs – timeout to wait in seconds during DataBlock connections.
-
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.
Public Static Attributes
-
static const std::vector<uint32_t> valid_nbit_out = {1, 2, 4, 8, 16, 32}
List of valid NBIT_OUT values.
-
static const std::vector<std::string> valid_polarisations = {"A", "B", "Both"}
List of valid NBIT_OUT values.
-
static const std::vector<std::string> required_beam_config_keys = {"DATA_KEY", "WEIGHTS_KEY"}
List of mandatory beam config keys.
-
static const std::vector<std::string> required_scan_config_keys = {"BYTES_PER_SECOND", "SCANLEN_MAX", "EB_ID", "NBIT_OUT", "POLN_FT", "CHAN_FT", "DIGITIZER_SCALE", "DIGITIZER_INIT_TIME"}
List of mandatory scan config keys.
-
static const std::vector<std::string> required_startscan_config_keys = {"SCAN_ID"}
List of mandatory start scan config keys.
-
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.
-
uint64_t capacity
-
typedef struct ska::pst::dsp::FlowThroughManager::stats stats_t