aboutsummaryrefslogtreecommitdiffstats
path: root/host
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2019-06-20 16:38:06 -0700
committerMartin Braun <martin.braun@ettus.com>2019-11-26 11:49:19 -0800
commit6f3c201a802079a3d565c5f14e1222743097b459 (patch)
treea92235fdeb13ba633f29ab7a96335bed6bc2ed0e /host
parent110527f96b8c83de47d25cdf14474e7eeba5fedb (diff)
downloaduhd-6f3c201a802079a3d565c5f14e1222743097b459.tar.gz
uhd-6f3c201a802079a3d565c5f14e1222743097b459.tar.bz2
uhd-6f3c201a802079a3d565c5f14e1222743097b459.zip
uhdlib: transport: Add links.hpp
This contains both_links_t
Diffstat (limited to 'host')
-rw-r--r--host/lib/include/uhdlib/transport/links.hpp43
1 files changed, 43 insertions, 0 deletions
diff --git a/host/lib/include/uhdlib/transport/links.hpp b/host/lib/include/uhdlib/transport/links.hpp
new file mode 100644
index 000000000..64673f02f
--- /dev/null
+++ b/host/lib/include/uhdlib/transport/links.hpp
@@ -0,0 +1,43 @@
+//
+// Copyright 2019 Ettus Research, a National Instruments Brand
+//
+// SPDX-License-Identifier: GPL-3.0-or-later
+//
+
+#ifndef INCLUDED_UHDLIB_TRANSPORT_LINKS_HPP
+#define INCLUDED_UHDLIB_TRANSPORT_LINKS_HPP
+
+#include <uhdlib/transport/io_service.hpp>
+#include <uhdlib/transport/link_if.hpp>
+#include <tuple>
+
+namespace uhd { namespace transport {
+
+enum class link_type_t { CTRL = 0, ASYNC_MSG, TX_DATA, RX_DATA };
+
+//! Contains all information regarding a link interface
+using both_links_t = std::tuple<uhd::transport::io_service::sptr,
+ uhd::transport::send_link_if::sptr,
+ size_t, // num_send_frames
+ uhd::transport::recv_link_if::sptr,
+ size_t, // num_recv_frames
+ bool>; // lossy_xport
+
+/*!
+ * Parameters for link creation.
+ */
+struct link_params_t
+{
+ size_t recv_frame_size = 0;
+ size_t send_frame_size = 0;
+ size_t num_recv_frames = 0;
+ size_t num_send_frames = 0;
+ size_t recv_buff_size = 0;
+ size_t send_buff_size = 0;
+};
+
+
+}} // namespace uhd::transport
+
+#endif /* INCLUDED_UHDLIB_TRANSPORT_LINKS_HPP */
+