Message Pair to Var: Difference between revisions

From GNU Radio
Jump to navigation Jump to search
(initial creation)
 
(add detail)
Line 5: Line 5:


; Variable
; Variable
: dtype: string; default: 'freq'
: Name of the variable to be set. type: string; default: 'freq'


== Messages ==
== Messages ==
Input message pairs are of the form (<name> . <value>). More information can be found in [[Polymorphic_Types_(PMTs)#Pairs|PMT Pairs]].


== Example Flowgraph ==
== Example Flowgraph ==
In this flowgraph, the input message has the name 'value' and the value of 1 or 0. The Message Pair to Var Block Variable has the value "pressed", so it sets the variable "pressed" to 1. The [[QT_GUI_Label]] displays the value of "pressed".
[[File:Msg_pair_to_var_fg.png]]


== Example Output ==
== Example Output ==
[[File:Msg_pair_to_var_out.png]]


== Source Files ==
== Source Files ==

Revision as of 13:11, 11 February 2021

This block converts an input message pair to the value of a gnuradio variable.

Parameters

(R): Run-time adjustable

Variable
Name of the variable to be set. type: string; default: 'freq'

Messages

Input message pairs are of the form (<name> . <value>). More information can be found in PMT Pairs.

Example Flowgraph

In this flowgraph, the input message has the name 'value' and the value of 1 or 0. The Message Pair to Var Block Variable has the value "pressed", so it sets the variable "pressed" to 1. The QT_GUI_Label displays the value of "pressed".

Msg pair to var fg.png

Example Output

Msg pair to var out.png

Source Files

C++ files
TODO
Header files
TODO
Public header files
TODO
Block definition
TODO