GNU Radio 3.7.1 C++ API
gr::blocks::message_debug Class Reference

Debug block for the message passing system. More...

#include <message_debug.h>

Inheritance diagram for gr::blocks::message_debug:

List of all members.

Public Types

typedef boost::shared_ptr
< message_debug
sptr

Public Member Functions

virtual int num_messages ()=0
 Reports the number of messages received by this block.
virtual pmt::pmt_t get_message (int i)=0
 Get a message (as a PMT) from the message vector at index i.

Static Public Member Functions

static sptr make ()
 Build the message debug block. It takes no parameters and has three message ports: print, store, and print_pdu.

Detailed Description

Debug block for the message passing system.

The message debug block is used to capture and print or store messages as they are received. Any block that generates a message may connect that message port to one or more of the three message input ports of this debug block. The message ports are:

  • print: prints the message directly to standard out.
  • store: stores the message in an internal vector. May be access using the get_message function.
  • print_pdu: specifically designed to handle formatted PDUs (see pdu.h).

Member Typedef Documentation


Member Function Documentation

virtual pmt::pmt_t gr::blocks::message_debug::get_message ( int  i) [pure virtual]

Get a message (as a PMT) from the message vector at index i.

Messages passed to the 'store' port will be stored in a vector. This function retrieves those messages by index. They are index in order of when they were received (all messages are just pushed onto the back of a vector). This is mostly useful in debugging message passing graphs and in QA code.

Parameters:
iThe index in the vector for the message to retrieve.
Returns:
a message at index i as a pmt_t.

Build the message debug block. It takes no parameters and has three message ports: print, store, and print_pdu.

virtual int gr::blocks::message_debug::num_messages ( ) [pure virtual]

Reports the number of messages received by this block.


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