discuss-gnuradio
[Top][All Lists]
Advanced

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

[Discuss-gnuradio] Error in using Accessor method in GNU Radio 3.7. Attr


From: kunal.2904
Subject: [Discuss-gnuradio] Error in using Accessor method in GNU Radio 3.7. AttributeError: Object has no attribute
Date: Mon, 31 Oct 2016 13:33:23 -0700 (MST)

Hello Members,

I am using GNU Radio 3.7.10.1 and have created a new OOT module using
gr_modtool. 
I have created two blocks 1) Random Phase Perturbation 2) Apply BF weight,
again using gr_modtool 

My goal is to update the parameter 'bf_weight' of Apply BF weight block
using the function probe
with function poll_complex_gain() defined in the block Random Phase
Perturbation.

Block: Random Phase Perturbation 

This block has accessor method "poll_complex_gain" defined in its
randphpert4_f_impl.h file as below:

gr_complex poll_complex_gain() const { return d_complex_gain;}


While running GRC, I am getting below run-time error:

Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.7/threading.py", line 754, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/home/genesys/Documents/EnergyHarvesting-Project/top_block.py", line
80, in _bf_weight_probe
    val = self.EnergyBeamforming_randphpert4_f_0.poll_complex_gain()
AttributeError: 'randphpert4_f_sptr' object has no attribute
'poll_complex_gain'



While searching for similar problems, I found a solution in the thread
https://lists.gnu.org/archive/html/discuss-gnuradio/2014-06/msg00152.html,
which mentioned 
to add the accessor in the include/*.h file as a virtual member function
I defined virtual function poll_complex_gain in randphpert4_f.h file as
below
virtual gr_complex poll_complex_gain() const { return d_complex_gain; } 
But, I am still getting the same error as above.

Please let me know, where am I making mistake. 
Any help would be appreciated. 


Thanks in advance. 

Regards,
Kunal Sankhe <http://gnuradio.4.n7.nabble.com/file/n61857/BlockDiagram.png> 



--
View this message in context: 
http://gnuradio.4.n7.nabble.com/Error-in-using-Accessor-method-in-GNU-Radio-3-7-AttributeError-Object-has-no-attribute-tp61857.html
Sent from the GnuRadio mailing list archive at Nabble.com.



reply via email to

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