USRP Hardware Driver and USRP Manual Version: 4.1.0.3
UHD and USRP Manual
buffer_pool.hpp
Go to the documentation of this file.
1//
2// Copyright 2011,2014 Ettus Research LLC
3// Copyright 2018 Ettus Research, a National Instruments Company
4//
5// SPDX-License-Identifier: GPL-3.0-or-later
6//
7
8#pragma once
9
10#include <uhd/config.hpp>
12#include <memory>
13
14namespace uhd { namespace transport {
15
21{
22public:
23 typedef std::shared_ptr<buffer_pool> sptr;
24 typedef void* ptr_type;
25
26 virtual ~buffer_pool(void) = 0;
27
35 static sptr make(
36 const size_t num_buffs, const size_t buff_size, const size_t alignment = 16);
37
39 virtual ptr_type at(const size_t index) const = 0;
40
42 virtual size_t size(void) const = 0;
43};
44
45}} // namespace uhd::transport
46
Definition: buffer_pool.hpp:21
static sptr make(const size_t num_buffs, const size_t buff_size, const size_t alignment=16)
virtual ~buffer_pool(void)=0
std::shared_ptr< buffer_pool > sptr
Definition: buffer_pool.hpp:23
virtual size_t size(void) const =0
Get the number of buffers in this pool.
virtual ptr_type at(const size_t index) const =0
Get a pointer to the buffer start at the specified index.
void * ptr_type
Definition: buffer_pool.hpp:24
#define UHD_API
Definition: config.h:70
Definition: build_info.hpp:12
boost::noncopyable noncopyable
Definition: noncopyable.hpp:45