mpmd: Export RPC token and mb_args to the property tree

There are applications (typically for debugging purposes) which need
access to the token and the mb_args. They are thus published via the
property tree.
This commit is contained in:
Martin Braun 2020-10-12 11:47:31 +02:00 committed by Aaron Rossetto
parent ba534af868
commit 8dfc671885
2 changed files with 11 additions and 0 deletions

View File

@ -131,6 +131,12 @@ public:
_allow_claim_failure_flag = allow;
}
//! Read the device access token
std::string get_token()
{
return _token;
}
private:
/*! Reference to the RPC client that handles claiming
*/
@ -165,6 +171,10 @@ private:
*/
uhd::task::sptr _claimer_task;
/*! A copy of the device access token
*/
std::string _token;
/*! This flag is only used within the claim() function. Go look there if you
* really need to know what it does.
*/

View File

@ -379,6 +379,7 @@ uhd::task::sptr mpmd_mboard_impl::claim_device_and_make_task()
// Save token for both RPC clients
_claim_rpc->set_token(rpc_token);
rpc->set_token(rpc_token);
_token = rpc_token;
// Optionally clear log buf
if (mb_args.has_key("skip_oldlog")) {
try {