diff options
Diffstat (limited to 'host/examples')
-rw-r--r-- | host/examples/benchmark_rx_rate.cpp | 6 | ||||
-rw-r--r-- | host/examples/rx_timed_samples.cpp | 4 | ||||
-rw-r--r-- | host/examples/tx_timed_samples.cpp | 6 |
3 files changed, 8 insertions, 8 deletions
diff --git a/host/examples/benchmark_rx_rate.cpp b/host/examples/benchmark_rx_rate.cpp index 53f4a3c68..6984d7eff 100644 --- a/host/examples/benchmark_rx_rate.cpp +++ b/host/examples/benchmark_rx_rate.cpp @@ -49,7 +49,7 @@ static inline void test_device( sdev->issue_stream_cmd(uhd::stream_cmd_t::STREAM_MODE_START_CONTINUOUS); do { size_t num_rx_samps = dev->recv( - boost::asio::buffer(buff), md, + &buff.front(), buff.size(), md, uhd::io_type_t::COMPLEX_FLOAT32, uhd::device::RECV_MODE_ONE_PACKET ); @@ -79,7 +79,7 @@ static inline void test_device( //flush the buffers while(dev->recv( - boost::asio::buffer(buff), md, + &buff.front(), buff.size(), md, uhd::io_type_t::COMPLEX_FLOAT32, uhd::device::RECV_MODE_ONE_PACKET )); @@ -124,7 +124,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ std::cout << std::endl; std::cout << boost::format("Creating the usrp device with: %s...") % args << std::endl; uhd::usrp::simple_usrp::sptr sdev = uhd::usrp::simple_usrp::make(args); - std::cout << boost::format("Using Device: %s") % sdev->get_name() << std::endl; + std::cout << boost::format("Using Device: %s") % sdev->get_pp_string() << std::endl; sdev->set_rx_rate(500e3); //initial rate while(true){ diff --git a/host/examples/rx_timed_samples.cpp b/host/examples/rx_timed_samples.cpp index 8db312690..9ff8772bc 100644 --- a/host/examples/rx_timed_samples.cpp +++ b/host/examples/rx_timed_samples.cpp @@ -59,7 +59,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ std::cout << boost::format("Creating the usrp device with: %s...") % args << std::endl; uhd::usrp::simple_usrp::sptr sdev = uhd::usrp::simple_usrp::make(args); uhd::device::sptr dev = sdev->get_device(); - std::cout << boost::format("Using Device: %s") % sdev->get_name() << std::endl; + std::cout << boost::format("Using Device: %s") % sdev->get_pp_string() << std::endl; //set properties on the device std::cout << boost::format("Setting RX Rate: %f Msps...") % (rx_rate/1e6) << std::endl; @@ -85,7 +85,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ uhd::rx_metadata_t md; std::vector<std::complex<float> > buff(dev->get_max_recv_samps_per_packet()); size_t num_rx_samps = dev->recv( - boost::asio::buffer(buff), md, + &buff.front(), buff.size(), md, uhd::io_type_t::COMPLEX_FLOAT32, uhd::device::RECV_MODE_ONE_PACKET ); diff --git a/host/examples/tx_timed_samples.cpp b/host/examples/tx_timed_samples.cpp index 333f03fbe..4226aa4c8 100644 --- a/host/examples/tx_timed_samples.cpp +++ b/host/examples/tx_timed_samples.cpp @@ -61,7 +61,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ std::cout << boost::format("Creating the usrp device with: %s...") % args << std::endl; uhd::usrp::simple_usrp::sptr sdev = uhd::usrp::simple_usrp::make(args); uhd::device::sptr dev = sdev->get_device(); - std::cout << boost::format("Using Device: %s") % sdev->get_name() << std::endl; + std::cout << boost::format("Using Device: %s") % sdev->get_pp_string() << std::endl; //set properties on the device std::cout << boost::format("Setting TX Rate: %f Msps...") % (tx_rate/1e6) << std::endl; @@ -81,8 +81,8 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ //send the entire buffer, let the driver handle fragmentation size_t num_tx_samps = dev->send( - boost::asio::buffer(buff), - md, uhd::io_type_t::COMPLEX_FLOAT32, + &buff.front(), buff.size(), md, + uhd::io_type_t::COMPLEX_FLOAT32, uhd::device::SEND_MODE_FULL_BUFF ); std::cout << std::endl << boost::format("Sent %d samples") % num_tx_samps << std::endl; |