D-Bus service event "status" should be a property
When this is implemented as an event. We cannot know the initial state of the service. It should be a property instead so the we can read the state at any time.
You still need an event when the property changes of course. For this, I suggest using org.freedesktop.DBus.Properties.PropertiesChanged.
See http://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces-properties.
I seem to have found an example for python dbus and properties: https://github.com/bkircher/dbus-python/blob/master/examples/example-service.py#L72-L81 This is completely undocumented in the python-dbus docs though and I am not sure it is even part of the official release (see https://bugs.freedesktop.org/show_bug.cgi?id=26903).
Right now I work around the issue by emitting the current-status whenever a client connects. So if dbus properties actually work on the ev3 a transition plan would be:
- add the property and keep the signal
- after a release cycle drop the annotation from the signal