aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/mpmd
diff options
context:
space:
mode:
Diffstat (limited to 'host/lib/usrp/mpmd')
-rw-r--r--host/lib/usrp/mpmd/mpmd_find.cpp5
-rw-r--r--host/lib/usrp/mpmd/mpmd_impl.cpp1
-rw-r--r--host/lib/usrp/mpmd/mpmd_impl.hpp6
-rw-r--r--host/lib/usrp/mpmd/mpmd_link_if_ctrl_liberio.hpp15
-rw-r--r--host/lib/usrp/mpmd/mpmd_mb_controller.cpp12
-rw-r--r--host/lib/usrp/mpmd/mpmd_mb_iface.cpp4
-rw-r--r--host/lib/usrp/mpmd/mpmd_mboard_impl.cpp5
7 files changed, 25 insertions, 23 deletions
diff --git a/host/lib/usrp/mpmd/mpmd_find.cpp b/host/lib/usrp/mpmd/mpmd_find.cpp
index b5f20559c..501b250b0 100644
--- a/host/lib/usrp/mpmd/mpmd_find.cpp
+++ b/host/lib/usrp/mpmd/mpmd_find.cpp
@@ -93,7 +93,7 @@ device_addrs_t mpmd_find_with_addr(
// Create result to return
device_addr_t new_addr;
new_addr[MGMT_ADDR_KEY] = recv_addr;
- new_addr["type"] = "mpmd"; // hwd will overwrite this
+ new_addr["type"] = "mpmd"; // hwd will overwrite this
// remove ident string and put other informations into device_args dict
result.erase(result.begin());
// parse key-value pairs in the discovery string and add them to the
@@ -134,8 +134,7 @@ device_addrs_t mpmd_find_with_addrs(const device_addrs_t& hints)
device_addrs_t found_devices;
found_devices.reserve(hints.size());
for (const auto& hint : hints) {
- if (not(hint.has_key(xport::FIRST_ADDR_KEY)
- or hint.has_key(MGMT_ADDR_KEY))) {
+ if (not(hint.has_key(xport::FIRST_ADDR_KEY) or hint.has_key(MGMT_ADDR_KEY))) {
UHD_LOG_DEBUG("MPMD FIND", "No address given in hint " << hint.to_string());
continue;
}
diff --git a/host/lib/usrp/mpmd/mpmd_impl.cpp b/host/lib/usrp/mpmd/mpmd_impl.cpp
index cb463b3f4..d685b93b2 100644
--- a/host/lib/usrp/mpmd/mpmd_impl.cpp
+++ b/host/lib/usrp/mpmd/mpmd_impl.cpp
@@ -10,7 +10,6 @@
#include <uhd/utils/static.hpp>
#include <uhd/utils/tasks.hpp>
#include <boost/algorithm/string.hpp>
-#include <memory>
#include <boost/thread.hpp>
#include <chrono>
#include <future>
diff --git a/host/lib/usrp/mpmd/mpmd_impl.hpp b/host/lib/usrp/mpmd/mpmd_impl.hpp
index e1dde49b5..06b452724 100644
--- a/host/lib/usrp/mpmd/mpmd_impl.hpp
+++ b/host/lib/usrp/mpmd/mpmd_impl.hpp
@@ -12,8 +12,8 @@
#include <uhd/types/device_addr.hpp>
#include <uhd/types/dict.hpp>
#include <uhd/utils/tasks.hpp>
-#include <uhdlib/rfnoc/rfnoc_device.hpp>
#include <uhdlib/rfnoc/clock_iface.hpp>
+#include <uhdlib/rfnoc/rfnoc_device.hpp>
#include <uhdlib/usrp/common/mpmd_mb_controller.hpp>
#include <uhdlib/utils/rpc.hpp>
#include <boost/optional.hpp>
@@ -123,7 +123,8 @@ public:
* separate thread, and needs some kind of flag to be notified that
* something is up.
*/
- void allow_claim_failure(const bool allow) {
+ void allow_claim_failure(const bool allow)
+ {
if (allow) {
_allow_claim_failure_latch = true;
}
@@ -173,7 +174,6 @@ private:
* really need to know what it does.
*/
std::atomic<bool> _allow_claim_failure_latch{false};
-
};
diff --git a/host/lib/usrp/mpmd/mpmd_link_if_ctrl_liberio.hpp b/host/lib/usrp/mpmd/mpmd_link_if_ctrl_liberio.hpp
index 09fb24f8e..03331c576 100644
--- a/host/lib/usrp/mpmd/mpmd_link_if_ctrl_liberio.hpp
+++ b/host/lib/usrp/mpmd/mpmd_link_if_ctrl_liberio.hpp
@@ -27,15 +27,21 @@ public:
mpmd_link_if_ctrl_liberio(const uhd::device_addr_t& mb_args,
const mpmd_link_if_mgr::xport_info_list_t& xport_info);
- size_t get_num_links() const { return 1; }
+ size_t get_num_links() const
+ {
+ return 1;
+ }
- uhd::transport::both_links_t get_link(
- const size_t link_idx, const uhd::transport::link_type_t link_type,
+ uhd::transport::both_links_t get_link(const size_t link_idx,
+ const uhd::transport::link_type_t link_type,
const uhd::device_addr_t& link_args);
size_t get_mtu(const uhd::direction_t) const;
- double get_link_rate(const size_t /*link_idx*/) const { return _link_rate; }
+ double get_link_rate(const size_t /*link_idx*/) const
+ {
+ return _link_rate;
+ }
const uhd::rfnoc::chdr::chdr_packet_factory& get_packet_factory() const
{
@@ -43,7 +49,6 @@ public:
}
private:
-
const uhd::device_addr_t _mb_args;
const uhd::dict<std::string, std::string> _recv_args;
const uhd::dict<std::string, std::string> _send_args;
diff --git a/host/lib/usrp/mpmd/mpmd_mb_controller.cpp b/host/lib/usrp/mpmd/mpmd_mb_controller.cpp
index 9aa61a5a8..05393b017 100644
--- a/host/lib/usrp/mpmd/mpmd_mb_controller.cpp
+++ b/host/lib/usrp/mpmd/mpmd_mb_controller.cpp
@@ -10,9 +10,9 @@ using namespace uhd::rfnoc;
using namespace uhd;
namespace {
- //! Default timeout value for tRPC calls that we know can take long (ms)
- constexpr size_t MPMD_DEFAULT_LONG_TIMEOUT = 12000; // ms
-}
+//! Default timeout value for tRPC calls that we know can take long (ms)
+constexpr size_t MPMD_DEFAULT_LONG_TIMEOUT = 12000; // ms
+} // namespace
mpmd_mb_controller::mpmd_mb_controller(
uhd::rpc_client::sptr rpcc, uhd::device_addr_t device_info)
@@ -108,7 +108,8 @@ std::vector<std::string> mpmd_mb_controller::get_clock_sources() const
return _rpc->request_with_token<std::vector<std::string>>("get_clock_sources");
}
-void mpmd_mb_controller::set_sync_source(const std::string& clock_source, const std::string& time_source)
+void mpmd_mb_controller::set_sync_source(
+ const std::string& clock_source, const std::string& time_source)
{
uhd::device_addr_t sync_source;
sync_source["clock_source"] = clock_source;
@@ -177,8 +178,7 @@ uhd::usrp::mboard_eeprom_t mpmd_mb_controller::get_eeprom()
{
auto mb_eeprom =
_rpc->request_with_token<std::map<std::string, std::string>>("get_mb_eeprom");
- uhd::usrp::mboard_eeprom_t mb_eeprom_dict(
- mb_eeprom.cbegin(), mb_eeprom.cend());
+ uhd::usrp::mboard_eeprom_t mb_eeprom_dict(mb_eeprom.cbegin(), mb_eeprom.cend());
return mb_eeprom_dict;
}
diff --git a/host/lib/usrp/mpmd/mpmd_mb_iface.cpp b/host/lib/usrp/mpmd/mpmd_mb_iface.cpp
index b474dfdc3..41b664374 100644
--- a/host/lib/usrp/mpmd/mpmd_mb_iface.cpp
+++ b/host/lib/usrp/mpmd/mpmd_mb_iface.cpp
@@ -26,9 +26,7 @@ static uhd::usrp::io_service_args_t get_default_io_srv_args()
mpmd_mboard_impl::mpmd_mb_iface::mpmd_mb_iface(
const uhd::device_addr_t& mb_args, uhd::rpc_client::sptr rpc)
- : _mb_args(mb_args)
- , _rpc(rpc)
- , _link_if_mgr(xport::mpmd_link_if_mgr::make(mb_args))
+ : _mb_args(mb_args), _rpc(rpc), _link_if_mgr(xport::mpmd_link_if_mgr::make(mb_args))
{
_remote_device_id = allocate_device_id();
UHD_LOG_TRACE("MPMD::MB_IFACE", "Assigning device_id " << _remote_device_id);
diff --git a/host/lib/usrp/mpmd/mpmd_mboard_impl.cpp b/host/lib/usrp/mpmd/mpmd_mboard_impl.cpp
index 4268a90ba..ecf503f28 100644
--- a/host/lib/usrp/mpmd/mpmd_mboard_impl.cpp
+++ b/host/lib/usrp/mpmd/mpmd_mboard_impl.cpp
@@ -11,8 +11,8 @@
#include <uhd/utils/log.hpp>
#include <uhd/utils/safe_call.hpp>
#include <chrono>
-#include <thread>
#include <memory>
+#include <thread>
namespace {
/*************************************************************************
@@ -263,7 +263,8 @@ mpmd_mboard_impl::mpmd_mboard_impl(
, _claim_rpc(make_mpm_rpc_client(rpc_server_addr, mb_args, MPMD_CLAIMER_RPC_TIMEOUT))
{
UHD_LOGGER_TRACE("MPMD") << "Initializing mboard, connecting to RPC server address: "
- << rpc_server_addr << " mboard args: " << mb_args.to_string();
+ << rpc_server_addr
+ << " mboard args: " << mb_args.to_string();
_claimer_task = claim_device_and_make_task();
if (mb_args_.has_key(MPMD_MEAS_LATENCY_KEY)) {