summaryrefslogtreecommitdiffstats
path: root/host/include
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2010-04-01 15:08:52 -0700
committerJosh Blum <josh@joshknows.com>2010-04-01 15:08:52 -0700
commit91ef18021c0f0f5fe8ff7705e23b5f1a6b25162f (patch)
tree99489ac15e0ae262f2c0bb9a477a08c6282f47b6 /host/include
parent792fad3afca0eb45fdc3eb27b5d1678c507d4724 (diff)
downloaduhd-91ef18021c0f0f5fe8ff7705e23b5f1a6b25162f.tar.gz
uhd-91ef18021c0f0f5fe8ff7705e23b5f1a6b25162f.tar.bz2
uhd-91ef18021c0f0f5fe8ff7705e23b5f1a6b25162f.zip
moved props into usrp and multiple hpp files
Diffstat (limited to 'host/include')
-rw-r--r--host/include/uhd/CMakeLists.txt1
-rw-r--r--host/include/uhd/props.hpp145
-rw-r--r--host/include/uhd/usrp/CMakeLists.txt10
-rw-r--r--host/include/uhd/usrp/dboard_interface.hpp8
-rw-r--r--host/include/uhd/usrp/dboard_manager.hpp2
-rw-r--r--host/include/uhd/usrp/dboard_props.hpp38
-rw-r--r--host/include/uhd/usrp/device_props.hpp57
-rw-r--r--host/include/uhd/usrp/dsp_props.hpp40
-rw-r--r--host/include/uhd/usrp/mboard_props.hpp50
-rw-r--r--host/include/uhd/usrp/subdev_props.hpp49
-rw-r--r--host/include/uhd/utils/CMakeLists.txt1
-rw-r--r--host/include/uhd/utils/props.hpp48
12 files changed, 298 insertions, 151 deletions
diff --git a/host/include/uhd/CMakeLists.txt b/host/include/uhd/CMakeLists.txt
index b364f78cd..1c5202caa 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
- props.hpp
simple_device.hpp
wax.hpp
DESTINATION ${INCLUDE_DIR}/uhd
diff --git a/host/include/uhd/props.hpp b/host/include/uhd/props.hpp
deleted file mode 100644
index 01746f853..000000000
--- a/host/include/uhd/props.hpp
+++ /dev/null
@@ -1,145 +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/>.
-//
-
-#ifndef INCLUDED_UHD_PROPS_HPP
-#define INCLUDED_UHD_PROPS_HPP
-
-#include <uhd/config.hpp>
-#include <uhd/wax.hpp>
-#include <boost/tuple/tuple.hpp>
-#include <vector>
-#include <string>
-
-namespace uhd{
-
- //typedef for handling named properties
- typedef std::vector<std::string> prop_names_t;
- typedef boost::tuple<wax::obj, std::string> named_prop_t;
-
- /*!
- * Utility function to separate a named property into its components.
- * \param key a reference to the prop object
- * \param name a reference to the name object
- */
- inline UHD_API named_prop_t //must be exported as part of the api to work (TODO move guts to cpp file)
- extract_named_prop(const wax::obj &key, const std::string &name = ""){
- if (key.type() == typeid(named_prop_t)){
- return key.as<named_prop_t>();
- }
- return named_prop_t(key, name);
- }
-
- /*!
- * Possible device properties:
- * In general, a device will have a single mboard.
- * In certain mimo applications, multiple boards
- * will be present in the interface for configuration.
- */
- enum device_prop_t{
- DEVICE_PROP_NAME, //ro, std::string
- DEVICE_PROP_MBOARD, //ro, wax::obj
- DEVICE_PROP_MBOARD_NAMES, //ro, prop_names_t
- DEVICE_PROP_MAX_RX_SAMPLES, //ro, size_t
- DEVICE_PROP_MAX_TX_SAMPLES //ro, size_t
- };
-
- /*!
- * Possible device mboard properties:
- * The general mboard properties are listed below.
- * Custom properties can be identified with a string
- * and discovered though the others property.
- */
- enum mboard_prop_t{
- MBOARD_PROP_NAME, //ro, std::string
- MBOARD_PROP_OTHERS, //ro, prop_names_t
- MBOARD_PROP_CLOCK_RATE, //ro, freq_t
- MBOARD_PROP_RX_DSP, //ro, wax::obj
- MBOARD_PROP_RX_DSP_NAMES, //ro, prop_names_t
- MBOARD_PROP_TX_DSP, //ro, wax::obj
- MBOARD_PROP_TX_DSP_NAMES, //ro, prop_names_t
- MBOARD_PROP_RX_DBOARD, //ro, wax::obj
- MBOARD_PROP_RX_DBOARD_NAMES, //ro, prop_names_t
- MBOARD_PROP_TX_DBOARD, //ro, wax::obj
- MBOARD_PROP_TX_DBOARD_NAMES, //ro, prop_names_t
- MBOARD_PROP_CLOCK_CONFIG, //rw, clock_config_t
- MBOARD_PROP_TIME_NOW, //wo, time_spec_t
- MBOARD_PROP_TIME_NEXT_PPS //wo, time_spec_t
- };
-
- /*!
- * Possible device dsp properties:
- * A dsp can have a wide range of possible properties.
- * A ddc would have a properties "decim", "freq", "taps"...
- * Other properties could be gains, complex scalars, enables...
- * For this reason the only required properties of a dsp is a name
- * and a property to get list of other possible properties.
- */
- enum dsp_prop_t{
- DSP_PROP_NAME, //ro, std::string
- DSP_PROP_OTHERS //ro, prop_names_t
- };
-
- /*!
- * Possible device dboard properties
- */
- enum dboard_prop_t{
- DBOARD_PROP_NAME, //ro, std::string
- DBOARD_PROP_SUBDEV, //ro, wax::obj
- DBOARD_PROP_SUBDEV_NAMES, //ro, prop_names_t
- DBOARD_PROP_USED_SUBDEVS //ro, prop_names_t
- //DBOARD_PROP_CODEC //ro, wax::obj //----> not sure, dont have to deal with yet
- };
-
- /*! ------ not dealing with yet, commented out ------------
- * Possible device codec properties:
- * A codec is expected to have a rate and gain elements.
- * Other properties can be discovered through the others prop.
- */
- /*enum codec_prop_t{
- CODEC_PROP_NAME, //ro, std::string
- CODEC_PROP_OTHERS, //ro, prop_names_t
- CODEC_PROP_GAIN, //rw, gain_t
- CODEC_PROP_GAIN_RANGE, //ro, gain_range_t
- CODEC_PROP_GAIN_NAMES, //ro, prop_names_t
- //CODEC_PROP_CLOCK_RATE //ro, freq_t //----> not sure we care to know
- };*/
-
- /*!
- * Possible device subdev properties
- */
- enum subdev_prop_t{
- SUBDEV_PROP_NAME, //ro, std::string
- SUBDEV_PROP_OTHERS, //ro, prop_names_t
- SUBDEV_PROP_GAIN, //rw, gain_t
- SUBDEV_PROP_GAIN_RANGE, //ro, gain_range_t
- SUBDEV_PROP_GAIN_NAMES, //ro, prop_names_t
- SUBDEV_PROP_FREQ, //rw, freq_t
- SUBDEV_PROP_FREQ_RANGE, //ro, freq_range_t
- SUBDEV_PROP_ANTENNA, //rw, std::string
- SUBDEV_PROP_ANTENNA_NAMES, //ro, prop_names_t
- SUBDEV_PROP_ENABLED, //rw, bool
- SUBDEV_PROP_QUADRATURE, //ro, bool
- SUBDEV_PROP_IQ_SWAPPED, //ro, bool
- SUBDEV_PROP_SPECTRUM_INVERTED, //ro, bool
- SUBDEV_PROP_LO_INTERFERES //ro, bool
- //SUBDEV_PROP_RSSI, //ro, gain_t //----> not on all boards, use named prop
- //SUBDEV_PROP_BANDWIDTH //rw, freq_t //----> not on all boards, use named prop
- };
-
-} //namespace uhd
-
-#endif /* INCLUDED_UHD_PROPS_HPP */
diff --git a/host/include/uhd/usrp/CMakeLists.txt b/host/include/uhd/usrp/CMakeLists.txt
index bab01fdeb..d0f385f13 100644
--- a/host/include/uhd/usrp/CMakeLists.txt
+++ b/host/include/uhd/usrp/CMakeLists.txt
@@ -17,10 +17,20 @@
INSTALL(FILES
+ #### props headers ###
+ dboard_props.hpp
+ device_props.hpp
+ dsp_props.hpp
+ mboard_props.hpp
+ subdev_props.hpp
+
+ #### dboard headers ###
dboard_base.hpp
dboard_id.hpp
dboard_interface.hpp
dboard_manager.hpp
+
+ ### usrp headers ###
usrp1e.hpp
usrp2.hpp
DESTINATION ${INCLUDE_DIR}/uhd/usrp
diff --git a/host/include/uhd/usrp/dboard_interface.hpp b/host/include/uhd/usrp/dboard_interface.hpp
index 8ff0c5d2f..b3bab131d 100644
--- a/host/include/uhd/usrp/dboard_interface.hpp
+++ b/host/include/uhd/usrp/dboard_interface.hpp
@@ -62,10 +62,10 @@ public:
//possible atr registers
enum atr_reg_t{
- ATR_REG_IDLE = 'i',
- ATR_REG_TXONLY = 't',
- ATR_REG_RXONLY = 'r',
- ATR_REG_BOTH = 'b'
+ ATR_REG_IDLE = 'i',
+ ATR_REG_TX_ONLY = 't',
+ ATR_REG_RX_ONLY = 'r',
+ ATR_REG_FULL_DUPLEX = 'f'
};
//structors
diff --git a/host/include/uhd/usrp/dboard_manager.hpp b/host/include/uhd/usrp/dboard_manager.hpp
index c7c091220..ed8ee73ef 100644
--- a/host/include/uhd/usrp/dboard_manager.hpp
+++ b/host/include/uhd/usrp/dboard_manager.hpp
@@ -19,7 +19,7 @@
#define INCLUDED_UHD_USRP_DBOARD_MANAGER_HPP
#include <uhd/config.hpp>
-#include <uhd/props.hpp>
+#include <uhd/utils/props.hpp>
#include <uhd/usrp/dboard_base.hpp>
#include <uhd/usrp/dboard_id.hpp>
#include <boost/utility.hpp>
diff --git a/host/include/uhd/usrp/dboard_props.hpp b/host/include/uhd/usrp/dboard_props.hpp
new file mode 100644
index 000000000..08c4eef6a
--- /dev/null
+++ b/host/include/uhd/usrp/dboard_props.hpp
@@ -0,0 +1,38 @@
+//
+// 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/>.
+//
+
+#ifndef INCLUDED_UHD_USRP_DBOARD_PROPS_HPP
+#define INCLUDED_UHD_USRP_DBOARD_PROPS_HPP
+
+#include <uhd/utils/props.hpp>
+
+namespace uhd{ namespace usrp{
+
+ /*!
+ * Possible device dboard properties
+ */
+ enum dboard_prop_t{
+ DBOARD_PROP_NAME, //ro, std::string
+ DBOARD_PROP_SUBDEV, //ro, wax::obj
+ DBOARD_PROP_SUBDEV_NAMES, //ro, prop_names_t
+ DBOARD_PROP_USED_SUBDEVS //ro, prop_names_t
+ //DBOARD_PROP_CODEC //ro, wax::obj //----> not sure, dont have to deal with yet
+ };
+
+}} //namespace
+
+#endif /* INCLUDED_UHD_USRP_DBOARD_PROPS_HPP */
diff --git a/host/include/uhd/usrp/device_props.hpp b/host/include/uhd/usrp/device_props.hpp
new file mode 100644
index 000000000..dcfa26240
--- /dev/null
+++ b/host/include/uhd/usrp/device_props.hpp
@@ -0,0 +1,57 @@
+//
+// 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/>.
+//
+
+#ifndef INCLUDED_UHD_USRP_DEVICE_PROPS_HPP
+#define INCLUDED_UHD_USRP_DEVICE_PROPS_HPP
+
+#include <uhd/utils/props.hpp>
+
+namespace uhd{ namespace usrp{
+
+ /*!
+ * Possible device properties:
+ * In general, a device will have a single mboard.
+ * In certain mimo applications, multiple boards
+ * will be present in the interface for configuration.
+ */
+ enum device_prop_t{
+ DEVICE_PROP_NAME, //ro, std::string
+ DEVICE_PROP_MBOARD, //ro, wax::obj
+ DEVICE_PROP_MBOARD_NAMES, //ro, prop_names_t
+ DEVICE_PROP_MAX_RX_SAMPLES, //ro, size_t
+ DEVICE_PROP_MAX_TX_SAMPLES //ro, size_t
+ };
+
+ ////////////////////////////////////////////////////////////////////////
+ /*! ------ not dealing with yet, commented out ------------
+ * Possible device codec properties:
+ * A codec is expected to have a rate and gain elements.
+ * Other properties can be discovered through the others prop.
+ */
+ /*enum codec_prop_t{
+ CODEC_PROP_NAME, //ro, std::string
+ CODEC_PROP_OTHERS, //ro, prop_names_t
+ CODEC_PROP_GAIN, //rw, gain_t
+ CODEC_PROP_GAIN_RANGE, //ro, gain_range_t
+ CODEC_PROP_GAIN_NAMES, //ro, prop_names_t
+ //CODEC_PROP_CLOCK_RATE //ro, freq_t //----> not sure we care to know
+ };*/
+
+
+}} //namespace
+
+#endif /* INCLUDED_UHD_USRP_DEVICE_PROPS_HPP */
diff --git a/host/include/uhd/usrp/dsp_props.hpp b/host/include/uhd/usrp/dsp_props.hpp
new file mode 100644
index 000000000..ef3f771df
--- /dev/null
+++ b/host/include/uhd/usrp/dsp_props.hpp
@@ -0,0 +1,40 @@
+//
+// 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/>.
+//
+
+#ifndef INCLUDED_UHD_USRP_DSP_PROPS_HPP
+#define INCLUDED_UHD_USRP_DSP_PROPS_HPP
+
+#include <uhd/utils/props.hpp>
+
+namespace uhd{ namespace usrp{
+
+ /*!
+ * Possible device dsp properties:
+ * A dsp can have a wide range of possible properties.
+ * A ddc would have a properties "decim", "freq", "taps"...
+ * Other properties could be gains, complex scalars, enables...
+ * For this reason the only required properties of a dsp is a name
+ * and a property to get list of other possible properties.
+ */
+ enum dsp_prop_t{
+ DSP_PROP_NAME, //ro, std::string
+ DSP_PROP_OTHERS //ro, prop_names_t
+ };
+
+}} //namespace
+
+#endif /* INCLUDED_UHD_USRP_DSP_PROPS_HPP */
diff --git a/host/include/uhd/usrp/mboard_props.hpp b/host/include/uhd/usrp/mboard_props.hpp
new file mode 100644
index 000000000..ddb95ef0d
--- /dev/null
+++ b/host/include/uhd/usrp/mboard_props.hpp
@@ -0,0 +1,50 @@
+//
+// 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/>.
+//
+
+#ifndef INCLUDED_UHD_USRP_MBOARD_PROPS_HPP
+#define INCLUDED_UHD_USRP_MBOARD_PROPS_HPP
+
+#include <uhd/utils/props.hpp>
+
+namespace uhd{ namespace usrp{
+
+ /*!
+ * Possible device mboard properties:
+ * The general mboard properties are listed below.
+ * Custom properties can be identified with a string
+ * and discovered though the others property.
+ */
+ enum mboard_prop_t{
+ MBOARD_PROP_NAME, //ro, std::string
+ MBOARD_PROP_OTHERS, //ro, prop_names_t
+ MBOARD_PROP_CLOCK_RATE, //ro, double
+ MBOARD_PROP_RX_DSP, //ro, wax::obj
+ MBOARD_PROP_RX_DSP_NAMES, //ro, prop_names_t
+ MBOARD_PROP_TX_DSP, //ro, wax::obj
+ MBOARD_PROP_TX_DSP_NAMES, //ro, prop_names_t
+ MBOARD_PROP_RX_DBOARD, //ro, wax::obj
+ MBOARD_PROP_RX_DBOARD_NAMES, //ro, prop_names_t
+ MBOARD_PROP_TX_DBOARD, //ro, wax::obj
+ MBOARD_PROP_TX_DBOARD_NAMES, //ro, prop_names_t
+ MBOARD_PROP_CLOCK_CONFIG, //rw, clock_config_t
+ MBOARD_PROP_TIME_NOW, //wo, time_spec_t
+ MBOARD_PROP_TIME_NEXT_PPS //wo, time_spec_t
+ };
+
+}} //namespace
+
+#endif /* INCLUDED_UHD_USRP_MBOARD_PROPS_HPP */
diff --git a/host/include/uhd/usrp/subdev_props.hpp b/host/include/uhd/usrp/subdev_props.hpp
new file mode 100644
index 000000000..667f34f9c
--- /dev/null
+++ b/host/include/uhd/usrp/subdev_props.hpp
@@ -0,0 +1,49 @@
+//
+// 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/>.
+//
+
+#ifndef INCLUDED_UHD_USRP_SUBDEV_PROPS_HPP
+#define INCLUDED_UHD_USRP_SUBDEV_PROPS_HPP
+
+#include <uhd/utils/props.hpp>
+
+namespace uhd{ namespace usrp{
+
+ /*!
+ * Possible device subdev properties
+ */
+ enum subdev_prop_t{
+ SUBDEV_PROP_NAME, //ro, std::string
+ SUBDEV_PROP_OTHERS, //ro, prop_names_t
+ SUBDEV_PROP_GAIN, //rw, float
+ SUBDEV_PROP_GAIN_RANGE, //ro, gain_range_t
+ SUBDEV_PROP_GAIN_NAMES, //ro, prop_names_t
+ SUBDEV_PROP_FREQ, //rw, double
+ SUBDEV_PROP_FREQ_RANGE, //ro, freq_range_t
+ SUBDEV_PROP_ANTENNA, //rw, std::string
+ SUBDEV_PROP_ANTENNA_NAMES, //ro, prop_names_t
+ SUBDEV_PROP_ENABLED, //rw, bool
+ SUBDEV_PROP_QUADRATURE, //ro, bool
+ SUBDEV_PROP_IQ_SWAPPED, //ro, bool
+ SUBDEV_PROP_SPECTRUM_INVERTED, //ro, bool
+ SUBDEV_PROP_LO_INTERFERES //ro, bool
+ //SUBDEV_PROP_RSSI, //ro, float //----> not on all boards, use named prop
+ //SUBDEV_PROP_BANDWIDTH //rw, double //----> not on all boards, use named prop
+ };
+
+}} //namespace
+
+#endif /* INCLUDED_UHD_USRP_SUBDEV_PROPS_HPP */
diff --git a/host/include/uhd/utils/CMakeLists.txt b/host/include/uhd/utils/CMakeLists.txt
index 1b673f44a..2bb72e31d 100644
--- a/host/include/uhd/utils/CMakeLists.txt
+++ b/host/include/uhd/utils/CMakeLists.txt
@@ -19,6 +19,7 @@ INSTALL(FILES
algorithm.hpp
assert.hpp
gain_handler.hpp
+ props.hpp
safe_main.hpp
static.hpp
tune_helper.hpp
diff --git a/host/include/uhd/utils/props.hpp b/host/include/uhd/utils/props.hpp
new file mode 100644
index 000000000..fdbc17d1c
--- /dev/null
+++ b/host/include/uhd/utils/props.hpp
@@ -0,0 +1,48 @@
+//
+// 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/>.
+//
+
+#ifndef INCLUDED_UHD_USRP_PROPS_COMMON_HPP
+#define INCLUDED_UHD_USRP_PROPS_COMMON_HPP
+
+#include <uhd/config.hpp>
+#include <uhd/wax.hpp>
+#include <boost/tuple/tuple.hpp>
+#include <vector>
+#include <string>
+
+namespace uhd{
+
+ //typedef for handling named properties
+ typedef std::vector<std::string> prop_names_t;
+ typedef boost::tuple<wax::obj, std::string> named_prop_t;
+
+ /*!
+ * Utility function to separate a named property into its components.
+ * \param key a reference to the prop object
+ * \param name a reference to the name object
+ */
+ inline UHD_API named_prop_t //must be exported as part of the api to work (TODO move guts to cpp file)
+ extract_named_prop(const wax::obj &key, const std::string &name = ""){
+ if (key.type() == typeid(named_prop_t)){
+ return key.as<named_prop_t>();
+ }
+ return named_prop_t(key, name);
+ }
+
+} //namespace uhd
+
+#endif /* INCLUDED_UHD_USRP_PROPS_COMMON_HPP */