Jason Anders wrote:
I have a problem. Let's say that Rx1 stores the output of a
gr.file_source() operation. I want to extract its contents so that I
could access it as an array. You said that I use gr.vector_sink().
However, gr.vector_sink () doesn't take any input arguments.... =(
So basically, how would it know that I want to extract values from the
Rx1 stream when I have other input streams?
Thanks!
On Jan 13, 2008 9:58 PM, Martin Braun < [EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>> wrote:
On Sunday 13 January 2008 13:15:54 Jason Anders wrote:
> Hi! I', quite new to GNU Radio and I was wondering whether I could
> access via index the values obtained after the gr.file_source ()
> command?
>
> I mean, could I retrieve contents just as if it were an array?
Thanks!
You can send it to a gr.vector_sink_* and then get an array using
data().
Martin
Jason,
As Martin said, you need to get the array using data = <vector_sink
object>.data()
To do this, you want to stop the flow graph. In the case of using a file
source, just run the contents of the file through once and the flowgraph
will terminate after an 'fg.wait()'. Then, call the data accessor
function of the vector sink, which returns a list. You can then access
the items of the list like you want.
Tom
_______________________________________________
Discuss-gnuradio mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio