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

Chris Stankevitz cstankevitz at toyon.com
Fri Oct 23 16:06:20 EDT 2015


> On Oct 22, 2015, at 8:07 PM, Marcus D. Leech via USRP-users <usrp-users at lists.ettus.com> wrote:
> 
> On 10/22/2015 10:56 PM, Chris Stankevitz via USRP-users wrote:
>> 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
>> _______________________________________________
>> USRP-users mailing list
>> USRP-users at lists.ettus.com
>> http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com
> You can look at the out-of-sequence bool, and also ERROR_CODE_OVERFLOW.

Marcus,

Thank you.  Do I need to check both?  Is it possible for one to fire without the other?

Thank you,

Chris




More information about the USRP-users mailing list