GNU Radio 3.6.5 C++ API

gr_tag_debug Class Reference

Bit bucket that prints out any tag received. More...

#include <gr_tag_debug.h>

Inheritance diagram for gr_tag_debug:
gr_sync_block gr_block gr_basic_block gr_msg_accepter gruel::msg_accepter

List of all members.

Public Member Functions

std::vector< gr_tag_tcurrent_tags ()
 Returns a vector of gr_tag_t items as of the last call to work.
void set_display (bool d)
 Set the display of tags to stdout on/off.
int work (int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
 just like gr_block::general_work, only this arranges to call consume_each for you

Friends

GR_CORE_API gr_tag_debug_sptr gr_make_tag_debug (size_t sizeof_stream_item, const std::string &name)

Detailed Description

Bit bucket that prints out any tag received.

This block collects all tags sent to it on all input ports and displays them to stdout in a formatted way. The name parameter is used to identify which debug sink generated the tag, so when connecting a block to this debug sink, an appropriate name is something that identifies the input block.

This block otherwise acts as a NULL sink in that items from the input stream are ignored. It is designed to be able to attach to any block and watch all tags streaming out of that block for debugging purposes.

The tags from the last call to this work function are stored and can be retrieved using the function 'current_tags'.


Member Function Documentation

std::vector<gr_tag_t> gr_tag_debug::current_tags ( )

Returns a vector of gr_tag_t items as of the last call to work.

void gr_tag_debug::set_display ( bool  d)

Set the display of tags to stdout on/off.

int gr_tag_debug::work ( int  noutput_items,
gr_vector_const_void_star input_items,
gr_vector_void_star output_items 
) [virtual]

just like gr_block::general_work, only this arranges to call consume_each for you

The user must override work to define the signal processing code

Implements gr_sync_block.


Friends And Related Function Documentation

GR_CORE_API gr_tag_debug_sptr gr_make_tag_debug ( size_t  sizeof_stream_item,
const std::string &  name 
) [friend]

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