Thanks for the quick reply. I'll be getting this up and testing to some extent hopefully next week. I gotta admit to hating DBus as well (we use it extensively at work for automotive computing), but it's hard to argue against a solid distributed messaging scheme, even if the API is ugly and hard to manage (I'm using QT, and if it's hard to do in QT, then it's just damn ugly). I thought about scraping, but that leaves me with a lot of parser work I don't particularly like, plus having to invent my own notification system. And reading the DB means I either invent polling for it, or use a timer, which I don't like. The system is only 400 Mhz, and is actually going to be doing quite a bit of other stuff, so I'd like to keep the overhead small. BTW, this is being done with a Gumstix Verdex using OE. I'll send an OE recipe to you when I have one that works, for reference, as it might be useful to provide an OE version as well.<div>
<br></div><div>I hope to finish my project pages which should have the SVN repos, a ticket system, and details about the project available before too long (gonna start it tonight, but it may take a week or two to get started). Check it out at <a href="http://www.northseminary.net">http://www.northseminary.net</a></div>
<div><br></div><div>Will be talking to you with questions and stories soon enough I imagine.<br><div><br><div class="gmail_quote">On Wed, May 12, 2010 at 10:38 AM, Gary Briggs <span dir="ltr"><<a href="mailto:chunky@icculus.org">chunky@icculus.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">On Wed, May 12, 2010 at 07:58:51AM -0500, Peter Buelow wrote:<br>
> Ok, just want to use this project for a automotive HUD I'm building. You saved me, I tried to get a couple of other packages working, but never could, so I'm gonna use this project. This might be exactly what I've been looking for. However, a quick question.<br>
><br>
> Does the main app send it's log data over DBUS at any point?<br>
<br>
</div>Yep. It only sends signals, it doesn't actually "communicate" over DBus,<br>
/per se/, but you can just listen and get updates.<br>
<br>
The code is in the function obddbussignalpid in src/logger/obddbus.c<br>
<br>
To understand how to read the signals, this code should explain:<br>
<br>
#define OBDDBUS_INTERFACENAME "org.icculus.obdgpslogger"<br>
<br>
// "/obd" is the path, and "value" is the name.<br>
msg = dbus_message_new_signal("/obd", OBDDBUS_INTERFACENAME, "value");<br>
<br>
dbus_message_append_args (msg,<br>
DBUS_TYPE_UINT32, &(cmd->cmdid), // PID<br>
DBUS_TYPE_DOUBLE, &val, // Actual value<br>
DBUS_TYPE_STRING, &(cmd->db_column), // Short name<br>
DBUS_TYPE_STRING, &(cmd->human_name), // Long name<br>
DBUS_TYPE_INVALID // Sentinel<br>
);<br>
<br>
You should be able to see signals being announced by using this at the<br>
command prompt:<br>
dbus-monitor --system<br>
<br>
<br>
As a mere aside, I despise dbus. It's an awful API, and the developers<br>
of the reference implementation documented it by saying "don't use this,<br>
it sucks". If you have any better suggestions, I'm more than open to putting<br>
them in and urging people to use them instead of dbus.<br>
<br>
Other approaches that might work:<br>
The current [hokey-as-hell] gui launches obdgpslogger and reads<br>
obdgpslogger's stdout to see how to update the GUI. You could always<br>
just scrape the latest values directly from the database, although<br>
that may induce small amounts of lag. shared-memory.<br>
<div class="im"><br>
<br>
> I don't much need the database, but will keep it so I can export it to save trip details and such. However, the primary use, being a HUD, I just need the near realtime updates of the ECU data (speed, tach, temp right now). I noticed the sim uses DBUS, and in main(), there's a DBUS init routine, but I'm not quite up to speed on exactly how it's used yet. Still perusing the code. If it doesn't do this, how hard would it be to make this ability an addon, enabled using a command line switch?<br>
<br>
</div>Should just magically work.<br>
<br>
If you're not seeing anything, you should check that dbus support was<br>
actually compiled in. You'll need your distro's dbus dev package [on<br>
debian and friends it's libdbus-1-dev]. If it wasn't installed before,<br>
you may need to purge your build dir and rebuild, as cmake usually won't<br>
pick up changes like that. CMake tells you whether it finds it or not<br>
when you run it.<br>
<div class="im"><br>
> I'm more than willing to do the work, I'll have to anyway, I need some useful async messaging to get OBD data into my app, and this seems like it would be a good way to do it (although DBUS is kinda ulgy for small things like this).<br>
<br>
</div>DBus is kinda ugly for *everything* :-)<br>
<div class="im"><br>
> Thoughts? Thanks for building this. I'm looking forward to being able to make it go with my stuff.<br>
<br>
</div>Coo, please let me know how it works out. I really am happy to help<br>
where I can<br>
<br>
Gary (-;<br>
_______________________________________________<br>
obdgpslogger mailing list<br>
<a href="mailto:obdgpslogger@icculus.org">obdgpslogger@icculus.org</a><br>
<a href="http://icculus.org/mailman/listinfo/obdgpslogger" target="_blank">http://icculus.org/mailman/listinfo/obdgpslogger</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>Pete<br>
</div></div>