diff options
author | Martin Braun <martin.braun@ettus.com> | 2018-02-09 12:17:08 -0800 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2018-02-10 00:18:43 +0100 |
commit | a2b3955e99df426826b922f3bfab41b18324aad0 (patch) | |
tree | 8a9f8912831caad4784557dd9fecbf1a2593b39a /host/lib/usrp/mpmd/mpmd_find.cpp | |
parent | 167bc5942e647378022de7b4e7525eb6fc1808b0 (diff) | |
download | uhd-a2b3955e99df426826b922f3bfab41b18324aad0.tar.gz uhd-a2b3955e99df426826b922f3bfab41b18324aad0.tar.bz2 uhd-a2b3955e99df426826b922f3bfab41b18324aad0.zip |
mpmd: Fix compiler issues
- Initialization of device_addr_t from another using auto doesn't work
across compilers
- Moved MPMD_DISC_RESPONSE_PREAMBLE to mpmd_find where it belongs
Diffstat (limited to 'host/lib/usrp/mpmd/mpmd_find.cpp')
-rw-r--r-- | host/lib/usrp/mpmd/mpmd_find.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/host/lib/usrp/mpmd/mpmd_find.cpp b/host/lib/usrp/mpmd/mpmd_find.cpp index 2f70ec280..a71581e78 100644 --- a/host/lib/usrp/mpmd/mpmd_find.cpp +++ b/host/lib/usrp/mpmd/mpmd_find.cpp @@ -16,13 +16,14 @@ using namespace uhd; using namespace uhd::mpmd; -constexpr char mpmd_impl::MPM_DISC_RESPONSE_PREAMBLE[]; - namespace { //! How long we wait for discovery responses (in seconds) constexpr double MPMD_FIND_TIMEOUT = 0.5; constexpr char MPMD_CHDR_REACHABILITY_KEY[] = "reachable"; constexpr char MPMD_CHDR_REACHABILITY_NEGATIVE[] = "No"; + //! The preamble for any response on the discovery port. Can be used to + // verify that the response is actually an MPM device. + constexpr char MPM_DISC_RESPONSE_PREAMBLE[] = "USRP-MPM"; device_addr_t flag_dev_as_unreachable(const device_addr_t& device_args) { @@ -75,7 +76,7 @@ device_addrs_t mpmd_find_with_addr( } // Verify we didn't receive something other than an MPM discovery // response - if (result[0] != mpmd_impl::MPM_DISC_RESPONSE_PREAMBLE) { + if (result[0] != MPM_DISC_RESPONSE_PREAMBLE) { continue; } const std::string recv_addr = comm->get_recv_addr(); |