discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] Terminating flowgraph inside


From: Nemanja Savic
Subject: Re: [Discuss-gnuradio] Terminating flowgraph inside
Date: Mon, 4 May 2015 12:32:44 +0200

Hi,

ok don't mind elaborating my problem again, gladly, but just didn't want to bore you guys more.

What I want to do is to measure BER of my receiver built with USRP1 and WBX board. Here is the diagram, it is probably much better than written explanation:Inline image 1
TX path consists of random source and a block that makes digital signal out of pseudorandom bit sequence.
RX path consists of my receiver.

The idea is that top block code sets the number of symbole that will be transmitted, power level, etc ...
My main problem was how to stop RX path after certain number of received symbols. I had following ideas:
1) TX path informs RX path somehow that the sequence has been transmitted. [i didn't know how to proceed with this one]
2) I made a file sink block with limited number written elements which returns -1 after that number is reached.

The practical problem that I had was how to inform upstream blocks from RC path that they should stop. In one moment I figured out that my GUI based top_block also makes troubles cause it blocks in infinite loop and I didn't know how to call some callback in order to "restart" flowgraph.

So this is basically the idea. I am going now with 2) approach. I realized that sink block can also return -1 and the top_block will go out of wait(). If you have any suggestion I would be happy to hear.

Best,
Nemanja


On Mon, May 4, 2015 at 8:56 AM, Marcus Müller <address@hidden> wrote:
Hi Nemanja,
What happens when arbitrary block in the middle of the flowgraph returns -1?
That block is set to the DONE state. After that, all output that still can be processed is processed, successively setting the downstream blocks to an "don't call me, there can be no input" state.
After that, the top_block.wait() call returns.

You probably want to have a look at Tom's presentation linked in[1].

is there any way that block inside a flowgraph terminate that flowgraph should stop.
Well, returning WORK_DONE==-1, but you've already figured that out, so my guess is you want something else; would you mind elaborating on your problem?

Best regards,
Marcus

[1] http://www.trondeau.com/blog/2013/9/15/explaining-the-gnu-radio-scheduler.html




On 05/03/2015 04:11 PM, Nemanja Savic wrote:
Hello again,

is there any way that block inside a flowgraph terminate that flowgraph should stop. Something like when source block returns -1 from work function.
What happens when arbitrary block in the middle of the flowgraph returns -1?

--
Nemanja Savić


_______________________________________________
Discuss-gnuradio mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


_______________________________________________
Discuss-gnuradio mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio




--
Nemanja Savić

reply via email to

[Prev in Thread] Current Thread [Next in Thread]