diff options
Diffstat (limited to 'host')
23 files changed, 59 insertions, 59 deletions
diff --git a/host/examples/benchmark_rate.cpp b/host/examples/benchmark_rate.cpp index 7862bd44b..fce184514 100644 --- a/host/examples/benchmark_rate.cpp +++ b/host/examples/benchmark_rate.cpp @@ -44,8 +44,8 @@ void benchmark_rx_rate(uhd::usrp::multi_usrp::sptr usrp){ uhd::set_thread_priority_safe(); //create a receive streamer - uhd::streamer_args stream_args("fc32"); //complex floats - uhd::rx_streamer::sptr rx_stream = usrp->get_rx_streamer(stream_args); + uhd::stream_args_t stream_args("fc32"); //complex floats + uhd::rx_streamer::sptr rx_stream = usrp->get_rx_stream(stream_args); //print pre-test summary std::cout << boost::format( @@ -98,8 +98,8 @@ void benchmark_tx_rate(uhd::usrp::multi_usrp::sptr usrp){ uhd::set_thread_priority_safe(); //create a transmit streamer - uhd::streamer_args stream_args("fc32"); //complex floats - uhd::tx_streamer::sptr tx_stream = usrp->get_tx_streamer(stream_args); + uhd::stream_args_t stream_args("fc32"); //complex floats + uhd::tx_streamer::sptr tx_stream = usrp->get_tx_stream(stream_args); //print pre-test summary std::cout << boost::format( diff --git a/host/examples/latency_test.cpp b/host/examples/latency_test.cpp index b995b0433..518d2383a 100644 --- a/host/examples/latency_test.cpp +++ b/host/examples/latency_test.cpp @@ -84,9 +84,9 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ std::vector<std::complex<float> > buffer(nsamps); //create RX and TX streamers - uhd::streamer_args stream_args("fc32"); //complex floats - uhd::rx_streamer::sptr rx_stream = usrp->get_rx_streamer(stream_args); - uhd::tx_streamer::sptr tx_stream = usrp->get_tx_streamer(stream_args); + uhd::stream_args_t stream_args("fc32"); //complex floats + uhd::rx_streamer::sptr rx_stream = usrp->get_rx_stream(stream_args); + uhd::tx_streamer::sptr tx_stream = usrp->get_tx_stream(stream_args); //initialize result counts int time_error = 0; diff --git a/host/examples/rx_ascii_art_dft.cpp b/host/examples/rx_ascii_art_dft.cpp index 14b83fb65..2e5bbba9d 100644 --- a/host/examples/rx_ascii_art_dft.cpp +++ b/host/examples/rx_ascii_art_dft.cpp @@ -148,8 +148,8 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ } //create a receive streamer - uhd::streamer_args stream_args("fc32"); //complex floats - uhd::rx_streamer::sptr rx_stream = usrp->get_rx_streamer(stream_args); + uhd::stream_args_t stream_args("fc32"); //complex floats + uhd::rx_streamer::sptr rx_stream = usrp->get_rx_stream(stream_args); //allocate recv buffer and metatdata uhd::rx_metadata_t md; diff --git a/host/examples/rx_multi_samples.cpp b/host/examples/rx_multi_samples.cpp index 56aed60af..7561f1285 100644 --- a/host/examples/rx_multi_samples.cpp +++ b/host/examples/rx_multi_samples.cpp @@ -113,10 +113,10 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ //create a receive streamer //linearly map channels (index0 = channel0, index1 = channel1, ...) - uhd::streamer_args stream_args("fc32"); //complex floats + uhd::stream_args_t stream_args("fc32"); //complex floats for (size_t chan = 0; chan < usrp->get_rx_num_channels(); chan++) stream_args.channels.push_back(chan); //linear mapping - uhd::rx_streamer::sptr rx_stream = usrp->get_rx_streamer(stream_args); + uhd::rx_streamer::sptr rx_stream = usrp->get_rx_stream(stream_args); //setup streaming std::cout << std::endl; diff --git a/host/examples/rx_samples_to_file.cpp b/host/examples/rx_samples_to_file.cpp index 58bd158a5..605439748 100644 --- a/host/examples/rx_samples_to_file.cpp +++ b/host/examples/rx_samples_to_file.cpp @@ -39,8 +39,8 @@ template<typename samp_type> void recv_to_file( size_t samps_per_buff ){ //create a receive streamer - uhd::streamer_args stream_args(cpu_format); - uhd::rx_streamer::sptr rx_stream = usrp->get_rx_streamer(stream_args); + uhd::stream_args_t stream_args(cpu_format); + uhd::rx_streamer::sptr rx_stream = usrp->get_rx_stream(stream_args); uhd::rx_metadata_t md; std::vector<samp_type> buff(samps_per_buff); diff --git a/host/examples/rx_samples_to_udp.cpp b/host/examples/rx_samples_to_udp.cpp index 3db436ad5..cf7fd493a 100644 --- a/host/examples/rx_samples_to_udp.cpp +++ b/host/examples/rx_samples_to_udp.cpp @@ -131,8 +131,8 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ } //create a receive streamer - uhd::streamer_args stream_args("fc32"); //complex floats - uhd::rx_streamer::sptr rx_stream = usrp->get_rx_streamer(stream_args); + uhd::stream_args_t stream_args("fc32"); //complex floats + uhd::rx_streamer::sptr rx_stream = usrp->get_rx_stream(stream_args); //setup streaming uhd::stream_cmd_t stream_cmd(uhd::stream_cmd_t::STREAM_MODE_NUM_SAMPS_AND_DONE); diff --git a/host/examples/rx_timed_samples.cpp b/host/examples/rx_timed_samples.cpp index 6389375d9..0851593cd 100644 --- a/host/examples/rx_timed_samples.cpp +++ b/host/examples/rx_timed_samples.cpp @@ -71,8 +71,8 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ usrp->set_time_now(uhd::time_spec_t(0.0)); //create a receive streamer - uhd::streamer_args stream_args("fc32"); //complex floats - uhd::rx_streamer::sptr rx_stream = usrp->get_rx_streamer(stream_args); + uhd::stream_args_t stream_args("fc32"); //complex floats + uhd::rx_streamer::sptr rx_stream = usrp->get_rx_stream(stream_args); //setup streaming std::cout << std::endl; diff --git a/host/examples/test_messages.cpp b/host/examples/test_messages.cpp index 668f25ef3..f24a172d1 100644 --- a/host/examples/test_messages.cpp +++ b/host/examples/test_messages.cpp @@ -302,9 +302,9 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ std::cout << boost::format("Using Device: %s") % usrp->get_pp_string() << std::endl; //create RX and TX streamers - uhd::streamer_args stream_args("fc32"); //complex floats - uhd::rx_streamer::sptr rx_stream = usrp->get_rx_streamer(stream_args); - uhd::tx_streamer::sptr tx_stream = usrp->get_tx_streamer(stream_args); + uhd::stream_args_t stream_args("fc32"); //complex floats + uhd::rx_streamer::sptr rx_stream = usrp->get_rx_stream(stream_args); + uhd::tx_streamer::sptr tx_stream = usrp->get_tx_stream(stream_args); //------------------------------------------------------------------ // begin messages test diff --git a/host/examples/tx_bursts.cpp b/host/examples/tx_bursts.cpp index 98853ce20..f5ae18a9f 100644 --- a/host/examples/tx_bursts.cpp +++ b/host/examples/tx_bursts.cpp @@ -94,8 +94,8 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ usrp->set_time_now(uhd::time_spec_t(0.0)); //create a transmit streamer - uhd::streamer_args stream_args("fc32"); //complex floats - uhd::tx_streamer::sptr tx_stream = usrp->get_tx_streamer(stream_args); + uhd::stream_args_t stream_args("fc32"); //complex floats + uhd::tx_streamer::sptr tx_stream = usrp->get_tx_stream(stream_args); //allocate buffer with data to send const size_t spb = tx_stream->get_max_num_samps(); diff --git a/host/examples/tx_samples_from_file.cpp b/host/examples/tx_samples_from_file.cpp index 09939183b..964c6cea8 100644 --- a/host/examples/tx_samples_from_file.cpp +++ b/host/examples/tx_samples_from_file.cpp @@ -34,8 +34,8 @@ template<typename samp_type> void send_from_file( size_t samps_per_buff ){ //create a transmit streamer - uhd::streamer_args stream_args(cpu_format); - uhd::tx_streamer::sptr tx_stream = usrp->get_tx_streamer(stream_args); + uhd::stream_args_t stream_args(cpu_format); + uhd::tx_streamer::sptr tx_stream = usrp->get_tx_stream(stream_args); uhd::tx_metadata_t md; md.start_of_burst = false; diff --git a/host/examples/tx_timed_samples.cpp b/host/examples/tx_timed_samples.cpp index 3daf1974a..3b8cc75d4 100644 --- a/host/examples/tx_timed_samples.cpp +++ b/host/examples/tx_timed_samples.cpp @@ -74,8 +74,8 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ usrp->set_time_now(uhd::time_spec_t(0.0)); //create a transmit streamer - uhd::streamer_args stream_args("fc32"); //complex floats - uhd::tx_streamer::sptr tx_stream = usrp->get_tx_streamer(stream_args); + uhd::stream_args_t stream_args("fc32"); //complex floats + uhd::tx_streamer::sptr tx_stream = usrp->get_tx_stream(stream_args); //allocate buffer with data to send std::vector<std::complex<float> > buff(tx_stream->get_max_num_samps(), std::complex<float>(ampl, ampl)); diff --git a/host/examples/tx_waveforms.cpp b/host/examples/tx_waveforms.cpp index 9aa3ec71f..1eb6c2f1e 100644 --- a/host/examples/tx_waveforms.cpp +++ b/host/examples/tx_waveforms.cpp @@ -204,10 +204,10 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ //create a transmit streamer //linearly map channels (index0 = channel0, index1 = channel1, ...) - uhd::streamer_args stream_args("fc32"); + uhd::stream_args_t stream_args("fc32"); for (size_t chan = 0; chan < usrp->get_tx_num_channels(); chan++) stream_args.channels.push_back(chan); //linear mapping - uhd::tx_streamer::sptr tx_stream = usrp->get_tx_streamer(stream_args); + uhd::tx_streamer::sptr tx_stream = usrp->get_tx_stream(stream_args); //allocate a buffer which we re-use for each channel std::vector<std::complex<float> > buff(spb); diff --git a/host/include/uhd/CMakeLists.txt b/host/include/uhd/CMakeLists.txt index 6b277654d..2b0c6ec14 100644 --- a/host/include/uhd/CMakeLists.txt +++ b/host/include/uhd/CMakeLists.txt @@ -30,7 +30,7 @@ INSTALL(FILES exception.hpp property_tree.ipp property_tree.hpp - streamer.hpp + stream.hpp version.hpp wax.hpp DESTINATION ${INCLUDE_DIR}/uhd diff --git a/host/include/uhd/device.hpp b/host/include/uhd/device.hpp index c96139858..89c6332da 100644 --- a/host/include/uhd/device.hpp +++ b/host/include/uhd/device.hpp @@ -19,7 +19,7 @@ #define INCLUDED_UHD_DEVICE_HPP #include <uhd/config.hpp> -#include <uhd/streamer.hpp> +#include <uhd/stream.hpp> #include <uhd/deprecated.hpp> #include <uhd/types/device_addr.hpp> #include <boost/utility.hpp> @@ -77,10 +77,10 @@ public: static sptr make(const device_addr_t &hint, size_t which = 0); //! Make a new receive streamer from the streamer arguments - virtual rx_streamer::sptr get_rx_streamer(const streamer_args &args) = 0; + virtual rx_streamer::sptr get_rx_stream(const stream_args_t &args) = 0; //! Make a new transmit streamer from the streamer arguments - virtual tx_streamer::sptr get_tx_streamer(const streamer_args &args) = 0; + virtual tx_streamer::sptr get_tx_stream(const stream_args_t &args) = 0; /*! * Receive and asynchronous message from the device. diff --git a/host/include/uhd/device_deprecated.ipp b/host/include/uhd/device_deprecated.ipp index 7afaaca2d..8e61c389f 100644 --- a/host/include/uhd/device_deprecated.ipp +++ b/host/include/uhd/device_deprecated.ipp @@ -80,12 +80,12 @@ size_t send( if (_tx_streamer.get() == NULL or _tx_streamer->get_num_channels() != buffs.size() or _send_tid != io_type.tid){ _send_tid = io_type.tid; _tx_streamer.reset(); //cleanup possible old one - streamer_args args; + stream_args_t args; args.cpu_format = (_send_tid == io_type_t::COMPLEX_FLOAT32)? "fc32" : "sc16"; args.otw_format = "sc16"; for (size_t ch = 0; ch < buffs.size(); ch++) args.channels.push_back(ch); //linear mapping - _tx_streamer = get_tx_streamer(args); + _tx_streamer = get_tx_stream(args); } const size_t nsamps = (send_mode == SEND_MODE_ONE_PACKET)? std::min(nsamps_per_buff, get_max_send_samps_per_packet()) : @@ -135,12 +135,12 @@ size_t recv( if (_rx_streamer.get() == NULL or _rx_streamer->get_num_channels() != buffs.size() or _recv_tid != io_type.tid){ _recv_tid = io_type.tid; _rx_streamer.reset(); //cleanup possible old one - streamer_args args; + stream_args_t args; args.cpu_format = (_recv_tid == io_type_t::COMPLEX_FLOAT32)? "fc32" : "sc16"; args.otw_format = "sc16"; for (size_t ch = 0; ch < buffs.size(); ch++) args.channels.push_back(ch); //linear mapping - _rx_streamer = get_rx_streamer(args); + _rx_streamer = get_rx_stream(args); } const size_t nsamps = (recv_mode == RECV_MODE_ONE_PACKET)? std::min(nsamps_per_buff, get_max_recv_samps_per_packet()) : @@ -154,10 +154,10 @@ size_t recv( */ size_t get_max_send_samps_per_packet(void){ if (_tx_streamer.get() == NULL){ - streamer_args args; + stream_args_t args; args.cpu_format = "fc32"; args.otw_format = "sc16"; - _tx_streamer = get_tx_streamer(args); + _tx_streamer = get_tx_stream(args); _send_tid = io_type_t::COMPLEX_FLOAT32; } return _tx_streamer->get_max_num_samps(); @@ -169,10 +169,10 @@ size_t get_max_send_samps_per_packet(void){ */ size_t get_max_recv_samps_per_packet(void){ if (_rx_streamer.get() == NULL){ - streamer_args args; + stream_args_t args; args.cpu_format = "fc32"; args.otw_format = "sc16"; - _rx_streamer = get_rx_streamer(args); + _rx_streamer = get_rx_stream(args); _recv_tid = io_type_t::COMPLEX_FLOAT32; } return _rx_streamer->get_max_num_samps(); diff --git a/host/include/uhd/streamer.hpp b/host/include/uhd/stream.hpp index c9c6fef89..583dfd1e4 100644 --- a/host/include/uhd/streamer.hpp +++ b/host/include/uhd/stream.hpp @@ -15,8 +15,8 @@ // along with this program. If not, see <http://www.gnu.org/licenses/>. // -#ifndef INCLUDED_UHD_STREAMER_HPP -#define INCLUDED_UHD_STREAMER_HPP +#ifndef INCLUDED_UHD_STREAM_HPP +#define INCLUDED_UHD_STREAM_HPP #include <uhd/config.hpp> #include <uhd/types/metadata.hpp> @@ -35,10 +35,10 @@ namespace uhd{ * Not all combinations of CPU and OTW format have conversion support. * You may however write and register your own conversion routines. */ -struct UHD_API streamer_args{ +struct UHD_API stream_args_t{ //! Convenience constructor for streamer args - streamer_args( + stream_args_t( const std::string &cpu = "fc32", const std::string &otw = "sc16" ){ @@ -186,4 +186,4 @@ public: } //namespace uhd -#endif /* INCLUDED_UHD_STREAMER_HPP */ +#endif /* INCLUDED_UHD_STREAM_HPP */ diff --git a/host/include/uhd/usrp/multi_usrp.hpp b/host/include/uhd/usrp/multi_usrp.hpp index 303af7ef9..72386204f 100644 --- a/host/include/uhd/usrp/multi_usrp.hpp +++ b/host/include/uhd/usrp/multi_usrp.hpp @@ -109,13 +109,13 @@ public: virtual device::sptr get_device(void) = 0; //! Convenience method to get a RX streamer - rx_streamer::sptr get_rx_streamer(const streamer_args &args){ - return this->get_device()->get_rx_streamer(args); + rx_streamer::sptr get_rx_stream(const stream_args_t &args){ + return this->get_device()->get_rx_stream(args); } //! Convenience method to get a TX streamer - tx_streamer::sptr get_tx_streamer(const streamer_args &args){ - return this->get_device()->get_tx_streamer(args); + tx_streamer::sptr get_tx_stream(const stream_args_t &args){ + return this->get_device()->get_tx_stream(args); } /******************************************************************* diff --git a/host/lib/transport/super_recv_packet_handler.hpp b/host/lib/transport/super_recv_packet_handler.hpp index f4dbc5531..de7b4b34c 100644 --- a/host/lib/transport/super_recv_packet_handler.hpp +++ b/host/lib/transport/super_recv_packet_handler.hpp @@ -21,7 +21,7 @@ #include <uhd/config.hpp> #include <uhd/exception.hpp> #include <uhd/convert.hpp> -#include <uhd/streamer.hpp> +#include <uhd/stream.hpp> #include <uhd/utils/msg.hpp> #include <uhd/utils/byteswap.hpp> #include <uhd/types/metadata.hpp> diff --git a/host/lib/transport/super_send_packet_handler.hpp b/host/lib/transport/super_send_packet_handler.hpp index 079fea11e..42bac5e21 100644 --- a/host/lib/transport/super_send_packet_handler.hpp +++ b/host/lib/transport/super_send_packet_handler.hpp @@ -21,7 +21,7 @@ #include <uhd/config.hpp> #include <uhd/exception.hpp> #include <uhd/convert.hpp> -#include <uhd/streamer.hpp> +#include <uhd/stream.hpp> #include <uhd/utils/msg.hpp> #include <uhd/utils/byteswap.hpp> #include <uhd/types/metadata.hpp> diff --git a/host/lib/usrp/usrp1/io_impl.cpp b/host/lib/usrp/usrp1/io_impl.cpp index 7d4fe2ec7..22c2db6ae 100644 --- a/host/lib/usrp/usrp1/io_impl.cpp +++ b/host/lib/usrp/usrp1/io_impl.cpp @@ -527,7 +527,7 @@ bool usrp1_impl::recv_async_msg( /*********************************************************************** * Receive streamer **********************************************************************/ -rx_streamer::sptr usrp1_impl::get_rx_streamer(const uhd::streamer_args &args){ +rx_streamer::sptr usrp1_impl::get_rx_stream(const uhd::stream_args_t &args){ //map an empty channel set to chan0 const std::vector<size_t> channels = args.channels.empty()? std::vector<size_t>(1, 0) : args.channels; @@ -567,7 +567,7 @@ rx_streamer::sptr usrp1_impl::get_rx_streamer(const uhd::streamer_args &args){ /*********************************************************************** * Transmit streamer **********************************************************************/ -tx_streamer::sptr usrp1_impl::get_tx_streamer(const uhd::streamer_args &args){ +tx_streamer::sptr usrp1_impl::get_tx_stream(const uhd::stream_args_t &args){ //map an empty channel set to chan0 const std::vector<size_t> channels = args.channels.empty()? std::vector<size_t>(1, 0) : args.channels; diff --git a/host/lib/usrp/usrp1/usrp1_impl.hpp b/host/lib/usrp/usrp1/usrp1_impl.hpp index 7776ea8d6..c777307ee 100644 --- a/host/lib/usrp/usrp1/usrp1_impl.hpp +++ b/host/lib/usrp/usrp1/usrp1_impl.hpp @@ -55,8 +55,8 @@ public: ~usrp1_impl(void); //the io interface - uhd::rx_streamer::sptr get_rx_streamer(const uhd::streamer_args &args); - uhd::tx_streamer::sptr get_tx_streamer(const uhd::streamer_args &args); + uhd::rx_streamer::sptr get_rx_stream(const uhd::stream_args_t &args); + uhd::tx_streamer::sptr get_tx_stream(const uhd::stream_args_t &args); bool recv_async_msg(uhd::async_metadata_t &, double); private: diff --git a/host/lib/usrp/usrp2/io_impl.cpp b/host/lib/usrp/usrp2/io_impl.cpp index f271d480a..d37be403b 100644 --- a/host/lib/usrp/usrp2/io_impl.cpp +++ b/host/lib/usrp/usrp2/io_impl.cpp @@ -366,7 +366,7 @@ bool usrp2_impl::recv_async_msg( /*********************************************************************** * Receive streamer **********************************************************************/ -rx_streamer::sptr usrp2_impl::get_rx_streamer(const uhd::streamer_args &args){ +rx_streamer::sptr usrp2_impl::get_rx_stream(const uhd::stream_args_t &args){ //map an empty channel set to chan0 const std::vector<size_t> channels = args.channels.empty()? std::vector<size_t>(1, 0) : args.channels; @@ -426,7 +426,7 @@ rx_streamer::sptr usrp2_impl::get_rx_streamer(const uhd::streamer_args &args){ /*********************************************************************** * Transmit streamer **********************************************************************/ -tx_streamer::sptr usrp2_impl::get_tx_streamer(const uhd::streamer_args &args){ +tx_streamer::sptr usrp2_impl::get_tx_stream(const uhd::stream_args_t &args){ //map an empty channel set to chan0 const std::vector<size_t> channels = args.channels.empty()? std::vector<size_t>(1, 0) : args.channels; diff --git a/host/lib/usrp/usrp2/usrp2_impl.hpp b/host/lib/usrp/usrp2/usrp2_impl.hpp index a67c704c8..31a390af7 100644 --- a/host/lib/usrp/usrp2/usrp2_impl.hpp +++ b/host/lib/usrp/usrp2/usrp2_impl.hpp @@ -72,8 +72,8 @@ public: ~usrp2_impl(void); //the io interface - uhd::rx_streamer::sptr get_rx_streamer(const uhd::streamer_args &args); - uhd::tx_streamer::sptr get_tx_streamer(const uhd::streamer_args &args); + uhd::rx_streamer::sptr get_rx_stream(const uhd::stream_args_t &args); + uhd::tx_streamer::sptr get_tx_stream(const uhd::stream_args_t &args); bool recv_async_msg(uhd::async_metadata_t &, double); private: |