Simple managed buffer with release interface.
More...
#include <uhd/transport/zero_copy.hpp>
Simple managed buffer with release interface.
◆ sptr
◆ managed_buffer()
uhd::transport::managed_buffer::managed_buffer |
( |
void |
| ) |
|
|
inline |
◆ ~managed_buffer()
virtual uhd::transport::managed_buffer::~managed_buffer |
( |
void |
| ) |
|
|
inlinevirtual |
◆ cast()
template<class T >
UHD_INLINE T uhd::transport::managed_buffer::cast |
( |
void |
| ) |
const |
|
inline |
Get a pointer to the underlying buffer.
- Returns
- a pointer into memory
◆ commit()
UHD_INLINE void uhd::transport::managed_buffer::commit |
( |
size_t |
num_bytes | ) |
|
|
inline |
Use commit() to re-write the length (for use with send buffers).
- Parameters
-
num_bytes | the number of bytes written into the buffer |
◆ make()
template<typename T >
UHD_INLINE boost::intrusive_ptr< T > uhd::transport::managed_buffer::make |
( |
T * |
p, |
|
|
void * |
buffer, |
|
|
size_t |
length |
|
) |
| |
|
inline |
Create smart pointer to a reusable managed buffer.
◆ ref_count()
int uhd::transport::managed_buffer::ref_count |
( |
| ) |
|
|
inline |
◆ release()
virtual void uhd::transport::managed_buffer::release |
( |
void |
| ) |
|
|
pure virtual |
Signal to the transport that we are done with the buffer. This should be called to release the buffer to the transport object. After calling, the referenced memory should be considered invalid.
◆ size()
UHD_INLINE size_t uhd::transport::managed_buffer::size |
( |
void |
| ) |
const |
|
inline |
Get the size of the underlying buffer.
- Returns
- the number of bytes
◆ _buffer
void* uhd::transport::managed_buffer::_buffer |
|
protected |
◆ _length
size_t uhd::transport::managed_buffer::_length |
|
protected |
◆ _ref_count
boost::detail::atomic_count uhd::transport::managed_buffer::_ref_count |
The documentation for this class was generated from the following file: