GNU Radio C++ API Reference 3.10.11.0
The Free & Open Software Radio Ecosystem
 
Loading...
Searching...
No Matches
gr::nco< o_type, i_type > Class Template Reference

base class template for Numerically Controlled Oscillator (NCO) More...

#include <gnuradio/nco.h>

Public Member Functions

 nco ()
 
virtual ~nco ()
 
void set_phase (double angle)
 
void adjust_phase (double delta_phase)
 
void set_freq (double angle_rate)
 
void adjust_freq (double delta_angle_rate)
 
void step (int n=1)
 
double get_phase () const
 
double get_freq () const
 
void sincos (float *sinx, float *cosx) const
 
float cos () const
 
float sin () const
 
void sin (float *output, int noutput_items, double ampl=1.0)
 
void cos (float *output, int noutput_items, double ampl=1.0)
 
void sincos (gr_complex *output, int noutput_items, double ampl=1.0)
 
void sin (short *output, int noutput_items, double ampl=1.0)
 
void cos (short *output, int noutput_items, double ampl=1.0)
 
void sin (int *output, int noutput_items, double ampl=1.0)
 
void cos (int *output, int noutput_items, double ampl=1.0)
 

Protected Attributes

double phase
 
double phase_inc
 

Detailed Description

template<class o_type, class i_type>
class gr::nco< o_type, i_type >

base class template for Numerically Controlled Oscillator (NCO)

Constructor & Destructor Documentation

◆ nco()

template<class o_type, class i_type>
gr::nco< o_type, i_type >::nco ( )
inline

References phase, and phase_inc.

◆ ~nco()

template<class o_type, class i_type>
virtual gr::nco< o_type, i_type >::~nco ( )
inlinevirtual

Member Function Documentation

◆ adjust_freq()

template<class o_type, class i_type>
void gr::nco< o_type, i_type >::adjust_freq ( double delta_angle_rate)
inline

References phase_inc.

◆ adjust_phase()

template<class o_type, class i_type>
void gr::nco< o_type, i_type >::adjust_phase ( double delta_phase)
inline

References phase.

◆ cos() [1/4]

template<class o_type, class i_type>
float gr::nco< o_type, i_type >::cos ( ) const
inline

References phase.

Referenced by cos(), cos(), and cos().

◆ cos() [2/4]

template<class o_type, class i_type>
void gr::nco< o_type, i_type >::cos ( float * output,
int noutput_items,
double ampl = 1.0 )

References cos(), and step().

◆ cos() [3/4]

template<class o_type, class i_type>
void gr::nco< o_type, i_type >::cos ( int * output,
int noutput_items,
double ampl = 1.0 )

References cos(), and step().

◆ cos() [4/4]

template<class o_type, class i_type>
void gr::nco< o_type, i_type >::cos ( short * output,
int noutput_items,
double ampl = 1.0 )

References cos(), and step().

◆ get_freq()

template<class o_type, class i_type>
double gr::nco< o_type, i_type >::get_freq ( ) const
inline

References phase_inc.

◆ get_phase()

template<class o_type, class i_type>
double gr::nco< o_type, i_type >::get_phase ( ) const
inline

References phase.

◆ set_freq()

template<class o_type, class i_type>
void gr::nco< o_type, i_type >::set_freq ( double angle_rate)
inline

References phase_inc.

◆ set_phase()

template<class o_type, class i_type>
void gr::nco< o_type, i_type >::set_phase ( double angle)
inline

References phase.

◆ sin() [1/4]

template<class o_type, class i_type>
float gr::nco< o_type, i_type >::sin ( ) const
inline

References phase.

Referenced by sin(), sin(), and sin().

◆ sin() [2/4]

template<class o_type, class i_type>
void gr::nco< o_type, i_type >::sin ( float * output,
int noutput_items,
double ampl = 1.0 )

References sin(), and step().

◆ sin() [3/4]

template<class o_type, class i_type>
void gr::nco< o_type, i_type >::sin ( int * output,
int noutput_items,
double ampl = 1.0 )

References sin(), and step().

◆ sin() [4/4]

template<class o_type, class i_type>
void gr::nco< o_type, i_type >::sin ( short * output,
int noutput_items,
double ampl = 1.0 )

References sin(), and step().

◆ sincos() [1/2]

template<class o_type, class i_type>
void gr::nco< o_type, i_type >::sincos ( float * sinx,
float * cosx ) const
inline

References phase, and gr::sincosf().

Referenced by sincos().

◆ sincos() [2/2]

template<class o_type, class i_type>
void gr::nco< o_type, i_type >::sincos ( gr_complex * output,
int noutput_items,
double ampl = 1.0 )

References sincos(), and step().

◆ step()

template<class o_type, class i_type>
void gr::nco< o_type, i_type >::step ( int n = 1)
inline

References GR_M_PI, phase, and phase_inc.

Referenced by cos(), cos(), cos(), sin(), sin(), sin(), and sincos().

Member Data Documentation

◆ phase

template<class o_type, class i_type>
double gr::nco< o_type, i_type >::phase
protected

◆ phase_inc

template<class o_type, class i_type>
double gr::nco< o_type, i_type >::phase_inc
protected

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