On Mon, May 21, 2012 at 12:19 AM, ambily joseph <josephamb...@gmail.com> wrote:
> Sir
>
> I am trying to build an SID SDR receiver,,where i require a file sink...
> When i run my flow graph,,i get a file of format octet-stream being written
> into my computer.
> But i am not able to access or open my dat octet-stream file.
> Sir may i know how can i access the data being written into it?
>
> Thank you
>
> _______________________________________________
> Discuss-gnuradio mailing list
> Discuss-gnuradio@gnu.org
> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
>
The file sink is just a dump of the data stream. If the data stream
content was simple bytes then the content of the file is
straightforward. If the data stream contained complex numbers then the
file will contain a list of complex numbers where each complex number
is given by two floats and each float by (usually) 4 bytes.

See the files gnuradio/gnuradio-core/src/lib/io/gr_file_sink.cc and
gr_file_source.cc for the implementations of the gnuradio file reading
and writing blocks.

You could also use python and gnuradio to convert the files into some
other format.

from gnuradio import gr
# Assuming the data stream was complex numbers.
src = gr.file_source(gr.sizeof_gr_complex, "the_file_name")
snk = gr.vector_sink_c()
tb = gr.top_block()
tb.connect(src, snk)
tb.run()
# The complex numbers are then accessible as a python list.
data = snk.data()

Ben

_______________________________________________
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

Reply via email to