diff options
author | Johnathan Corgan <johnathan@corganlabs.com> | 2016-04-26 15:36:19 -0700 |
---|---|---|
committer | Johnathan Corgan <johnathan@corganlabs.com> | 2016-04-26 15:36:19 -0700 |
commit | efbb415e5abeefe0cedf36f44e13362514fd4521 (patch) | |
tree | d8e40937d922782af8b2e022f394d784bd8d063e /gr-uhd/lib/usrp_source_impl.cc | |
parent | 595693c1480f61125f6c4508ffac7ef8fa1a508c (diff) | |
parent | 8820340ae2cb119e177a445f8d9b079759ed2dd7 (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 7ce8633597..33b96f8a02 100644 --- a/gr-uhd/lib/usrp_source_impl.cc +++ b/gr-uhd/lib/usrp_source_impl.cc @@ -278,6 +278,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) { |