Search code examples
c++gnuradio

Where is the PSK block for gnuradio in c++ headers?


Background: I have a project which must be written entirely in c++ (i.e. not using python--this probably seems like a silly requirement but it is out of my control). My thought is that I will use the gnuradio companion to help me figure out the radio design and generate prototype code, but I need to be able to transfer that over to c++ somehow.

The first thing I noticed is that whereas the gnuradio companion has blocks that handle psk (PSK Mod), I have been unable to find the corresponding class in the header files. Is there a class that I am missing, or is the PSK Mod block derived from other blocks somehow?


Solution

  • PSK Mod is defined at gr-digital/python/digital/psk.py. There you will find out that actually the PSK Mod creates a hierarchical block derived from the generic modulator class located at gr-digital/python/digital/generic_mod_demod.py

    A hierarchical block is an abstract block that contains several blocks connected with each other. To find out more about the different types of blocks in GNU Radio, I'd recommend going through the Guided Tutorials, where the different types are highlighted throughout the first three chapters.

    In the generic_mod class you will find all the blocks that construct your PSK modulator depending the parameters passed at the constructor.

    After you find the blocks that you are interested in, you can search for the block's C++ implementation. Package names should give a hint about the folders that you should search.

    Eg. digital package sources are located in gr-digital folder whereas blocks package at gr-blocks folder of GNU Radio source.