From a308d2e02479d671d5bf0618907b484c47168392 Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Wed, 18 Jul 2018 15:06:45 -0700 Subject: mpmd: Add set_timeout_init() API call to mpmd_mboard_impl --- host/lib/usrp/mpmd/mpmd_impl.hpp | 3 +++ host/lib/usrp/mpmd/mpmd_mboard_impl.cpp | 10 ++++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) (limited to 'host/lib') 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( + "init_timeout", MPMD_DEFAULT_INIT_TIMEOUT + )); +} /***************************************************************************** * Private methods -- cgit v1.2.3