discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to write Gnuradion OOT C++ method as a stand alone .cc file?


From: George Edwards
Subject: How to write Gnuradion OOT C++ method as a stand alone .cc file?
Date: Wed, 19 Aug 2020 21:55:48 -0600

Hello,

I am experimenting with writing an OOT method in a separate .cc file to be called by the general_work method that Gnuradio automatically generates when one uses the gr_modtool to create an OOT module. In general if the method is short, it is convenient to write its definition about the general_work method which called it. However, if the signal processing makes the method long with too many lines of code, then it is better to create a separate .cc file for the function. I made the additional .cc file and wrapped the method in a similar manner to how the gr_modtool  wraps the .cc file My_ProgramName.cc. The new .cc file shows no errors and I compiled the entire OOT module with: cmake ../ and make. However, when I run the QA test, it breaks the  system. Below is a template showing how I wrote the additional file named, my_function_name.cc:

#include <gnuradio/io_signature.h> 
#include "My_ProgramName.h"      // created by gr_modtool
namespace gr {
namespace tutorial {
gr_complex
 My_ProgramName_impl::my_function_name(param)
       {
       // my signal processing algorithm goes here
        }
   }  //namespace tutorial
}     //namespace gr

I will appreciate your feedback or help, so I can get my method to work and not break the system when I run the QA test.

Thank you!

George

reply via email to

[Prev in Thread] Current Thread [Next in Thread]