Class MersenneTFPSequence
Defined in File MersenneTFPSequence.h
Inheritance Relationships
Base Type
public ska::pst::common::ByteSequence(Class ByteSequence)
Class Documentation
-
class MersenneTFPSequence : public ska::pst::common::ByteSequence
Generates a sequence of random unsigned 16-bit integer values interleaved with values that encode frequency channel and polarization index.
Public Functions
-
virtual void configure(const ska::pst::common::AsciiHeader &header) override
Configure the MersenneTFP Sequence.
- Parameters
header – header that defines NCHAN and NPOL
-
virtual void reset() override
Reset the internal state of the MersenneTFP Sequence. The next call to generate or validate will behave as per the first call to these functions.
-
virtual void generate(char *buffer, uint64_t bufsz) override
Generate sequence of random unsigned 16-bit integer values interleaved with channel index.
- Parameters
buffer – pointer to memory to which the random sequence should be written
bufsz – number of bytes to write to the buffer
-
virtual bool validate(char *buffer, uint64_t bufsz) override
Compare contents of buffer to expected random sequence.
- Parameters
buffer – pointer to buffer containing bytes to be validated
bufsz – number of bytes to be validated
- Returns
true if all bytes are valid
-
uint16_t expected_value(uint64_t itime, unsigned ichan, unsigned ipol)
Return the unsigned 16-bit value for the specified time, frequency and polarization.
On the first call to this function itime must equal 0. On subsequent calls, itime must be either equal to or one greater than itime of the previous call
-
virtual void configure(const ska::pst::common::AsciiHeader &header) override