[USRP-users] Not dropping samples with UHD/c++ interface
cstankevitz at toyon.com
Thu Oct 22 22:56:14 EDT 2015
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::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?)
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.
More information about the USRP-users