Forum: GNU Radio Re: GRC:Suitable Sink required

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Firas A. (Guest)
on 2009-04-20 13:31
(Received via mailing list)
Hi,

> On Mon, 4/20/09, Saleem A. <removed_email_address@domain.invalid> wrote:
> Hi,
> It appears that gr.message_sink and gr..msg_queues are for
> digital data. but my flowgraph (periodogram) is for analog
> samples,

This is not true (see: usrp_spectrum_sense.py).


> complex baseband samples from usrp --> stream to vector
> (vectors of fft_size) --> FFT  --> complex to mag squared  --> (sink or
> block to be determined)
>
> Is their no choice other than file sink?
>
> Thanks


You can use vector sink.

ex:

dst = gr.vector_sink_f()

then you can see the data in this vector by:

print dst.data()


Of course you have to run the graph for a while then stop it before
doing the print.

See :
http://www.mail-archive.com/removed_email_address@...


BR

Firas
Josh B. (Guest)
on 2009-04-20 20:45
(Received via mailing list)
Ahh, no vector sink. The vector sink will queue up samples forever, and
although you can clear the buffer, you will not stay vector aligned with
the fft size.

Vector sink is good for the QA code with a finite number of samples in
and out, but i would definitely not recommend it for dealing with live
data.
This topic is locked and can not be replied to.