BlueToe
an alternative GATT/BLE implementation
Loading...
Searching...
No Matches
gatt.hpp
1#ifndef BLUETOE_SERVICES_GATT_HPP
2#define BLUETOE_SERVICES_GATT_HPP
3
4#include <bluetoe/service.hpp>
5#include <bluetoe/characteristic.hpp>
6#include <bluetoe/attribute_handle.hpp>
7
8namespace bluetoe {
9
10 namespace gatt {
14 using service_uuid = service_uuid16< 0x1801 >;
15
19 using service_changed_uuid = characteristic_uuid16< 0x2A05 >;
20
24 using service_changed_characteristic = characteristic<
25 service_changed_uuid,
26 indicate,
27 fixed_uint32_value< 0xFFFF0001 >
28 >;
29
38 using service = ::bluetoe::service<
39 service_uuid,
40 service_changed_characteristic
41 >;
42
48 template <
49 std::uint16_t ServiceHandle,
50 std::uint16_t ServiceChangedCharDeclarationHandle = ServiceHandle + 1,
51 std::uint16_t ServiceChangedCharValueHandle = ServiceHandle + 2,
52 std::uint16_t ServiceChangedCahrCCCDHandle = ServiceHandle + 3 >
53 using service_with_fixed_handles = ::bluetoe::service<
54 attribute_handle< ServiceHandle >,
55 service_uuid,
56 characteristic<
57 attribute_handles<
58 ServiceChangedCharDeclarationHandle,
59 ServiceChangedCharValueHandle,
60 ServiceChangedCahrCCCDHandle >,
61 service_changed_uuid,
62 indicate,
63 fixed_uint32_value< 0xFFFF0001 >
64 >
65 >;
66 }
67}
68
69#endif
70
a service with zero or more characteristics
Definition: service.hpp:150