Class SawtoothSequence
Defined in File SawtoothSequence.h
Inheritance Relationships
Base Type
public ska::pst::common::ByteSequence(Class ByteSequence)
Class Documentation
-
class SawtoothSequence : public ska::pst::common::ByteSequence
Generates a sawtooth pattern of floating point values.
Public Functions
-
virtual void configure(const ska::pst::common::AsciiHeader &config) override
Configure the Sawtooth Sequence using AsciiHeader parameters.
- Parameters
config – configuration including all of the following parameters
SAWTOOTH_NSAMP number of samples per sawtooth (period)
SAWTOOTH_FIRST amplitude of first sample in sawtooth
SAWTOOTH_LAST amplitude of last sample in sawtooth
-
virtual void generate(char *buffer, uint64_t bufsz) override
Generate a sequence of floating point sawtooth samples.
- Parameters
buffer – pointer to memory to which the sequence will be written
bufsz – number of bytes to write to the buffer
-
virtual void reset() override
Reset the internal state of the sequence The next call to generate or validate will behave as per the first call to these functions.
-
virtual bool validate(char *buffer, uint64_t bufsz) override
Compare contents of buffer to expected sawtooth sequence.
- Parameters
buffer – pointer to memory containing bytes to be validated
bufsz – number of bytes to validate in the buffer
- Returns
true if all bytes are valid
-
virtual void configure(const ska::pst::common::AsciiHeader &config) override