gr::buffer_single_mapped
gr::buffer
gr::host_buffer
gnuradio/buffer_single_mapped.h
gr::logger_ptr gr::logger_ptr gr::buffer_single_mapped::d_logger d_logger gr::buffer_single_mapped::d_logger
gr::logger_ptr gr::logger_ptr gr::buffer_single_mapped::d_debug_logger d_debug_logger gr::buffer_single_mapped::d_debug_logger
class friend class buffer_reader buffer_reader gr::buffer_single_mapped::buffer_reader buffer_reader buffer_reader buffer_reader
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, block_sptr buf_owner) make_buffer gr::buffer_single_mapped::make_buffer int nitems size_t sizeof_item uint64_t downstream_lcm_nitems block_sptr link block_sptr buf_owner buf_owner GR_RUNTIME_API gr::buffer::link
block_sptr block_sptr gr::buffer_single_mapped::d_buf_owner d_buf_owner gr::buffer_single_mapped::d_buf_owner buf_owner
std::unique_ptr< char[]> std::unique_ptr<char[]> gr::buffer_single_mapped::d_buffer d_buffer gr::buffer_single_mapped::d_buffer
gr::buffer_single_mapped::~buffer_single_mapped
() override
~buffer_single_mapped
gr::buffer_single_mapped::~buffer_single_mapped
block_sptr block_sptr gr::buffer_single_mapped::buf_owner () buf_owner gr::buffer_single_mapped::buf_owner

Return the block that owns this buffer.

d_buf_owner
buffer_single_mapped
make_buffer
gr::host_buffer::make_buffer
gr::host_buffer::make_host_buffer
int int gr::buffer_single_mapped::space_available () override space_available gr::buffer_single_mapped::space_available space_available

return number of items worth of space available for writing

void void gr::buffer_single_mapped::update_reader_block_history (unsigned history, int delay) override update_reader_block_history gr::buffer_single_mapped::update_reader_block_history update_reader_block_history unsigned history int delay
bool bool gr::buffer_single_mapped::input_blkd_cb_ready (int items_required, unsigned read_index) override input_blkd_cb_ready gr::buffer_single_mapped::input_blkd_cb_ready input_blkd_cb_ready int items_required unsigned read_index

Return true if thread is ready to call input_blocked_callback, false otherwise.

bool bool gr::buffer_single_mapped::input_blocked_callback (int items_required, int items_avail, unsigned read_index) override=0 input_blocked_callback gr::buffer_single_mapped::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 bool gr::buffer_single_mapped::output_blkd_cb_ready (int output_multiple) override output_blkd_cb_ready gr::buffer_single_mapped::output_blkd_cb_ready output_blkd_cb_ready int output_multiple

Return true if thread is ready to call the callback, false otherwise.

bool bool gr::buffer_single_mapped::output_blocked_callback (int output_multiple, bool force) override=0 output_blocked_callback gr::buffer_single_mapped::output_blocked_callback output_blocked_callback output_blocked_callback int output_multiple bool force

Callback function that the scheduler will call when it determines that the output is blocked.

bool bool gr::buffer_single_mapped::allocate_buffer (int nitems) override allocate_buffer gr::buffer_single_mapped::allocate_buffer allocate_buffer int nitems

Make reasonable attempt to adjust nitems based on read/write granularity then delegate actual allocation to do_allocate_buffer().

true iff successful.

bool virtual bool gr::buffer_single_mapped::do_allocate_buffer (size_t final_nitems, size_t sizeof_item)=0 do_allocate_buffer gr::buffer_single_mapped::do_allocate_buffer do_allocate_buffer size_t final_nitems size_t sizeof_item

Do actual buffer allocation. This is intended (required) to be handled by the derived class.

unsigned unsigned gr::buffer_single_mapped::index_add (unsigned a, unsigned b) override index_add gr::buffer_single_mapped::index_add index_add unsigned a unsigned b

Increment read or write index for this buffer.

gr::buffer::d_bufsize
unsigned unsigned gr::buffer_single_mapped::index_sub (unsigned a, unsigned b) override index_sub gr::buffer_single_mapped::index_sub index_sub unsigned a unsigned b

Decrement read or write index for this buffer.

gr::buffer::d_bufsize
gr::buffer_single_mapped::buffer_single_mapped
(int nitems, size_t sizeof_item, uint64_t downstream_lcm_nitems, uint32_t downstream_max_out_mult, block_sptr link, block_sptr buf_owner)
buffer_single_mapped
gr::buffer_single_mapped::buffer_single_mapped
int nitems
size_t sizeof_item
uint64_t downstream_lcm_nitems
uint32_t downstream_max_out_mult
block_sptr link
block_sptr buf_owner

constructor is private. Use gr_make_buffer to create instances.

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

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 blocks

downstream_max_out_mult

is the maximum output multiple of all downstream blocks

link

is the block that writes to this buffer.

buf_owner

if the block that owns the buffer which may or may not be the same as 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.
buf_owner
gr::buffer::link
bool virtual bool gr::buffer_single_mapped::input_blocked_callback_logic (int items_required, int items_avail, unsigned read_index, char *buffer_ptr, mem_func_t const &memcpy_func, mem_func_t const &memmove_func) input_blocked_callback_logic gr::buffer_single_mapped::input_blocked_callback_logic int items_required int items_avail unsigned read_index char * buffer_ptr mem_func_t const & memcpy_func mem_func_t const & memmove_func

Abstracted logic for the input blocked callback function.

This function contains the logic for the input blocked callback however the data adjustment portion of the callback has been abstracted to allow the caller to pass in the desired buffer and corresponding buffer manipulation functions (memcpy and memmove).

The input blocked callback is called when a reader needs to read more data than is available in a buffer and the available data is located at the end of the buffer. The input blocked callback will attempt to move any data located at the beginning of the buffer "down", and will then attempt to copy from the end of the buffer back to the beginning of the buffer. This process explicitly handles wrapping for a single mapped buffer and will realign the data at the beginning of the buffer such that the reader is able to read the available data and becomes unblocked.

items_required

is the number of items required by the reader

items_avail

is the number of items available

read_index

is the current read index of the buffer reader caller

buffer_ptr

is the pointer to the desired buffer

memcpy_func

is a pointer to a memcpy function appropriate for the the passed in buffer

memmove_func

is a pointer to a memmove function appropriate for the passed in buffer

bool virtual bool gr::buffer_single_mapped::output_blocked_callback_logic (int output_multiple, bool force, char *buffer_ptr, mem_func_t const &memmove_func) output_blocked_callback_logic gr::buffer_single_mapped::output_blocked_callback_logic int output_multiple bool force char * buffer_ptr mem_func_t const & memmove_func

Abstracted logic for the output blocked callback function.

This function contains the logic for the output blocked callback however the data adjustment portion of the callback has been abstracted to allow the caller to pass in the desired buffer and corresponding buffer manipulation functions (memcpy and memmove).

The output blocked callback is called when a block needs to write data to the end of a single mapped buffer but not enough free space exists to write the data before the end of the buffer is reached. The output blocked callback will attempt to copy data located towards the end of a single mapped buffer back to the beginning of the buffer. This process explicitly handles wrapping for a single mapped buffer and will realign data located at the end of a buffer back to the beginning of the buffer such that the writing block can write its output into the buffer after the existing data.

output_multiple

force

run the callback disregarding the internal checks

buffer_ptr

is the pointer to the desired buffer

memmove_func

is a pointer to a memmove function appropriate for the passed in buffer

A single mapped buffer where wrapping conditions are handled explicitly via input/output_blocked_callback functions called from block_executor.

gr::buffer
gr::buffer_single_mapped
gr::custom_lock_if
gr::host_buffer
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::buffer_single_mapped
d_debug_logger
d_logger
d_buf_owner
d_buffer
gr::custom_lock_if
gr::messages::msg_accepter
gr::msg_accepter
gr::tag_t
key
srcid
value
marked_deleted
std::basic_string< Char >
std::enable_shared_from_this< basic_block >
std::map< pmt::pmt_t, msg_queue_t, msg_queue_comparator >
std::multimap< uint64_t, gr::tag_t >
elements
std::shared_ptr< block >
std::shared_ptr< buffer >
std::shared_ptr< io_signature >
std::shared_ptr< logger >
std::shared_ptr< pmt_base >
std::shared_ptr< rpcbasic_base >
std::string
std::unique_ptr< char[]>
std::vector< gr::buffer_reader * >
elements
p
std::vector< long >
std::vector< rpcbasic_sptr >
elements
p
std::weak_ptr< gr::block >
ptr
- gr::buffer_single_mapped
  _read_pointer
- gr::buffer_single_mapped
  add_item_tag
- gr::buffer_single_mapped
  allocate_buffer
- gr::buffer_single_mapped
  base
- gr::buffer_single_mapped
  buf_owner
- gr::buffer_single_mapped
  buffer
- gr::buffer_single_mapped
  buffer_reader
- gr::buffer_single_mapped
  buffer_single_mapped
- gr::buffer_single_mapped
  bufsize
- gr::buffer_single_mapped
  d_abs_write_offset
- gr::buffer_single_mapped
  d_active_pointer_counter
- gr::buffer_single_mapped
  d_base
- gr::buffer_single_mapped
  d_buf_map_type
- gr::buffer_single_mapped
  d_buf_owner
- gr::buffer_single_mapped
  d_buffer
- gr::buffer_single_mapped
  d_bufsize
- gr::buffer_single_mapped
  d_callback_flag
- gr::buffer_single_mapped
  d_cv
- gr::buffer_single_mapped
  d_debug_logger
- gr::buffer_single_mapped
  d_done
- gr::buffer_single_mapped
  d_downstream_lcm_nitems
- gr::buffer_single_mapped
  d_has_history
- gr::buffer_single_mapped
  d_item_tags
- gr::buffer_single_mapped
  d_last_min_items_read
- gr::buffer_single_mapped
  d_link
- gr::buffer_single_mapped
  d_logger
- gr::buffer_single_mapped
  d_max_reader_delay
- gr::buffer_single_mapped
  d_max_reader_history
- gr::buffer_single_mapped
  d_max_reader_output_multiple
- gr::buffer_single_mapped
  d_mutex
- gr::buffer_single_mapped
  d_readers
- gr::buffer_single_mapped
  d_sizeof_item
- gr::buffer_single_mapped
  d_transfer_type
- gr::buffer_single_mapped
  d_write_index
- gr::buffer_single_mapped
  d_write_multiple
- gr::buffer_single_mapped
  decrement_active
- gr::buffer_single_mapped
  do_allocate_buffer
- gr::buffer_single_mapped
  done
- gr::buffer_single_mapped
  drop_reader
- gr::buffer_single_mapped
  get_downstream_lcm_nitems
- gr::buffer_single_mapped
  get_mapping_type
- gr::buffer_single_mapped
  get_max_reader_output_multiple
- gr::buffer_single_mapped
  get_sizeof_item
- gr::buffer_single_mapped
  get_tags_begin
- gr::buffer_single_mapped
  get_tags_end
- gr::buffer_single_mapped
  get_tags_lower_bound
- gr::buffer_single_mapped
  get_tags_upper_bound
- gr::buffer_single_mapped
  increment_active
- gr::buffer_single_mapped
  index_add
- gr::buffer_single_mapped
  index_sub
- gr::buffer_single_mapped
  input_blkd_cb_ready
- gr::buffer_single_mapped
  input_blocked_callback
- gr::buffer_single_mapped
  input_blocked_callback_logic
- gr::buffer_single_mapped
  link
- gr::buffer_single_mapped
  make_buffer
- gr::buffer_single_mapped
  mutex
- gr::buffer_single_mapped
  nitems_written
- gr::buffer_single_mapped
  nreaders
- gr::buffer_single_mapped
  on_lock
- gr::buffer_single_mapped
  on_unlock
- gr::buffer_single_mapped
  output_blkd_cb_ready
- gr::buffer_single_mapped
  output_blocked_callback
- gr::buffer_single_mapped
  output_blocked_callback_logic
- gr::buffer_single_mapped
  post_work
- gr::buffer_single_mapped
  prune_tags
- gr::buffer_single_mapped
  reader
- gr::buffer_single_mapped
  remove_item_tag
- gr::buffer_single_mapped
  reset_nitem_counter
- gr::buffer_single_mapped
  set_done
- gr::buffer_single_mapped
  set_transfer_type
- gr::buffer_single_mapped
  space_available
- gr::buffer_single_mapped
  update_reader_block_history
- gr::buffer_single_mapped
  update_write_pointer
- gr::buffer_single_mapped
  write_pointer
- gr::buffer_single_mapped
  ~buffer
- gr::buffer_single_mapped
  ~buffer_single_mapped
- gr::buffer_single_mapped
  ~custom_lock_if