diff options
author | Martin Braun <martin.braun@ettus.com> | 2015-04-06 11:44:04 -0700 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2015-04-14 13:55:38 -0500 |
commit | 19716045c60f00296f24e115580da154e5ddef8d (patch) | |
tree | 941ef83a7784de073e2f755a8845c8c06a0e8ebc /host | |
parent | 7ad93dc81f2e89fed4e83ec1cb4c35431465cb87 (diff) | |
download | uhd-19716045c60f00296f24e115580da154e5ddef8d.tar.gz uhd-19716045c60f00296f24e115580da154e5ddef8d.tar.bz2 uhd-19716045c60f00296f24e115580da154e5ddef8d.zip |
e300: Added warning for high bandwidth usage
Diffstat (limited to 'host')
-rw-r--r-- | host/lib/usrp/e300/e300_io_impl.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/host/lib/usrp/e300/e300_io_impl.cpp b/host/lib/usrp/e300/e300_io_impl.cpp index fa4915ed1..dadfb71e9 100644 --- a/host/lib/usrp/e300/e300_io_impl.cpp +++ b/host/lib/usrp/e300/e300_io_impl.cpp @@ -91,12 +91,21 @@ void e300_impl::_update_tick_rate(const double rate) } } +#define CHECK_BANDWIDTH(dir) \ + if (rate > _codec_ctrl->get_bw_filter_range(dir).stop()) { \ + UHD_MSG(warning) \ + << "Selected " << dir << " bandwidth (" << (rate/1e6) << " MHz) exceeds\n" \ + << "analog frontend filter bandwidth (" << (_codec_ctrl->get_bw_filter_range(dir).stop()/1e6) << " MHz)." \ + << std::endl; \ + } + void e300_impl::_update_rx_samp_rate(const size_t dspno, const double rate) { boost::shared_ptr<sph::recv_packet_streamer> my_streamer = boost::dynamic_pointer_cast<sph::recv_packet_streamer>(_radio_perifs[dspno].rx_streamer.lock()); if (my_streamer) my_streamer->set_samp_rate(rate); + CHECK_BANDWIDTH("Rx"); } void e300_impl::_update_tx_samp_rate(const size_t dspno, const double rate) @@ -105,6 +114,7 @@ void e300_impl::_update_tx_samp_rate(const size_t dspno, const double rate) boost::dynamic_pointer_cast<sph::send_packet_streamer>(_radio_perifs[dspno].tx_streamer.lock()); if (my_streamer) my_streamer->set_samp_rate(rate); + CHECK_BANDWIDTH("Tx"); } /*********************************************************************** |