marchalling struct on window.
Mansour Al Akeel
mansour.alakeel at gmail.com
Mon Mar 15 14:28:13 PDT 2010
On Mon Mar 15,2010 05:51 pm, Thiago Macieira wrote:
> Em Segunda-feira 15 Mar?o 2010, ?s 13:55:16, Mansour Al Akeel escreveu:
> > I need to read data from hardware dvices, and send it through the bus to
> > component(s) interested in these data. I understand signals are the way to
> > go, but I want to put these data in struc and validate it before sending
> > it. Thus, I have to marchall the structs, and unmarchall it again.
> > Processes that are going to recieve the event, are going to be in
> > different languages (C#, python, java). So I have to unmarchall it for
> > these languages.
> PS: "marshall"
> > In other words I want something similar to publish/subsribe pattern for
> > IPC. Performance is a concern to me, as this should be deployed on low
> > resource hardware. The daemon should be always running, and the services
> > producing events is always running.
> > My questions,
> > 1- Is dbus right for this ?
> It's not wrong, though there may be faster alternatives.
What other alternatives are there ? I thought that DBUS uses binary
format for exchanging data, which would make it faster.
Can you please elaborate? If there's a small; fast alternative then this
might be better.
> The advantage of D-Bus is the availability of bindings to many languages.
> > 2- If yes, where can I find basic example about marchalling c struct's
> > and unmarchalling them to C# ?
> I'll leave this to the people who have done work in C#.
What about a simple example for C stuct ? Do you know any ? It will be
a lot of help, if there's a small skelton example, to modify and build
> > 3- What to use for this type of communication , methods calls or
> > signals ? My understanding is, signal are good for broad cast, but
> > we can send only array of strings, while method calls are good for
> > passing complex argument, but I have to wait for it to return, which
> > is not the case. I am looking for fire-and-forget !
> You understand signals wrong. It can contain any information that a method can
> contain, including complex argument types.
Thank you for clarifying this part. I will go with signals then, since
it broadcast data.
> > 4- I am working on windows XP with dbus 126.96.36.199, did anyone experience
> > problems with this ?
> I thought you said you were on low-resource hardware and that performance was
> a concern. So why are you using Windows XP and and old version of D-Bus?
True, I am working on windows XP, since this is the platform installed
already on the equipement, we are talking around 1.2 GHz and 512 MB.
more or less like one of these mini laptops with Atom processor. And the
reason I am using an older version of DBUS is because this is all I was
able to find for windows compiled under MinGW. I think my requirements
are very basic, and should be covered by an older version.
Thank you for your help.
> Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
> Senior Product Manager - Nokia, Qt Development Frameworks
> PGP/GPG: 0x6EF45358; fingerprint:
> E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358
> dbus mailing list
> dbus at lists.freedesktop.org
More information about the dbus