summaryrefslogtreecommitdiffstats
path: root/host/lib/simple_device.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'host/lib/simple_device.cpp')
-rw-r--r--host/lib/simple_device.cpp33
1 files changed, 9 insertions, 24 deletions
diff --git a/host/lib/simple_device.cpp b/host/lib/simple_device.cpp
index 79b035071..045318c6b 100644
--- a/host/lib/simple_device.cpp
+++ b/host/lib/simple_device.cpp
@@ -19,6 +19,7 @@
#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>
@@ -27,10 +28,6 @@
using namespace uhd;
-tune_result_t::tune_result_t(void){
- /* NOP */
-}
-
/***********************************************************************
* Tune Helper Function
**********************************************************************/
@@ -196,11 +193,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 +205,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 +249,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 +261,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){