[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Discuss-gnuradio] Adding Accessor Methods in GR 3.7
From: |
Martin Braun |
Subject: |
Re: [Discuss-gnuradio] Adding Accessor Methods in GR 3.7 |
Date: |
Fri, 06 Jun 2014 19:50:32 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 |
On 06/06/2014 07:44 PM, Ed Criscuolo wrote:
> I've recently converted to GR 3.7, and am currently on 3.7.3.
Welcome :)
> I have created and run a new block in C++, but now want to add
> an accessor method to the block's class. I defined it in
> <new_class_name>_impl.h , in the public part of the
> class declaration as follows:
>
> float get_samples_per_second(void)
> {
> return d_samples_per_second;
> }
>
> This compiles fine, but when I try to access it from
> GRC via a function probe, I get:
>
> AttributeError: 'acq_test_1_cc_sptr' object has no attribute
> 'get_samples_per_second'
>
>
> Is there some additional 3.7 swig magic I have to go through
> to make this accessor available from python?
You also need to add the accessor in the include/*.h file as a virtual
member function.
M
- [Discuss-gnuradio] Adding Accessor Methods in GR 3.7, Ed Criscuolo, 2014/06/06
- Re: [Discuss-gnuradio] Adding Accessor Methods in GR 3.7,
Martin Braun <=
- Re: [Discuss-gnuradio] Adding Accessor Methods in GR 3.7, Ed Criscuolo, 2014/06/06
- Re: [Discuss-gnuradio] Adding Accessor Methods in GR 3.7, Ed Criscuolo, 2014/06/06
- Re: [Discuss-gnuradio] Adding Accessor Methods in GR 3.7, Tom Rondeau, 2014/06/06
- Re: [Discuss-gnuradio] Adding Accessor Methods in GR 3.7, Ed Criscuolo, 2014/06/06
- Re: [Discuss-gnuradio] Adding Accessor Methods in GR 3.7, Tom Rondeau, 2014/06/06
- Re: [Discuss-gnuradio] Adding Accessor Methods in GR 3.7, Ed Criscuolo, 2014/06/06