Forum: GNU Radio GnuRadio flowgraphs in workerthread

20bc15be23b0d5f140db236bd658ebcb?d=identicon&s=25 Alex3371 (Guest)
on 2013-10-11 16:53
(Received via mailing list)
Hello guys,

would it affect the performance of my GNURadio-programm negatively if I
tried to run my GNURadio flowgraphs in a workerthread instead of the
mainthread. In the mainthread I would like to implement a custom
wxPython
GUI.

Also, I still do not understand what the happens when I call wait()
and/or
stop(). I have two flowgraphs, one for receiving and one for
transmitting
with the USRP2. Both use a gr.head block and run to completion after
they
have proccessed a certain ammount of samples. I did some testing and it
seems to work fine. But still I would like to know if the following
lines of
Code make any sense:

main():

receiver = receiver_class()

transmitter = transmitter_class()

while(1):

______receiver.run()
______transmitter.run()
______# reset the head blocks and some other stuff:
______update_attributes()

Can I use run() OR should I use start() + wait() OR start(), wait() +
stop()
?

Regards
Alex Peterson





--
View this message in context:
http://gnuradio.4.n7.nabble.com/GnuRadio-flowgraph...
Sent from the GnuRadio mailing list archive at Nabble.com.
D3e3c5e41e9aed486856802be823e181?d=identicon&s=25 Johnathan Corgan (Guest)
on 2013-10-11 19:32
(Received via mailing list)
Attachment: johnathan.vcf (335 Bytes)
Attachment: signature.asc (229 Bytes)
_______________________________________________
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
20bc15be23b0d5f140db236bd658ebcb?d=identicon&s=25 Alex3371 (Guest)
on 2013-10-11 20:49
(Received via mailing list)
Wow, thank you for your detailed answer.

But one thing I don't understand:

" If you called run() on the first one, it would not
return from that call until the flowgraph exited, and your second
flowgraph would get started too late. "

I don't want the flowgraphs to run parallel to each other. One flowgraph
senses the spectrum with the USRP and the second flowgraph transmitts a
signal with the same USRP (depending on the measurements of the
spectrum).
So it's important that they run consecutively.

In this case, is it fine the way I do call run() for both flowgraphs?
Would
replacing it with start() + wait() make any difference?

Also, I hope you don't mind if I add one more questions:

When the flowgraph is stopped by a head-block the threads are shutdown,
but
the flowgraph itself still exists with all the blockinternal member
variables (including possible changes during the first run) and after a
head-reset it can be re-run with the run()-method. This re-run starts
where
the previous run stopped. Is that correct?













--
View this message in context:
http://gnuradio.4.n7.nabble.com/GnuRadio-flowgraph...
Sent from the GnuRadio mailing list archive at Nabble.com.
D3e3c5e41e9aed486856802be823e181?d=identicon&s=25 Johnathan Corgan (Guest)
on 2013-10-11 21:33
(Received via mailing list)
Attachment: johnathan.vcf (335 Bytes)
Attachment: signature.asc (229 Bytes)
_______________________________________________
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.