BlueToe
an alternative GATT/BLE implementation
Loading...
Searching...
No Matches
gatt_options.hpp
1#ifndef BLUETOE_GATT_OPTIONS_HPP
2#define BLUETOE_GATT_OPTIONS_HPP
3
4#include <bluetoe/meta_types.hpp>
5
6#include <cstdint>
7#include <cstddef>
8
9namespace bluetoe {
10
11 namespace details {
12 struct mtu_size_meta_type {};
13 struct cccd_callback_meta_type {};
14 }
15
23 template < std::uint16_t MaxMTU >
24 struct max_mtu_size {
26 struct meta_type :
27 details::mtu_size_meta_type,
28 details::valid_server_option_meta_type {};
29
30 static constexpr std::size_t mtu = MaxMTU;
32 };
33
47 template < typename T, T& Obj >
49 {
51 struct meta_type :
52 details::cccd_callback_meta_type,
53 details::valid_server_option_meta_type {};
54
55 template < class Server >
56 static void client_characteristic_configuration_updated( Server& srv, const bluetoe::details::client_characteristic_configuration& data )
57 {
58 Obj.client_characteristic_configuration_updated( srv, data );
59 }
61 };
62
64 struct no_client_characteristic_configuration_update_callback
65 {
66 struct meta_type :
67 details::cccd_callback_meta_type,
68 details::valid_server_option_meta_type {};
69
70 template < class Server >
71 static void client_characteristic_configuration_updated( Server&, const bluetoe::details::client_characteristic_configuration& )
72 {
73 }
74 };
76}
77
78#endif
callback to be called, if the client characteristic configuration has changed or was written.
Definition: gatt_options.hpp:49
define the maximum GATT MTU size to be used
Definition: gatt_options.hpp:24