Class GaussianNoiseGenerator

Inheritance Relationships

Base Type

Derived Type

Class Documentation

class GaussianNoiseGenerator : public ska::pst::common::ScaleWeightGenerator

Generates and validates data using a NormalSequence.

Subclassed by ska::pst::common::SquareWaveGenerator

Public Functions

explicit GaussianNoiseGenerator(std::shared_ptr<PacketLayout> layout)

Construct a new GaussianNoiseGenerator object.

~GaussianNoiseGenerator() override = default

Destroy the GaussianNoiseGenerator 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.

Protected Attributes

NormalSequence dat_sequence

sequence of normally distributed values for the data samples