I’ve been wrestling with the float vector sink for a couple of days now.
We’re trying to give our python script access to the values being output
our narrow filter, but no matter what happens, the vector sink block
seem to be giving out anything.
Our code is as follows:
from gnuradio import gr, usrp
def __init__(self): self.fg = gr.flow_graph () self.u = usrp.source_c() self.complex_mag = gr.complex_to_mag_squared() self.iir_filt = gr.single_pole_iir_filter_ff(0.5) self.dest = gr.vector_sink_f() self.u.tune(0, self.u.db, 2.4e9) #Connect all of the blocks together self.fg.connect(self.u, self.complex_mag, self.iir_filt,
testgraph = carrier_sense() testgraph.fg.start() print testgraph.dest.data()
if name == ‘main’:
Trying to run this code gives us this printed output : ()
Our logic was that since the output of the single_pole_iir_filter is a
float, we could simply attach the vector_sink_c block to the end of it.
get the same results when attaching the sink to the complex_mag block,
complex vector sink to the usrp board.