Opened 7 years ago

Last modified 5 years ago

#970 assigned enhancement/feature request

Binding to navit on Win32

Reported by: tryagain Owned by: tryagain
Priority: major Milestone: version 1.0
Component: core Version: git master
Severity: Keywords:
Cc:

Description

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.

Attachments (2)

binding-win32-2012-01-07.diff (16.2 KB) - added by tryagain 7 years ago.
First version of binding::win32 feature
binding-win32-2012-01-17-2.diff (17.4 KB) - added by tryagain 7 years ago.
Minor cleanup and fix. Package building support is added.

Download all attachments as: .zip

Change History (7)

comment:1 Changed 7 years ago by sleske

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...

comment:2 Changed 7 years ago by tryagain

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.

Changed 7 years ago by tryagain

First version of binding::win32 feature

comment:3 Changed 7 years ago by tryagain

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.

Last edited 7 years ago by tryagain (previous) (diff)

Changed 7 years ago by tryagain

Minor cleanup and fix. Package building support is added.

comment:4 Changed 7 years ago by tryagain

  • Owner changed from KaZeR to tryagain
  • Status changed from new to assigned
  • Summary changed from Binding to navit on WinCE to Binding to navit on Win32

Initial revision was added to svn with r4892

comment:5 Changed 5 years ago by usul

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

Then we can close this bug finally :)

Note: See TracTickets for help on using tickets.