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: Huang Wei
Subject: Re: Adding custom function in OOT module
Date: Mon, 11 Oct 2021 09:21:50 +0100

Dear Martin,

Mine is 3.8. It works now after I deleted the build folder and rebuilt again!
I appreciate your help very much!

Best regards,
Wei

Martin Luelf <mail@mluelf.de> 于2021年10月11日周一 上午7:04写道:

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]