discuss-gnuradio
[Top][All Lists]
Advanced

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

[Discuss-gnuradio] dealing with framed data


From: Matthieu Imbert
Subject: [Discuss-gnuradio] dealing with framed data
Date: Wed, 23 Apr 2014 17:05:58 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Icedove/24.4.0

Hi,

I'm currently trying to take the output of a fft block and pipe it in a tcp sink for (near) real-time processing outside of gnuradio.

My question is:

Assuming that I have vectors of n floats (the fft block outputs vectors of floats or complexes, so I may need to pipe it to a complex-to-mag2 block to convert it to an array of floats, but that's not the main point of my question here), if I send them directly to the tcp sink, it will become a stream of bytes, and my code outside of gnuradio won't be able to detect the boundaries between vectors of n bytes. Actually it won't even be able to detect the boundaries between floats.

So I need to "frame" the data in a kind of basic protocol. For example: each vector of n floats, insert a m bytes header with a magic identifier, and perhaps a length and/or sequence number.

I'm confused about what technique to use to achieve this, between tagged streams, messages, pdus, packets:

- I tried using tagged stream (with "stream to tagged stream"), and piping it to "Packet Header Generator", but the output of the "packet header generator" seems to be only the packet header, and I don't know how to recombine it with the payload.

- I tried using "tagged stream to pdu", but then I don't know what to do of the pdu output, the only block I found which may input this data type is "Socket PDU" but I don't understand its purpose.

- Or should I use "simple framer"?

I'd appreciate some advice on the best / most simple way to achieve this. I'm new to gnuradio, so feel free to correct me on any errors (and accept my apologizes if my question seems trivial).

best,

--
Matthieu Imbert <address@hidden>
http://graal.ens-lyon.fr/~mimbert/
INRIA / LIP ENS-Lyon research engineer
http://www.inria.fr http://www.ens-lyon.fr/LIP
+33(0)472728149
Monod campus, room GN1 Nord 3.52
LIP ENS-Lyon, 46 allée d'Italie
69364 Lyon cedex 07, FRANCE



reply via email to

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