aboutsummaryrefslogtreecommitdiffstats
path: root/host
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2017-11-08 16:06:31 -0800
committerMartin Braun <martin.braun@ettus.com>2017-12-22 15:05:05 -0800
commit2c9fe05fa8590033cfe0fcdfcb809560a91b4204 (patch)
tree0e5e53dc0d63f079e99554eeca273f397e64389c /host
parentbcf3f28e154b209119e812c9ae610ce4f3107759 (diff)
downloaduhd-2c9fe05fa8590033cfe0fcdfcb809560a91b4204.tar.gz
uhd-2c9fe05fa8590033cfe0fcdfcb809560a91b4204.tar.bz2
uhd-2c9fe05fa8590033cfe0fcdfcb809560a91b4204.zip
mpmd: Use the get_last_error feature from the RPC client
The RPC client will now query the MPM server for details when an error occured.
Diffstat (limited to 'host')
-rw-r--r--host/lib/usrp/mpmd/mpmd_impl.hpp1
-rw-r--r--host/lib/usrp/mpmd/mpmd_mboard_impl.cpp7
2 files changed, 6 insertions, 2 deletions
diff --git a/host/lib/usrp/mpmd/mpmd_impl.hpp b/host/lib/usrp/mpmd/mpmd_impl.hpp
index b6b02904c..7eca982a4 100644
--- a/host/lib/usrp/mpmd/mpmd_impl.hpp
+++ b/host/lib/usrp/mpmd/mpmd_impl.hpp
@@ -30,6 +30,7 @@ static const size_t MPMD_RX_SW_BUFF_SIZE_ETH_MACOS = 0x100000; //1Mib
static const size_t MPM_DISCOVERY_PORT = 49600;
static const size_t MPM_RPC_PORT = 49601;
+static const char MPM_RPC_GET_LAST_ERROR_CMD[] = "get_last_error";
static const char MPM_DISCOVERY_CMD[] = "MPM-DISC";
static const char MPM_ECHO_CMD[] = "MPM-ECHO";
static const size_t MPMD_10GE_DATA_FRAME_MAX_SIZE = 8000; // CHDR packet size in bytes
diff --git a/host/lib/usrp/mpmd/mpmd_mboard_impl.cpp b/host/lib/usrp/mpmd/mpmd_mboard_impl.cpp
index d06f25939..1b3251464 100644
--- a/host/lib/usrp/mpmd/mpmd_mboard_impl.cpp
+++ b/host/lib/usrp/mpmd/mpmd_mboard_impl.cpp
@@ -31,7 +31,7 @@ namespace {
const size_t MPMD_DEFAULT_INIT_TIMEOUT = 30000;
//! Default timeout value for RPC calls (ms)
const size_t MPMD_DEFAULT_RPC_TIMEOUT = 2000;
-
+ //! Default session ID (MPM will recognize a session by this name)
const std::string MPMD_DEFAULT_SESSION_ID = "UHD";
@@ -75,7 +75,10 @@ mpmd_mboard_impl::mpmd_mboard_impl(
const device_addr_t &mb_args_,
const std::string& rpc_server_addr
) : mb_args(mb_args_)
- , rpc(uhd::rpc_client::make(rpc_server_addr, MPM_RPC_PORT))
+ , rpc(uhd::rpc_client::make(
+ rpc_server_addr,
+ MPM_RPC_PORT,
+ MPM_RPC_GET_LAST_ERROR_CMD))
{
UHD_LOGGER_TRACE("MPMD")
<< "Initializing mboard, connecting to RPC server address: "