Trying to get my OOT block to accept a vector of floats for filter taps.
I used a couple in-tree blocks (mostly ofdm_carier_allocator and fir_interpolator) for a quick reference. And I have fir interp/decim in my flowgraph and they have no issues at runtime. The flowgraph ran fine with my OOT block before I decided to try adding support for modifying the filter taps from GRC.
Now I am getting the following runtime error when starting the flowgraph in GRC:
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 &'
It is really hard to find similar errors on the web, but there are a couple. None exact and not many where a solution is indicated. However, it seems likely that SWIG has a problem of some sort converting a tuple of floats in python (which is typically what the taps for filters look like that I have seen so far) to a vector<float> in C++. Or, rather, it has a problem unless you take the required steps. I think there is the the equivalent of an include missing in SWIG? Something dot i with some syntax? I am brand new to SWIG and python.
I tried to add this capability to an existing OOT block of mine with a ton of existing code and did not want to start over with gr_modtool which perhaps would have built the SWIG interfaces properly if it had known there would be a vector parameter involved. But that is probably what I will try next, just have to save off and paste stuff back in. I don't know, I am guessing that may be the case and the reason why this is such a rarely found error.
But does anyone know what I need to do in order to make this run?
_______________________________________________
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
No comments:
Post a Comment