summaryrefslogtreecommitdiffstats
path: root/host/lib/simple_device.cpp
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2010-03-22 09:50:35 +0000
committerJosh Blum <josh@joshknows.com>2010-03-22 09:50:35 +0000
commit6ba5135c96d81d23eafa4f0740ebbf113d8c798f (patch)
tree50dbe1ac4d36c1a00374718d478617dbb18cd2ef /host/lib/simple_device.cpp
parent10ee8022dd22f13f942d8bfeeca3b380224fff52 (diff)
parentd66efda608db9f6a1c2ab64659556b53810d87b7 (diff)
downloaduhd-6ba5135c96d81d23eafa4f0740ebbf113d8c798f.tar.gz
uhd-6ba5135c96d81d23eafa4f0740ebbf113d8c798f.tar.bz2
uhd-6ba5135c96d81d23eafa4f0740ebbf113d8c798f.zip
Merge branch 'master' of git@ettus.sourcerepo.com:ettus/uhd into u1e_uhd
Conflicts: host/include/uhd/usrp/dboard_id.hpp
Diffstat (limited to 'host/lib/simple_device.cpp')
-rw-r--r--host/lib/simple_device.cpp34
1 files changed, 9 insertions, 25 deletions
diff --git a/host/lib/simple_device.cpp b/host/lib/simple_device.cpp
index 79b035071..ba1966e0d 100644
--- a/host/lib/simple_device.cpp
+++ b/host/lib/simple_device.cpp
@@ -19,18 +19,14 @@
#include <uhd/device.hpp>
#include <uhd/utils.hpp>
#include <uhd/props.hpp>
+#include <uhd/types.hpp>
#include <boost/algorithm/string.hpp>
-#include <boost/algorithm/string/trim.hpp>
#include <boost/foreach.hpp>
#include <boost/format.hpp>
#include <stdexcept>
using namespace uhd;
-tune_result_t::tune_result_t(void){
- /* NOP */
-}
-
/***********************************************************************
* Tune Helper Function
**********************************************************************/
@@ -196,11 +192,8 @@ public:
return tune(target_freq, lo_offset, _rx_subdev, _rx_ddc, false/* not tx */);
}
- std::vector<double> get_rx_freq_range(void){
- std::vector<double> range(2);
- boost::tie(range[0], range[1]) = \
- _rx_subdev[SUBDEV_PROP_FREQ_RANGE].as<freq_range_t>();
- return range;
+ freq_range_t get_rx_freq_range(void){
+ return _rx_subdev[SUBDEV_PROP_FREQ_RANGE].as<freq_range_t>();
}
void set_rx_gain(float gain){
@@ -211,11 +204,8 @@ public:
return _rx_subdev[SUBDEV_PROP_GAIN].as<gain_t>();
}
- std::vector<float> get_rx_gain_range(void){
- std::vector<float> range(3);
- boost::tie(range[0], range[1], range[2]) = \
- _rx_subdev[SUBDEV_PROP_GAIN_RANGE].as<gain_range_t>();
- return range;
+ gain_range_t get_rx_gain_range(void){
+ return _rx_subdev[SUBDEV_PROP_GAIN_RANGE].as<gain_range_t>();
}
void set_rx_antenna(const std::string &ant){
@@ -258,11 +248,8 @@ public:
return tune(target_freq, lo_offset, _tx_subdev, _tx_duc, true/* is tx */);
}
- std::vector<double> get_tx_freq_range(void){
- std::vector<double> range(2);
- boost::tie(range[0], range[1]) = \
- _tx_subdev[SUBDEV_PROP_FREQ_RANGE].as<freq_range_t>();
- return range;
+ freq_range_t get_tx_freq_range(void){
+ return _tx_subdev[SUBDEV_PROP_FREQ_RANGE].as<freq_range_t>();
}
void set_tx_gain(float gain){
@@ -273,11 +260,8 @@ public:
return _tx_subdev[SUBDEV_PROP_GAIN].as<gain_t>();
}
- std::vector<float> get_tx_gain_range(void){
- std::vector<float> range(3);
- boost::tie(range[0], range[1], range[2]) = \
- _tx_subdev[SUBDEV_PROP_GAIN_RANGE].as<gain_range_t>();
- return range;
+ gain_range_t get_tx_gain_range(void){
+ return _tx_subdev[SUBDEV_PROP_GAIN_RANGE].as<gain_range_t>();
}
void set_tx_antenna(const std::string &ant){