diff options
Diffstat (limited to 'host')
-rw-r--r-- | host/lib/usrp/mpmd/mpmd_impl.cpp | 4 | ||||
-rw-r--r-- | host/lib/usrp/mpmd/mpmd_impl.hpp | 3 | ||||
-rw-r--r-- | host/lib/usrp/mpmd/mpmd_mboard_impl.cpp | 7 |
3 files changed, 14 insertions, 0 deletions
diff --git a/host/lib/usrp/mpmd/mpmd_impl.cpp b/host/lib/usrp/mpmd/mpmd_impl.cpp index ff1e0498d..3afa6dfc1 100644 --- a/host/lib/usrp/mpmd/mpmd_impl.cpp +++ b/host/lib/usrp/mpmd/mpmd_impl.cpp @@ -43,6 +43,8 @@ namespace { const double MPMD_CHDR_MAX_RTT = 0.02; //! MPM Compatibility number const std::vector<size_t> MPM_COMPAT_NUM = {1, 0}; + //! Timeout value for the update_component RPC call (ms) + const size_t MPMD_UPDATE_COMPONENT_TIMEOUT = 10000; /************************************************************************* * Helper functions @@ -75,7 +77,9 @@ namespace { } // Now call update component + mb->rpc->set_timeout(MPMD_UPDATE_COMPONENT_TIMEOUT); mb->rpc->notify_with_token("update_component", all_metadata, all_data); + mb->set_timeout_default(); return all_comps_copy; } diff --git a/host/lib/usrp/mpmd/mpmd_impl.hpp b/host/lib/usrp/mpmd/mpmd_impl.hpp index 79ab18aa3..6d7b93b10 100644 --- a/host/lib/usrp/mpmd/mpmd_impl.hpp +++ b/host/lib/usrp/mpmd/mpmd_impl.hpp @@ -106,6 +106,9 @@ class mpmd_mboard_impl uhd::device_addr_t get_rx_hints() const; uhd::device_addr_t get_tx_hints() const; + //! Set the RPC call timeout to the default value + void set_timeout_default(); + private: /************************************************************************* * Private methods diff --git a/host/lib/usrp/mpmd/mpmd_mboard_impl.cpp b/host/lib/usrp/mpmd/mpmd_mboard_impl.cpp index 3702c15a1..0ca996d28 100644 --- a/host/lib/usrp/mpmd/mpmd_mboard_impl.cpp +++ b/host/lib/usrp/mpmd/mpmd_mboard_impl.cpp @@ -259,6 +259,13 @@ uhd::device_addr_t mpmd_mboard_impl::get_tx_hints() const return tx_hints; } +void mpmd_mboard_impl::set_timeout_default() +{ + rpc->set_timeout(mb_args.cast<size_t>( + "rpc_timeout", MPMD_DEFAULT_RPC_TIMEOUT + )); +} + /***************************************************************************** * Private methods |