diff options
author | Derek Kozel <derek.kozel@ettus.com> | 2017-03-14 17:56:41 -0700 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2017-03-24 19:06:09 -0700 |
commit | 4d3572494e979bb94a929a0485813c0ba3fcc453 (patch) | |
tree | fa7f0fe771d0364c49a312f75e722da188d6f733 /host/lib/rfnoc | |
parent | 51cbfdfd7e7c071914442005139894496ddf6039 (diff) | |
download | uhd-4d3572494e979bb94a929a0485813c0ba3fcc453.tar.gz uhd-4d3572494e979bb94a929a0485813c0ba3fcc453.tar.bz2 uhd-4d3572494e979bb94a929a0485813c0ba3fcc453.zip |
RFNoC: Exposed LO sharing functions in radio block
Diffstat (limited to 'host/lib/rfnoc')
-rw-r--r-- | host/lib/rfnoc/radio_ctrl_impl.cpp | 46 | ||||
-rw-r--r-- | host/lib/rfnoc/radio_ctrl_impl.hpp | 13 |
2 files changed, 59 insertions, 0 deletions
diff --git a/host/lib/rfnoc/radio_ctrl_impl.cpp b/host/lib/rfnoc/radio_ctrl_impl.cpp index a143bb248..1caa9bb99 100644 --- a/host/lib/rfnoc/radio_ctrl_impl.cpp +++ b/host/lib/rfnoc/radio_ctrl_impl.cpp @@ -29,6 +29,7 @@ using namespace uhd; using namespace uhd::rfnoc; static const size_t BYTES_PER_SAMPLE = 4; +const std::string radio_ctrl::ALL_LOS = "all"; /**************************************************************************** * Structors and init @@ -242,6 +243,51 @@ double radio_ctrl_impl::get_rx_bandwidth(const size_t chan) /* const */ { return _rx_bandwidth[chan]; } + +std::vector<std::string> radio_ctrl_impl::get_rx_lo_names(const size_t /* chan */) +{ + return std::vector<std::string>(); +} + +std::vector<std::string> radio_ctrl_impl::get_rx_lo_sources(const std::string & /* name */, const size_t /* chan */) +{ + return std::vector<std::string>(); +} + +freq_range_t radio_ctrl_impl::get_rx_lo_freq_range(const std::string & /* name */, const size_t /* chan */) +{ + return freq_range_t(); +} + +void radio_ctrl_impl::set_rx_lo_source(const std::string & /* src */, const std::string & /* name */, const size_t /* chan */) +{ + throw uhd::not_implemented_error("set_rx_lo_source is not supported on this radio"); +} + +const std::string radio_ctrl_impl::get_rx_lo_source(const std::string & /* name */, const size_t /* chan */) +{ + return "internal"; +} + +void radio_ctrl_impl::set_rx_lo_export_enabled(bool /* enabled */, const std::string & /* name */, const size_t /* chan */) +{ + throw uhd::not_implemented_error("set_rx_lo_export_enabled is not supported on this radio"); +} + +bool radio_ctrl_impl::get_rx_lo_export_enabled(const std::string & /* name */, const size_t /* chan */) +{ + return false; // Not exporting non-existant LOs +} + +double radio_ctrl_impl::set_rx_lo_freq(double /* freq */, const std::string & /* name */, const size_t /* chan */) +{ + throw uhd::not_implemented_error("set_rx_lo_freq is not supported on this radio"); +} + +double radio_ctrl_impl::get_rx_lo_freq(const std::string & /* name */, const size_t /* chan */) +{ + return 0; +} /*********************************************************************** * RX Streamer-related methods (from source_block_ctrl_base) diff --git a/host/lib/rfnoc/radio_ctrl_impl.hpp b/host/lib/rfnoc/radio_ctrl_impl.hpp index b31239482..21d7da1f1 100644 --- a/host/lib/rfnoc/radio_ctrl_impl.hpp +++ b/host/lib/rfnoc/radio_ctrl_impl.hpp @@ -71,6 +71,19 @@ public: virtual double get_rx_gain(const size_t) /* const */; virtual double get_rx_bandwidth(const size_t) /* const */; + virtual std::vector<std::string> get_rx_lo_names(const size_t chan); + virtual std::vector<std::string> get_rx_lo_sources(const std::string &name, const size_t chan); + virtual freq_range_t get_rx_lo_freq_range(const std::string &name, const size_t chan); + + virtual void set_rx_lo_source(const std::string &src, const std::string &name, const size_t chan); + virtual const std::string get_rx_lo_source(const std::string &name, const size_t chan); + + virtual void set_rx_lo_export_enabled(bool enabled, const std::string &name, const size_t chan); + virtual bool get_rx_lo_export_enabled(const std::string &name, const size_t chan); + + virtual double set_rx_lo_freq(double freq, const std::string &name, const size_t chan); + virtual double get_rx_lo_freq(const std::string &name, const size_t chan); + void set_time_now(const time_spec_t &time_spec); void set_time_next_pps(const time_spec_t &time_spec); void set_time_sync(const uhd::time_spec_t &time); |