GNU Radio 3.5.1 C++ API
gr_block_detail Class Reference

Implementation details to support the signal processing abstractionThis class contains implementation detail that should be "out of sight" of almost all users of GNU Radio. This decoupling also means that we can make changes to the guts without having to recompile everything. More...

#include <gr_block_detail.h>

List of all members.

Public Member Functions

 ~gr_block_detail ()
int ninputs () const
int noutputs () const
bool sink_p () const
bool source_p () const
void set_done (bool done)
bool done () const
void set_input (unsigned int which, gr_buffer_reader_sptr reader)
gr_buffer_reader_sptr input (unsigned int which)
void set_output (unsigned int which, gr_buffer_sptr buffer)
gr_buffer_sptr output (unsigned int which)
void consume (int which_input, int how_many_items)
 Tell the scheduler how_many_items of input stream which_input were consumed.
void consume_each (int how_many_items)
 Tell the scheduler how_many_items were consumed on each input stream.
void produce (int which_output, int how_many_items)
 Tell the scheduler how_many_items were produced on output stream which_output.
void produce_each (int how_many_items)
 Tell the scheduler how_many_items were produced on each output stream.
void _post (pmt::pmt_t msg)
uint64_t nitems_read (unsigned int which_input)
uint64_t nitems_written (unsigned int which_output)
void add_item_tag (unsigned int which_output, const gr_tag_t &tag)
 Adds a new tag to the given output stream.
void get_tags_in_range (std::vector< gr_tag_t > &v, unsigned int which_input, uint64_t abs_start, uint64_t abs_end)
 Given a [start,end), returns a vector of all tags in the range.
void get_tags_in_range (std::vector< gr_tag_t > &v, unsigned int which_input, uint64_t abs_start, uint64_t abs_end, const pmt::pmt_t &key)
 Given a [start,end), returns a vector of all tags in the range with a given key.

Public Attributes

gr_tpb_detail d_tpb
int d_produce_or

Friends

struct gr_tpb_detail
GR_CORE_API gr_block_detail_sptr gr_make_block_detail (unsigned int ninputs, unsigned int noutputs)

Detailed Description

Implementation details to support the signal processing abstraction

This class contains implementation detail that should be "out of sight" of almost all users of GNU Radio. This decoupling also means that we can make changes to the guts without having to recompile everything.


Constructor & Destructor Documentation

gr_block_detail::~gr_block_detail ( )

Member Function Documentation

void gr_block_detail::_post ( pmt::pmt_t  msg)

Accept msg, place in queue, arrange for thread to be awakened if it's not already.

void gr_block_detail::add_item_tag ( unsigned int  which_output,
const gr_tag_t tag 
)

Adds a new tag to the given output stream.

This takes the input parameters and builds a PMT tuple from it. It then calls gr_buffer::add_item_tag(pmt::pmt_t t), which appends the tag onto its deque.

Parameters:
which_outputan integer of which output stream to attach the tag
tagthe tag object to add
void gr_block_detail::consume ( int  which_input,
int  how_many_items 
)

Tell the scheduler how_many_items of input stream which_input were consumed.

void gr_block_detail::consume_each ( int  how_many_items)

Tell the scheduler how_many_items were consumed on each input stream.

bool gr_block_detail::done ( ) const [inline]
void gr_block_detail::get_tags_in_range ( std::vector< gr_tag_t > &  v,
unsigned int  which_input,
uint64_t  abs_start,
uint64_t  abs_end 
)

Given a [start,end), returns a vector of all tags in the range.

Pass-through function to gr_buffer_reader to get a vector of tags in given range. Range of counts is from start to end-1.

Tags are tuples of: (item count, source id, key, value)

Parameters:
va vector reference to return tags into
which_inputan integer of which input stream to pull from
abs_starta uint64 count of the start of the range of interest
abs_enda uint64 count of the end of the range of interest
void gr_block_detail::get_tags_in_range ( std::vector< gr_tag_t > &  v,
unsigned int  which_input,
uint64_t  abs_start,
uint64_t  abs_end,
const pmt::pmt_t key 
)

Given a [start,end), returns a vector of all tags in the range with a given key.

Calls get_tags_in_range(which_input, abs_start, abs_end) to get a vector of tags from the buffers. This function then provides a secondary filter to the tags to extract only tags with the given 'key'.

Tags are tuples of: (item count, source id, key, value)

Parameters:
va vector reference to return tags into
which_inputan integer of which input stream to pull from
abs_starta uint64 count of the start of the range of interest
abs_enda uint64 count of the end of the range of interest
keya PMT symbol to select only tags of this key
gr_buffer_reader_sptr gr_block_detail::input ( unsigned int  which) [inline]
int gr_block_detail::ninputs ( ) const [inline]
uint64_t gr_block_detail::nitems_read ( unsigned int  which_input)
uint64_t gr_block_detail::nitems_written ( unsigned int  which_output)
int gr_block_detail::noutputs ( ) const [inline]
gr_buffer_sptr gr_block_detail::output ( unsigned int  which) [inline]
void gr_block_detail::produce ( int  which_output,
int  how_many_items 
)

Tell the scheduler how_many_items were produced on output stream which_output.

void gr_block_detail::produce_each ( int  how_many_items)

Tell the scheduler how_many_items were produced on each output stream.

void gr_block_detail::set_done ( bool  done)
void gr_block_detail::set_input ( unsigned int  which,
gr_buffer_reader_sptr  reader 
)
void gr_block_detail::set_output ( unsigned int  which,
gr_buffer_sptr  buffer 
)
bool gr_block_detail::sink_p ( ) const [inline]
bool gr_block_detail::source_p ( ) const [inline]

Friends And Related Function Documentation

GR_CORE_API gr_block_detail_sptr gr_make_block_detail ( unsigned int  ninputs,
unsigned int  noutputs 
) [friend]
friend struct gr_tpb_detail [friend]

Member Data Documentation


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