discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] Running a GNU Radio Companion generated code


From: Johannes Demel
Subject: Re: [Discuss-gnuradio] Running a GNU Radio Companion generated code
Date: Mon, 22 Dec 2014 16:24:49 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Daniel,

> OK I have a code, generated with Gnu radio companion that i want
> to run over the command line to follow with GDB. I was under the
> impression that if I simply got the code generated in the
> ~/.grc_gnuradio, add the
This folder usually only contains 'hier_blocks'. Executable flowgraph
pythons files are usually created in the same folder your .grc file is
located in.

> 
> ----
> 
> |def main(): """ go, go, go """ top_block = [CLASS]() 
> top_block.run()
Did you replace a class by [Class]? According to the Tutorial it
expects an object of type gr.top_block in this line.

> 
> if __name__ == "__main__": print 'Blocked waiting for GDB attach
> (pid = %d)' % (os.getpid(),) raw_input ('Press Enter to continue:
> ') main() ---- |
> 
> as stated at 
> https://gnuradio.org/redmine/projects/gnuradio/wiki/TutorialsDebugging
>
> 
it would run to attach GDB. However, i am getting the following error:
> 
> --- Traceback (most recent call last): File "ieee802_15_4_phy.py",
> line 120, in <module> main() File "ieee802_15_4_phy.py", line 115,
> in main top_block.run() File 
> "/usr/local/lib/python2.7/dist-packages/gnuradio/gr/hier_block2.py",
>
> 
line 53, in __getattr__
> return getattr(self._hb, name) AttributeError: 'hier_block2_sptr'
> object has no attribute 'run'
You try to call run on a 'hier_block'. 'run' is a member of
'gr.top_block'. top_block contains the scheduler and takes care of
correct initialization etc. So it is essentially the flowgraph.

I hope I could give you some hints on what might go wrong.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIcBAEBAgAGBQJUmDfBAAoJEO7fmkDsqywMbyoQAKyANgElQ64/Ox81/gwl4TOY
k3NCr9Stj8CEUG65bYBPo4eDoVT5+xyA7e4HYTYrKMlHT+J2c/iG3ckH9sK7khoO
1jpFOtQn688tih6uBRhlVgNKWH26B2Hia8U4zIzavDcnt+B3aIRm+MG19Zlg6Ggg
XLD9KeJ6A5nfgrx+jsylAZGWmp4u6ZFupAVjuTA0vHab/3BOjCuJq2IOveWtSfhg
gPoHowIvWFwuiR/owJjwHhSGyCmZU1/Iz3yGT0TLdOZ8odlP0z9braIOt2bT3x9V
OQzgpQFBVuEEdSRJETZkWw0Lr4Jwl/Bko9pHi3tj6MGEcq8U6fP4Ml8dhiG1IE9q
UZ9XdSNJqDBNylfRxsyBm1oBmUV/gF6mXpD3851lQLdTNvP3R2QD7QrFP9UxRPKj
c300eaCsRhucDT7ApQmqTguPeL8ds+z6eN8BZ41BtD9etBPjbJDjoV+hfk4z16jF
gHEjVTAKti2OCiyya19xb67XJoufNz3Fjn09idG7YDAYRG7Qvn3XZCUpLAzO79pg
axceRvfxgMqws21NgTEDiEndDxjEeJm0mh1jcNUwoM6vlRar/JbEwRxPSCuvfUdx
GQac8LmkYJsROja1UgADE06fTEJZtLWUEQqBXhKlBlQz6sx1OA42XU8PPDm5c3SY
AQfwe85pgdf1nQY19UEv
=wYmS
-----END PGP SIGNATURE-----



reply via email to

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