summaryrefslogtreecommitdiffstats
path: root/host/include
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2010-02-21 12:59:41 -0800
committerJosh Blum <josh@joshknows.com>2010-02-21 12:59:41 -0800
commitadd5d32f9b0cb3cda15624fb7aef3998096ff3f6 (patch)
treee5c10c2952b173b977e5835c34ac27ece92a0b45 /host/include
parentaab51fa40769bb77af73aba69e16c9ac28e4943f (diff)
downloaduhd-add5d32f9b0cb3cda15624fb7aef3998096ff3f6.tar.gz
uhd-add5d32f9b0cb3cda15624fb7aef3998096ff3f6.tar.bz2
uhd-add5d32f9b0cb3cda15624fb7aef3998096ff3f6.zip
Moved lib and include contents of dboard and mboard one directory up and prefixed them with dboard_ and mboard_.
And yes, the code is compiling.
Diffstat (limited to 'host/include')
-rw-r--r--host/include/uhd/usrp/CMakeLists.txt9
-rw-r--r--host/include/uhd/usrp/dboard/CMakeLists.txt25
-rw-r--r--host/include/uhd/usrp/dboard_base.hpp (renamed from host/include/uhd/usrp/dboard/base.hpp)46
-rw-r--r--host/include/uhd/usrp/dboard_id.hpp (renamed from host/include/uhd/usrp/dboard/id.hpp)6
-rw-r--r--host/include/uhd/usrp/dboard_interface.hpp (renamed from host/include/uhd/usrp/dboard/interface.hpp)20
-rw-r--r--host/include/uhd/usrp/dboard_manager.hpp (renamed from host/include/uhd/usrp/dboard/manager.hpp)26
-rw-r--r--host/include/uhd/usrp/mboard/CMakeLists.txt23
-rw-r--r--host/include/uhd/usrp/mboard_base.hpp (renamed from host/include/uhd/usrp/mboard/base.hpp)14
-rw-r--r--host/include/uhd/usrp/usrp.hpp4
-rw-r--r--host/include/uhd/usrp/usrp2.hpp (renamed from host/include/uhd/usrp/mboard/usrp2.hpp)8
10 files changed, 68 insertions, 113 deletions
diff --git a/host/include/uhd/usrp/CMakeLists.txt b/host/include/uhd/usrp/CMakeLists.txt
index d3040c3cc..4b49e315f 100644
--- a/host/include/uhd/usrp/CMakeLists.txt
+++ b/host/include/uhd/usrp/CMakeLists.txt
@@ -16,10 +16,13 @@
#
-ADD_SUBDIRECTORY(dboard)
-ADD_SUBDIRECTORY(mboard)
-
INSTALL(FILES
+ dboard_base.hpp
+ dboard_id.hpp
+ dboard_interface.hpp
+ dboard_manager.hpp
+ mboard_base.hpp
+ usrp2.hpp
usrp.hpp
DESTINATION ${HEADER_DIR}/uhd/usrp
)
diff --git a/host/include/uhd/usrp/dboard/CMakeLists.txt b/host/include/uhd/usrp/dboard/CMakeLists.txt
deleted file mode 100644
index e1ecc3b70..000000000
--- a/host/include/uhd/usrp/dboard/CMakeLists.txt
+++ /dev/null
@@ -1,25 +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 <http://www.gnu.org/licenses/>.
-#
-
-
-INSTALL(FILES
- base.hpp
- id.hpp
- interface.hpp
- manager.hpp
- DESTINATION ${HEADER_DIR}/uhd/usrp/dboard
-)
diff --git a/host/include/uhd/usrp/dboard/base.hpp b/host/include/uhd/usrp/dboard_base.hpp
index 111820a8b..b5c0d40ed 100644
--- a/host/include/uhd/usrp/dboard/base.hpp
+++ b/host/include/uhd/usrp/dboard_base.hpp
@@ -22,26 +22,26 @@
#include <boost/utility.hpp>
#include <boost/shared_ptr.hpp>
#include <boost/tuple/tuple.hpp>
-#include <uhd/usrp/dboard/id.hpp>
-#include <uhd/usrp/dboard/interface.hpp>
+#include <uhd/usrp/dboard_id.hpp>
+#include <uhd/usrp/dboard_interface.hpp>
-namespace uhd{ namespace usrp{ namespace dboard{
+namespace uhd{ namespace usrp{
/*!
- * A daughter board base class for all dboards.
- * Only other dboard base classes should inherit this.
+ * A daughter board dboard_base class for all dboards.
+ * Only other dboard dboard_base classes should inherit this.
*/
-class base : boost::noncopyable{
+class dboard_base : boost::noncopyable{
public:
- typedef boost::shared_ptr<base> sptr;
+ typedef boost::shared_ptr<dboard_base> sptr;
//the constructor args consist of a subdev name and an interface
- //derived classes should pass the args into the base class ctor
+ //derived classes should pass the args into the dboard_base class ctor
//but should not have to deal with the internals of the args
- typedef boost::tuple<std::string, interface::sptr, dboard_id_t, dboard_id_t> ctor_args_t;
+ typedef boost::tuple<std::string, dboard_interface::sptr, dboard_id_t, dboard_id_t> ctor_args_t;
//structors
- base(ctor_args_t const&);
- virtual ~base(void);
+ dboard_base(ctor_args_t const&);
+ virtual ~dboard_base(void);
//interface
virtual void rx_get(const wax::obj &key, wax::obj &val) = 0;
@@ -51,13 +51,13 @@ public:
protected:
std::string get_subdev_name(void);
- interface::sptr get_interface(void);
+ dboard_interface::sptr get_interface(void);
dboard_id_t get_rx_id(void);
dboard_id_t get_tx_id(void);
private:
std::string _subdev_name;
- interface::sptr _dboard_interface;
+ dboard_interface::sptr _dboard_interface;
dboard_id_t _rx_id, _tx_id;
};
@@ -65,27 +65,27 @@ private:
* A xcvr daughter board implements rx and tx methods
* Sub classes for xcvr boards should inherit this.
*/
-class xcvr_base : public base{
+class xcvr_dboard_base : public dboard_base{
public:
/*!
* Create a new xcvr dboard object, override in subclasses.
*/
- xcvr_base(ctor_args_t const&);
- virtual ~xcvr_base(void);
+ xcvr_dboard_base(ctor_args_t const&);
+ virtual ~xcvr_dboard_base(void);
};
/*!
* A rx daughter board only implements rx methods.
* Sub classes for rx-only boards should inherit this.
*/
-class rx_base : public base{
+class rx_dboard_base : public dboard_base{
public:
/*!
* Create a new rx dboard object, override in subclasses.
*/
- rx_base(ctor_args_t const&);
+ rx_dboard_base(ctor_args_t const&);
- virtual ~rx_base(void);
+ virtual ~rx_dboard_base(void);
//override here so the derived classes cannot
void tx_get(const wax::obj &key, wax::obj &val);
@@ -96,20 +96,20 @@ public:
* A tx daughter board only implements tx methods.
* Sub classes for rx-only boards should inherit this.
*/
-class tx_base : public base{
+class tx_dboard_base : public dboard_base{
public:
/*!
* Create a new rx dboard object, override in subclasses.
*/
- tx_base(ctor_args_t const&);
+ tx_dboard_base(ctor_args_t const&);
- virtual ~tx_base(void);
+ virtual ~tx_dboard_base(void);
//override here so the derived classes cannot
void rx_get(const wax::obj &key, wax::obj &val);
void rx_set(const wax::obj &key, const wax::obj &val);
};
-}}} //namespace
+}} //namespace
#endif /* INCLUDED_UHD_USRP_DBOARD_BASE_HPP */
diff --git a/host/include/uhd/usrp/dboard/id.hpp b/host/include/uhd/usrp/dboard_id.hpp
index a890ee096..8e904ff33 100644
--- a/host/include/uhd/usrp/dboard/id.hpp
+++ b/host/include/uhd/usrp/dboard_id.hpp
@@ -20,7 +20,7 @@
#ifndef INCLUDED_UHD_USRP_DBOARD_ID_HPP
#define INCLUDED_UHD_USRP_DBOARD_ID_HPP
-namespace uhd{ namespace usrp{ namespace dboard{
+namespace uhd{ namespace usrp{
enum dboard_id_t{
ID_NONE = 0xffff,
@@ -28,10 +28,10 @@ enum dboard_id_t{
ID_BASIC_RX = 0x0001
};
-struct id{
+struct dboard_id{
static std::string to_string(const dboard_id_t &id);
};
-}}} //namespace
+}} //namespace
#endif /* INCLUDED_UHD_USRP_DBOARD_ID_HPP */
diff --git a/host/include/uhd/usrp/dboard/interface.hpp b/host/include/uhd/usrp/dboard_interface.hpp
index 7c48f4d2b..84e1f5b22 100644
--- a/host/include/uhd/usrp/dboard/interface.hpp
+++ b/host/include/uhd/usrp/dboard_interface.hpp
@@ -22,17 +22,17 @@
#include <vector>
#include <stdint.h>
-namespace uhd{ namespace usrp{ namespace dboard{
+namespace uhd{ namespace usrp{
/*!
- * The daughter board interface to be subclassed.
- * A dboard instance interfaces with the mboard though this api.
- * This interface provides i2c, spi, gpio, atr, aux dac/adc access.
- * Each mboard should have a specially tailored dboard interface.
+ * The daughter board dboard_interface to be subclassed.
+ * A dboard instance dboard_interfaces with the mboard though this api.
+ * This dboard_interface provides i2c, spi, gpio, atr, aux dac/adc access.
+ * Each mboard should have a specially tailored dboard dboard_interface.
*/
-class interface{
+class dboard_interface{
public:
- typedef boost::shared_ptr<interface> sptr;
+ typedef boost::shared_ptr<dboard_interface> sptr;
typedef std::vector<uint8_t> byte_vector_t;
//tells the host which unit to use
@@ -66,8 +66,8 @@ public:
};
//structors
- interface(void);
- virtual ~interface(void);
+ dboard_interface(void);
+ virtual ~dboard_interface(void);
/*!
* Write to an aux dac.
@@ -202,6 +202,6 @@ private:
) = 0;
};
-}}} //namespace
+}} //namespace
#endif /* INCLUDED_UHD_USRP_DBOARD_INTERFACE_HPP */
diff --git a/host/include/uhd/usrp/dboard/manager.hpp b/host/include/uhd/usrp/dboard_manager.hpp
index e53ba8e52..d927f6231 100644
--- a/host/include/uhd/usrp/dboard/manager.hpp
+++ b/host/include/uhd/usrp/dboard_manager.hpp
@@ -23,22 +23,22 @@
#include <uhd/props.hpp>
#include <boost/utility.hpp>
#include <boost/shared_ptr.hpp>
-#include <uhd/usrp/dboard/base.hpp>
-#include <uhd/usrp/dboard/id.hpp>
+#include <uhd/usrp/dboard_base.hpp>
+#include <uhd/usrp/dboard_id.hpp>
-namespace uhd{ namespace usrp{ namespace dboard{
+namespace uhd{ namespace usrp{
/*!
- * A daughter board subdev manager class.
+ * A daughter board subdev dboard_manager class.
* Create subdev instances for each subdev on a dboard.
* Provide wax::obj access to the subdevs inside.
*/
-class manager : boost::noncopyable{
+class dboard_manager : boost::noncopyable{
public:
//dboard constructor (each dboard should have a ::make with this signature)
- typedef base::sptr(*dboard_ctor_t)(base::ctor_args_t const&);
+ typedef dboard_base::sptr(*dboard_ctor_t)(dboard_base::ctor_args_t const&);
/*!
* Register subdevices for a given dboard id.
@@ -54,29 +54,29 @@ public:
);
public:
- typedef boost::shared_ptr<manager> sptr;
+ typedef boost::shared_ptr<dboard_manager> sptr;
//structors
- manager(
+ dboard_manager(
dboard_id_t rx_dboard_id,
dboard_id_t tx_dboard_id,
- interface::sptr dboard_interface
+ dboard_interface::sptr interface
);
- ~manager(void);
+ ~dboard_manager(void);
- //interface
+ //dboard_interface
prop_names_t get_rx_subdev_names(void);
prop_names_t get_tx_subdev_names(void);
wax::obj get_rx_subdev(const std::string &subdev_name);
wax::obj get_tx_subdev(const std::string &subdev_name);
private:
- //list of rx and tx dboards in this manager
+ //list of rx and tx dboards in this dboard_manager
//each dboard here is actually a subdevice proxy
//the subdevice proxy is internal to the cpp file
uhd::dict<std::string, wax::obj> _rx_dboards;
uhd::dict<std::string, wax::obj> _tx_dboards;
};
-}}} //namespace
+}} //namespace
#endif /* INCLUDED_UHD_USRP_DBOARD_MANAGER_HPP */
diff --git a/host/include/uhd/usrp/mboard/CMakeLists.txt b/host/include/uhd/usrp/mboard/CMakeLists.txt
deleted file mode 100644
index 2cdb55143..000000000
--- a/host/include/uhd/usrp/mboard/CMakeLists.txt
+++ /dev/null
@@ -1,23 +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 <http://www.gnu.org/licenses/>.
-#
-
-
-INSTALL(FILES
- base.hpp
- usrp2.hpp
- DESTINATION ${HEADER_DIR}/uhd/usrp/mboard
-)
diff --git a/host/include/uhd/usrp/mboard/base.hpp b/host/include/uhd/usrp/mboard_base.hpp
index a8de81a7e..498a46681 100644
--- a/host/include/uhd/usrp/mboard/base.hpp
+++ b/host/include/uhd/usrp/mboard_base.hpp
@@ -22,16 +22,16 @@
#include <boost/utility.hpp>
#include <boost/shared_ptr.hpp>
-namespace uhd{ namespace usrp{ namespace mboard{
+namespace uhd{ namespace usrp{
/*!
- * A base class for usrp mboard objects.
+ * A mboard_base class for usrp mboard objects.
*/
-class base : boost::noncopyable, public wax::obj{
+class mboard_base : boost::noncopyable, public wax::obj{
public:
- typedef boost::shared_ptr<base> sptr;
- base(void);
- ~base(void);
+ typedef boost::shared_ptr<mboard_base> sptr;
+ mboard_base(void);
+ ~mboard_base(void);
//TODO other api calls
@@ -40,6 +40,6 @@ private:
virtual void set(const wax::obj &, const wax::obj &) = 0;
};
-}}} //namespace
+}} //namespace
#endif /* INCLUDED_UHD_USRP_MBOARD_BASE_HPP */
diff --git a/host/include/uhd/usrp/usrp.hpp b/host/include/uhd/usrp/usrp.hpp
index 98c357b77..cc5ed601e 100644
--- a/host/include/uhd/usrp/usrp.hpp
+++ b/host/include/uhd/usrp/usrp.hpp
@@ -16,7 +16,7 @@
//
#include <uhd/device.hpp>
-#include <uhd/usrp/mboard/base.hpp>
+#include <uhd/usrp/mboard_base.hpp>
#include <uhd/dict.hpp>
#ifndef INCLUDED_UHD_USRP_USRP_HPP
@@ -43,7 +43,7 @@ private:
void get(const wax::obj &, wax::obj &);
void set(const wax::obj &, const wax::obj &);
- uhd::dict<std::string, mboard::base::sptr> _mboards;
+ uhd::dict<std::string, mboard_base::sptr> _mboards;
boost::function<void(const std::vector<boost::asio::const_buffer> &)> _send_raw_cb;
boost::function<uhd::shared_iovec(void)> _recv_raw_cb;
};
diff --git a/host/include/uhd/usrp/mboard/usrp2.hpp b/host/include/uhd/usrp/usrp2.hpp
index 5da9f874d..68d4c513c 100644
--- a/host/include/uhd/usrp/mboard/usrp2.hpp
+++ b/host/include/uhd/usrp/usrp2.hpp
@@ -18,15 +18,15 @@
#ifndef INCLUDED_UHD_USRP_MBOARD_USRP2_HPP
#define INCLUDED_UHD_USRP_MBOARD_USRP2_HPP
-#include <uhd/usrp/mboard/base.hpp>
+#include <uhd/usrp/mboard_base.hpp>
#include <uhd/device_addr.hpp>
-namespace uhd{ namespace usrp{ namespace mboard{
+namespace uhd{ namespace usrp{
/*!
* The usrp2 mboard class.
*/
-class usrp2 : public base{
+class usrp2 : public mboard_base{
public:
/*!
* Discover usrp2 devices over the ethernet.
@@ -46,6 +46,6 @@ private:
wax::obj _impl;
};
-}}} //namespace
+}} //namespace
#endif /* INCLUDED_UHD_USRP_MBOARD_USRP2_HPP */