[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Discuss-gnuradio] gr-buffer usage
From: |
Vincenzo Pellegrini |
Subject: |
Re: [Discuss-gnuradio] gr-buffer usage |
Date: |
Tue, 24 Jul 2007 12:36:10 +0200 |
thanks Trond,
I went your way, and actually my stream gets loaded right into the ram
as I wanted..:)
my problem is now that.. doing:
data = fromfile("/root/Desktop/ofdm_encode_1H.dump",
dtype="complex64")
vector_source = gr.vector_source_c(data,True)
self.connect(vector_source,gain)
self.connect (gain, self.u)
I get an error relating to the number of arguments I pass to
gr.vector_source_c
vector_source = gr.vector_source_c(data,True)
File
"/usr/local/lib/python2.4/site-packages/gnuradio/gr/gnuradio_swig_py_gengen.py",
line 6695, in vector_source_c
return _gnuradio_swig_py_gengen.vector_source_c(*args)
NotImplementedError: Wrong number of arguments for overloaded function
'vector_source_c'.
Possible C/C++ prototypes are:
gr_make_vector_source_c(std::vector<gr_complex,std::allocator<gr_complex
> > const &,bool)
gr_make_vector_source_c(std::vector<gr_complex,std::allocator<gr_complex
> > const &)
what am I doing wrong?
sorry for bothering..
and thanks for help
vincenzo
>
> No, if you use vector_source, you should not use the gr.file_source to
> load the data. How you read the data from the file depends on the
> format is is stored in, but if it data recorded with GNU Radio, I
> personally use numpy/scipy. Python example:
>
> from numpy import *
> # Use complex64 for gr.gr_complex and float32 for gr.float
> data = fromfile("filename.dat", dtype="complex64")
> src = gr.vector_source(data, repeat=True)
>
>
> _______________________________________________
> Discuss-gnuradio mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/discuss-gnuradio