[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 01/04: uhd: Added get_num_mboards() call
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 01/04: uhd: Added get_num_mboards() call |
Date: |
Sun, 13 Sep 2015 15:17:44 +0000 (UTC) |
This is an automated email from the git hooks/post-receive script.
jcorgan pushed a commit to branch master
in repository gnuradio.
commit 4bf4fdaa53b095e8ffd6389e7114d895a8b50d38
Author: Martin Braun <address@hidden>
Date: Tue Sep 8 11:50:04 2015 -0700
uhd: Added get_num_mboards() call
---
gr-uhd/include/gnuradio/uhd/usrp_block.h | 5 +++++
gr-uhd/lib/usrp_block_impl.cc | 6 ++++++
gr-uhd/lib/usrp_block_impl.h | 1 +
3 files changed, 12 insertions(+)
diff --git a/gr-uhd/include/gnuradio/uhd/usrp_block.h
b/gr-uhd/include/gnuradio/uhd/usrp_block.h
index d57e1d2..3c15905 100644
--- a/gr-uhd/include/gnuradio/uhd/usrp_block.h
+++ b/gr-uhd/include/gnuradio/uhd/usrp_block.h
@@ -64,6 +64,11 @@ namespace gr {
virtual std::string get_subdev_spec(size_t mboard = 0) = 0;
/*!
+ * Return the number of motherboards in this configuration.
+ */
+ virtual size_t get_num_mboards() = 0;
+
+ /*!
* Set the sample rate for this connection to the USRP.
*
* \param rate a new rate in Sps
diff --git a/gr-uhd/lib/usrp_block_impl.cc b/gr-uhd/lib/usrp_block_impl.cc
index 1977b89..7f3478c 100644
--- a/gr-uhd/lib/usrp_block_impl.cc
+++ b/gr-uhd/lib/usrp_block_impl.cc
@@ -423,6 +423,12 @@ usrp_block_impl::get_device(void)
return _dev;
}
+size_t
+usrp_block_impl::get_num_mboards()
+{
+ return _dev->get_num_mboards();
+}
+
/**********************************************************************
* External Interfaces
*********************************************************************/
diff --git a/gr-uhd/lib/usrp_block_impl.h b/gr-uhd/lib/usrp_block_impl.h
index 2158d54..cb07fb3 100644
--- a/gr-uhd/lib/usrp_block_impl.h
+++ b/gr-uhd/lib/usrp_block_impl.h
@@ -68,6 +68,7 @@ namespace gr {
const std::string &attr,
const size_t mboard = 0
);
+ size_t get_num_mboards();
// Setters
void set_clock_config(const ::uhd::clock_config_t &clock_config, size_t
mboard);