Class DiskManager
Defined in File DiskManager.h
Nested Relationships
Nested Types
Inheritance Relationships
Base Type
public ska::pst::common::ApplicationManager
(Class ApplicationManager)
Class Documentation
-
class DiskManager : public ska::pst::common::ApplicationManager
The DiskManager combines two instances of the StreamWriter and a DiskMonitor to provide functionality that writes data and weights streams from Shared Memory Ring Buffers to a series of files stored on the local disks. This class extended the StateModel, implementing the required commands to step through state model common to PST C++ applications. The DiskMonitor ensures the DiskManager can monitor the file system to which it is writing.
Public Types
-
typedef struct ska::pst::dsp::DiskManager::stats stats_t
Statistics of the disk.
Public Functions
-
DiskManager(const std::string &recording_base_path, bool use_o_direct)
Default Construct a new Disk Manager object.
-
~DiskManager()
Destroy the Disk 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
Configure beam as described by the configuration parameters.
- Parameters
config – beam configuration containing the recording path, data and weights key
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
Configure scan as described by the configuration parameters.
- Parameters
config – scan configuration containing the bytes_per_second and scan_len_max
context – A validation context where errors should be added.
-
virtual void validate_start_scan(const ska::pst::common::AsciiHeader &config) override
Start the scan using the provided configuration parameters.
- Parameters
config – Scan runtime configuration parameters
-
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::string get_recording_base_path()
Get the recording base path the Disk Manager is constructed with.
- Returns
std::string filesystem base path to where files will be written
-
struct stats
Statistics of the disk.
Public Members
-
uint64_t capacity
Size of the recording disk in bytes.
-
uint64_t bytes_written
Bytes written 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::DiskManager::stats stats_t