diff options
author | Martin Braun <martin.braun@ettus.com> | 2014-02-21 15:12:44 +0100 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2014-03-10 11:46:02 +0100 |
commit | 26f7851e48527fc2b44bca84007d6763d9f1cea0 (patch) | |
tree | e6952975f47ae300705cd5e99e39c45f373dcfc2 /host/lib | |
parent | d9c0f278d1a445d0a9ddc1d3db548d45c9af0db8 (diff) | |
download | uhd-26f7851e48527fc2b44bca84007d6763d9f1cea0.tar.gz uhd-26f7851e48527fc2b44bca84007d6763d9f1cea0.tar.bz2 uhd-26f7851e48527fc2b44bca84007d6763d9f1cea0.zip |
uhd: added channel mapping support to multi_usrp
Diffstat (limited to 'host/lib')
-rw-r--r-- | host/lib/usrp/multi_usrp.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/host/lib/usrp/multi_usrp.cpp b/host/lib/usrp/multi_usrp.cpp index 182e774fc..c01bd5785 100644 --- a/host/lib/usrp/multi_usrp.cpp +++ b/host/lib/usrp/multi_usrp.cpp @@ -628,6 +628,7 @@ public: void set_rx_rate(double rate, size_t chan){ if (chan != ALL_CHANS){ + UHD_MSG(status) << "multi_usrp::set_rx_rate() rate=" << rate << " dsproot=" << rx_dsp_root(chan) << std::endl; _tree->access<double>(rx_dsp_root(chan) / "rate" / "value").set(rate); do_samp_rate_warning_message(rate, get_rx_rate(chan), "RX"); return; @@ -1073,6 +1074,12 @@ private: fs_path rx_dsp_root(const size_t chan) { mboard_chan_pair mcp = rx_chan_to_mcp(chan); + if (_tree->exists(mb_root(mcp.mboard) / "rx_chan_dsp_mapping")) { + std::vector<size_t> map = _tree->access<std::vector<size_t> >(mb_root(mcp.mboard) / "rx_chan_dsp_mapping").get(); + UHD_ASSERT_THROW(map.size() >= mcp.chan); + mcp.chan = map[mcp.chan]; + } + try { const std::string name = _tree->list(mb_root(mcp.mboard) / "rx_dsps").at(mcp.chan); @@ -1087,6 +1094,11 @@ private: fs_path tx_dsp_root(const size_t chan) { mboard_chan_pair mcp = tx_chan_to_mcp(chan); + if (_tree->exists(mb_root(mcp.mboard) / "tx_chan_dsp_mapping")) { + std::vector<size_t> map = _tree->access<std::vector<size_t> >(mb_root(mcp.mboard) / "tx_chan_dsp_mapping").get(); + UHD_ASSERT_THROW(map.size() >= mcp.chan); + mcp.chan = map[mcp.chan]; + } try { const std::string name = _tree->list(mb_root(mcp.mboard) / "tx_dsps").at(mcp.chan); |