A characteristic is a typed value that is accessable by a GATT client hosted by a GATT server.
More...
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:
> speed_over_ground_characteristic;
A characteristic is a typed value that is accessable by a GATT client hosted by a GATT server.
Definition: characteristic.hpp:160
a 128-Bit UUID used to identify a characteristic.
Definition: characteristic.hpp:62
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 )
>,
>
> presure_service;
a very simple device to bind a characteristic to a global variable to provide access to the character...
Definition: characteristic_value.hpp:254
a 128-Bit UUID used to identify a service.
Definition: service.hpp:57
a service with zero or more characteristics
Definition: service.hpp:150
if added as option to a characteristic, write access is removed from the characteristic
Definition: characteristic_value.hpp:69
adds the ability to notify this characteristic.
Definition: characteristic_value.hpp:89
- See also
- characteristic_uuid
-
characteristic_uuid16
-
no_read_access
-
no_write_access
-
notify
-
indicate
-
higher_outgoing_priority
-
lower_outgoing_priority
-
write_without_response
-
only_write_without_response
-
bind_characteristic_value
-
characteristic_name
-
free_read_blob_handler
-
free_read_handler
-
free_write_blob_handler
-
free_write_handler
-
mixin_read_handler
-
mixin_write_handler
-
mixin_read_blob_handler
-
mixin_write_blob_handler
-
mixin_write_indication_control_point_handler
-
mixin_write_notification_control_point_handler
-
requires_encryption
-
no_encryption_required
-
may_require_encryption
-
fixed_blob_value
-
attribute_handle
-
attribute_handles
- Examples
- change_advertising_example.cpp, include_example.cpp, priorities_example.cpp, read_write_handler_example.cpp, and server_example.cpp.