Gnuradio questions

Goodmorning,
I’m a PhD student working with gnuradio in ubuntu.
The motivation for which I need to write is regarded to how gnuradio
treats
a project flow graph to make it as an application program, I have
searched
over internet and various forum but I have not find nothing.

Consider that I have a gnuradio flow graph that works fine, and also, I
have the top_block.py that works fine, when imparting ./top_block.py
from
the terminal.

My questions:

Is “top_block.py” my final application program? ( for example, is the
executable “.exe” file equivalent in windows )

I would use this file as an independent program, running it in an other
pc
where gnuradio is not installed, is it possible? or Have I need some
tools
( for example, at least python installed ).

Last, Is it possible to estimate the execution time of a specific block
in
a gnuradio flow graph?

If there are documentation that I have missed in the net, please give me
the reference…
I think for you these are simple questions, but I’m at the beginning and
gnuradio is a beautiful environment, I will learn!

Thank you for your help in advance,

Sincerely,
Simone Ciccia,
PhD student,
electronic engineering,
Antenna and EMC lab,
Politechnic of Turin, Italy

On Mon, Jul 7, 2014 at 3:16 PM, Simone Ciccia S210664 <
[email protected]> wrote:

My questions:

Is “top_block.py” my final application program? ( for example, is the
executable “.exe” file equivalent in windows )

I would use this file as an independent program, running it in an other pc
where gnuradio is not installed, is it possible? or Have I need some tools
( for example, at least python installed ).

I am not aware of the exact answer to your question. Here is what I
think.

Since the top_block.py is a python program it will require at least
python
interpreter. When you run top_block.py, it usually imports modules from
GNU
Radio. So if you run it on a machine without GNU Radio installed, python
will complain saying that it can not import modules required for your
application.

May be there are ways to generate a standalone executable. But the
top_block.py is not a standalone executable. I hope someone out there
knows
a better answer to your question.

Discuss-gnuradio mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

Regards

Hello Simone,
On 07.07.2014 11:46, Simone Ciccia S210664 wrote:

Goodmorning,
I’m a PhD student working with gnuradio in ubuntu.
The motivation for which I need to write is regarded to how gnuradio treats
a project flow graph to make it as an application program, I have searched
over internet and various forum but I have not find nothing.
Ok, so your flow graph is actually “just” blocks connected together.
Most of the “magic” happens in these blocks, which simply are wrappers
for a specific method (general_work) which gets called upon input data
and produces output data. GNU Radio’s core job is to keep these blocks
called and ensure that data is in the right place at the right time and
call these blocks.
Consider that I have a gnuradio flow graph that works fine, and also, I
have the top_block.py that works fine, when imparting ./top_block.py from
the terminal.
Ah, so you’ve actually seen a GNU Radio application in action! Sounds
like you generated a python file from the GNU Radio companion, where
flow graphs are represented in a graphical manner. If you look at
top_block.py you will find a bunch of “connect()” calls, and these match
the connections you drew in GRC. This is how GNU Radio sees the
flowgraph: Constructed from block class instances, their in- and outputs
connected by connect.
Somewhere at the end of the file, you see a “top_block.start()” or
“.run()”; this is where GNU Radio takes over and starts calling blocks’
work functions to get the data running through the flow graph.

My questions:

Is “top_block.py” my final application program? ( for example, is the
executable “.exe” file equivalent in windows )
Yes.
I would use this file as an independent program, running it in an other pc
where gnuradio is not installed, is it possible? or Have I need some tools
( for example, at least python installed ).
Well, when running a GNU Radio program you will need GNU Radio. Under
certain circumstances, you can get away with statically linking all the
used GNU Radio functionality into your executable, but when using
python, this is never the case.
So for all means, GNU Radio is only a library that your program uses;
it’s a mighty library. You have to have that library when you want to
run a program. This is like every other library out there, you can’t for
example execute a program that uses the QT library to generate graphical
interfaces without having the QT library on the target computer.
That is why windows software usually comes with an installer that
installs a load of application-necessary libraries, that are not
directly part of the software you are using, but are used by it. Under
most linux distributions, library dependencies are handled by package
management, so you just install let’s say firefox and your system
installs all the necessary libraries itself.
Last, Is it possible to estimate the execution time of a specific block in
a gnuradio flow graph?
Yes, you can measure it. Have a look at the “performance counters”
subpage on [1].
If there are documentation that I have missed in the net, please give me
the reference…
I think the working principle is explained on gnuradio.org in the “what
is GNU Radio and Why do I want it” article among with the beginners’
Tutorials on the “Tutorials” page.
I consider gnuradio.org to be the only /reliable/ source on how GNU
Radio works and for beginners’ tutorials, all the other sites will be
outdated quite fast.
I think for you these are simple questions, but I’m at the beginning and
gnuradio is a beautiful environment, I will learn!
I hope that it serves your purposes well :slight_smile:

Happy hacking,
Marcus

[1] http://gnuradio.org/doc/doxygen/

May be there are ways to generate a standalone executable.

I do this on windows, if you are looking to distribute binaries then
re-write the python flow-graph in C++, then compile and you will get a
portable binary exe, if the other system does not have Gnuradio then
just
include the gnuradio*.dll’s with it. Follow the windows native CMake
build
guide to generate those. If you want to stay in linux then it will be
libgnuradio-*.so’s.

Last, Is it possible to estimate the execution time of a specific block in
a gnuradio flow graph?

You can look into ‘gnuradio performance counters’.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs