[USRP-users] timeout in tx_timed_samples

Hojoon Yang omnibusor at kaist.ac.kr
Wed Nov 8 09:48:36 EST 2017


Hi all,In the example tx_timed_samples.cppthere is tx_stream->send(... , ... , ..., timeout)How the timeout works?when I set the value of timeout zero or 0.00001, I expect that the terminal show the "Send timeout..."because it will not have enough time to send all samples during timeout 0.(I expect that it will send 0 samples)it will timeout before entire transmission of samples..But seems that it works perfectly.. it prints out Sent packet : 2044 which is the maximum value of samples..How the timeout works!?!?Thanks in advance!!      size_t num_acc_samps = 0; //number of accumulated samples     while(num_acc_samps < total_num_samps){         size_t samps_to_send = std::min(total_num_samps - num_acc_samps, buff.size());          //send a single packet         size_t num_tx_samps = tx_stream->send(             &buff.front(), samps_to_send, md, timeout         );          //do not use time spec for subsequent packets         md.has_time_spec = false;          if (num_tx_samps < samps_to_send) std::cerr << "Send timeout..." << std::endl;         if(verbose) std::cout << boost::format("Sent packet: %u samples") % num_tx_samps << std::endl;          num_acc_samps += num_tx_samps;     }          //send a mini EOB packet     md.end_of_burst   = true;     tx_stream->send("", 0, md);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ettus.com/pipermail/usrp-users_lists.ettus.com/attachments/20171108/686c501e/attachment-0002.html>


More information about the USRP-users mailing list