summaryrefslogtreecommitdiff
path: root/gr-uhd/include/gnuradio/uhd/usrp_block.h
diff options
context:
space:
mode:
authorJosh Morman <mormjb@gmail.com>2020-06-26 09:08:55 -0400
committermormj <34754695+mormj@users.noreply.github.com>2020-08-14 05:44:26 -0400
commit0a89472e5235bb9d3b6872271c23cb167c5d430c (patch)
tree96369e7144fc962453690b5dc66221f9ae225aae /gr-uhd/include/gnuradio/uhd/usrp_block.h
parentd6cb8d359d333c6f9af629bda5950db16d604ce5 (diff)
uhd: wrap get_usrp_info to compatible return type
- Move get_usrp_info() to usrp_block - Casts the return value to std::map so PyBind11 can turn it into a dictionary in Python This fixes an issue where get_usrp_info() would cause an Exception with PyBind11. Co-authored-by: Martin Braun <martin.braun@ettus.com>
Diffstat (limited to 'gr-uhd/include/gnuradio/uhd/usrp_block.h')
-rw-r--r--gr-uhd/include/gnuradio/uhd/usrp_block.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/gr-uhd/include/gnuradio/uhd/usrp_block.h b/gr-uhd/include/gnuradio/uhd/usrp_block.h
index 57a0fdfee3..63f859cb9b 100644
--- a/gr-uhd/include/gnuradio/uhd/usrp_block.h
+++ b/gr-uhd/include/gnuradio/uhd/usrp_block.h
@@ -572,6 +572,15 @@ public:
* @return the filter object
*/
virtual ::uhd::filter_info_base::sptr get_filter(const std::string& path) = 0;
+
+ /*!
+ * Returns identifying information about this USRP's configuration.
+ * Returns motherboard ID, name, and serial.
+ * Returns daughterboard TX ID, subdev name and spec, serial, and antenna.
+ * \param chan channel index 0 to N-1
+ * \return TX info
+ */
+ virtual ::uhd::dict<std::string, std::string> get_usrp_info(size_t chan = 0) = 0;
};
} /* namespace uhd */