discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] How to know that the last sample has arrived


From: Marcus Müller
Subject: Re: [Discuss-gnuradio] How to know that the last sample has arrived
Date: Fri, 31 Mar 2017 17:14:24 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0

Hi Ruben,

technically, I like the idea of having the scheduler do things like
tagging final packets. That could be a low-overhead operation (happens
only once in an application's livetime), and you could hack it into the
scheduler relatively easy, but, to be honest, the last thing our
scheduler needs now is more special cases and hand-hacked-in features...
But that's my 2ct.

> An example is if I want to make an input signal which consists of 100
> zeros, followed by 1000 random bits, then followed by the content of a
> file?
> With a concatenation block, it could be done with 4 blocks:
> vector_source, random_source, file_source, contatenate_inputs_ff.
Well, you could implement that with a general block that consumes
different amount of samples from different inputs if you know how many
will be coming from each.

Personally, I like the idea of the file source, **even** in repeat mode,
adding a "EOF" tag (at the end of file) so very much that I'd definitely
help you extend the file source to do that and get it merged into GNU
Radio :)

Best regards,

Marcus


On 31.03.2017 16:38, Ruben Undheim wrote:
> Thank you both for answering.
>
>> I would totally agree with Marcus. Especially you first approach can't
>> work reliably.
> It appeared quite stable for file_source, but I got some problems
> today with one of my custom blocks which suddenly caused the following
> block to be called with ninput_items[0] == 1, without it being the
> last sample...
>
>> What about using tagged streams or just a tag on the last sample? Is
>> that an option?
> The reason for posting the question was mainly to make sure I am not
> missing something obvious. Putting a tag on the last sample sounds
> like the best solution so far. Thanks. The only complication is that
> then I will have to CLONE the implementations for vector_source,
> file_source, random_source...  Would it be an idea to modify these
> blocks so that they always add an "END" tag on the last sample in the
> main code base?
>
> I am just wondering, how would one go about to make blocks for
> "concatenating" input streams, or "repeating" the finite-length input
> stream, or "zero-padding" finite-length input streams if we do not
> have such an "END" tag? I am a bit surprised if nobody has never
> wanted to do this before.
>
> An example is if I want to make an input signal which consists of 100
> zeros, followed by 1000 random bits, then followed by the content of a
> file?
> With a concatenation block, it could be done with 4 blocks:
> vector_source, random_source, file_source, contatenate_inputs_ff.
>
>
> Cheers,
> Ruben
>
> _______________________________________________
> Discuss-gnuradio mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio




reply via email to

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