USRP Hardware Driver and USRP Manual Version: 4.1.0.4
UHD and USRP Manual
uhd::transport::buffer_pool Class Referenceabstract

#include <uhd/transport/buffer_pool.hpp>

Inheritance diagram for uhd::transport::buffer_pool:

Public Types

typedef std::shared_ptr< buffer_poolsptr
 
typedef void * ptr_type
 

Public Member Functions

virtual ~buffer_pool (void)=0
 
virtual ptr_type at (const size_t index) const =0
 Get a pointer to the buffer start at the specified index. More...
 
virtual size_t size (void) const =0
 Get the number of buffers in this pool. More...
 

Static Public Member Functions

static sptr make (const size_t num_buffs, const size_t buff_size, const size_t alignment=16)
 

Detailed Description

A buffer pool manages memory for a homogeneous set of buffers. Each buffer is the pool start at a 16-byte alignment boundary.

Member Typedef Documentation

◆ ptr_type

◆ sptr

Constructor & Destructor Documentation

◆ ~buffer_pool()

virtual uhd::transport::buffer_pool::~buffer_pool ( void  )
pure virtual

Member Function Documentation

◆ at()

virtual ptr_type uhd::transport::buffer_pool::at ( const size_t  index) const
pure virtual

Get a pointer to the buffer start at the specified index.

◆ make()

static sptr uhd::transport::buffer_pool::make ( const size_t  num_buffs,
const size_t  buff_size,
const size_t  alignment = 16 
)
static

Make a new buffer pool.

Parameters
num_buffsthe number of buffers to allocate
buff_sizethe size of each buffer in bytes
alignmentthe alignment boundary in bytes
Returns
a new buffer pool buff_size X num_buffs

◆ size()

virtual size_t uhd::transport::buffer_pool::size ( void  ) const
pure virtual

Get the number of buffers in this pool.


The documentation for this class was generated from the following file: