|
From: | Bastian Bloessl |
Subject: | Re: [Discuss-gnuradio] stop/start is not called in gr.basic_block |
Date: | Thu, 5 Oct 2017 08:29:44 +0100 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 |
Hi, On 10/05/2017 03:13 AM, Miklos Maroti wrote:
I am trying to implement a simple block in python but it seems that stop and start is never called when I implement them. The bare bones python code would be this: class test(gr.basic_class): def __init__(self): gr.basic_block.__init__(self, name="test", in_sig=None, out_sig=None) def start(self): print "never called" return gr.basic_block.start(self) The same works in C++. I could not find any example that implements start/stp in python, but looking at the docs for gr.basic_block it should work. Any ideas?
AFAIK, if the block is not connected to any other block, it is not handled by the flow graph/scheduler. If you don't actually have a use-case for a completely separate block, you could try adding a stream or message port an connect it.
Best, Bastian
[Prev in Thread] | Current Thread | [Next in Thread] |