Is this correct, or am I missing something?With Tim's suggestion, when s(t)=1 we will have the right output, but the input will be waiting in block's A queue to be processed thewhen s(t)=1.I guess I forgot to make this one thing more clear:I would like the input stream of block A to be consumed even
moment s(t) turns 0.But this gives me the following idea:I guess what i need in addition to that is a block that based
on s(t) either sends the input to the output when s(t)==0 (which is then connected to A),
or just consumes the input (when s(t)==1).Is there such a block available? (even if not, this is pretty easy to write!)Any comments on this?thanks for the hints and ideas!Achilleas
I solved a similar problem by creating a general block that consumes an input stream on some condition, and passes it otherwise. If you pair this with another block that tags a sample where passing or rejecting should begin (correlate_access_code_tag?) it works quite nicely. With this approach you could use the control pin idea, but I would recommend tags to keep it cleaner.
On Wed, Oct 2, 2013 at 5:51 PM, Monahan-Mitchell, Tim <tmonahan@qti.qualcomm.com> wrote:
Can you do this with a 2:1 mux block? Input 2 = constant 0, control input is s(t)?
From: discuss-gnuradio-bounces+tmonahan=qti.qualcomm.com@gnu.org [mailto:discuss-gnuradio-bounces+tmonahan=qti.qualcomm.com@gnu.org] On Behalf Of Achilleas Anastasopoulos
Sent: Wednesday, October 02, 2013 3:48 PM
To: Discuss-gnuradio@gnu.org
Subject: [Discuss-gnuradio] Activating/Deactivating Blocks in real time
I have the following problem that I would like your opinion on how to solve elegantly:
I have a block A (say a standard sync block with some memory--eg an fir filter) which
has input x(t) and output y(t) and is pretty computationally intensive.I would like to add the following functionality to it:
Add a new input s(t) to A which can be 0 or 1.When s(t)=1 the block operates as before ie, it processes x(t) to generate y(t).
If s(t)=0 I would like it to output y(t)=0 and consume the appropriate x(t)'s from the input.
This way when s(t)=0 block A essentially "does not work".
This is pretty straightforward to code if I modify the work function of block A.
However, block A for me is a pretty complicated hierarchical block, so I don't have access to its "work" function.One way to do this is to rewrite the whole hierarchical block A as a flat block and then do as suggested above.
Is there a better way?
Thanks
Achilleas
_______________________________________________
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
No comments:
Post a Comment