discuss-gnuradio
[Top][All Lists]
Advanced

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

[Discuss-gnuradio] Possible misuse of the vector sink


From: Michael Ford
Subject: [Discuss-gnuradio] Possible misuse of the vector sink
Date: Mon, 18 Sep 2006 22:47:23 -0500

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 by our narrow filter, but no matter what happens, the vector sink block doesn't seem to be giving out anything.

Our code is as follows:

from gnuradio import gr, usrp

class carrier_sense:

    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[0][0], 2.4e9)
        #Connect all of the blocks together
        self.fg.connect(self.u, self.complex_mag, self.iir_filt, self.dest)

def main():
  
    testgraph = carrier_sense()
    testgraph.fg.start()
    print testgraph.dest.data()


if __name__ == '__main__':
    try:
        main()
    except KeyboardInterrupt:
        pass



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.  We get the same results when attaching the sink to the complex_mag block, or a complex vector sink to the usrp board.

reply via email to

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