aerostitch / testnavit

0 stars 0 forks source link

Binding to navit on Win32 #128

Open aerostitch opened 12 years ago

aerostitch commented 12 years ago

Issue migrated from trac ticket # 970

component: core | priority: major

2011-11-24 11:44:06: tryagain created the issue


Currently we have two binding interfaces for Navit: dbus and python. Both seem to be unavailiable on WinCE.

dbus interface, for example, is based on glib dbus helper functions which are not included in support/glib. IMHO these functions are hardly portable to WinCE, as they are in turn based on asyncronous IO which is quite special on WinCE. And there seems to be no working port of glib for WinCE.

Also, both these interfaces (dbus/python) require some additional ifnfrastructure on the target platform (dbus daemon/python installation).

So, I conclude, we need some very portable and easy to use control interface for navit.

I think this interface can be implemented as a feature to automaticaly parse and execute navit commands from textfile(s) placed to some configurable location.

Results can be reported into textfiles, too.

aerostitch commented 12 years ago

2011-11-24 11:56:35: @sleske commented


I don't really know WinCE, but as a general idea: The textfile thing seems a bit clunky. You have to worry about cleaning them up, synchronisation, you have to poll etc.

Have you considered just opening some kind of network socket / pipe / whatever WinCE has to communicate? gpsd works like that. Just an idea...

aerostitch commented 12 years ago

2011-12-22 13:07:35: tryagain commented


Well, if we really don't need a lightweight (textfile-based) crossplatform binding solution, I'll base my solution on Windows WM_COPYDATA message. It seems to be supported by both CE and desktop versions. I think it may be possible to wrap it later inside COM dll to have navit functions accessible from Windows scripting environment.

I will not use COM as bottom level of my solution as it seems to support only inprocess threading model on WinCE. And we are not going to link the whole Navit process to each controlling application.

aerostitch commented 12 years ago

2012-01-07 14:54:38: tryagain uploaded file binding-win32-2012-01-07.diff (16.2 KiB)

First version of binding::win32 feature

aerostitch commented 12 years ago

2012-01-07 15:09:22: tryagain commented


Above patch creates another way to drive navit from external programs.

It works by design only on Win32 and WinCE platforms.

After compiling, you'll get one more exe file, navit/binding/win32/tell_navit.exe. When run without parameters, it will show a short usage help. Shortly, any command of navit command interface can be run with following syntax (quoting in the sample is to run it from Wine):

./tell_navit.exe 'set_destination("geo:4611.50 N 3417.50 E")'

On WinCE it will look like this:

\sdcard\navit\tell_navit.exe set_destination("geo:4611.50 N 3417.50 E ")

For desktop Windows I'd run something like this:

tell_navit.exe set_destination(\"geo:4611.50 N 3417.60 E\")

Navit should be already running when you call tell_navit. If you test this in Wine, please be sure to run Navit in Wine, too.

aerostitch commented 12 years ago

2012-01-07 15:09:22: tryagain

aerostitch commented 12 years ago

2012-01-17 12:29:04: tryagain uploaded file binding-win32-2012-01-17-2.diff (17.4 KiB)

Minor cleanup and fix. Package building support is added.

aerostitch commented 12 years ago

2012-02-02 23:59:14: tryagain changed status from new to assigned

aerostitch commented 12 years ago

2012-02-02 23:59:14: tryagain changed owner from KaZeR to tryagain

aerostitch commented 12 years ago

2012-02-02 23:59:14: tryagain changed title from Binding to navit on WinCE to Binding to navit on Win32

aerostitch commented 12 years ago

2012-02-02 23:59:14: tryagain commented


Initial revision was added to svn with 4892

aerostitch commented 11 years ago

2013-06-29 02:30:51: usul commented


Please add documentation to the wiki: http://wiki.navit-project.org/index.php/Embedding

Then we can close this bug finally :)