|
 |
06-05-2009, 05:52 AM
|
#1
|
|
licensed to kill
Join Date: Aug 2006
Location: Deep in the Rockies... coding in caves
Posts: 1,043
|
compiling on ubuntu 9.04
A few questions:
1) I realize you have a gui app that communicates with the logger. Is this via some sort of protocol based communication? sockets? If so, is there some sort of doc on the protocol? Or does it just scrape the database?
2) is there a compile option to disable compiling the GUI? If not, that'd be a very nice addition for apps that have their own gui's (ie frontends).
3) I'm checking the app to see if it's a good match to include in LinuxICE2. What are your thoughts on this?
Thanks again,
-Kev
__________________
LinuxICE - because my car already has enough windows (and because I like speed).
LinuxICE2 beta2 is released!!! get it now!
Follow OpenICE development
Last edited by kev000; 06-05-2009 at 06:04 AM.
|
|
|
|
|
|
Advertisement
|
Sponsored links
|
06-05-2009, 02:23 PM
|
#2
|
|
Mod - OBDII GPS Logger forum
Join Date: Mar 2009
Location: Los Angeles
Posts: 408
|
Quote: Originally Posted by kev000 
1) I realize you have a gui app that communicates with the logger. Is this via some sort of protocol based communication? sockets? If so, is there some sort of doc on the protocol? Or does it just scrape the database?
I drink heavily from the Stevens kool-aid, and use fork/exec and pipes. The code that does it is self-contained in src/gui/loggerhandler.{cpp,h}. If you pass --spam-stdout [-t] to the logger, you'll see what it outputs, although I have that documented as being something liable to change in the man page.
I actually looked at scraping the database, but I was running into sqlite problems. Easily fixed with busy handlers in retrospect, I just never got around to it. Once that's working, I'll probably move the GUI to database scraping. There's also been some interest in web front-ends, something that I would *have* to make scraping work for.
Quote:
2) is there a compile option to disable compiling the GUI? If not, that'd be a very nice addition for apps that have their own gui's (ie frontends).
Erm. Well, one doesn't really exist now, it just compiles the gui or not based on whether it could find fltk or not. There's nothing stopping you from just ignoring the gui; it's a separate binary that launches the others, but there's nothing in the way of "real" dependencies. In fact, every other module is very explicitly standalone.
<five minutes pass>
nvm, I just commited a flag that lets you explicitly disable the GUI.
cmake -DOBD_DISABLE_GUI=true ..
Or you can change it from within the ccmake ui. [If you attempt to use the GUI to disable it, or forget to use OBD_DISABLE_GUI the first time, you'll see a bunch of FLTK-related spam in cmake, but it's safely ignored - the GUI doesn't get built]
Quote:
3) I'm checking the app to see if it's a good match to include in LinuxICE2. What are your thoughts on this?
Sounds great. Lemme know how it works out, I've never even downloaded LinuxICE.
Gary (-;
|
|
|
06-05-2009, 10:08 PM
|
#3
|
|
licensed to kill
Join Date: Aug 2006
Location: Deep in the Rockies... coding in caves
Posts: 1,043
|
Instead of scraping, have you considered DBus as a method? I'm a big fan of DBus Signals because the command line app can fire them and any gui/web page, app can catch them. I believe DBus is available for Mac, Linux, and windows. It also works with a number of different language: c/c++, c#, java, python, php, ...
If you wanted to go this route, I could definitely help.
Thanks for adding the noGUI option
__________________
LinuxICE - because my car already has enough windows (and because I like speed).
LinuxICE2 beta2 is released!!! get it now!
Follow OpenICE development
Last edited by kev000; 06-05-2009 at 10:11 PM.
|
|
|
06-06-2009, 01:50 PM
|
#4
|
|
Mod - OBDII GPS Logger forum
Join Date: Mar 2009
Location: Los Angeles
Posts: 408
|
Quote:
Instead of scraping, have you considered DBus as a method?
Haha. I'd never looked at it until I went to go investigate what linuxICE is like, yesterday. It's not out of the question.
Gary (-;
|
|
|
06-06-2009, 05:18 PM
|
#5
|
|
Mod - OBDII GPS Logger forum
Join Date: Mar 2009
Location: Los Angeles
Posts: 408
|
I have linuxice installing in a virtualbox right now.
Gary (-;
|
|
|
06-06-2009, 10:15 PM
|
#6
|
|
Mod - OBDII GPS Logger forum
Join Date: Mar 2009
Location: Los Angeles
Posts: 408
|
So, I've now looked into DBus and LinuxICE a bit:
The whole thing sounds like a neat idea, I'm actually very interested. A quick glance through, I *think* that what I would want to do is:
1) Set obdgpslogger to be able to signal messages. Use something like org.icculus.obdgpslogger as the service, and the object path of /obd/{obd something or other. Maybe db_column, maybe PID. Maybe both}
2) Set obdgui to subscribe to signals from org.icculus.obdgpslogger, and just interpret what obdgpslogger sends
3) This way you'd be running obdgpslogger permanantly as a background service on LinuxICE, and connect to it to query messages using some other nGhost UI or something
Is that right? The obvious idea is that LinuxICE [nGhost?] would subscribe to org.icculus.obdgpslogger and render what it does?
I tried installing LinuxICE-Beta3-4.iso in VirtualBox. I got lots of error console spam after the install [when it offers reboot/continue using options], and when I rebooted X didn't load. LinuxICE2-2009-06-05.iso is downloading right now...
Gary (-;
EDIT: LinuxICE2-2009-06-05.iso downloaded a different amount to what the server reported it as [possibly truncated? can you provide checksums?], and doesn't get past the ISOLINUX text message at the start of booting.
Last edited by chunkyks; 06-06-2009 at 10:19 PM.
|
|
|
06-06-2009, 10:24 PM
|
#7
|
|
licensed to kill
Join Date: Aug 2006
Location: Deep in the Rockies... coding in caves
Posts: 1,043
|
Yep, that's exactly what I had in mind. obdgpslogger would just hand out as a background service and whatever app wanted to listen, could.
We are trying to set up an automatic mirroring solution so I'm not sure that the mirrors are keeping in sync like they should. download directly from linuxice.openice.org:88 (the master server). I'll start providing md5's also. LinuxICE2 is pre-alpha, so don't expect to much from it  .
__________________
LinuxICE - because my car already has enough windows (and because I like speed).
LinuxICE2 beta2 is released!!! get it now!
Follow OpenICE development
|
|
|
06-06-2009, 10:29 PM
|
#8
|
|
Mod - OBDII GPS Logger forum
Join Date: Mar 2009
Location: Los Angeles
Posts: 408
|
I might take a look later; are you able to try installing linuxICE in virtualbox yourself?
Gary (-;
|
|
|
|
Sponsored links
|
|
Advertisement
|
|
06-06-2009, 10:34 PM
|
#9
|
|
Mod - OBDII GPS Logger forum
Join Date: Mar 2009
Location: Los Angeles
Posts: 408
|
Oh. You have to log in, and *then* X starts. My bad.
I went to apps->setup->ice configuration, it's currently trying to reach nghost-project.com to download the gpg key, but nghost-project.com isn't responding?
Gary (-;
|
|
|
06-07-2009, 01:08 AM
|
#10
|
|
Mod - OBDII GPS Logger forum
Join Date: Mar 2009
Location: Los Angeles
Posts: 408
|
After you & I talked on IRC earlier...
I've added dbus support to the logger, although I haven't actually tried it yet. It also defaults to disabled, but it does *build* on both OSX and Ubuntu 8.10.
Either enable ENABLE_DBUS through the UI [ccmake or cmake-gui], or if you're using cmake from the command-line, add -DENABLE_DBUS=On the same way you previously added the disable gui option
Look in src/logger/obddbus.c for what it's doing, but in lieu of getting my lexicon wrong again, I'll post you the salient code here:
Code:
msg = dbus_message_new_signal("/obd", "org.icculus.obdgpslogger", "value");
dbus_message_append_args (msg,
DBUS_TYPE_UINT32, &(cmd->cmdid), // PID
DBUS_TYPE_DOUBLE, &val, // Actual value
DBUS_TYPE_STRING, cmd->db_column, // Short name
DBUS_TYPE_STRING, cmd->human_name, // Long name
DBUS_TYPE_INVALID // Sentinel
);
As far as static ABIs go [as we'd also discussed], it'll be safe to rely on PID and value. The others are there as a courtesy and may change in future. [I mean, the others are *unlikely* to change, but at this stage I'm still not knowledgeable enough to guarantee it]
Lemme know how it works out,
Gary (-;
Last edited by chunkyks; 06-07-2009 at 01:11 AM.
|
|
|
06-07-2009, 08:07 PM
|
#11
|
|
Mod - OBDII GPS Logger forum
Join Date: Mar 2009
Location: Los Angeles
Posts: 408
|
And this is what a snippet from dbus-monitor looks like:
Code:
signal sender=:1.8 -> dest=(null destination) serial=55 path=/obd; interface=org.icculus.obdgpslogger; member=value
uint32 16
double 1.91
string "maf"
string "Air Flow Rate from Mass Air Flow Sensor"
signal sender=:1.8 -> dest=(null destination) serial=56 path=/obd; interface=org.icculus.obdgpslogger; member=value
uint32 17
double 14.1176
string "throttlepos"
string "Absolute Throttle Position"
signal sender=:1.8 -> dest=(null destination) serial=57 path=/obd; interface=org.icculus.obdgpslogger; member=value
uint32 5
double 105
string "temp"
string "Engine Coolant Temperature"
signal sender=:1.8 -> dest=(null destination) serial=58 path=/obd; interface=org.icculus.obdgpslogger; member=value
uint32 12
double 687.5
string "rpm"
string "Engine RPM"
signal sender=:1.8 -> dest=(null destination) serial=59 path=/obd; interface=org.icculus.obdgpslogger; member=value
uint32 13
double 0
string "vss"
string "Vehicle Speed Sensor"
Gary (-;
|
|
|
08-01-2009, 08:05 AM
|
#12
|
|
licensed to kill
Join Date: Aug 2006
Location: Deep in the Rockies... coding in caves
Posts: 1,043
|
Just checked, -DOBD_DISABLE_GUI=true still looks for the fltk deps.
__________________
LinuxICE - because my car already has enough windows (and because I like speed).
LinuxICE2 beta2 is released!!! get it now!
Follow OpenICE development
|
|
|
08-02-2009, 03:45 PM
|
#13
|
|
Mod - OBDII GPS Logger forum
Join Date: Mar 2009
Location: Los Angeles
Posts: 408
|
Ooops. That got added when I added the gui obdsim generator.
I've moved OBD_DISABLE_GUI and the searching for FLTK into the very top-level CMakeLists.txt; now the behaviour should be shared between all the gui bits & pieces.
Gary (-;
|
|
|
|
Sponsored links
|
|
Advertisement
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 10:43 AM.
| |