[USRP-users] Question on Receiving Data Samples on USRP N210

John Malsbury john.malsbury at ettus.com
Fri Jun 15 19:38:32 EDT 2012


In short, there is buffering in the socket.  It sounds like you are 
pulling out samples faster than they arrive, which is probably a good thing.

I'm sure Josh will have more insight to offer.

-John


On 06/15/2012 04:29 PM, Robert Palumbo wrote:
> Hello,
>
> I have a question regarding how receive data packets are handled
> within the UHD ( I am currently using version 003.003.001). When I
> make a call to 'recv' for a single buffer of data samples, how is that
> receive action actually implemented? What I mean is, does the UHD:
>
> a.) Have a separate thread running that constantly receives packets
> and dumps them into some internal buffer, so that when a receive call
> is made you are just receiving data from that internal buffer.
> b.) The call to 'recv' effectively just reads data directly from the
> socket, without any internal buffering.
> c.) Some other method I don't know about :)
>
> My question mainly goes into how I should be receiving samples within
> my program. If there is internal buffering, then I have time to
> collect a small chunk of data, process it, then continue. If there is
> no internal buffering, then I should have a dedicated thread which
> just receives chunks of data and puts them into some external FIFO
> from which they can be read from for processing.
>
> I am having a problem where sometimes when I make a 'recv' call, it
> times out before all samples were received, so I am trying to
> determine the root cause of it, which depends on how the 'recv' call
> is implemented. I know I can just look at the source, which I will,
> but sometimes an explanation can be much quicker.
>
> Thanks for any help anyone can give,
>
> Rob
>
> Robert A Palumbo
> University of Massachusetts - Amherst
> palumr at gmail.com
>
> _______________________________________________
> USRP-users mailing list
> USRP-users at lists.ettus.com
> http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com





More information about the USRP-users mailing list