Embedded Python Block: Difference between revisions

From GNU Radio
Jump to navigation Jump to search
No edit summary
No edit summary
Line 5: Line 5:


When you update the Python code, as long as there are no errors the block will automatically update.  If you are adding new code and it seems like nothing is changing, there is probably an error in your code.
When you update the Python code, as long as there are no errors the block will automatically update.  If you are adding new code and it seems like nothing is changing, there is probably an error in your code.
== Parameters ==
(''R''): <span class="plainlinks">[https://wiki.gnuradio.org/index.php/GNURadioCompanion#Variable_Controls ''Run-time adjustable'']</span>
; Param 1 (''R'')
: Description of parameter, provide any tips or recommended values.  Note that the name of the parameter above should match the param's label that shows up in grc (e.g. Sample Rate).
; Param 2
: blah blah blah
== Example Flowgraph ==
Insert description of flowgraph here, then show a screenshot of the flowgraph and the output if there is an interesting GUI.  Currently we have no standard method of uploading the actual flowgraph to the wiki or git repo, unfortunately.  The plan is to have an example flowgraph showing how the block might be used, for every block, and the flowgraphs will live in the git repo.

Revision as of 10:52, 20 July 2019

Allows you to create a new (custom) block, in Python, without needing to make and install an Out of Tree Module (OOT). The example block simply takes the input stream and multiplies it by a constant.

For some platforms the open with Default Text Editor button may do nothing, in which case you have to manually choose the text editor.

When you update the Python code, as long as there are no errors the block will automatically update. If you are adding new code and it seems like nothing is changing, there is probably an error in your code.

Parameters

(R): Run-time adjustable

Param 1 (R)
Description of parameter, provide any tips or recommended values. Note that the name of the parameter above should match the param's label that shows up in grc (e.g. Sample Rate).
Param 2
blah blah blah

Example Flowgraph

Insert description of flowgraph here, then show a screenshot of the flowgraph and the output if there is an interesting GUI. Currently we have no standard method of uploading the actual flowgraph to the wiki or git repo, unfortunately. The plan is to have an example flowgraph showing how the block might be used, for every block, and the flowgraphs will live in the git repo.