GNU Radio Manual and C++ API Reference 3.10.5.1
The Free & Open Software Radio Ecosystem
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. More...
 
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() More...
 
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() More...
 
- Public Member Functions inherited from gr::buffer_reader
virtual ~buffer_reader ()
 
void declare_sample_delay (unsigned delay)
 
unsigned sample_delay () const
 
virtual int items_available () const
 Return number of items available for reading. More...
 
buffer_sptr buffer () const
 Return buffer this reader reads from. More...
 
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. More...
 
const void * read_pointer ()
 return pointer to read buffer. More...
 
void update_read_pointer (int nitems)
 
void set_done (bool done)
 
bool done () const
 
gr::thread::mutexmutex ()
 
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. More...
 
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. More...
 
virtual bool input_blkd_cb_ready (int items_required) const
 Returns true when the current thread is ready to call the callback, false otherwise. Delegate calls to buffer class's input_blkd_cb_ready(). Note if input_blocked_callback is overridden then this function should also be overridden. More...
 
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(). Override this function if needed. More...
 
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, int delay)
 Create a new gr::buffer_reader and attach it to buffer buf. More...
 

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 More...
 
- 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< blockd_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 Function Documentation

◆ buffer

friend class buffer
friend

◆ 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
bufis the buffer the gr::buffer_reader reads from.
nzero_preload– number of zero items to "preload" into buffer.
linkis the block that reads from the buffer using this gr::buffer_reader.
delayOptional setting to declare the buffer's sample delay.

◆ buffer_single_mapped

friend class buffer_single_mapped
friend

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