All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arman Uguray <armansito@google.com>
To: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
Cc: "Gu, Chao Jie" <chao.jie.gu@intel.com>,
	Marcel Holtmann <marcel@holtmann.org>,
	BlueZ development <linux-bluetooth@vger.kernel.org>,
	Johan Hedberg <johan.hedberg@gmail.com>
Subject: Re: [RFC v1 0/1] doc/gatt-api: New API properties and methods for the GATT D-Bus API.
Date: Fri, 25 Jul 2014 11:50:41 -0700	[thread overview]
Message-ID: <CAHrH25STb6kaLR5tNQNubJmBnRtNapb8SRQngjBWam4EjQ0QVA@mail.gmail.com> (raw)
In-Reply-To: <CABBYNZJb_UyNTkrO1qFTk2Uevv9UKnVWrU5rGy_-DPcKUWJY4w@mail.gmail.com>

Hi Luiz,

> Im just wondering why we did not use variant type instead of array of bytes
> for value, imo it seems a better fit since it can be extended with different
> types in host byte order.
>

I don't think that is such a good idea. Characteristic/descriptor
values are usually meant to be interpreted as a series of bytes
encoding different kinds of data of various lengths based on the
profile (e.g. the first byte is a bit mask, the following two bytes
are a uint16, etc). I think it's better to just leave it as an array
of bytes in the order that it was received from the wire as this is
what clients will expect and the order in which the bytes should be
interpreted will be explicitly specified by the profile

On occasion you have a characteristic value that encodes, for example,
a complete string. Then again, if we put a variant of string as the
value property there, only those clients that know beforehand that the
value contains a string will be able to work with it. If you're
implementing a high-level generic application API, this won't work.

Cheers,
Arman

  parent reply	other threads:[~2014-07-25 18:50 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-21 23:40 [RFC v1 0/1] doc/gatt-api: New API properties and methods for the GATT D-Bus API Arman Uguray
2014-07-21 23:40 ` [RFC v1 1/1] " Arman Uguray
2014-07-22  8:38   ` guchaojie
2014-07-28  9:17   ` Gu, Chao Jie
2014-07-28 20:52     ` Arman Uguray
2014-07-28 22:34       ` Marcel Holtmann
2014-07-28 23:31         ` Arman Uguray
2014-07-28 23:51           ` Marcel Holtmann
2014-07-29  6:03           ` Gu, Chao Jie
2014-07-29 19:07             ` Arman Uguray
2014-07-30 16:46               ` Marcel Holtmann
2014-08-01  3:11                 ` Arman Uguray
2014-08-11  9:56                   ` Gu, Chao Jie
2014-08-11 17:49                     ` Marcel Holtmann
2014-08-11 18:46                       ` Arman Uguray
2014-08-11 19:03                         ` Marcel Holtmann
2014-08-11 20:38                           ` Arman Uguray
2014-07-22  8:55 ` [RFC v1 0/1] " Johan Hedberg
2014-07-22 20:40   ` Arman Uguray
2014-07-23  5:24     ` Marcin Kraglak
2014-07-23 16:20       ` Arman Uguray
2014-07-23 13:22     ` Gu, Chao Jie
2014-07-23 16:18       ` Arman Uguray
2014-07-23 16:32         ` Marcel Holtmann
2014-07-23 20:39           ` Arman Uguray
2014-07-24  4:11           ` Gu, Chao Jie
2014-07-24  7:58             ` Luiz Augusto von Dentz
2014-07-24  8:01               ` Luiz Augusto von Dentz
2014-07-25 18:50               ` Arman Uguray [this message]
2014-07-25 19:17                 ` Luiz Augusto von Dentz
2014-07-25 19:28                   ` Marcel Holtmann
2014-07-25 21:06                     ` Arman Uguray

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=CAHrH25STb6kaLR5tNQNubJmBnRtNapb8SRQngjBWam4EjQ0QVA@mail.gmail.com \
    --to=armansito@google.com \
    --cc=chao.jie.gu@intel.com \
    --cc=johan.hedberg@gmail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=luiz.dentz@gmail.com \
    --cc=marcel@holtmann.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.