diff options
author | Johnathan Corgan <johnathan@corganlabs.com> | 2016-05-27 11:58:21 -0700 |
---|---|---|
committer | Johnathan Corgan <johnathan@corganlabs.com> | 2016-05-27 11:58:21 -0700 |
commit | 8d61a99ff722a707e2807b6a9a6ff84b30a09bf8 (patch) | |
tree | 8ea8c1ff8eb9d6a3e970ae083abaa06e06210b13 /gr-uhd/lib/usrp_source_impl.cc | |
parent | 5c910950a0c872a52c8dc875b0c108c0f2609c30 (diff) | |
parent | cc02c4b22a2e17eddfc05863a9f17fb9a5778361 (diff) |
Merge branch 'master' into next
Diffstat (limited to 'gr-uhd/lib/usrp_source_impl.cc')
-rw-r--r-- | gr-uhd/lib/usrp_source_impl.cc | 98 |
1 files changed, 98 insertions, 0 deletions
diff --git a/gr-uhd/lib/usrp_source_impl.cc b/gr-uhd/lib/usrp_source_impl.cc index b2bddbef17..ed0b891770 100644 --- a/gr-uhd/lib/usrp_source_impl.cc +++ b/gr-uhd/lib/usrp_source_impl.cc @@ -281,6 +281,104 @@ namespace gr { return _dev->get_rx_bandwidth_range(chan); } + std::vector<std::string> + usrp_source_impl::get_lo_names(size_t chan) + { +#ifdef UHD_USRP_MULTI_USRP_LO_CONFIG_API + chan = _stream_args.channels[chan]; + return _dev->get_rx_lo_names(chan); +#else + throw std::runtime_error("not implemented in this version"); +#endif + } + + const std::string + usrp_source_impl::get_lo_source(const std::string &name, size_t chan) + { +#ifdef UHD_USRP_MULTI_USRP_LO_CONFIG_API + chan = _stream_args.channels[chan]; + return _dev->get_rx_lo_source(name, chan); +#else + throw std::runtime_error("not implemented in this version"); +#endif + } + + std::vector<std::string> + usrp_source_impl::get_lo_sources(const std::string &name, size_t chan) + { +#ifdef UHD_USRP_MULTI_USRP_LO_CONFIG_API + chan = _stream_args.channels[chan]; + return _dev->get_rx_lo_sources(name, chan); +#else + throw std::runtime_error("not implemented in this version"); +#endif + } + + void + usrp_source_impl::set_lo_source(const std::string &src, const std::string &name, size_t chan) + { +#ifdef UHD_USRP_MULTI_USRP_LO_CONFIG_API + chan = _stream_args.channels[chan]; + return _dev->set_rx_lo_source(src, name, chan); +#else + throw std::runtime_error("not implemented in this version"); +#endif + } + + bool + usrp_source_impl::get_lo_export_enabled(const std::string &name, size_t chan) + { +#ifdef UHD_USRP_MULTI_USRP_LO_CONFIG_API + chan = _stream_args.channels[chan]; + return _dev->get_rx_lo_export_enabled(name, chan); +#else + throw std::runtime_error("not implemented in this version"); +#endif + } + + void + usrp_source_impl::set_lo_export_enabled(bool enabled, const std::string &name, size_t chan) + { +#ifdef UHD_USRP_MULTI_USRP_LO_CONFIG_API + chan = _stream_args.channels[chan]; + return _dev->set_rx_lo_export_enabled(enabled, name, chan); +#else + throw std::runtime_error("not implemented in this version"); +#endif + } + + ::uhd::freq_range_t + usrp_source_impl::get_lo_freq_range(const std::string &name, size_t chan) + { +#ifdef UHD_USRP_MULTI_USRP_LO_CONFIG_API + chan = _stream_args.channels[chan]; + return _dev->get_rx_lo_freq_range(name, chan); +#else + throw std::runtime_error("not implemented in this version"); +#endif + } + + double + usrp_source_impl::get_lo_freq(const std::string &name, size_t chan) + { +#ifdef UHD_USRP_MULTI_USRP_LO_CONFIG_API + chan = _stream_args.channels[chan]; + return _dev->get_rx_lo_freq(name, chan); +#else + throw std::runtime_error("not implemented in this version"); +#endif + } + + double + usrp_source_impl::set_lo_freq(double freq, const std::string &name, size_t chan) { +#ifdef UHD_USRP_MULTI_USRP_LO_CONFIG_API + chan = _stream_args.channels[chan]; + return _dev->set_rx_lo_freq(freq, name, chan); +#else + throw std::runtime_error("not implemented in this version"); +#endif + } + void usrp_source_impl::set_auto_dc_offset(const bool enable, size_t chan) { |