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);
_______________________________________________
USRP-users mailing list
USRP-users@lists.ettus.com
http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com