From cc86cc5a6a713788cc58add7fd76486b8a8fa141 Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Tue, 5 Dec 2017 11:30:12 -0800 Subject: rfnoc: Added TX LO APIs to radio_ctrl Also added stubs in the default impl. Reviewed-By: Ashish Chaudhari Reviewed-By: Derek Kozel --- host/lib/rfnoc/radio_ctrl_impl.cpp | 71 +++++++++++++++++++++++++++++++++++++- 1 file changed, 70 insertions(+), 1 deletion(-) (limited to 'host/lib/rfnoc/radio_ctrl_impl.cpp') diff --git a/host/lib/rfnoc/radio_ctrl_impl.cpp b/host/lib/rfnoc/radio_ctrl_impl.cpp index 85ad6ed92..81bc0600b 100644 --- a/host/lib/rfnoc/radio_ctrl_impl.cpp +++ b/host/lib/rfnoc/radio_ctrl_impl.cpp @@ -244,7 +244,10 @@ double radio_ctrl_impl::get_rx_bandwidth(const size_t chan) /* const */ { return _rx_bandwidth[chan]; } - + +/****************************************************************************** + * LO controls + *****************************************************************************/ std::vector radio_ctrl_impl::get_rx_lo_names(const size_t /* chan */) { return std::vector(); @@ -290,6 +293,72 @@ double radio_ctrl_impl::get_rx_lo_freq(const std::string & /* name */, const siz return 0; } +std::vector radio_ctrl_impl::get_tx_lo_names( + const size_t /* chan */ +) { + return std::vector(); +} + +std::vector radio_ctrl_impl::get_tx_lo_sources( + const std::string & /* name */, + const size_t /* chan */ +) { + return std::vector(); +} + +freq_range_t radio_ctrl_impl::get_tx_lo_freq_range( + const std::string & /* name */, + const size_t /* chan */ +) { + return freq_range_t(); +} + +void radio_ctrl_impl::set_tx_lo_source( + const std::string & /* src */, + const std::string & /* name */, + const size_t /* chan */ +) { + throw uhd::not_implemented_error("set_tx_lo_source is not supported on this radio"); +} + +const std::string radio_ctrl_impl::get_tx_lo_source( + const std::string & /* name */, + const size_t /* chan */ +) { + return "internal"; +} + +void radio_ctrl_impl::set_tx_lo_export_enabled( + const bool /* enabled */, + const std::string & /* name */, + const size_t /* chan */ +) { + throw uhd::not_implemented_error("set_tx_lo_export_enabled is not supported on this radio"); +} + +bool radio_ctrl_impl::get_tx_lo_export_enabled( + const std::string & /* name */, + const size_t /* chan */ +) { + return false; // Not exporting non-existant LOs +} + +double radio_ctrl_impl::set_tx_lo_freq( + const double /* freq */, + const std::string & /* name */, + const size_t /* chan */ +) { + throw uhd::not_implemented_error( + "set_tx_lo_freq is not supported on this radio"); +} + +double radio_ctrl_impl::get_tx_lo_freq( + const std::string & /* name */, + const size_t chan +) { + return get_tx_frequency(chan); +} + /*********************************************************************** * RX Streamer-related methods (from source_block_ctrl_base) **********************************************************************/ -- cgit v1.2.3