discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] Packet Flowgraph and underflows


From: Julian Arnold
Subject: Re: [Discuss-gnuradio] Packet Flowgraph and underflows
Date: Thu, 6 Aug 2015 12:50:01 +0200

Hi Wolfgang,

no, you do not need to use something like a mute block.
The functionality you are looking for is already build into UHD (I'm assuming you are using a USRP as your transmitting device)

The UHD sink in GNU Radio is able to react to some specific stream tags [1] one of which is the length tag.
You can assign a name for this tag in the UHD source block ('Length tag name' field).

Now, if you have assigned a value to this 'Length tag name' field the UHD sink is somehow reacting as a tagged stream block [2].
If samples arrive at the UHD sink, the USRP will only transmit that amount of samples specified in the length tag starting from that length tag.
Therefore, you should not see any 'U' messages no more as the USRP automatically stops transmitting and does not expect any more samples follow.

However, keep in mind that with tagged streams every first sample of a 'packet' needs to have the length tag attached.

E.g consider the following stream of samples where the first sample has a length tag assigned to it with value 10:

1 2 3 4 5 5 7 8 9 10 11
|                             |
length tag                next length tag needs to be exactly here
value = 10 samples

Hope that helps.
Cheers,
Julian

[1] https://gnuradio.org/doc/doxygen/page_stream_tags.html
[2] https://gnuradio.org/doc/doxygen/page_tagged_stream_blocks.html


On Thu, Aug 6, 2015 at 12:05 PM, Wolfgang Nagele <address@hidden> wrote:
Hi,

I've been looking for a solution to this and can't seem to find any examples.

If I have a flowgraph that transmits packets for instance from a TCP
stream - if this TCP stream only receives data occasionally it will
create underflows (showing up as U characters on STDOUT).

What is the proper way of handling such a scenario? I thought of using
something like the Mute block to transmit a 0 data stream during
periods of no data. However that seems excessively complicated to
implement and I think I am missing some pointer here ...

Thanks,
Wolfgang

_______________________________________________
Discuss-gnuradio mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio



--
Julian Arnold

reply via email to

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