Re: GATT Dbus API on BlueZ - attirbute-api.txt modifications

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Chen,

On Wed, Oct 26, 2011 at 3:20 AM, Ganir, Chen <chen.ganir@xxxxxx> wrote:
> +               int WriteValue(array{byte} value, int method)

I think you meant "uint8" as return value, which corresponds to the
ATT error code type.

> +
> +                   Write the value of the characteristic, with specified method :
> +                   0: Write without response. Always return 0.
> +                   1: Write with response. Return server response code.
> +                   Other write methods will be added in the future.
> +

Besides what others suggested, I would avoid using integers as
enumerations on D-Bus API, specially if the actual values are not
defined by any specification. If you take a look at other API docs in
doc/* you may see examples where string are used. IMHO this make the
client code much more readable and does not require looking at the API
doc all the time. Example:

###
uint8 WriteValue(array{byte} value, string method)

Write the value of the characteristic, with specified method:
"WithoutResponse" or "WithResponse". Other write methods may be added
in the future.
###

An alternative is to use dict, if multiple "flags" are allowed.

Regards,
-- 
Anderson Lizardo
Instituto Nokia de Tecnologia - INdT
Manaus - Brazil
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux