summaryrefslogtreecommitdiff
path: root/gr-uhd
diff options
context:
space:
mode:
Diffstat (limited to 'gr-uhd')
-rw-r--r--gr-uhd/include/gr_uhd_usrp_sink.h10
-rw-r--r--gr-uhd/include/gr_uhd_usrp_source.h8
-rw-r--r--gr-uhd/lib/gr_uhd_usrp_sink.cc8
-rw-r--r--gr-uhd/lib/gr_uhd_usrp_source.cc8
-rw-r--r--gr-uhd/swig/__init__.py2
-rw-r--r--gr-uhd/swig/uhd_swig.i2
6 files changed, 25 insertions, 13 deletions
diff --git a/gr-uhd/include/gr_uhd_usrp_sink.h b/gr-uhd/include/gr_uhd_usrp_sink.h
index 381260c3b..e44616a5a 100644
--- a/gr-uhd/include/gr_uhd_usrp_sink.h
+++ b/gr-uhd/include/gr_uhd_usrp_sink.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2010-2011 Free Software Foundation, Inc.
+ * Copyright 2010-2012 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -130,7 +130,13 @@ public:
*/
virtual void set_start_time(const uhd::time_spec_t &time) = 0;
- virtual std::vector<std::string> list_property_tree(const std::string &path) = 0;
+ /*!
+ * Returns identifying information about this USRP's configuration.
+ * Returns motherboard ID and serial.
+ * Returns daughterboard TX/RX ID, subdev name, and serial.
+ * \param mboard the motherboard index 0 to M-1
+ * \param chan channel index 0 to N-1
+ */
virtual uhd::dict<std::string, std::string> get_usrp_info(size_t mboard = 0, size_t chan = 0) = 0;
/*!
diff --git a/gr-uhd/include/gr_uhd_usrp_source.h b/gr-uhd/include/gr_uhd_usrp_source.h
index 69a9ffcbd..fa91cb52b 100644
--- a/gr-uhd/include/gr_uhd_usrp_source.h
+++ b/gr-uhd/include/gr_uhd_usrp_source.h
@@ -122,7 +122,13 @@ public:
*/
virtual void set_start_time(const uhd::time_spec_t &time) = 0;
- virtual std::vector<std::string> list_property_tree(const std::string &path) = 0;
+ /*!
+ * Returns identifying information about this USRP's configuration.
+ * Returns motherboard ID and serial.
+ * Returns daughterboard TX/RX ID, subdev name, and serial.
+ * \param mboard the motherboard index 0 to M-1
+ * \param chan channel index 0 to N-1
+ */
virtual uhd::dict<std::string, std::string> get_usrp_info(size_t mboard = 0, size_t chan = 0) = 0;
/*!
diff --git a/gr-uhd/lib/gr_uhd_usrp_sink.cc b/gr-uhd/lib/gr_uhd_usrp_sink.cc
index a35474664..66be056df 100644
--- a/gr-uhd/lib/gr_uhd_usrp_sink.cc
+++ b/gr-uhd/lib/gr_uhd_usrp_sink.cc
@@ -66,12 +66,12 @@ public:
_dev = uhd::usrp::multi_usrp::make(device_addr);
}
- std::vector<std::string> list_property_tree(const std::string &path){
- return _dev->list_property_tree(path);
- }
-
uhd::dict<std::string, std::string> get_usrp_info(size_t mboard, size_t chan){
+ #ifdef UHD_USRP_MULTI_USRP_GET_USRP_INFO_API
return _dev->get_usrp_info(mboard, chan);
+ #else
+ throw std::runtime_error("not implemented in this version");
+ #endif
}
void set_subdev_spec(const std::string &spec, size_t mboard){
diff --git a/gr-uhd/lib/gr_uhd_usrp_source.cc b/gr-uhd/lib/gr_uhd_usrp_source.cc
index fd0cf9d94..ba87ae8e0 100644
--- a/gr-uhd/lib/gr_uhd_usrp_source.cc
+++ b/gr-uhd/lib/gr_uhd_usrp_source.cc
@@ -70,12 +70,12 @@ public:
_dev = uhd::usrp::multi_usrp::make(device_addr);
}
- std::vector<std::string> list_property_tree(const std::string &path){
- return _dev->list_property_tree(path);
- }
-
uhd::dict<std::string, std::string> get_usrp_info(size_t mboard, size_t chan){
+ #ifdef UHD_USRP_MULTI_USRP_GET_USRP_INFO_API
return _dev->get_usrp_info(mboard, chan);
+ #else
+ throw std::runtime_error("not implemented in this version");
+ #endif
}
void set_subdev_spec(const std::string &spec, size_t mboard){
diff --git a/gr-uhd/swig/__init__.py b/gr-uhd/swig/__init__.py
index 82dbdd9e7..b4045e77f 100644
--- a/gr-uhd/swig/__init__.py
+++ b/gr-uhd/swig/__init__.py
@@ -1,5 +1,5 @@
#
-# Copyright 2010-2011 Free Software Foundation, Inc.
+# Copyright 2010-2012 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
diff --git a/gr-uhd/swig/uhd_swig.i b/gr-uhd/swig/uhd_swig.i
index acc301d71..729719dcb 100644
--- a/gr-uhd/swig/uhd_swig.i
+++ b/gr-uhd/swig/uhd_swig.i
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2010-2011 Free Software Foundation, Inc.
+ * Copyright 2010-2012 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*