BlueToe
an alternative GATT/BLE implementation
bluetoe::service< Options > Class Template Reference

a service with zero or more characteristics More...

#include <bluetoe/service.hpp>

Detailed Description

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

a service with zero or more characteristics

In GATT, a service groups a set of characteristics to something that is usefull as a group. For example, having a quadcopter, it would make sense to group the x, y and z position of the quadcopter to a quadcopter position service. All characteristics that should be part of the service, must be given as template parameter.

Example:

To identify a service, every service have to have a unique UUID. 128 bit UUIDs are used for custiom services, while the shorter 16 bit UUIDs are used to identify services that have a special meaning the is documented in specifications writen by the bluetooth special interrest group. So every service must have either a service_uuid or a service_uuid16 as template parameter. The position of the UUID parameter is irelevant. A GATT client can use this UUID to identify the service; in the example above, a GATT client would look for a service with the UUID A0C271BF-BD17-4627-B5DF-5E26AA194920 to find the position service of the quadcopter.

See also
server
secondary_service
is_secondary_service
characteristic
service_uuid
service_uuid16
include_service
requires_encryption
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:
bluetoe::service_uuid
a 128-Bit UUID used to identify a service.
Definition: service.hpp:56
bluetoe::service
a service with zero or more characteristics
Definition: service.hpp:133
bluetoe::characteristic
A characteristic is a typed value that is accessable by a GATT client hosted by a GATT server.
Definition: characteristic.hpp:155
bluetoe::characteristic_name
adds a name to characteristic
Definition: characteristic.hpp:222
bluetoe::bind_characteristic_value
a very simple device to bind a characteristic to a global variable to provide access to the character...
Definition: characteristic_value.hpp:225