diff options
-rw-r--r-- | gr-uhd/include/gr_uhd_usrp_sink.h | 10 | ||||
-rw-r--r-- | gr-uhd/include/gr_uhd_usrp_source.h | 10 | ||||
-rw-r--r-- | gr-uhd/lib/gr_uhd_usrp_sink.cc | 8 | ||||
-rw-r--r-- | gr-uhd/lib/gr_uhd_usrp_source.cc | 8 |
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){ |