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