USRP Hardware Driver and USRP Manual  Version: 3.15.0.HEAD-0-gaea0e2de
UHD and USRP Manual
sink_node_ctrl.hpp
Go to the documentation of this file.
1 //
2 // Copyright 2014-2016 Ettus Research LLC
3 // Copyright 2018 Ettus Research, a National Instruments Company
4 //
5 // SPDX-License-Identifier: GPL-3.0-or-later
6 //
7 
8 #ifndef INCLUDED_LIBUHD_SINK_NODE_CTRL_BASE_HPP
9 #define INCLUDED_LIBUHD_SINK_NODE_CTRL_BASE_HPP
10 
11 #include <uhd/rfnoc/constants.hpp>
14 #include <boost/thread.hpp>
15 
16 namespace uhd { namespace rfnoc {
17 
23 class sink_node_ctrl : virtual public node_ctrl_base
24 {
25 public:
26  /***********************************************************************
27  * Types
28  **********************************************************************/
29  typedef boost::shared_ptr<sink_node_ctrl> sptr;
30  typedef std::map<size_t, boost::weak_ptr<sink_node_ctrl> > node_map_t;
31  typedef std::pair<size_t, boost::weak_ptr<sink_node_ctrl> > node_map_pair_t;
32 
33  /***********************************************************************
34  * Sink block controls
35  **********************************************************************/
50  size_t connect_upstream(node_ctrl_base::sptr upstream_node,
51  size_t port = ANY_PORT,
52  const uhd::device_addr_t& args = uhd::device_addr_t());
53 
60  virtual void set_tx_streamer(bool active, const size_t port);
61 
62 
63 protected:
92  virtual size_t _request_input_port(
93  const size_t suggested_port, const uhd::device_addr_t& args) const;
94 
95 private:
98  boost::mutex _input_mutex;
99 
111  void _register_upstream_node(node_ctrl_base::sptr upstream_node, size_t port);
112 
113 }; /* class sink_node_ctrl */
114 
115 }} /* namespace uhd::rfnoc */
116 
117 #endif /* INCLUDED_LIBUHD_SINK_NODE_CTRL_BASE_HPP */
boost::shared_ptr< sink_node_ctrl > sptr
Definition: sink_node_ctrl.hpp:29
std::pair< size_t, boost::weak_ptr< sink_node_ctrl > > node_map_pair_t
Definition: sink_node_ctrl.hpp:31
size_t connect_upstream(node_ctrl_base::sptr upstream_node, size_t port=ANY_PORT, const uhd::device_addr_t &args=uhd::device_addr_t())
std::map< size_t, boost::weak_ptr< sink_node_ctrl > > node_map_t
Definition: sink_node_ctrl.hpp:30
Definition: build_info.hpp:13
virtual void set_tx_streamer(bool active, const size_t port)
virtual size_t _request_input_port(const size_t suggested_port, const uhd::device_addr_t &args) const
boost::shared_ptr< node_ctrl_base > sptr
Definition: node_ctrl_base.hpp:44
#define UHD_RFNOC_API
Definition: config.hpp:117
Definition: sink_node_ctrl.hpp:23
Definition: device_addr.hpp:38
Definition: node_ctrl_base.hpp:37