|
From: | Thabet GHARBI |
Subject: | Re: [Discuss-gnuradio] connect/disconnect blocks in hierarchical block depending on a variable |
Date: | Tue, 22 Oct 2019 12:18:42 +0200 |
Hello!
Re: 1
That's not how GNU Radio should be used, and thus, it's impossible to
do that, architecturally. Connecting blocks pretty much has non-
deterministic behaviour w.r.t. to buffer state, and also, without the
block connected, your flow graph probably wouldn't be properly
connected and couldn't even start!
Instead, have a block (not a hier block) that outputs items according
to some state. Often, it's easy to transport state transitions as
stream tags.
Re: 2
Hier blocks shouldn't be involved in signal processing. So, although
it's generally possible to make a hier block a message acceptor, it's
rarely a good idea.
Best regards,
Marcus
On Mon, 2019-10-21 at 10:52 +0200, Thabet GHARBI wrote:
> Hello,
>
> I'm writing a hierarchical block in C++, in which I instantiate 3 custom (hier)blocks.
> I want to start Block1 only, and depending on the value of one of its attributes (which changes during processing), disconnect it, and connect either block2 or block3,
>
> 1- What's the simplest way to do this?
> 2- In case we use "message passing", is it possible to interpret the message at hierarchical block level?
>
> Thanks in advance.
>
> Best Regards,
> _______________________________________________
> Discuss-gnuradio mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
[Prev in Thread] | Current Thread | [Next in Thread] |