GNU Radio 3.6.5 C++ API

gr_fastnoise_source_i Class Reference

Random number source. More...

#include <gr_fastnoise_source_i.h>

Inheritance diagram for gr_fastnoise_source_i:
gr_sync_block gr_block gr_basic_block gr_msg_accepter gruel::msg_accepter

List of all members.

Public Member Functions

void set_type (gr_noise_type_t type)
void set_amplitude (float ampl)
void generate ()
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_fastnoise_source_i_sptr 
gr_make_fastnoise_source_i (gr_noise_type_t type, float ampl, long seed, long samples)
 Make a noise source.

Detailed Description

Random number source.

Generate random values from different distributions. Currently, only Gaussian and uniform are enabled.

Parameters:
typethe random distribution to use (see gr_noise_type.h)
ampla scaling factor for the output
seedseed for random generators. Note that for uniform and Gaussian distributions, this should be a negative number.
samplesnumber of samples to pre-generate.

Member Function Documentation

float gr_fastnoise_source_i::amplitude ( ) const [inline]
void gr_fastnoise_source_i::generate ( )
void gr_fastnoise_source_i::set_amplitude ( float  ampl) [inline]
void gr_fastnoise_source_i::set_type ( gr_noise_type_t  type) [inline]
gr_noise_type_t gr_fastnoise_source_i::type ( ) const [inline]
virtual int gr_fastnoise_source_i::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.


Friends And Related Function Documentation

GR_CORE_API gr_fastnoise_source_i_sptr gr_make_fastnoise_source_i ( gr_noise_type_t  type,
float  ampl,
long  seed,
long  samples 
) [friend]

Make a noise source.

Parameters:
typethe random distribution to use (see gr_noise_type.h)
ampla scaling factor for the output
seedseed for random generators. Note that for uniform and Gaussian distributions, this should be a negative number.
samplesnumber of samples to pre-generate.

The documentation for this class was generated from the following file: