discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] Problems when trying to make out of tree modules


From: Su Li
Subject: Re: [Discuss-gnuradio] Problems when trying to make out of tree modules
Date: Wed, 13 May 2015 19:11:15 +0200

Hi Marcus,

Thank you for your reply.

The source files are added to the CMakeLists.text files. But they are not added by my self, they are added when I use "gr_modtool add -t general my_block" and "gr_modtool makexml my_block" to make a new block and xml file.

Only the my_block.h file in include directory contains API 

class MY_MODULE_API my_block : virtual public gr::block
{
...
}

Could you please tell me how to check the API property for the block? Thanks in advance.

Best regards,

Su



2015-05-13 18:47 GMT+02:00 Marcus Müller <address@hidden>:
Hi Su Li,

have you added the new source files to the CMakeLists.txt in lib, include and grc?
Do these block have the YOURMODULE_API property?

Best regards,
Marcus


On 05/13/2015 06:38 PM, Su Li wrote:
Dear All,

I am trying to make an out of tree module by following the tutorial on Gnu radio website. I can write simple blocks in C++, compile it and install it to it usable in Gnuradio company.

But for some complex block, I want to implement them based on the gnuradio build-in blocks, for example, clock_recovery_mm_ff. So I make a new block in my out-of-tree module and try to first "copy" the build-in block into my out-of-tree module.

I changed the following 4 files in my OOT module to match the corresponding files of the build-in block:

lib/my_block_impl.cc  
lib/my_block_impl.h
include/my_block.h
grc/my_block.xml

In each file, I changed all the "clock_recovery_mm_ff" into "my_block".

I can successfully make and install the block without error and warring. But when I try to run the grc graph, an error happens. 

AttributeError: 'module' object has no attribute 'my_block'.

Anyone can tell me what I should do to correct this error? Is there any other files I should change?

When I make simple blocks by myself, I only change this 4 files and it works.

Best regards,

Su Li


_______________________________________________
Discuss-gnuradio mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


_______________________________________________
Discuss-gnuradio mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio



reply via email to

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