BlueToe
an alternative GATT/BLE implementation
|
a service with zero or more characteristics More...
#include <bluetoe/service.hpp>
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.