Re: [Discuss-gnuradio] Unable to stop the flow graph after calling stop()

2014-03-03 Thread Marcus Müller
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Activecat, the constructor of a block must have been called before the block has been connect()ed; so there's no way a flowgraph is already running when your block's constructor is called. Greetings, Marcus On 03.03.2014 06:53, Activecat wrote:

Re: [Discuss-gnuradio] Unable to stop the flow graph after calling stop()

2014-03-03 Thread Activecat
Dear Marcus, Says, the constructor performed some basic checking on the constructor arguments, then had found some fatal error (says, division by zero) and decided to ban the flowgraph from being executed. A workaround is to get the constructor to set a class variable to false, says, d_valid

Re: [Discuss-gnuradio] Unable to stop the flow graph after calling stop()

2014-03-03 Thread Miklos Maroti
Dear Activecat, Throw an exception. It will kill the application. Miklos On Mon, Mar 3, 2014 at 11:57 AM, Activecat active...@gmail.com wrote: Dear Marcus, Says, the constructor performed some basic checking on the constructor arguments, then had found some fatal error (says, division by

Re: [Discuss-gnuradio] Unable to stop the flow graph after calling stop()

2014-03-03 Thread Marcus Müller
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Activecat, as Miklos wrote: Let your Constructor throw an exception. For a little detail on that, refer to http://www.parashift.com/c++-faq-lite/ctors-can-throw.html . You can surround your block construction with a try{}catch-clause, and handle

Re: [Discuss-gnuradio] Unable to stop the flow graph after calling stop()

2014-03-03 Thread Activecat
Dear gurus, I got it, thank you very much ! Regards, Activecat On Mon, Mar 3, 2014 at 9:11 PM, Martin Braun martin.br...@ettus.com wrote: On 03/03/2014 12:37 PM, Marcus Müller wrote: Hi Activecat, as Miklos wrote: Let your Constructor throw an exception. For a little detail on that,

Re: [Discuss-gnuradio] Unable to stop the flow graph after calling stop()

2014-02-02 Thread Martin Braun
On 01.02.2014 13:51, Activecat wrote: But the function stop() fails to work. The flow graph continue executing infinitely... Question: How to stop the flow graph when this-d_complete == true ? Return -1 (or WORK_DONE) in your work() function. MB

[Discuss-gnuradio] Unable to stop the flow graph after calling stop()

2014-02-01 Thread Activecat
Dear guru, I am trying to create a block similar to Vector Source. My objective is to stop the flow graph when the vector has sent out all its elements. (This is equivalent to Repeat: No in Vector Source) But the function stop() fails to work. The flow graph continue executing infinitely...