From fb7e8a09a58f4c08f70ba0e088710a0e011ea01d Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Wed, 9 Feb 2011 19:01:28 -0800 Subject: uhd: replaced std::vector for buffer arguments in send/recv Created new type ref_vector for representing a vector of pointers. Can be created from std::vector or a pointer. Removes the convenience constrcutors for send/recv, its not needed. Removes malloc/free overhead when using send/recv with pointer. --- host/examples/test_async_messages.cpp | 8 +++----- host/examples/tx_waveforms.cpp | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) (limited to 'host/examples') diff --git a/host/examples/test_async_messages.cpp b/host/examples/test_async_messages.cpp index 7f1094ee0..7f922ed35 100644 --- a/host/examples/test_async_messages.cpp +++ b/host/examples/test_async_messages.cpp @@ -1,5 +1,5 @@ // -// Copyright 2010 Ettus Research LLC +// Copyright 2010-2011 Ettus Research LLC // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -91,8 +91,7 @@ bool test_underflow_message(uhd::usrp::multi_usrp::sptr usrp){ md.end_of_burst = false; md.has_time_spec = false; - usrp->get_device()->send( - NULL, 0, md, + usrp->get_device()->send("", 0, md, uhd::io_type_t::COMPLEX_FLOAT32, uhd::device::SEND_MODE_FULL_BUFF ); @@ -139,8 +138,7 @@ bool test_time_error_message(uhd::usrp::multi_usrp::sptr usrp){ usrp->set_time_now(uhd::time_spec_t(200.0)); //time at 200s - usrp->get_device()->send( - NULL, 0, md, + usrp->get_device()->send("", 0, md, uhd::io_type_t::COMPLEX_FLOAT32, uhd::device::SEND_MODE_FULL_BUFF ); diff --git a/host/examples/tx_waveforms.cpp b/host/examples/tx_waveforms.cpp index dd18d3174..05d49a8b3 100644 --- a/host/examples/tx_waveforms.cpp +++ b/host/examples/tx_waveforms.cpp @@ -171,7 +171,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ //send a mini EOB packet md.start_of_burst = false; md.end_of_burst = true; - usrp->get_device()->send(NULL, 0, md, + usrp->get_device()->send("", 0, md, uhd::io_type_t::COMPLEX_FLOAT32, uhd::device::SEND_MODE_FULL_BUFF ); -- cgit v1.2.3