From 5e9908fbec19ce9309c12ea61c0303e6666e981a Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Mon, 18 Oct 2010 01:03:11 -0700 Subject: uhd: removed utils warning functions, moved into the lower level wrappers --- gr-uhd/lib/uhd_single_usrp_sink.cc | 3 --- 1 file changed, 3 deletions(-) (limited to 'gr-uhd/lib/uhd_single_usrp_sink.cc') diff --git a/gr-uhd/lib/uhd_single_usrp_sink.cc b/gr-uhd/lib/uhd_single_usrp_sink.cc index 96f86c8db..cd7d7a618 100644 --- a/gr-uhd/lib/uhd_single_usrp_sink.cc +++ b/gr-uhd/lib/uhd_single_usrp_sink.cc @@ -22,7 +22,6 @@ #include #include #include -#include "utils.h" /*********************************************************************** * UHD Single USPR Sink @@ -56,7 +55,6 @@ public: void set_samp_rate(double rate){ _dev->set_tx_rate(rate); - do_samp_rate_error_message(rate, get_samp_rate(), "TX"); } double get_samp_rate(void){ @@ -65,7 +63,6 @@ public: uhd::tune_result_t set_center_freq(double freq, size_t chan){ uhd::tune_result_t tr = _dev->set_tx_freq(freq, chan); - do_tune_freq_error_message(freq, _dev->get_tx_freq(chan), "TX"); return tr; } -- cgit From 873228d25b3ea5df8eb10f6652518f144858af61 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Mon, 18 Oct 2010 13:46:51 -0700 Subject: uhd: filled in multi usrp code and swig file --- gr-uhd/lib/uhd_single_usrp_sink.cc | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'gr-uhd/lib/uhd_single_usrp_sink.cc') diff --git a/gr-uhd/lib/uhd_single_usrp_sink.cc b/gr-uhd/lib/uhd_single_usrp_sink.cc index cd7d7a618..96c1dbdf4 100644 --- a/gr-uhd/lib/uhd_single_usrp_sink.cc +++ b/gr-uhd/lib/uhd_single_usrp_sink.cc @@ -24,7 +24,7 @@ #include /*********************************************************************** - * UHD Single USPR Sink + * UHD Single USRP Sink **********************************************************************/ uhd_single_usrp_sink::uhd_single_usrp_sink(gr_io_signature_sptr sig) :gr_sync_block("uhd single usrp sink", sig, gr_make_io_signature(0, 0, 0)){ @@ -32,7 +32,7 @@ uhd_single_usrp_sink::uhd_single_usrp_sink(gr_io_signature_sptr sig) } /*********************************************************************** - * UHD Single USPR Sink Impl + * UHD Single USRP Sink Impl **********************************************************************/ class uhd_single_usrp_sink_impl : public uhd_single_usrp_sink{ public: @@ -45,10 +45,6 @@ public: _dev = uhd::usrp::single_usrp::make(args); } - ~uhd_single_usrp_sink_impl(void){ - //NOP - } - void set_subdev_spec(const std::string &spec){ return _dev->set_tx_subdev_spec(spec); } @@ -164,7 +160,7 @@ protected: }; /*********************************************************************** - * Make UHD Single USPR Sink + * Make UHD Single USRP Sink **********************************************************************/ boost::shared_ptr uhd_make_single_usrp_sink( const std::string &args, -- cgit From 7f46efca9cb0c87e9130c117ac41650f6e0c25cc Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Mon, 18 Oct 2010 16:49:08 -0700 Subject: uhd: renamed make function params, cleanup, clock config for multi usrp --- gr-uhd/lib/uhd_single_usrp_sink.cc | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'gr-uhd/lib/uhd_single_usrp_sink.cc') diff --git a/gr-uhd/lib/uhd_single_usrp_sink.cc b/gr-uhd/lib/uhd_single_usrp_sink.cc index 96c1dbdf4..4297a83ff 100644 --- a/gr-uhd/lib/uhd_single_usrp_sink.cc +++ b/gr-uhd/lib/uhd_single_usrp_sink.cc @@ -37,12 +37,17 @@ uhd_single_usrp_sink::uhd_single_usrp_sink(gr_io_signature_sptr sig) class uhd_single_usrp_sink_impl : public uhd_single_usrp_sink{ public: uhd_single_usrp_sink_impl( - const std::string &args, - const uhd::io_type_t &type, + const std::string &device_addr, + const uhd::io_type_t &io_type, size_t num_channels - ) : uhd_single_usrp_sink(gr_make_io_signature(num_channels, num_channels, type.size)), _type(type), _nchan(num_channels) + ): + uhd_single_usrp_sink(gr_make_io_signature( + num_channels, num_channels, io_type.size + )), + _type(io_type), + _nchan(num_channels) { - _dev = uhd::usrp::single_usrp::make(args); + _dev = uhd::usrp::single_usrp::make(device_addr); } void set_subdev_spec(const std::string &spec){ @@ -163,11 +168,11 @@ protected: * Make UHD Single USRP Sink **********************************************************************/ boost::shared_ptr uhd_make_single_usrp_sink( - const std::string &args, - const uhd::io_type_t::tid_t &type, + const std::string &device_addr, + const uhd::io_type_t::tid_t &io_type, size_t num_channels ){ return boost::shared_ptr( - new uhd_single_usrp_sink_impl(args, type, num_channels) + new uhd_single_usrp_sink_impl(device_addr, io_type, num_channels) ); } -- cgit From f13e1e1a87cf3d8b891e94226be047cff3733bb7 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Tue, 19 Oct 2010 15:46:27 -0700 Subject: uhd: implement set bandwidth for uhd blocks, remove chan=0 default for multi blocks --- gr-uhd/lib/uhd_single_usrp_sink.cc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'gr-uhd/lib/uhd_single_usrp_sink.cc') diff --git a/gr-uhd/lib/uhd_single_usrp_sink.cc b/gr-uhd/lib/uhd_single_usrp_sink.cc index 4297a83ff..24981a59a 100644 --- a/gr-uhd/lib/uhd_single_usrp_sink.cc +++ b/gr-uhd/lib/uhd_single_usrp_sink.cc @@ -95,6 +95,10 @@ public: return _dev->get_tx_antennas(chan); } + void set_bandwidth(double bandwidth, size_t chan){ + return _dev->set_tx_bandwidth(bandwidth, chan); + } + void set_clock_config(const uhd::clock_config_t &clock_config){ return _dev->set_clock_config(clock_config); } -- cgit From 5a2de999da86d48cd7f005d08cc48965cb8c7a65 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Mon, 25 Oct 2010 16:22:05 -0700 Subject: uhd: move tune functions to tune_request and provide wrapper for simple case --- gr-uhd/lib/uhd_single_usrp_sink.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'gr-uhd/lib/uhd_single_usrp_sink.cc') diff --git a/gr-uhd/lib/uhd_single_usrp_sink.cc b/gr-uhd/lib/uhd_single_usrp_sink.cc index 24981a59a..622f506b5 100644 --- a/gr-uhd/lib/uhd_single_usrp_sink.cc +++ b/gr-uhd/lib/uhd_single_usrp_sink.cc @@ -62,9 +62,10 @@ public: return _dev->get_tx_rate(); } - uhd::tune_result_t set_center_freq(double freq, size_t chan){ - uhd::tune_result_t tr = _dev->set_tx_freq(freq, chan); - return tr; + uhd::tune_result_t set_center_freq( + const uhd::tune_request_t tune_request, size_t chan + ){ + return _dev->set_tx_freq(tune_request, chan); } uhd::freq_range_t get_freq_range(size_t chan){ -- cgit