aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/include/uhdlib/usrp
diff options
context:
space:
mode:
authorCiro Nishiguchi <ciro.nishiguchi@ni.com>2019-10-23 17:12:03 -0500
committerMartin Braun <martin.braun@ettus.com>2019-11-26 12:21:32 -0800
commit7b95cbd7fd2cb0a1aac1ccaea06d417480bf86a0 (patch)
tree2cca455c0cd3b391a7b5209c77411cd70b5fce7e /host/lib/include/uhdlib/usrp
parenta801d6b046743140e9a50c7788dd17dd71f5540a (diff)
downloaduhd-7b95cbd7fd2cb0a1aac1ccaea06d417480bf86a0.tar.gz
uhd-7b95cbd7fd2cb0a1aac1ccaea06d417480bf86a0.tar.bz2
uhd-7b95cbd7fd2cb0a1aac1ccaea06d417480bf86a0.zip
rfnoc: Merge I/O service device args with stream args
This makes it possible for users to put I/O service-related args in either the device args or stream args.
Diffstat (limited to 'host/lib/include/uhdlib/usrp')
-rw-r--r--host/lib/include/uhdlib/usrp/common/io_service_args.hpp13
-rw-r--r--host/lib/include/uhdlib/usrp/common/io_service_mgr.hpp8
2 files changed, 18 insertions, 3 deletions
diff --git a/host/lib/include/uhdlib/usrp/common/io_service_args.hpp b/host/lib/include/uhdlib/usrp/common/io_service_args.hpp
index a783cc825..a8e46d8c3 100644
--- a/host/lib/include/uhdlib/usrp/common/io_service_args.hpp
+++ b/host/lib/include/uhdlib/usrp/common/io_service_args.hpp
@@ -88,6 +88,19 @@ struct io_service_args_t
io_service_args_t read_io_service_args(
const device_addr_t& args, const io_service_args_t& defaults);
+/*! Merges device_args with stream_args
+ *
+ * Copies args related to I/O services from device args to stream args, and
+ * returns the merged result. If the same arg is specified in device_args and
+ * stream args, the value in stream_args is returned.
+ *
+ * \param args The device args provided when the graph is created
+ * \param args The stream args provided when a streamer is created
+ * \return The merged device args
+ */
+device_addr_t merge_io_service_dev_args(
+ const device_addr_t& dev_args, const device_addr_t& stream_args);
+
}} // namespace uhd::usrp
#endif /* INCLUDED_LIBUHD_IO_SERVICE_ARGS_HPP */
diff --git a/host/lib/include/uhdlib/usrp/common/io_service_mgr.hpp b/host/lib/include/uhdlib/usrp/common/io_service_mgr.hpp
index 1093f7bec..2707c564c 100644
--- a/host/lib/include/uhdlib/usrp/common/io_service_mgr.hpp
+++ b/host/lib/include/uhdlib/usrp/common/io_service_mgr.hpp
@@ -72,7 +72,8 @@ public:
* \param recv_link The recv link to connect to an I/O service
* \param send_link The send link to connect to an I/O service
* \param link_type The type of transport in which the links will be used
- * \param io_srv_args The user-requested options for the stream
+ * \param io_srv_args The default stream args for the device
+ * \param stream_args The user-provided stream args
* \param streamer_id A unique ID for the streamer that will use the links
* \return The I/O service to which the links are connected
*/
@@ -80,8 +81,9 @@ public:
transport::recv_link_if::sptr recv_link,
transport::send_link_if::sptr send_link,
const transport::link_type_t link_type,
- const io_service_args_t& io_srv_args = io_service_args_t(),
- const std::string& streamer_id = "") = 0;
+ const io_service_args_t& default_args = io_service_args_t(),
+ const uhd::device_addr_t& stream_args = uhd::device_addr_t(),
+ const std::string& streamer_id = "") = 0;
/*! Disconnects links from their I/O service
*