[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Discuss-gnuradio] blks2.synthesis_filterbank
From: |
benjar |
Subject: |
[Discuss-gnuradio] blks2.synthesis_filterbank |
Date: |
Mon, 14 Jan 2008 23:18:15 -0800 (PST) |
Hey guys,
I was wondering if the whole hier_block2 thing was working yet. I tried to
run the blks2.synthesis_filterbank in a manner that seemed appropriate and
got the following error:
terminate called after throwing an instance of 'std::runtime_error'
what(): streams_to_stream(5): insufficient connected output ports (2
needed, 1 connected)
Is this a bug in the filterbank code, or does this have to do with
hier_block2 not working yet?
Any help would be greatly appreciated. Thanks!
-Ben
Here's the source code:
-------------------------
#!/usr/bin/env python
from gnuradio import gr,blks2
import time
class PTestMe(gr.top_block):
def __init__(self):
gr.top_block.__init__(self)
sample_rate = 200
mpoints = 4;
taps = gr.firdes.low_pass(1, # gain
1, # rate
1.0/mpoints * 0.5, # cutoff
1.0/mpoints * 0.1, # trans width
gr.firdes.WIN_HANN)
self.synth = blks2.synthesis_filterbank(mpoints,taps)
self.src0 = gr.sig_source_c (sample_rate, gr.GR_SIN_WAVE, 10, 1.0)
self.src1 = gr.null_source(gr.sizeof_gr_complex)
self.src2 = gr.null_source(gr.sizeof_gr_complex)
self.src3 = gr.null_source(gr.sizeof_gr_complex)
self.thr = gr.throttle(gr.sizeof_gr_complex, sample_rate)
self.dst = gr.file_sink( gr.sizeof_gr_complex,'bentest.dat')
#self.dst = gr.vector_sink_c()
self.connect(self.src0,(self.synth,0))
self.connect(self.src1,(self.synth,1))
self.connect(self.src2,(self.synth,2))
self.connect(self.src3,(self.synth,3))
self.connect(self.synth,self.thr,self.dst)
if __name__ == '__main__':
test = PTestMe();
test.start()
time.sleep(1)
test.stop()
--
View this message in context:
http://www.nabble.com/blks2.synthesis_filterbank-tp14833066p14833066.html
Sent from the GnuRadio mailing list archive at Nabble.com.
- [Discuss-gnuradio] blks2.synthesis_filterbank,
benjar <=