From aff6165dc938fe072d4872b65be146e6d3f75bec Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Mon, 20 Mar 2017 18:11:20 -0700 Subject: rfnoc: Add API calls for time/clock control --- host/lib/rfnoc/radio_ctrl_impl.cpp | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) (limited to 'host/lib/rfnoc/radio_ctrl_impl.cpp') diff --git a/host/lib/rfnoc/radio_ctrl_impl.cpp b/host/lib/rfnoc/radio_ctrl_impl.cpp index 262f1eb73..a143bb248 100644 --- a/host/lib/rfnoc/radio_ctrl_impl.cpp +++ b/host/lib/rfnoc/radio_ctrl_impl.cpp @@ -363,7 +363,6 @@ void radio_ctrl_impl::set_time_next_pps(const time_spec_t &time_spec) _time64->set_time_next_pps(time_spec); } - time_spec_t radio_ctrl_impl::get_time_now() { return _time64->get_time_now(); @@ -374,3 +373,33 @@ time_spec_t radio_ctrl_impl::get_time_last_pps() return _time64->get_time_last_pps(); } +void radio_ctrl_impl::set_time_source(const std::string &source) +{ + _tree->access("time_source/value").set(source); +} + +std::string radio_ctrl_impl::get_time_source() +{ + return _tree->access("time_source/value").get(); +} + +std::vector radio_ctrl_impl::get_time_sources() +{ + return _tree->access>("time_source/options").get(); +} + +void radio_ctrl_impl::set_clock_source(const std::string &source) +{ + _tree->access("clock_source/value").set(source); +} + +std::string radio_ctrl_impl::get_clock_source() +{ + return _tree->access("clock_source/value").get(); +} + +std::vector radio_ctrl_impl::get_clock_sources() +{ + return _tree->access>("clock_source/options").get(); +} + -- cgit v1.2.3