summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Abele <jason@ettus.com>2011-01-21 19:24:33 -0800
committerJosh Blum <josh@joshknows.com>2011-02-08 14:58:49 -0800
commit8afa393725c2bfda7c341b7202acfa40cc3245d2 (patch)
treeec65a598b6a360a2c1bf567dc4c0d64b63245c85
parent26fc07eac6a3029e2d7361b1502f69e7592e708b (diff)
Added first pass at swigging dboard iface
-rw-r--r--gr-uhd/lib/uhd_multi_usrp_sink.cc4
-rw-r--r--gr-uhd/lib/uhd_multi_usrp_sink.h6
-rw-r--r--gr-uhd/lib/uhd_multi_usrp_source.cc4
-rw-r--r--gr-uhd/lib/uhd_multi_usrp_source.h6
-rw-r--r--gr-uhd/lib/uhd_single_usrp_sink.cc4
-rw-r--r--gr-uhd/lib/uhd_single_usrp_sink.h6
-rw-r--r--gr-uhd/lib/uhd_single_usrp_source.cc4
-rw-r--r--gr-uhd/lib/uhd_single_usrp_source.h6
-rw-r--r--gr-uhd/swig/uhd_swig.i9
9 files changed, 49 insertions, 0 deletions
diff --git a/gr-uhd/lib/uhd_multi_usrp_sink.cc b/gr-uhd/lib/uhd_multi_usrp_sink.cc
index 32039e44ad..126d006d61 100644
--- a/gr-uhd/lib/uhd_multi_usrp_sink.cc
+++ b/gr-uhd/lib/uhd_multi_usrp_sink.cc
@@ -117,6 +117,10 @@ public:
return _dev->set_time_unknown_pps(time_spec);
}
+ uhd::usrp::dboard_iface::sptr get_dboard_iface(size_t chan){
+ return _dev->get_tx_dboard_iface(chan);
+ }
+
uhd::usrp::multi_usrp::sptr get_device(void){
return _dev;
}
diff --git a/gr-uhd/lib/uhd_multi_usrp_sink.h b/gr-uhd/lib/uhd_multi_usrp_sink.h
index 4866f2cbb5..b15339eb79 100644
--- a/gr-uhd/lib/uhd_multi_usrp_sink.h
+++ b/gr-uhd/lib/uhd_multi_usrp_sink.h
@@ -167,6 +167,12 @@ public:
virtual void set_time_unknown_pps(const uhd::time_spec_t &time_spec) = 0;
/*!
+ * Get access to the underlying uhd dboard iface object.
+ * \return the dboard_iface object
+ */
+ virtual uhd::usrp::dboard_iface::sptr get_dboard_iface(size_t chan) = 0;
+
+ /*!
* Get access to the underlying uhd device object.
* \return the multi usrp device object
*/
diff --git a/gr-uhd/lib/uhd_multi_usrp_source.cc b/gr-uhd/lib/uhd_multi_usrp_source.cc
index 181cf1eb46..affcfce755 100644
--- a/gr-uhd/lib/uhd_multi_usrp_source.cc
+++ b/gr-uhd/lib/uhd_multi_usrp_source.cc
@@ -117,6 +117,10 @@ public:
return _dev->set_time_unknown_pps(time_spec);
}
+ uhd::usrp::dboard_iface::sptr get_dboard_iface(size_t chan){
+ return _dev->get_rx_dboard_iface(chan);
+ }
+
uhd::usrp::multi_usrp::sptr get_device(void){
return _dev;
}
diff --git a/gr-uhd/lib/uhd_multi_usrp_source.h b/gr-uhd/lib/uhd_multi_usrp_source.h
index 9cbec52aad..0f26c94570 100644
--- a/gr-uhd/lib/uhd_multi_usrp_source.h
+++ b/gr-uhd/lib/uhd_multi_usrp_source.h
@@ -167,6 +167,12 @@ public:
virtual void set_time_unknown_pps(const uhd::time_spec_t &time_spec) = 0;
/*!
+ * Get access to the underlying uhd dboard iface object.
+ * \return the dboard_iface object
+ */
+ virtual uhd::usrp::dboard_iface::sptr get_dboard_iface(size_t chan) = 0;
+
+ /*!
* Get access to the underlying uhd device object.
* \return the multi usrp device object
*/
diff --git a/gr-uhd/lib/uhd_single_usrp_sink.cc b/gr-uhd/lib/uhd_single_usrp_sink.cc
index d9aaac893b..88b2479a9a 100644
--- a/gr-uhd/lib/uhd_single_usrp_sink.cc
+++ b/gr-uhd/lib/uhd_single_usrp_sink.cc
@@ -116,6 +116,10 @@ public:
return _dev->set_time_next_pps(time_spec);
}
+ uhd::usrp::dboard_iface::sptr get_dboard_iface(size_t chan){
+ return _dev->get_tx_dboard_iface(chan);
+ }
+
uhd::usrp::single_usrp::sptr get_device(void){
return _dev;
}
diff --git a/gr-uhd/lib/uhd_single_usrp_sink.h b/gr-uhd/lib/uhd_single_usrp_sink.h
index 4929d0f135..23342570d5 100644
--- a/gr-uhd/lib/uhd_single_usrp_sink.h
+++ b/gr-uhd/lib/uhd_single_usrp_sink.h
@@ -165,6 +165,12 @@ public:
virtual void set_time_next_pps(const uhd::time_spec_t &time_spec) = 0;
/*!
+ * Get access to the underlying uhd dboard iface object.
+ * \return the dboard_iface object
+ */
+ virtual uhd::usrp::dboard_iface::sptr get_dboard_iface(size_t chan) = 0;
+
+ /*!
* Get access to the underlying uhd device object.
* \return the single usrp device object
*/
diff --git a/gr-uhd/lib/uhd_single_usrp_source.cc b/gr-uhd/lib/uhd_single_usrp_source.cc
index 5a26d44b14..4495ea048d 100644
--- a/gr-uhd/lib/uhd_single_usrp_source.cc
+++ b/gr-uhd/lib/uhd_single_usrp_source.cc
@@ -117,6 +117,10 @@ public:
return _dev->set_time_next_pps(time_spec);
}
+ uhd::usrp::dboard_iface::sptr get_dboard_iface(size_t chan){
+ return _dev->get_rx_dboard_iface(chan);
+ }
+
uhd::usrp::single_usrp::sptr get_device(void){
return _dev;
}
diff --git a/gr-uhd/lib/uhd_single_usrp_source.h b/gr-uhd/lib/uhd_single_usrp_source.h
index 262f6696ca..4251088283 100644
--- a/gr-uhd/lib/uhd_single_usrp_source.h
+++ b/gr-uhd/lib/uhd_single_usrp_source.h
@@ -165,6 +165,12 @@ public:
virtual void set_time_next_pps(const uhd::time_spec_t &time_spec) = 0;
/*!
+ * Get access to the underlying uhd dboard iface object.
+ * \return the dboard_iface object
+ */
+ virtual uhd::usrp::dboard_iface::sptr get_dboard_iface(size_t chan) = 0;
+
+ /*!
* Get access to the underlying uhd device object.
* \return the single usrp device object
*/
diff --git a/gr-uhd/swig/uhd_swig.i b/gr-uhd/swig/uhd_swig.i
index 3c317beb4b..e90f850bd8 100644
--- a/gr-uhd/swig/uhd_swig.i
+++ b/gr-uhd/swig/uhd_swig.i
@@ -94,6 +94,15 @@
%template(device_addr_vector_t) std::vector<uhd::device_addr_t>;
////////////////////////////////////////////////////////////////////////
+// swig dboard_iface for python access
+////////////////////////////////////////////////////////////////////////
+%include stdint.i
+%include <uhd/types/serial.hpp>
+%include <uhd/usrp/dboard_iface.hpp>
+
+%template(dboard_iface_sptr) boost::shared_ptr<uhd::usrp::dboard_iface>;
+
+////////////////////////////////////////////////////////////////////////
// block magic
////////////////////////////////////////////////////////////////////////
GR_SWIG_BLOCK_MAGIC(uhd,multi_usrp_source)