I’m looking for some information or references on what to do after
doing everything in the “how to write a block” tutorial in order to be
able to access this block from other GNU radio python programs, for
example changes to environment variables or whatever will be needed.
I also would like to know what to put into the “from gnuradio
import blks2” element in the GRC block XML file so that I can
use my custom blocks in GRC.
Thanks for any help you can provide.
On Sun, Apr 11, 2010 at 04:55:23PM -0400, Kurt Holmquist wrote:
I’m looking for some information or references on what to do after doing everything in the “how to write a block” tutorial in order to be able to access this block from other GNU radio python programs, for example changes to environment variables or whatever will be needed.
Is
http://gnuradio.org/redmine/wiki/gnuradio/TutorialsWritePythonApplications
enough? If not, perhaps your questions are too specific for a tutorial
and you might want to ask them directly.
I also would like to know what to put into the “from gnuradio import blks2” element in the GRC block XML file so that I can use my custom blocks in GRC.
Have a look at how the GRC blocks are defined in gr-howto…, that
should clear things up.
Good luck,
MB
–
Karlsruhe Institute of Technology (KIT)
Communications Engineering Lab (CEL)
Dipl.-Ing. Martin B.
Research Associate
Kaiserstraße 12
Building 05.01
76131 Karlsruhe
Phone: +49 721 608-3790
Fax: +49 721 608-6071
www.cel.kit.edu
KIT – University of the State of Baden-Württemberg and
National Laboratory of the Helmholtz Association
Thank you for the response.
I would like to use as GRC blocks the blocks that I create as described
in “How to Write a Signal Processing Block”. This is a somewhat
unconventional situation in that I need a way for an “installed”
application (i. e. grc) to use a locally created component, sort of the
opposite of the normal situation. I think the XML file for the block
should look something like:
<?xml version="1.0"?>
Square2
howto_square2_ff
HOWTO
import howto
howto.square2_ff()
in
float
out
float
When I copy this file into the directory where GRC stores the block XML
files (/usr/local/share/gnuradio/grc/blocks), GRC makes a “Square2”
block available for use. However, when I attempt to execute a flow
graph that includes this block, it fails as follows:
Generating: “/home/kurt/gnuradio/grc/wav_file_to_speaker.py”
Executing: “/home/kurt/gnuradio/grc/wav_file_to_speaker.py”
Traceback (most recent call last):
File “/home/kurt/gnuradio/grc/wav_file_to_speaker.py”, line 17, in
import howto
ImportError: No module named howto
Where I need help is that I don’t know how to set up python and/or
environment so that python can import these components.
Thanks again for any help you can provide.
On Mon, Apr 12, 2010 at 4:32 PM, Kurt Holmquist
[email protected]wrote:
<?xml version="1.0"?>
includes this block, it fails as follows:
*****************
Where I need help is that I don't know how to set up python and/or
environment so that python can import these components.
*****************
Thanks again for any help you can provide.
Kurt,
I think you want to write “from gnuradio import howto”
Karthik