USRP Hardware Driver and USRP Manual  Version: 003.010.000.HEAD-0-g6e1ac3fc
UHD and USRP Manual
sink_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_TX_BLOCK_CTRL_BASE_HPP
19 #define INCLUDED_LIBUHD_TX_BLOCK_CTRL_BASE_HPP
20 
23 
24 namespace uhd {
25  namespace rfnoc {
26 
36 class sink_block_ctrl_base : virtual public block_ctrl_base, virtual public sink_node_ctrl
37 {
38 public:
39  typedef boost::shared_ptr<sink_block_ctrl_base> sptr;
40 
41  /***********************************************************************
42  * Stream signatures
43  **********************************************************************/
54  stream_sig_t get_input_signature(size_t block_port=0) const;
55 
58  std::vector<size_t> get_input_ports() const;
59 
60  /***********************************************************************
61  * FPGA Configuration
62  **********************************************************************/
75  size_t get_fifo_size(size_t block_port=0) const;
76 
94  virtual void configure_flow_control_in(
95  size_t cycles,
96  size_t packets,
97  size_t block_port=0
98  );
99 
105  virtual void set_error_policy(
106  const std::string &policy
107  );
108 
109 protected:
110  /***********************************************************************
111  * Hooks
112  **********************************************************************/
116  virtual size_t _request_input_port(
117  const size_t suggested_port,
118  const uhd::device_addr_t &args
119  ) const;
120 
121 }; /* class sink_block_ctrl_base */
122 
123 }} /* namespace uhd::rfnoc */
124 
125 #endif /* INCLUDED_LIBUHD_TX_BLOCK_CTRL_BASE_HPP */
126 // vim: sw=4 et:
size_t get_fifo_size(size_t block_port=0) const
virtual size_t _request_input_port(const size_t suggested_port, const uhd::device_addr_t &args) const
stream_sig_t get_input_signature(size_t block_port=0) const
Definition: sink_block_ctrl_base.hpp:36
Definition: block_ctrl_base.hpp:106
Definition: build_info.hpp:25
#define UHD_RFNOC_API
Definition: config.hpp:103
Definition: sink_node_ctrl.hpp:34
boost::shared_ptr< sink_block_ctrl_base > sptr
Definition: sink_block_ctrl_base.hpp:39
virtual void configure_flow_control_in(size_t cycles, size_t packets, size_t block_port=0)
virtual void set_error_policy(const std::string &policy)
Definition: stream_sig.hpp:33
std::vector< size_t > get_input_ports() const
Definition: device_addr.hpp:47