discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] SWIG related problem with new filter function


From: Tom Rondeau
Subject: Re: [Discuss-gnuradio] SWIG related problem with new filter function
Date: Sat, 2 Jul 2011 17:24:59 -0400

On Fri, Jul 1, 2011 at 8:36 AM, John Andrews <address@hidden> wrote:
Hi,
Based on gr_firdes.cc/gr_firdes.h/gfr_firdes.i I developed a similar class to generate filter taps for a Raised Cosine filter. The following is the SWIG interface file and the C++ header with .cc file containing the algorithm for the static function declared in the header. The compilation goes without errors but when I import in Python environment I do not see this function being imported. It seems like SWIG doesn't see the definition of the member functin 'raised_cosine'.

SWIG INTERFACE

%{
#include "dsss_firdes.h"
%}

GR_SWIG_BLOCK_MAGIC(dsss,firdes);
class dsss_firdes
{
public:
static std::vector<float> raised_cosine(double gain, double sampling_freq, double symbol_rate, double alpha, int ntaps);
};

C++ HEADER
class dsss_firdes {
public:
    static std::vector<float> raised_cosine (double gain, double sampling_freq, double symbol_rate,  double alpha,  int ntaps);
};


Thanks

Are you doing this in your own top-level block (dsss from the looks of it) or under a current GNU Radio directory like gnuradio-core where the gr_firdes currently is?

You haven't mentioned adding anything to the Makefile so that it is built properly. If you are working under gnuradio-core/src/lib/general, you'll also want to add your .h and .i files to general.i so that it get's compiled.

Also, just curious, what application are you interested in that requires a raised cosine filter? And couldn't you just create a root raised cosine filter and convolve the the taps against themselves to make the raised cosine taps?

Tom


reply via email to

[Prev in Thread] Current Thread [Next in Thread]