Open aerostitch opened 12 years ago
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...
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.
binding-win32-2012-01-07.diff
(16.2 KiB)First version of binding::win32 feature
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.
binding-win32-2012-01-17-2.diff
(17.4 KiB)Minor cleanup and fix. Package building support is added.
Please add documentation to the wiki: http://wiki.navit-project.org/index.php/Embedding
Then we can close this bug finally :)
Issue migrated from trac ticket # 970
component: core | priority: major
2011-11-24 11:44:06: tryagain created the issue