Single writer, multiple reader fifo.
More...
#include <gnuradio/buffer.h>
Single writer, multiple reader fifo.
◆ ~buffer()
virtual gr::buffer::~buffer |
( |
| ) |
|
|
virtual |
◆ add_item_tag()
void gr::buffer::add_item_tag |
( |
const tag_t & |
tag | ) |
|
Adds a new tag to the buffer.
- Parameters
-
◆ base()
const char* gr::buffer::base |
( |
| ) |
const |
|
inline |
return the base address of the buffer
◆ bufsize()
int gr::buffer::bufsize |
( |
| ) |
const |
|
inline |
return size of this buffer in items
◆ done()
bool gr::buffer::done |
( |
| ) |
const |
|
inline |
◆ get_sizeof_item()
size_t gr::buffer::get_sizeof_item |
( |
| ) |
|
|
inline |
◆ get_tags_begin()
std::multimap<uint64_t, tag_t>::iterator gr::buffer::get_tags_begin |
( |
| ) |
|
|
inline |
◆ get_tags_end()
std::multimap<uint64_t, tag_t>::iterator gr::buffer::get_tags_end |
( |
| ) |
|
|
inline |
◆ get_tags_lower_bound()
std::multimap<uint64_t, tag_t>::iterator gr::buffer::get_tags_lower_bound |
( |
uint64_t |
x | ) |
|
|
inline |
◆ get_tags_upper_bound()
std::multimap<uint64_t, tag_t>::iterator gr::buffer::get_tags_upper_bound |
( |
uint64_t |
x | ) |
|
|
inline |
◆ link()
block_sptr gr::buffer::link |
( |
| ) |
|
|
inline |
Return the block that writes to this buffer.
◆ mutex()
◆ nitems_written()
uint64_t gr::buffer::nitems_written |
( |
| ) |
|
|
inline |
◆ nreaders()
size_t gr::buffer::nreaders |
( |
| ) |
const |
|
inline |
◆ prune_tags()
void gr::buffer::prune_tags |
( |
uint64_t |
max_time | ) |
|
Removes all tags before max_time
from buffer.
- Parameters
-
max_time | the time (item number) to trim up until. |
◆ reader()
◆ remove_item_tag()
void gr::buffer::remove_item_tag |
( |
const tag_t & |
tag, |
|
|
long |
id |
|
) |
| |
Removes an existing tag from the buffer.
If no such tag is found, does nothing. Note: Doesn't actually physically delete the tag, but marks it as deleted. For the user, this has the same effect: Any subsequent calls to get_tags_in_range() will not return the tag.
- Parameters
-
tag | the tag that needs to be removed |
id | the unique ID of the block calling this function |
◆ reset_nitem_counter()
void gr::buffer::reset_nitem_counter |
( |
| ) |
|
|
inline |
◆ set_done()
void gr::buffer::set_done |
( |
bool |
done | ) |
|
◆ space_available()
int gr::buffer::space_available |
( |
| ) |
|
return number of items worth of space available for writing
◆ update_write_pointer()
void gr::buffer::update_write_pointer |
( |
int |
nitems | ) |
|
tell buffer that we wrote nitems
into it
◆ write_pointer()
void* gr::buffer::write_pointer |
( |
| ) |
|
return pointer to write buffer.
The return value points at space that can hold at least space_available() items.
◆ buffer_add_reader
GR_RUNTIME_API buffer_reader_sptr buffer_add_reader |
( |
buffer_sptr |
buf, |
|
|
int |
nzero_preload, |
|
|
block_sptr |
link, |
|
|
int |
delay |
|
) |
| |
|
friend |
Create a new gr::buffer_reader and attach it to buffer buf
.
- Parameters
-
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. |
delay | Optional setting to declare the buffer's sample delay. |
◆ buffer_reader
◆ make_buffer
GR_RUNTIME_API buffer_sptr make_buffer |
( |
int |
nitems, |
|
|
size_t |
sizeof_item, |
|
|
block_sptr |
link |
|
) |
| |
|
friend |
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.
- Parameters
-
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. |
◆ d_base
◆ d_bufsize
unsigned int gr::buffer::d_bufsize |
|
protected |
◆ d_max_reader_delay
unsigned gr::buffer::d_max_reader_delay |
|
protected |
The documentation for this class was generated from the following file: