summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosh Blum2011-02-11 10:29:35 -0800
committerJosh Blum2011-02-11 10:29:35 -0800
commit59396c1cd15c275b1fb8453b69219863bc5c788f (patch)
tree940c85039cd1ece6b4b1e7e9183b8558120205d5
parente96d9617fdaf5b83e9711b924decebbefacabd15 (diff)
downloadgnuradio-59396c1cd15c275b1fb8453b69219863bc5c788f.tar.gz
gnuradio-59396c1cd15c275b1fb8453b69219863bc5c788f.tar.bz2
gnuradio-59396c1cd15c275b1fb8453b69219863bc5c788f.zip
uhd: added mboard param to get time now and added get time last pps
-rw-r--r--gr-uhd/include/gr_uhd_usrp_sink.h10
-rw-r--r--gr-uhd/include/gr_uhd_usrp_source.h10
-rw-r--r--gr-uhd/lib/gr_uhd_usrp_sink.cc8
-rw-r--r--gr-uhd/lib/gr_uhd_usrp_source.cc8
4 files changed, 30 insertions, 6 deletions
diff --git a/gr-uhd/include/gr_uhd_usrp_sink.h b/gr-uhd/include/gr_uhd_usrp_sink.h
index 4644af5df..109c83a6e 100644
--- a/gr-uhd/include/gr_uhd_usrp_sink.h
+++ b/gr-uhd/include/gr_uhd_usrp_sink.h
@@ -171,9 +171,17 @@ public:
/*!
* Get the current time registers.
+ * \param mboard the motherboard index 0 to M-1
+ * \return the current usrp time
+ */
+ virtual uhd::time_spec_t get_time_now(size_t mboard = 0) = 0;
+
+ /*!
+ * Get the time when the last pps pulse occured.
+ * \param mboard the motherboard index 0 to M-1
* \return the current usrp time
*/
- virtual uhd::time_spec_t get_time_now(void) = 0;
+ virtual uhd::time_spec_t get_time_last_pps(size_t mboard = 0) = 0;
/*!
* Sets the time registers immediately.
diff --git a/gr-uhd/include/gr_uhd_usrp_source.h b/gr-uhd/include/gr_uhd_usrp_source.h
index b8d0768d9..43420e01c 100644
--- a/gr-uhd/include/gr_uhd_usrp_source.h
+++ b/gr-uhd/include/gr_uhd_usrp_source.h
@@ -171,9 +171,17 @@ public:
/*!
* Get the current time registers.
+ * \param mboard the motherboard index 0 to M-1
+ * \return the current usrp time
+ */
+ virtual uhd::time_spec_t get_time_now(size_t mboard = 0) = 0;
+
+ /*!
+ * Get the time when the last pps pulse occured.
+ * \param mboard the motherboard index 0 to M-1
* \return the current usrp time
*/
- virtual uhd::time_spec_t get_time_now(void) = 0;
+ virtual uhd::time_spec_t get_time_last_pps(size_t mboard = 0) = 0;
/*!
* Sets the time registers immediately.
diff --git a/gr-uhd/lib/gr_uhd_usrp_sink.cc b/gr-uhd/lib/gr_uhd_usrp_sink.cc
index 284e33ace..168ebd210 100644
--- a/gr-uhd/lib/gr_uhd_usrp_sink.cc
+++ b/gr-uhd/lib/gr_uhd_usrp_sink.cc
@@ -117,8 +117,12 @@ public:
return _dev->set_master_clock_rate(rate, mboard);
}
- uhd::time_spec_t get_time_now(void){
- return _dev->get_time_now();
+ uhd::time_spec_t get_time_now(size_t mboard = 0){
+ return _dev->get_time_now(mboard);
+ }
+
+ uhd::time_spec_t get_time_last_pps(size_t mboard){
+ return _dev->get_time_last_pps(mboard);
}
void set_time_now(const uhd::time_spec_t &time_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 6c8e7f40f..4ae446332 100644
--- a/gr-uhd/lib/gr_uhd_usrp_source.cc
+++ b/gr-uhd/lib/gr_uhd_usrp_source.cc
@@ -117,8 +117,12 @@ public:
return _dev->set_master_clock_rate(rate, mboard);
}
- uhd::time_spec_t get_time_now(void){
- return _dev->get_time_now();
+ uhd::time_spec_t get_time_now(size_t mboard = 0){
+ return _dev->get_time_now(mboard);
+ }
+
+ uhd::time_spec_t get_time_last_pps(size_t mboard){
+ return _dev->get_time_last_pps(mboard);
}
void set_time_now(const uhd::time_spec_t &time_spec, size_t mboard){