Can't stop the top_block which contain transmit_path


#1

Hi, all
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.
-------------------------------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't-stop-the-top_block-which-contain-transmit_path-tp23555109p23555109.html
Sent from the GnuRadio mailing list archive at Nabble.com.


#2

What version of GNU Radio are you using?
my GNU Radio version is 10853


View this message in context:
http://www.nabble.com/Can't-stop-the-top_block-which-contain-transmit_path-tp23555109p23557528.html
Sent from the GnuRadio mailing list archive at Nabble.com.


#3

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.

Eric B. wrote:

block,
tb.wait() # IT HANG IN HERE
related to this.

Eric


Discuss-gnuradio mailing list
removed_email_address@domain.invalid
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio


View this message in context:
http://www.nabble.com/Can't-stop-the-top_block-which-contain-transmit_path-tp23555109p23562707.html
Sent from the GnuRadio mailing list archive at Nabble.com.


#4

On Fri, May 15, 2009 at 12:55:20AM -0700, Ling H. wrote:

     self.trans=transmit_path(...)

see what’s the problem.
What version of GNU Radio are you using?

We fixed a problem in the trunk about a month ago that could be
related to this.

Eric