summaryrefslogtreecommitdiff
path: root/gr-uhd/lib
diff options
context:
space:
mode:
authorJohnathan Corgan <johnathan@corganlabs.com>2013-04-17 15:57:10 -0700
committerJohnathan Corgan <johnathan@corganlabs.com>2013-04-17 15:57:10 -0700
commita4d7d690988a5a082b63c1050d8e6a8b8bd35a6e (patch)
treeb53577ee4b4c79bf205c1be3d17f62fb7a1ef5b4 /gr-uhd/lib
parentfa98286f6f80c203bf80c243a2774f6de7a4b5c8 (diff)
parent669614b0f048de145ec41350f641f4af9c9b0d86 (diff)
Merge branch 'master' into next
Conflicts: gr-uhd/include/gr_uhd_usrp_sink.h gr-uhd/include/gr_uhd_usrp_source.h gr-uhd/lib/gr_uhd_usrp_sink.cc gr-uhd/lib/gr_uhd_usrp_source.cc
Diffstat (limited to 'gr-uhd/lib')
-rw-r--r--gr-uhd/lib/gr_uhd_common.h52
-rw-r--r--gr-uhd/lib/usrp_sink_impl.cc12
-rw-r--r--gr-uhd/lib/usrp_sink_impl.h2
-rw-r--r--gr-uhd/lib/usrp_source_impl.cc12
-rw-r--r--gr-uhd/lib/usrp_source_impl.h2
5 files changed, 28 insertions, 52 deletions
diff --git a/gr-uhd/lib/gr_uhd_common.h b/gr-uhd/lib/gr_uhd_common.h
deleted file mode 100644
index 0c18fa4634..0000000000
--- a/gr-uhd/lib/gr_uhd_common.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2012-2013 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING. If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifndef INCLUDED_GR_UHD_COMMON_H
-#define INCLUDED_GR_UHD_COMMON_H
-
-#include <uhd/version.hpp>
-#include <boost/format.hpp>
-#include <stdexcept>
-
-namespace gr {
- namespace uhd {
-
- static inline void check_abi(void)
- {
-#ifdef UHD_VERSION_ABI_STRING
- if(std::string(UHD_VERSION_ABI_STRING) == ::uhd::get_abi_string())
- return;
-
- throw std::runtime_error(str(boost::format(
- "\nGR-UHD detected ABI compatibility mismatch with UHD library.\n"
- "GR-UHD was build against ABI: %s,\n"
- "but UHD library reports ABI: %s\n"
- "Suggestion: install an ABI compatible version of UHD,\n"
- "or rebuild GR-UHD component against this ABI version.\n"
- ) % UHD_VERSION_ABI_STRING % ::uhd::get_abi_string()));
-#endif
- }
-
- } /* namespace uhd */
-} /* namespace gr */
-
-#endif /* INCLUDED_GR_UHD_COMMON_H */
diff --git a/gr-uhd/lib/usrp_sink_impl.cc b/gr-uhd/lib/usrp_sink_impl.cc
index a049e79d8f..8a315a2e40 100644
--- a/gr-uhd/lib/usrp_sink_impl.cc
+++ b/gr-uhd/lib/usrp_sink_impl.cc
@@ -214,6 +214,18 @@ namespace gr {
return _dev->set_tx_bandwidth(bandwidth, chan);
}
+ double
+ usrp_sink_impl::get_bandwidth(size_t chan)
+ {
+ return _dev->get_tx_bandwidth(chan);
+ }
+
+ ::uhd::freq_range_t
+ usrp_sink_impl::get_bandwidth_range(size_t chan)
+ {
+ return _dev->get_tx_bandwidth_range(chan);
+ }
+
void
usrp_sink_impl::set_dc_offset(const std::complex<double> &offset,
size_t chan)
diff --git a/gr-uhd/lib/usrp_sink_impl.h b/gr-uhd/lib/usrp_sink_impl.h
index d2058fb4a8..b75dc1dc6d 100644
--- a/gr-uhd/lib/usrp_sink_impl.h
+++ b/gr-uhd/lib/usrp_sink_impl.h
@@ -93,6 +93,8 @@ namespace gr {
void set_gain(double gain, const std::string &name, size_t chan);
void set_antenna(const std::string &ant, size_t chan);
void set_bandwidth(double bandwidth, size_t chan);
+ double get_bandwidth(size_t chan);
+ ::uhd::freq_range_t get_bandwidth_range(size_t chan);
void set_dc_offset(const std::complex<double> &offset, size_t chan);
void set_iq_balance(const std::complex<double> &correction, size_t chan);
void set_clock_config(const ::uhd::clock_config_t &clock_config, size_t mboard);
diff --git a/gr-uhd/lib/usrp_source_impl.cc b/gr-uhd/lib/usrp_source_impl.cc
index ad3ffef2ad..50c144fb86 100644
--- a/gr-uhd/lib/usrp_source_impl.cc
+++ b/gr-uhd/lib/usrp_source_impl.cc
@@ -220,6 +220,18 @@ namespace gr {
return _dev->set_rx_bandwidth(bandwidth, chan);
}
+ double
+ usrp_source_impl::get_bandwidth(size_t chan)
+ {
+ return _dev->get_rx_bandwidth(chan);
+ }
+
+ ::uhd::freq_range_t
+ usrp_source_impl::get_bandwidth_range(size_t chan)
+ {
+ return _dev->get_rx_bandwidth_range(chan);
+ }
+
void
usrp_source_impl::set_auto_dc_offset(const bool enable, size_t chan)
{
diff --git a/gr-uhd/lib/usrp_source_impl.h b/gr-uhd/lib/usrp_source_impl.h
index e31263bda0..218cc9b6e3 100644
--- a/gr-uhd/lib/usrp_source_impl.h
+++ b/gr-uhd/lib/usrp_source_impl.h
@@ -95,6 +95,8 @@ namespace gr {
void set_gain(double gain, const std::string &name, size_t chan);
void set_antenna(const std::string &ant, size_t chan);
void set_bandwidth(double bandwidth, size_t chan);
+ double get_bandwidth(size_t chan);
+ ::uhd::freq_range_t get_bandwidth_range(size_t chan);
void set_auto_dc_offset(const bool enable, size_t chan);
void set_dc_offset(const std::complex<double> &offset, size_t chan);
void set_iq_balance(const std::complex<double> &correction, size_t chan);