aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/include/uhdlib/rfnoc/graph_impl.hpp
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2018-01-31 20:20:14 +0100
committerMartin Braun <martin.braun@ettus.com>2018-03-14 15:17:44 -0700
commit6652eb4a033b38bd952563f3544eb11e98f27327 (patch)
treec1b0af72cbaceaa1df462f18194f4063fb13ae17 /host/lib/include/uhdlib/rfnoc/graph_impl.hpp
parent86b95486ed6d68e2772d79f20feddbef5439981b (diff)
downloaduhd-6652eb4a033b38bd952563f3544eb11e98f27327.tar.gz
uhd-6652eb4a033b38bd952563f3544eb11e98f27327.tar.bz2
uhd-6652eb4a033b38bd952563f3544eb11e98f27327.zip
uhd: Move internal headers to uhdlib/
To avoid the proliferation of additional include directories and multiple ways of including project-local headers, we now default to moving all headers that are used across UHD into the uhdlib/ subdirectory. Some #include statements were also reordered as they were modified for closer compliance with the coding guidelines. Internal cpp source files should now include files like this: #include <uhdlib/rfnoc/ctrl_iface.hpp> Reviewed-by: Ashish Chaudhari <ashish.chaudhari@ettus.com>
Diffstat (limited to 'host/lib/include/uhdlib/rfnoc/graph_impl.hpp')
-rw-r--r--host/lib/include/uhdlib/rfnoc/graph_impl.hpp80
1 files changed, 80 insertions, 0 deletions
diff --git a/host/lib/include/uhdlib/rfnoc/graph_impl.hpp b/host/lib/include/uhdlib/rfnoc/graph_impl.hpp
new file mode 100644
index 000000000..182befbf4
--- /dev/null
+++ b/host/lib/include/uhdlib/rfnoc/graph_impl.hpp
@@ -0,0 +1,80 @@
+//
+// Copyright 2016 Ettus Research LLC
+// Copyright 2018 Ettus Research, a National Instruments Company
+//
+// SPDX-License-Identifier: GPL-3.0-or-later
+//
+
+#ifndef INCLUDED_LIBUHD_RFNOC_GRAPH_IMPL_HPP
+#define INCLUDED_LIBUHD_RFNOC_GRAPH_IMPL_HPP
+
+#include <uhd/rfnoc/graph.hpp>
+#include <uhd/device3.hpp>
+
+namespace uhd { namespace rfnoc {
+
+class graph_impl : public graph
+{
+public:
+ /*!
+ * \param name An optional name to describe this graph
+ * \param device_ptr Weak pointer to the originating device3
+ * \param msg_handler Pointer to the async message handler
+ */
+ graph_impl(
+ const std::string &name,
+ boost::weak_ptr<uhd::device3> device_ptr
+ //async_msg_handler::sptr msg_handler
+ );
+ virtual ~graph_impl() {};
+
+ /************************************************************************
+ * Connection API
+ ***********************************************************************/
+ void connect(
+ const block_id_t &src_block,
+ size_t src_block_port,
+ const block_id_t &dst_block,
+ size_t dst_block_port,
+ const size_t pkt_size = 0
+ );
+
+ void connect(
+ const block_id_t &src_block,
+ const block_id_t &dst_block
+ );
+
+ void connect_src(
+ const block_id_t &src_block,
+ const size_t src_block_port,
+ const uhd::sid_t dst_sid,
+ const size_t buf_size_dst_bytes,
+ const size_t pkt_size_
+ );
+
+ void connect_sink(
+ const block_id_t &sink_block,
+ const size_t dst_block_port,
+ const size_t pkts_per_ack
+ );
+
+ /************************************************************************
+ * Utilities
+ ***********************************************************************/
+ std::string get_name() const { return _name; }
+
+
+private:
+
+ //! Optional: A string to describe this graph
+ const std::string _name;
+
+ //! Reference to the generating device object
+ const boost::weak_ptr<uhd::device3> _device_ptr;
+
+};
+
+}} /* namespace uhd::rfnoc */
+
+#endif /* INCLUDED_LIBUHD_RFNOC_GRAPH_IMPL_HPP */
+// vim: sw=4 et: