[Top][All Lists]

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

Re: [Discuss-gnuradio] Flowgraph generates output even when the input ex

From: Mir M. Ali
Subject: Re: [Discuss-gnuradio] Flowgraph generates output even when the input exhausts
Date: Sat, 5 Dec 2009 10:05:34 -0600

There was a problem in my block. I fixed it. I am using gr_block and cosume_each.

Thanks for the help

On Sat, Dec 5, 2009 at 8:54 AM, Eric Blossom <address@hidden> wrote:
On Thu, Dec 03, 2009 at 11:16:01AM -0600, Mir M. Ali wrote:
> Hi,
> I developed a gnuradio block that takes 2 inputs. Input_01 is coming from a
> source that repeats and Input_02 is coming from a source that exhausts after
> a while. The output should only be generated when there is data on both the
> input lines. I see in my flowgraph that even when the data on input_02
> exhausts output is still generated even though I see no problem with my C++
> code. Its a simple operation in which for each input in Input_02 line the
> block outputs 'N' items from Input_01. Once, the data source (in this case
> is a file_source in non-repeat mode) for Input_02 exhausts i.e. the file is
> read completely the output should stop being generated as there is nothing
> coming on Input_02. I expect the previous data stored in the buffer for
> Input_02 is flushed by the scheduler after one work() cycle.
> Any  help would be appreciated.
> Thanks,
> Mir

GNU Radio does work the way you described.  You can confirm this by
doing something like:

 src1 = gr.vector_source_f((1,2,3,4,5,6), False)
 src2 = gr.vector_source_f((10,11,12,13,14,15), True)
 op = gr.add_ff()
 dst = gr.vector_sink_f()

 tb.connect(src1, (op, 0))
 tb.connect(src2, (op, 1))
 tb.connect(op, dst)


This will halt.

There is most likely a problem in your block.  If you're subclassing
gr_block, are you calling consume or consume_each?


reply via email to

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