an alternative GATT/BLE implementation
No Matches
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.


> quadcopter_position_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 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 service.
Definition: service.hpp:57
a service with zero or more characteristics
Definition: service.hpp:150
adds a name to characteristic
Definition: characteristic.hpp:227

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
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: