diff options
author | Josh Blum <josh@joshknows.com> | 2011-10-16 12:11:40 -0700 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2011-11-07 18:56:28 -0800 |
commit | 8e60469acd6be356c64bfb27f58b393f3dd361cf (patch) | |
tree | 89fafdee6d83fcf25a52574f04529b00d7c8b13f /gr-uhd/include | |
parent | f3d2a28dc8d1abfe42435a4b5040eb20dd295479 (diff) |
uhd: added set/get time/clock source calls
Diffstat (limited to 'gr-uhd/include')
-rw-r--r-- | gr-uhd/include/gr_uhd_usrp_sink.h | 48 | ||||
-rw-r--r-- | gr-uhd/include/gr_uhd_usrp_source.h | 48 |
2 files changed, 96 insertions, 0 deletions
diff --git a/gr-uhd/include/gr_uhd_usrp_sink.h b/gr-uhd/include/gr_uhd_usrp_sink.h index 4ddb51920b..8c1056a791 100644 --- a/gr-uhd/include/gr_uhd_usrp_sink.h +++ b/gr-uhd/include/gr_uhd_usrp_sink.h @@ -291,12 +291,60 @@ public: /*! * Set the clock configuration. + * DEPRECATED for set_time/clock_source. * \param clock_config the new configuration * \param mboard the motherboard index 0 to M-1 */ virtual void set_clock_config(const uhd::clock_config_t &clock_config, size_t mboard = 0) = 0; /*! + * Set the time source for the usrp device. + * This sets the method of time synchronization, + * typically a pulse per second or an encoded time. + * Typical options for source: external, MIMO. + * \param source a string representing the time source + * \param mboard which motherboard to set the config + */ + virtual void set_time_source(const std::string &source, const size_t mboard = 0) = 0; + + /*! + * Get the currently set time source. + * \param mboard which motherboard to get the config + * \return the string representing the time source + */ + virtual std::string get_time_source(const size_t mboard) = 0; + + /*! + * Get a list of possible time sources. + * \param mboard which motherboard to get the list + * \return a vector of strings for possible settings + */ + virtual std::vector<std::string> get_time_sources(const size_t mboard) = 0; + + /*! + * Set the clock source for the usrp device. + * This sets the source for a 10 Mhz reference clock. + * Typical options for source: internal, external, MIMO. + * \param source a string representing the clock source + * \param mboard which motherboard to set the config + */ + virtual void set_clock_source(const std::string &source, const size_t mboard = 0) = 0; + + /*! + * Get the currently set clock source. + * \param mboard which motherboard to get the config + * \return the string representing the clock source + */ + virtual std::string get_clock_source(const size_t mboard) = 0; + + /*! + * Get a list of possible clock sources. + * \param mboard which motherboard to get the list + * \return a vector of strings for possible settings + */ + virtual std::vector<std::string> get_clock_sources(const size_t mboard) = 0; + + /*! * Get the master clock rate. * \param mboard the motherboard index 0 to M-1 * \return the clock rate in Hz diff --git a/gr-uhd/include/gr_uhd_usrp_source.h b/gr-uhd/include/gr_uhd_usrp_source.h index e0c2cfe501..7a861e315a 100644 --- a/gr-uhd/include/gr_uhd_usrp_source.h +++ b/gr-uhd/include/gr_uhd_usrp_source.h @@ -283,11 +283,59 @@ public: /*! * Set the clock configuration. + * DEPRECATED for set_time/clock_source. * \param clock_config the new configuration * \param mboard the motherboard index 0 to M-1 */ virtual void set_clock_config(const uhd::clock_config_t &clock_config, size_t mboard = 0) = 0; + /*! + * Set the time source for the usrp device. + * This sets the method of time synchronization, + * typically a pulse per second or an encoded time. + * Typical options for source: external, MIMO. + * \param source a string representing the time source + * \param mboard which motherboard to set the config + */ + virtual void set_time_source(const std::string &source, const size_t mboard = 0) = 0; + + /*! + * Get the currently set time source. + * \param mboard which motherboard to get the config + * \return the string representing the time source + */ + virtual std::string get_time_source(const size_t mboard) = 0; + + /*! + * Get a list of possible time sources. + * \param mboard which motherboard to get the list + * \return a vector of strings for possible settings + */ + virtual std::vector<std::string> get_time_sources(const size_t mboard) = 0; + + /*! + * Set the clock source for the usrp device. + * This sets the source for a 10 Mhz reference clock. + * Typical options for source: internal, external, MIMO. + * \param source a string representing the clock source + * \param mboard which motherboard to set the config + */ + virtual void set_clock_source(const std::string &source, const size_t mboard = 0) = 0; + + /*! + * Get the currently set clock source. + * \param mboard which motherboard to get the config + * \return the string representing the clock source + */ + virtual std::string get_clock_source(const size_t mboard) = 0; + + /*! + * Get a list of possible clock sources. + * \param mboard which motherboard to get the list + * \return a vector of strings for possible settings + */ + virtual std::vector<std::string> get_clock_sources(const size_t mboard) = 0; + /*! * Get the master clock rate. * \param mboard the motherboard index 0 to M-1 |