On Mon, Mar 29, 2010 at 10:43:08AM +0200, Axel Belliard wrote: > Hi, > > Thanks for taking the time to reply. I changed my code to print the data > after the constuctor. But it is still not working. I guess, I 'm doing > something else wrong.
Have you looked at any of the qa_*.py code? That code makes extensive use of vector_source's and vector_sink's. Eric > The changed code : > #####################My top block############################ > > > from gnuradio import gr > from Trameur_stanag import Trameur > class top(gr.top_block): > def __init__(self): gr.top_block.__init__(self) > > self.src_data = > (1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, > 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 > ,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, > 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1) > > > self.in_data = gr.vector_source_b(self.src_data) self.tramage = > Trameur () > self.sink2=gr.vector_sink() > > self.connect( self.in_data, self.tramage) self.connect(self.tramage, > self.sink2) > def print_data(self) > print "out" , self.sink2.data() > >> if __name__ == '__main__': try: > >> tb = top() > tb.run() > tb.print_data() > except KeyboardInterrupt: pass > > _______________________________________________ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org http://lists.gnu.org/mailman/listinfo/discuss-gnuradio