[Top][All Lists]

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

Re: [Discuss-gnuradio] TypeError for gr_vector_float arg

From: Tom Rondeau
Subject: Re: [Discuss-gnuradio] TypeError for gr_vector_float arg
Date: Wed, 6 Aug 2014 15:37:09 -0400

On Wed, Aug 6, 2014 at 1:54 PM, John Murphy <address@hidden> wrote:
On Tue, 5 Aug 2014 17:08:31 -0400
John Murphy <address@hidden> wrote:
> Trying to get my OOT block to accept a vector of floats for filter taps.
> Traceback (most recent call last):
>   File "/usr/local/share/gnuradio-InTree-modules/ofdm_tx_rx.py", line 518, in <module>
>     tb = ofdm_tx_rx()
>   File "/usr/local/share/gnuradio-InTree-modules/ofdm_tx_rx.py", line 314, in __init__
>     self.comso_ofdm_rx_0 = comso.ofdm_rx((sync_taps), nfft, ncp, nrp, nhst, thr, sel)
>   File "/usr/local/lib64/python2.7/site-packages/comso/comso_swig.py", line 398, in make
>     return _comso_swig.ofdm_rx_make(*args, **kwargs)
> TypeError: in method 'ofdm_rx_make', argument 1 of type 'gr_vector_float const &'

Heh... well... I tried again changing gr_vector_float to std::vector<float> and that fixed this problem.
Now, I did that a couple times before, but apparently it must have been when I still had some other issues.
Still... seems odd that a typedef prevents SWIG from making this connection.
And maybe I am still missing some header in the SWIG for gr_vector_* but it works for a normal C++ vector.

But for now this is resolved and moving on.

Yes, it can be tricky properly exporting some typedefs through swig. Also, though, we try not to use more typedefs than we really have to. Most of them, in fact, are slated for removal in version 3.8 and we'll only be keeping the oft-used ones (like gr_complex and the ones used in work functions).


reply via email to

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