I've done some test with DBUS in the idea of integrating it with OpenCPN
My conclusion: on Linux
Dbus is the only valid option to handle correctly sleep/wakeup on ram [which is my end goal
While Dbus API documentation
is really bad, its fonctionnalities are just find. For linux
Dbus is the only correct way to handle removable devices.
Nevertheless see 3 small remaining points to solve:
- it adds one dependency on dbus client library.
- it imposes some change in opencpn's logic for reading serial link, and on the way to present devices on GUI
- it wont work for Windows, and imposes some form of emulation, in order Windows code to be compatible.
My goal is to propose to OpenCPN author, hopefully within the new couples of weeks, a strawman for a hotplug compatible version of OpenCPN.