Class RandomDataGenerator
Defined in File RandomDataGenerator.h
Inheritance Relationships
Base Type
public ska::pst::common::ScaleWeightGenerator
(Class ScaleWeightGenerator)
Class Documentation
-
class RandomDataGenerator : public ska::pst::common::ScaleWeightGenerator
Generates and validates data + weights using a RandomSequence for each.
Public Functions
Construct a new RandomDataGenerator object.
-
~RandomDataGenerator() override = default
Destroy the RandomDataGenerator object.
-
virtual void configure(const ska::pst::common::AsciiHeader &config) override
Configure the streams written to data + weights.
- Parameters
config – contains the UTC_START and OFFSET keyword/value pairs required to configure the data+weights streams
-
virtual void fill_data(char *buf, uint64_t size) override
Fill the buffer with a sequence of data.
- Parameters
buf – base memory address of the buffer to be filled
size – number of bytes to be written to buffer
-
virtual auto test_data(char *buf, uint64_t size) -> bool override
Verify the data stream in the provided buffer.
- Parameters
buf – pointer to buffer containing sequence of data to be verified
size – number of bytes in buffer to be tested
- Returns
true if data match expectations
-
virtual void reset() override
Reset all sequences (data, weights, and scales) The next call to fill_block or test_block will behave as per the first call to these functions.