From 6851718b6d9a97a8c9397a1548708c7075de98e4 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Mon, 29 Mar 2010 15:30:02 -0700 Subject: added swig includes and tune result return --- gr-uhd/lib/uhd_simple_sink.cc | 4 ++-- gr-uhd/lib/uhd_simple_sink.h | 2 +- gr-uhd/lib/uhd_simple_source.cc | 4 ++-- gr-uhd/lib/uhd_simple_source.h | 2 +- gr-uhd/swig/uhd_swig.i | 3 +++ 5 files changed, 9 insertions(+), 6 deletions(-) diff --git a/gr-uhd/lib/uhd_simple_sink.cc b/gr-uhd/lib/uhd_simple_sink.cc index f208bd294..499ae4d6e 100644 --- a/gr-uhd/lib/uhd_simple_sink.cc +++ b/gr-uhd/lib/uhd_simple_sink.cc @@ -66,8 +66,8 @@ double uhd_simple_sink::get_samp_rate(void){ return _dev->get_tx_rate(); } -void uhd_simple_sink::set_center_freq(double freq){ - _dev->set_tx_freq(freq); +uhd::tune_result_t uhd_simple_sink::set_center_freq(double freq){ + return _dev->set_tx_freq(freq); } /*********************************************************************** diff --git a/gr-uhd/lib/uhd_simple_sink.h b/gr-uhd/lib/uhd_simple_sink.h index 28965d870..e57ba4abb 100644 --- a/gr-uhd/lib/uhd_simple_sink.h +++ b/gr-uhd/lib/uhd_simple_sink.h @@ -39,7 +39,7 @@ public: void set_samp_rate(double rate); double get_samp_rate(void); - void set_center_freq(double freq); + uhd::tune_result_t set_center_freq(double freq); int work( int noutput_items, diff --git a/gr-uhd/lib/uhd_simple_source.cc b/gr-uhd/lib/uhd_simple_source.cc index 87b727874..725cb2807 100644 --- a/gr-uhd/lib/uhd_simple_source.cc +++ b/gr-uhd/lib/uhd_simple_source.cc @@ -75,8 +75,8 @@ double uhd_simple_source::get_samp_rate(void){ return _dev->get_rx_rate(); } -void uhd_simple_source::set_center_freq(double freq){ - _dev->set_rx_freq(freq); +uhd::tune_result_t uhd_simple_source::set_center_freq(double freq){ + return _dev->set_rx_freq(freq); } /*********************************************************************** diff --git a/gr-uhd/lib/uhd_simple_source.h b/gr-uhd/lib/uhd_simple_source.h index 98378d518..27fa2c382 100644 --- a/gr-uhd/lib/uhd_simple_source.h +++ b/gr-uhd/lib/uhd_simple_source.h @@ -39,7 +39,7 @@ public: void set_samp_rate(double rate); double get_samp_rate(void); - void set_center_freq(double freq); + uhd::tune_result_t set_center_freq(double freq); int work( int noutput_items, diff --git a/gr-uhd/swig/uhd_swig.i b/gr-uhd/swig/uhd_swig.i index 06a1c88ff..363d9c914 100644 --- a/gr-uhd/swig/uhd_swig.i +++ b/gr-uhd/swig/uhd_swig.i @@ -27,6 +27,9 @@ #include %} +%include +%include + GR_SWIG_BLOCK_MAGIC(uhd,simple_source) %include -- cgit