diff options
author | Martin Braun <martin.braun@ettus.com> | 2019-05-08 14:18:33 -0700 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2019-08-22 10:35:13 -0700 |
commit | 69e4b0ed7f80fc241e9b69f05e2af0d9f52b3521 (patch) | |
tree | 3f154e5135ff5af16e1d996739aad20044a6d52e /host/lib/usrp/dboard/magnesium/magnesium_ad9371_iface.hpp | |
parent | 227fe34217e5430f78c6b679ba215b68a6a5c1a0 (diff) | |
download | uhd-69e4b0ed7f80fc241e9b69f05e2af0d9f52b3521.tar.gz uhd-69e4b0ed7f80fc241e9b69f05e2af0d9f52b3521.tar.bz2 uhd-69e4b0ed7f80fc241e9b69f05e2af0d9f52b3521.zip |
mg: Allow for timeout on retune
set_freq() calls now have a 15 seconds timeout.
Diffstat (limited to 'host/lib/usrp/dboard/magnesium/magnesium_ad9371_iface.hpp')
-rw-r--r-- | host/lib/usrp/dboard/magnesium/magnesium_ad9371_iface.hpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/host/lib/usrp/dboard/magnesium/magnesium_ad9371_iface.hpp b/host/lib/usrp/dboard/magnesium/magnesium_ad9371_iface.hpp index 245c302ba..63972a54c 100644 --- a/host/lib/usrp/dboard/magnesium/magnesium_ad9371_iface.hpp +++ b/host/lib/usrp/dboard/magnesium/magnesium_ad9371_iface.hpp @@ -50,6 +50,19 @@ private: _rpc_prefix + func_name, std::forward<Args>(args)...); }; + /*! Shorthand to perform an RPC request with timeout. + */ + template <typename return_type, typename... Args> + return_type request(uint64_t timeout_ms, std::string const& func_name, Args&&... args) + { + UHD_LOG_TRACE(_log_prefix, "[RPC] Calling " << func_name); + return _rpcc->request_with_token<return_type>( + timeout_ms, + _rpc_prefix + func_name, + std::forward<Args>(args)... + ); + }; + //! Reference to the RPC client uhd::rpc_client::sptr _rpcc; |