did you add your function only to the lib/myblock_impl.{h,cc} or also to include/myblock.h like this:
class MYMODULE_API my_block : public gr::block_type
{
.....
virtual return_type myfunction(int argument0, char argument2...) = 0;
...
};
Greetings,
Marcus
On 03.08.2014 08:25, 奕佑 wrote:
Hello, Recently, I using gr_modtool to create my own block. I add a c++ block and in the .h file I add a function, but after compile it I cannot call my function in python I just get error message "AttributeError: '(My blocks)' object has no attribute '(function)'". I compare my code with other lot code. I have no idea where the problem is, because I don't feel like the c++ code wrong. I guess is swig, but other code also not change anything so I got confused. What is going wrong? Thanks Jeff Guo
_______________________________________________ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
No comments:
Post a Comment