New module constructor

We have created a lfm_source_c module. Ran the cmake …/, make, sudo
make
install, and sudo ldconfig commands. All worked fine. When attempting to
use our new block in python, we received the following error about a
constructor not being defined. I’m assuming there is just something
small
wrong with the swig file (gr_modtool.py generated). Our block has 6
parameters, all of which are doubles, but the last which is a
gr_complex.
We have constructors defined in the .h and .cc files.
Any ideas of how to fix this problem?

Error:
Traceback (most recent call last):
File “chirp_test.py”, line 72, in
tx_sink().run()
File “chirp_test.py”, line 50, in init
sig0 = tx_test(options.samp_rate)
File “chirp_test.py”, line 18, in init
src = radar2.lfm_source_c(sample_rate,10.0,1.0,10000000.0,2.0,0)
File “/usr/local/lib/python2.7/dist-packages/radar2/radar2_swig.py”,
line
319, in init
def init(self, *args, **kwargs): raise AttributeError(“No
constructor defined”)
AttributeError: No constructor defined

Thanks,
ONU GNU Radio

On Fri, Mar 15, 2013 at 11:36:57AM -0400, Brooke H. wrote:

We have created a lfm_source_c module. Ran the cmake …/, make, sudo make
install, and sudo ldconfig commands. All worked fine. When attempting to use
our new block in python, we received the following error about a constructor
not being defined. I’m assuming there is just something small wrong with the
swig file (gr_modtool.py generated). Our block has 6 parameters, all of which
are doubles, but the last which is a gr_complex. We have constructors defined
in the .h and .cc files.

Any ideas of how to fix this problem?

Not without seeing the troublesome code.
gr_modtool simply puts ‘include’ commands into the .i-file, so I doubt
that’s the problem.

MB

File “/usr/local/lib/python2.7/dist-packages/radar2/radar2_swig.py”, line
319, in init
def init(self, *args, **kwargs): raise AttributeError(“No constructor
defined”)
AttributeError: No constructor defined

Thanks,

ONU GNU Radio


Discuss-gnuradio mailing list
[email protected]
Discuss-gnuradio Info Page


Karlsruhe Institute of Technology (KIT)
Communications Engineering Lab (CEL)

Dipl.-Ing. Martin B.
Research Associate

Kaiserstraße 12
Building 05.01
76131 Karlsruhe

Phone: +49 721 608-43790
Fax: +49 721 608-46071
www.cel.kit.edu

KIT – University of the State of Baden-Württemberg and
National Laboratory of the Helmholtz Association