[Top][All Lists]

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

[Discuss-gnuradio] Calling general_work when one of the inputs are avail

From: Ramazan Çetin
Subject: [Discuss-gnuradio] Calling general_work when one of the inputs are available
Date: Tue, 16 Jul 2019 19:17:42 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0

Hello gnuradio users,

I want to implement a general block which have two inputs and one output. The general_work of this block should be called when one of the inputs is available. My task is just tagging and copying inputs to the output.

But my block is called any time, even if there is no input. I just want to call it when there is data one of the inputs.

I have tried to implement forecast() function;

    rtag_impl::forecast (int noutput_items, gr_vector_int &ninput_items_required)
        ninput_items_required[0] = noutput_items;
        ninput_items_required[1] = noutput_items;

But here, my block waits both of the inputs. Is there any way to implement or condition in forecast()? (That means, call general_work when there is data on input 0 or input 1)

Best regards.


reply via email to

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