[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Discuss-gnuradio] Can't stop the top_block which contain transmit_path
From: |
Ling Huang |
Subject: |
[Discuss-gnuradio] Can't stop the top_block which contain transmit_path with GNU Radio version 11001 |
Date: |
Fri, 15 May 2009 17:51:30 -0700 (PDT) |
sorry for attaching this again.
I use UBUNTU 9.04 + gnuradio 11001 and UBUNTU 8.10 +gnuradio 10853 got the
same problem.
I modify the gnuradio-examples/python/digital codes for some experiences. In
one case I want to stop the running flow graph(top block), and then to start
a new connect. I do it well in stop the receive_path connect. But I just
can't stop the top block contain a transmit_path. If I stop the top block,
and wait, it hang in the tb.wait.
I seem not express well. To make it simple let's see:
class my_topblock(gr.top_block)
def __init__(self):
self.trans=transmit_path(...)
self.connect(self.trans)
....
tb.start()
tb.stop()
tb.wait() # IT HANG IN HERE
...
tb.start()
I made a simple test code to test stopping the top block , please test it to
see what's the problem.
ps.Eric,
would you please tell me what cause tb.wait() hanging, where is this bug
from?
I have install the newest version of GNU Radio, but the problem is still the
same.
-------------------------------code--------------------------------------------------------
#!/usr/bin/env python
from gnuradio import gr, gru, modulation_utils
from gnuradio import eng_notation
from gnuradio.eng_option import eng_option
from optparse import OptionParser
import random, time, struct, sys
# from current dir
from transmit_path import transmit_path
import fusb_options
class my_top_block(gr.top_block):
def __init__(self,mod_class,options):
gr.top_block.__init__(self)
self.txpath = transmit_path(mod_class, options)
self.connect(self.txpath);
def main():
mods = modulation_utils.type_1_mods()
parser = OptionParser(option_class=eng_option,
conflict_handler="resolve")
expert_grp = parser.add_option_group("Expert")
parser.add_option("-m", "--modulation", type="choice",
choices=mods.keys(),
default='gmsk',
help="Select modulation from: %s [default=%%default]"%
(', '.join(mods.keys()),))
transmit_path.add_options(parser, expert_grp)
for mod in mods.values():
mod.add_options(expert_grp)
r = gr.enable_realtime_scheduling()
fusb_options.add_options(expert_grp)
(options, args) = parser.parse_args ()
tb=my_top_block(mods[options.modulation], options)
tb.start()
tb.stop()
print "afater stop"
tb.wait()
print "wait done"
tb.start()
print "start again"
if __name__ == '__main__':
try:
main()
except KeyboardInterrupt:
pass
--
View this message in context:
http://www.nabble.com/Can%27t-stop-the-top_block-which-contain-transmit_path-with-GNU-Radio-version-11001-tp23569318p23569318.html
Sent from the GnuRadio mailing list archive at Nabble.com.
- [Discuss-gnuradio] Can't stop the top_block which contain transmit_path with GNU Radio version 11001,
Ling Huang <=
- Re: [Discuss-gnuradio] Can't stop the top_block which contain transmit_path with GNU Radio version 11001, Eric Blossom, 2009/05/16
- Re: [Discuss-gnuradio] Can't stop the top_block which contain transmit_path with GNU Radio version 11001, Ling Huang, 2009/05/17
- Re: [Discuss-gnuradio] Can't stop the top_block which contain transmit_path with GNU Radio version 11001, Eric Blossom, 2009/05/18
- Re: [Discuss-gnuradio] Can't stop the top_block which contain transmit_path with GNU Radio version 11001, Ling Huang, 2009/05/18
- Re: [Discuss-gnuradio] Can't stop the top_block which contain transmit_path with GNU Radio version 11001, Ling Huang, 2009/05/18
- Re: [Discuss-gnuradio] Can't stop the top_block which contain transmit_path with GNU Radio version 11001, Ling Huang, 2009/05/19
- Re: [Discuss-gnuradio] Can't stop the top_block which contain transmit_path with GNU Radio version 11001, Ling Huang, 2009/05/19