diff options
author | Martin Braun <martin.braun@ettus.com> | 2020-04-21 22:11:34 -0700 |
---|---|---|
committer | Aaron Rossetto <aaron.rossetto@ni.com> | 2020-05-20 15:19:55 -0500 |
commit | 4cd86bbf2ad9db0a3fd64252f9ba2d569d48144e (patch) | |
tree | 655d20f1b3108ae881e2995bde760625fa40cbd2 | |
parent | e67871c7c83ad8f03ed1dcbb719fc8211ce759ce (diff) | |
download | uhd-4cd86bbf2ad9db0a3fd64252f9ba2d569d48144e.tar.gz uhd-4cd86bbf2ad9db0a3fd64252f9ba2d569d48144e.tar.bz2 uhd-4cd86bbf2ad9db0a3fd64252f9ba2d569d48144e.zip |
multi_usrp: Amend get_usrp_{rx,tx}_info() to include cal keys
This adds two more keys to the dictionary return from
get_usrp_{rx,tx}_info() which can be used to query the calibration key
and serial.
-rw-r--r-- | host/lib/usrp/multi_usrp.cpp | 16 | ||||
-rw-r--r-- | host/lib/usrp/multi_usrp_rfnoc.cpp | 12 |
2 files changed, 28 insertions, 0 deletions
diff --git a/host/lib/usrp/multi_usrp.cpp b/host/lib/usrp/multi_usrp.cpp index 067377423..c41b31083 100644 --- a/host/lib/usrp/multi_usrp.cpp +++ b/host/lib/usrp/multi_usrp.cpp @@ -442,6 +442,14 @@ public: usrp_info["rx_serial"] = db_eeprom.serial; usrp_info["rx_id"] = db_eeprom.id.to_pp_string(); } + if (_tree->exists(rx_rf_fe_root(chan) / "ref_power/key")) { + usrp_info["rx_ref_power_key"] = + _tree->access<std::string>(rx_rf_fe_root(chan) / "ref_power/key").get(); + } + if (_tree->exists(rx_rf_fe_root(chan) / "ref_power/serial")) { + usrp_info["rx_ref_power_serial"] = + _tree->access<std::string>(rx_rf_fe_root(chan) / "ref_power/serial").get(); + } return usrp_info; } @@ -473,6 +481,14 @@ public: usrp_info["tx_serial"] = db_eeprom.serial; usrp_info["tx_id"] = db_eeprom.id.to_pp_string(); } + if (_tree->exists(tx_rf_fe_root(chan) / "ref_power/key")) { + usrp_info["tx_ref_power_key"] = + _tree->access<std::string>(tx_rf_fe_root(chan) / "ref_power/key").get(); + } + if (_tree->exists(tx_rf_fe_root(chan) / "ref_power/serial")) { + usrp_info["tx_ref_power_serial"] = + _tree->access<std::string>(tx_rf_fe_root(chan) / "ref_power/serial").get(); + } return usrp_info; } diff --git a/host/lib/usrp/multi_usrp_rfnoc.cpp b/host/lib/usrp/multi_usrp_rfnoc.cpp index aa28c6784..8b85e84ec 100644 --- a/host/lib/usrp/multi_usrp_rfnoc.cpp +++ b/host/lib/usrp/multi_usrp_rfnoc.cpp @@ -453,6 +453,12 @@ public: usrp_info["rx_id"] = db_eeprom.count("rx_id") ? bytes_to_str(db_eeprom.at("rx_id")) : ""; + const auto rx_power_ref_keys = rx_chain.radio->get_rx_power_ref_keys(); + if (!rx_power_ref_keys.empty() && rx_power_ref_keys.size() == 2) { + usrp_info["rx_ref_power_key"] = rx_power_ref_keys.at(0); + usrp_info["rx_ref_power_serial"] = rx_power_ref_keys.at(1); + } + return usrp_info; } @@ -477,6 +483,12 @@ public: usrp_info["tx_id"] = db_eeprom.count("tx_id") ? bytes_to_str(db_eeprom.at("tx_id")) : ""; + const auto tx_power_ref_keys = tx_chain.radio->get_tx_power_ref_keys(); + if (!tx_power_ref_keys.empty() && tx_power_ref_keys.size() == 2) { + usrp_info["tx_ref_power_key"] = tx_power_ref_keys.at(0); + usrp_info["tx_ref_power_serial"] = tx_power_ref_keys.at(1); + } + return usrp_info; } |