UHD: get_center_freq?

gr-usrp has set_tx_freq and tx_freq

uhd has set_center_freq but no get_center_freq or center_freq- I’m
trying to port some USRP1 python code to UHD and there doesn’t seem to
be a clear analog.

Have I overlooked something?

Thanks for any input/help!

-Brett

On 02/02/2011 12:48 PM, Brett L. Trotter wrote:

gr-usrp has set_tx_freq and tx_freq

uhd has set_center_freq but no get_center_freq or center_freq- I’m
trying to port some USRP1 python code to UHD and there doesn’t seem to
be a clear analog.

The uhd has a get/set_rx/tx_freq. Did I forget to swig up the get_freq
for the source and sink wrappers?

Sorry for the delay- I sent this 02/02/11 from an email that’s not
subscribed.

On 02/02/2011 04:48 PM, Josh B. wrote:

On 02/02/2011 12:48 PM, Brett L. Trotter wrote:

gr-usrp has set_tx_freq and tx_freq

uhd has set_center_freq but no get_center_freq or center_freq- I’m
trying to port some USRP1 python code to UHD and there doesn’t seem to
be a clear analog.

The uhd has a get/set_rx/tx_freq.
I couldn’t find one…

[[email protected] lib]# grep _freq *.h
uhd_multi_usrp_sink.h: virtual uhd::tune_result_t set_center_freq(
uhd_multi_usrp_sink.h: uhd::tune_result_t set_center_freq(double
freq, size_t chan){
uhd_multi_usrp_sink.h: return
set_center_freq(uhd::tune_request_t(freq), chan);
uhd_multi_usrp_sink.h: virtual uhd::freq_range_t
get_freq_range(size_t chan) = 0;
uhd_multi_usrp_source.h: virtual uhd::tune_result_t set_center_freq(
uhd_multi_usrp_source.h: uhd::tune_result_t set_center_freq(double
freq, size_t chan){
uhd_multi_usrp_source.h: return
set_center_freq(uhd::tune_request_t(freq), chan);
uhd_multi_usrp_source.h: virtual uhd::freq_range_t
get_freq_range(size_t chan) = 0;
uhd_single_usrp_sink.h: virtual uhd::tune_result_t set_center_freq(
uhd_single_usrp_sink.h: uhd::tune_result_t set_center_freq(double
freq, size_t chan){
uhd_single_usrp_sink.h: return
set_center_freq(uhd::tune_request_t(freq), chan);
uhd_single_usrp_sink.h: virtual uhd::freq_range_t
get_freq_range(size_t chan = 0) = 0;
uhd_single_usrp_source.h: virtual uhd::tune_result_t set_center_freq(
uhd_single_usrp_source.h: uhd::tune_result_t set_center_freq(double
freq, size_t chan){
uhd_single_usrp_source.h: return
set_center_freq(uhd::tune_request_t(freq), chan);
uhd_single_usrp_source.h: virtual uhd::freq_range_t
get_freq_range(size_t chan = 0) = 0;

Did I forget to swig up the get_freq
for the source and sink wrappers?

This is what I could find anyway…

[[email protected] swig]# pwd
/root/gnuradio/gr-uhd/swig
[[email protected] swig]# grep “def.*_freq” uhd_swig.py
def set_center_freq(self, *args):
def get_freq_range(self, *args, **kwargs):
def set_center_freq(self, *args):
def get_freq_range(self, *args, **kwargs):
def set_center_freq(self, *args):
def get_freq_range(self, chan = 0):
def set_center_freq(self, *args):
def get_freq_range(self, chan = 0):

I’m usually missing something dumb when I put myself on the line and
post, but I’m happy to take my grains of salt and have a solution :slight_smile:

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs