From 3b32e3b0de79898db5f7db5f47eeaf06a65d4a19 Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Thu, 21 Dec 2017 17:30:31 -0800 Subject: mpmd: Temporarily disable setting of clock and time source Currently, calling these APIs could potentially put the device into bad state. This will disable the APIs from UHD side and replace them with a warning if the user's setting did not take effect. --- host/lib/usrp/mpmd/mpmd_impl.cpp | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) (limited to 'host') diff --git a/host/lib/usrp/mpmd/mpmd_impl.cpp b/host/lib/usrp/mpmd/mpmd_impl.cpp index 7b4ca5bc8..e8eb2ea6a 100644 --- a/host/lib/usrp/mpmd/mpmd_impl.cpp +++ b/host/lib/usrp/mpmd/mpmd_impl.cpp @@ -93,7 +93,18 @@ namespace { /*** Clocking *******************************************************/ tree->create(mb_path / "clock_source/value") .add_coerced_subscriber([mb](const std::string &clock_source){ - mb->rpc->notify_with_token("set_clock_source", clock_source); + // FIXME: Undo these changes + //mb->rpc->notify_with_token("set_clock_source", clock_source); + auto current_src = mb->rpc->request_with_token( + "get_clock_source" + ); + if (current_src != clock_source) { + UHD_LOG_WARNING("MPMD", + "Setting clock source at runtime is currently not " + "supported. Use clock_source=XXX as a device arg to " + "select a clock source. The current source is: " + << current_src); + } }) .set_publisher([mb](){ return mb->rpc->request_with_token( @@ -111,7 +122,18 @@ namespace { ; tree->create(mb_path / "time_source/value") .add_coerced_subscriber([mb](const std::string &time_source){ - mb->rpc->notify_with_token("set_time_source", time_source); + //mb->rpc->notify_with_token("set_time_source", time_source); + // FIXME: Undo these changes + auto current_src = mb->rpc->request_with_token( + "get_time_source" + ); + if (current_src != time_source) { + UHD_LOG_WARNING("MPMD", + "Setting time source at runtime is currently not " + "supported. Use time_source=XXX as a device arg to " + "select a time source. The current source is: " + << current_src); + } }) .set_publisher([mb](){ return mb->rpc->request_with_token( -- cgit v1.2.3