aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/e300/e300_remote_codec_ctrl.cpp
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2015-01-13 09:45:55 +0100
committerMartin Braun <martin.braun@ettus.com>2015-01-13 09:45:55 +0100
commitbe5f9613311d944b8971570bff444c5af094f0f5 (patch)
tree6e97e48801fe10a61244c2f4e36ef7f28a6e3c57 /host/lib/usrp/e300/e300_remote_codec_ctrl.cpp
parentd15fe9bc22efe4d0499a9108659e32c93e0a2848 (diff)
parent23729861a2020359b9c920347bd2d7c43d96ebf8 (diff)
downloaduhd-be5f9613311d944b8971570bff444c5af094f0f5.tar.gz
uhd-be5f9613311d944b8971570bff444c5af094f0f5.tar.bz2
uhd-be5f9613311d944b8971570bff444c5af094f0f5.zip
Merge branch 'maint'
Diffstat (limited to 'host/lib/usrp/e300/e300_remote_codec_ctrl.cpp')
-rw-r--r--host/lib/usrp/e300/e300_remote_codec_ctrl.cpp14
1 files changed, 14 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 bcc8ee4cf..ed8131e2f 100644
--- a/host/lib/usrp/e300/e300_remote_codec_ctrl.cpp
+++ b/host/lib/usrp/e300/e300_remote_codec_ctrl.cpp
@@ -106,6 +106,20 @@ public:
_transact();
}
+ sensor_value_t get_rssi(const std::string &which)
+ {
+ _clear();
+ _args.action = uhd::htonx<boost::uint32_t>(transaction_t::ACTION_GET_RSSI);
+ 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.bits = uhd::htonx<boost::uint32_t>(0);
+
+ _transact();
+
+ return sensor_value_t("RSSI", _retval.rssi, "dB");
+ }
+
private:
void _transact() {
{