[LAD] easiest way to serialize messages for sending over a ringbuffer?

Iain Duncan iainduncanlists at gmail.com
Tue Dec 13 04:44:23 UTC 2011


On Mon, Dec 12, 2011 at 7:31 PM, Harry van Haaren <harryhaaren at gmail.com>wrote:

> On Tue, Dec 13, 2011 at 3:24 AM, Iain Duncan <iainduncanlists at gmail.com>wrote:
>
>> I guess I need some kind of serialization to send this over a jack
>> ringbuffer, but I've zero experience with serialization in C++.
>>
>
> I don't really understand what your asking here, you want to be able to
> set the order of the messages in the ringbuffer?
>


> Its a FIFO queue, as in First In - First Out. So the order of the messages
> is the same as you write them...
> Perhaps I'm misunderstanding you :S
>

Yup, what I'm talking about is being able to put a data structure on to the
ring buffer. It needs be castable to a  const *char, so the structure needs
a way to be converted to a string. I can't just put my DataMessage
structure on there because there is no automatic conversion from my own
struct to a string. I know how to do this in Python, but not sure what the
best way to do it in C or C++ is.

thanks
Iain
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxaudio.org/pipermail/linux-audio-dev/attachments/20111212/1daa2eb4/attachment.html>


More information about the Linux-audio-dev mailing list