discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] Details on USB buffer


From: Stefan Bruens
Subject: Re: [Discuss-gnuradio] Details on USB buffer
Date: Fri, 27 Feb 2009 12:43:08 +0100
User-agent: KMail/1.11.0 (Linux/2.6.27.7-9-mtrr_san; KDE/4.2.0; x86_64; ; )

On Friday 27 February 2009 01:05:52 Tony wrote:
> The USRP C++ example program uses this code to move USRP USB data into a
> buffer:
>
>       urx->read(&buf, bufsize, &overrun);
>
> If this line is called many times in a short period of time will the buffer
> have some of the data leftover from previous read(s)?  Can I assume that
> the OS will not return the buffer until the next n bytes have been
> received?
>
> Tony 

The read is a blocking read. The return value is the number of bytes actually 
read, which will always be the same as bufsize or an error value (<0). Samples 
may be thrown away in the USRP itself this is called an overrun, in this case 
the corresponding variable will be set to true.

Stefan

-- 
Stefan Brüns  /  Bergstraße 21  /  52062 Aachen
phone: +49 241 53809034     mobile: +49 151 50412019




reply via email to

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