aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/types.cpp
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2010-10-25 13:41:40 -0700
committerJosh Blum <josh@joshknows.com>2010-10-25 13:41:40 -0700
commit359c4e16b2d2748a97ce33073c64502a7f190aa6 (patch)
tree1aee776eb7e0e1f6feaf5a7fc39b65eff7576261 /host/lib/types.cpp
parent3c6ede3c4104d483f39b3c4d062e9e837a9e2e08 (diff)
downloaduhd-359c4e16b2d2748a97ce33073c64502a7f190aa6.tar.gz
uhd-359c4e16b2d2748a97ce33073c64502a7f190aa6.tar.bz2
uhd-359c4e16b2d2748a97ce33073c64502a7f190aa6.zip
uhd: created tune request struct and implemented more fine grained tuning calls
Diffstat (limited to 'host/lib/types.cpp')
-rw-r--r--host/lib/types.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/host/lib/types.cpp b/host/lib/types.cpp
index 6aa82b012..a8062b6ae 100644
--- a/host/lib/types.cpp
+++ b/host/lib/types.cpp
@@ -17,6 +17,7 @@
#include <uhd/utils/assert.hpp>
#include <uhd/types/ranges.hpp>
+#include <uhd/types/tune_request.hpp>
#include <uhd/types/tune_result.hpp>
#include <uhd/types/clock_config.hpp>
#include <uhd/types/stream_cmd.hpp>
@@ -58,6 +59,25 @@ freq_range_t::freq_range_t(double min, double max):
}
/***********************************************************************
+ * tune request
+ **********************************************************************/
+tune_request_t::tune_request_t(double target_freq):
+ target_freq(target_freq),
+ inter_freq_policy(POLICY_AUTO),
+ dsp_freq_policy(POLICY_AUTO)
+{
+ /* NOP */
+}
+
+tune_request_t::tune_request_t(double target_freq, double lo_off):
+ target_freq(target_freq + lo_off),
+ inter_freq_policy(POLICY_MANUAL),
+ dsp_freq_policy(POLICY_AUTO)
+{
+ /* NOP */
+}
+
+/***********************************************************************
* tune result
**********************************************************************/
std::string tune_result_t::to_pp_string(void) const{