From 6113b921e4cce8fdb57575eb9418b84322d87c3c Mon Sep 17 00:00:00 2001 From: michael-west Date: Tue, 19 May 2015 11:34:57 -0700 Subject: E300: Implement get_freq() for E300 network mode. --- host/lib/usrp/e300/e300_remote_codec_ctrl.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'host/lib/usrp/e300/e300_remote_codec_ctrl.cpp') diff --git a/host/lib/usrp/e300/e300_remote_codec_ctrl.cpp b/host/lib/usrp/e300/e300_remote_codec_ctrl.cpp index d3942d587..6742f5f86 100644 --- a/host/lib/usrp/e300/e300_remote_codec_ctrl.cpp +++ b/host/lib/usrp/e300/e300_remote_codec_ctrl.cpp @@ -96,6 +96,20 @@ public: return _retval.freq; } + double get_freq(const std::string &which) + { + _clear(); + _args.action = uhd::htonx(transaction_t::ACTION_GET_FREQ); + if (which == "TX1") _args.which = uhd::htonx(transaction_t::CHAIN_TX1); + else if (which == "TX2") _args.which = uhd::htonx(transaction_t::CHAIN_TX2); + else if (which == "RX1") _args.which = uhd::htonx(transaction_t::CHAIN_RX1); + else if (which == "RX2") _args.which = uhd::htonx(transaction_t::CHAIN_RX2); + else throw std::runtime_error("e300_remote_codec_ctrl_impl incorrect chain string."); + + _transact(); + return _retval.freq; + } + void data_port_loopback(const bool on) { _clear(); -- cgit v1.2.3