User:MarcusMueller/Message Debug

From GNU Radio
Jump to navigation Jump to search

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 message input ports of this debug block.

The message ports are, if not showing the extended logging levels

log (new in 3.11)
Uses the GNU Radio logging system to print the message contents. This is probably the input you want.
print
Prints the message directly to standard out; verbose, not logged to any configured logging backends. You can suppress the printing of PDU data blob contents with the "Print PDU contents" option.
store
Stores the message in an internal vector. It works in conjunction with a message_debug::get_message(size_t i) call that allows us to retrieve message i afterwards.
print_pdu (deprecated since 3.10, might be removed)
Print the contents of the PDU (if a PDU)

Parameters

Print PDU contents
Prints a hexdump of the contents of PDUs; if not set, only print the meta description and length
Log level (new in 3.11)
sets the log level to trace, debug, info, warning, error or critical


Example Flowgraph

This program illustrates the usage of two messages debugs to log things at different log levels.

Message debug.png

yielding this output:

message_debug :info: Message: ((name . Throughput) (rate_now . 1.18012e+09) (rate_avg . 1.18012e+09))
message_debug :info: Message: ((name . Throughput) (rate_now . 1.14209e+09) (rate_avg . 1.17441e+09))
message_debug :info: Message: ((name . Throughput) (rate_now . 1.08271e+09) (rate_avg . 1.16066e+09))
message_debug :info: Message: ((name . Throughput) (rate_now . 1.09153e+09) (rate_avg . 1.15029e+09))
message_debug :info: Message: TEST
message_debug :info: Message: ((name . Throughput) (rate_now . 1.05336e+09) (rate_avg . 1.13575e+09))
message_debug :info: Message: ((name . Throughput) (rate_now . 1.06578e+09) (rate_avg . 1.12525e+09))
message_debug :info: Message: ((name . Throughput) (rate_now . 1.06676e+09) (rate_avg . 1.11648e+09))
message_debug :info: Message: ((name . Throughput) (rate_now . 1.12334e+09) (rate_avg . 1.11751e+09))
message_debug :info: Message: ((name . Throughput) (rate_now . 1.09542e+09) (rate_avg . 1.1142e+09))
message_debug :info: Message: ((name . Throughput) (rate_now . 1.00273e+09) (rate_avg . 1.09748e+09))
message_debug :info: Message: TEST
message_debug :info: Message: ((name . Throughput) (rate_now . 1.03877e+09) (rate_avg . 1.08867e+09))
message_debug :info: Message: ((name . Throughput) (rate_now . 1.0601e+09) (rate_avg . 1.08438e+09))
message_debug :info: Message: ((name . Throughput) (rate_now . 1.15669e+09) (rate_avg . 1.09523e+09))
message_debug :info: Message: ((name . Throughput) (rate_now . 1.14234e+09) (rate_avg . 1.1023e+09))
message_debug :info: Message: ((name . Throughput) (rate_now . 1.12055e+09) (rate_avg . 1.10503e+09))
message_debug :info: Message: TEST
message_debug :info: Message: ((name . Throughput) (rate_now . 1.13489e+09) (rate_avg . 1.10951e+09))
message_debug :info: Message: ((name . Throughput) (rate_now . 1.13598e+09) (rate_avg . 1.11348e+09))
message_debug :info: Message: ((name . Throughput) (rate_now . 1.15385e+09) (rate_avg . 1.11954e+09))
message_debug :info: Message: ((name . Throughput) (rate_now . 1.16601e+09) (rate_avg . 1.12651e+09))
message_debug :critical: Message: rare event
message_debug :info: Message: ((name . Throughput) (rate_now . 1.16408e+09) (rate_avg . 1.13214e+09))
message_debug :info: Message: TEST
message_debug :info: Message: ((name . Throug ……

Source Files

C++ files
[1]
Header files
[2]
Public header files
[3]
Block definition
[4]
Example flowgraphs
[5]
[6]