USRP Hardware Driver and USRP Manual  Version: 003.010.000.HEAD-0-g6e1ac3fc
UHD and USRP Manual
source_block_ctrl_base.hpp
Go to the documentation of this file.
1 //
2 // Copyright 2014 Ettus Research LLC
3 //
4 // This program is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU General Public License as published by
6 // the Free Software Foundation, either version 3 of the License, or
7 // (at your option) any later version.
8 //
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU General Public License for more details.
13 //
14 // You should have received a copy of the GNU General Public License
15 // along with this program. If not, see <http://www.gnu.org/licenses/>.
16 //
17 
18 #ifndef INCLUDED_LIBUHD_RX_BLOCK_CTRL_BASE_HPP
19 #define INCLUDED_LIBUHD_RX_BLOCK_CTRL_BASE_HPP
20 
23 
24 namespace uhd {
25  namespace rfnoc {
26 
35 class source_block_ctrl_base : virtual public block_ctrl_base, virtual public source_node_ctrl
36 {
37 public:
38  typedef boost::shared_ptr<source_block_ctrl_base> sptr;
39 
40  /***********************************************************************
41  * Streaming operations
42  **********************************************************************/
64  virtual void issue_stream_cmd(const uhd::stream_cmd_t &stream_cmd, const size_t chan=0);
65 
66  /***********************************************************************
67  * Stream signatures
68  **********************************************************************/
79  stream_sig_t get_output_signature(size_t block_port=0) const;
80 
83  std::vector<size_t> get_output_ports() const;
84 
85  /***********************************************************************
86  * FPGA Configuration
87  **********************************************************************/
94  virtual void set_destination(
95  boost::uint32_t next_address,
96  size_t output_block_port = 0
97  );
98 
113  virtual void configure_flow_control_out(
114  size_t buf_size_pkts,
115  size_t block_port=0,
116  const uhd::sid_t &sid=uhd::sid_t()
117  );
118 
119 
120 protected:
121  /***********************************************************************
122  * Hooks
123  **********************************************************************/
127  virtual size_t _request_output_port(
128  const size_t suggested_port,
129  const uhd::device_addr_t &args
130  ) const;
131 
132 }; /* class source_block_ctrl_base */
133 
134 }} /* namespace uhd::rfnoc */
135 
136 #endif /* INCLUDED_LIBUHD_RX_BLOCK_CTRL_BASE_HPP */
137 // vim: sw=4 et:
Definition: stream_cmd.hpp:46
virtual void configure_flow_control_out(size_t buf_size_pkts, size_t block_port=0, const uhd::sid_t &sid=uhd::sid_t())
stream_sig_t get_output_signature(size_t block_port=0) const
Definition: source_node_ctrl.hpp:34
Definition: block_ctrl_base.hpp:106
virtual void set_destination(boost::uint32_t next_address, size_t output_block_port=0)
Definition: build_info.hpp:25
#define UHD_RFNOC_API
Definition: config.hpp:103
Definition: source_block_ctrl_base.hpp:35
Represents a stream ID (SID).
Definition: sid.hpp:79
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:38
Definition: stream_sig.hpp:33
Definition: device_addr.hpp:47