[Top][All Lists]

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

Re: [Discuss-gnuradio] streaming from file

From: Nowlan, Sean
Subject: Re: [Discuss-gnuradio] streaming from file
Date: Wed, 14 Nov 2012 14:35:14 +0000

Good point. That's probably what I'll do.

Is there any way to check whether upstream blocks are done? From examining 
gr_block_executor, it knows how to do this, so would it make sense to have it 
alert downstream blocks?

-----Original Message-----
From: address@hidden [mailto:address@hidden On Behalf Of Tom Rondeau
Sent: Tuesday, November 13, 2012 10:42 PM
To: Nowlan, Sean
Cc: address@hidden
Subject: Re: [Discuss-gnuradio] streaming from file

On Tue, Nov 13, 2012 at 4:32 PM, Nowlan, Sean <address@hidden> wrote:
> Hi all,
> I am working on a custom block that tags a stream based on a binary 
> file stretched into unpacked form:
> (1)                              (2)
> (3)
> gr_file_source(repeat=false) --> gr_packed_to_unpacked(1, 
> gr.MSB_FIRST) --> my_block
> I want to come up with a good way to detect in my_block whether the 
> stream input from (2) is finished. I guess gr_file_source will return 
> WORK_DONE first, but I don't know if/how that ripples down to 
> my_block. Basically I want to be able to tag the last incoming sample 
> with an end-of-burst tag, but I don't know how to do this without 
> having advance knowledge about the size of the source file.
> Thanks,
> Sean


Yeah, you won't be able to tell if you're at the end of the file or if the 
scheduler just passed you 0 items to process. There's no indication of that.

Probably the easiest thing for you to do is quickly edit the file source block 
to generate the tag when it reaches EOF. That should be pretty straight-forward.


reply via email to

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