discuss-gnuradio
[Top][All Lists]
Advanced

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

[Discuss-gnuradio] Problem: Reading a file


From: Jason Anders
Subject: [Discuss-gnuradio] Problem: Reading a file
Date: Thu, 24 Jan 2008 13:40:33 +0800



I have a problem reading an ascii file. I tried reading it using gr_file_soucrce and extracted it using gr_vector_sink_f. Then I tried extracting the data by using  <object>.data(); or in short, by using its data member. Unfortunately, I always get an empty list. Why is this so?

Here's a snippet of code to clarify things:

FALSE = bool(0)
yrx1_real = gr.file_source(gr.sizeof_float,{file location},FALSE)
Rx1_real = gr.vector_sink_f()

## FLOW GRAPH CREATION
fg = gr.flow_graph ()
fg.connect (yrx1_real, Rx1_real)
fg.wait()      # Ends the flowgraph... as stated in one of the replies

## Calling the data extracted
Rx1 = Rx1_real.data()
print 'After Data extraction!'
for i in range(0,1):
    print Rx1[i]                      # I always get an empty list here. Why?



reply via email to

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