diff options
author | Julian Arnold <julian.arnold@ettus.com> | 2015-03-19 11:49:54 -0700 |
---|---|---|
committer | Julian Arnold <julian.arnold@ettus.com> | 2015-03-19 11:59:00 -0700 |
commit | b850dfb583e05e500fd7e78af416a92f1a1e046e (patch) | |
tree | 2f3552d6b3c2746a953d847c47a6727595fdc019 /host/lib/usrp/e300/e300_remote_codec_ctrl.cpp | |
parent | 4cdb75606b6d79ac15d4b64e706a1c75368bba7d (diff) | |
download | uhd-b850dfb583e05e500fd7e78af416a92f1a1e046e.tar.gz uhd-b850dfb583e05e500fd7e78af416a92f1a1e046e.tar.bz2 uhd-b850dfb583e05e500fd7e78af416a92f1a1e046e.zip |
e3xx: filter API implementation. Supports listing of RX/TX filters, querying RX/TX filter information and writing of analog and FIR filters
Diffstat (limited to 'host/lib/usrp/e300/e300_remote_codec_ctrl.cpp')
-rw-r--r-- | host/lib/usrp/e300/e300_remote_codec_ctrl.cpp | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/host/lib/usrp/e300/e300_remote_codec_ctrl.cpp b/host/lib/usrp/e300/e300_remote_codec_ctrl.cpp index 871885a7b..c78946a6c 100644 --- a/host/lib/usrp/e300/e300_remote_codec_ctrl.cpp +++ b/host/lib/usrp/e300/e300_remote_codec_ctrl.cpp @@ -194,6 +194,40 @@ public: _transact(); } + //! set the filter bandwidth for the frontend's analog low pass + double set_bw_filter(const std::string &which, const double bw) + { + _clear(); + _args.action = uhd::htonx<boost::uint32_t>(transaction_t::ACTION_SET_BW); + if (which == "TX1") _args.which = uhd::htonx<boost::uint32_t>(transaction_t::CHAIN_TX1); + else if (which == "TX2") _args.which = uhd::htonx<boost::uint32_t>(transaction_t::CHAIN_TX2); + else if (which == "RX1") _args.which = uhd::htonx<boost::uint32_t>(transaction_t::CHAIN_RX1); + else if (which == "RX2") _args.which = uhd::htonx<boost::uint32_t>(transaction_t::CHAIN_RX2); + else throw std::runtime_error("e300_remote_codec_ctrl_impl incorrect chain string."); + _args.bw = bw; + + _transact(); + return _retval.bw; + } + + //! List all available filters by name + std::vector<std::string> get_filter_names(const std::string &) + { + UHD_THROW_INVALID_CODE_PATH(); + } + + //! Return a list of all filters + filter_info_base::sptr get_filter(const std::string &, const std::string &) + { + UHD_THROW_INVALID_CODE_PATH(); + } + + //! Write back a filter + void set_filter(const std::string &, const std::string &, const filter_info_base::sptr) + { + UHD_THROW_INVALID_CODE_PATH(); + } + private: void _transact() { { |