| USRP Hardware Driver and USRP Manual Version: 4.8.0.makepkg-0-g308126a4 UHD and USRP Manual |

Loading...
Searching...
No Matches
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>
11#include <uhd/utils/noncopyable.hpp>
12#include <cstddef>
13#include <memory>
14
15 namespace uhd { namespace transport {
16
21 class UHD_API buffer_pool : uhd::noncopyable
22{
23 public:
24 typedef std::shared_ptr<buffer_pool> sptr;
25 typedef void* ptr_type;
26
27 virtual ~buffer_pool(void) = 0;
28
36 static sptr make(
37 const size_t num_buffs, const size_t buff_size, const size_t alignment = 16);
38
40 virtual ptr_type at(const size_t index) const = 0;
41
43 virtual size_t size(void) const = 0;
44};
45
46}} // namespace uhd::transport
uhd::transport::buffer_pool
Definition buffer_pool.hpp:22
uhd::transport::buffer_pool::make
static sptr make(const size_t num_buffs, const size_t buff_size, const size_t alignment=16)
uhd::transport::buffer_pool::~buffer_pool
virtual ~buffer_pool(void)=0
uhd::transport::buffer_pool::sptr
std::shared_ptr< buffer_pool > sptr
Definition buffer_pool.hpp:24
uhd::transport::buffer_pool::size
virtual size_t size(void) const =0
Get the number of buffers in this pool.
uhd::transport::buffer_pool::at
virtual ptr_type at(const size_t index) const =0
Get a pointer to the buffer start at the specified index.
uhd::transport::buffer_pool::ptr_type
void * ptr_type
Definition buffer_pool.hpp:25
UHD_API
#define UHD_API
Definition config.h:87
config.hpp
uhd::transport
Definition adapter_id.hpp:11
uhd
Definition build_info.hpp:12
uhd::noncopyable
boost::noncopyable noncopyable
Definition noncopyable.hpp:45
noncopyable.hpp