summaryrefslogtreecommitdiff
path: root/gr-uhd/lib/gr_uhd_usrp_source.cc
diff options
context:
space:
mode:
authorJosh Blum2011-10-16 12:11:40 -0700
committerJosh Blum2011-11-07 18:56:28 -0800
commit8e60469acd6be356c64bfb27f58b393f3dd361cf (patch)
tree89fafdee6d83fcf25a52574f04529b00d7c8b13f /gr-uhd/lib/gr_uhd_usrp_source.cc
parentf3d2a28dc8d1abfe42435a4b5040eb20dd295479 (diff)
downloadgnuradio-8e60469acd6be356c64bfb27f58b393f3dd361cf.tar.gz
gnuradio-8e60469acd6be356c64bfb27f58b393f3dd361cf.tar.bz2
gnuradio-8e60469acd6be356c64bfb27f58b393f3dd361cf.zip
uhd: added set/get time/clock source calls
Diffstat (limited to 'gr-uhd/lib/gr_uhd_usrp_source.cc')
-rw-r--r--gr-uhd/lib/gr_uhd_usrp_source.cc48
1 files changed, 48 insertions, 0 deletions
diff --git a/gr-uhd/lib/gr_uhd_usrp_source.cc b/gr-uhd/lib/gr_uhd_usrp_source.cc
index 207e049d8..4f46fce79 100644
--- a/gr-uhd/lib/gr_uhd_usrp_source.cc
+++ b/gr-uhd/lib/gr_uhd_usrp_source.cc
@@ -166,6 +166,54 @@ public:
return _dev->set_clock_config(clock_config, mboard);
}
+ void set_time_source(const std::string &source, const size_t mboard){
+ #ifdef UHD_USRP_MULTI_USRP_REF_SOURCES_API
+ return _dev->set_time_source(source, mboard);
+ #else
+ throw std::runtime_error("not implemented in this version");
+ #endif
+ }
+
+ std::string get_time_source(const size_t mboard){
+ #ifdef UHD_USRP_MULTI_USRP_REF_SOURCES_API
+ return _dev->get_time_source(mboard);
+ #else
+ throw std::runtime_error("not implemented in this version");
+ #endif
+ }
+
+ std::vector<std::string> get_time_sources(const size_t mboard){
+ #ifdef UHD_USRP_MULTI_USRP_REF_SOURCES_API
+ return _dev->get_time_sources(mboard);
+ #else
+ throw std::runtime_error("not implemented in this version");
+ #endif
+ }
+
+ void set_clock_source(const std::string &source, const size_t mboard){
+ #ifdef UHD_USRP_MULTI_USRP_REF_SOURCES_API
+ return _dev->set_clock_source(source, mboard);
+ #else
+ throw std::runtime_error("not implemented in this version");
+ #endif
+ }
+
+ std::string get_clock_source(const size_t mboard){
+ #ifdef UHD_USRP_MULTI_USRP_REF_SOURCES_API
+ return _dev->get_clock_source(mboard);
+ #else
+ throw std::runtime_error("not implemented in this version");
+ #endif
+ }
+
+ std::vector<std::string> get_clock_sources(const size_t mboard){
+ #ifdef UHD_USRP_MULTI_USRP_REF_SOURCES_API
+ return _dev->get_clock_sources(mboard);
+ #else
+ throw std::runtime_error("not implemented in this version");
+ #endif
+ }
+
double get_clock_rate(size_t mboard){
return _dev->get_master_clock_rate(mboard);
}