summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--host/examples/rx_timed_samples.cpp4
-rw-r--r--host/include/uhd/CMakeLists.txt1
-rw-r--r--host/include/uhd/usrp/CMakeLists.txt5
-rw-r--r--host/include/uhd/usrp/simple_usrp.hpp (renamed from host/include/uhd/simple_device.hpp)18
-rw-r--r--host/include/uhd/usrp/tune_helper.hpp (renamed from host/include/uhd/utils/tune_helper.hpp)10
-rw-r--r--host/include/uhd/utils/CMakeLists.txt1
-rw-r--r--host/include/uhd/utils/props.hpp6
-rw-r--r--host/lib/CMakeLists.txt4
-rw-r--r--host/lib/usrp/simple_usrp.cpp (renamed from host/lib/simple_device.cpp)14
-rw-r--r--host/lib/usrp/tune_helper.cpp (renamed from host/lib/tune_helper.cpp)10
10 files changed, 38 insertions, 35 deletions
diff --git a/host/examples/rx_timed_samples.cpp b/host/examples/rx_timed_samples.cpp
index b3516e686..58b5af9da 100644
--- a/host/examples/rx_timed_samples.cpp
+++ b/host/examples/rx_timed_samples.cpp
@@ -16,7 +16,7 @@
//
#include <uhd/utils/safe_main.hpp>
-#include <uhd/simple_device.hpp>
+#include <uhd/usrp/simple_usrp.hpp>
#include <boost/program_options.hpp>
#include <boost/format.hpp>
#include <iostream>
@@ -52,7 +52,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){
std::cout << std::endl;
std::cout << boost::format("Creating the usrp device with: %s...")
% transport_args << std::endl;
- uhd::simple_device::sptr sdev = uhd::simple_device::make(transport_args);
+ uhd::usrp::simple_usrp::sptr sdev = uhd::usrp::simple_usrp::make(transport_args);
uhd::device::sptr dev = sdev->get_device();
std::cout << boost::format("Using Device: %s") % sdev->get_name() << std::endl;
diff --git a/host/include/uhd/CMakeLists.txt b/host/include/uhd/CMakeLists.txt
index 1c5202caa..d63062032 100644
--- a/host/include/uhd/CMakeLists.txt
+++ b/host/include/uhd/CMakeLists.txt
@@ -24,7 +24,6 @@ ADD_SUBDIRECTORY(utils)
INSTALL(FILES
config.hpp
device.hpp
- simple_device.hpp
wax.hpp
DESTINATION ${INCLUDE_DIR}/uhd
)
diff --git a/host/include/uhd/usrp/CMakeLists.txt b/host/include/uhd/usrp/CMakeLists.txt
index d0f385f13..7815a4fb9 100644
--- a/host/include/uhd/usrp/CMakeLists.txt
+++ b/host/include/uhd/usrp/CMakeLists.txt
@@ -33,5 +33,10 @@ INSTALL(FILES
### usrp headers ###
usrp1e.hpp
usrp2.hpp
+
+ ### utilities ###
+ tune_helper.hpp
+ simple_usrp.hpp
+
DESTINATION ${INCLUDE_DIR}/uhd/usrp
)
diff --git a/host/include/uhd/simple_device.hpp b/host/include/uhd/usrp/simple_usrp.hpp
index 52928367a..dea1cabda 100644
--- a/host/include/uhd/simple_device.hpp
+++ b/host/include/uhd/usrp/simple_usrp.hpp
@@ -15,8 +15,8 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
-#ifndef INCLUDED_UHD_SIMPLE_DEVICE_HPP
-#define INCLUDED_UHD_SIMPLE_DEVICE_HPP
+#ifndef INCLUDED_UHD_USRP_SIMPLE_USRP_HPP
+#define INCLUDED_UHD_USRP_SIMPLE_USRP_HPP
#include <uhd/config.hpp>
#include <uhd/device.hpp>
@@ -27,17 +27,17 @@
#include <boost/utility.hpp>
#include <vector>
-namespace uhd{
+namespace uhd{ namespace usrp{
/*!
- * The simple UHD device class:
- * A simple device facilitates ease-of-use for most use-case scenarios.
+ * The simple USRP device class:
+ * A simple usrp facilitates ease-of-use for most use-case scenarios.
* The wrapper provides convenience functions to tune the devices
* as well as to set the dboard gains, antennas, and other properties.
*/
-class UHD_API simple_device : boost::noncopyable{
+class UHD_API simple_usrp : boost::noncopyable{
public:
- typedef boost::shared_ptr<simple_device> sptr;
+ typedef boost::shared_ptr<simple_usrp> sptr;
static sptr make(const std::string &args);
virtual device::sptr get_device(void) = 0;
@@ -92,6 +92,6 @@ public:
virtual std::vector<std::string> get_tx_antennas(void) = 0;
};
-} //namespace uhd
+}}
-#endif /* INCLUDED_UHD_SIMPLE_DEVICE_HPP */
+#endif /* INCLUDED_UHD_USRP_SIMPLE_USRP_HPP */
diff --git a/host/include/uhd/utils/tune_helper.hpp b/host/include/uhd/usrp/tune_helper.hpp
index 958d1eceb..f1e276d4f 100644
--- a/host/include/uhd/utils/tune_helper.hpp
+++ b/host/include/uhd/usrp/tune_helper.hpp
@@ -15,14 +15,14 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
-#ifndef INCLUDED_UHD_UTILS_TUNE_HELPER_HPP
-#define INCLUDED_UHD_UTILS_TUNE_HELPER_HPP
+#ifndef INCLUDED_UHD_USRP_TUNE_HELPER_HPP
+#define INCLUDED_UHD_USRP_TUNE_HELPER_HPP
#include <uhd/config.hpp>
#include <uhd/wax.hpp>
#include <uhd/types/tune_result.hpp>
-namespace uhd{
+namespace uhd{ namespace usrp{
/*!
* Tune a rx chain to the desired frequency:
@@ -74,6 +74,6 @@ UHD_API tune_result_t tune_tx_subdev_and_duc(
wax::obj subdev, wax::obj duc, double target_freq
);
-} //namespace uhd
+}}
-#endif /* INCLUDED_UHD_UTILS_TUNE_HELPER_HPP */
+#endif /* INCLUDED_UHD_USRP_TUNE_HELPER_HPP */
diff --git a/host/include/uhd/utils/CMakeLists.txt b/host/include/uhd/utils/CMakeLists.txt
index 2bb72e31d..2831ab0b0 100644
--- a/host/include/uhd/utils/CMakeLists.txt
+++ b/host/include/uhd/utils/CMakeLists.txt
@@ -22,6 +22,5 @@ INSTALL(FILES
props.hpp
safe_main.hpp
static.hpp
- tune_helper.hpp
DESTINATION ${INCLUDE_DIR}/uhd/utils
)
diff --git a/host/include/uhd/utils/props.hpp b/host/include/uhd/utils/props.hpp
index fdbc17d1c..6be0b2ce5 100644
--- a/host/include/uhd/utils/props.hpp
+++ b/host/include/uhd/utils/props.hpp
@@ -15,8 +15,8 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
-#ifndef INCLUDED_UHD_USRP_PROPS_COMMON_HPP
-#define INCLUDED_UHD_USRP_PROPS_COMMON_HPP
+#ifndef INCLUDED_UHD_UTILS_PROPS_HPP
+#define INCLUDED_UHD_UTILS_PROPS_HPP
#include <uhd/config.hpp>
#include <uhd/wax.hpp>
@@ -45,4 +45,4 @@ namespace uhd{
} //namespace uhd
-#endif /* INCLUDED_UHD_USRP_PROPS_COMMON_HPP */
+#endif /* INCLUDED_UHD_UTILS_PROPS_HPP */
diff --git a/host/lib/CMakeLists.txt b/host/lib/CMakeLists.txt
index b205bad5b..a5345cae4 100644
--- a/host/lib/CMakeLists.txt
+++ b/host/lib/CMakeLists.txt
@@ -22,8 +22,6 @@ SET(libuhd_sources
device.cpp
gain_handler.cpp
load_modules.cpp
- simple_device.cpp
- tune_helper.cpp
types.cpp
wax.cpp
transport/if_addrs.cpp
@@ -32,7 +30,9 @@ SET(libuhd_sources
usrp/dboard/db_basic_and_lf.cpp
usrp/dboard_base.cpp
usrp/dboard_interface.cpp
+ usrp/simple_usrp.cpp
usrp/dboard_manager.cpp
+ usrp/tune_helper.cpp
usrp/usrp2/dboard_impl.cpp
usrp/usrp2/dboard_interface.cpp
usrp/usrp2/dsp_impl.cpp
diff --git a/host/lib/simple_device.cpp b/host/lib/usrp/simple_usrp.cpp
index 801516353..4bd47dc3f 100644
--- a/host/lib/simple_device.cpp
+++ b/host/lib/usrp/simple_usrp.cpp
@@ -15,8 +15,8 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
-#include <uhd/simple_device.hpp>
-#include <uhd/utils/tune_helper.hpp>
+#include <uhd/usrp/simple_usrp.hpp>
+#include <uhd/usrp/tune_helper.hpp>
#include <uhd/utils/assert.hpp>
#include <uhd/usrp/subdev_props.hpp>
#include <uhd/usrp/mboard_props.hpp>
@@ -43,9 +43,9 @@ static std::vector<double> get_xx_rates(wax::obj decerps, wax::obj rate){
/***********************************************************************
* Simple Device Implementation
**********************************************************************/
-class simple_device_impl : public simple_device{
+class simple_usrp_impl : public simple_usrp{
public:
- simple_device_impl(const device_addr_t &addr){
+ simple_usrp_impl(const device_addr_t &addr){
_dev = device::make(addr);
_mboard = (*_dev)[DEVICE_PROP_MBOARD];
_rx_ddc = _mboard[named_prop_t(MBOARD_PROP_RX_DSP, "ddc0")];
@@ -62,7 +62,7 @@ public:
_tx_subdev = tx_dboard[named_prop_t(DBOARD_PROP_SUBDEV, tx_subdev_in_use)];
}
- ~simple_device_impl(void){
+ ~simple_usrp_impl(void){
/* NOP */
}
@@ -202,6 +202,6 @@ private:
/***********************************************************************
* The Make Function
**********************************************************************/
-simple_device::sptr simple_device::make(const std::string &args){
- return sptr(new simple_device_impl(device_addr_t::from_args_str(args)));
+simple_usrp::sptr simple_usrp::make(const std::string &args){
+ return sptr(new simple_usrp_impl(device_addr_t::from_args_str(args)));
}
diff --git a/host/lib/tune_helper.cpp b/host/lib/usrp/tune_helper.cpp
index 381685578..79a6aff7b 100644
--- a/host/lib/tune_helper.cpp
+++ b/host/lib/usrp/tune_helper.cpp
@@ -15,7 +15,7 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
-#include <uhd/utils/tune_helper.hpp>
+#include <uhd/usrp/tune_helper.hpp>
#include <uhd/utils/algorithm.hpp>
#include <uhd/usrp/subdev_props.hpp>
#include <cmath>
@@ -82,7 +82,7 @@ static tune_result_t tune_xx_subdev_and_dxc(
/***********************************************************************
* RX Tune
**********************************************************************/
-tune_result_t uhd::tune_rx_subdev_and_ddc(
+tune_result_t uhd::usrp::tune_rx_subdev_and_ddc(
wax::obj subdev, wax::obj ddc,
double target_freq, double lo_offset
){
@@ -90,7 +90,7 @@ tune_result_t uhd::tune_rx_subdev_and_ddc(
return tune_xx_subdev_and_dxc(is_tx, subdev, ddc, target_freq, lo_offset);
}
-tune_result_t uhd::tune_rx_subdev_and_ddc(
+tune_result_t uhd::usrp::tune_rx_subdev_and_ddc(
wax::obj subdev, wax::obj ddc,
double target_freq
){
@@ -105,7 +105,7 @@ tune_result_t uhd::tune_rx_subdev_and_ddc(
/***********************************************************************
* TX Tune
**********************************************************************/
-tune_result_t uhd::tune_tx_subdev_and_duc(
+tune_result_t uhd::usrp::tune_tx_subdev_and_duc(
wax::obj subdev, wax::obj duc,
double target_freq, double lo_offset
){
@@ -113,7 +113,7 @@ tune_result_t uhd::tune_tx_subdev_and_duc(
return tune_xx_subdev_and_dxc(is_tx, subdev, duc, target_freq, lo_offset);
}
-tune_result_t uhd::tune_tx_subdev_and_duc(
+tune_result_t uhd::usrp::tune_tx_subdev_and_duc(
wax::obj subdev, wax::obj duc,
double target_freq
){