GNU Radio 3.5.3.2 C++ API
|
Random number source. More...
#include <gr_noise_source_c.h>
Public Member Functions | |
void | set_type (gr_noise_type_t type) |
void | set_amplitude (float ampl) |
gr_noise_type_t | type () const |
float | amplitude () const |
virtual int | work (int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items) |
just like gr_block::general_work, only this arranges to call consume_each for you | |
Friends | |
GR_CORE_API gr_noise_source_c_sptr | gr_make_noise_source_c (gr_noise_type_t type, float ampl, long seed) |
Make a noise source. |
Random number source.
Generate random values from different distributions. Currently, only Gaussian and uniform are enabled.
type | the random distribution to use (see gr_noise_type.h) |
ampl | a scaling factor for the output |
seed | seed for random generators. Note that for uniform and Gaussian distributions, this should be a negative number. |
float gr_noise_source_c::amplitude | ( | ) | const [inline] |
void gr_noise_source_c::set_amplitude | ( | float | ampl | ) | [inline] |
void gr_noise_source_c::set_type | ( | gr_noise_type_t | type | ) | [inline] |
gr_noise_type_t gr_noise_source_c::type | ( | ) | const [inline] |
virtual int gr_noise_source_c::work | ( | int | noutput_items, |
gr_vector_const_void_star & | input_items, | ||
gr_vector_void_star & | output_items | ||
) | [virtual] |
just like gr_block::general_work, only this arranges to call consume_each for you
The user must override work to define the signal processing code
Implements gr_sync_block.
GR_CORE_API gr_noise_source_c_sptr gr_make_noise_source_c | ( | gr_noise_type_t | type, |
float | ampl, | ||
long | seed | ||
) | [friend] |
Make a noise source.
type | the random distribution to use (see gr_noise_type.h) |
ampl | a scaling factor for the output |
seed | seed for random generators. Note that for uniform and Gaussian distributions, this should be a negative number. |