aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/dboard/magnesium/magnesium_ad9371_iface.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'host/lib/usrp/dboard/magnesium/magnesium_ad9371_iface.hpp')
-rw-r--r--host/lib/usrp/dboard/magnesium/magnesium_ad9371_iface.hpp13
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;