summaryrefslogtreecommitdiffstats
path: root/host/lib/simple_device.cpp
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2010-03-21 00:58:34 -0700
committerJosh Blum <josh@joshknows.com>2010-03-21 00:58:34 -0700
commitd1ecc555e53770f1a5608000352f56f48c36c310 (patch)
treeccccaac506fa6fe0812fce202121a4ad85d3f752 /host/lib/simple_device.cpp
parent26ada5ee709fc4d7e195d19720b467c14368bc05 (diff)
downloaduhd-d1ecc555e53770f1a5608000352f56f48c36c310.tar.gz
uhd-d1ecc555e53770f1a5608000352f56f48c36c310.tar.bz2
uhd-d1ecc555e53770f1a5608000352f56f48c36c310.zip
Moved typedefs from props.hpp into new file types.hpp.
Created structs to replace range tuples, and clock config struct. Merged clock config props into one property using config struct. Added templated dict construction to use the assign::map_list_of. Added gcc flag to set visibility to hidden and use the api macro.
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){