On Tue, Jul 11, 2006 at 10:03:11AM +0800, hanwen wrote:
> Thanks, Eric. Would you please tell me the exact C++ functions which do the
> tuning?

You can shift the frequency by multiplying by a complex exponential.

        # Local oscillator
        lo = gr.sig_source_c (if_rate,        # sample rate
                              gr.GR_SIN_WAVE, # waveform type
                              lo_freq,        # frequency
                              1.0,            # amplitude
                              0)              # DC Offset
        mixer = gr.multiply_cc ()
    
        fg.connect(src, (mixer, 0))
        fg.connect(lo, (mixer, 1))
        fg.connect(mixer, <next-block-downstream>)

Or you could use one of the pll blocks.
$ ls -l gnuradio-core/src/lib/general/gr_*pll*.h


> Is there any C++ class relating the usrp class in python?

Yes, but not exactly.  Some of the functionality is implemented in
pure python.  The C++ part is in usrp/host/lib/usrp_{basic,standard}.{h,cc}

Eric


_______________________________________________
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio

Reply via email to