linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Michał Lowas-Rzechonek" <michal.lowas-rzechonek@silvair.com>
To: linux-bluetooth@vger.kernel.org
Subject: [RFC BlueZ 0/2] Fix types and names of beacon/import flags.
Date: Thu,  9 Jan 2020 09:38:53 +0100	[thread overview]
Message-ID: <20200109083855.16000-1-michal.lowas-rzechonek@silvair.com> (raw)

This patchset aims to make the API a bit more consistent.

Side question: at the moment none of the node properties emit
PropertiesChanged signal. I think this violates D-Bus spec, since all
properties are assumed to emit these signals by default [1] [2].

Unfortunately, at the moment ELL does not support "EmitsChangedSignal"
annotation, so I'd like to add this to ELL, annotate node
properties with:
    - Features: const
    - Beacon: true
    - BeaconFlags: true
    - IvIndex: true
    - SecondsSinceLastHeard: false (for performance reasons)
    - Addresses: const

And also emit PropertiesChanged where required.

Thoughts?


[1] https://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces-properties

    Each property (or the parent interface) must be annotated with the
    org.freedesktop.DBus.Property.EmitsChangedSignal annotation to
    convey this (usually the default value true is sufficient meaning
    that the annotation does not need to be used). See the section
    called “Introspection Data Format” for details on this annotation.

[2] https://dbus.freedesktop.org/doc/dbus-specification.html#introspection-format

    org.freedesktop.DBus.Property.EmitsChangedSignal:
        true,invalidates,const,false	

    If set to false, the
    org.freedesktop.DBus.Properties.PropertiesChanged signal, see the
    section called “org.freedesktop.DBus.Properties” is not guaranteed
    to be emitted if the property changes.

    If set to const the property never changes value during the lifetime
    of the object it belongs to, and hence the signal is never emitted
    for it.

    If set to invalidates the signal is emitted but the value is not
    included in the signal.

    If set to true the signal is emitted with the value included.

    The value for the annotation defaults to true if the enclosing
    interface element does not specify the annotation. Otherwise it
    defaults to the value specified in the enclosing interface element.

    This annotation is intended to be used by code generators to
    implement client-side caching of property values. For all properties
    for which the annotation is set to const, invalidates or true the
    client may unconditionally cache the values as the properties don't
    change or notifications are generated for them if they do.

Michał Lowas-Rzechonek (2):
  mesh: Rename IVUpdate import flag to IvUpdate
  mesh: Change BeaconFlags property type to a dict

 doc/mesh-api.txt | 20 +++++++++++++++-----
 mesh/mesh.c      |  2 +-
 mesh/node.c      | 13 +++++++++++--
 3 files changed, 27 insertions(+), 8 deletions(-)

-- 
2.19.1


             reply	other threads:[~2020-01-09  8:39 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-09  8:38 Michał Lowas-Rzechonek [this message]
2020-01-09  8:38 ` [RFC BlueZ 1/2] mesh: Rename IVUpdate import flag to IvUpdate Michał Lowas-Rzechonek
2020-01-09  8:38 ` [RFC BlueZ 2/2] mesh: Change BeaconFlags property type to a dict Michał Lowas-Rzechonek
2020-01-21 20:15 ` [RFC BlueZ 0/2] Fix types and names of beacon/import flags Michał Lowas-Rzechonek
2020-01-22  0:44   ` Stotland, Inga
2020-01-22  1:14     ` Gix, Brian
2020-01-22 17:13       ` michal.lowas-rzechonek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200109083855.16000-1-michal.lowas-rzechonek@silvair.com \
    --to=michal.lowas-rzechonek@silvair.com \
    --cc=linux-bluetooth@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).