diff options
author | Josh Blum <josh@joshknows.com> | 2011-10-26 10:21:11 -0700 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2011-11-03 20:37:14 -0700 |
commit | 3a9edd27d6976456ea9cf4565590d4dd5bee809c (patch) | |
tree | 28e841c14cf3e3f2c98f8cbf5287ce44cffcd4f6 /host | |
parent | dedfa65256470f31a20c99a210457937d3f36056 (diff) | |
download | uhd-3a9edd27d6976456ea9cf4565590d4dd5bee809c.tar.gz uhd-3a9edd27d6976456ea9cf4565590d4dd5bee809c.tar.bz2 uhd-3a9edd27d6976456ea9cf4565590d4dd5bee809c.zip |
usrp: added called to query bw range as well
Diffstat (limited to 'host')
-rw-r--r-- | host/include/uhd/usrp/multi_usrp.hpp | 15 | ||||
-rw-r--r-- | host/lib/usrp/multi_usrp.cpp | 8 |
2 files changed, 23 insertions, 0 deletions
diff --git a/host/include/uhd/usrp/multi_usrp.hpp b/host/include/uhd/usrp/multi_usrp.hpp index 319301784..0509c2f1d 100644 --- a/host/include/uhd/usrp/multi_usrp.hpp +++ b/host/include/uhd/usrp/multi_usrp.hpp @@ -23,6 +23,7 @@ #define UHD_USRP_MULTI_USRP_GET_RATES_API #define UHD_USRP_MULTI_USRP_FRONTEND_CAL_API #define UHD_USRP_MULTI_USRP_COMMAND_TIME_API +#define UHD_USRP_MULTI_USRP_BW_RANGE_API #include <uhd/config.hpp> #include <uhd/device.hpp> @@ -505,6 +506,13 @@ public: virtual double get_rx_bandwidth(size_t chan = 0) = 0; /*! + * Get the range of the possible RX bandwidth settings. + * \param chan the channel index 0 to N-1 + * \return a range of bandwidths in Hz + */ + virtual meta_range_t get_rx_bandwidth_range(size_t chan = 0) = 0; + + /*! * Read the RSSI value on the RX frontend. * \param chan the channel index 0 to N-1 * \return the rssi in dB @@ -744,6 +752,13 @@ public: virtual double get_tx_bandwidth(size_t chan = 0) = 0; /*! + * Get the range of the possible TX bandwidth settings. + * \param chan the channel index 0 to N-1 + * \return a range of bandwidths in Hz + */ + virtual meta_range_t get_tx_bandwidth_range(size_t chan = 0) = 0; + + /*! * Get the dboard interface object for the TX frontend. * The dboard interface gives access to GPIOs, SPI, I2C, low-speed ADC and DAC. * Use at your own risk! diff --git a/host/lib/usrp/multi_usrp.cpp b/host/lib/usrp/multi_usrp.cpp index 43534ff37..d53004259 100644 --- a/host/lib/usrp/multi_usrp.cpp +++ b/host/lib/usrp/multi_usrp.cpp @@ -534,6 +534,10 @@ public: return _tree->access<double>(rx_rf_fe_root(chan) / "bandwidth" / "value").get(); } + meta_range_t get_rx_bandwidth_range(size_t chan){ + return _tree->access<meta_range_t>(rx_rf_fe_root(chan) / "bandwidth" / "range").get(); + } + dboard_iface::sptr get_rx_dboard_iface(size_t chan){ return _tree->access<dboard_iface::sptr>(rx_rf_fe_root(chan).branch_path().branch_path() / "iface").get(); } @@ -678,6 +682,10 @@ public: return _tree->access<double>(tx_rf_fe_root(chan) / "bandwidth" / "value").get(); } + meta_range_t get_tx_bandwidth_range(size_t chan){ + return _tree->access<meta_range_t>(tx_rf_fe_root(chan) / "bandwidth" / "range").get(); + } + dboard_iface::sptr get_tx_dboard_iface(size_t chan){ return _tree->access<dboard_iface::sptr>(tx_rf_fe_root(chan).branch_path().branch_path() / "iface").get(); } |