|
From: | Marcus Müller |
Subject: | Re: [Discuss-gnuradio] GNURadio OOT add custom function |
Date: | Sun, 03 Aug 2014 10:38:49 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 |
Hi Jeff Guo, 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 |
[Prev in Thread] | Current Thread | [Next in Thread] |