diff options
Diffstat (limited to 'gr-uhd/lib')
-rw-r--r-- | gr-uhd/lib/uhd_multi_usrp_sink.cc | 7 | ||||
-rw-r--r-- | gr-uhd/lib/uhd_multi_usrp_sink.h | 16 | ||||
-rw-r--r-- | gr-uhd/lib/uhd_multi_usrp_source.cc | 7 | ||||
-rw-r--r-- | gr-uhd/lib/uhd_multi_usrp_source.h | 16 | ||||
-rw-r--r-- | gr-uhd/lib/uhd_single_usrp_sink.cc | 7 | ||||
-rw-r--r-- | gr-uhd/lib/uhd_single_usrp_sink.h | 16 | ||||
-rw-r--r-- | gr-uhd/lib/uhd_single_usrp_source.cc | 7 | ||||
-rw-r--r-- | gr-uhd/lib/uhd_single_usrp_source.h | 16 |
8 files changed, 76 insertions, 16 deletions
diff --git a/gr-uhd/lib/uhd_multi_usrp_sink.cc b/gr-uhd/lib/uhd_multi_usrp_sink.cc index b75a8303c..ee16e2928 100644 --- a/gr-uhd/lib/uhd_multi_usrp_sink.cc +++ b/gr-uhd/lib/uhd_multi_usrp_sink.cc @@ -62,9 +62,10 @@ public: return _dev->get_tx_rate(); } - uhd::tune_result_t set_center_freq(double freq, size_t chan){ - uhd::tune_result_t tr = _dev->set_tx_freq(freq, chan); - return tr; + uhd::tune_result_t set_center_freq( + const uhd::tune_request_t tune_request, size_t chan + ){ + return _dev->set_tx_freq(tune_request, chan); } uhd::freq_range_t get_freq_range(size_t chan){ diff --git a/gr-uhd/lib/uhd_multi_usrp_sink.h b/gr-uhd/lib/uhd_multi_usrp_sink.h index a94e7bd5a..370e59d0e 100644 --- a/gr-uhd/lib/uhd_multi_usrp_sink.h +++ b/gr-uhd/lib/uhd_multi_usrp_sink.h @@ -64,11 +64,25 @@ public: /*! * Tune the usrp device to the desired center frequency. + * \param tune_request the tune request instructions + * \param chan the channel index 0 to N-1 + * \return a tune result with the actual frequencies + */ + virtual uhd::tune_result_t set_center_freq( + const uhd::tune_request_t tune_request, size_t chan + ) = 0; + + /*! + * Tune the usrp device to the desired center frequency. + * This is a wrapper around set center freq so that in this case, + * the user can pass a single frequency in the call through swig. * \param freq the desired frequency in Hz * \param chan the channel index 0 to N-1 * \return a tune result with the actual frequencies */ - virtual uhd::tune_result_t set_center_freq(double freq, size_t chan) = 0; + uhd::tune_result_t set_center_freq(double freq, size_t chan){ + return set_center_freq(uhd::tune_request_t(freq), chan); + } /*! * Get the tunable frequency range. diff --git a/gr-uhd/lib/uhd_multi_usrp_source.cc b/gr-uhd/lib/uhd_multi_usrp_source.cc index 226e8b86f..029a763e3 100644 --- a/gr-uhd/lib/uhd_multi_usrp_source.cc +++ b/gr-uhd/lib/uhd_multi_usrp_source.cc @@ -63,9 +63,10 @@ public: return _dev->get_rx_rate(); } - uhd::tune_result_t set_center_freq(double freq, size_t chan){ - uhd::tune_result_t tr = _dev->set_rx_freq(freq, chan); - return tr; + uhd::tune_result_t set_center_freq( + const uhd::tune_request_t tune_request, size_t chan + ){ + return _dev->set_rx_freq(tune_request, chan); } uhd::freq_range_t get_freq_range(size_t chan){ diff --git a/gr-uhd/lib/uhd_multi_usrp_source.h b/gr-uhd/lib/uhd_multi_usrp_source.h index 081c82ee6..b3cbdae1f 100644 --- a/gr-uhd/lib/uhd_multi_usrp_source.h +++ b/gr-uhd/lib/uhd_multi_usrp_source.h @@ -64,11 +64,25 @@ public: /*! * Tune the usrp device to the desired center frequency. + * \param tune_request the tune request instructions + * \param chan the channel index 0 to N-1 + * \return a tune result with the actual frequencies + */ + virtual uhd::tune_result_t set_center_freq( + const uhd::tune_request_t tune_request, size_t chan + ) = 0; + + /*! + * Tune the usrp device to the desired center frequency. + * This is a wrapper around set center freq so that in this case, + * the user can pass a single frequency in the call through swig. * \param freq the desired frequency in Hz * \param chan the channel index 0 to N-1 * \return a tune result with the actual frequencies */ - virtual uhd::tune_result_t set_center_freq(double freq, size_t chan) = 0; + uhd::tune_result_t set_center_freq(double freq, size_t chan){ + return set_center_freq(uhd::tune_request_t(freq), chan); + } /*! * Get the tunable frequency range. diff --git a/gr-uhd/lib/uhd_single_usrp_sink.cc b/gr-uhd/lib/uhd_single_usrp_sink.cc index 24981a59a..622f506b5 100644 --- a/gr-uhd/lib/uhd_single_usrp_sink.cc +++ b/gr-uhd/lib/uhd_single_usrp_sink.cc @@ -62,9 +62,10 @@ public: return _dev->get_tx_rate(); } - uhd::tune_result_t set_center_freq(double freq, size_t chan){ - uhd::tune_result_t tr = _dev->set_tx_freq(freq, chan); - return tr; + uhd::tune_result_t set_center_freq( + const uhd::tune_request_t tune_request, size_t chan + ){ + return _dev->set_tx_freq(tune_request, chan); } uhd::freq_range_t get_freq_range(size_t chan){ diff --git a/gr-uhd/lib/uhd_single_usrp_sink.h b/gr-uhd/lib/uhd_single_usrp_sink.h index 390667df9..a4c4e6452 100644 --- a/gr-uhd/lib/uhd_single_usrp_sink.h +++ b/gr-uhd/lib/uhd_single_usrp_sink.h @@ -63,11 +63,25 @@ public: /*! * Tune the usrp device to the desired center frequency. + * \param tune_request the tune request instructions + * \param chan the channel index 0 to N-1 + * \return a tune result with the actual frequencies + */ + virtual uhd::tune_result_t set_center_freq( + const uhd::tune_request_t tune_request, size_t chan + ) = 0; + + /*! + * Tune the usrp device to the desired center frequency. + * This is a wrapper around set center freq so that in this case, + * the user can pass a single frequency in the call through swig. * \param freq the desired frequency in Hz * \param chan the channel index 0 to N-1 * \return a tune result with the actual frequencies */ - virtual uhd::tune_result_t set_center_freq(double freq, size_t chan = 0) = 0; + uhd::tune_result_t set_center_freq(double freq, size_t chan){ + return set_center_freq(uhd::tune_request_t(freq), chan); + } /*! * Get the tunable frequency range. diff --git a/gr-uhd/lib/uhd_single_usrp_source.cc b/gr-uhd/lib/uhd_single_usrp_source.cc index f7c7fc839..907e8be54 100644 --- a/gr-uhd/lib/uhd_single_usrp_source.cc +++ b/gr-uhd/lib/uhd_single_usrp_source.cc @@ -63,9 +63,10 @@ public: return _dev->get_rx_rate(); } - uhd::tune_result_t set_center_freq(double freq, size_t chan){ - uhd::tune_result_t tr = _dev->set_rx_freq(freq, chan); - return tr; + uhd::tune_result_t set_center_freq( + const uhd::tune_request_t tune_request, size_t chan + ){ + return _dev->set_rx_freq(tune_request, chan); } uhd::freq_range_t get_freq_range(size_t chan){ diff --git a/gr-uhd/lib/uhd_single_usrp_source.h b/gr-uhd/lib/uhd_single_usrp_source.h index 415c52e9a..495f8c611 100644 --- a/gr-uhd/lib/uhd_single_usrp_source.h +++ b/gr-uhd/lib/uhd_single_usrp_source.h @@ -63,11 +63,25 @@ public: /*! * Tune the usrp device to the desired center frequency. + * \param tune_request the tune request instructions + * \param chan the channel index 0 to N-1 + * \return a tune result with the actual frequencies + */ + virtual uhd::tune_result_t set_center_freq( + const uhd::tune_request_t tune_request, size_t chan + ) = 0; + + /*! + * Tune the usrp device to the desired center frequency. + * This is a wrapper around set center freq so that in this case, + * the user can pass a single frequency in the call through swig. * \param freq the desired frequency in Hz * \param chan the channel index 0 to N-1 * \return a tune result with the actual frequencies */ - virtual uhd::tune_result_t set_center_freq(double freq, size_t chan = 0) = 0; + uhd::tune_result_t set_center_freq(double freq, size_t chan){ + return set_center_freq(uhd::tune_request_t(freq), chan); + } /*! * Get the tunable frequency range. |