diff options
-rw-r--r-- | gr-uhd/lib/uhd_simple_sink.cc | 12 | ||||
-rw-r--r-- | gr-uhd/lib/uhd_simple_sink.h | 18 | ||||
-rw-r--r-- | gr-uhd/lib/uhd_simple_source.cc | 12 | ||||
-rw-r--r-- | gr-uhd/lib/uhd_simple_source.h | 18 | ||||
-rw-r--r-- | gr-uhd/swig/uhd_swig.i | 2 |
5 files changed, 62 insertions, 0 deletions
diff --git a/gr-uhd/lib/uhd_simple_sink.cc b/gr-uhd/lib/uhd_simple_sink.cc index ccec0e29c..44f60a05f 100644 --- a/gr-uhd/lib/uhd_simple_sink.cc +++ b/gr-uhd/lib/uhd_simple_sink.cc @@ -91,6 +91,18 @@ public: return _dev->get_tx_antennas(); } + void set_clock_config(const uhd::clock_config_t &clock_config){ + return _dev->set_clock_config(clock_config); + } + + void set_time_now(const uhd::time_spec_t &time_spec){ + return _dev->set_time_now(time_spec); + } + + void set_time_next_pps(const uhd::time_spec_t &time_spec){ + return _dev->set_time_next_pps(time_spec); + } + uhd::usrp::simple_usrp::sptr get_device(void){ return _dev; } diff --git a/gr-uhd/lib/uhd_simple_sink.h b/gr-uhd/lib/uhd_simple_sink.h index 9ecf51aea..aad90d098 100644 --- a/gr-uhd/lib/uhd_simple_sink.h +++ b/gr-uhd/lib/uhd_simple_sink.h @@ -105,6 +105,24 @@ public: virtual std::vector<std::string> get_antennas(void) = 0; /*! + * Set the clock configuration. + * \param clock_config the new configuration + */ + virtual void set_clock_config(const uhd::clock_config_t &clock_config) = 0; + + /*! + * Set the time registers asap. + * \param time_spec the new time + */ + virtual void set_time_now(const uhd::time_spec_t &time_spec) = 0; + + /*! + * Set the time registers at the next pps. + * \param time_spec the new time + */ + virtual void set_time_next_pps(const uhd::time_spec_t &time_spec) = 0; + + /*! * Get access to the underlying uhd device object. * \return the simple usrp device object */ diff --git a/gr-uhd/lib/uhd_simple_source.cc b/gr-uhd/lib/uhd_simple_source.cc index 76179c326..49e4f168a 100644 --- a/gr-uhd/lib/uhd_simple_source.cc +++ b/gr-uhd/lib/uhd_simple_source.cc @@ -92,6 +92,18 @@ public: return _dev->get_rx_antennas(); } + void set_clock_config(const uhd::clock_config_t &clock_config){ + return _dev->set_clock_config(clock_config); + } + + void set_time_now(const uhd::time_spec_t &time_spec){ + return _dev->set_time_now(time_spec); + } + + void set_time_next_pps(const uhd::time_spec_t &time_spec){ + return _dev->set_time_next_pps(time_spec); + } + uhd::usrp::simple_usrp::sptr get_device(void){ return _dev; } diff --git a/gr-uhd/lib/uhd_simple_source.h b/gr-uhd/lib/uhd_simple_source.h index 480bb4d3f..06e4d2431 100644 --- a/gr-uhd/lib/uhd_simple_source.h +++ b/gr-uhd/lib/uhd_simple_source.h @@ -105,6 +105,24 @@ public: virtual std::vector<std::string> get_antennas(void) = 0; /*! + * Set the clock configuration. + * \param clock_config the new configuration + */ + virtual void set_clock_config(const uhd::clock_config_t &clock_config) = 0; + + /*! + * Set the time registers asap. + * \param time_spec the new time + */ + virtual void set_time_now(const uhd::time_spec_t &time_spec) = 0; + + /*! + * Set the time registers at the next pps. + * \param time_spec the new time + */ + virtual void set_time_next_pps(const uhd::time_spec_t &time_spec) = 0; + + /*! * Get access to the underlying uhd device object. * \return the simple usrp device object */ diff --git a/gr-uhd/swig/uhd_swig.i b/gr-uhd/swig/uhd_swig.i index 2642f9450..5956a686c 100644 --- a/gr-uhd/swig/uhd_swig.i +++ b/gr-uhd/swig/uhd_swig.i @@ -31,6 +31,8 @@ %include <uhd/types/ranges.hpp> %include <uhd/types/tune_result.hpp> %include <uhd/types/io_type.hpp> +%include <uhd/types/time_spec.hpp> +%include <uhd/types/clock_config.hpp> GR_SWIG_BLOCK_MAGIC(uhd,simple_source) %include <uhd_simple_source.h> |