From c5480830c6e8e8e862523b3ebf3117fda8a100df Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Tue, 9 Feb 2010 16:28:16 -0800 Subject: renamed usrp_uhd to uhd --- lib/Makefile.am | 10 +++++----- lib/device.cpp | 10 +++++----- lib/device_addr.cpp | 14 +++++++------- lib/gain_handler.cpp | 6 +++--- lib/uhd.cpp | 20 ++++++++++++++++++++ lib/usrp/Makefile.am | 4 ++-- lib/usrp/dboard/base.cpp | 4 ++-- lib/usrp/dboard/dboards.hpp | 4 ++-- lib/usrp/dboard/id.cpp | 4 ++-- lib/usrp/dboard/interface.cpp | 4 ++-- lib/usrp/dboard/manager.cpp | 8 ++++---- lib/usrp/mboard/base.cpp | 4 ++-- lib/usrp/mboard/test.cpp | 14 +++++++------- lib/usrp/mboard/usrp2.cpp | 8 ++++---- lib/usrp/usrp.cpp | 12 ++++++------ lib/usrp_uhd.cpp | 20 -------------------- lib/wax.cpp | 2 +- 17 files changed, 74 insertions(+), 74 deletions(-) create mode 100644 lib/uhd.cpp delete mode 100644 lib/usrp_uhd.cpp (limited to 'lib') diff --git a/lib/Makefile.am b/lib/Makefile.am index 272d2c296..8ddc0e4be 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -21,17 +21,17 @@ SUBDIRS = usrp quadradio AM_CPPFLAGS = $(GENERAL_CPPFLAGS) -lib_LTLIBRARIES = libusrp_uhd.la +lib_LTLIBRARIES = libuhd.la -libusrp_uhd_la_SOURCES = \ +libuhd_la_SOURCES = \ device.cpp \ device_addr.cpp \ gain_handler.cpp \ - usrp_uhd.cpp \ + uhd.cpp \ wax.cpp -libusrp_uhd_la_LIBADD = \ +libuhd_la_LIBADD = \ $(GENERAL_LDDFLAGS) \ - $(USRP_UHD_USRP_LA) + $(UHD_USRP_LA) noinst_HEADERS = diff --git a/lib/device.cpp b/lib/device.cpp index 5718c71e7..4b51a70d4 100644 --- a/lib/device.cpp +++ b/lib/device.cpp @@ -15,13 +15,13 @@ // along with this program. If not, see . // -#include -#include -#include +#include +#include +#include #include #include -using namespace usrp_uhd; +using namespace uhd; std::vector device::discover(const device_addr_t & hint = device_addr_t()){ std::vector device_addrs; @@ -58,7 +58,7 @@ device::sptr device::make(const device_addr_t & hint, size_t which){ //create the new device with the discovered address //TODO only a usrp device will be made (until others are supported) if (true){ - return sptr(new usrp_uhd::usrp::usrp(device_addrs.at(which))); + return sptr(new uhd::usrp::usrp(device_addrs.at(which))); } throw std::runtime_error("cant make a device"); } diff --git a/lib/device_addr.cpp b/lib/device_addr.cpp index e11d51580..ee6dbbbc8 100644 --- a/lib/device_addr.cpp +++ b/lib/device_addr.cpp @@ -15,7 +15,7 @@ // along with this program. If not, see . // -#include +#include #include #include #include @@ -23,7 +23,7 @@ #include //----------------------- u2 mac addr wrapper ------------------------// -usrp_uhd::mac_addr_t::mac_addr_t(const std::string &mac_addr_str_){ +uhd::mac_addr_t::mac_addr_t(const std::string &mac_addr_str_){ std::string mac_addr_str = (mac_addr_str_ == "")? "ff:ff:ff:ff:ff:ff" : mac_addr_str_; //ether_aton_r(str.c_str(), &mac_addr); @@ -55,7 +55,7 @@ usrp_uhd::mac_addr_t::mac_addr_t(const std::string &mac_addr_str_){ memcpy(&mac_addr, p, sizeof(mac_addr)); } -std::string usrp_uhd::mac_addr_t::to_string(void) const{ +std::string uhd::mac_addr_t::to_string(void) const{ //ether_ntoa_r(&mac_addr, addr_buf); const uint8_t *p = reinterpret_cast(&mac_addr); return str( @@ -65,13 +65,13 @@ std::string usrp_uhd::mac_addr_t::to_string(void) const{ ); } -std::ostream& operator<<(std::ostream &os, const usrp_uhd::mac_addr_t &x){ +std::ostream& operator<<(std::ostream &os, const uhd::mac_addr_t &x){ os << x.to_string(); return os; } //----------------------- usrp device_addr_t wrapper -------------------------// -usrp_uhd::device_addr_t::device_addr_t(device_addr_type_t device_addr_type){ +uhd::device_addr_t::device_addr_t(device_addr_type_t device_addr_type){ type = device_addr_type; virtual_args.num_rx_dsps = 0; virtual_args.num_tx_dsps = 0; @@ -84,7 +84,7 @@ usrp_uhd::device_addr_t::device_addr_t(device_addr_type_t device_addr_type){ discovery_args.mboard_id = ~0; } -std::string usrp_uhd::device_addr_t::to_string(void) const{ +std::string uhd::device_addr_t::to_string(void) const{ std::ostringstream out; out << "USRP Type: "; switch(type){ @@ -121,7 +121,7 @@ std::string usrp_uhd::device_addr_t::to_string(void) const{ return out.str(); } -std::ostream& operator<<(std::ostream &os, const usrp_uhd::device_addr_t &x) +std::ostream& operator<<(std::ostream &os, const uhd::device_addr_t &x) { os << x.to_string(); return os; diff --git a/lib/gain_handler.cpp b/lib/gain_handler.cpp index 8713ad766..85cacd2a5 100644 --- a/lib/gain_handler.cpp +++ b/lib/gain_handler.cpp @@ -15,14 +15,14 @@ // along with this program. If not, see . // -#include -#include +#include +#include #include #include #include #include -using namespace usrp_uhd; +using namespace uhd; /*********************************************************************** * Helper functions and macros diff --git a/lib/uhd.cpp b/lib/uhd.cpp new file mode 100644 index 000000000..5e250c76f --- /dev/null +++ b/lib/uhd.cpp @@ -0,0 +1,20 @@ +// +// Copyright 2010 Ettus Research LLC +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// + +#include + +//nothing here, just includes the header so the compiler can check diff --git a/lib/usrp/Makefile.am b/lib/usrp/Makefile.am index bc279402c..ec4300159 100644 --- a/lib/usrp/Makefile.am +++ b/lib/usrp/Makefile.am @@ -28,5 +28,5 @@ lib_la_SOURCES = \ lib_la_LIBADD = \ $(GENERAL_LDDFLAGS) \ - $(USRP_UHD_USRP_DBOARD_LA) \ - $(USRP_UHD_USRP_MBOARD_LA) + $(UHD_USRP_DBOARD_LA) \ + $(UHD_USRP_MBOARD_LA) diff --git a/lib/usrp/dboard/base.cpp b/lib/usrp/dboard/base.cpp index 18489f3b2..de8db323a 100644 --- a/lib/usrp/dboard/base.cpp +++ b/lib/usrp/dboard/base.cpp @@ -15,10 +15,10 @@ // along with this program. If not, see . // -#include +#include #include -using namespace usrp_uhd::usrp::dboard; +using namespace uhd::usrp::dboard; /*********************************************************************** * base dboard base class diff --git a/lib/usrp/dboard/dboards.hpp b/lib/usrp/dboard/dboards.hpp index 218849eb6..0e740856f 100644 --- a/lib/usrp/dboard/dboards.hpp +++ b/lib/usrp/dboard/dboards.hpp @@ -18,9 +18,9 @@ #ifndef INCLUDED_LOCAL_DBOARDS_HPP #define INCLUDED_LOCAL_DBOARDS_HPP -#include +#include -using namespace usrp_uhd::usrp::dboard; +using namespace uhd::usrp::dboard; /*********************************************************************** * The basic boards: diff --git a/lib/usrp/dboard/id.cpp b/lib/usrp/dboard/id.cpp index 6f545d4e4..b55028a11 100644 --- a/lib/usrp/dboard/id.cpp +++ b/lib/usrp/dboard/id.cpp @@ -15,12 +15,12 @@ // along with this program. If not, see . // -#include +#include #include #include #include -using namespace usrp_uhd::usrp::dboard; +using namespace uhd::usrp::dboard; std::ostream& operator<<(std::ostream &os, const dboard_id_t &id){ //map the dboard ids to string representations diff --git a/lib/usrp/dboard/interface.cpp b/lib/usrp/dboard/interface.cpp index dff90ffa4..837c76d0a 100644 --- a/lib/usrp/dboard/interface.cpp +++ b/lib/usrp/dboard/interface.cpp @@ -15,9 +15,9 @@ // along with this program. If not, see . // -#include +#include -using namespace usrp_uhd::usrp::dboard; +using namespace uhd::usrp::dboard; interface::interface(void){ /* NOP */ diff --git a/lib/usrp/dboard/manager.cpp b/lib/usrp/dboard/manager.cpp index 759cb20b8..5005301ba 100644 --- a/lib/usrp/dboard/manager.cpp +++ b/lib/usrp/dboard/manager.cpp @@ -15,15 +15,15 @@ // along with this program. If not, see . // -#include -#include +#include +#include #include #include #include #include "dboards.hpp" -using namespace usrp_uhd; -using namespace usrp_uhd::usrp::dboard; +using namespace uhd; +using namespace uhd::usrp::dboard; using namespace boost::assign; /*********************************************************************** diff --git a/lib/usrp/mboard/base.cpp b/lib/usrp/mboard/base.cpp index 3baf4c0a4..f4f0324f3 100644 --- a/lib/usrp/mboard/base.cpp +++ b/lib/usrp/mboard/base.cpp @@ -15,10 +15,10 @@ // along with this program. If not, see . // -#include +#include #include -using namespace usrp_uhd::usrp::mboard; +using namespace uhd::usrp::mboard; base::base(void){ /* NOP */ diff --git a/lib/usrp/mboard/test.cpp b/lib/usrp/mboard/test.cpp index b54d66408..9ad11c046 100644 --- a/lib/usrp/mboard/test.cpp +++ b/lib/usrp/mboard/test.cpp @@ -15,21 +15,21 @@ // along with this program. If not, see . // -#include -#include -#include +#include +#include +#include #include #include #include -using namespace usrp_uhd; -using namespace usrp_uhd::usrp; -using namespace usrp_uhd::usrp::mboard; +using namespace uhd; +using namespace uhd::usrp; +using namespace uhd::usrp::mboard; /*********************************************************************** * dummy interface for dboards **********************************************************************/ -class dummy_interface : public usrp_uhd::usrp::dboard::interface{ +class dummy_interface : public uhd::usrp::dboard::interface{ public: dummy_interface(void){} ~dummy_interface(void){} diff --git a/lib/usrp/mboard/usrp2.cpp b/lib/usrp/mboard/usrp2.cpp index 7064f1460..ffbfe69fc 100644 --- a/lib/usrp/mboard/usrp2.cpp +++ b/lib/usrp/mboard/usrp2.cpp @@ -15,9 +15,9 @@ // along with this program. If not, see . // -#include +#include #include "usrp2_fw_common.h" -#include +#include #include #include #include @@ -25,8 +25,8 @@ #include #include -using namespace usrp_uhd; -using namespace usrp_uhd::usrp::mboard; +using namespace uhd; +using namespace uhd::usrp::mboard; using boost::asio::ip::udp; /*********************************************************************** diff --git a/lib/usrp/usrp.cpp b/lib/usrp/usrp.cpp index e3016be5f..59dd49dd1 100644 --- a/lib/usrp/usrp.cpp +++ b/lib/usrp/usrp.cpp @@ -15,24 +15,24 @@ // along with this program. If not, see . // -#include -#include -#include +#include +#include +#include #include #include #include -using namespace usrp_uhd::usrp; +using namespace uhd::usrp; /*********************************************************************** * default callbacks for the send and recv * these should be replaced with callbacks from the mboard object **********************************************************************/ -static void send_raw_default(const usrp_uhd::device::send_args_t &){ +static void send_raw_default(const uhd::device::send_args_t &){ throw std::runtime_error("No callback registered for send raw"); } -static void recv_raw_default(const usrp_uhd::device::recv_args_t &){ +static void recv_raw_default(const uhd::device::recv_args_t &){ throw std::runtime_error("No callback registered for recv raw"); } diff --git a/lib/usrp_uhd.cpp b/lib/usrp_uhd.cpp deleted file mode 100644 index 7a9748954..000000000 --- a/lib/usrp_uhd.cpp +++ /dev/null @@ -1,20 +0,0 @@ -// -// Copyright 2010 Ettus Research LLC -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . -// - -#include - -//nothing here, just includes the header so the compiler can check diff --git a/lib/wax.cpp b/lib/wax.cpp index ce9705b1e..24f89288c 100644 --- a/lib/wax.cpp +++ b/lib/wax.cpp @@ -15,7 +15,7 @@ // along with this program. If not, see . // -#include +#include #include #include -- cgit v1.2.3