blob: 04878f72d109346885650c511b8f32cb2d217898 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
//
// Copyright 2016 Ettus Research
// Copyright 2018 Ettus Research, a National Instruments Company
//
// SPDX-License-Identifier: GPL-3.0-or-later
//
#ifndef INCLUDED_UHD_ZERO_COPY_RECV_OFFLOAD_HPP
#define INCLUDED_UHD_ZERO_COPY_RECV_OFFLOAD_HPP
#include <uhd/config.hpp>
#include <uhd/transport/zero_copy.hpp>
#include <boost/shared_ptr.hpp>
namespace uhd { namespace transport {
/*!
* A threaded transport offload that is meant to relieve the main thread of
* the responsibility of making receive calls.
*/
class UHD_API zero_copy_recv_offload : public virtual zero_copy_if
{
public:
typedef boost::shared_ptr<zero_copy_recv_offload> sptr;
/*!
* This transport offload adds a receive thread in order to
* communicate with the underlying transport. It is meant to be
* used in cases where the main thread needs to be relieved of the burden
* of the underlying transport receive calls.
*
* \param transport a shared pointer to the transport interface
* \param timeout a general timeout for pushing and pulling on the bounded buffer
*/
static sptr make(zero_copy_if::sptr transport, const double timeout);
};
}} // namespace uhd::transport
#endif /* INCLUDED_ZERO_COPY_OFFLOAD_HPP */
|