Creating C++ OOT with gr-modtool: Difference between revisions
Mattcarrick (talk | contribs) |
Mattcarrick (talk | contribs) |
||
Line 62: | Line 62: | ||
Adding file 'grc/customModule_multDivSelector.block.yml'... | Adding file 'grc/customModule_multDivSelector.block.yml'... | ||
Editing grc/CMakeLists.txt...</pre> | Editing grc/CMakeLists.txt...</pre> | ||
== Editing the c++ Code == |
Revision as of 17:32, 9 March 2022
Beginner Tutorials
Introducing GNU Radio Flowgraph Fundamentals
Creating and Modifying Python Blocks DSP Blocks
SDR Hardware |
TODO: intro material
The previous tutorial, Creating Python OOT with gr-modtool, describes how to create a Python block in an OOT module. This c++ OOT tutorial builds upon the previous Python one, so it is is suggested to at least complete the Creating an OOT Module portion of that tutorial before completing this one.
TODO: pick up from python OOT tutorial
TODO: link back to python tutorial
Installation Note
This tutorial was written using GNU Radio v3.10.1.1 on Ubuntu 21.10, installed using the Ubuntu PPA from the Installation Wiki Page. The basic GNU Radio install using:
$ sudo apt-get install gnuradio
does not come with the proper libraries needed to compile and install OOT modules. Consider installing the following packages before continuing:
$ sudo apt-get install gnuradio-dev cmake libspdlog-dev clang-format
Adding a New Block
Move to the gr-customModule directory created in the Creating Python OOT with gr-modtool tutorial:
cd your-path/gr-customModule
Add a new block named multDivSelector:
$ gr_modtool add multDivSelector
The types of blocks will be displayed:
GNU Radio module name identified: customModule ('sink', 'source', 'sync', 'decimator', 'interpolator', 'general', 'tagged_stream', 'hier', 'noblock')
Enter sync as the block type:
Enter block type: sync
Enter cpp as the language:
Language (python/cpp): cpp Language: C++ Block/code identifier: multDivSelector
Enter the name or organization of the copyright holder:
Please specify the copyright holder: YourName
Create a boolean variable selector with a default value of true:
Enter valid argument list, including default arguments: bool selector=true
Select whether or not QA code is desired:
Add Python QA code? [Y/n] n Add C++ QA code? [Y/n] n
Multiple files will then be created or modified:
Adding file 'lib/multDivSelector_impl.h'... Adding file 'lib/multDivSelector_impl.cc'... Adding file 'include/gnuradio/customModule/multDivSelector.h'... Adding file 'python/customModule/bindings/docstrings/multDivSelector_pydoc_template.h'... Adding file 'python/customModule/bindings/multDivSelector_python.cc'... Adding file 'grc/customModule_multDivSelector.block.yml'... Editing grc/CMakeLists.txt...