USRP Hardware Driver and USRP Manual  Version: 004.000.000.HEAD-0-g8773fb2c
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  **********************************************************************/
97  virtual void set_destination(
98  boost::uint32_t next_address,
99  size_t output_block_port = 0
100  );
101 
116  virtual void configure_flow_control_out(
117  size_t buf_size_pkts,
118  size_t block_port=0,
119  const uhd::sid_t &sid=uhd::sid_t()
120  );
121 
122 
123 protected:
124  /***********************************************************************
125  * Hooks
126  **********************************************************************/
130  virtual size_t _request_output_port(
131  const size_t suggested_port,
132  const uhd::device_addr_t &args
133  ) const;
134 
135 }; /* class source_block_ctrl_base */
136 
137 }} /* namespace uhd::rfnoc */
138 
139 #endif /* INCLUDED_LIBUHD_RX_BLOCK_CTRL_BASE_HPP */
140 // 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:78
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