[Top][All Lists]

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

Re: [Discuss-gnuradio] Creating a UHD Sink block

From: Tom Rondeau
Subject: Re: [Discuss-gnuradio] Creating a UHD Sink block
Date: Mon, 25 Mar 2013 10:54:21 -0400

On Fri, Mar 22, 2013 at 10:43 AM, Brooke Hayden <address@hidden> wrote:
> I am having trouble with the GNU Radio block that I have created to use as
> an alternative to the regular UHD USRP Sink block provided by GNU Radio. The
> file compiles, but there are errors when I run it in a python file. The
> Python file works fine if I use the GNU Radio UHD Sink, but not when I use
> mine. I have included the errors below. Thanks!
>   File "sink_test_gui.py", line 84, in <module>
>     main ()
>   File "sink_test_gui.py", line 80, in main
>     app = stdgui2.stdapp(tx_sink, "Transmitted Signal", nstatus=1)
>   File "/usr/local/lib/python2.7/dist-packages/gnuradio/wxgui/stdgui2.py",
> line 38, in __init__
>     wx.App.__init__ (self, redirect=False)
>   File "/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode/wx/_core.py",
> line 7981, in __init__
>     self._BootstrapApp()
>   File "/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode/wx/_core.py",
> line 7555, in _BootstrapApp
>     return _core_.PyApp__BootstrapApp(*args, **kwargs)
>   File "/usr/local/lib/python2.7/dist-packages/gnuradio/wxgui/stdgui2.py",
> line 42, in OnInit
>     self._max_noutput_items)
>   File "/usr/local/lib/python2.7/dist-packages/gnuradio/wxgui/stdgui2.py",
> line 64, in __init__
>     self.panel = stdpanel (self, self, top_block_maker, max_nouts)
>   File "/usr/local/lib/python2.7/dist-packages/gnuradio/wxgui/stdgui2.py",
> line 86, in __init__
>     self.top_block = top_block_maker (frame, self, vbox, sys.argv)
>   File "sink_test_gui.py", line 45, in __init__
>     self.u = radar2.uhd_lfm_sink(device_addr=options.args,
> stream_args=uhd.stream_args('fc32'))
> AttributeError: 'module' object has no attribute 'uhd_lfm_sink'


Make sure everything looks good in your SWIG files. If you're using
the new style (3.7) of creating the blocks, you should have something
like this in in your lfm_swig.i file (I'm just using the component
name 'lfm' from your block's name above; replace it with whatever you
actually use):

#include "lfm/uhd_lfm_sink.h"

%include "lfm/uhd_lfm_sink.h"

GR_SWIG_BLOCK_MAGIC2(lfm, uhd_lfm_sink);

Remember that the order of these statements is important.


reply via email to

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