Hello,
I have a block that's like the message strobe - it has one output message
port and no other connections.
For whatever reason GR isn't calling the start() function on my block when
I call top_block.start(). I've written a few other blocks that do this
without any problem but this I can't figure out.
Here's part of my class:
class app_strobe(gr.sync_block):
"""
"""
def __init__(self,
filename,
node_id,
iterations='all',
repeat=False,
interval=0.1):
gr.sync_block.__init__(self,
name="app_strobe",
in_sig=None,
out_sig=None)
self.message_port_register_out(PDUS)
def start(self):
super(gr.sync_block, self).start()
print 'starting'
self.timer = threading.Timer(self.interval, self.callback)
self.timer.start()
Here's my unit test for the block:
def test_001(self):
self.tb = gr.top_block()
self.app_out = swarm_app_strobe("events.csv", 1)
self.app_in = gr.message_debug()
self.tb.msg_connect(self.app_out,
"pdus",
self.app_in,
"store")
self.tb.start()
sleep(5)
self.tb.stop()
self.tb.wait()
_______________________________________________
Discuss-gnuradio mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio