Use the packet encoder block

Regards,
Vanush


On Thu, Apr 24, 2014 at 1:05 AM, Matthieu Imbert
<matthieu.imb...@inria.fr>wrote:

> 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 <matthieu.imb...@inria.fr>
> 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
>
> _______________________________________________
> Discuss-gnuradio mailing list
> Discuss-gnuradio@gnu.org
> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
>
_______________________________________________
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

Reply via email to