summaryrefslogtreecommitdiffstats
path: root/host/include
diff options
context:
space:
mode:
Diffstat (limited to 'host/include')
-rw-r--r--host/include/uhd/usrp/mboard_props.hpp2
-rw-r--r--host/include/uhd/usrp/multi_usrp.hpp17
-rw-r--r--host/include/uhd/usrp/single_usrp.hpp8
3 files changed, 19 insertions, 8 deletions
diff --git a/host/include/uhd/usrp/mboard_props.hpp b/host/include/uhd/usrp/mboard_props.hpp
index df94d1678..c82bfc21a 100644
--- a/host/include/uhd/usrp/mboard_props.hpp
+++ b/host/include/uhd/usrp/mboard_props.hpp
@@ -43,7 +43,7 @@ namespace uhd{ namespace usrp{
MBOARD_PROP_TX_SUBDEV_SPEC = 'R', //rw, subdev_spec_t
MBOARD_PROP_CLOCK_CONFIG = 'C', //rw, clock_config_t
MBOARD_PROP_TIME_NOW = 't', //rw, time_spec_t
- MBOARD_PROP_TIME_NEXT_PPS = 'T', //wo, time_spec_t
+ MBOARD_PROP_TIME_PPS = 'T', //wo, time_spec_t
MBOARD_PROP_STREAM_CMD = 's', //wo, stream_cmd_t
MBOARD_PROP_EEPROM_MAP = 'M' //wr, mboard_eeprom_t::sptr
};
diff --git a/host/include/uhd/usrp/multi_usrp.hpp b/host/include/uhd/usrp/multi_usrp.hpp
index 98ba07fc0..ce99d713e 100644
--- a/host/include/uhd/usrp/multi_usrp.hpp
+++ b/host/include/uhd/usrp/multi_usrp.hpp
@@ -108,12 +108,18 @@ public:
virtual std::string get_mboard_name(size_t mboard) = 0;
/*!
- * Gets the current time in the usrp time registers.
+ * Get the current time in the usrp time registers.
* \return a timespec representing current usrp time
*/
virtual time_spec_t get_time_now(void) = 0;
/*!
+ * Get the time when the last pps pulse occured.
+ * \return a timespec representing the last pps
+ */
+ virtual time_spec_t get_time_last_pps(void) = 0;
+
+ /*!
* Set the time registers on the usrp at the next pps tick.
* The values will not be latched in until the pulse occurs.
* It is recommended that the user sleep(1) after calling to ensure
@@ -133,14 +139,13 @@ public:
* Ex: Host machine is not attached to serial port of GPSDO
* and can therefore not query the GPSDO for the PPS edge.
*
- * This is a 3-step process, and will take at most 3 seconds to complete.
+ * This is a 2-step process, and will take at most 2 seconds to complete.
* Upon completion, the times will be synchronized to the time provided.
*
- * - Step1: set the time at the next pps (potential race condition)
- * - Step2: wait for the seconds to rollover to catch the pps edge
- * - Step3: set the time at the next pps (synchronous for all boards)
+ * - Step1: wait for the last pps time to transition to catch the edge
+ * - Step2: set the time at the next pps (synchronous for all boards)
*
- * \param time_spec the time to latch into the usrp device
+ * \param time_spec the time to latch at the next pps after catching the edge
*/
virtual void set_time_unknown_pps(const time_spec_t &time_spec) = 0;
diff --git a/host/include/uhd/usrp/single_usrp.hpp b/host/include/uhd/usrp/single_usrp.hpp
index 26303fe10..bfbb90912 100644
--- a/host/include/uhd/usrp/single_usrp.hpp
+++ b/host/include/uhd/usrp/single_usrp.hpp
@@ -77,12 +77,18 @@ public:
virtual std::string get_mboard_name(void) = 0;
/*!
- * Gets the current time in the usrp time registers.
+ * Get the current time in the usrp time registers.
* \return a timespec representing current usrp time
*/
virtual time_spec_t get_time_now(void) = 0;
/*!
+ * Get the time when the last pps pulse occured.
+ * \return a timespec representing the last pps
+ */
+ virtual time_spec_t get_time_last_pps(void) = 0;
+
+ /*!
* Sets the time registers on the usrp immediately.
* \param time_spec the time to latch into the usrp device
*/