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

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Harry van Haaren <harryhaaren@...>
Cc: <linux-audio-dev@...>
Date: Tuesday, December 13, 2011 - 4:44 am

--20cf303dd312bdd10c04b3f1e72f
Content-Type: text/plain; charset=ISO-8859-1

On Mon, Dec 12, 2011 at 7:31 PM, Harry van Haaren wrote:

> On Tue, Dec 13, 2011 at 3:24 AM, Iain Duncan wrote:

> Its a FIFO queue, as in First In - First Out. So the order of the messages

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

--20cf303dd312bdd10c04b3f1e72f
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

On Mon, Dec 12, 2011 at 7:31 PM, Harry v=
an Haaren <ha=
rryhaaren@gmail.com
> wrote:
On Tue, Dec 13, 2011 at 3:24 A=
M, Iain Duncan <iainduncanlists@gmail.com> wrote:

I guess I need some kind of serialization to send this over a jack rin=
gbuffer, but I've zero experience with serialization in C++.<=
/blockquote>I don't really understand what your asking h=
ere, 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 messa=
ges is the same as you write them...Perhaps I'm misunderstanding yo=
u :SYup, what I'm talk=
ing about is being able to put a data structure on to the ring buffer. It n=
eeds be castable to a =A0const *char, so the structure needs a way to be co=
nverted 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.
thanksIain

--20cf303dd312bdd10c04b3f1e72f--

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [LAD] easiest way to serialize messages for sending over..., Iain Duncan, (Tue Dec 13, 4:44 am)