gr::buffer
gr::custom_lock_if
gr::buffer_double_mapped
gr::buffer_single_mapped
gnuradio/buffer.h
gr::logger_ptr gr::logger_ptr gr::buffer::d_logger d_logger gr::buffer::d_logger
gr::logger_ptr gr::logger_ptr gr::buffer::d_debug_logger d_debug_logger gr::buffer::d_debug_logger
class friend class buffer_reader buffer_reader gr::buffer::buffer_reader buffer_reader
class friend class buffer_reader_sm buffer_reader_sm gr::buffer::buffer_reader_sm buffer_reader_sm
std::ostream & std::ostream & operator<< (std::ostream &os, const buffer &buf) operator<< gr::buffer::operator<< std::ostream & os const buffer & buf
GR_RUNTIME_API buffer_sptr GR_RUNTIME_API buffer_sptr make_buffer (int nitems, size_t sizeof_item, uint64_t downstream_lcm_nitems, block_sptr link) make_buffer gr::buffer::make_buffer int nitems size_t sizeof_item uint64_t downstream_lcm_nitems block_sptr link
GR_RUNTIME_API buffer_reader_sptr GR_RUNTIME_API buffer_reader_sptr buffer_add_reader (buffer_sptr buf, int nzero_preload, block_sptr link=block_sptr(), int delay=0) buffer_add_reader gr::buffer::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`.

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.

char * char* gr::buffer::d_base d_base gr::buffer::d_base
unsigned int unsigned int gr::buffer::d_bufsize d_bufsize gr::buffer::d_bufsize
buffer_mapping_type buffer_mapping_type gr::buffer::d_buf_map_type d_buf_map_type gr::buffer::d_buf_map_type
unsigned unsigned gr::buffer::d_max_reader_delay d_max_reader_delay gr::buffer::d_max_reader_delay
unsigned unsigned gr::buffer::d_max_reader_history d_max_reader_history gr::buffer::d_max_reader_history
bool bool gr::buffer::d_has_history d_has_history gr::buffer::d_has_history
size_t size_t gr::buffer::d_sizeof_item d_sizeof_item gr::buffer::d_sizeof_item
std::vector< buffer_reader * > std::vector<buffer_reader*> gr::buffer::d_readers d_readers gr::buffer::d_readers
std::weak_ptr< block > std::weak_ptr<block> gr::buffer::d_link d_link gr::buffer::d_link
gr::thread::mutex gr::thread::mutex gr::buffer::d_mutex d_mutex gr::buffer::d_mutex
unsigned int unsigned int gr::buffer::d_write_index d_write_index gr::buffer::d_write_index
uint64_t uint64_t gr::buffer::d_abs_write_offset d_abs_write_offset gr::buffer::d_abs_write_offset
bool bool gr::buffer::d_done d_done gr::buffer::d_done
std::multimap< uint64_t, tag_t > std::multimap<uint64_t, tag_t> gr::buffer::d_item_tags d_item_tags gr::buffer::d_item_tags
uint64_t uint64_t gr::buffer::d_last_min_items_read d_last_min_items_read gr::buffer::d_last_min_items_read
gr::thread::condition_variable gr::thread::condition_variable gr::buffer::d_cv d_cv gr::buffer::d_cv
bool bool gr::buffer::d_callback_flag d_callback_flag gr::buffer::d_callback_flag
uint32_t uint32_t gr::buffer::d_active_pointer_counter d_active_pointer_counter gr::buffer::d_active_pointer_counter
uint64_t uint64_t gr::buffer::d_downstream_lcm_nitems d_downstream_lcm_nitems gr::buffer::d_downstream_lcm_nitems
uint64_t uint64_t gr::buffer::d_write_multiple d_write_multiple gr::buffer::d_write_multiple
uint32_t uint32_t gr::buffer::d_max_reader_output_multiple d_max_reader_output_multiple gr::buffer::d_max_reader_output_multiple
transfer_type transfer_type gr::buffer::d_transfer_type d_transfer_type gr::buffer::d_transfer_type
gr::buffer::~buffer
() override
~buffer
gr::buffer::~buffer
buffer_mapping_type buffer_mapping_type gr::buffer::get_mapping_type () get_mapping_type gr::buffer::get_mapping_type

return the buffer's mapping type

int virtual int gr::buffer::space_available ()=0 space_available gr::buffer::space_available space_available space_available

return number of items worth of space available for writing

unsigned int unsigned int gr::buffer::bufsize () const bufsize gr::buffer::bufsize

return size of this buffer in items

const char * const char * gr::buffer::base () const base gr::buffer::base

return the base address of the buffer

void * virtual void * gr::buffer::write_pointer () write_pointer gr::buffer::write_pointer write_pointer

return pointer to write buffer.

The return value points at space that can hold at least space_available() items.

const void * virtual const void * gr::buffer::_read_pointer (unsigned int read_index) _read_pointer gr::buffer::_read_pointer _read_pointer unsigned int read_index

return pointer to read buffer.

The return value points to at least items_available() items.

void void gr::buffer::update_write_pointer (int nitems) update_write_pointer gr::buffer::update_write_pointer int nitems

tell buffer that we wrote `nitems` into it

void void gr::buffer::set_done (bool done) set_done gr::buffer::set_done bool done
bool bool gr::buffer::done () const done gr::buffer::done
block_sptr block_sptr gr::buffer::link () link gr::buffer::link

Return the block that writes to this buffer.

size_t size_t gr::buffer::nreaders () const nreaders gr::buffer::nreaders
buffer_reader * buffer_reader * gr::buffer::reader (size_t index) reader gr::buffer::reader size_t index
gr::thread::mutex * gr::thread::mutex * gr::buffer::mutex () mutex gr::buffer::mutex
uint64_t uint64_t gr::buffer::nitems_written () nitems_written gr::buffer::nitems_written
void void gr::buffer::reset_nitem_counter () reset_nitem_counter gr::buffer::reset_nitem_counter
size_t size_t gr::buffer::get_sizeof_item () get_sizeof_item gr::buffer::get_sizeof_item
uint64_t uint64_t gr::buffer::get_downstream_lcm_nitems () get_downstream_lcm_nitems gr::buffer::get_downstream_lcm_nitems
uint32_t uint32_t gr::buffer::get_max_reader_output_multiple () get_max_reader_output_multiple gr::buffer::get_max_reader_output_multiple
void virtual void gr::buffer::update_reader_block_history (unsigned history, int delay) update_reader_block_history gr::buffer::update_reader_block_history update_reader_block_history unsigned history int delay
void void gr::buffer::add_item_tag (const tag_t &tag) add_item_tag gr::buffer::add_item_tag const tag_t & tag

Adds a new tag to the buffer.

tag

the new tag

void void gr::buffer::remove_item_tag (const tag_t &tag, long id) remove_item_tag 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.

tag

the tag that needs to be removed

id

the unique ID of the block calling this function

void void gr::buffer::prune_tags (uint64_t max_time) prune_tags gr::buffer::prune_tags uint64_t max_time

Removes all tags before `max_time` from buffer.

max_time

the time (item number) to trim up until.

std::multimap< uint64_t, tag_t >::iterator std::multimap< uint64_t, tag_t >::iterator gr::buffer::get_tags_begin () get_tags_begin gr::buffer::get_tags_begin
std::multimap< uint64_t, tag_t >::iterator std::multimap< uint64_t, tag_t >::iterator gr::buffer::get_tags_end () get_tags_end gr::buffer::get_tags_end
std::multimap< uint64_t, tag_t >::iterator std::multimap< uint64_t, tag_t >::iterator gr::buffer::get_tags_lower_bound (uint64_t x) get_tags_lower_bound gr::buffer::get_tags_lower_bound uint64_t x
std::multimap< uint64_t, tag_t >::iterator std::multimap< uint64_t, tag_t >::iterator gr::buffer::get_tags_upper_bound (uint64_t x) get_tags_upper_bound gr::buffer::get_tags_upper_bound uint64_t x
void virtual void gr::buffer::post_work (int nitems)=0 post_work gr::buffer::post_work post_work post_work int nitems

Function to be executed after this object's owner completes the call to general_work()

bool virtual bool gr::buffer::input_blkd_cb_ready (int items_required, unsigned read_index) input_blkd_cb_ready gr::buffer::input_blkd_cb_ready input_blkd_cb_ready int items_required unsigned read_index

Returns true when the current thread is ready to call the callback, false otherwise. Note if input_blocked_callback is overridden then this function should also be overridden.

bool virtual bool gr::buffer::input_blocked_callback (int items_required, int items_avail, unsigned read_index) input_blocked_callback gr::buffer::input_blocked_callback input_blocked_callback input_blocked_callback int items_required int items_avail unsigned read_index

Callback function that the scheduler will call when it determines that the input is blocked. Override this function if needed.

bool virtual bool gr::buffer::output_blkd_cb_ready (int output_multiple) output_blkd_cb_ready gr::buffer::output_blkd_cb_ready output_blkd_cb_ready int output_multiple

Returns true if the current thread is ready to execute output_blocked_callback(), false otherwise. Note if the default output_blocked_callback is overridden this function should also be overridden.

bool virtual bool gr::buffer::output_blocked_callback (int output_multiple, bool force=false) output_blocked_callback gr::buffer::output_blocked_callback output_blocked_callback output_blocked_callback int output_multiple bool force false

Callback function that the scheduler will call when it determines that the output is blocked. Override this function if needed.

void void gr::buffer::increment_active () increment_active gr::buffer::increment_active

Increment the number of active pointers for this buffer.

void void gr::buffer::decrement_active () decrement_active gr::buffer::decrement_active

Decrement the number of active pointers for this buffer and signal anyone waiting when the count reaches zero.

void void gr::buffer::on_lock (gr::thread::scoped_lock &lock) override on_lock gr::buffer::on_lock on_lock gr::thread::scoped_lock & lock

"on_lock" function from the custom_lock_if.

void void gr::buffer::on_unlock () override on_unlock gr::buffer::on_unlock on_unlock

"on_unlock" function from the custom_lock_if.

void void gr::buffer::set_transfer_type (const transfer_type &type) set_transfer_type gr::buffer::set_transfer_type const transfer_type & type

Assign buffer's transfer_type.

unsigned virtual unsigned gr::buffer::index_add (unsigned a, unsigned b)=0 index_add gr::buffer::index_add index_add index_add unsigned a unsigned b

Increment read or write index for this buffer.

unsigned virtual unsigned gr::buffer::index_sub (unsigned a, unsigned b)=0 index_sub gr::buffer::index_sub index_sub index_sub unsigned a unsigned b

Decrement read or write index for this buffer.

bool virtual bool gr::buffer::allocate_buffer (int nitems) allocate_buffer gr::buffer::allocate_buffer allocate_buffer allocate_buffer int nitems
gr::buffer::buffer
(buffer_mapping_type buftype, int nitems, size_t sizeof_item, uint64_t downstream_lcm_nitems, uint32_t downstream_max_out_mult, block_sptr link)
buffer
gr::buffer::buffer
buffer_mapping_type buftype
int nitems
size_t sizeof_item
uint64_t downstream_lcm_nitems
uint32_t downstream_max_out_mult
block_sptr link

constructor is private. Use gr_make_buffer to create instances.

Allocate a buffer that holds at least `nitems` of size `sizeof_item`.

buftype

is an enum type that describes the buffer TODO: fix me

nitems

is the minimum number of items the buffer will hold.

sizeof_item

is the size of an item in bytes.

downstream_lcm_nitems

is the least common multiple of the items to read by downstream block(s)

downstream_max_out_mult

is the maximum output multiple of all downstream blocks

link

is the block that writes to this buffer.

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.
void void gr::buffer::drop_reader (buffer_reader *reader) drop_reader gr::buffer::drop_reader buffer_reader * reader

disassociate `reader` from this buffer

Single writer, multiple reader fifo.

gr::buffer
gr::buffer_double_mapped
gr::buffer_single_mapped
gr::custom_lock_if
gr::host_buffer
T
gr::basic_block
d_name
d_symbol_alias
d_symbol_name
d_input_signature
d_output_signature
d_debug_logger
d_logger
msg_queue
d_rpc_vars
d_message_subscribers
gr::block
d_max_output_buffer
d_min_output_buffer
d_pmt_done
d_system_port
gr::buffer
d_debug_logger
d_logger
d_readers
d_link
d_item_tags
gr::buffer_reader
d_buffer
d_link
gr::custom_lock_if
gr::io_signature
gr::messages::msg_accepter
gr::msg_accepter
gr::tag_t
key
srcid
value
marked_deleted
std::basic_string< Char >
std::deque< T >
elements
std::enable_shared_from_this< basic_block >
std::map< pmt::pmt_t, msg_queue_t, msg_queue_comparator >
keys
elements
std::multimap< uint64_t, gr::tag_t >
elements
std::shared_ptr< T >
ptr
std::shared_ptr< buffer >
ptr
std::shared_ptr< io_signature >
ptr
std::shared_ptr< logger >
std::shared_ptr< pmt_base >
std::string
std::vector< gr::buffer_reader * >
elements
p
std::vector< long >
std::vector< rpcbasic_sptr >
elements
p
std::weak_ptr< gr::block >
ptr
- gr::buffer
  _read_pointer
- gr::buffer
  add_item_tag
- gr::buffer
  allocate_buffer
- gr::buffer
  base
- gr::buffer
  buffer
- gr::buffer
  buffer_add_reader
- gr::buffer
  buffer_reader
- gr::buffer
  buffer_reader_sm
- gr::buffer
  bufsize
- gr::buffer
  d_abs_write_offset
- gr::buffer
  d_active_pointer_counter
- gr::buffer
  d_base
- gr::buffer
  d_buf_map_type
- gr::buffer
  d_bufsize
- gr::buffer
  d_callback_flag
- gr::buffer
  d_cv
- gr::buffer
  d_debug_logger
- gr::buffer
  d_done
- gr::buffer
  d_downstream_lcm_nitems
- gr::buffer
  d_has_history
- gr::buffer
  d_item_tags
- gr::buffer
  d_last_min_items_read
- gr::buffer
  d_link
- gr::buffer
  d_logger
- gr::buffer
  d_max_reader_delay
- gr::buffer
  d_max_reader_history
- gr::buffer
  d_max_reader_output_multiple
- gr::buffer
  d_mutex
- gr::buffer
  d_readers
- gr::buffer
  d_sizeof_item
- gr::buffer
  d_transfer_type
- gr::buffer
  d_write_index
- gr::buffer
  d_write_multiple
- gr::buffer
  decrement_active
- gr::buffer
  done
- gr::buffer
  drop_reader
- gr::buffer
  get_downstream_lcm_nitems
- gr::buffer
  get_mapping_type
- gr::buffer
  get_max_reader_output_multiple
- gr::buffer
  get_sizeof_item
- gr::buffer
  get_tags_begin
- gr::buffer
  get_tags_end
- gr::buffer
  get_tags_lower_bound
- gr::buffer
  get_tags_upper_bound
- gr::buffer
  increment_active
- gr::buffer
  index_add
- gr::buffer
  index_sub
- gr::buffer
  input_blkd_cb_ready
- gr::buffer
  input_blocked_callback
- gr::buffer
  link
- gr::buffer
  make_buffer
- gr::buffer
  mutex
- gr::buffer
  nitems_written
- gr::buffer
  nreaders
- gr::buffer
  on_lock
- gr::buffer
  on_unlock
- gr::buffer
  operator<<
- gr::buffer
  output_blkd_cb_ready
- gr::buffer
  output_blocked_callback
- gr::buffer
  post_work
- gr::buffer
  prune_tags
- gr::buffer
  reader
- gr::buffer
  remove_item_tag
- gr::buffer
  reset_nitem_counter
- gr::buffer
  set_done
- gr::buffer
  set_transfer_type
- gr::buffer
  space_available
- gr::buffer
  update_reader_block_history
- gr::buffer
  update_write_pointer
- gr::buffer
  write_pointer
- gr::buffer
  ~buffer
- gr::buffer
  ~custom_lock_if