diff options
| author | Martin Braun <martin.braun@ettus.com> | 2017-12-20 18:08:40 -0800 | 
|---|---|---|
| committer | Martin Braun <martin.braun@ettus.com> | 2017-12-22 15:06:11 -0800 | 
| commit | a2d0b50bc61442b471fe1a724d61d336af961e21 (patch) | |
| tree | 2068abeeec45cdd2944e4186614b4d672ddae8af /host/lib/usrp/mpmd/mpmd_impl.cpp | |
| parent | 93c1b176ca7ef9a62b903ce1d942b94185db8a7c (diff) | |
| download | uhd-a2d0b50bc61442b471fe1a724d61d336af961e21.tar.gz uhd-a2d0b50bc61442b471fe1a724d61d336af961e21.tar.bz2 uhd-a2d0b50bc61442b471fe1a724d61d336af961e21.zip  | |
mpmd: Expose get_mtu() API to mpmd_mboard_impl and to prop tree
Diffstat (limited to 'host/lib/usrp/mpmd/mpmd_impl.cpp')
| -rw-r--r-- | host/lib/usrp/mpmd/mpmd_impl.cpp | 31 | 
1 files changed, 19 insertions, 12 deletions
diff --git a/host/lib/usrp/mpmd/mpmd_impl.cpp b/host/lib/usrp/mpmd/mpmd_impl.cpp index 911b57558..7b4ca5bc8 100644 --- a/host/lib/usrp/mpmd/mpmd_impl.cpp +++ b/host/lib/usrp/mpmd/mpmd_impl.cpp @@ -204,6 +204,25 @@ namespace {              ;          } +        /*** MTUs ***********************************************************/ +        tree->create<size_t>(mb_path / "mtu/recv") +            .add_coerced_subscriber([](const size_t){ +                throw uhd::runtime_error( +                    "Attempting to write read-only value (MTU)!"); +            }) +            .set_publisher([mb](){ +                return mb->get_mtu(uhd::RX_DIRECTION); +            }) +        ; +        tree->create<size_t>(mb_path / "mtu/send") +            .add_coerced_subscriber([](const size_t){ +                throw uhd::runtime_error( +                    "Attempting to write read-only value (MTU)!"); +            }) +            .set_publisher([mb](){ +                return mb->get_mtu(uhd::TX_DIRECTION); +            }) +        ;      }      void reset_time_synchronized(uhd::property_tree::sptr tree) @@ -389,20 +408,8 @@ mpmd_mboard_impl::uptr mpmd_impl::setup_mb(      _tree->create<std::string>(mb_path / "connection")          .set(mb->device_info.get("connection", "remote")); -    // Do real MTU discovery (something similar like X300 but with MPM) - -    _tree->create<size_t>(mb_path / "mtu/recv").set(1500); -    _tree->create<size_t>(mb_path / "mtu/send").set(1500);      _tree->create<size_t>(mb_path / "link_max_rate").set(1e9 / 8); -    // query more information about FPGA/MPM - - -    // Query time/clock sources on mboards/dboards -    // Throw rpc calls with boost bind into the property tree? - - -    // implicit move      return mb;  }  | 
