Creating Python OOT with gr-modtool: Difference between revisions

From GNU Radio
Jump to navigation Jump to search
No edit summary
No edit summary
Line 10: Line 10:
<pre>$ cd $HOME</pre>
<pre>$ cd $HOME</pre>


GNU Radio comes packaged with ''gr_modtool'', software used to create out-of-tree (OOT) modules. An OOT module can be thought of as a collection of custom GNU Radio blocks. Using ''gr_modtool'', create an OOT module named ''ootmodule'':
GNU Radio comes packaged with ''gr_modtool'', software used to create out-of-tree (OOT) modules. An OOT module can be thought of as a collection of custom GNU Radio blocks. Using ''gr_modtool'', create an OOT module named ''customootmodule'':


<pre>$ gr_modtool newmod ootmodule</pre>
<pre>$ gr_modtool newmod customootmodule</pre>


The directory ''gr-ootmodule'' is created which contains all of the skeleton code for an OOT module, however it does not yet have any blocks.
The directory ''gr-customootmodule'' is created which contains all of the skeleton code for an OOT module, however it does not yet have any blocks.




Move into the directory:
Move into the directory:
<pre>$ cd gr-ootmodule</pre>
<pre>$ cd gr-customootmodule</pre>


List all of the files and directories within the OOT module:
List all of the files and directories within the OOT module:
Line 33: Line 33:
Given a questionaire about how to define the block.
Given a questionaire about how to define the block.


GNU Radio module name identified: ootmodule
GNU Radio module name identified: customootmodule
('sink', 'source', 'sync', 'decimator', 'interpolator', 'general', 'tagged_stream', 'hier', 'noblock')
('sink', 'source', 'sync', 'decimator', 'interpolator', 'general', 'tagged_stream', 'hier', 'noblock')

Revision as of 16:45, 8 March 2022


TODO: fill out some introductory info TODO: add the tutorial naviation bar TODO: add this tutorial to the nav bar

This tutorial was written using GNU Radio v3.10.1.1.

Open a terminal and navigate to an appropriate directory, such as the home directory:

$ cd $HOME

GNU Radio comes packaged with gr_modtool, software used to create out-of-tree (OOT) modules. An OOT module can be thought of as a collection of custom GNU Radio blocks. Using gr_modtool, create an OOT module named customootmodule:

$ gr_modtool newmod customootmodule

The directory gr-customootmodule is created which contains all of the skeleton code for an OOT module, however it does not yet have any blocks.


Move into the directory:

$ cd gr-customootmodule

List all of the files and directories within the OOT module:

$ ls

The directory listing will be as follows:

apps/  cmake/  CMakeLists.txt  docs/  examples/  grc/  include/  lib/  MANIFEST.md  python/

now need to create a block within the OOT module. the block to be created will either add or subtract based on an input parameter.

$ gr_modtool add addSubtractSelector

Given a questionaire about how to define the block.

GNU Radio module name identified: customootmodule ('sink', 'source', 'sync', 'decimator', 'interpolator', 'general', 'tagged_stream', 'hier', 'noblock')