[Discuss-gnuradio] Please help building a signal processing block.
From:
Mikhail Tadjikov
Subject:
[Discuss-gnuradio] Please help building a signal processing block.
Date:
Fri, 27 Mar 2009 14:45:28 -0700
Hello,
I'm trying to build several signal processing blocks for a project that I'm doing using USRP2. I was going through the examples and sample code along with browsing the source code and I can't seem to find exactly what I need. I'm trying to do an average of a vector of length N:
Input vector size N Output vector size 1 I'm doing it for floats.
------------------------------ #ifndef INCLUDED_CORES_WEIGHTED_AVG_FF_H #define INCLUDED_CORES_WEIGHTED_AVG_FF_H #include <gr_sync_block.h>
class cores_weighted_avg_ff;
typedef boost::shared_ptr<cores_weighted_avg_ff> cores_weighted_avg_ff_sptr; cores_weighted_avg_ff_sptr cores_make_weighted_avg_ff (unsigned int vlen);
class cores_weighted_avg_ff : public gr_sync_block
{ private: friend cores_weighted_avg_ff_sptr cores_make_weighted_avg_ff (unsigned int vlen); cores_weighted_avg_ff (unsigned int vlen); // private constructor unsigned int d_vlen;
I'm not sure if the code is correct what I want to do (input is more than welcome), when I compile this code I get a weird error:
cores_weighted_avg_ff.h: In function ‘PyObject* _wrap_weighted_avg_ff(PyObject*, PyObject*)’: cores_weighted_avg_ff.h:63: error: too few arguments to function ‘cores_weighted_avg_ff_sptr cores_make_weighted_avg_ff(unsigned int)’
cores.cc:4326: error: at this point in file make[4]: *** [cores.lo] Error 1
Any help would be greatly appreciated.
-- Mikhail Tadjikov Graduate Student UCLA Department of Electrical Engineering