BlueToe
an alternative GATT/BLE implementation
List of all members
bluetoe::characteristic< Options > Class Template Reference

A characteristic is a typed value that is accessable by a GATT client hosted by a GATT server. More...

#include <bluetoe/characteristic.hpp>

Detailed Description

template<typename ... Options>
class bluetoe::characteristic< Options >

A characteristic is a typed value that is accessable by a GATT client hosted by a GATT server.

A characteristics type (not it terms of C++ data type) is defined by a UUID. Characteristics with the same UUID should represent attributes with the same type / characteristic. Usually a GATT client referes an attribute by its UUID.

To define the UUID of a characteristic add an instanciated characteristic_uuid<> or characteristic_uuid16<> type as option to the characteristic.

For example to define a user defined type to a characteristic:

If no UUID is given, bluetoe derives a 128bit UUID from the UUID of the service in which this characteric is placed in. The first characteristic gets an UUID, where the last bytes are xored with 1, the second characteristic will get an UUID, where the last bytes are xored with 2 and so on...

The following examples show a service with the UUID 48B7F909-B039-4550-97AF-336228C45CED and two characteristics, without an explicit UUID. In this case, the first characteristic becomes the UUID 48B7F909-B039-4550-97AF-336228C45CEC (0x336228C45CED ^ 1 ) and the second UUID becomes the UUID 48B7F909-B039-4550-97AF-336228C45CEF (0x336228C45CED ^ 2 )

See also
characteristic_uuid
characteristic_uuid16
no_read_access
no_write_access
notify
indicate
higher_outgoing_priority
lower_outgoing_priority
write_without_response
bind_characteristic_value
characteristic_name
free_read_blob_handler
free_read_handler
free_write_blob_handler
free_write_handler
Examples:
change_advertising_example.cpp, include_example.cpp, priorities_example.cpp, read_write_handler_example.cpp, and server_example.cpp.

The documentation for this class was generated from the following file: