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

Robert Palumbo palumr at gmail.com
Fri Jun 15 19:29:39 EDT 2012


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,


Robert A Palumbo
University of Massachusetts - Amherst
palumr at gmail.com

More information about the USRP-users mailing list