I have mypkg.i that defines the package and the mypkg_phase_cf class. Then there are the associated mypkg_phase_cf.[cc|h] files defining the class. It all compiles properly using the following:
CXXFLAGS = -I$(GNURADIO) -I$(GNURADIO)/swig -I$(PYTHON) LDFLAGS = -lgnuradio-core -lcppunit -lm -lrt -lpthread
swig -c++ -python $(CXXFLAGS) -module mypkg -o mypkg.cc mypkg.i g++ $(CXXFLAGS) -c mypkg.cc -o mypkg.o g++ $(CXXFLAGS) -c mypkg_phase_cf.cc -o mypkg_phase_cf.o
ar rv _mypkg.la mypkg.o mypkg_phase_cf.o ld -shared $(LDFLAGS) -o _mypkg.so -lc mypkg.o mypkg_phase_cf.o
The constructor for mypkg_phase_cf is:
mypkg_phase_cf::mypkg_phase_cf () : gr_block ( "phase_cf", gr_make_io_signature (1,1,sizeof(gr_complex)), gr_make_io_signature (1,1,sizeof(float)) ) {}
In my script I have:
from gnuradio import gr from gnuradio import mypkg ... arctan = mypkg.phase_cf () fg.connect (baseband, arctan) fg.connect (arctan, sink)
When I run the script, everything links happily, and I am able to import the package. However, when I get to "fg.connect (baseband, arctan)", I get the following error:
File "/usr/local/lib/python2.3/site-packages/gnuradio/gr/basic_flow_graph.py", line 180, in _check_port if signature.max_streams () == -1: # infinite AttributeError: 'str' object has no attribute 'max_streams'
Any ideas?
[ t. charles clancy ]--[ [EMAIL PROTECTED] ]--[ www.cs.umd.edu/~clancy ] [ computer science ]-----[ university of maryland | college park ]
_______________________________________________ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org http://lists.gnu.org/mailman/listinfo/discuss-gnuradio