GNU Radio 3.5.3.2 C++ API
|
#include <gr_core_api.h>
#include <gr_runtime_types.h>
#include <boost/weak_ptr.hpp>
#include <gruel/thread.h>
#include <gr_tags.h>
#include <deque>
Go to the source code of this file.
Classes | |
class | gr_buffer |
Single writer, multiple reader fifo. More... | |
class | gr_buffer_reader |
How we keep track of the readers of a gr_buffer. More... | |
Functions | |
GR_CORE_API gr_buffer_sptr | gr_make_buffer (int nitems, size_t sizeof_item, gr_block_sptr link=gr_block_sptr()) |
Allocate a buffer that holds at least nitems of size sizeof_item . | |
GR_CORE_API gr_buffer_reader_sptr | gr_buffer_add_reader (gr_buffer_sptr buf, int nzero_preload, gr_block_sptr link=gr_block_sptr()) |
Create a new gr_buffer_reader and attach it to buffer buf . | |
GR_CORE_API long | gr_buffer_ncurrently_allocated () |
returns # of gr_buffers currently allocated | |
GR_CORE_API long | gr_buffer_reader_ncurrently_allocated () |
returns # of gr_buffer_readers currently allocated |
GR_CORE_API gr_buffer_reader_sptr gr_buffer_add_reader | ( | gr_buffer_sptr | buf, |
int | nzero_preload, | ||
gr_block_sptr | link = gr_block_sptr() |
||
) |
Create a new gr_buffer_reader and attach it to buffer buf
.
buf | is the buffer the gr_buffer_reader reads from. |
nzero_preload | -- number of zero items to "preload" into buffer. |
link | is the block that reads from the buffer using this gr_buffer_reader. |
GR_CORE_API long gr_buffer_ncurrently_allocated | ( | ) |
returns # of gr_buffers currently allocated
GR_CORE_API long gr_buffer_reader_ncurrently_allocated | ( | ) |
returns # of gr_buffer_readers currently allocated
GR_CORE_API gr_buffer_sptr gr_make_buffer | ( | int | nitems, |
size_t | sizeof_item, | ||
gr_block_sptr | link = gr_block_sptr() |
||
) |
Allocate a buffer that holds at least nitems
of size sizeof_item
.
The total size of the buffer will be rounded up to a system dependent boundary. This is typically the system page size, but under MS windows is 64KB.
nitems | is the minimum number of items the buffer will hold. |
sizeof_item | is the size of an item in bytes. |
link | is the block that writes to this buffer. |