From 8e60469acd6be356c64bfb27f58b393f3dd361cf Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Sun, 16 Oct 2011 12:11:40 -0700 Subject: uhd: added set/get time/clock source calls --- gr-uhd/lib/gr_uhd_usrp_source.cc | 48 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) (limited to 'gr-uhd/lib/gr_uhd_usrp_source.cc') 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 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 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); } -- cgit