USRP Hardware Driver and USRP Manual  Version: 3.11.0.HEAD-0-gdca39145
UHD and USRP Manual
zero_copy_flow_ctrl.hpp
Go to the documentation of this file.
1 //
2 // Copyright 2017 Ettus Research
3 //
4 // SPDX-License-Identifier: GPL-3.0
5 //
6 
7 #ifndef INCLUDED_ZERO_COPY_FLOW_CTRL_HPP
8 #define INCLUDED_ZERO_COPY_FLOW_CTRL_HPP
9 
10 #include <uhd/config.hpp>
12 #include <boost/function.hpp>
13 #include <boost/shared_ptr.hpp>
14 
15 namespace uhd{ namespace transport{
16 
22 typedef boost::function<bool(managed_buffer::sptr buff)> flow_ctrl_func;
23 
27 class UHD_API zero_copy_flow_ctrl : public virtual zero_copy_if {
28 public:
29  typedef boost::shared_ptr<zero_copy_flow_ctrl> sptr;
30 
38  static sptr make(
39  zero_copy_if::sptr transport,
40  flow_ctrl_func send_flow_ctrl,
41  flow_ctrl_func recv_flow_ctrl
42  );
43 };
44 
45 }} //namespace
46 
47 #endif /* INCLUDED_ZERO_COPY_FLOW_CTRL_HPP */
Definition: zero_copy_flow_ctrl.hpp:27
boost::shared_ptr< zero_copy_if > sptr
Definition: zero_copy.hpp:143
Definition: build_info.hpp:14
boost::function< bool(managed_buffer::sptr buff)> flow_ctrl_func
Definition: zero_copy_flow_ctrl.hpp:22
#define UHD_API
Definition: config.h:62
Definition: zero_copy.hpp:141
boost::shared_ptr< zero_copy_flow_ctrl > sptr
Definition: zero_copy_flow_ctrl.hpp:29