GNU Radio C++ API Reference: gr::buffer_reader_sm Class Reference

| GNU Radio C++ API Reference 3.10.12.0 The Free & Open Software Radio Ecosystem |

Loading...
Searching...
No Matches
gr::buffer_reader_sm Class Reference

`#include <gnuradio/buffer_reader_sm.h>`

## Public Member Functions
| ~buffer_reader_sm ()
virtual int | items_available () const
| Return number of items available for reading.
virtual bool | input_blkd_cb_ready (int items_required) const
| Return true if thread is ready to call input_blocked_callback, false otherwise; delegate calls to buffer class's input_blkd_cb_ready().
virtual bool | input_blocked_callback (int items_required, int items_avail)
| Callback function that the scheduler will call when it determines that the input is blocked; delegate calls to buffer class's input_blocked_callback().
Public Member Functions inherited from gr::buffer_reader
virtual | ~buffer_reader ()
void | declare_sample_delay (unsigned delay)
unsigned | sample_delay () const
buffer_sptr | buffer () const
| Return buffer this reader reads from.
int | max_possible_items_available () const
| Return maximum number of items that could ever be available for reading. This is used as a sanity check in the scheduler to avoid looping forever.
const void * | read_pointer ()
| return pointer to read buffer.
void | update_read_pointer (int nitems)
void | set_done (bool done)
bool | done () const
gr::thread::mutex * | mutex ()
uint64_t | nitems_read () const
void | reset_nitem_counter ()
size_t | get_sizeof_item ()
block_sptr | link () const
| Return the block that reads via this reader.
void | get_tags_in_range (std::vector< tag_t > &v, uint64_t abs_start, uint64_t abs_end, long id)
| Given a [start,end), returns a vector all tags in the range.
unsigned int | get_read_index () const
uint64_t | get_abs_read_offset () const

## Friends
class | buffer
class | buffer_single_mapped
GR_RUNTIME_API buffer_reader_sptr | buffer_add_reader (buffer_sptr buf, int nzero_preload, block_sptr link=block_sptr(), int delay=0)
| Create a new gr::buffer_reader and attach it to buffer `buf`.

## Additional Inherited Members
Protected Member Functions inherited from gr::buffer_reader
| buffer_reader (buffer_sptr buffer, unsigned int read_index, block_sptr link)
| constructor is private. Use gr::buffer::add_reader to create instances
Protected Attributes inherited from gr::buffer_reader
buffer_sptr | d_buffer
unsigned int | d_read_index
uint64_t | d_abs_read_offset
std::weak_ptr< block > | d_link
unsigned | d_attr_delay

## Constructor & Destructor Documentation

## ◆ ~buffer_reader_sm()

gr::buffer_reader_sm::~buffer_reader_sm | ( |  | ) |

## Member Function Documentation

## ◆ input_blkd_cb_ready()

virtual bool gr::buffer_reader_sm::input_blkd_cb_ready | ( | int | items_required | ) | const
| virtual

Return true if thread is ready to call input_blocked_callback, false otherwise; delegate calls to buffer class's input_blkd_cb_ready().

Reimplemented from gr::buffer_reader.

## ◆ input_blocked_callback()

virtual bool gr::buffer_reader_sm::input_blocked_callback | ( | int | items_required,
|  | int | items_avail )
| virtual

Callback function that the scheduler will call when it determines that the input is blocked; delegate calls to buffer class's input_blocked_callback().

Reimplemented from gr::buffer_reader.

## ◆ items_available()

virtual int gr::buffer_reader_sm::items_available | ( |  | ) | const
| virtual

Return number of items available for reading.

Reimplemented from gr::buffer_reader.

## Friends And Related Symbol Documentation

## ◆ buffer

friend class buffer
| friend

References buffer.

Referenced by buffer, and buffer_add_reader.

## ◆ buffer_add_reader

GR_RUNTIME_API buffer_reader_sptr buffer_add_reader | ( | buffer_sptr | buf,
|  | int | nzero_preload,
|  | block_sptr | link = block_sptr(),
|  | int | delay = 0 )
| 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.

References buffer, GR_RUNTIME_API, and gr::buffer_reader::link().

## ◆ buffer_single_mapped

friend class buffer_single_mapped
| friend

References buffer_single_mapped.

Referenced by buffer_single_mapped.

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

- buffer_reader_sm.h