changed property value in signal

Simon McVittie simon.mcvittie at collabora.co.uk
Fri Jul 3 06:34:58 PDT 2015


On 03/07/15 10:41, Pradeepa Kumar wrote:
> The propertieschanged message contains a dictionary and invalidated
>  list of properties.
> But the dictionary is empty(which is supposed to contain new value of
> changed properties), so i am left with querying new values of the
> changed property from list of invalidated properties list.
> - please let me know how do i get new values in the signal msg itself

If the service (in your case systemd) has chosen to use the Invalidated
list, then the only thing you can do to get the new values is to fetch
them with a subsequent method call.

Services are not required to emit new values for properties. There are
two equally valid encodings for a property named Things changing its value:

  PropertiesChanged("com.example.Interface", {"Things": newvalue}, [])
    -> Things has changed to newvalue

  PropertiesChanged("com.example.Interface", {}, ["Things"])
    -> Things has changed to an unspecified value, call Get or GetAll
       if you need to find out what that value is

The fact that systemd has chosen to use the second is likely to be a
deliberate design decision. The "invalidated" list is designed for
situations where the properties' values are large or "expensive" to
compute, so the service does not re-compute them until specifically
asked for them.

> - i upgraded to dbus 1.8.18

Upgrading the communications infrastructure (dbus) will not result in
the service with which you are communicating (systemd) giving you more
information.

-- 
Simon McVittie
Collabora Ltd. <http://www.collabora.com/>



More information about the dbus mailing list