[USRP-users] Not dropping samples with UHD/c++ interface

Chris Stankevitz cstankevitz at toyon.com
Thu Oct 22 22:56:14 EDT 2015


Hi,

I want to retrieve samples using UHD in my c++ program.  I am using rx_samples_to_file.cpp as a guide.

It is important for my application that I am aware when samples are dropped (due to overflow, etc).  How can I tell if data is missing?  I assume I need to be watching some or all of these values:

uhd::rx_metadata_t::more_fragments

uhd::rx_metadata_t::fragment_offset

uhd::rx_metadata_t::start_of_burst

uhd::rx_metadata_t::end_of_burst

uhd::rx_metadata_t::out_of_sequence

uhd::rx_metadata_t::error_code (is uhd::rx_metadata_t::error_code_t::ERROR_CODE_NONE a guarantee that I have not lost data?)

uhd::rx_streamer::recv return value not equal to the "nsamps_per_buff" (is this a guarantee that data was lost or is about to be lost?)


Also,

What value should I specify for:

uhd::rx_streamer::recv argument nsamps_per_buf (can I pick any value I please between 1 and 2^32-1?)

uhd::rx_streamer::recv argument one_packet

I read the docs at http://files.ettus.com/manual/classuhd_1_1rx__streamer.html etc but it didn't clear up the answers for me.

Thank you,

Chris



More information about the USRP-users mailing list