[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Discuss-gnuradio] Sub-classing a block defined in an _impl class
From: |
Daniele Nicolodi |
Subject: |
Re: [Discuss-gnuradio] Sub-classing a block defined in an _impl class |
Date: |
Fri, 10 Oct 2014 12:36:28 +0200 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:31.0) Gecko/20100101 Thunderbird/31.1.2 |
On 10/10/14 12:25, Johannes Demel wrote:
> _impl classes are not meant to be subclassed usually.
> GR distinguishes between interface or public headers, which are
> located in the include directory and private headers which are located
> in the lib directory.
> You can just add new classes to your lib folder and use them within
> this folder. But if you want to export these classes and make them
> accessable from Python, you need a public header for it.
That was my understanding. What I still don't understand is why things
are done in this way.
> On 10.10.2014 12:03, Daniele Nicolodi wrote:
>> The case at hand is subclassing gr::analog::pll_carriertracking_cc
>> changing the phase_detector() method to use the regular atan2()
>> instead of the fast version.
>
> You may just change this in GR directly. You have a personal copy of
> the code so there is nothing that should contradict this approach.
> Unless you want to compare the two but even then you should be able to
> accomplish that.
Changing GNURadio code directly makes is very hard to redistribute my
code, and I would like to retain the possibility to use the original
GNURadio block.
I don't have a problem copying over the code and changing the methods I
want to change, it just does not feel as the most elegant solution.
Cheers,
Daniele