discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] Extending a GNU Radio block with use of inheritan


From: Piotr Krysik
Subject: Re: [Discuss-gnuradio] Extending a GNU Radio block with use of inheritance
Date: Thu, 2 Jun 2016 11:47:22 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0

        

        

        

        


W dniu 02.06.2016 o 10:46, Andrej Rode pisze:
> Hello Piotr,
>
>
> > Is it possible to do what I want with use of inheritance? If yes -
> > how to do it so I wouldn't have to copy the code?
>
> If your extension of the block is a general enhancement someone else
> could make use of. It is best to directly modify the general_work
> function of the block and contribute back your results.
>
> If your extension is specialized for your use case take a look at
> $(class)_impl. It should be possible to inherit from
> fractional_resampler_impl and then reimplement or modify the functions
> you want to extend.
>
> Maybe there is some other, even better way of achieving your goal I
> don't know yet.
>
> Best Regards,
> Andrej
Hi Andrej,

There are cases when my modifications could benefit others (on a side
note: in my opinion what would benefit everyone would be ability to
access setters of all of the blocks with use of stream tags and
messages), but there are also cases when I want to add some
modifications specific to my project and it doesn't make sense to even
try to make these changes included in the GNU Radio.

If I can inherit from *_impl classes - are you able to present how to do
it? *_impl.h headers are not installed together with GNU Radio so I'm
not able include them. And this is just a start - then I don't know how
prepare CMake files so derived class is linked correctly, and how to
prepare SWIG input file. If you are able to spare some time to describe
it I would greatly appreciate that.

Best Regards,
Piotr






reply via email to

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