From 3b1473d5a3fbfb89e9ddc5575e855644707718d0 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Thu, 1 Jul 2010 16:08:33 -0700 Subject: usrp2: removed usrp2.hpp header, its not needed, just use the discovery/factory system uhd: added usrp_mimo skeleton code/header --- host/lib/usrp/usrp2/usrp2_impl.cpp | 22 +++++++++++----------- host/lib/usrp/usrp2/usrp2_impl.hpp | 2 +- 2 files changed, 12 insertions(+), 12 deletions(-) (limited to 'host/lib') diff --git a/host/lib/usrp/usrp2/usrp2_impl.cpp b/host/lib/usrp/usrp2/usrp2_impl.cpp index 436146a48..cdba19f50 100644 --- a/host/lib/usrp/usrp2/usrp2_impl.cpp +++ b/host/lib/usrp/usrp2/usrp2_impl.cpp @@ -35,10 +35,6 @@ using namespace uhd::usrp; using namespace uhd::transport; namespace asio = boost::asio; -UHD_STATIC_BLOCK(register_usrp2_device){ - device::register_device(&usrp2::find, &usrp2::make); -} - /*********************************************************************** * Helper Functions **********************************************************************/ @@ -48,10 +44,14 @@ std::vector split_addrs(const std::string &addrs_str){ return addrs; } +template std::string num2str(T num){ + return boost::lexical_cast(num); +} + /*********************************************************************** * Discovery over the udp transport **********************************************************************/ -uhd::device_addrs_t usrp2::find(const device_addr_t &hint){ +static uhd::device_addrs_t usrp2_find(const device_addr_t &hint){ device_addrs_t usrp2_addrs; //return an empty list of addresses when type is set to non-usrp2 @@ -68,7 +68,7 @@ uhd::device_addrs_t usrp2::find(const device_addr_t &hint){ new_hint["addr"] = if_addrs.bcast; //call discover with the new hint and append results - device_addrs_t new_usrp2_addrs = usrp2::find(new_hint); + device_addrs_t new_usrp2_addrs = usrp2_find(new_hint); usrp2_addrs.insert(usrp2_addrs.begin(), new_usrp2_addrs.begin(), new_usrp2_addrs.end() ); @@ -127,11 +127,7 @@ uhd::device_addrs_t usrp2::find(const device_addr_t &hint){ /*********************************************************************** * Make **********************************************************************/ -template std::string num2str(T num){ - return boost::lexical_cast(num); -} - -device::sptr usrp2::make(const device_addr_t &device_addr){ +static device::sptr usrp2_make(const device_addr_t &device_addr){ //extract the receive and send buffer sizes size_t recv_buff_size = 0, send_buff_size= 0 ; if (device_addr.has_key("recv_buff_size")){ @@ -161,6 +157,10 @@ device::sptr usrp2::make(const device_addr_t &device_addr){ ); } +UHD_STATIC_BLOCK(register_usrp2_device){ + device::register_device(&usrp2_find, &usrp2_make); +} + /*********************************************************************** * Structors **********************************************************************/ diff --git a/host/lib/usrp/usrp2/usrp2_impl.hpp b/host/lib/usrp/usrp2/usrp2_impl.hpp index df1dba663..07e29eadd 100644 --- a/host/lib/usrp/usrp2/usrp2_impl.hpp +++ b/host/lib/usrp/usrp2/usrp2_impl.hpp @@ -22,7 +22,7 @@ #include "clock_ctrl.hpp" #include "codec_ctrl.hpp" #include "serdes_ctrl.hpp" -#include +#include #include #include #include -- cgit v1.2.3