George,
all the usual linking and compilation rules of C++ apply. There are plenty of blocks that call other functions from general_work() or work(). If you're compiling a-OK, then you're probably halfway there. Your QA code should tell you what's missing, if it's a missing symbol (i.e. linker error) or something more profane.
--M
On Thu, Aug 20, 2020 at 5:56 AM George Edwards <gedwards.eng@gmail.com> wrote:
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_modtoolnamespace gr {namespace tutorial {gr_complexMy_ProgramName_impl::my_function_name(param){// my signal processing algorithm goes here}} //namespace tutorial} //namespace grI 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
No comments:
Post a Comment