discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: Adding custom function in OOT module


From: Martin Luelf
Subject: Re: Adding custom function in OOT module
Date: Mon, 11 Oct 2021 08:03:28 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0


Dear Wei,
which GNURadio version are you using?

On 3.9 you need to update the python bindings for your block (assuming you have a python flowgraph).

Before 3.8 you need to make sure that the SWIG bindings that GNURadio generates are updated (which should happen automatically, but for me they get stuck sometimes). Try deleting the build folder and build your OOT again from scratch.

Yours
Martin


On 10.10.21 23:30, Huang Wei wrote:
Hi group,

It could be a simple question, but I could not find the solution. I am writing my own OOT C++ module, I want to add a function get_value() in the block, so I can use Function Probe to read value in the block through this function.
so in the lib/my_block_impl.cc, I added:
double my_block_impl::get_value()
{
    return value_global;
}
int my_block_impl::work(...)
{
    ...
}

in lib/my_block_impl.h, I added:
Public:
   double get_value() override;

and in include/tootl/my_block.h, I added:
Public:
   virtual double get_value() = 0;

Then I did: make, sudo make install and sudo ldconfig.
But when I run the flowgraph, it keeps saying that "my_block_sptr" object has no attribute "get_value". where I made the mistake?
Thank you very much for your help!

Regards,
Wei



reply via email to

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