Class ScaleWeightGenerator
Defined in File ScaleWeightGenerator.h
Inheritance Relationships
Base Type
public ska::pst::common::PacketGenerator
(Class PacketGenerator)
Derived Types
public ska::pst::common::GaussianNoiseGenerator
(Class GaussianNoiseGenerator)public ska::pst::common::RandomDataGenerator
(Class RandomDataGenerator)public ska::pst::common::SineWaveGenerator
(Class SineWaveGenerator)
Class Documentation
-
class ScaleWeightGenerator : public ska::pst::common::PacketGenerator
Generates and validates weights and scales using a UniformSequence (unity values)
Subclassed by ska::pst::common::GaussianNoiseGenerator, ska::pst::common::RandomDataGenerator, ska::pst::common::SineWaveGenerator
Public Functions
Construct a new ScaleWeightGenerator object.
-
~ScaleWeightGenerator() override = default
Destroy the ScaleWeightGenerator object.
-
virtual void configure(const ska::pst::common::AsciiHeader &config) override
Configure the streams written to weights and scales.
- Parameters
config – ignored - the weights and scales sequences are simply reset
-
virtual void fill_weights(char *buf, uint64_t size) override
Fill the buffer with a sequence of weights.
- Parameters
buf – base memory address of the buffer to be filled
size – number of bytes to be written to buffer
-
virtual void fill_scales(char *buf, uint64_t size) override
Fill the buffer with a sequence of scale factors.
- Parameters
buf – base memory address of the buffer to be filled
size – number of bytes to be written to buffer
-
virtual auto test_weights(char *buf, uint64_t size) -> bool override
Verify the weights stream in the provided buffer.
- Parameters
buf – pointer to buffer containing sequence of weights to be verified
size – number of bytes in buffer to be tested
- Returns
true if weights match expectations
-
virtual auto test_scales(char *buf, uint64_t size) -> bool override
Verify the scales stream in the provided buffer.
- Parameters
buf – pointer to buffer containing sequence of scale factors to be verified
size – number of bytes in buffer to be tested
- Returns
true if scales match expectations
-
virtual void reset() override
Reset weights and scales scales sequences The next call to fill_weights|scales or test_weights|scales will behave as per the first call to these functions.