GNU Radio 3.6.5 C++ API

gr_noise_source_c Class Reference

Random number source. More...

#include <gr_noise_source_c.h>

Inheritance diagram for gr_noise_source_c:
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)
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.

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.

Member Function Documentation

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.


Friends And Related Function Documentation

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.

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.

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