aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2018-07-18 15:06:45 -0700
committerMartin Braun <martin.braun@ettus.com>2018-07-18 16:21:58 -0700
commita308d2e02479d671d5bf0618907b484c47168392 (patch)
tree6a3c07b582f5a6b2693705fb497b14e3121dc28f /host/lib
parent34f99a773413ba203fb82fd07ba88a09accd6c1d (diff)
downloaduhd-a308d2e02479d671d5bf0618907b484c47168392.tar.gz
uhd-a308d2e02479d671d5bf0618907b484c47168392.tar.bz2
uhd-a308d2e02479d671d5bf0618907b484c47168392.zip
mpmd: Add set_timeout_init() API call to mpmd_mboard_impl
Diffstat (limited to 'host/lib')
-rw-r--r--host/lib/usrp/mpmd/mpmd_impl.hpp3
-rw-r--r--host/lib/usrp/mpmd/mpmd_mboard_impl.cpp10
2 files changed, 11 insertions, 2 deletions
diff --git a/host/lib/usrp/mpmd/mpmd_impl.hpp b/host/lib/usrp/mpmd/mpmd_impl.hpp
index 5efece5d0..d01605426 100644
--- a/host/lib/usrp/mpmd/mpmd_impl.hpp
+++ b/host/lib/usrp/mpmd/mpmd_impl.hpp
@@ -126,6 +126,9 @@ class mpmd_mboard_impl
//! Set the RPC call timeout to the default value
void set_timeout_default();
+ //! Set the RPC call timeout to the value for initializations
+ void set_timeout_init();
+
private:
/*! Reference to the RPC client that handles claiming
*/
diff --git a/host/lib/usrp/mpmd/mpmd_mboard_impl.cpp b/host/lib/usrp/mpmd/mpmd_mboard_impl.cpp
index 4fe5e0dd5..89568d2cb 100644
--- a/host/lib/usrp/mpmd/mpmd_mboard_impl.cpp
+++ b/host/lib/usrp/mpmd/mpmd_mboard_impl.cpp
@@ -16,9 +16,9 @@ namespace {
* Local constants
************************************************************************/
//! Time between reclaims (ms)
- const size_t MPMD_RECLAIM_INTERVAL_MS = 1000;
+ constexpr size_t MPMD_RECLAIM_INTERVAL_MS = 1000;
//! Default timeout value for the init() RPC call (ms)
- const size_t MPMD_DEFAULT_INIT_TIMEOUT = 120000;
+ constexpr size_t MPMD_DEFAULT_INIT_TIMEOUT = 120000;
//! Default timeout value for RPC calls (ms)
constexpr size_t MPMD_DEFAULT_RPC_TIMEOUT = 2000;
//! Short timeout value for RPC calls (ms), used for calls that shouldn't
@@ -483,6 +483,12 @@ void mpmd_mboard_impl::set_timeout_default()
));
}
+void mpmd_mboard_impl::set_timeout_init()
+{
+ this->set_rpcc_timeout(mb_args.cast<size_t>(
+ "init_timeout", MPMD_DEFAULT_INIT_TIMEOUT
+ ));
+}
/*****************************************************************************
* Private methods