diff options
author | Josh Blum <josh@joshknows.com> | 2010-01-29 19:22:40 -0800 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2010-01-29 19:22:40 -0800 |
commit | 5e455ca92280e3c22f5484cb81a2aef0cdfb5de4 (patch) | |
tree | d32d5aeebbef8fc2d15c42b281c893940f7f6b5b /lib/device.cpp | |
parent | aa2c904d7a6dad83f4a516a5a38ee9e765b9dfac (diff) | |
download | uhd-5e455ca92280e3c22f5484cb81a2aef0cdfb5de4.tar.gz uhd-5e455ca92280e3c22f5484cb81a2aef0cdfb5de4.tar.bz2 uhd-5e455ca92280e3c22f5484cb81a2aef0cdfb5de4.zip |
Minimal framework in place to handle udp discovery.
Added usrp2 stuff, udp wrapper, discovery function.
Added app called discover usrps (usrp2 only for now).
Diffstat (limited to 'lib/device.cpp')
-rw-r--r-- | lib/device.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/device.cpp b/lib/device.cpp index a314da3a8..5718c71e7 100644 --- a/lib/device.cpp +++ b/lib/device.cpp @@ -16,6 +16,7 @@ // #include <usrp_uhd/usrp/usrp.hpp> +#include <usrp_uhd/usrp/mboard/usrp2.hpp> #include <usrp_uhd/device.hpp> #include <boost/format.hpp> #include <stdexcept> @@ -24,6 +25,10 @@ using namespace usrp_uhd; std::vector<device_addr_t> device::discover(const device_addr_t & hint = device_addr_t()){ std::vector<device_addr_t> device_addrs; + if (hint.type == DEVICE_ADDR_TYPE_UDP){ + std::vector<device_addr_t> usrp2_addrs = usrp::mboard::usrp2::discover(hint); + device_addrs.insert(device_addrs.begin(), usrp2_addrs.begin(), usrp2_addrs.end()); + } if (hint.type == DEVICE_ADDR_TYPE_VIRTUAL){ //make a copy of the hint for virtual testing device_addr_t virtual_device_addr = hint; |