USRP Hardware Driver and USRP Manual  Version: 3.15.0.HEAD-0-g6563c537
UHD and USRP Manual
source_block_ctrl_base.hpp
Go to the documentation of this file.
1 //
2 // Copyright 2014 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_RX_BLOCK_CTRL_BASE_HPP
9 #define INCLUDED_LIBUHD_RX_BLOCK_CTRL_BASE_HPP
10 
13 
14 namespace uhd { namespace rfnoc {
15 
24 class source_block_ctrl_base : virtual public block_ctrl_base,
25  virtual public source_node_ctrl
26 {
27 public:
28  typedef boost::shared_ptr<source_block_ctrl_base> sptr;
29 
30  /***********************************************************************
31  * Streaming operations
32  **********************************************************************/
56  virtual void issue_stream_cmd(
57  const uhd::stream_cmd_t& stream_cmd, const size_t chan = 0);
58 
59  /***********************************************************************
60  * Stream signatures
61  **********************************************************************/
72  stream_sig_t get_output_signature(size_t block_port = 0) const;
73 
76  std::vector<size_t> get_output_ports() const;
77 
78  /***********************************************************************
79  * FPGA Configuration
80  **********************************************************************/
90  virtual void set_destination(uint32_t next_address, size_t output_block_port = 0);
91 
114  virtual void configure_flow_control_out(const bool enable_output,
115  const bool lossless_link,
116  const size_t buf_size_bytes,
117  const size_t pkt_limit = 0,
118  const size_t block_port = 0,
119  const uhd::sid_t& sid = uhd::sid_t());
120 
131  size_t get_mtu(size_t block_port = 0) const;
132 
133 
134 protected:
135  /***********************************************************************
136  * Hooks
137  **********************************************************************/
141  virtual size_t _request_output_port(
142  const size_t suggested_port, const uhd::device_addr_t& args) const;
143 
144 }; /* class source_block_ctrl_base */
145 
146 }} /* namespace uhd::rfnoc */
147 
148 #endif /* INCLUDED_LIBUHD_RX_BLOCK_CTRL_BASE_HPP */
Definition: stream_cmd.hpp:36
stream_sig_t get_output_signature(size_t block_port=0) const
Definition: source_node_ctrl.hpp:23
size_t get_mtu(size_t block_port=0) const
virtual void configure_flow_control_out(const bool enable_output, const bool lossless_link, const size_t buf_size_bytes, const size_t pkt_limit=0, const size_t block_port=0, const uhd::sid_t &sid=uhd::sid_t())
Definition: block_ctrl_base.hpp:87
virtual void set_destination(uint32_t next_address, size_t output_block_port=0)
Definition: build_info.hpp:13
#define UHD_RFNOC_API
Definition: config.hpp:104
Definition: source_block_ctrl_base.hpp:24
Represents a stream ID (SID).
Definition: sid.hpp:74
virtual size_t _request_output_port(const size_t suggested_port, const uhd::device_addr_t &args) const
virtual void issue_stream_cmd(const uhd::stream_cmd_t &stream_cmd, const size_t chan=0)
std::vector< size_t > get_output_ports() const
boost::shared_ptr< source_block_ctrl_base > sptr
Definition: source_block_ctrl_base.hpp:28
Definition: stream_sig.hpp:23
Definition: device_addr.hpp:38