From 61bfa42e9148179f53e414f33c8260bc5eff52f8 Mon Sep 17 00:00:00 2001 From: h2zero Date: Tue, 2 Sep 2025 20:57:38 +0000 Subject: [PATCH] deploy: f80605aff8f52fc97a8442770948e2b2140d6973 --- _h_i_d_keyboard_types_8h_source.html | 2 +- _h_i_d_types_8h_source.html | 2 +- _nim_b_l_e2904_8h_source.html | 35 +- _nim_b_l_e_address_8h_source.html | 9 +- _nim_b_l_e_advertised_device_8h_source.html | 191 +- _nim_b_l_e_advertisement_data_8h_source.html | 9 +- _nim_b_l_e_advertising_8h_source.html | 14 +- _nim_b_l_e_att_value_8h_source.html | 20 +- _nim_b_l_e_attribute_8h_source.html | 26 +- _nim_b_l_e_beacon_8h_source.html | 52 +- _nim_b_l_e_characteristic_8h_source.html | 171 +- _nim_b_l_e_client_8h_source.html | 198 +- _nim_b_l_e_conn_info_8h_source.html | 14 +- _nim_b_l_e_descriptor_8h_source.html | 60 +- _nim_b_l_e_device_8h_source.html | 521 +++--- _nim_b_l_e_eddystone_t_l_m_8h_source.html | 61 +- _nim_b_l_e_ext_advertising_8h_source.html | 214 +-- _nim_b_l_e_h_i_d_device_8h_source.html | 107 +- _nim_b_l_e_l2_c_a_p_channel_8h_source.html | 16 +- _nim_b_l_e_l2_c_a_p_server_8h_source.html | 11 +- _nim_b_l_e_local_attribute_8h_source.html | 27 +- ...b_l_e_local_value_attribute_8h_source.html | 20 +- _nim_b_l_e_log_8h_source.html | 11 +- ...b_l_e_remote_characteristic_8h_source.html | 89 +- _nim_b_l_e_remote_descriptor_8h_source.html | 36 +- _nim_b_l_e_remote_service_8h_source.html | 64 +- ..._l_e_remote_value_attribute_8h_source.html | 19 +- _nim_b_l_e_scan_8h_source.html | 129 +- _nim_b_l_e_server_8h_source.html | 189 +- _nim_b_l_e_service_8h_source.html | 69 +- _nim_b_l_e_u_u_i_d_8h_source.html | 23 +- _nim_b_l_e_utils_8h_source.html | 83 +- _nim_b_l_e_value_attribute_8h_source.html | 12 +- annotated.html | 47 +- annotated_dup.js | 25 - class_nim_b_l_e2904-members.html | 125 -- class_nim_b_l_e2904.html | 285 --- class_nim_b_l_e2904.js | 8 - class_nim_b_l_e_address-members.html | 2 +- class_nim_b_l_e_address.html | 2 +- ...s_nim_b_l_e_advertised_device-members.html | 159 -- class_nim_b_l_e_advertised_device.html | 1505 --------------- class_nim_b_l_e_advertised_device.js | 55 - ..._nim_b_l_e_advertisement_data-members.html | 2 +- class_nim_b_l_e_advertisement_data.html | 2 +- class_nim_b_l_e_advertising-members.html | 2 +- class_nim_b_l_e_advertising.html | 2 +- class_nim_b_l_e_att_value-members.html | 2 +- class_nim_b_l_e_att_value.html | 6 +- class_nim_b_l_e_attribute-members.html | 111 -- class_nim_b_l_e_attribute.html | 214 --- class_nim_b_l_e_attribute.js | 7 - class_nim_b_l_e_beacon-members.html | 120 -- class_nim_b_l_e_beacon.html | 475 ----- class_nim_b_l_e_beacon.js | 16 - class_nim_b_l_e_characteristic-members.html | 141 -- class_nim_b_l_e_characteristic.html | 1062 ----------- class_nim_b_l_e_characteristic.js | 29 - ..._l_e_characteristic_callbacks-members.html | 111 -- class_nim_b_l_e_characteristic_callbacks.html | 327 ---- class_nim_b_l_e_characteristic_callbacks.js | 7 - class_nim_b_l_e_client-members.html | 145 -- class_nim_b_l_e_client.html | 1388 -------------- class_nim_b_l_e_client.js | 41 - class_nim_b_l_e_client_callbacks-members.html | 117 -- class_nim_b_l_e_client_callbacks.html | 570 ------ class_nim_b_l_e_client_callbacks.js | 13 - class_nim_b_l_e_conn_info-members.html | 2 +- class_nim_b_l_e_conn_info.html | 2 +- class_nim_b_l_e_descriptor-members.html | 120 -- class_nim_b_l_e_descriptor.html | 308 ---- class_nim_b_l_e_descriptor.js | 8 - ...im_b_l_e_descriptor_callbacks-members.html | 109 -- class_nim_b_l_e_descriptor_callbacks.html | 217 --- class_nim_b_l_e_descriptor_callbacks.js | 5 - class_nim_b_l_e_device-members.html | 75 +- class_nim_b_l_e_device.html | 822 +-------- class_nim_b_l_e_device_callbacks-members.html | 2 +- class_nim_b_l_e_device_callbacks.html | 2 +- class_nim_b_l_e_eddystone_t_l_m-members.html | 123 -- class_nim_b_l_e_eddystone_t_l_m.html | 550 ------ class_nim_b_l_e_eddystone_t_l_m.js | 19 - ...s_nim_b_l_e_ext_advertisement-members.html | 155 -- class_nim_b_l_e_ext_advertisement.html | 1631 ----------------- class_nim_b_l_e_ext_advertisement.js | 51 - class_nim_b_l_e_ext_advertising-members.html | 119 -- class_nim_b_l_e_ext_advertising.html | 456 ----- class_nim_b_l_e_ext_advertising.js | 15 - ...l_e_ext_advertising_callbacks-members.html | 109 -- ...s_nim_b_l_e_ext_advertising_callbacks.html | 230 --- class_nim_b_l_e_ext_advertising_callbacks.js | 5 - class_nim_b_l_e_h_i_d_device-members.html | 128 -- class_nim_b_l_e_h_i_d_device.html | 700 ------- class_nim_b_l_e_h_i_d_device.js | 24 - class_nim_b_l_e_local_attribute-members.html | 115 -- class_nim_b_l_e_local_attribute.html | 220 --- class_nim_b_l_e_local_attribute.js | 7 - ...m_b_l_e_remote_characteristic-members.html | 129 -- class_nim_b_l_e_remote_characteristic.html | 591 ------ class_nim_b_l_e_remote_characteristic.js | 21 - ...s_nim_b_l_e_remote_descriptor-members.html | 113 -- class_nim_b_l_e_remote_descriptor.html | 169 -- class_nim_b_l_e_remote_descriptor.js | 5 - class_nim_b_l_e_remote_service-members.html | 122 -- class_nim_b_l_e_remote_service.html | 449 ----- class_nim_b_l_e_remote_service.js | 14 - class_nim_b_l_e_scan-members.html | 125 -- class_nim_b_l_e_scan.html | 660 ------- class_nim_b_l_e_scan.js | 21 - class_nim_b_l_e_scan_callbacks-members.html | 110 -- class_nim_b_l_e_scan_callbacks.html | 242 --- class_nim_b_l_e_scan_callbacks.js | 6 - class_nim_b_l_e_scan_results-members.html | 113 -- class_nim_b_l_e_scan_results.html | 254 --- class_nim_b_l_e_scan_results.js | 9 - class_nim_b_l_e_server-members.html | 137 -- class_nim_b_l_e_server.html | 1161 ------------ class_nim_b_l_e_server.js | 33 - class_nim_b_l_e_server_callbacks-members.html | 116 -- class_nim_b_l_e_server_callbacks.html | 522 ------ class_nim_b_l_e_server_callbacks.js | 12 - class_nim_b_l_e_service-members.html | 133 -- class_nim_b_l_e_service.html | 659 ------- class_nim_b_l_e_service.js | 21 - class_nim_b_l_e_u_u_i_d-members.html | 2 +- class_nim_b_l_e_u_u_i_d.html | 16 +- class_nim_b_l_e_utils-members.html | 2 +- class_nim_b_l_e_utils.html | 2 +- classes.html | 4 +- deprecated.html | 2 +- dir_68267d1309a1af8e8297ef4c3efbcdba.html | 4 +- dir_68267d1309a1af8e8297ef4c3efbcdba.js | 3 +- files.html | 3 +- functions.html | 204 ++- functions_b.html | 107 -- functions_c.html | 124 -- functions_d.html | 120 -- functions_dup.js | 22 - functions_e.html | 111 -- functions_f.html | 106 -- functions_func.html | 204 ++- functions_func.js | 22 - functions_func_b.html | 107 -- functions_func_c.html | 124 -- functions_func_d.html | 120 -- functions_func_e.html | 111 -- functions_func_f.html | 106 -- functions_func_g.html | 221 --- functions_func_h.html | 118 -- functions_func_i.html | 129 -- functions_func_l.html | 106 -- functions_func_m.html | 106 -- functions_func_n.html | 119 -- functions_func_o.html | 141 -- functions_func_r.html | 117 -- functions_func_s.html | 204 --- functions_func_t.html | 110 -- functions_func_u.html | 108 -- functions_func_w.html | 107 -- functions_func_~.html | 112 -- functions_g.html | 221 --- functions_h.html | 118 -- functions_i.html | 129 -- functions_l.html | 106 -- functions_m.html | 106 -- functions_n.html | 119 -- functions_o.html | 141 -- functions_r.html | 117 -- functions_s.html | 204 --- functions_t.html | 110 -- functions_u.html | 108 -- functions_w.html | 107 -- functions_~.html | 112 -- globals.html | 125 -- globals_defs.html | 125 -- hierarchy.html | 138 -- hierarchy.js | 35 - index.html | 2 +- md_1_8x__to2_8x__migration__guide.html | 80 +- ...github_2workspace_2_c_h_a_n_g_e_l_o_g.html | 339 ++-- md__bluetooth_015_01features.html | 14 +- md__migration__guide.html | 76 +- md__new__user__guide.html | 38 +- md__usage__tips.html | 8 +- menudata.js | 76 +- navtreedata.js | 88 +- navtreeindex0.js | 432 ++--- navtreeindex1.js | 345 +--- navtreeindex2.js | 253 --- navtreeindex3.js | 62 - nimconfig_8h.html | 239 --- nimconfig_8h.js | 25 - nimconfig_8h_source.html | 199 -- pages.html | 2 +- search/all_0.js | 4 +- search/all_11.js | 51 +- search/all_12.js | 56 +- search/all_14.js | 25 +- search/all_15.js | 159 +- search/all_16.js | 2 +- search/all_17.js | 17 +- search/all_1b.js | 9 +- search/all_2.js | 58 +- search/all_3.js | 9 +- search/all_6.js | 30 +- search/all_7.js | 2 +- search/all_8.js | 78 +- search/all_9.js | 22 +- search/all_a.js | 17 +- search/all_b.js | 2 +- search/all_c.js | 135 +- search/all_d.js | 16 +- search/all_e.js | 47 +- search/classes_0.js | 45 +- search/defines_0.js | 25 - search/files_0.js | 4 - search/functions_0.js | 14 +- search/functions_1.js | 2 +- search/functions_10.js | 5 +- search/functions_11.js | 4 +- search/functions_12.js | 10 - search/functions_2.js | 20 +- search/functions_3.js | 14 +- search/functions_4.js | 9 +- search/functions_6.js | 133 +- search/functions_7.js | 14 +- search/functions_8.js | 37 +- search/functions_b.js | 17 +- search/functions_c.js | 48 +- search/functions_d.js | 17 +- search/functions_e.js | 139 +- search/functions_f.js | 2 +- search/searchdata.js | 18 +- struct_nim_b_l_e_task_data-members.html | 2 +- struct_nim_b_l_e_task_data.html | 2 +- 235 files changed, 2486 insertions(+), 28460 deletions(-) delete mode 100644 class_nim_b_l_e2904-members.html delete mode 100644 class_nim_b_l_e2904.html delete mode 100644 class_nim_b_l_e2904.js delete mode 100644 class_nim_b_l_e_advertised_device-members.html delete mode 100644 class_nim_b_l_e_advertised_device.html delete mode 100644 class_nim_b_l_e_advertised_device.js delete mode 100644 class_nim_b_l_e_attribute-members.html delete mode 100644 class_nim_b_l_e_attribute.html delete mode 100644 class_nim_b_l_e_attribute.js delete mode 100644 class_nim_b_l_e_beacon-members.html delete mode 100644 class_nim_b_l_e_beacon.html delete mode 100644 class_nim_b_l_e_beacon.js delete mode 100644 class_nim_b_l_e_characteristic-members.html delete mode 100644 class_nim_b_l_e_characteristic.html delete mode 100644 class_nim_b_l_e_characteristic.js delete mode 100644 class_nim_b_l_e_characteristic_callbacks-members.html delete mode 100644 class_nim_b_l_e_characteristic_callbacks.html delete mode 100644 class_nim_b_l_e_characteristic_callbacks.js delete mode 100644 class_nim_b_l_e_client-members.html delete mode 100644 class_nim_b_l_e_client.html delete mode 100644 class_nim_b_l_e_client.js delete mode 100644 class_nim_b_l_e_client_callbacks-members.html delete mode 100644 class_nim_b_l_e_client_callbacks.html delete mode 100644 class_nim_b_l_e_client_callbacks.js delete mode 100644 class_nim_b_l_e_descriptor-members.html delete mode 100644 class_nim_b_l_e_descriptor.html delete mode 100644 class_nim_b_l_e_descriptor.js delete mode 100644 class_nim_b_l_e_descriptor_callbacks-members.html delete mode 100644 class_nim_b_l_e_descriptor_callbacks.html delete mode 100644 class_nim_b_l_e_descriptor_callbacks.js delete mode 100644 class_nim_b_l_e_eddystone_t_l_m-members.html delete mode 100644 class_nim_b_l_e_eddystone_t_l_m.html delete mode 100644 class_nim_b_l_e_eddystone_t_l_m.js delete mode 100644 class_nim_b_l_e_ext_advertisement-members.html delete mode 100644 class_nim_b_l_e_ext_advertisement.html delete mode 100644 class_nim_b_l_e_ext_advertisement.js delete mode 100644 class_nim_b_l_e_ext_advertising-members.html delete mode 100644 class_nim_b_l_e_ext_advertising.html delete mode 100644 class_nim_b_l_e_ext_advertising.js delete mode 100644 class_nim_b_l_e_ext_advertising_callbacks-members.html delete mode 100644 class_nim_b_l_e_ext_advertising_callbacks.html delete mode 100644 class_nim_b_l_e_ext_advertising_callbacks.js delete mode 100644 class_nim_b_l_e_h_i_d_device-members.html delete mode 100644 class_nim_b_l_e_h_i_d_device.html delete mode 100644 class_nim_b_l_e_h_i_d_device.js delete mode 100644 class_nim_b_l_e_local_attribute-members.html delete mode 100644 class_nim_b_l_e_local_attribute.html delete mode 100644 class_nim_b_l_e_local_attribute.js delete mode 100644 class_nim_b_l_e_remote_characteristic-members.html delete mode 100644 class_nim_b_l_e_remote_characteristic.html delete mode 100644 class_nim_b_l_e_remote_characteristic.js delete mode 100644 class_nim_b_l_e_remote_descriptor-members.html delete mode 100644 class_nim_b_l_e_remote_descriptor.html delete mode 100644 class_nim_b_l_e_remote_descriptor.js delete mode 100644 class_nim_b_l_e_remote_service-members.html delete mode 100644 class_nim_b_l_e_remote_service.html delete mode 100644 class_nim_b_l_e_remote_service.js delete mode 100644 class_nim_b_l_e_scan-members.html delete mode 100644 class_nim_b_l_e_scan.html delete mode 100644 class_nim_b_l_e_scan.js delete mode 100644 class_nim_b_l_e_scan_callbacks-members.html delete mode 100644 class_nim_b_l_e_scan_callbacks.html delete mode 100644 class_nim_b_l_e_scan_callbacks.js delete mode 100644 class_nim_b_l_e_scan_results-members.html delete mode 100644 class_nim_b_l_e_scan_results.html delete mode 100644 class_nim_b_l_e_scan_results.js delete mode 100644 class_nim_b_l_e_server-members.html delete mode 100644 class_nim_b_l_e_server.html delete mode 100644 class_nim_b_l_e_server.js delete mode 100644 class_nim_b_l_e_server_callbacks-members.html delete mode 100644 class_nim_b_l_e_server_callbacks.html delete mode 100644 class_nim_b_l_e_server_callbacks.js delete mode 100644 class_nim_b_l_e_service-members.html delete mode 100644 class_nim_b_l_e_service.html delete mode 100644 class_nim_b_l_e_service.js delete mode 100644 functions_b.html delete mode 100644 functions_c.html delete mode 100644 functions_d.html delete mode 100644 functions_dup.js delete mode 100644 functions_e.html delete mode 100644 functions_f.html delete mode 100644 functions_func.js delete mode 100644 functions_func_b.html delete mode 100644 functions_func_c.html delete mode 100644 functions_func_d.html delete mode 100644 functions_func_e.html delete mode 100644 functions_func_f.html delete mode 100644 functions_func_g.html delete mode 100644 functions_func_h.html delete mode 100644 functions_func_i.html delete mode 100644 functions_func_l.html delete mode 100644 functions_func_m.html delete mode 100644 functions_func_n.html delete mode 100644 functions_func_o.html delete mode 100644 functions_func_r.html delete mode 100644 functions_func_s.html delete mode 100644 functions_func_t.html delete mode 100644 functions_func_u.html delete mode 100644 functions_func_w.html delete mode 100644 functions_func_~.html delete mode 100644 functions_g.html delete mode 100644 functions_h.html delete mode 100644 functions_i.html delete mode 100644 functions_l.html delete mode 100644 functions_m.html delete mode 100644 functions_n.html delete mode 100644 functions_o.html delete mode 100644 functions_r.html delete mode 100644 functions_s.html delete mode 100644 functions_t.html delete mode 100644 functions_u.html delete mode 100644 functions_w.html delete mode 100644 functions_~.html delete mode 100644 globals.html delete mode 100644 globals_defs.html delete mode 100644 hierarchy.html delete mode 100644 hierarchy.js delete mode 100644 navtreeindex2.js delete mode 100644 navtreeindex3.js delete mode 100644 nimconfig_8h.html delete mode 100644 nimconfig_8h.js delete mode 100644 nimconfig_8h_source.html delete mode 100644 search/defines_0.js delete mode 100644 search/files_0.js delete mode 100644 search/functions_12.js diff --git a/_h_i_d_keyboard_types_8h_source.html b/_h_i_d_keyboard_types_8h_source.html index 3ecd6e9..7922d8d 100644 --- a/_h_i_d_keyboard_types_8h_source.html +++ b/_h_i_d_keyboard_types_8h_source.html @@ -25,7 +25,7 @@ -
esp-nimble-cpp 2.3.1 +
esp-nimble-cpp 2.3.2
diff --git a/_h_i_d_types_8h_source.html b/_h_i_d_types_8h_source.html index 6051fe2..2bade38 100644 --- a/_h_i_d_types_8h_source.html +++ b/_h_i_d_types_8h_source.html @@ -25,7 +25,7 @@ -
esp-nimble-cpp 2.3.1 +
esp-nimble-cpp 2.3.2
diff --git a/_nim_b_l_e2904_8h_source.html b/_nim_b_l_e2904_8h_source.html index e1b2581..854ab54 100644 --- a/_nim_b_l_e2904_8h_source.html +++ b/_nim_b_l_e2904_8h_source.html @@ -25,7 +25,7 @@ -
esp-nimble-cpp 2.3.1 +
esp-nimble-cpp 2.3.2
@@ -117,8 +117,8 @@ $(document).ready(function(){initNavTree('_nim_b_l_e2904_8h_source.html',''); in
18#ifndef NIMBLE_CPP_2904_H_
19#define NIMBLE_CPP_2904_H_
20
-
21#include "nimconfig.h"
-
22#if CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_PERIPHERAL
+
21#include "syscfg/syscfg.h"
+
22#if CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_ROLE_PERIPHERAL)
23
24# include "NimBLEDescriptor.h"
25
@@ -130,10 +130,9 @@ $(document).ready(function(){initNavTree('_nim_b_l_e2904_8h_source.html',''); in
31 uint16_t m_description{0}; // unknown description
32} __attribute__((packed));
33
-
- +
39class NimBLE2904 : public NimBLEDescriptor {
40 public:
-
41 NimBLE2904(NimBLECharacteristic* pChr = nullptr);
+
41 NimBLE2904(NimBLECharacteristic* pChr = nullptr);
42 static const uint8_t FORMAT_BOOLEAN = 1;
43 static const uint8_t FORMAT_UINT2 = 2;
44 static const uint8_t FORMAT_UINT4 = 3;
@@ -163,29 +162,19 @@ $(document).ready(function(){initNavTree('_nim_b_l_e2904_8h_source.html',''); in
68 static const uint8_t FORMAT_OPAQUE = 27;
69 static const uint8_t FORMAT_MEDASN1 = 28;
70
-
71 void setDescription(uint16_t description);
-
72 void setExponent(int8_t exponent);
-
73 void setFormat(uint8_t format);
-
74 void setNamespace(uint8_t namespace_value);
-
75 void setUnit(uint16_t unit);
+
71 void setDescription(uint16_t description);
+
72 void setExponent(int8_t exponent);
+
73 void setFormat(uint8_t format);
+
74 void setNamespace(uint8_t namespace_value);
+
75 void setUnit(uint16_t unit);
76
77 private:
-
78 friend class NimBLECharacteristic;
+
78 friend class NimBLECharacteristic;
79 NimBLE2904Data m_data{};
80}; // NimBLE2904
-
81
-
82#endif // CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_PERIPHERAL
+
82#endif // CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_ROLE_PERIPHERAL)
83#endif // NIMBLE_CPP_2904_H_
-
Descriptor for Characteristic Presentation Format.
Definition NimBLE2904.h:39
-
void setDescription(uint16_t description)
Set the description.
Definition NimBLE2904.cpp:30
-
void setNamespace(uint8_t namespace_value)
Set the namespace.
Definition NimBLE2904.cpp:57
-
void setExponent(int8_t exponent)
Set the exponent.
Definition NimBLE2904.cpp:39
-
void setFormat(uint8_t format)
Set the format.
Definition NimBLE2904.cpp:48
-
void setUnit(uint16_t unit)
Set the units for this value.
Definition NimBLE2904.cpp:67
-
The model of a BLE Characteristic.
Definition NimBLECharacteristic.h:41
-
A model of a BLE descriptor.
Definition NimBLEDescriptor.h:33
-
diff --git a/_nim_b_l_e_address_8h_source.html b/_nim_b_l_e_address_8h_source.html index 4a4221d..da8520a 100644 --- a/_nim_b_l_e_address_8h_source.html +++ b/_nim_b_l_e_address_8h_source.html @@ -25,7 +25,7 @@ -
esp-nimble-cpp 2.3.1 +
esp-nimble-cpp 2.3.2
@@ -117,8 +117,8 @@ $(document).ready(function(){initNavTree('_nim_b_l_e_address_8h_source.html','')
18#ifndef NIMBLE_CPP_ADDRESS_H_
19#define NIMBLE_CPP_ADDRESS_H_
20
-
21#include "nimconfig.h"
-
22#if CONFIG_BT_ENABLED
+
21#include "syscfg/syscfg.h"
+
22#if CONFIG_BT_NIMBLE_ENABLED
23
24# if defined(CONFIG_NIMBLE_CPP_IDF)
25# include "nimble/ble.h"
@@ -160,7 +160,7 @@ $(document).ready(function(){initNavTree('_nim_b_l_e_address_8h_source.html','')
68};
69
-
70#endif // CONFIG_BT_ENABLED
+
70#endif // CONFIG_BT_NIMBLE_ENABLED
71#endif // NIMBLE_CPP_ADDRESS_H_
A BLE device address.
Definition NimBLEAddress.h:42
const NimBLEAddress & reverseByteOrder()
Reverse the byte order of the address.
Definition NimBLEAddress.cpp:194
@@ -177,7 +177,6 @@ $(document).ready(function(){initNavTree('_nim_b_l_e_address_8h_source.html','')
std::string toString() const
Convert a BLE address to a string.
Definition NimBLEAddress.cpp:186
NimBLEAddress()=default
Create a blank address, i.e. 00:00:00:00:00:00, type 0.
bool operator!=(const NimBLEAddress &rhs) const
Convenience operator to check if this address is not equal to another.
Definition NimBLEAddress.cpp:213
-
diff --git a/_nim_b_l_e_advertised_device_8h_source.html b/_nim_b_l_e_advertised_device_8h_source.html index 5dba721..aee4f54 100644 --- a/_nim_b_l_e_advertised_device_8h_source.html +++ b/_nim_b_l_e_advertised_device_8h_source.html @@ -25,7 +25,7 @@ -
esp-nimble-cpp 2.3.1 +
esp-nimble-cpp 2.3.2
@@ -117,8 +117,8 @@ $(document).ready(function(){initNavTree('_nim_b_l_e_advertised_device_8h_source
18#ifndef NIMBLE_CPP_ADVERTISED_DEVICE_H_
19#define NIMBLE_CPP_ADVERTISED_DEVICE_H_
20
-
21#include "nimconfig.h"
-
22#if CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_OBSERVER
+
21#include "syscfg/syscfg.h"
+
22#if CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_ROLE_OBSERVER)
23
24# include "NimBLEAddress.h"
25# include "NimBLEScan.h"
@@ -134,99 +134,92 @@ $(document).ready(function(){initNavTree('_nim_b_l_e_advertised_device_8h_source
35
36# include <vector>
37
-
38class NimBLEScan;
-
- +
38class NimBLEScan;
+
45class NimBLEAdvertisedDevice {
46 public:
-
47 NimBLEAdvertisedDevice() = default;
+
47 NimBLEAdvertisedDevice() = default;
48
-
49 uint8_t getAdvType() const;
-
50 uint8_t getAdvFlags() const;
-
51 uint16_t getAppearance() const;
-
52 uint16_t getAdvInterval() const;
-
53 uint16_t getMinInterval() const;
-
54 uint16_t getMaxInterval() const;
-
55 uint8_t getManufacturerDataCount() const;
-
56 const NimBLEAddress& getAddress() const;
-
57 std::string getManufacturerData(uint8_t index = 0) const;
-
58 std::string getURI() const;
-
59 std::string getPayloadByType(uint16_t type, uint8_t index = 0) const;
-
60 std::string getName() const;
-
61 int8_t getRSSI() const;
-
62 NimBLEScan* getScan() const;
-
63 uint8_t getServiceDataCount() const;
-
64 std::string getServiceData(uint8_t index = 0) const;
-
65 std::string getServiceData(const NimBLEUUID& uuid) const;
-
66 NimBLEUUID getServiceDataUUID(uint8_t index = 0) const;
-
67 NimBLEUUID getServiceUUID(uint8_t index = 0) const;
-
68 uint8_t getServiceUUIDCount() const;
-
69 NimBLEAddress getTargetAddress(uint8_t index = 0) const;
-
70 uint8_t getTargetAddressCount() const;
-
71 int8_t getTXPower() const;
-
72 uint8_t getAdvLength() const;
-
73 uint8_t getAddressType() const;
-
74 bool isAdvertisingService(const NimBLEUUID& uuid) const;
-
75 bool haveAppearance() const;
-
76 bool haveManufacturerData() const;
-
77 bool haveName() const;
-
78 bool haveServiceData() const;
-
79 bool haveServiceUUID() const;
-
80 bool haveTXPower() const;
-
81 bool haveConnParams() const;
-
82 bool haveAdvInterval() const;
-
83 bool haveTargetAddress() const;
-
84 bool haveURI() const;
-
85 bool haveType(uint16_t type) const;
-
86 std::string toString() const;
-
87 bool isConnectable() const;
-
88 bool isScannable() const;
-
89 bool isLegacyAdvertisement() const;
-
90# if CONFIG_BT_NIMBLE_EXT_ADV
-
91 uint8_t getSetId() const;
-
92 uint8_t getPrimaryPhy() const;
-
93 uint8_t getSecondaryPhy() const;
-
94 uint16_t getPeriodicInterval() const;
+
49 uint8_t getAdvType() const;
+
50 uint8_t getAdvFlags() const;
+
51 uint16_t getAppearance() const;
+
52 uint16_t getAdvInterval() const;
+
53 uint16_t getMinInterval() const;
+
54 uint16_t getMaxInterval() const;
+
55 uint8_t getManufacturerDataCount() const;
+
56 const NimBLEAddress& getAddress() const;
+
57 std::string getManufacturerData(uint8_t index = 0) const;
+
58 std::string getURI() const;
+
59 std::string getPayloadByType(uint16_t type, uint8_t index = 0) const;
+
60 std::string getName() const;
+
61 int8_t getRSSI() const;
+
62 NimBLEScan* getScan() const;
+
63 uint8_t getServiceDataCount() const;
+
64 std::string getServiceData(uint8_t index = 0) const;
+
65 std::string getServiceData(const NimBLEUUID& uuid) const;
+
66 NimBLEUUID getServiceDataUUID(uint8_t index = 0) const;
+
67 NimBLEUUID getServiceUUID(uint8_t index = 0) const;
+
68 uint8_t getServiceUUIDCount() const;
+
69 NimBLEAddress getTargetAddress(uint8_t index = 0) const;
+
70 uint8_t getTargetAddressCount() const;
+
71 int8_t getTXPower() const;
+
72 uint8_t getAdvLength() const;
+
73 uint8_t getAddressType() const;
+
74 bool isAdvertisingService(const NimBLEUUID& uuid) const;
+
75 bool haveAppearance() const;
+
76 bool haveManufacturerData() const;
+
77 bool haveName() const;
+
78 bool haveServiceData() const;
+
79 bool haveServiceUUID() const;
+
80 bool haveTXPower() const;
+
81 bool haveConnParams() const;
+
82 bool haveAdvInterval() const;
+
83 bool haveTargetAddress() const;
+
84 bool haveURI() const;
+
85 bool haveType(uint16_t type) const;
+
86 std::string toString() const;
+
87 bool isConnectable() const;
+
88 bool isScannable() const;
+
89 bool isLegacyAdvertisement() const;
+
90# if MYNEWT_VAL(BLE_EXT_ADV)
+
91 uint8_t getSetId() const;
+
92 uint8_t getPrimaryPhy() const;
+
93 uint8_t getSecondaryPhy() const;
+
94 uint16_t getPeriodicInterval() const;
95# endif
96 operator NimBLEAddress() const;
97
-
98 const std::vector<uint8_t>& getPayload() const;
-
99 const std::vector<uint8_t>::const_iterator begin() const;
-
100 const std::vector<uint8_t>::const_iterator end() const;
+
98 const std::vector<uint8_t>& getPayload() const;
+
99 const std::vector<uint8_t>::const_iterator begin() const;
+
100 const std::vector<uint8_t>::const_iterator end() const;
101
110 template <typename T>
-
-
111 T getManufacturerData(bool skipSizeCheck = false) const {
-
112 std::string data = getManufacturerData();
+
111 T getManufacturerData(bool skipSizeCheck = false) const {
+
112 std::string data = getManufacturerData();
113 if (!skipSizeCheck && data.size() < sizeof(T)) return T();
114 const char* pData = data.data();
115 return *((T*)pData);
116 }
-
117
127 template <typename T>
-
-
128 T getServiceData(uint8_t index = 0, bool skipSizeCheck = false) const {
-
129 std::string data = getServiceData(index);
+
128 T getServiceData(uint8_t index = 0, bool skipSizeCheck = false) const {
+
129 std::string data = getServiceData(index);
130 if (!skipSizeCheck && data.size() < sizeof(T)) return T();
131 const char* pData = data.data();
132 return *((T*)pData);
133 }
-
134
144 template <typename T>
-
-
145 T getServiceData(const NimBLEUUID& uuid, bool skipSizeCheck = false) const {
-
146 std::string data = getServiceData(uuid);
+
145 T getServiceData(const NimBLEUUID& uuid, bool skipSizeCheck = false) const {
+
146 std::string data = getServiceData(uuid);
147 if (!skipSizeCheck && data.size() < sizeof(T)) return T();
148 const char* pData = data.data();
149 return *((T*)pData);
150 }
-
151
152 private:
-
153 friend class NimBLEScan;
+
153 friend class NimBLEScan;
154
-
155 NimBLEAdvertisedDevice(const ble_gap_event* event, uint8_t eventType);
+
155 NimBLEAdvertisedDevice(const ble_gap_event* event, uint8_t eventType);
156 void update(const ble_gap_event* event, uint8_t eventType);
157 uint8_t findAdvField(uint8_t type, uint8_t index = 0, size_t* data_loc = nullptr) const;
158 size_t findServiceData(uint8_t index, uint8_t* bytes) const;
@@ -237,7 +230,7 @@ $(document).ready(function(){initNavTree('_nim_b_l_e_advertised_device_8h_source
163 uint8_t m_callbackSent{};
164 uint8_t m_advLength{};
165
-
166# if CONFIG_BT_NIMBLE_EXT_ADV
+
166# if MYNEWT_VAL(BLE_EXT_ADV)
167 bool m_isLegacyAdv{};
168 uint8_t m_sid{};
169 uint8_t m_primPhy{};
@@ -247,65 +240,11 @@ $(document).ready(function(){initNavTree('_nim_b_l_e_advertised_device_8h_source
173
174 std::vector<uint8_t> m_payload;
175};
-
176
-
177#endif /* CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_OBSERVER */
+
177#endif /* CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_ROLE_OBSERVER) */
178#endif /* NIMBLE_CPP_ADVERTISED_DEVICE_H_ */
A BLE device address.
Definition NimBLEAddress.h:42
-
A representation of a BLE advertised device found by a scan.
Definition NimBLEAdvertisedDevice.h:45
-
uint8_t getManufacturerDataCount() const
Get the count of manufacturer data sets.
Definition NimBLEAdvertisedDevice.cpp:199
-
const std::vector< uint8_t > & getPayload() const
Get the payload advertised by the device.
Definition NimBLEAdvertisedDevice.cpp:796
-
uint8_t getTargetAddressCount() const
Get the number of target addresses.
Definition NimBLEAdvertisedDevice.cpp:257
-
bool haveServiceUUID() const
Does this advertisement have a service UUID value?
Definition NimBLEAdvertisedDevice.cpp:571
-
NimBLEScan * getScan() const
Get the scan object that created this advertised device.
Definition NimBLEAdvertisedDevice.cpp:249
-
T getServiceData(uint8_t index=0, bool skipSizeCheck=false) const
A template to convert the service data to <type>.
Definition NimBLEAdvertisedDevice.h:128
-
bool haveURI() const
Does this advertisement have a URI?
Definition NimBLEAdvertisedDevice.cpp:531
-
T getManufacturerData(bool skipSizeCheck=false) const
A template to convert the service data to <type>.
Definition NimBLEAdvertisedDevice.h:111
-
uint8_t getAddressType() const
Get the advertised device address type.
Definition NimBLEAdvertisedDevice.cpp:745
-
uint8_t getSecondaryPhy() const
Get the primary PHY used by this advertisement.
Definition NimBLEAdvertisedDevice.cpp:609
-
int8_t getTXPower() const
Get the TX Power.
Definition NimBLEAdvertisedDevice.cpp:483
-
bool isLegacyAdvertisement() const
Check if this advertisement is a legacy or extended type.
Definition NimBLEAdvertisedDevice.cpp:774
-
NimBLEUUID getServiceDataUUID(uint8_t index=0) const
Get the UUID of the service data at the index.
Definition NimBLEAdvertisedDevice.cpp:343
-
std::string getURI() const
Get the URI from the advertisement.
Definition NimBLEAdvertisedDevice.cpp:207
-
bool haveConnParams() const
Does this advertisement have preferred connection parameters?
Definition NimBLEAdvertisedDevice.cpp:499
-
bool haveTargetAddress() const
Does the advertisement contain a target address?
Definition NimBLEAdvertisedDevice.cpp:547
-
bool isScannable() const
Check if this device is advertising as scannable.
Definition NimBLEAdvertisedDevice.cpp:766
-
int8_t getRSSI() const
Get the RSSI.
Definition NimBLEAdvertisedDevice.cpp:241
-
std::string getPayloadByType(uint16_t type, uint8_t index=0) const
Get the data from any type available in the advertisement.
Definition NimBLEAdvertisedDevice.cpp:217
-
uint16_t getAppearance() const
Get the appearance.
Definition NimBLEAdvertisedDevice.cpp:126
-
const std::vector< uint8_t >::const_iterator end() const
Get the end iterator for the payload.
Definition NimBLEAdvertisedDevice.cpp:812
-
uint16_t getPeriodicInterval() const
Get the periodic interval of the advertisement.
Definition NimBLEAdvertisedDevice.cpp:617
-
bool haveAppearance() const
Does this advertisement have an appearance value?
Definition NimBLEAdvertisedDevice.cpp:515
-
bool haveType(uint16_t type) const
Does this advertisement have a adv type type?
Definition NimBLEAdvertisedDevice.cpp:539
-
uint8_t getPrimaryPhy() const
Get the primary PHY used by this advertisement.
Definition NimBLEAdvertisedDevice.cpp:598
-
std::string getServiceData(uint8_t index=0) const
Get the service data.
Definition NimBLEAdvertisedDevice.cpp:297
-
uint8_t getServiceDataCount() const
Get the count of advertised service data UUIDS.
Definition NimBLEAdvertisedDevice.cpp:393
-
bool haveAdvInterval() const
Does this advertisement have have the advertising interval?
Definition NimBLEAdvertisedDevice.cpp:507
-
const std::vector< uint8_t >::const_iterator begin() const
Get the begin iterator for the payload.
Definition NimBLEAdvertisedDevice.cpp:804
-
std::string getManufacturerData(uint8_t index=0) const
Get the manufacturer data.
Definition NimBLEAdvertisedDevice.cpp:191
-
uint8_t getAdvType() const
Get the advertisement type.
Definition NimBLEAdvertisedDevice.cpp:95
-
bool haveServiceData() const
Does this advertisement have a service data value?
Definition NimBLEAdvertisedDevice.cpp:563
-
bool isConnectable() const
Check if this device is advertising as connectable.
Definition NimBLEAdvertisedDevice.cpp:753
-
const NimBLEAddress & getAddress() const
Get the address of the advertising device.
Definition NimBLEAdvertisedDevice.cpp:82
-
uint8_t getAdvFlags() const
Get the advertisement flags.
Definition NimBLEAdvertisedDevice.cpp:106
-
uint16_t getMinInterval() const
Get the preferred min connection interval.
Definition NimBLEAdvertisedDevice.cpp:158
-
std::string getName() const
Get the advertised name.
Definition NimBLEAdvertisedDevice.cpp:233
-
bool isAdvertisingService(const NimBLEUUID &uuid) const
Check advertised services for existence of the required UUID.
Definition NimBLEAdvertisedDevice.cpp:468
-
uint16_t getAdvInterval() const
Get the advertisement interval.
Definition NimBLEAdvertisedDevice.cpp:142
-
std::string toString() const
Create a string representation of this device.
Definition NimBLEAdvertisedDevice.cpp:689
-
bool haveManufacturerData() const
Does this advertisement have manufacturer data?
Definition NimBLEAdvertisedDevice.cpp:523
-
uint8_t getSetId() const
Get the set ID of the extended advertisement.
Definition NimBLEAdvertisedDevice.cpp:588
-
uint8_t getServiceUUIDCount() const
Get the number of services advertised.
Definition NimBLEAdvertisedDevice.cpp:452
-
T getServiceData(const NimBLEUUID &uuid, bool skipSizeCheck=false) const
A template to convert the service data to <type>.
Definition NimBLEAdvertisedDevice.h:145
-
NimBLEUUID getServiceUUID(uint8_t index=0) const
Get the Service UUID.
Definition NimBLEAdvertisedDevice.cpp:406
-
uint16_t getMaxInterval() const
Get the preferred max connection interval.
Definition NimBLEAdvertisedDevice.cpp:174
-
bool haveName() const
Does this advertisement have a name value?
Definition NimBLEAdvertisedDevice.cpp:555
-
NimBLEAddress getTargetAddress(uint8_t index=0) const
Get the target address at the index.
Definition NimBLEAdvertisedDevice.cpp:269
-
uint8_t getAdvLength() const
Get the length of the advertisement data in the payload.
Definition NimBLEAdvertisedDevice.cpp:733
-
bool haveTXPower() const
Does this advertisement have a transmission power value?
Definition NimBLEAdvertisedDevice.cpp:579
-
Perform and manage BLE scans.
Definition NimBLEScan.h:67
A model of a BLE UUID.
Definition NimBLEUUID.h:41
-
diff --git a/_nim_b_l_e_advertisement_data_8h_source.html b/_nim_b_l_e_advertisement_data_8h_source.html index 254f441..f3bccd2 100644 --- a/_nim_b_l_e_advertisement_data_8h_source.html +++ b/_nim_b_l_e_advertisement_data_8h_source.html @@ -25,7 +25,7 @@ -
esp-nimble-cpp 2.3.1 +
esp-nimble-cpp 2.3.2
@@ -117,8 +117,8 @@ $(document).ready(function(){initNavTree('_nim_b_l_e_advertisement_data_8h_sourc
18#ifndef NIMBLE_CPP_ADVERTISEMENT_DATA_H_
19#define NIMBLE_CPP_ADVERTISEMENT_DATA_H_
20
-
21#include "nimconfig.h"
-
22#if (CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_BROADCASTER && !CONFIG_BT_NIMBLE_EXT_ADV) || defined(_DOXYGEN_)
+
21#include "syscfg/syscfg.h"
+
22#if (CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_ROLE_BROADCASTER) && !MYNEWT_VAL(BLE_EXT_ADV)) || defined(_DOXYGEN_)
23
24# include <cstdint>
25# include <string>
@@ -172,7 +172,7 @@ $(document).ready(function(){initNavTree('_nim_b_l_e_advertisement_data_8h_sourc
75}; // NimBLEAdvertisementData
76
-
77#endif // (CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_BROADCASTER && !CONFIG_BT_NIMBLE_EXT_ADV) || defined(_DOXYGEN_)
+
77#endif // (CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_ROLE_BROADCASTER) && !MYNEWT_VAL(BLE_EXT_ADV)) || defined(_DOXYGEN_)
78#endif // NIMBLE_CPP_ADVERTISEMENT_DATA_H_
Advertisement data set by the programmer to be published by the BLE server.
Definition NimBLEAdvertisementData.h:32
bool setServiceData(const NimBLEUUID &uuid, const uint8_t *data, size_t length)
Set the service data advertised for the UUID.
Definition NimBLEAdvertisementData.cpp:460
@@ -201,7 +201,6 @@ $(document).ready(function(){initNavTree('_nim_b_l_e_advertisement_data_8h_sourc
bool removeServices()
Remove all service UUIDs from the advertisement.
Definition NimBLEAdvertisementData.cpp:259
Perform and manage BLE advertising.
Definition NimBLEAdvertising.h:51
A model of a BLE UUID.
Definition NimBLEUUID.h:41
-
diff --git a/_nim_b_l_e_advertising_8h_source.html b/_nim_b_l_e_advertising_8h_source.html index 7f3d7bd..b779d11 100644 --- a/_nim_b_l_e_advertising_8h_source.html +++ b/_nim_b_l_e_advertising_8h_source.html @@ -25,7 +25,7 @@ -
esp-nimble-cpp 2.3.1 +
esp-nimble-cpp 2.3.2
@@ -117,8 +117,8 @@ $(document).ready(function(){initNavTree('_nim_b_l_e_advertising_8h_source.html'
18#ifndef NIMBLE_CPP_ADVERTISING_H_
19#define NIMBLE_CPP_ADVERTISING_H_
20
-
21#include "nimconfig.h"
-
22#if (CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_BROADCASTER && !CONFIG_BT_NIMBLE_EXT_ADV) || defined(_DOXYGEN_)
+
21#include "syscfg/syscfg.h"
+
22#if (CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_ROLE_BROADCASTER) && !MYNEWT_VAL(BLE_EXT_ADV)) || defined(_DOXYGEN_)
23
24# if defined(CONFIG_NIMBLE_CPP_IDF)
25# include "host/ble_gap.h"
@@ -185,7 +185,7 @@ $(document).ready(function(){initNavTree('_nim_b_l_e_advertising_8h_source.html'
90
91 private:
92 friend class NimBLEDevice;
-
93 friend class NimBLEServer;
+
93 friend class NimBLEServer;
94
95 void onHostSync();
96 static int handleGapEvent(ble_gap_event* event, void* arg);
@@ -201,7 +201,7 @@ $(document).ready(function(){initNavTree('_nim_b_l_e_advertising_8h_source.html'
106};
107
-
108#endif // (CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_BROADCASTER && !CONFIG_BT_NIMBLE_EXT_ADV) || defined(_DOXYGEN_)
+
108#endif // (CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_ROLE_BROADCASTER) && !MYNEWT_VAL(BLE_EXT_ADV)) || defined(_DOXYGEN_)
109#endif // NIMBLE_CPP_ADVERTISING_H_
A BLE device address.
Definition NimBLEAddress.h:42
Advertisement data set by the programmer to be published by the BLE server.
Definition NimBLEAdvertisementData.h:32
@@ -235,10 +235,8 @@ $(document).ready(function(){initNavTree('_nim_b_l_e_advertising_8h_source.html'
const NimBLEAdvertisementData & getScanData()
Get the current scan response data.
Definition NimBLEAdvertising.cpp:373
bool setConnectableMode(uint8_t mode)
Set the type of connectable mode to advertise.
Definition NimBLEAdvertising.cpp:75
void clearData()
Clear the advertisement and scan response data and set the flags to BLE_HS_ADV_F_DISC_GEN.
Definition NimBLEAdvertising.cpp:380
-
A model of a BLE Device from which all the BLE roles are created.
Definition NimBLEDevice.h:122
-
The model of a BLE server.
Definition NimBLEServer.h:62
+
A model of a BLE Device from which all the BLE roles are created.
Definition NimBLEDevice.h:116
A model of a BLE UUID.
Definition NimBLEUUID.h:41
-
diff --git a/_nim_b_l_e_att_value_8h_source.html b/_nim_b_l_e_att_value_8h_source.html index 0d53537..eaa82eb 100644 --- a/_nim_b_l_e_att_value_8h_source.html +++ b/_nim_b_l_e_att_value_8h_source.html @@ -25,7 +25,7 @@ -
esp-nimble-cpp 2.3.1 +
esp-nimble-cpp 2.3.2
@@ -117,8 +117,8 @@ $(document).ready(function(){initNavTree('_nim_b_l_e_att_value_8h_source.html','
18#ifndef NIMBLE_CPP_ATTVALUE_H
19#define NIMBLE_CPP_ATTVALUE_H
20
-
21#include "nimconfig.h"
-
22#if CONFIG_BT_ENABLED
+
21#include "syscfg/syscfg.h"
+
22#if CONFIG_BT_NIMBLE_ENABLED
23
24# ifdef NIMBLE_CPP_ARDUINO_STRING_AVAILABLE
25# include <Arduino.h>
@@ -174,7 +174,7 @@ $(document).ready(function(){initNavTree('_nim_b_l_e_att_value_8h_source.html','
80 void deepCopy(const NimBLEAttValue& source);
81
82 public:
-
88 NimBLEAttValue(uint16_t init_len = CONFIG_NIMBLE_CPP_ATT_VALUE_INIT_LENGTH, uint16_t max_len = BLE_ATT_ATTR_MAX_LEN);
+
88 NimBLEAttValue(uint16_t init_len = CONFIG_NIMBLE_CPP_ATT_VALUE_INIT_LENGTH, uint16_t max_len = BLE_ATT_ATTR_MAX_LEN);
89
96 NimBLEAttValue(const uint8_t* value, uint16_t len, uint16_t max_len = BLE_ATT_ATTR_MAX_LEN);
97
@@ -368,26 +368,26 @@ $(document).ready(function(){initNavTree('_nim_b_l_e_att_value_8h_source.html','
364};
365
-
366#endif // CONFIG_BT_ENABLED
+
366#endif // CONFIG_BT_NIMBLE_ENABLED
367#endif // NIMBLE_CPP_ATTVALUE_H_
A specialized container class to hold BLE attribute values.
Definition NimBLEAttValue.h:72
NimBLEAttValue(const std::vector< uint8_t > vec, uint16_t max_len=BLE_ATT_ATTR_MAX_LEN)
Construct with an initial value from a std::vector<uint8_t>.
Definition NimBLEAttValue.h:127
-
~NimBLEAttValue()
Destructor.
Definition NimBLEAttValue.cpp:57
+
~NimBLEAttValue()
Destructor.
Definition NimBLEAttValue.cpp:58
uint16_t length() const
Returns the current length of the value in bytes.
Definition NimBLEAttValue.h:156
NimBLEAttValue(const char *value, uint16_t max_len=BLE_ATT_ATTR_MAX_LEN)
Construct with an initial value from a const char string.
Definition NimBLEAttValue.h:103
uint16_t capacity() const
Returns the currently allocated capacity in bytes.
Definition NimBLEAttValue.h:153
const char * c_str() const
Returns a pointer to the internal buffer of the value as a const char*.
Definition NimBLEAttValue.h:165
NimBLEAttValue(const std::string str, uint16_t max_len=BLE_ATT_ATTR_MAX_LEN)
Construct with an initial value from a std::string.
Definition NimBLEAttValue.h:119
-
bool setValue(const uint8_t *value, uint16_t len)
Set the value from a buffer.
Definition NimBLEAttValue.cpp:106
+
bool setValue(const uint8_t *value, uint16_t len)
Set the value from a buffer.
Definition NimBLEAttValue.cpp:107
NimBLEAttValue(std::initializer_list< uint8_t > list, uint16_t max_len=BLE_ATT_ATTR_MAX_LEN)
Construct with an initializer list.
Definition NimBLEAttValue.h:111
NimBLEAttValue & operator+=(const NimBLEAttValue &source)
Operator; Append another NimBLEAttValue.
Definition NimBLEAttValue.h:338
NimBLEAttValue(const NimBLEAttValue &source)
Copy constructor.
Definition NimBLEAttValue.h:141
NimBLEAttValue(NimBLEAttValue &&source)
Move constructor.
Definition NimBLEAttValue.h:144
const uint8_t * data() const
Returns a pointer to the internal buffer of the value.
Definition NimBLEAttValue.h:162
-
uint8_t operator[](int pos) const
Subscript operator.
Definition NimBLEAttValue.cpp:153
+
uint8_t operator[](int pos) const
Subscript operator.
Definition NimBLEAttValue.cpp:154
const uint8_t * end() const
Iterator end.
Definition NimBLEAttValue.h:171
bool setValue(const T &v)
Template to set value to the value of <type>val.
Definition NimBLEAttValue.h:245
-
NimBLEAttValue & append(const uint8_t *value, uint16_t len)
Append data to the value.
Definition NimBLEAttValue.cpp:114
+
NimBLEAttValue & append(const uint8_t *value, uint16_t len)
Append data to the value.
Definition NimBLEAttValue.cpp:115
uint16_t size() const
Returns the current size of the value in bytes.
Definition NimBLEAttValue.h:159
bool setValue(const char *s, uint16_t len=0)
Set value to the value of const char*.
Definition NimBLEAttValue.h:204
T getValue(time_t *timestamp=nullptr, bool skipSizeCheck=false) const
Template to return the value as a <type>.
Definition NimBLEAttValue.h:308
@@ -397,8 +397,6 @@ $(document).ready(function(){initNavTree('_nim_b_l_e_att_value_8h_source.html','
NimBLEAttValue & operator=(const std::string &source)
Operator; Set the value from a std::string source.
Definition NimBLEAttValue.h:341
const uint8_t * begin() const
Iterator begin.
Definition NimBLEAttValue.h:168
bool operator!=(const NimBLEAttValue &source) const
Inequality operator.
Definition NimBLEAttValue.h:358
-
-
#define CONFIG_NIMBLE_CPP_ATT_VALUE_INIT_LENGTH
Uncomment to set the default allocation size (bytes) for each attribute if not specified when the con...
Definition nimconfig.h:68
diff --git a/_nim_b_l_e_attribute_8h_source.html b/_nim_b_l_e_attribute_8h_source.html index c52d742..f976f71 100644 --- a/_nim_b_l_e_attribute_8h_source.html +++ b/_nim_b_l_e_attribute_8h_source.html @@ -25,7 +25,7 @@ -
esp-nimble-cpp 2.3.1 +
esp-nimble-cpp 2.3.2
@@ -117,37 +117,29 @@ $(document).ready(function(){initNavTree('_nim_b_l_e_attribute_8h_source.html','
18#ifndef NIMBLE_CPP_ATTRIBUTE_H_
19#define NIMBLE_CPP_ATTRIBUTE_H_
20
-
21#include "nimconfig.h"
-
22#if CONFIG_BT_ENABLED && (CONFIG_BT_NIMBLE_ROLE_PERIPHERAL || CONFIG_BT_NIMBLE_ROLE_CENTRAL)
+
21#include "syscfg/syscfg.h"
+
22#if CONFIG_BT_NIMBLE_ENABLED && (MYNEWT_VAL(BLE_ROLE_PERIPHERAL) || MYNEWT_VAL(BLE_ROLE_CENTRAL))
23
24# include "NimBLEUUID.h"
25
-
- +
29class NimBLEAttribute {
30 public:
-
35 const NimBLEUUID& getUUID() const { return m_uuid; }
+
35 const NimBLEUUID& getUUID() const { return m_uuid; }
36
-
40 uint16_t getHandle() const { return m_handle; };
+
40 uint16_t getHandle() const { return m_handle; };
41
42 protected:
-
48 NimBLEAttribute(const NimBLEUUID& uuid, uint16_t handle) : m_uuid{uuid}, m_handle{handle} {}
+
48 NimBLEAttribute(const NimBLEUUID& uuid, uint16_t handle) : m_uuid{uuid}, m_handle{handle} {}
49
-
53 ~NimBLEAttribute() = default;
+
53 ~NimBLEAttribute() = default;
54
55 const NimBLEUUID m_uuid{};
56 uint16_t m_handle{0};
57};
-
58
-
59#endif // CONFIG_BT_ENABLED && (CONFIG_BT_NIMBLE_ROLE_PERIPHERAL || CONFIG_BT_NIMBLE_ROLE_CENTRAL)
+
59#endif // CONFIG_BT_NIMBLE_ENABLED && (MYNEWT_VAL(BLE_ROLE_PERIPHERAL) || MYNEWT_VAL(BLE_ROLE_CENTRAL))
60#endif // NIMBLE_CPP_ATTRIBUTE_H_
-
A base class for BLE attributes.
Definition NimBLEAttribute.h:29
-
NimBLEAttribute(const NimBLEUUID &uuid, uint16_t handle)
Construct a new NimBLEAttribute object.
Definition NimBLEAttribute.h:48
-
uint16_t getHandle() const
Get the handle of the attribute.
Definition NimBLEAttribute.h:40
-
~NimBLEAttribute()=default
Destroy the NimBLEAttribute object.
-
const NimBLEUUID & getUUID() const
Get the UUID of the attribute.
Definition NimBLEAttribute.h:35
A model of a BLE UUID.
Definition NimBLEUUID.h:41
-
diff --git a/_nim_b_l_e_beacon_8h_source.html b/_nim_b_l_e_beacon_8h_source.html index 41b483a..6cc0338 100644 --- a/_nim_b_l_e_beacon_8h_source.html +++ b/_nim_b_l_e_beacon_8h_source.html @@ -25,7 +25,7 @@ -
esp-nimble-cpp 2.3.1 +
esp-nimble-cpp 2.3.2
@@ -117,16 +117,15 @@ $(document).ready(function(){initNavTree('_nim_b_l_e_beacon_8h_source.html','');
18#ifndef NIMBLE_CPP_BEACON_H_
19#define NIMBLE_CPP_BEACON_H_
20
-
21#include "nimconfig.h"
-
22#if CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_BROADCASTER
+
21#include "syscfg/syscfg.h"
+
22#if CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_ROLE_BROADCASTER)
23
24class NimBLEUUID;
25
26# include <cstdint>
27# include <vector>
28
-
- +
34class NimBLEBeacon {
35 public:
36 struct BeaconData {
37 uint16_t manufacturerId{0x4c00};
@@ -142,42 +141,27 @@ $(document).ready(function(){initNavTree('_nim_b_l_e_beacon_8h_source.html','');
47 }
48 } __attribute__((packed));
49
-
50 const BeaconData& getData();
-
51 uint16_t getMajor();
-
52 uint16_t getMinor();
-
53 uint16_t getManufacturerId();
- -
55 int8_t getSignalPower();
-
56 void setData(const uint8_t* data, uint8_t length);
-
57 void setData(const BeaconData& data);
-
58 void setMajor(uint16_t major);
-
59 void setMinor(uint16_t minor);
-
60 void setManufacturerId(uint16_t manufacturerId);
-
61 void setProximityUUID(const NimBLEUUID& uuid);
-
62 void setSignalPower(int8_t signalPower);
+
50 const BeaconData& getData();
+
51 uint16_t getMajor();
+
52 uint16_t getMinor();
+
53 uint16_t getManufacturerId();
+
54 NimBLEUUID getProximityUUID();
+
55 int8_t getSignalPower();
+
56 void setData(const uint8_t* data, uint8_t length);
+
57 void setData(const BeaconData& data);
+
58 void setMajor(uint16_t major);
+
59 void setMinor(uint16_t minor);
+
60 void setManufacturerId(uint16_t manufacturerId);
+
61 void setProximityUUID(const NimBLEUUID& uuid);
+
62 void setSignalPower(int8_t signalPower);
63
64 private:
65 BeaconData m_beaconData;
66}; // NimBLEBeacon
-
67
-
68#endif // CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_PERIPHERAL
+
68#endif // CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_ROLE_PERIPHERAL)
69#endif // NIMBLE_CPP_BEACON_H_
-
Representation of a beacon. See:
Definition NimBLEBeacon.h:34
-
void setManufacturerId(uint16_t manufacturerId)
Set the manufacturer ID.
Definition NimBLEBeacon.cpp:109
-
void setMinor(uint16_t minor)
Set the minor value.
Definition NimBLEBeacon.cpp:117
-
uint16_t getMinor()
Get the minor value being advertised.
Definition NimBLEBeacon.cpp:56
-
int8_t getSignalPower()
Get the signal power being advertised.
Definition NimBLEBeacon.cpp:72
-
void setProximityUUID(const NimBLEUUID &uuid)
Set the proximity UUID.
Definition NimBLEBeacon.cpp:125
-
uint16_t getManufacturerId()
Get the manufacturer ID being advertised.
Definition NimBLEBeacon.cpp:48
-
const BeaconData & getData()
Retrieve the data that is being advertised.
Definition NimBLEBeacon.cpp:32
-
NimBLEUUID getProximityUUID()
Get the proximity UUID being advertised.
Definition NimBLEBeacon.cpp:64
-
uint16_t getMajor()
Get the major value being advertised.
Definition NimBLEBeacon.cpp:40
-
void setData(const uint8_t *data, uint8_t length)
Set the beacon data.
Definition NimBLEBeacon.cpp:81
-
void setMajor(uint16_t major)
Set the major value.
Definition NimBLEBeacon.cpp:101
-
void setSignalPower(int8_t signalPower)
Set the signal power.
Definition NimBLEBeacon.cpp:136
A model of a BLE UUID.
Definition NimBLEUUID.h:41
-
diff --git a/_nim_b_l_e_characteristic_8h_source.html b/_nim_b_l_e_characteristic_8h_source.html index 84b586e..7beb5d0 100644 --- a/_nim_b_l_e_characteristic_8h_source.html +++ b/_nim_b_l_e_characteristic_8h_source.html @@ -25,7 +25,7 @@ -
esp-nimble-cpp 2.3.1 +
esp-nimble-cpp 2.3.2
@@ -117,57 +117,56 @@ $(document).ready(function(){initNavTree('_nim_b_l_e_characteristic_8h_source.ht
18#ifndef NIMBLE_CPP_CHARACTERISTIC_H_
19#define NIMBLE_CPP_CHARACTERISTIC_H_
20
-
21#include "nimconfig.h"
-
22#if CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_PERIPHERAL
+
21#include "syscfg/syscfg.h"
+
22#if CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_ROLE_PERIPHERAL)
23
- -
25class NimBLEService;
- - -
28class NimBLE2904;
+
24class NimBLECharacteristicCallbacks;
+
25class NimBLEService;
+
26class NimBLECharacteristic;
+
27class NimBLEDescriptor;
+
28class NimBLE2904;
29
30# include "NimBLELocalValueAttribute.h"
31
32# include <string>
33# include <vector>
34
-
-
41class NimBLECharacteristic : public NimBLELocalValueAttribute {
+
41class NimBLECharacteristic : public NimBLELocalValueAttribute {
42 public:
-
43 NimBLECharacteristic(const char* uuid,
+
43 NimBLECharacteristic(const char* uuid,
44 uint16_t properties = NIMBLE_PROPERTY::READ | NIMBLE_PROPERTY::WRITE,
45 uint16_t maxLen = BLE_ATT_ATTR_MAX_LEN,
-
46 NimBLEService* pService = nullptr);
- +
46 NimBLEService* pService = nullptr);
+
47 NimBLECharacteristic(const NimBLEUUID& uuid,
48 uint16_t properties = NIMBLE_PROPERTY::READ | NIMBLE_PROPERTY::WRITE,
49 uint16_t maxLen = BLE_ATT_ATTR_MAX_LEN,
-
50 NimBLEService* pService = nullptr);
+
50 NimBLEService* pService = nullptr);
51
- +
52 ~NimBLECharacteristic();
53
-
54 std::string toString() const;
-
55 void addDescriptor(NimBLEDescriptor* pDescriptor);
-
56 void removeDescriptor(NimBLEDescriptor* pDescriptor, bool deleteDsc = false);
-
57 uint16_t getProperties() const;
- -
59 bool indicate(uint16_t connHandle = BLE_HS_CONN_HANDLE_NONE) const;
-
60 bool indicate(const uint8_t* value, size_t length, uint16_t connHandle = BLE_HS_CONN_HANDLE_NONE) const;
-
61 bool notify(uint16_t connHandle = BLE_HS_CONN_HANDLE_NONE) const;
-
62 bool notify(const uint8_t* value, size_t length, uint16_t connHandle = BLE_HS_CONN_HANDLE_NONE) const;
+
54 std::string toString() const;
+
55 void addDescriptor(NimBLEDescriptor* pDescriptor);
+
56 void removeDescriptor(NimBLEDescriptor* pDescriptor, bool deleteDsc = false);
+
57 uint16_t getProperties() const;
+
58 void setCallbacks(NimBLECharacteristicCallbacks* pCallbacks);
+
59 bool indicate(uint16_t connHandle = BLE_HS_CONN_HANDLE_NONE) const;
+
60 bool indicate(const uint8_t* value, size_t length, uint16_t connHandle = BLE_HS_CONN_HANDLE_NONE) const;
+
61 bool notify(uint16_t connHandle = BLE_HS_CONN_HANDLE_NONE) const;
+
62 bool notify(const uint8_t* value, size_t length, uint16_t connHandle = BLE_HS_CONN_HANDLE_NONE) const;
63
-
64 NimBLEDescriptor* createDescriptor(const char* uuid,
+
64 NimBLEDescriptor* createDescriptor(const char* uuid,
65 uint32_t properties = NIMBLE_PROPERTY::READ | NIMBLE_PROPERTY::WRITE,
66 uint16_t maxLen = BLE_ATT_ATTR_MAX_LEN);
- +
67 NimBLEDescriptor* createDescriptor(const NimBLEUUID& uuid,
68 uint32_t properties = NIMBLE_PROPERTY::READ | NIMBLE_PROPERTY::WRITE,
69 uint16_t maxLen = BLE_ATT_ATTR_MAX_LEN);
- -
71 NimBLEDescriptor* getDescriptorByUUID(const char* uuid) const;
- -
73 NimBLEDescriptor* getDescriptorByHandle(uint16_t handle) const;
- +
70 NimBLE2904* create2904();
+
71 NimBLEDescriptor* getDescriptorByUUID(const char* uuid) const;
+
72 NimBLEDescriptor* getDescriptorByUUID(const NimBLEUUID& uuid) const;
+
73 NimBLEDescriptor* getDescriptorByHandle(uint16_t handle) const;
+
74 NimBLEService* getService() const;
75
- +
76 NimBLECharacteristicCallbacks* getCallbacks() const;
77
78 /*********************** Template Functions ************************/
79
@@ -180,11 +179,9 @@ $(document).ready(function(){initNavTree('_nim_b_l_e_characteristic_8h_source.ht
92 !Has_data_size<T>::value,
93 bool>::type
94# endif
-
-
95 notify(const T& v, uint16_t connHandle = BLE_HS_CONN_HANDLE_NONE) const {
-
96 return notify(reinterpret_cast<const uint8_t*>(&v), sizeof(T), connHandle);
+
95 notify(const T& v, uint16_t connHandle = BLE_HS_CONN_HANDLE_NONE) const {
+
96 return notify(reinterpret_cast<const uint8_t*>(&v), sizeof(T), connHandle);
97 }
-
98
104 template <typename T>
105# ifdef _DOXYGEN_
@@ -192,11 +189,9 @@ $(document).ready(function(){initNavTree('_nim_b_l_e_characteristic_8h_source.ht
107# else
108 typename std::enable_if<Has_c_str_length<T>::value && !Has_data_size<T>::value, bool>::type
109# endif
-
-
110 notify(const T& s, uint16_t connHandle = BLE_HS_CONN_HANDLE_NONE) const {
-
111 return notify(reinterpret_cast<const uint8_t*>(s.c_str()), s.length(), connHandle);
+
110 notify(const T& s, uint16_t connHandle = BLE_HS_CONN_HANDLE_NONE) const {
+
111 return notify(reinterpret_cast<const uint8_t*>(s.c_str()), s.length(), connHandle);
112 }
-
113
119 template <typename T>
120# ifdef _DOXYGEN_
@@ -204,11 +199,9 @@ $(document).ready(function(){initNavTree('_nim_b_l_e_characteristic_8h_source.ht
122# else
123 typename std::enable_if<Has_data_size<T>::value, bool>::type
124# endif
-
-
125 notify(const T& v, uint16_t connHandle = BLE_HS_CONN_HANDLE_NONE) const {
-
126 return notify(reinterpret_cast<const uint8_t*>(v.data()), v.size(), connHandle);
+
125 notify(const T& v, uint16_t connHandle = BLE_HS_CONN_HANDLE_NONE) const {
+
126 return notify(reinterpret_cast<const uint8_t*>(v.data()), v.size(), connHandle);
127 }
-
128
135 template <typename T>
136# ifdef _DOXYGEN_
@@ -218,11 +211,9 @@ $(document).ready(function(){initNavTree('_nim_b_l_e_characteristic_8h_source.ht
140 !Has_data_size<T>::value,
141 bool>::type
142# endif
-
-
143 indicate(const T& v, uint16_t connHandle = BLE_HS_CONN_HANDLE_NONE) const {
-
144 return indicate(reinterpret_cast<const uint8_t*>(&v), sizeof(T), connHandle);
+
143 indicate(const T& v, uint16_t connHandle = BLE_HS_CONN_HANDLE_NONE) const {
+
144 return indicate(reinterpret_cast<const uint8_t*>(&v), sizeof(T), connHandle);
145 }
-
146
152 template <typename T>
153# ifdef _DOXYGEN_
@@ -230,11 +221,9 @@ $(document).ready(function(){initNavTree('_nim_b_l_e_characteristic_8h_source.ht
155# else
156 typename std::enable_if<Has_c_str_length<T>::value && !Has_data_size<T>::value, bool>::type
157# endif
-
-
158 indicate(const T& s, uint16_t connHandle = BLE_HS_CONN_HANDLE_NONE) const {
-
159 return indicate(reinterpret_cast<const uint8_t*>(s.c_str()), s.length(), connHandle);
+
158 indicate(const T& s, uint16_t connHandle = BLE_HS_CONN_HANDLE_NONE) const {
+
159 return indicate(reinterpret_cast<const uint8_t*>(s.c_str()), s.length(), connHandle);
160 }
-
161
167 template <typename T>
168# ifdef _DOXYGEN_
@@ -242,44 +231,42 @@ $(document).ready(function(){initNavTree('_nim_b_l_e_characteristic_8h_source.ht
170# else
171 typename std::enable_if<Has_data_size<T>::value, bool>::type
172# endif
-
-
173 indicate(const T& v, uint16_t connHandle = BLE_HS_CONN_HANDLE_NONE) const {
-
174 return indicate(reinterpret_cast<const uint8_t*>(v.data()), v.size(), connHandle);
+
173 indicate(const T& v, uint16_t connHandle = BLE_HS_CONN_HANDLE_NONE) const {
+
174 return indicate(reinterpret_cast<const uint8_t*>(v.data()), v.size(), connHandle);
175 }
-
176
177# else
178
189 template <typename T>
-
190 typename std::enable_if<!std::is_pointer<T>::value && !std::is_array<T>::value, bool>::type notify(
+
190 typename std::enable_if<!std::is_pointer<T>::value && !std::is_array<T>::value, bool>::type notify(
191 const T& value, uint16_t connHandle = BLE_HS_CONN_HANDLE_NONE) const {
192 if constexpr (Has_data_size<T>::value) {
-
193 return notify(reinterpret_cast<const uint8_t*>(value.data()), value.size(), connHandle);
+
193 return notify(reinterpret_cast<const uint8_t*>(value.data()), value.size(), connHandle);
194 } else if constexpr (Has_c_str_length<T>::value) {
-
195 return notify(reinterpret_cast<const uint8_t*>(value.c_str()), value.length(), connHandle);
+
195 return notify(reinterpret_cast<const uint8_t*>(value.c_str()), value.length(), connHandle);
196 } else {
-
197 return notify(reinterpret_cast<const uint8_t*>(&value), sizeof(value), connHandle);
+
197 return notify(reinterpret_cast<const uint8_t*>(&value), sizeof(value), connHandle);
198 }
199 }
200
211 template <typename T>
-
212 typename std::enable_if<!std::is_pointer<T>::value && !std::is_array<T>::value, bool>::type indicate(
+
212 typename std::enable_if<!std::is_pointer<T>::value && !std::is_array<T>::value, bool>::type indicate(
213 const T& value, uint16_t connHandle = BLE_HS_CONN_HANDLE_NONE) const {
214 if constexpr (Has_data_size<T>::value) {
-
215 return indicate(reinterpret_cast<const uint8_t*>(value.data()), value.size(), connHandle);
+
215 return indicate(reinterpret_cast<const uint8_t*>(value.data()), value.size(), connHandle);
216 } else if constexpr (Has_c_str_length<T>::value) {
-
217 return indicate(reinterpret_cast<const uint8_t*>(value.c_str()), value.length(), connHandle);
+
217 return indicate(reinterpret_cast<const uint8_t*>(value.c_str()), value.length(), connHandle);
218 } else {
-
219 return indicate(reinterpret_cast<const uint8_t*>(&value), sizeof(value), connHandle);
+
219 return indicate(reinterpret_cast<const uint8_t*>(&value), sizeof(value), connHandle);
220 }
221 }
222# endif
223
224 private:
-
225 friend class NimBLEServer;
-
226 friend class NimBLEService;
+
225 friend class NimBLEServer;
+
226 friend class NimBLEService;
227
-
228 void setService(NimBLEService* pService);
+
228 void setService(NimBLEService* pService);
229 void readEvent(NimBLEConnInfo& connInfo) override;
230 void writeEvent(const uint8_t* val, uint16_t len, NimBLEConnInfo& connInfo) override;
231 bool sendValue(const uint8_t* value,
@@ -287,56 +274,24 @@ $(document).ready(function(){initNavTree('_nim_b_l_e_characteristic_8h_source.ht
233 bool is_notification = true,
234 uint16_t connHandle = BLE_HS_CONN_HANDLE_NONE) const;
235
-
236 NimBLECharacteristicCallbacks* m_pCallbacks{nullptr};
-
237 NimBLEService* m_pService{nullptr};
+
236 NimBLECharacteristicCallbacks* m_pCallbacks{nullptr};
+
237 NimBLEService* m_pService{nullptr};
238 std::vector<NimBLEDescriptor*> m_vDescriptors{};
239}; // NimBLECharacteristic
-
240
-
- +
248class NimBLECharacteristicCallbacks {
249 public:
- -
251 virtual void onRead(NimBLECharacteristic* pCharacteristic, NimBLEConnInfo& connInfo);
-
252 virtual void onWrite(NimBLECharacteristic* pCharacteristic, NimBLEConnInfo& connInfo);
-
253 virtual void onStatus(NimBLECharacteristic* pCharacteristic, int code);
-
254 virtual void onSubscribe(NimBLECharacteristic* pCharacteristic, NimBLEConnInfo& connInfo, uint16_t subValue);
+
250 virtual ~NimBLECharacteristicCallbacks() {}
+
251 virtual void onRead(NimBLECharacteristic* pCharacteristic, NimBLEConnInfo& connInfo);
+
252 virtual void onWrite(NimBLECharacteristic* pCharacteristic, NimBLEConnInfo& connInfo);
+
253 virtual void onStatus(NimBLECharacteristic* pCharacteristic, int code);
+
254 virtual void onSubscribe(NimBLECharacteristic* pCharacteristic, NimBLEConnInfo& connInfo, uint16_t subValue);
255};
-
256
-
257#endif // CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_PERIPHERAL
+
257#endif // CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_ROLE_PERIPHERAL)
258#endif // NIMBLE_CPP_CHARACTERISTIC_H_
-
Descriptor for Characteristic Presentation Format.
Definition NimBLE2904.h:39
-
Callbacks that can be associated with a BLE characteristic to inform of events.
Definition NimBLECharacteristic.h:248
-
virtual void onSubscribe(NimBLECharacteristic *pCharacteristic, NimBLEConnInfo &connInfo, uint16_t subValue)
Callback function called when a client changes subscription status.
Definition NimBLECharacteristic.cpp:411
-
virtual void onRead(NimBLECharacteristic *pCharacteristic, NimBLEConnInfo &connInfo)
Callback function to support a read request.
Definition NimBLECharacteristic.cpp:377
-
virtual void onStatus(NimBLECharacteristic *pCharacteristic, int code)
Callback function to support a Notify/Indicate Status report.
Definition NimBLECharacteristic.cpp:397
-
virtual void onWrite(NimBLECharacteristic *pCharacteristic, NimBLEConnInfo &connInfo)
Callback function to support a write request.
Definition NimBLECharacteristic.cpp:386
-
The model of a BLE Characteristic.
Definition NimBLECharacteristic.h:41
-
uint16_t getProperties() const
Get the properties of the characteristic.
Definition NimBLECharacteristic.cpp:199
-
NimBLEDescriptor * getDescriptorByHandle(uint16_t handle) const
Return the BLE Descriptor for the given handle.
Definition NimBLECharacteristic.cpp:186
-
void setCallbacks(NimBLECharacteristicCallbacks *pCallbacks)
Set the callback handlers for this characteristic.
Definition NimBLECharacteristic.cpp:338
-
void removeDescriptor(NimBLEDescriptor *pDescriptor, bool deleteDsc=false)
Remove a descriptor from the characteristic.
Definition NimBLECharacteristic.cpp:136
-
bool indicate(const T &s, uint16_t connHandle=BLE_HS_CONN_HANDLE_NONE) const
Template to send a indication with a value from a class that has a c_str() and length() method.
Definition NimBLECharacteristic.h:158
-
NimBLEDescriptor * getDescriptorByUUID(const char *uuid) const
Return the BLE Descriptor for the given UUID.
Definition NimBLECharacteristic.cpp:163
-
~NimBLECharacteristic()
Destructor.
Definition NimBLECharacteristic.cpp:53
-
NimBLEService * getService() const
Get the service that owns this characteristic.
Definition NimBLECharacteristic.cpp:206
-
bool notify(const T &v, uint16_t connHandle=BLE_HS_CONN_HANDLE_NONE) const
Template to send a notification with a value from a struct or array.
Definition NimBLECharacteristic.h:95
-
bool indicate(const T &v, uint16_t connHandle=BLE_HS_CONN_HANDLE_NONE) const
Template to send an indication with a value from a struct or array.
Definition NimBLECharacteristic.h:143
-
NimBLEDescriptor * createDescriptor(const char *uuid, uint32_t properties=NIMBLE_PROPERTY::READ|NIMBLE_PROPERTY::WRITE, uint16_t maxLen=BLE_ATT_ATTR_MAX_LEN)
Create a new BLE Descriptor associated with this characteristic.
Definition NimBLECharacteristic.cpp:66
-
bool indicate(uint16_t connHandle=BLE_HS_CONN_HANDLE_NONE) const
Send an indication.
Definition NimBLECharacteristic.cpp:220
-
bool notify(const T &s, uint16_t connHandle=BLE_HS_CONN_HANDLE_NONE) const
Template to send a notification with a value from a class that has a c_str() and length() method.
Definition NimBLECharacteristic.h:110
-
NimBLECharacteristicCallbacks * getCallbacks() const
Get the callback handlers for this characteristic.
Definition NimBLECharacteristic.cpp:349
-
bool notify(uint16_t connHandle=BLE_HS_CONN_HANDLE_NONE) const
Send a notification.
Definition NimBLECharacteristic.cpp:242
-
NimBLE2904 * create2904()
Create a Characteristic Presentation Format Descriptor for this characteristic.
Definition NimBLECharacteristic.cpp:94
-
void addDescriptor(NimBLEDescriptor *pDescriptor)
Add a descriptor to the characteristic.
Definition NimBLECharacteristic.cpp:104
-
std::string toString() const
Return a string representation of the characteristic.
Definition NimBLECharacteristic.cpp:357
Connection information.
Definition NimBLEConnInfo.h:32
-
A model of a BLE descriptor.
Definition NimBLEDescriptor.h:33
-
The model of a BLE server.
Definition NimBLEServer.h:62
-
The model of a BLE service.
Definition NimBLEService.h:34
A model of a BLE UUID.
Definition NimBLEUUID.h:41
-
diff --git a/_nim_b_l_e_client_8h_source.html b/_nim_b_l_e_client_8h_source.html index fb7bfa2..b87d3c0 100644 --- a/_nim_b_l_e_client_8h_source.html +++ b/_nim_b_l_e_client_8h_source.html @@ -25,7 +25,7 @@ -
esp-nimble-cpp 2.3.1 +
esp-nimble-cpp 2.3.2
@@ -117,8 +117,8 @@ $(document).ready(function(){initNavTree('_nim_b_l_e_client_8h_source.html','');
18#ifndef NIMBLE_CPP_CLIENT_H_
19#define NIMBLE_CPP_CLIENT_H_
20
-
21#include "nimconfig.h"
-
22#if CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_CENTRAL
+
21#include "syscfg/syscfg.h"
+
22#if CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_ROLE_CENTRAL)
23
24# if defined(CONFIG_NIMBLE_CPP_IDF)
25# include "host/ble_gap.h"
@@ -134,69 +134,68 @@ $(document).ready(function(){initNavTree('_nim_b_l_e_client_8h_source.html','');
35
36class NimBLEAddress;
37class NimBLEUUID;
- - - +
38class NimBLERemoteService;
+
39class NimBLERemoteCharacteristic;
+
40class NimBLEAdvertisedDevice;
41class NimBLEAttValue;
- +
42class NimBLEClientCallbacks;
43class NimBLEConnInfo;
44struct NimBLETaskData;
45
-
- +
49class NimBLEClient {
50 public:
-
51# if CONFIG_BT_NIMBLE_ROLE_OBSERVER
-
52 bool connect(const NimBLEAdvertisedDevice* device,
+
51# if MYNEWT_VAL(BLE_ROLE_OBSERVER)
+
52 bool connect(const NimBLEAdvertisedDevice* device,
53 bool deleteAttributes = true,
54 bool asyncConnect = false,
-
55 bool exchangeMTU = true);
+
55 bool exchangeMTU = true);
56# endif
-
57 bool connect(const NimBLEAddress& address, bool deleteAttributes = true, bool asyncConnect = false, bool exchangeMTU = true);
-
58 bool connect(bool deleteAttributes = true, bool asyncConnect = false, bool exchangeMTU = true);
-
59 bool disconnect(uint8_t reason = BLE_ERR_REM_USER_CONN_TERM);
-
60 bool cancelConnect() const;
-
61 void setSelfDelete(bool deleteOnDisconnect, bool deleteOnConnectFail);
- -
63 bool setPeerAddress(const NimBLEAddress& address);
-
64 int getRssi() const;
-
65 bool isConnected() const;
-
66 void setClientCallbacks(NimBLEClientCallbacks* pClientCallbacks, bool deleteCallbacks = true);
-
67 std::string toString() const;
-
68 uint16_t getConnHandle() const;
-
69 uint16_t getMTU() const;
-
70 bool exchangeMTU();
-
71 bool secureConnection(bool async = false) const;
-
72 void setConnectTimeout(uint32_t timeout);
-
73 bool setDataLen(uint16_t txOctets);
-
74 bool discoverAttributes();
- -
76 int getLastError() const;
-
77 bool updateConnParams(uint16_t minInterval, uint16_t maxInterval, uint16_t latency, uint16_t timeout);
-
78 void setConnectionParams(uint16_t minInterval,
+
57 bool connect(const NimBLEAddress& address, bool deleteAttributes = true, bool asyncConnect = false, bool exchangeMTU = true);
+
58 bool connect(bool deleteAttributes = true, bool asyncConnect = false, bool exchangeMTU = true);
+
59 bool disconnect(uint8_t reason = BLE_ERR_REM_USER_CONN_TERM);
+
60 bool cancelConnect() const;
+
61 void setSelfDelete(bool deleteOnDisconnect, bool deleteOnConnectFail);
+
62 NimBLEAddress getPeerAddress() const;
+
63 bool setPeerAddress(const NimBLEAddress& address);
+
64 int getRssi() const;
+
65 bool isConnected() const;
+
66 void setClientCallbacks(NimBLEClientCallbacks* pClientCallbacks, bool deleteCallbacks = true);
+
67 std::string toString() const;
+
68 uint16_t getConnHandle() const;
+
69 uint16_t getMTU() const;
+
70 bool exchangeMTU();
+
71 bool secureConnection(bool async = false) const;
+
72 void setConnectTimeout(uint32_t timeout);
+
73 bool setDataLen(uint16_t txOctets);
+
74 bool discoverAttributes();
+
75 NimBLEConnInfo getConnInfo() const;
+
76 int getLastError() const;
+
77 bool updateConnParams(uint16_t minInterval, uint16_t maxInterval, uint16_t latency, uint16_t timeout);
+
78 void setConnectionParams(uint16_t minInterval,
79 uint16_t maxInterval,
80 uint16_t latency,
81 uint16_t timeout,
82 uint16_t scanInterval = 16,
83 uint16_t scanWindow = 16);
-
84 const std::vector<NimBLERemoteService*>& getServices(bool refresh = false);
-
85 std::vector<NimBLERemoteService*>::iterator begin();
-
86 std::vector<NimBLERemoteService*>::iterator end();
- -
88 NimBLERemoteService* getService(const char* uuid);
- -
90 void deleteServices();
-
91 size_t deleteService(const NimBLEUUID& uuid);
-
92 NimBLEAttValue getValue(const NimBLEUUID& serviceUUID, const NimBLEUUID& characteristicUUID);
-
93 bool setValue(const NimBLEUUID& serviceUUID,
+
84 const std::vector<NimBLERemoteService*>& getServices(bool refresh = false);
+
85 std::vector<NimBLERemoteService*>::iterator begin();
+
86 std::vector<NimBLERemoteService*>::iterator end();
+
87 NimBLERemoteCharacteristic* getCharacteristic(uint16_t handle);
+
88 NimBLERemoteService* getService(const char* uuid);
+
89 NimBLERemoteService* getService(const NimBLEUUID& uuid);
+
90 void deleteServices();
+
91 size_t deleteService(const NimBLEUUID& uuid);
+
92 NimBLEAttValue getValue(const NimBLEUUID& serviceUUID, const NimBLEUUID& characteristicUUID);
+
93 bool setValue(const NimBLEUUID& serviceUUID,
94 const NimBLEUUID& characteristicUUID,
95 const NimBLEAttValue& value,
96 bool response = false);
97
-
98# if CONFIG_BT_NIMBLE_EXT_ADV
-
99 void setConnectPhy(uint8_t phyMask);
+
98# if MYNEWT_VAL(BLE_EXT_ADV)
+
99 void setConnectPhy(uint8_t phyMask);
100# endif
-
101 bool updatePhy(uint8_t txPhysMask, uint8_t rxPhysMask, uint16_t phyOptions = 0);
-
102 bool getPhy(uint8_t* txPhy, uint8_t* rxPhy);
+
101 bool updatePhy(uint8_t txPhysMask, uint8_t rxPhysMask, uint16_t phyOptions = 0);
+
102 bool getPhy(uint8_t* txPhy, uint8_t* rxPhy);
103
104 struct Config {
105 uint8_t deleteCallbacks : 1; // Delete the callback object when the client is deleted.
@@ -206,14 +205,14 @@ $(document).ready(function(){initNavTree('_nim_b_l_e_client_8h_source.html','');
109 uint8_t exchangeMTU : 1; // Exchange MTU after connection.
110 };
111
-
112 Config getConfig() const;
-
113 void setConfig(Config config);
+
112 Config getConfig() const;
+
113 void setConfig(Config config);
114
115 private:
-
116 NimBLEClient(const NimBLEAddress& peerAddress);
- -
118 NimBLEClient(const NimBLEClient&) = delete;
-
119 NimBLEClient& operator=(const NimBLEClient&) = delete;
+
116 NimBLEClient(const NimBLEAddress& peerAddress);
+
117 ~NimBLEClient();
+
118 NimBLEClient(const NimBLEClient&) = delete;
+
119 NimBLEClient& operator=(const NimBLEClient&) = delete;
120
121 bool retrieveServices(const NimBLEUUID* uuidFilter = nullptr);
122 static int handleGapEvent(struct ble_gap_event* event, void* arg);
@@ -228,109 +227,54 @@ $(document).ready(function(){initNavTree('_nim_b_l_e_client_8h_source.html','');
131 int32_t m_connectTimeout;
132 mutable NimBLETaskData* m_pTaskData;
133 std::vector<NimBLERemoteService*> m_svcVec;
-
134 NimBLEClientCallbacks* m_pClientCallbacks;
+
134 NimBLEClientCallbacks* m_pClientCallbacks;
135 uint16_t m_connHandle;
136 uint8_t m_terminateFailCount;
137 mutable uint8_t m_asyncSecureAttempt;
138 Config m_config;
139
-
140# if CONFIG_BT_NIMBLE_EXT_ADV
+
140# if MYNEWT_VAL(BLE_EXT_ADV)
141 uint8_t m_phyMask;
142# endif
143 ble_gap_conn_params m_connParams;
144
145 friend class NimBLEDevice;
-
146 friend class NimBLEServer;
+
146 friend class NimBLEServer;
147}; // class NimBLEClient
-
148
-
- +
152class NimBLEClientCallbacks {
153 public:
-
154 virtual ~NimBLEClientCallbacks() {};
+
154 virtual ~NimBLEClientCallbacks() {};
155
-
160 virtual void onConnect(NimBLEClient* pClient);
+
160 virtual void onConnect(NimBLEClient* pClient);
161
-
167 virtual void onConnectFail(NimBLEClient* pClient, int reason);
+
167 virtual void onConnectFail(NimBLEClient* pClient, int reason);
168
-
174 virtual void onDisconnect(NimBLEClient* pClient, int reason);
+
174 virtual void onDisconnect(NimBLEClient* pClient, int reason);
175
-
182 virtual bool onConnParamsUpdateRequest(NimBLEClient* pClient, const ble_gap_upd_params* params);
+
182 virtual bool onConnParamsUpdateRequest(NimBLEClient* pClient, const ble_gap_upd_params* params);
183
-
188 virtual void onPassKeyEntry(NimBLEConnInfo& connInfo);
+
188 virtual void onPassKeyEntry(NimBLEConnInfo& connInfo);
189
-
195 virtual void onAuthenticationComplete(NimBLEConnInfo& connInfo);
+
195 virtual void onAuthenticationComplete(NimBLEConnInfo& connInfo);
196
-
202 virtual void onConfirmPasskey(NimBLEConnInfo& connInfo, uint32_t pin);
+
202 virtual void onConfirmPasskey(NimBLEConnInfo& connInfo, uint32_t pin);
203
-
208 virtual void onIdentity(NimBLEConnInfo& connInfo);
+
208 virtual void onIdentity(NimBLEConnInfo& connInfo);
209
-
216 virtual void onMTUChange(NimBLEClient* pClient, uint16_t MTU);
+
216 virtual void onMTUChange(NimBLEClient* pClient, uint16_t MTU);
217
-
229 virtual void onPhyUpdate(NimBLEClient* pClient, uint8_t txPhy, uint8_t rxPhy);
+
229 virtual void onPhyUpdate(NimBLEClient* pClient, uint8_t txPhy, uint8_t rxPhy);
230};
-
231
-
232#endif // CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_CENTRAL
+
232#endif // CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_ROLE_CENTRAL)
233#endif // NIMBLE_CPP_CLIENT_H_
A BLE device address.
Definition NimBLEAddress.h:42
-
A representation of a BLE advertised device found by a scan.
Definition NimBLEAdvertisedDevice.h:45
A specialized container class to hold BLE attribute values.
Definition NimBLEAttValue.h:72
-
Callbacks associated with a BLE client.
Definition NimBLEClient.h:152
-
virtual void onPhyUpdate(NimBLEClient *pClient, uint8_t txPhy, uint8_t rxPhy)
Called when the PHY update procedure is complete.
Definition NimBLEClient.cpp:1305
-
virtual void onConfirmPasskey(NimBLEConnInfo &connInfo, uint32_t pin)
Called when using numeric comparision for pairing.
Definition NimBLEClient.cpp:1296
-
virtual bool onConnParamsUpdateRequest(NimBLEClient *pClient, const ble_gap_upd_params *params)
Called when server requests to update the connection parameters.
Definition NimBLEClient.cpp:1278
-
virtual void onMTUChange(NimBLEClient *pClient, uint16_t MTU)
Called when the connection MTU changes.
Definition NimBLEClient.cpp:1301
-
virtual void onConnect(NimBLEClient *pClient)
Called after client connects.
Definition NimBLEClient.cpp:1266
-
virtual void onPassKeyEntry(NimBLEConnInfo &connInfo)
Called when server requests a passkey for pairing.
Definition NimBLEClient.cpp:1283
-
virtual void onIdentity(NimBLEConnInfo &connInfo)
Called when the peer identity address is resolved.
Definition NimBLEClient.cpp:1292
-
virtual void onConnectFail(NimBLEClient *pClient, int reason)
Called when a connection attempt fails.
Definition NimBLEClient.cpp:1270
-
virtual void onDisconnect(NimBLEClient *pClient, int reason)
Called when disconnected from the server.
Definition NimBLEClient.cpp:1274
-
virtual void onAuthenticationComplete(NimBLEConnInfo &connInfo)
Called when the pairing procedure is complete.
Definition NimBLEClient.cpp:1288
-
A model of a BLE client.
Definition NimBLEClient.h:49
-
void setConnectPhy(uint8_t phyMask)
Set the PHY types to use when connecting to a server.
Definition NimBLEClient.cpp:414
-
std::vector< NimBLERemoteService * >::iterator end()
Get iterator to the end of the vector of remote service pointers.
Definition NimBLEClient.cpp:620
-
bool isConnected() const
Are we connected to a server?
Definition NimBLEClient.cpp:1222
-
size_t deleteService(const NimBLEUUID &uuid)
Delete a service by UUID from the local database to free resources.
Definition NimBLEClient.cpp:115
-
bool discoverAttributes()
Retrieves the full database of attributes that the peripheral has available.
Definition NimBLEClient.cpp:708
-
bool updatePhy(uint8_t txPhysMask, uint8_t rxPhysMask, uint16_t phyOptions=0)
Request a change to the PHY used for this peer connection.
Definition NimBLEClient.cpp:437
-
void setConnectionParams(uint16_t minInterval, uint16_t maxInterval, uint16_t latency, uint16_t timeout, uint16_t scanInterval=16, uint16_t scanWindow=16)
Set the connection parameters to use when connecting to a server.
Definition NimBLEClient.cpp:470
-
bool exchangeMTU()
Begin the MTU exchange process with the server.
Definition NimBLEClient.cpp:911
-
int getRssi() const
Ask the BLE server for the RSSI value.
Definition NimBLEClient.cpp:591
-
bool connect(const NimBLEAdvertisedDevice *device, bool deleteAttributes=true, bool asyncConnect=false, bool exchangeMTU=true)
Connect to an advertising device.
Definition NimBLEClient.cpp:140
-
bool secureConnection(bool async=false) const
Initiate a secure connection (pair/bond) with the server. Called automatically when a characteristic ...
Definition NimBLEClient.cpp:312
-
bool disconnect(uint8_t reason=BLE_ERR_REM_USER_CONN_TERM)
Disconnect from the peer.
Definition NimBLEClient.cpp:353
-
NimBLEAttValue getValue(const NimBLEUUID &serviceUUID, const NimBLEUUID &characteristicUUID)
Get the value of a specific characteristic associated with a specific service.
Definition NimBLEClient.cpp:811
-
NimBLEAddress getPeerAddress() const
Retrieve the address of the peer.
Definition NimBLEClient.cpp:568
-
bool setDataLen(uint16_t txOctets)
Request an update of the data packet length.
Definition NimBLEClient.cpp:520
-
NimBLEConnInfo getConnInfo() const
Get detailed information about the current peer connection.
Definition NimBLEClient.cpp:539
-
void setSelfDelete(bool deleteOnDisconnect, bool deleteOnConnectFail)
Set or unset a flag to delete this client when disconnected or connection failed.
Definition NimBLEClient.cpp:384
-
void deleteServices()
Delete all service objects created by this client and clear the vector.
Definition NimBLEClient.cpp:101
-
NimBLERemoteCharacteristic * getCharacteristic(uint16_t handle)
Get the remote characteristic with the specified handle.
Definition NimBLEClient.cpp:865
-
bool getPhy(uint8_t *txPhy, uint8_t *rxPhy)
Get the PHY used for this peer connection.
Definition NimBLEClient.cpp:452
-
uint16_t getMTU() const
Get the current mtu of this connection.
Definition NimBLEClient.cpp:883
-
bool setPeerAddress(const NimBLEAddress &address)
Set the peer address.
Definition NimBLEClient.cpp:577
-
std::string toString() const
Return a string representation of this client.
Definition NimBLEClient.cpp:1245
-
bool setValue(const NimBLEUUID &serviceUUID, const NimBLEUUID &characteristicUUID, const NimBLEAttValue &value, bool response=false)
Set the value of a specific characteristic associated with a specific service.
Definition NimBLEClient.cpp:838
-
std::vector< NimBLERemoteService * >::iterator begin()
Get iterator to the beginning of the vector of remote service pointers.
Definition NimBLEClient.cpp:612
-
Config getConfig() const
Get a copy of the clients configuration.
Definition NimBLEClient.cpp:393
-
uint16_t getConnHandle() const
Get the connection handle for this client.
Definition NimBLEClient.cpp:560
-
bool updateConnParams(uint16_t minInterval, uint16_t maxInterval, uint16_t latency, uint16_t timeout)
Update the connection parameters:
Definition NimBLEClient.cpp:494
-
void setConfig(Config config)
Set the client configuration options.
Definition NimBLEClient.cpp:401
-
const std::vector< NimBLERemoteService * > & getServices(bool refresh=false)
Get a pointer to the vector of found services.
Definition NimBLEClient.cpp:691
-
NimBLERemoteService * getService(const char *uuid)
Get the service BLE Remote Service instance corresponding to the uuid.
Definition NimBLEClient.cpp:629
-
int getLastError() const
Get the last error code reported by the NimBLE host.
Definition NimBLEClient.cpp:1262
-
void setConnectTimeout(uint32_t timeout)
Set the timeout to wait for connection attempt to complete.
Definition NimBLEClient.cpp:552
-
void setClientCallbacks(NimBLEClientCallbacks *pClientCallbacks, bool deleteCallbacks=true)
Set the callbacks that will be invoked when events are received.
Definition NimBLEClient.cpp:1231
-
bool cancelConnect() const
Cancel an ongoing connection attempt.
Definition NimBLEClient.cpp:368
Connection information.
Definition NimBLEConnInfo.h:32
-
A model of a BLE Device from which all the BLE roles are created.
Definition NimBLEDevice.h:122
-
A model of a remote BLE characteristic.
Definition NimBLERemoteCharacteristic.h:36
-
A model of a remote BLE service.
Definition NimBLERemoteService.h:34
-
The model of a BLE server.
Definition NimBLEServer.h:62
+
A model of a BLE Device from which all the BLE roles are created.
Definition NimBLEDevice.h:116
A model of a BLE UUID.
Definition NimBLEUUID.h:41
- -
A structure to hold data for a task that is waiting for a response.
Definition NimBLEUtils.h:33
+
A structure to hold data for a task that is waiting for a response.
Definition NimBLEUtils.h:45
diff --git a/_nim_b_l_e_conn_info_8h_source.html b/_nim_b_l_e_conn_info_8h_source.html index 980783a..057f416 100644 --- a/_nim_b_l_e_conn_info_8h_source.html +++ b/_nim_b_l_e_conn_info_8h_source.html @@ -25,7 +25,7 @@ -
esp-nimble-cpp 2.3.1 +
esp-nimble-cpp 2.3.2
@@ -155,10 +155,10 @@ $(document).ready(function(){initNavTree('_nim_b_l_e_conn_info_8h_source.html','
71 uint8_t getSecKeySize() const { return m_desc.sec_state.key_size; }
72
73 private:
-
74 friend class NimBLEServer;
-
75 friend class NimBLEClient;
-
76 friend class NimBLECharacteristic;
-
77 friend class NimBLEDescriptor;
+
74 friend class NimBLEServer;
+
75 friend class NimBLEClient;
+
76 friend class NimBLECharacteristic;
+
77 friend class NimBLEDescriptor;
78
79 ble_gap_conn_desc m_desc{};
80 NimBLEConnInfo() {};
@@ -168,8 +168,6 @@ $(document).ready(function(){initNavTree('_nim_b_l_e_conn_info_8h_source.html','
83
84#endif // NIMBLE_CPP_CONNINFO_H_
A BLE device address.
Definition NimBLEAddress.h:42
-
The model of a BLE Characteristic.
Definition NimBLECharacteristic.h:41
-
A model of a BLE client.
Definition NimBLEClient.h:49
Connection information.
Definition NimBLEConnInfo.h:32
uint16_t getConnLatency() const
Gets the allowable latency for this connection (unit = number of intervals)
Definition NimBLEConnInfo.h:50
NimBLEAddress getAddress() const
Gets the over-the-air address of the connected peer.
Definition NimBLEConnInfo.h:35
@@ -184,8 +182,6 @@ $(document).ready(function(){initNavTree('_nim_b_l_e_conn_info_8h_source.html','
uint16_t getConnInterval() const
Gets the connection interval for this connection (in 1.25ms units)
Definition NimBLEConnInfo.h:44
bool isSlave() const
Check if we are in the slave role in this connection.
Definition NimBLEConnInfo.h:59
bool isBonded() const
Check if we are connected to a bonded peer.
Definition NimBLEConnInfo.h:62
-
A model of a BLE descriptor.
Definition NimBLEDescriptor.h:33
-
The model of a BLE server.
Definition NimBLEServer.h:62
diff --git a/_nim_b_l_e_descriptor_8h_source.html b/_nim_b_l_e_descriptor_8h_source.html index 58d1cab..9689382 100644 --- a/_nim_b_l_e_descriptor_8h_source.html +++ b/_nim_b_l_e_descriptor_8h_source.html @@ -25,7 +25,7 @@ -
esp-nimble-cpp 2.3.1 +
esp-nimble-cpp 2.3.2
@@ -117,68 +117,54 @@ $(document).ready(function(){initNavTree('_nim_b_l_e_descriptor_8h_source.html',
18#ifndef NIMBLE_CPP_DESCRIPTOR_H_
19#define NIMBLE_CPP_DESCRIPTOR_H_
20
-
21#include "nimconfig.h"
-
22#if CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_PERIPHERAL
+
21#include "syscfg/syscfg.h"
+
22#if CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_ROLE_PERIPHERAL)
23
24# include "NimBLELocalValueAttribute.h"
25# include <string>
26
- - +
27class NimBLECharacteristic;
+
28class NimBLEDescriptorCallbacks;
29
-
-
33class NimBLEDescriptor : public NimBLELocalValueAttribute {
+
33class NimBLEDescriptor : public NimBLELocalValueAttribute {
34 public:
-
35 NimBLEDescriptor(const char* uuid, uint16_t properties, uint16_t maxLen, NimBLECharacteristic* pCharacteristic = nullptr);
+
35 NimBLEDescriptor(const char* uuid, uint16_t properties, uint16_t maxLen, NimBLECharacteristic* pCharacteristic = nullptr);
36
-
37 NimBLEDescriptor(const NimBLEUUID& uuid,
+
37 NimBLEDescriptor(const NimBLEUUID& uuid,
38 uint16_t properties,
39 uint16_t maxLen,
-
40 NimBLECharacteristic* pCharacteristic = nullptr);
-
41 ~NimBLEDescriptor() = default;
+
40 NimBLECharacteristic* pCharacteristic = nullptr);
+
41 ~NimBLEDescriptor() = default;
42
-
43 std::string toString() const;
- - +
43 std::string toString() const;
+
44 void setCallbacks(NimBLEDescriptorCallbacks* pCallbacks);
+
45 NimBLECharacteristic* getCharacteristic() const;
46
47 private:
-
48 friend class NimBLECharacteristic;
-
49 friend class NimBLEService;
+
48 friend class NimBLECharacteristic;
+
49 friend class NimBLEService;
50
-
51 void setCharacteristic(NimBLECharacteristic* pChar);
+
51 void setCharacteristic(NimBLECharacteristic* pChar);
52 void readEvent(NimBLEConnInfo& connInfo) override;
53 void writeEvent(const uint8_t* val, uint16_t len, NimBLEConnInfo& connInfo) override;
54
-
55 NimBLEDescriptorCallbacks* m_pCallbacks{nullptr};
-
56 NimBLECharacteristic* m_pCharacteristic{nullptr};
+
55 NimBLEDescriptorCallbacks* m_pCallbacks{nullptr};
+
56 NimBLECharacteristic* m_pCharacteristic{nullptr};
57}; // NimBLEDescriptor
-
58
-
- +
66class NimBLEDescriptorCallbacks {
67 public:
-
68 virtual ~NimBLEDescriptorCallbacks() = default;
-
69 virtual void onRead(NimBLEDescriptor* pDescriptor, NimBLEConnInfo& connInfo);
-
70 virtual void onWrite(NimBLEDescriptor* pDescriptor, NimBLEConnInfo& connInfo);
+
68 virtual ~NimBLEDescriptorCallbacks() = default;
+
69 virtual void onRead(NimBLEDescriptor* pDescriptor, NimBLEConnInfo& connInfo);
+
70 virtual void onWrite(NimBLEDescriptor* pDescriptor, NimBLEConnInfo& connInfo);
71};
-
72
73# include "NimBLE2904.h"
74
-
75#endif // CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_PERIPHERAL
+
75#endif // CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_ROLE_PERIPHERAL)
76#endif // NIMBLE_CPP_DESCRIPTOR_H_
-
The model of a BLE Characteristic.
Definition NimBLECharacteristic.h:41
Connection information.
Definition NimBLEConnInfo.h:32
-
Callbacks that can be associated with a BLE descriptors to inform of events.
Definition NimBLEDescriptor.h:66
-
virtual void onRead(NimBLEDescriptor *pDescriptor, NimBLEConnInfo &connInfo)
Callback function to support a read request.
Definition NimBLEDescriptor.cpp:137
-
virtual void onWrite(NimBLEDescriptor *pDescriptor, NimBLEConnInfo &connInfo)
Callback function to support a write request.
Definition NimBLEDescriptor.cpp:146
-
A model of a BLE descriptor.
Definition NimBLEDescriptor.h:33
-
std::string toString() const
Return a string representation of the descriptor.
Definition NimBLEDescriptor.cpp:116
-
NimBLECharacteristic * getCharacteristic() const
Get the characteristic this descriptor belongs to.
Definition NimBLEDescriptor.cpp:88
-
void setCallbacks(NimBLEDescriptorCallbacks *pCallbacks)
Set the callback handlers for this descriptor.
Definition NimBLEDescriptor.cpp:96
-
The model of a BLE service.
Definition NimBLEService.h:34
A model of a BLE UUID.
Definition NimBLEUUID.h:41
-
diff --git a/_nim_b_l_e_device_8h_source.html b/_nim_b_l_e_device_8h_source.html index 34bc4fa..883b81b 100644 --- a/_nim_b_l_e_device_8h_source.html +++ b/_nim_b_l_e_device_8h_source.html @@ -25,7 +25,7 @@ -
esp-nimble-cpp 2.3.1 +
esp-nimble-cpp 2.3.2
@@ -117,8 +117,8 @@ $(document).ready(function(){initNavTree('_nim_b_l_e_device_8h_source.html','');
18#ifndef NIMBLE_CPP_DEVICE_H_
19#define NIMBLE_CPP_DEVICE_H_
20
-
21#include "nimconfig.h"
-
22#if CONFIG_BT_ENABLED
+
21#include "syscfg/syscfg.h"
+
22#if CONFIG_BT_NIMBLE_ENABLED
23# ifdef ESP_PLATFORM
24# ifndef CONFIG_IDF_TARGET_ESP32P4
25# include <esp_bt.h>
@@ -139,31 +139,31 @@ $(document).ready(function(){initNavTree('_nim_b_l_e_device_8h_source.html','');
40# include <string>
41# include <vector>
42
-
43# if CONFIG_BT_NIMBLE_ROLE_CENTRAL
+
43# if MYNEWT_VAL(BLE_ROLE_CENTRAL)
44# include <array>
-
45class NimBLEClient;
+
45class NimBLEClient;
46# endif
47
-
48# if CONFIG_BT_NIMBLE_ROLE_OBSERVER
-
49class NimBLEScan;
+
48# if MYNEWT_VAL(BLE_ROLE_OBSERVER)
+
49class NimBLEScan;
50# endif
51
-
52# if CONFIG_BT_NIMBLE_ROLE_BROADCASTER
-
53# if CONFIG_BT_NIMBLE_EXT_ADV
- +
52# if MYNEWT_VAL(BLE_ROLE_BROADCASTER)
+
53# if MYNEWT_VAL(BLE_EXT_ADV)
+
54class NimBLEExtAdvertising;
55# else
57# endif
58# endif
59
-
60# if CONFIG_BT_NIMBLE_ROLE_PERIPHERAL
-
61class NimBLEServer;
-
62# if CONFIG_BT_NIMBLE_L2CAP_COC_MAX_NUM > 0
+
60# if MYNEWT_VAL(BLE_ROLE_PERIPHERAL)
+
61class NimBLEServer;
+
62# if MYNEWT_VAL(BLE_L2CAP_COC_MAX_NUM)
63class NimBLEL2CAPServer;
64# endif
65# endif
66
-
67# if CONFIG_BT_NIMBLE_ROLE_PERIPHERAL || CONFIG_BT_NIMBLE_ROLE_CENTRAL
+
67# if MYNEWT_VAL(BLE_ROLE_PERIPHERAL) || MYNEWT_VAL(BLE_ROLE_CENTRAL)
68class NimBLEConnInfo;
69# endif
70
@@ -205,287 +205,254 @@ $(document).ready(function(){initNavTree('_nim_b_l_e_device_8h_source.html','');
106# define BLEL2CAPChannel NimBLEL2CAPChannel
107# define BLEL2CAPChannelCallbacks NimBLEL2CAPChannelCallbacks
108
-
109# ifdef CONFIG_BT_NIMBLE_MAX_CONNECTIONS
-
110# define NIMBLE_MAX_CONNECTIONS CONFIG_BT_NIMBLE_MAX_CONNECTIONS
-
111# else
-
112# define NIMBLE_MAX_CONNECTIONS CONFIG_NIMBLE_MAX_CONNECTIONS
-
113# endif
-
114
-
115enum class NimBLETxPowerType { All = 0, Advertise = 1, Scan = 2, Connection = 3 };
-
116
-
117typedef int (*gap_event_handler)(ble_gap_event* event, void* arg);
-
118
-
- -
123 public:
-
124 static bool init(const std::string& deviceName);
-
125 static bool deinit(bool clearAll = false);
-
126 static bool setDeviceName(const std::string& deviceName);
-
127 static bool isInitialized();
-
128 static NimBLEAddress getAddress();
-
129 static std::string toString();
-
130 static bool whiteListAdd(const NimBLEAddress& address);
-
131 static bool whiteListRemove(const NimBLEAddress& address);
-
132 static bool onWhiteList(const NimBLEAddress& address);
-
133 static size_t getWhiteListCount();
-
134 static NimBLEAddress getWhiteListAddress(size_t index);
-
135 static bool setOwnAddrType(uint8_t type);
-
136 static bool setOwnAddr(const NimBLEAddress& addr);
-
137 static bool setOwnAddr(const uint8_t* addr);
-
138 static void setDeviceCallbacks(NimBLEDeviceCallbacks* cb);
-
139 static void setScanDuplicateCacheSize(uint16_t cacheSize);
-
140 static void setScanFilterMode(uint8_t type);
-
141 static void setScanDuplicateCacheResetTime(uint16_t time);
-
142 static bool setCustomGapHandler(gap_event_handler handler);
-
143 static void setSecurityAuth(bool bonding, bool mitm, bool sc);
-
144 static void setSecurityAuth(uint8_t auth);
-
145 static void setSecurityIOCap(uint8_t iocap);
-
146 static void setSecurityInitKey(uint8_t initKey);
-
147 static void setSecurityRespKey(uint8_t respKey);
-
148 static void setSecurityPasskey(uint32_t passKey);
-
149 static uint32_t getSecurityPasskey();
-
150 static bool startSecurity(uint16_t connHandle, int* rcPtr = nullptr);
-
151 static bool setMTU(uint16_t mtu);
-
152 static uint16_t getMTU();
-
153 static void onReset(int reason);
-
154 static void onSync(void);
-
155 static void host_task(void* param);
-
156 static int getPower(NimBLETxPowerType type = NimBLETxPowerType::All);
-
157 static bool setPower(int8_t dbm, NimBLETxPowerType type = NimBLETxPowerType::All);
-
158 static bool setDefaultPhy(uint8_t txPhyMask, uint8_t rxPhyMask);
-
159
-
160# ifdef ESP_PLATFORM
-
161# ifndef CONFIG_IDF_TARGET_ESP32P4
-
162 static esp_power_level_t getPowerLevel(esp_ble_power_type_t powerType = ESP_BLE_PWR_TYPE_DEFAULT);
-
163 static bool setPowerLevel(esp_power_level_t powerLevel, esp_ble_power_type_t powerType = ESP_BLE_PWR_TYPE_DEFAULT);
-
164# endif
-
165# endif
-
166
-
167# if CONFIG_BT_NIMBLE_ROLE_OBSERVER
-
168 static NimBLEScan* getScan();
-
169# endif
-
170
-
171# if CONFIG_BT_NIMBLE_ROLE_PERIPHERAL
-
172 static NimBLEServer* createServer();
-
173 static NimBLEServer* getServer();
-
174# if CONFIG_BT_NIMBLE_L2CAP_COC_MAX_NUM > 0
-
175 static NimBLEL2CAPServer* createL2CAPServer();
-
176 static NimBLEL2CAPServer* getL2CAPServer();
-
177# endif
-
178# endif
-
179
-
180# if CONFIG_BT_NIMBLE_ROLE_PERIPHERAL || CONFIG_BT_NIMBLE_ROLE_CENTRAL
-
181 static bool injectConfirmPasskey(const NimBLEConnInfo& peerInfo, bool accept);
-
182 static bool injectPassKey(const NimBLEConnInfo& peerInfo, uint32_t pin);
-
183# endif
-
184
-
185# if CONFIG_BT_NIMBLE_ROLE_BROADCASTER
-
186# if CONFIG_BT_NIMBLE_EXT_ADV
- -
188 static bool startAdvertising(uint8_t instId, int duration = 0, int maxEvents = 0);
-
189 static bool stopAdvertising(uint8_t instId);
-
190 static bool stopAdvertising();
-
191# endif
-
192# if !CONFIG_BT_NIMBLE_EXT_ADV || defined(_DOXYGEN_)
- -
194 static bool startAdvertising(uint32_t duration = 0);
-
195 static bool stopAdvertising();
-
196# endif
-
197# endif
-
198
-
199# if CONFIG_BT_NIMBLE_ROLE_CENTRAL
-
200 static NimBLEClient* createClient();
-
201 static NimBLEClient* createClient(const NimBLEAddress& peerAddress);
-
202 static bool deleteClient(NimBLEClient* pClient);
-
203 static NimBLEClient* getClientByHandle(uint16_t connHandle);
-
204 static NimBLEClient* getClientByPeerAddress(const NimBLEAddress& peerAddress);
- -
206 static size_t getCreatedClientCount();
-
207 static std::vector<NimBLEClient*> getConnectedClients();
-
208# endif
-
209
-
210# if CONFIG_BT_NIMBLE_ROLE_CENTRAL || CONFIG_BT_NIMBLE_ROLE_PERIPHERAL
-
211 static bool deleteBond(const NimBLEAddress& address);
-
212 static int getNumBonds();
-
213 static bool isBonded(const NimBLEAddress& address);
-
214 static bool deleteAllBonds();
-
215 static NimBLEAddress getBondedAddress(int index);
-
216# endif
-
217
-
218 private:
-
219 static bool m_synced;
-
220 static bool m_initialized;
-
221 static uint32_t m_passkey;
-
222 static ble_gap_event_listener m_listener;
-
223 static uint8_t m_ownAddrType;
-
224 static std::vector<NimBLEAddress> m_whiteList;
-
225 static NimBLEDeviceCallbacks* m_pDeviceCallbacks;
-
226 static NimBLEDeviceCallbacks defaultDeviceCallbacks;
-
227
-
228# if CONFIG_BT_NIMBLE_ROLE_OBSERVER
-
229 static NimBLEScan* m_pScan;
-
230# endif
-
231
-
232# if CONFIG_BT_NIMBLE_ROLE_PERIPHERAL
-
233 static NimBLEServer* m_pServer;
-
234# if CONFIG_BT_NIMBLE_L2CAP_COC_MAX_NUM > 0
-
235 static NimBLEL2CAPServer* m_pL2CAPServer;
-
236# endif
-
237# endif
-
238
-
239# if CONFIG_BT_NIMBLE_ROLE_BROADCASTER
-
240# if CONFIG_BT_NIMBLE_EXT_ADV
-
241 static NimBLEExtAdvertising* m_bleAdvertising;
-
242# else
-
243 static NimBLEAdvertising* m_bleAdvertising;
-
244# endif
-
245# endif
-
246
-
247# if CONFIG_BT_NIMBLE_ROLE_CENTRAL
-
248 static std::array<NimBLEClient*, NIMBLE_MAX_CONNECTIONS> m_pClients;
-
249# endif
-
250
-
251# ifdef ESP_PLATFORM
-
252# if CONFIG_BTDM_BLE_SCAN_DUPL || CONFIG_BT_LE_SCAN_DUPL
-
253 static uint16_t m_scanDuplicateSize;
-
254 static uint8_t m_scanFilterMode;
-
255 static uint16_t m_scanDuplicateResetTime;
-
256# endif
-
257# endif
-
258
-
259# if CONFIG_BT_NIMBLE_ROLE_CENTRAL
-
260 friend class NimBLEClient;
-
261# endif
-
262
-
263# if CONFIG_BT_NIMBLE_ROLE_OBSERVER
-
264 friend class NimBLEScan;
-
265# endif
-
266
-
267# if CONFIG_BT_NIMBLE_ROLE_PERIPHERAL
-
268 friend class NimBLEServer;
-
269 friend class NimBLECharacteristic;
-
270# endif
-
271
-
272# if CONFIG_BT_NIMBLE_ROLE_BROADCASTER
-
273 friend class NimBLEAdvertising;
-
274# if CONFIG_BT_NIMBLE_EXT_ADV
-
275 friend class NimBLEExtAdvertising;
-
276 friend class NimBLEExtAdvertisement;
-
277# endif
-
278# endif
-
279};
+
109enum class NimBLETxPowerType { All = 0, Advertise = 1, Scan = 2, Connection = 3 };
+
110
+
111typedef int (*gap_event_handler)(ble_gap_event* event, void* arg);
+
112
+
+ +
117 public:
+
118 static bool init(const std::string& deviceName);
+
119 static bool deinit(bool clearAll = false);
+
120 static bool setDeviceName(const std::string& deviceName);
+
121 static bool isInitialized();
+
122 static NimBLEAddress getAddress();
+
123 static std::string toString();
+
124 static bool whiteListAdd(const NimBLEAddress& address);
+
125 static bool whiteListRemove(const NimBLEAddress& address);
+
126 static bool onWhiteList(const NimBLEAddress& address);
+
127 static size_t getWhiteListCount();
+
128 static NimBLEAddress getWhiteListAddress(size_t index);
+
129 static bool setOwnAddrType(uint8_t type);
+
130 static bool setOwnAddr(const NimBLEAddress& addr);
+
131 static bool setOwnAddr(const uint8_t* addr);
+
132 static void setDeviceCallbacks(NimBLEDeviceCallbacks* cb);
+
133 static void setScanDuplicateCacheSize(uint16_t cacheSize);
+
134 static void setScanFilterMode(uint8_t type);
+
135 static void setScanDuplicateCacheResetTime(uint16_t time);
+
136 static bool setCustomGapHandler(gap_event_handler handler);
+
137 static void setSecurityAuth(bool bonding, bool mitm, bool sc);
+
138 static void setSecurityAuth(uint8_t auth);
+
139 static void setSecurityIOCap(uint8_t iocap);
+
140 static void setSecurityInitKey(uint8_t initKey);
+
141 static void setSecurityRespKey(uint8_t respKey);
+
142 static void setSecurityPasskey(uint32_t passKey);
+
143 static uint32_t getSecurityPasskey();
+
144 static bool startSecurity(uint16_t connHandle, int* rcPtr = nullptr);
+
145 static bool setMTU(uint16_t mtu);
+
146 static uint16_t getMTU();
+
147 static void onReset(int reason);
+
148 static void onSync(void);
+
149 static void host_task(void* param);
+
150 static int getPower(NimBLETxPowerType type = NimBLETxPowerType::All);
+
151 static bool setPower(int8_t dbm, NimBLETxPowerType type = NimBLETxPowerType::All);
+
152 static bool setDefaultPhy(uint8_t txPhyMask, uint8_t rxPhyMask);
+
153
+
154# ifdef ESP_PLATFORM
+
155# ifndef CONFIG_IDF_TARGET_ESP32P4
+
156 static esp_power_level_t getPowerLevel(esp_ble_power_type_t powerType = ESP_BLE_PWR_TYPE_DEFAULT);
+
157 static bool setPowerLevel(esp_power_level_t powerLevel, esp_ble_power_type_t powerType = ESP_BLE_PWR_TYPE_DEFAULT);
+
158# endif
+
159# endif
+
160
+
161# if MYNEWT_VAL(BLE_ROLE_OBSERVER)
+
162 static NimBLEScan* getScan();
+
163# endif
+
164
+
165# if MYNEWT_VAL(BLE_ROLE_PERIPHERAL)
+
166 static NimBLEServer* createServer();
+
167 static NimBLEServer* getServer();
+
168# if MYNEWT_VAL(BLE_L2CAP_COC_MAX_NUM)
+
169 static NimBLEL2CAPServer* createL2CAPServer();
+
170 static NimBLEL2CAPServer* getL2CAPServer();
+
171# endif
+
172# endif
+
173
+
174# if MYNEWT_VAL(BLE_ROLE_PERIPHERAL) || MYNEWT_VAL(BLE_ROLE_CENTRAL)
+
175 static bool injectConfirmPasskey(const NimBLEConnInfo& peerInfo, bool accept);
+
176 static bool injectPassKey(const NimBLEConnInfo& peerInfo, uint32_t pin);
+
177# endif
+
178
+
179# if MYNEWT_VAL(BLE_ROLE_BROADCASTER)
+
180# if MYNEWT_VAL(BLE_EXT_ADV)
+
181 static NimBLEExtAdvertising* getAdvertising();
+
182 static bool startAdvertising(uint8_t instId, int duration = 0, int maxEvents = 0);
+
183 static bool stopAdvertising(uint8_t instId);
+
184 static bool stopAdvertising();
+
185# endif
+
186# if !MYNEWT_VAL(BLE_EXT_ADV) || defined(_DOXYGEN_)
+
187 static NimBLEAdvertising* getAdvertising();
+
188 static bool startAdvertising(uint32_t duration = 0);
+
189 static bool stopAdvertising();
+
190# endif
+
191# endif
+
192
+
193# if MYNEWT_VAL(BLE_ROLE_CENTRAL)
+
194 static NimBLEClient* createClient();
+
195 static NimBLEClient* createClient(const NimBLEAddress& peerAddress);
+
196 static bool deleteClient(NimBLEClient* pClient);
+
197 static NimBLEClient* getClientByHandle(uint16_t connHandle);
+
198 static NimBLEClient* getClientByPeerAddress(const NimBLEAddress& peerAddress);
+
199 static NimBLEClient* getDisconnectedClient();
+
200 static size_t getCreatedClientCount();
+
201 static std::vector<NimBLEClient*> getConnectedClients();
+
202# endif
+
203
+
204# if MYNEWT_VAL(BLE_ROLE_CENTRAL) || MYNEWT_VAL(BLE_ROLE_PERIPHERAL)
+
205 static bool deleteBond(const NimBLEAddress& address);
+
206 static int getNumBonds();
+
207 static bool isBonded(const NimBLEAddress& address);
+
208 static bool deleteAllBonds();
+
209 static NimBLEAddress getBondedAddress(int index);
+
210# endif
+
211
+
212 private:
+
213 static bool m_synced;
+
214 static bool m_initialized;
+
215 static uint32_t m_passkey;
+
216 static ble_gap_event_listener m_listener;
+
217 static uint8_t m_ownAddrType;
+
218 static std::vector<NimBLEAddress> m_whiteList;
+
219 static NimBLEDeviceCallbacks* m_pDeviceCallbacks;
+
220 static NimBLEDeviceCallbacks defaultDeviceCallbacks;
+
221
+
222# if MYNEWT_VAL(BLE_ROLE_OBSERVER)
+
223 static NimBLEScan* m_pScan;
+
224# endif
+
225
+
226# if MYNEWT_VAL(BLE_ROLE_PERIPHERAL)
+
227 static NimBLEServer* m_pServer;
+
228# if MYNEWT_VAL(BLE_L2CAP_COC_MAX_NUM)
+
229 static NimBLEL2CAPServer* m_pL2CAPServer;
+
230# endif
+
231# endif
+
232
+
233# if MYNEWT_VAL(BLE_ROLE_BROADCASTER)
+
234# if MYNEWT_VAL(BLE_EXT_ADV)
+
235 static NimBLEExtAdvertising* m_bleAdvertising;
+
236# else
+
237 static NimBLEAdvertising* m_bleAdvertising;
+
238# endif
+
239# endif
+
240
+
241# if MYNEWT_VAL(BLE_ROLE_CENTRAL)
+
242 static std::array<NimBLEClient*, MYNEWT_VAL(BLE_MAX_CONNECTIONS)> m_pClients;
+
243# endif
+
244
+
245# ifdef ESP_PLATFORM
+
246# if CONFIG_BTDM_BLE_SCAN_DUPL || CONFIG_BT_LE_SCAN_DUPL
+
247 static uint16_t m_scanDuplicateSize;
+
248 static uint8_t m_scanFilterMode;
+
249 static uint16_t m_scanDuplicateResetTime;
+
250# endif
+
251# endif
+
252
+
253# if MYNEWT_VAL(BLE_ROLE_CENTRAL)
+
254 friend class NimBLEClient;
+
255# endif
+
256
+
257# if MYNEWT_VAL(BLE_ROLE_OBSERVER)
+
258 friend class NimBLEScan;
+
259# endif
+
260
+
261# if MYNEWT_VAL(BLE_ROLE_PERIPHERAL)
+
262 friend class NimBLEServer;
+
263 friend class NimBLECharacteristic;
+
264# endif
+
265
+
266# if MYNEWT_VAL(BLE_ROLE_BROADCASTER)
+
267 friend class NimBLEAdvertising;
+
268# if MYNEWT_VAL(BLE_EXT_ADV)
+
269 friend class NimBLEExtAdvertising;
+
270 friend class NimBLEExtAdvertisement;
+
271# endif
+
272# endif
+
273};
-
280
-
281# if CONFIG_BT_NIMBLE_ROLE_CENTRAL
-
282# include "NimBLEClient.h"
-
283# include "NimBLERemoteService.h"
-
284# include "NimBLERemoteCharacteristic.h"
-
285# include "NimBLERemoteDescriptor.h"
-
286# endif
-
287
-
288# if CONFIG_BT_NIMBLE_ROLE_OBSERVER
-
289# include "NimBLEScan.h"
-
290# endif
-
291
-
292# if CONFIG_BT_NIMBLE_ROLE_PERIPHERAL
-
293# include "NimBLEServer.h"
-
294# include "NimBLEService.h"
-
295# include "NimBLECharacteristic.h"
-
296# include "NimBLEDescriptor.h"
-
297# if CONFIG_BT_NIMBLE_L2CAP_COC_MAX_NUM
-
298# include "NimBLEL2CAPServer.h"
-
299# include "NimBLEL2CAPChannel.h"
-
300# endif
-
301# endif
-
302
-
303# if CONFIG_BT_NIMBLE_ROLE_BROADCASTER
-
304# if CONFIG_BT_NIMBLE_EXT_ADV
-
305# include "NimBLEExtAdvertising.h"
-
306# else
-
307# include "NimBLEAdvertising.h"
-
308# endif
-
309# endif
-
310
-
311# if CONFIG_BT_NIMBLE_ROLE_CENTRAL || CONFIG_BT_NIMBLE_ROLE_PERIPHERAL
-
312# include "NimBLEConnInfo.h"
-
313# endif
-
314
-
315# include "NimBLEAddress.h"
-
316# include "NimBLEUtils.h"
-
317
-
- -
322 public:
-
323 virtual ~NimBLEDeviceCallbacks() {};
-
324
-
337 virtual int onStoreStatus(struct ble_store_status_event* event, void* arg);
-
338};
+
274
+
275# if MYNEWT_VAL(BLE_ROLE_CENTRAL)
+
276# include "NimBLEClient.h"
+
277# include "NimBLERemoteService.h"
+
278# include "NimBLERemoteCharacteristic.h"
+
279# include "NimBLERemoteDescriptor.h"
+
280# endif
+
281
+
282# if MYNEWT_VAL(BLE_ROLE_OBSERVER)
+
283# include "NimBLEScan.h"
+
284# endif
+
285
+
286# if MYNEWT_VAL(BLE_ROLE_PERIPHERAL)
+
287# include "NimBLEServer.h"
+
288# include "NimBLEService.h"
+
289# include "NimBLECharacteristic.h"
+
290# include "NimBLEDescriptor.h"
+
291# if MYNEWT_VAL(BLE_L2CAP_COC_MAX_NUM)
+
292# include "NimBLEL2CAPServer.h"
+
293# include "NimBLEL2CAPChannel.h"
+
294# endif
+
295# endif
+
296
+
297# if MYNEWT_VAL(BLE_ROLE_BROADCASTER)
+
298# if MYNEWT_VAL(BLE_EXT_ADV)
+
299# include "NimBLEExtAdvertising.h"
+
300# else
+
301# include "NimBLEAdvertising.h"
+
302# endif
+
303# endif
+
304
+
305# if MYNEWT_VAL(BLE_ROLE_CENTRAL) || MYNEWT_VAL(BLE_ROLE_PERIPHERAL)
+
306# include "NimBLEConnInfo.h"
+
307# endif
+
308
+
309# include "NimBLEAddress.h"
+
310# include "NimBLEUtils.h"
+
311
+
+ +
316 public:
+
317 virtual ~NimBLEDeviceCallbacks() {};
+
318
+
331 virtual int onStoreStatus(struct ble_store_status_event* event, void* arg);
+
332};
-
339
-
340#endif // CONFIG_BT_ENABLED
-
341#endif // NIMBLE_CPP_DEVICE_H_
+
333
+
334#endif // CONFIG_BT_NIMBLE_ENABLED
+
335#endif // NIMBLE_CPP_DEVICE_H_
A BLE device address.
Definition NimBLEAddress.h:42
Perform and manage BLE advertising.
Definition NimBLEAdvertising.h:51
-
The model of a BLE Characteristic.
Definition NimBLECharacteristic.h:41
-
A model of a BLE client.
Definition NimBLEClient.h:49
Connection information.
Definition NimBLEConnInfo.h:32
-
Callbacks associated with a BLE device.
Definition NimBLEDevice.h:321
-
virtual int onStoreStatus(struct ble_store_status_event *event, void *arg)
Indicates an inability to perform a store operation. This callback should do one of two things: -Addr...
Definition NimBLEDevice.cpp:1342
-
A model of a BLE Device from which all the BLE roles are created.
Definition NimBLEDevice.h:122
-
static NimBLEClient * createClient()
Creates a new client object, each client can connect to 1 peripheral device.
Definition NimBLEDevice.cpp:335
+
Callbacks associated with a BLE device.
Definition NimBLEDevice.h:315
+
virtual int onStoreStatus(struct ble_store_status_event *event, void *arg)
Indicates an inability to perform a store operation. This callback should do one of two things: -Addr...
Definition NimBLEDevice.cpp:1345
+
A model of a BLE Device from which all the BLE roles are created.
Definition NimBLEDevice.h:116
static void onSync(void)
Host synced with controller, all clear to make calls to the stack.
Definition NimBLEDevice.cpp:821
-
static size_t getCreatedClientCount()
Get the number of created client objects.
Definition NimBLEDevice.cpp:395
static bool setDefaultPhy(uint8_t txPhyMask, uint8_t rxPhyMask)
Set the preferred default phy to use for connections.
Definition NimBLEDevice.cpp:795
-
static bool setOwnAddr(const NimBLEAddress &addr)
Set the device address to use.
Definition NimBLEDevice.cpp:1131
-
static NimBLEClient * getDisconnectedClient()
Finds the first disconnected client available.
Definition NimBLEDevice.cpp:440
-
static bool isBonded(const NimBLEAddress &address)
Checks if a peer device is bonded.
Definition NimBLEDevice.cpp:658
-
static bool setCustomGapHandler(gap_event_handler handler)
Set a custom callback for gap events.
Definition NimBLEDevice.cpp:1305
-
static bool deleteAllBonds()
Deletes all bonding information.
Definition NimBLEDevice.cpp:635
-
static bool startAdvertising(uint8_t instId, int duration=0, int maxEvents=0)
Convenience function to begin advertising.
Definition NimBLEDevice.cpp:192
+
static bool setOwnAddr(const NimBLEAddress &addr)
Set the device address to use.
Definition NimBLEDevice.cpp:1133
+
static bool setCustomGapHandler(gap_event_handler handler)
Set a custom callback for gap events.
Definition NimBLEDevice.cpp:1308
static void onReset(int reason)
Host reset, we pass the message so we don't make calls until re-synced.
Definition NimBLEDevice.cpp:808
-
static bool deleteBond(const NimBLEAddress &address)
Deletes a peer bond.
Definition NimBLEDevice.cpp:649
static bool init(const std::string &deviceName)
Initialize the BLE environment.
Definition NimBLEDevice.cpp:880
-
static bool setOwnAddrType(uint8_t type)
Sets the address type to use.
Definition NimBLEDevice.cpp:1102
-
static bool stopAdvertising()
Convenience function to stop all advertising.
Definition NimBLEDevice.cpp:232
-
static NimBLEServer * getServer()
Get the instance of the server.
Definition NimBLEDevice.cpp:141
-
static bool isInitialized()
Check if the initialization is complete.
Definition NimBLEDevice.cpp:1068
+
static bool setOwnAddrType(uint8_t type)
Sets the address type to use.
Definition NimBLEDevice.cpp:1104
+
static bool isInitialized()
Check if the initialization is complete.
Definition NimBLEDevice.cpp:1070
static bool setMTU(uint16_t mtu)
Setup local mtu that will be used to negotiate mtu during request from client peer.
Definition NimBLEDevice.cpp:595
static NimBLEAddress getWhiteListAddress(size_t index)
Gets the address at the vector index.
Definition NimBLEDevice.cpp:768
-
static NimBLEServer * createServer()
Create an instance of a server.
Definition NimBLEDevice.cpp:126
-
static bool injectPassKey(const NimBLEConnInfo &peerInfo, uint32_t pin)
Inject the provided passkey into the Security Manager.
Definition NimBLEDevice.cpp:1262
static uint16_t getMTU()
Get local MTU value set.
Definition NimBLEDevice.cpp:608
static int getPower(NimBLETxPowerType type=NimBLETxPowerType::All)
Get the transmission power.
Definition NimBLEDevice.cpp:554
-
static bool deinit(bool clearAll=false)
Shutdown the NimBLE stack/controller.
Definition NimBLEDevice.cpp:1007
-
static NimBLEAddress getAddress()
Get our device address.
Definition NimBLEDevice.cpp:1080
-
static int getNumBonds()
Gets the number of bonded peers stored.
Definition NimBLEDevice.cpp:620
+
static bool deinit(bool clearAll=false)
Shutdown the NimBLE stack/controller.
Definition NimBLEDevice.cpp:1009
+
static NimBLEAddress getAddress()
Get our device address.
Definition NimBLEDevice.cpp:1082
static bool whiteListRemove(const NimBLEAddress &address)
Remove a peer address from the whitelist.
Definition NimBLEDevice.cpp:737
-
static bool deleteClient(NimBLEClient *pClient)
Delete the client object and remove it from the list. Checks if it is connected or trying to connect ...
Definition NimBLEDevice.cpp:362
-
static bool startSecurity(uint16_t connHandle, int *rcPtr=nullptr)
Start the connection securing and authorization for this connection.
Definition NimBLEDevice.cpp:1244
-
static NimBLEClient * getClientByHandle(uint16_t connHandle)
Get a reference to a client by connection handle.
Definition NimBLEDevice.cpp:411
-
static uint32_t getSecurityPasskey()
Get the current passkey used for pairing.
Definition NimBLEDevice.cpp:1234
-
static void setSecurityAuth(bool bonding, bool mitm, bool sc)
Set the authorization mode for this device.
Definition NimBLEDevice.cpp:1161
-
static NimBLEExtAdvertising * getAdvertising()
Get the instance of the extended advertising object.
Definition NimBLEDevice.cpp:177
-
static bool setDeviceName(const std::string &deviceName)
Set the BLEDevice name.
Definition NimBLEDevice.cpp:1290
+
static bool startSecurity(uint16_t connHandle, int *rcPtr=nullptr)
Start the connection securing and authorization for this connection.
Definition NimBLEDevice.cpp:1246
+
static uint32_t getSecurityPasskey()
Get the current passkey used for pairing.
Definition NimBLEDevice.cpp:1236
+
static void setSecurityAuth(bool bonding, bool mitm, bool sc)
Set the authorization mode for this device.
Definition NimBLEDevice.cpp:1163
+
static bool setDeviceName(const std::string &deviceName)
Set the BLEDevice name.
Definition NimBLEDevice.cpp:1292
static bool whiteListAdd(const NimBLEAddress &address)
Add a peer address to the whitelist.
Definition NimBLEDevice.cpp:718
-
static void setSecurityInitKey(uint8_t initKey)
If we are the initiator of the security procedure this sets the keys we will distribute.
Definition NimBLEDevice.cpp:1205
+
static void setSecurityInitKey(uint8_t initKey)
If we are the initiator of the security procedure this sets the keys we will distribute.
Definition NimBLEDevice.cpp:1207
static size_t getWhiteListCount()
Gets the count of addresses in the whitelist.
Definition NimBLEDevice.cpp:759
static void host_task(void *param)
The main host task.
Definition NimBLEDevice.cpp:870
-
static void setSecurityPasskey(uint32_t passKey)
Set the passkey the server will ask for when pairing.
Definition NimBLEDevice.cpp:1226
-
static void setSecurityRespKey(uint8_t respKey)
Set the keys we are willing to accept during pairing.
Definition NimBLEDevice.cpp:1218
-
static void setSecurityIOCap(uint8_t iocap)
Set the Input/Output capabilities of this device.
Definition NimBLEDevice.cpp:1192
-
static std::string toString()
Return a string representation of the address of this device.
Definition NimBLEDevice.cpp:1321
-
static bool setPower(int8_t dbm, NimBLETxPowerType type=NimBLETxPowerType::All)
Set the transmission power.
Definition NimBLEDevice.cpp:511
-
static NimBLEAddress getBondedAddress(int index)
Get the address of a bonded peer device by index.
Definition NimBLEDevice.cpp:682
-
static std::vector< NimBLEClient * > getConnectedClients()
Get a list of connected clients.
Definition NimBLEDevice.cpp:454
+
static void setSecurityPasskey(uint32_t passKey)
Set the passkey the server will ask for when pairing.
Definition NimBLEDevice.cpp:1228
+
static void setSecurityRespKey(uint8_t respKey)
Set the keys we are willing to accept during pairing.
Definition NimBLEDevice.cpp:1220
+
static void setSecurityIOCap(uint8_t iocap)
Set the Input/Output capabilities of this device.
Definition NimBLEDevice.cpp:1194
+
static std::string toString()
Return a string representation of the address of this device.
Definition NimBLEDevice.cpp:1324
+
static bool setPower(int8_t dbm, NimBLETxPowerType type=NimBLETxPowerType::All)
Retrieve the Scan object that we use for scanning.
Definition NimBLEDevice.cpp:511
static bool onWhiteList(const NimBLEAddress &address)
Checks if a peer device is whitelisted.
Definition NimBLEDevice.cpp:703
-
static NimBLEScan * getScan()
Retrieve the Scan object that we use for scanning.
Definition NimBLEDevice.cpp:247
-
static NimBLEClient * getClientByPeerAddress(const NimBLEAddress &peerAddress)
Get a reference to a client by peer address.
Definition NimBLEDevice.cpp:426
-
static bool injectConfirmPasskey(const NimBLEConnInfo &peerInfo, bool accept)
Inject the provided numeric comparison response into the Security Manager.
Definition NimBLEDevice.cpp:1274
-
Extended advertisement data.
Definition NimBLEExtAdvertising.h:46
-
Extended advertising class.
Definition NimBLEExtAdvertising.h:110
-
Perform and manage BLE scans.
Definition NimBLEScan.h:67
-
The model of a BLE server.
Definition NimBLEServer.h:62
-
diff --git a/_nim_b_l_e_eddystone_t_l_m_8h_source.html b/_nim_b_l_e_eddystone_t_l_m_8h_source.html index 7d352e5..2245af5 100644 --- a/_nim_b_l_e_eddystone_t_l_m_8h_source.html +++ b/_nim_b_l_e_eddystone_t_l_m_8h_source.html @@ -25,7 +25,7 @@ -
esp-nimble-cpp 2.3.1 +
esp-nimble-cpp 2.3.2
@@ -117,8 +117,8 @@ $(document).ready(function(){initNavTree('_nim_b_l_e_eddystone_t_l_m_8h_source.h
18#ifndef NIMBLE_CPP_EDDYSTONETLM_H_
19#define NIMBLE_CPP_EDDYSTONETLM_H_
20
-
21#include "nimconfig.h"
-
22#if CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_BROADCASTER
+
21#include "syscfg/syscfg.h"
+
22#if CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_ROLE_BROADCASTER)
23
24class NimBLEUUID;
25
@@ -126,8 +126,7 @@ $(document).ready(function(){initNavTree('_nim_b_l_e_eddystone_t_l_m_8h_source.h
27
28# define EDDYSTONE_TLM_FRAME_TYPE 0x20
29
-
- +
35class NimBLEEddystoneTLM {
36 public:
37 struct BeaconData {
38 uint8_t frameType{EDDYSTONE_TLM_FRAME_TYPE};
@@ -138,50 +137,32 @@ $(document).ready(function(){initNavTree('_nim_b_l_e_eddystone_t_l_m_8h_source.h
43 uint32_t tmil{0};
44 } __attribute__((packed));
45
-
46 const BeaconData getData();
- -
48 uint8_t getVersion();
-
49 uint16_t getVolt();
-
50 int16_t getTemp();
-
51 uint32_t getCount();
-
52 uint32_t getTime();
-
53 std::string toString();
-
54 void setData(const uint8_t* data, uint8_t length);
-
55 void setData(const BeaconData& data);
-
56 void setUUID(const NimBLEUUID& l_uuid);
-
57 void setVersion(uint8_t version);
-
58 void setVolt(uint16_t volt);
-
59 void setTemp(int16_t temp);
-
60 void setCount(uint32_t advCount);
-
61 void setTime(uint32_t tmil);
+
46 const BeaconData getData();
+
47 NimBLEUUID getUUID();
+
48 uint8_t getVersion();
+
49 uint16_t getVolt();
+
50 int16_t getTemp();
+
51 uint32_t getCount();
+
52 uint32_t getTime();
+
53 std::string toString();
+
54 void setData(const uint8_t* data, uint8_t length);
+
55 void setData(const BeaconData& data);
+
56 void setUUID(const NimBLEUUID& l_uuid);
+
57 void setVersion(uint8_t version);
+
58 void setVolt(uint16_t volt);
+
59 void setTemp(int16_t temp);
+
60 void setCount(uint32_t advCount);
+
61 void setTime(uint32_t tmil);
62
63 private:
64 uint16_t beaconUUID{0xFEAA};
65 BeaconData m_eddystoneData;
66
67}; // NimBLEEddystoneTLM
-
68
-
69#endif // CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_BROADCASTER
+
69#endif // CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_ROLE_BROADCASTER)
70#endif // NIMBLE_CPP_EDDYSTONETLM_H_
-
Representation of a beacon. See:
Definition NimBLEEddystoneTLM.h:35
-
void setData(const uint8_t *data, uint8_t length)
Set the raw data for the beacon advertisement.
Definition NimBLEEddystoneTLM.cpp:147
-
void setVersion(uint8_t version)
Set the version to advertise.
Definition NimBLEEddystoneTLM.cpp:182
-
const BeaconData getData()
Retrieve the data that is being advertised.
Definition NimBLEEddystoneTLM.cpp:34
-
void setUUID(const NimBLEUUID &l_uuid)
Set the UUID to advertise.
Definition NimBLEEddystoneTLM.cpp:170
-
uint32_t getCount()
Get the count of advertisements sent.
Definition NimBLEEddystoneTLM.cpp:74
-
void setCount(uint32_t advCount)
Set the advertisement count.
Definition NimBLEEddystoneTLM.cpp:206
-
int16_t getTemp()
Get the temperature being advertised.
Definition NimBLEEddystoneTLM.cpp:66
-
std::string toString()
Get a string representation of the beacon.
Definition NimBLEEddystoneTLM.cpp:90
-
void setTime(uint32_t tmil)
Set the advertisement time.
Definition NimBLEEddystoneTLM.cpp:214
-
NimBLEUUID getUUID()
Get the UUID being advertised.
Definition NimBLEEddystoneTLM.cpp:42
-
uint32_t getTime()
Get the advertisement time.
Definition NimBLEEddystoneTLM.cpp:82
-
void setVolt(uint16_t volt)
Set the battery voltage to advertise.
Definition NimBLEEddystoneTLM.cpp:190
-
uint8_t getVersion()
Get the version being advertised.
Definition NimBLEEddystoneTLM.cpp:50
-
void setTemp(int16_t temp)
Set the temperature to advertise.
Definition NimBLEEddystoneTLM.cpp:198
-
uint16_t getVolt()
Get the battery voltage.
Definition NimBLEEddystoneTLM.cpp:58
A model of a BLE UUID.
Definition NimBLEUUID.h:41
-
diff --git a/_nim_b_l_e_ext_advertising_8h_source.html b/_nim_b_l_e_ext_advertising_8h_source.html index 650394a..e6ba661 100644 --- a/_nim_b_l_e_ext_advertising_8h_source.html +++ b/_nim_b_l_e_ext_advertising_8h_source.html @@ -25,7 +25,7 @@ -
esp-nimble-cpp 2.3.1 +
esp-nimble-cpp 2.3.2
@@ -117,8 +117,8 @@ $(document).ready(function(){initNavTree('_nim_b_l_e_ext_advertising_8h_source.h
18#ifndef NIMBLE_CPP_EXTADVERTISING_H_
19#define NIMBLE_CPP_EXTADVERTISING_H_
20
-
21#include "nimconfig.h"
-
22#if CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_BROADCASTER && CONFIG_BT_NIMBLE_EXT_ADV
+
21#include "syscfg/syscfg.h"
+
22#if CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_ROLE_BROADCASTER) && MYNEWT_VAL(BLE_EXT_ADV)
23
24# if defined(CONFIG_NIMBLE_CPP_IDF)
25# include "host/ble_gap.h"
@@ -136,63 +136,62 @@ $(document).ready(function(){initNavTree('_nim_b_l_e_ext_advertising_8h_source.h
37# include <string>
38# include <vector>
39
- +
40class NimBLEExtAdvertisingCallbacks;
41class NimBLEUUID;
42
-
- +
46class NimBLEExtAdvertisement {
47 public:
-
48 NimBLEExtAdvertisement(uint8_t priPhy = BLE_HCI_LE_PHY_1M, uint8_t secPhy = BLE_HCI_LE_PHY_1M);
-
49 bool setAppearance(uint16_t appearance);
-
50 bool addServiceUUID(const NimBLEUUID& serviceUUID);
-
51 bool addServiceUUID(const char* serviceUUID);
-
52 bool removeServiceUUID(const NimBLEUUID& serviceUUID);
-
53 bool removeServiceUUID(const char* serviceUUID);
-
54 bool removeServices();
-
55 bool setCompleteServices(const NimBLEUUID& uuid);
-
56 bool setCompleteServices16(const std::vector<NimBLEUUID>& uuids);
-
57 bool setCompleteServices32(const std::vector<NimBLEUUID>& uuids);
-
58 bool setFlags(uint8_t flag);
-
59 bool setManufacturerData(const uint8_t* data, size_t length);
-
60 bool setManufacturerData(const std::string& data);
-
61 bool setManufacturerData(const std::vector<uint8_t>& data);
-
62 bool setURI(const std::string& uri);
-
63 bool setName(const std::string& name, bool isComplete = true);
-
64 bool setPartialServices(const NimBLEUUID& uuid);
-
65 bool setPartialServices16(const std::vector<NimBLEUUID>& uuids);
-
66 bool setPartialServices32(const std::vector<NimBLEUUID>& uuids);
-
67 bool setServiceData(const NimBLEUUID& uuid, const uint8_t* data, size_t length);
-
68 bool setServiceData(const NimBLEUUID& uuid, const std::string& data);
-
69 bool setServiceData(const NimBLEUUID& uuid, const std::vector<uint8_t>& data);
-
70 bool setShortName(const std::string& name);
-
71 bool setData(const uint8_t* data, size_t length);
-
72 bool addData(const uint8_t* data, size_t length);
-
73 bool addData(const std::string& data);
-
74 bool setPreferredParams(uint16_t min, uint16_t max);
-
75 bool addTxPower();
-
76 void setLegacyAdvertising(bool enable);
-
77 void setConnectable(bool enable);
-
78 void setScannable(bool enable);
-
79 void setMinInterval(uint32_t mininterval);
-
80 void setMaxInterval(uint32_t maxinterval);
-
81 void setPrimaryPhy(uint8_t phy);
-
82 void setSecondaryPhy(uint8_t phy);
-
83 void setScanFilter(bool scanRequestWhitelistOnly, bool connectWhitelistOnly);
-
84 void setDirectedPeer(const NimBLEAddress& addr);
-
85 void setDirected(bool enable, bool high_duty = true);
-
86 void setAnonymous(bool enable);
-
87 void setPrimaryChannels(bool ch37, bool ch38, bool ch39);
-
88 void setTxPower(int8_t dbm);
-
89 void setAddress(const NimBLEAddress& addr);
-
90 void enableScanRequestCallback(bool enable);
-
91 void clearData();
-
92 int getDataLocation(uint8_t type) const;
-
93 bool removeData(uint8_t type);
-
94 size_t getDataSize() const;
-
95 std::string toString() const;
+
48 NimBLEExtAdvertisement(uint8_t priPhy = BLE_HCI_LE_PHY_1M, uint8_t secPhy = BLE_HCI_LE_PHY_1M);
+
49 bool setAppearance(uint16_t appearance);
+
50 bool addServiceUUID(const NimBLEUUID& serviceUUID);
+
51 bool addServiceUUID(const char* serviceUUID);
+
52 bool removeServiceUUID(const NimBLEUUID& serviceUUID);
+
53 bool removeServiceUUID(const char* serviceUUID);
+
54 bool removeServices();
+
55 bool setCompleteServices(const NimBLEUUID& uuid);
+
56 bool setCompleteServices16(const std::vector<NimBLEUUID>& uuids);
+
57 bool setCompleteServices32(const std::vector<NimBLEUUID>& uuids);
+
58 bool setFlags(uint8_t flag);
+
59 bool setManufacturerData(const uint8_t* data, size_t length);
+
60 bool setManufacturerData(const std::string& data);
+
61 bool setManufacturerData(const std::vector<uint8_t>& data);
+
62 bool setURI(const std::string& uri);
+
63 bool setName(const std::string& name, bool isComplete = true);
+
64 bool setPartialServices(const NimBLEUUID& uuid);
+
65 bool setPartialServices16(const std::vector<NimBLEUUID>& uuids);
+
66 bool setPartialServices32(const std::vector<NimBLEUUID>& uuids);
+
67 bool setServiceData(const NimBLEUUID& uuid, const uint8_t* data, size_t length);
+
68 bool setServiceData(const NimBLEUUID& uuid, const std::string& data);
+
69 bool setServiceData(const NimBLEUUID& uuid, const std::vector<uint8_t>& data);
+
70 bool setShortName(const std::string& name);
+
71 bool setData(const uint8_t* data, size_t length);
+
72 bool addData(const uint8_t* data, size_t length);
+
73 bool addData(const std::string& data);
+
74 bool setPreferredParams(uint16_t min, uint16_t max);
+
75 bool addTxPower();
+
76 void setLegacyAdvertising(bool enable);
+
77 void setConnectable(bool enable);
+
78 void setScannable(bool enable);
+
79 void setMinInterval(uint32_t mininterval);
+
80 void setMaxInterval(uint32_t maxinterval);
+
81 void setPrimaryPhy(uint8_t phy);
+
82 void setSecondaryPhy(uint8_t phy);
+
83 void setScanFilter(bool scanRequestWhitelistOnly, bool connectWhitelistOnly);
+
84 void setDirectedPeer(const NimBLEAddress& addr);
+
85 void setDirected(bool enable, bool high_duty = true);
+
86 void setAnonymous(bool enable);
+
87 void setPrimaryChannels(bool ch37, bool ch38, bool ch39);
+
88 void setTxPower(int8_t dbm);
+
89 void setAddress(const NimBLEAddress& addr);
+
90 void enableScanRequestCallback(bool enable);
+
91 void clearData();
+
92 int getDataLocation(uint8_t type) const;
+
93 bool removeData(uint8_t type);
+
94 size_t getDataSize() const;
+
95 std::string toString() const;
96
97 private:
-
98 friend class NimBLEExtAdvertising;
+
98 friend class NimBLEExtAdvertising;
99
100 bool setServices(bool complete, uint8_t size, const std::vector<NimBLEUUID>& uuids);
101
@@ -200,111 +199,48 @@ $(document).ready(function(){initNavTree('_nim_b_l_e_ext_advertising_8h_source.h
103 ble_gap_ext_adv_params m_params{};
104 NimBLEAddress m_advAddress{};
105}; // NimBLEExtAdvertisement
-
106
-
- +
110class NimBLEExtAdvertising {
111 public:
- - -
114 bool start(uint8_t instId, int duration = 0, int maxEvents = 0);
-
115 bool setInstanceData(uint8_t instId, NimBLEExtAdvertisement& adv);
-
116 bool setScanResponseData(uint8_t instId, NimBLEExtAdvertisement& data);
-
117 bool removeInstance(uint8_t instId);
-
118 bool removeAll();
-
119 bool stop(uint8_t instId);
-
120 bool stop();
-
121 bool isActive(uint8_t instId);
-
122 bool isAdvertising();
-
123 void setCallbacks(NimBLEExtAdvertisingCallbacks* callbacks, bool deleteCallbacks = true);
+
112 NimBLEExtAdvertising();
+
113 ~NimBLEExtAdvertising();
+
114 bool start(uint8_t instId, int duration = 0, int maxEvents = 0);
+
115 bool setInstanceData(uint8_t instId, NimBLEExtAdvertisement& adv);
+
116 bool setScanResponseData(uint8_t instId, NimBLEExtAdvertisement& data);
+
117 bool removeInstance(uint8_t instId);
+
118 bool removeAll();
+
119 bool stop(uint8_t instId);
+
120 bool stop();
+
121 bool isActive(uint8_t instId);
+
122 bool isAdvertising();
+
123 void setCallbacks(NimBLEExtAdvertisingCallbacks* callbacks, bool deleteCallbacks = true);
124
125 private:
126 friend class NimBLEDevice;
-
127 friend class NimBLEServer;
+
127 friend class NimBLEServer;
128
129 void onHostSync();
130 static int handleGapEvent(struct ble_gap_event* event, void* arg);
131
132 bool m_deleteCallbacks;
-
133 NimBLEExtAdvertisingCallbacks* m_pCallbacks;
+
133 NimBLEExtAdvertisingCallbacks* m_pCallbacks;
134 std::vector<bool> m_advStatus;
135};
-
136
-
- +
140class NimBLEExtAdvertisingCallbacks {
141 public:
- +
142 virtual ~NimBLEExtAdvertisingCallbacks() {};
143
-
150 virtual void onStopped(NimBLEExtAdvertising* pAdv, int reason, uint8_t instId);
+
150 virtual void onStopped(NimBLEExtAdvertising* pAdv, int reason, uint8_t instId);
151
-
159 virtual void onScanRequest(NimBLEExtAdvertising* pAdv, uint8_t instId, NimBLEAddress addr);
+
159 virtual void onScanRequest(NimBLEExtAdvertising* pAdv, uint8_t instId, NimBLEAddress addr);
160}; // NimBLEExtAdvertisingCallbacks
-
161
-
162#endif // CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_BROADCASTER && CONFIG_BT_NIMBLE_EXT_ADV
+
162#endif // CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_ROLE_BROADCASTER) && MYNEWT_VAL(BLE_EXT_ADV)
163#endif // NIMBLE_CPP_EXTADVERTISING_H_
A BLE device address.
Definition NimBLEAddress.h:42
-
A model of a BLE Device from which all the BLE roles are created.
Definition NimBLEDevice.h:122
-
Extended advertisement data.
Definition NimBLEExtAdvertising.h:46
-
void setAddress(const NimBLEAddress &addr)
Set the address to use for this advertisement.
Definition NimBLEExtAdvertising.cpp:403
-
bool setAppearance(uint16_t appearance)
Set the appearance.
Definition NimBLEExtAdvertising.cpp:577
-
bool setFlags(uint8_t flag)
Set the advertisement flags.
Definition NimBLEExtAdvertising.cpp:599
-
bool addServiceUUID(const NimBLEUUID &serviceUUID)
Add a service uuid to exposed list of services.
Definition NimBLEExtAdvertising.cpp:689
-
void clearData()
Clears the data stored in this instance, does not change settings.
Definition NimBLEExtAdvertising.cpp:522
-
void setAnonymous(bool enable)
Sets whether the advertisement should be anonymous.
Definition NimBLEExtAdvertising.cpp:506
-
bool setPartialServices32(const std::vector< NimBLEUUID > &uuids)
Set the partial list of services to advertise.
Definition NimBLEExtAdvertising.cpp:856
-
bool addData(const uint8_t *data, size_t length)
Add data to the payload to be advertised.
Definition NimBLEExtAdvertising.cpp:548
-
bool setCompleteServices16(const std::vector< NimBLEUUID > &uuids)
Set the complete list of 16 bit services to advertise.
Definition NimBLEExtAdvertising.cpp:820
-
void setScanFilter(bool scanRequestWhitelistOnly, bool connectWhitelistOnly)
Set the filtering for the scan filter.
Definition NimBLEExtAdvertising.cpp:426
-
bool removeData(uint8_t type)
Remove data from the advertisement data.
Definition NimBLEExtAdvertising.cpp:1055
-
bool setServiceData(const NimBLEUUID &uuid, const uint8_t *data, size_t length)
Set the service data advertised for the UUID.
Definition NimBLEExtAdvertising.cpp:918
-
bool setPreferredParams(uint16_t min, uint16_t max)
Set the preferred min and max connection intervals to advertise.
Definition NimBLEExtAdvertising.cpp:996
-
void setLegacyAdvertising(bool enable)
Sets wether the advertisement should use legacy (BLE 4.0, 31 bytes max) advertising.
Definition NimBLEExtAdvertising.cpp:368
-
bool setPartialServices(const NimBLEUUID &uuid)
Set a single service to advertise as a partial list of services.
Definition NimBLEExtAdvertising.cpp:838
-
void setMaxInterval(uint32_t maxinterval)
Set the maximum advertising interval.
Definition NimBLEExtAdvertising.cpp:475
-
bool setManufacturerData(const uint8_t *data, size_t length)
Set manufacturer specific data.
Definition NimBLEExtAdvertising.cpp:618
-
bool setShortName(const std::string &name)
Set the short name.
Definition NimBLEExtAdvertising.cpp:985
-
void setDirectedPeer(const NimBLEAddress &addr)
Sets the peer to directly advertise to.
Definition NimBLEExtAdvertising.cpp:449
-
std::string toString() const
Get the string representation of the advertisement data.
Definition NimBLEExtAdvertising.cpp:1079
-
bool removeServiceUUID(const NimBLEUUID &serviceUUID)
Remove a service UUID from the advertisement.
Definition NimBLEExtAdvertising.cpp:746
-
void setTxPower(int8_t dbm)
Sets the transmission power level for this advertisement.
Definition NimBLEExtAdvertising.cpp:385
-
bool setURI(const std::string &uri)
Set the URI to advertise.
Definition NimBLEExtAdvertising.cpp:654
-
int getDataLocation(uint8_t type) const
Get the location of the data in the payload.
Definition NimBLEExtAdvertising.cpp:1039
-
bool setName(const std::string &name, bool isComplete=true)
Set the complete name of this device.
Definition NimBLEExtAdvertising.cpp:672
-
bool addTxPower()
Adds Tx power level to the advertisement data.
Definition NimBLEExtAdvertising.cpp:1016
-
void setSecondaryPhy(uint8_t phy)
Set the secondary advertising PHY to use.
Definition NimBLEExtAdvertising.cpp:496
-
bool setCompleteServices32(const std::vector< NimBLEUUID > &uuids)
Set the complete list of 32 bit services to advertise.
Definition NimBLEExtAdvertising.cpp:829
-
void enableScanRequestCallback(bool enable)
Sets whether the scan response request callback should be called.
Definition NimBLEExtAdvertising.cpp:514
-
void setPrimaryChannels(bool ch37, bool ch38, bool ch39)
Sets The primary channels to advertise on.
Definition NimBLEExtAdvertising.cpp:417
-
bool removeServices()
Remove all service UUIDs from the advertisement.
Definition NimBLEExtAdvertising.cpp:802
-
void setConnectable(bool enable)
Sets wether this advertisement should advertise as a connectable device.
Definition NimBLEExtAdvertising.cpp:393
-
void setPrimaryPhy(uint8_t phy)
Set the primary advertising PHY to use.
Definition NimBLEExtAdvertising.cpp:485
-
bool setPartialServices16(const std::vector< NimBLEUUID > &uuids)
Set the partial list of services to advertise.
Definition NimBLEExtAdvertising.cpp:847
-
void setScannable(bool enable)
Sets wether the advertisement has scan response data available.
Definition NimBLEExtAdvertising.cpp:376
-
size_t getDataSize() const
Get the size of the current data.
Definition NimBLEExtAdvertising.cpp:1071
-
void setMinInterval(uint32_t mininterval)
Set the minimum advertising interval.
Definition NimBLEExtAdvertising.cpp:467
-
bool setCompleteServices(const NimBLEUUID &uuid)
Set a single service to advertise as a complete list of services.
Definition NimBLEExtAdvertising.cpp:811
-
void setDirected(bool enable, bool high_duty=true)
Enable or disable direct advertisements to the peer set with NimBLEExtAdvertisement::setDirectedPeer
Definition NimBLEExtAdvertising.cpp:458
-
bool setData(const uint8_t *data, size_t length)
Set the advertisement data.
Definition NimBLEExtAdvertising.cpp:533
-
Callbacks associated with NimBLEExtAdvertising class.
Definition NimBLEExtAdvertising.h:140
-
virtual void onStopped(NimBLEExtAdvertising *pAdv, int reason, uint8_t instId)
Handle an advertising stop event.
Definition NimBLEExtAdvertising.cpp:335
-
virtual void onScanRequest(NimBLEExtAdvertising *pAdv, uint8_t instId, NimBLEAddress addr)
Handle a scan response request. This is called when a scanning device requests a scan response.
Definition NimBLEExtAdvertising.cpp:339
-
Extended advertising class.
Definition NimBLEExtAdvertising.h:110
-
bool stop()
Stop all advertisements.
Definition NimBLEExtAdvertising.cpp:229
-
~NimBLEExtAdvertising()
Destructor: deletes callback instances if requested.
Definition NimBLEExtAdvertising.cpp:46
-
bool start(uint8_t instId, int duration=0, int maxEvents=0)
Start extended advertising.
Definition NimBLEExtAdvertising.cpp:157
-
bool isActive(uint8_t instId)
Check if currently advertising.
Definition NimBLEExtAdvertising.cpp:262
-
bool removeAll()
Stop and remove all advertising instance data.
Definition NimBLEExtAdvertising.cpp:196
-
bool isAdvertising()
Check if any instances are currently advertising.
Definition NimBLEExtAdvertising.cpp:270
-
bool setScanResponseData(uint8_t instId, NimBLEExtAdvertisement &data)
Set the scan response data for a legacy advertisement.
Definition NimBLEExtAdvertising.cpp:133
-
bool removeInstance(uint8_t instId)
Stop and remove this instance data from the advertisement set.
Definition NimBLEExtAdvertising.cpp:179
-
void setCallbacks(NimBLEExtAdvertisingCallbacks *callbacks, bool deleteCallbacks=true)
Set a callback to call when the advertisement stops.
Definition NimBLEExtAdvertising.cpp:247
-
bool setInstanceData(uint8_t instId, NimBLEExtAdvertisement &adv)
Register the extended advertisement data.
Definition NimBLEExtAdvertising.cpp:58
-
NimBLEExtAdvertising()
Constructor.
Definition NimBLEExtAdvertising.cpp:38
-
The model of a BLE server.
Definition NimBLEServer.h:62
+
A model of a BLE Device from which all the BLE roles are created.
Definition NimBLEDevice.h:116
A model of a BLE UUID.
Definition NimBLEUUID.h:41
-
diff --git a/_nim_b_l_e_h_i_d_device_8h_source.html b/_nim_b_l_e_h_i_d_device_8h_source.html index 4350c53..feb4def 100644 --- a/_nim_b_l_e_h_i_d_device_8h_source.html +++ b/_nim_b_l_e_h_i_d_device_8h_source.html @@ -25,7 +25,7 @@ -
esp-nimble-cpp 2.3.1 +
esp-nimble-cpp 2.3.2
@@ -117,8 +117,8 @@ $(document).ready(function(){initNavTree('_nim_b_l_e_h_i_d_device_8h_source.html
18#ifndef NIMBLE_CPP_HIDDEVICE_H_
19#define NIMBLE_CPP_HIDDEVICE_H_
20
-
21#include "nimconfig.h"
-
22#if CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_BROADCASTER && CONFIG_BT_NIMBLE_ROLE_PERIPHERAL
+
21#include "syscfg/syscfg.h"
+
22#if CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_ROLE_BROADCASTER) && MYNEWT_VAL(BLE_ROLE_PERIPHERAL)
23
24# include <stdint.h>
25# include <string>
@@ -136,80 +136,53 @@ $(document).ready(function(){initNavTree('_nim_b_l_e_h_i_d_device_8h_source.html
37# define PNPVersionField(MajorVersion, MinorVersion, PatchVersion) \
38 ((MajorVersion << 16) & 0xFF00) | ((MinorVersion << 8) & 0x00F0) | (PatchVersion & 0x000F)
39
-
40class NimBLEServer;
-
41class NimBLEService;
- +
40class NimBLEServer;
+
41class NimBLEService;
+
42class NimBLECharacteristic;
43
-
- +
47class NimBLEHIDDevice {
48 public:
- +
49 NimBLEHIDDevice(NimBLEServer* server);
50
-
51 void setReportMap(uint8_t* map, uint16_t);
-
52 void startServices();
-
53 bool setManufacturer(const std::string& name);
-
54 void setPnp(uint8_t sig, uint16_t vid, uint16_t pid, uint16_t version);
-
55 void setHidInfo(uint8_t country, uint8_t flags);
-
56 void setBatteryLevel(uint8_t level, bool notify = false);
- - - -
60 NimBLECharacteristic* getInputReport(uint8_t reportId);
-
61 NimBLECharacteristic* getOutputReport(uint8_t reportId);
-
62 NimBLECharacteristic* getFeatureReport(uint8_t reportId);
- - - - - - - - +
51 void setReportMap(uint8_t* map, uint16_t);
+
52 void startServices();
+
53 bool setManufacturer(const std::string& name);
+
54 void setPnp(uint8_t sig, uint16_t vid, uint16_t pid, uint16_t version);
+
55 void setHidInfo(uint8_t country, uint8_t flags);
+
56 void setBatteryLevel(uint8_t level, bool notify = false);
+
57 NimBLECharacteristic* getBatteryLevel();
+
58 NimBLECharacteristic* getReportMap();
+
59 NimBLECharacteristic* getHidControl();
+
60 NimBLECharacteristic* getInputReport(uint8_t reportId);
+
61 NimBLECharacteristic* getOutputReport(uint8_t reportId);
+
62 NimBLECharacteristic* getFeatureReport(uint8_t reportId);
+
63 NimBLECharacteristic* getProtocolMode();
+
64 NimBLECharacteristic* getBootInput();
+
65 NimBLECharacteristic* getBootOutput();
+
66 NimBLECharacteristic* getPnp();
+
67 NimBLECharacteristic* getHidInfo();
+
68 NimBLEService* getDeviceInfoService();
+
69 NimBLEService* getHidService();
+
70 NimBLEService* getBatteryService();
71
72 private:
-
73 NimBLEService* m_deviceInfoSvc{nullptr}; // 0x180a
-
74 NimBLEService* m_hidSvc{nullptr}; // 0x1812
-
75 NimBLEService* m_batterySvc{nullptr}; // 0x180f
+
73 NimBLEService* m_deviceInfoSvc{nullptr}; // 0x180a
+
74 NimBLEService* m_hidSvc{nullptr}; // 0x1812
+
75 NimBLEService* m_batterySvc{nullptr}; // 0x180f
76
-
77 NimBLECharacteristic* m_manufacturerChr{nullptr}; // 0x2a29
-
78 NimBLECharacteristic* m_pnpChr{nullptr}; // 0x2a50
-
79 NimBLECharacteristic* m_hidInfoChr{nullptr}; // 0x2a4a
-
80 NimBLECharacteristic* m_reportMapChr{nullptr}; // 0x2a4b
-
81 NimBLECharacteristic* m_hidControlChr{nullptr}; // 0x2a4c
-
82 NimBLECharacteristic* m_protocolModeChr{nullptr}; // 0x2a4e
-
83 NimBLECharacteristic* m_batteryLevelChr{nullptr}; // 0x2a19
+
77 NimBLECharacteristic* m_manufacturerChr{nullptr}; // 0x2a29
+
78 NimBLECharacteristic* m_pnpChr{nullptr}; // 0x2a50
+
79 NimBLECharacteristic* m_hidInfoChr{nullptr}; // 0x2a4a
+
80 NimBLECharacteristic* m_reportMapChr{nullptr}; // 0x2a4b
+
81 NimBLECharacteristic* m_hidControlChr{nullptr}; // 0x2a4c
+
82 NimBLECharacteristic* m_protocolModeChr{nullptr}; // 0x2a4e
+
83 NimBLECharacteristic* m_batteryLevelChr{nullptr}; // 0x2a19
84
-
85 NimBLECharacteristic* locateReportCharacteristicByIdAndType(uint8_t reportId, uint8_t reportType);
+
85 NimBLECharacteristic* locateReportCharacteristicByIdAndType(uint8_t reportId, uint8_t reportType);
86};
-
87
-
88#endif // CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_BROADCASTER && CONFIG_BT_NIMBLE_ROLE_PERIPHERAL
+
88#endif // CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_ROLE_BROADCASTER) && MYNEWT_VAL(BLE_ROLE_PERIPHERAL)
89#endif // NIMBLE_CPP_HIDDEVICE_H_
-
The model of a BLE Characteristic.
Definition NimBLECharacteristic.h:41
-
A model of a BLE Human Interface Device.
Definition NimBLEHIDDevice.h:47
-
NimBLECharacteristic * getProtocolMode()
Get the HID protocol mode characteristic.
Definition NimBLEHIDDevice.cpp:283
-
NimBLECharacteristic * getHidInfo()
Get the HID information characteristic.
Definition NimBLEHIDDevice.cpp:315
-
NimBLEService * getHidService()
Get the HID service.
Definition NimBLEHIDDevice.cpp:331
-
NimBLECharacteristic * getBatteryLevel()
Get the battery level characteristic.
Definition NimBLEHIDDevice.cpp:291
-
bool setManufacturer(const std::string &name)
Get the manufacturer characteristic (this characteristic is optional).
Definition NimBLEHIDDevice.cpp:97
-
void startServices()
Start the HID device services. This function called when all the services have been created.
Definition NimBLEHIDDevice.cpp:86
-
NimBLEService * getDeviceInfoService()
Get the manufacturer characteristic.
Definition NimBLEHIDDevice.cpp:323
-
NimBLECharacteristic * getBootInput()
Get a keyboard boot input report characteristic.
Definition NimBLEHIDDevice.cpp:247
-
void setPnp(uint8_t sig, uint16_t vid, uint16_t pid, uint16_t version)
Sets the Plug n Play characteristic value.
Definition NimBLEHIDDevice.cpp:117
-
void setBatteryLevel(uint8_t level, bool notify=false)
Set the battery level characteristic value.
Definition NimBLEHIDDevice.cpp:144
-
NimBLECharacteristic * getHidControl()
Get the HID control point characteristic.
Definition NimBLEHIDDevice.cpp:275
-
NimBLECharacteristic * getPnp()
Get the PnP characteristic.
Definition NimBLEHIDDevice.cpp:307
-
void setReportMap(uint8_t *map, uint16_t)
Set the report map data formatting information.
Definition NimBLEHIDDevice.cpp:78
-
NimBLECharacteristic * getFeatureReport(uint8_t reportId)
Get the feature report characteristic.
Definition NimBLEHIDDevice.cpp:225
-
NimBLECharacteristic * getOutputReport(uint8_t reportId)
Get the output report characteristic.
Definition NimBLEHIDDevice.cpp:201
-
NimBLECharacteristic * getBootOutput()
Create a keyboard boot output report characteristic.
Definition NimBLEHIDDevice.cpp:261
-
NimBLEService * getBatteryService()
Get the battery service.
Definition NimBLEHIDDevice.cpp:339
-
void setHidInfo(uint8_t country, uint8_t flags)
Sets the HID Information characteristic value.
Definition NimBLEHIDDevice.cpp:134
-
NimBLECharacteristic * getInputReport(uint8_t reportId)
Get the input report characteristic.
Definition NimBLEHIDDevice.cpp:178
-
NimBLECharacteristic * getReportMap()
Get the report map characteristic.
Definition NimBLEHIDDevice.cpp:299
-
The model of a BLE server.
Definition NimBLEServer.h:62
-
The model of a BLE service.
Definition NimBLEService.h:34
-
diff --git a/_nim_b_l_e_l2_c_a_p_channel_8h_source.html b/_nim_b_l_e_l2_c_a_p_channel_8h_source.html index 6d20712..14fb389 100644 --- a/_nim_b_l_e_l2_c_a_p_channel_8h_source.html +++ b/_nim_b_l_e_l2_c_a_p_channel_8h_source.html @@ -25,7 +25,7 @@ -
esp-nimble-cpp 2.3.1 +
esp-nimble-cpp 2.3.2
@@ -104,8 +104,8 @@ $(document).ready(function(){initNavTree('_nim_b_l_e_l2_c_a_p_channel_8h_source.
5#ifndef NIMBLE_CPP_L2CAPCHANNEL_H_
6#define NIMBLE_CPP_L2CAPCHANNEL_H_
7
-
8#include "nimconfig.h"
-
9#if CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_L2CAP_COC_MAX_NUM
+
8#include "syscfg/syscfg.h"
+
9#if CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_L2CAP_COC_MAX_NUM)
10
11# include "inttypes.h"
12# if defined(CONFIG_NIMBLE_CPP_IDF)
@@ -124,13 +124,13 @@ $(document).ready(function(){initNavTree('_nim_b_l_e_l2_c_a_p_channel_8h_source.
25# include <vector>
26# include <atomic>
27
-
28class NimBLEClient;
+
28class NimBLEClient;
29class NimBLEL2CAPChannelCallbacks;
30struct NimBLETaskData;
31
39class NimBLEL2CAPChannel {
40 public:
-
48 static NimBLEL2CAPChannel* connect(NimBLEClient* client, uint16_t psm, uint16_t mtu, NimBLEL2CAPChannelCallbacks* callbacks);
+
48 static NimBLEL2CAPChannel* connect(NimBLEClient* client, uint16_t psm, uint16_t mtu, NimBLEL2CAPChannelCallbacks* callbacks);
49
57 bool write(const std::vector<uint8_t>& bytes);
58
@@ -187,11 +187,9 @@ $(document).ready(function(){initNavTree('_nim_b_l_e_l2_c_a_p_channel_8h_source.
122 virtual void onDisconnect(NimBLEL2CAPChannel* channel) {};
123};
124
-
125#endif // CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_L2CAP_COC_MAX_NUM
+
125#endif // CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_L2CAP_COC_MAX_NUM)
126#endif // NIMBLE_CPP_L2CAPCHANNEL_H_
-
A model of a BLE client.
Definition NimBLEClient.h:49
- -
A structure to hold data for a task that is waiting for a response.
Definition NimBLEUtils.h:33
+
A structure to hold data for a task that is waiting for a response.
Definition NimBLEUtils.h:45
diff --git a/_nim_b_l_e_l2_c_a_p_server_8h_source.html b/_nim_b_l_e_l2_c_a_p_server_8h_source.html index 5453390..3629053 100644 --- a/_nim_b_l_e_l2_c_a_p_server_8h_source.html +++ b/_nim_b_l_e_l2_c_a_p_server_8h_source.html @@ -25,7 +25,7 @@ -
esp-nimble-cpp 2.3.1 +
esp-nimble-cpp 2.3.2
@@ -103,8 +103,8 @@ $(document).ready(function(){initNavTree('_nim_b_l_e_l2_c_a_p_server_8h_source.h
4
5#ifndef NIMBLE_CPP_L2CAPSERVER_H_
6#define NIMBLE_CPP_L2CAPSERVER_H_
-
7#include "nimconfig.h"
-
8#if CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_L2CAP_COC_MAX_NUM
+
7#include "syscfg/syscfg.h"
+
8#if CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_L2CAP_COC_MAX_NUM)
9
10# include "inttypes.h"
11# include <vector>
@@ -125,10 +125,9 @@ $(document).ready(function(){initNavTree('_nim_b_l_e_l2_c_a_p_server_8h_source.h
37 friend class NimBLEDevice;
38};
39
-
40#endif // CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_L2CAP_COC_MAX_NUM
+
40#endif // CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_L2CAP_COC_MAX_NUM)
41#endif // NIMBLE_CPP_L2CAPSERVER_H_
-
A model of a BLE Device from which all the BLE roles are created.
Definition NimBLEDevice.h:122
- +
A model of a BLE Device from which all the BLE roles are created.
Definition NimBLEDevice.h:116
diff --git a/_nim_b_l_e_local_attribute_8h_source.html b/_nim_b_l_e_local_attribute_8h_source.html index 16110a5..b1f6ed2 100644 --- a/_nim_b_l_e_local_attribute_8h_source.html +++ b/_nim_b_l_e_local_attribute_8h_source.html @@ -25,7 +25,7 @@ -
esp-nimble-cpp 2.3.1 +
esp-nimble-cpp 2.3.2
@@ -117,37 +117,28 @@ $(document).ready(function(){initNavTree('_nim_b_l_e_local_attribute_8h_source.h
18#ifndef NIMBLE_CPP_LOCAL_ATTRIBUTE_H_
19#define NIMBLE_CPP_LOCAL_ATTRIBUTE_H_
20
-
21#include "nimconfig.h"
-
22#if CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_PERIPHERAL
+
21#include "syscfg/syscfg.h"
+
22#if CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_ROLE_PERIPHERAL)
23
24# include "NimBLEAttribute.h"
25
-
- +
29class NimBLELocalAttribute : public NimBLEAttribute {
30 public:
-
35 uint8_t getRemoved() const { return m_removed; }
+
35 uint8_t getRemoved() const { return m_removed; }
36
37 protected:
-
41 NimBLELocalAttribute(const NimBLEUUID& uuid, uint16_t handle) : NimBLEAttribute{uuid, handle}, m_removed{0} {}
+
41 NimBLELocalAttribute(const NimBLEUUID& uuid, uint16_t handle) : NimBLEAttribute{uuid, handle}, m_removed{0} {}
42
- +
46 ~NimBLELocalAttribute() = default;
47
-
52 void setRemoved(uint8_t removed) { m_removed = removed; }
+
52 void setRemoved(uint8_t removed) { m_removed = removed; }
53
54 uint8_t m_removed{0};
55};
-
56
-
57#endif // CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_PERIPHERAL
+
57#endif // CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_ROLE_PERIPHERAL)
58#endif // NIMBLE_CPP_LOCAL_ATTRIBUTE_H_
-
A base class for BLE attributes.
Definition NimBLEAttribute.h:29
-
A base class for local BLE attributes.
Definition NimBLELocalAttribute.h:29
-
void setRemoved(uint8_t removed)
Set the removed flag.
Definition NimBLELocalAttribute.h:52
-
uint8_t getRemoved() const
Get the removed flag.
Definition NimBLELocalAttribute.h:35
-
NimBLELocalAttribute(const NimBLEUUID &uuid, uint16_t handle)
Construct a local attribute.
Definition NimBLELocalAttribute.h:41
-
~NimBLELocalAttribute()=default
Destroy the local attribute.
A model of a BLE UUID.
Definition NimBLEUUID.h:41
-
diff --git a/_nim_b_l_e_local_value_attribute_8h_source.html b/_nim_b_l_e_local_value_attribute_8h_source.html index d3d60b0..56c4c57 100644 --- a/_nim_b_l_e_local_value_attribute_8h_source.html +++ b/_nim_b_l_e_local_value_attribute_8h_source.html @@ -25,7 +25,7 @@ -
esp-nimble-cpp 2.3.1 +
esp-nimble-cpp 2.3.2
@@ -117,8 +117,8 @@ $(document).ready(function(){initNavTree('_nim_b_l_e_local_value_attribute_8h_so
18#ifndef NIMBLE_LOCAL_VALUE_ATTRIBUTE_H_
19#define NIMBLE_LOCAL_VALUE_ATTRIBUTE_H_
20
-
21#include "nimconfig.h"
-
22#if CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_PERIPHERAL
+
21#include "syscfg/syscfg.h"
+
22#if CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_ROLE_PERIPHERAL)
23
24# if defined(CONFIG_NIMBLE_CPP_IDF)
25# include "host/ble_hs.h"
@@ -152,7 +152,7 @@ $(document).ready(function(){initNavTree('_nim_b_l_e_local_value_attribute_8h_so
53# include <vector>
54class NimBLEConnInfo;
55
-
56class NimBLELocalValueAttribute : public NimBLELocalAttribute, public NimBLEValueAttribute {
+
56class NimBLELocalValueAttribute : public NimBLELocalAttribute, public NimBLEValueAttribute {
57 public:
61 uint16_t getProperties() const { return m_properties; }
62
@@ -168,13 +168,13 @@ $(document).ready(function(){initNavTree('_nim_b_l_e_local_value_attribute_8h_so
89 }
90
91 protected:
-
92 friend class NimBLEServer;
+
92 friend class NimBLEServer;
93
101 NimBLELocalValueAttribute(const NimBLEUUID& uuid,
102 uint16_t handle,
103 uint16_t maxLen,
- -
105 : NimBLELocalAttribute(uuid, handle), NimBLEValueAttribute(maxLen, initLen) {}
+
104 uint16_t initLen = CONFIG_NIMBLE_CPP_ATT_VALUE_INIT_LENGTH)
+
105 : NimBLELocalAttribute(uuid, handle), NimBLEValueAttribute(maxLen, initLen) {}
109 virtual ~NimBLELocalValueAttribute() = default;
110
116 virtual void readEvent(NimBLEConnInfo& connInfo) = 0;
@@ -188,15 +188,11 @@ $(document).ready(function(){initNavTree('_nim_b_l_e_local_value_attribute_8h_so
140 uint16_t m_properties{0};
141};
142
-
143#endif // CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_PERIPHERAL
+
143#endif // CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_ROLE_PERIPHERAL)
144#endif // NIMBLE_LOCAL_VALUE_ATTRIBUTE_H_
A specialized container class to hold BLE attribute values.
Definition NimBLEAttValue.h:72
Connection information.
Definition NimBLEConnInfo.h:32
-
A base class for local BLE attributes.
Definition NimBLELocalAttribute.h:29
-
The model of a BLE server.
Definition NimBLEServer.h:62
A model of a BLE UUID.
Definition NimBLEUUID.h:41
- -
#define CONFIG_NIMBLE_CPP_ATT_VALUE_INIT_LENGTH
Uncomment to set the default allocation size (bytes) for each attribute if not specified when the con...
Definition nimconfig.h:68
diff --git a/_nim_b_l_e_log_8h_source.html b/_nim_b_l_e_log_8h_source.html index 0c3420b..9eb0c4e 100644 --- a/_nim_b_l_e_log_8h_source.html +++ b/_nim_b_l_e_log_8h_source.html @@ -25,7 +25,7 @@ -
esp-nimble-cpp 2.3.1 +
esp-nimble-cpp 2.3.2
@@ -117,8 +117,8 @@ $(document).ready(function(){initNavTree('_nim_b_l_e_log_8h_source.html',''); in
18#ifndef NIMBLE_CPP_LOG_H_
19#define NIMBLE_CPP_LOG_H_
20
-
21#include "nimconfig.h"
-
22#if CONFIG_BT_ENABLED
+
21#include "syscfg/syscfg.h"
+
22#if CONFIG_BT_NIMBLE_ENABLED
23
24# if defined(CONFIG_NIMBLE_CPP_IDF)
25# include "esp_log.h"
@@ -236,7 +236,7 @@ $(document).ready(function(){initNavTree('_nim_b_l_e_log_8h_source.html',''); in
137# define NIMBLE_LOGE(tag, format, ...) NIMBLE_CPP_LOG_PRINT(ESP_LOG_ERROR, tag, format, ##__VA_ARGS__)
138
139# else
-
140# include "nimble/porting/nimble/include/syscfg/syscfg.h"
+
140# include "syscfg/syscfg.h"
141# include "nimble/console/console.h"
142# ifndef CONFIG_NIMBLE_CPP_LOG_LEVEL
143# if defined(ARDUINO_ARCH_ESP32) && defined(CORE_DEBUG_LEVEL)
@@ -278,9 +278,8 @@ $(document).ready(function(){initNavTree('_nim_b_l_e_log_8h_source.html',''); in
179# define NIMBLE_LOGE_IF(cond, tag, format, ...) { if (cond) { NIMBLE_LOGE(tag, format, ##__VA_ARGS__); }}
180# define NIMBLE_LOGE_RC(rc, tag, format, ...) { if (rc) { NIMBLE_LOGE(tag, format "; rc=%d %s", ##__VA_ARGS__, rc, NimBLEUtils::returnCodeToString(rc)); }}
181
-
182#endif /* CONFIG_BT_ENABLED */
+
182#endif /* CONFIG_BT_NIMBLE_ENABLED */
183#endif /* NIMBLE_CPP_LOG_H_ */
-
diff --git a/_nim_b_l_e_remote_characteristic_8h_source.html b/_nim_b_l_e_remote_characteristic_8h_source.html index 48a7e1a..39c8b50 100644 --- a/_nim_b_l_e_remote_characteristic_8h_source.html +++ b/_nim_b_l_e_remote_characteristic_8h_source.html @@ -25,7 +25,7 @@ -
esp-nimble-cpp 2.3.1 +
esp-nimble-cpp 2.3.2
@@ -117,51 +117,50 @@ $(document).ready(function(){initNavTree('_nim_b_l_e_remote_characteristic_8h_so
18#ifndef NIMBLE_CPP_REMOTE_CHARACTERISTIC_H_
19#define NIMBLE_CPP_REMOTE_CHARACTERISTIC_H_
20
-
21#include "nimconfig.h"
-
22#if CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_CENTRAL
+
21#include "syscfg/syscfg.h"
+
22#if CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_ROLE_CENTRAL)
23
24# include "NimBLERemoteValueAttribute.h"
25# include <vector>
26# include <functional>
27
28class NimBLEUUID;
- - +
29class NimBLERemoteService;
+
30class NimBLERemoteDescriptor;
31struct NimBLEDescriptorFilter;
32
-
-
36class NimBLERemoteCharacteristic : public NimBLERemoteValueAttribute {
+
36class NimBLERemoteCharacteristic : public NimBLERemoteValueAttribute {
37 public:
-
38 std::string toString() const;
- -
40 void deleteDescriptors() const;
-
41 size_t deleteDescriptor(const NimBLEUUID& uuid) const;
-
42 bool canBroadcast() const;
-
43 bool canRead() const;
-
44 bool canWriteNoResponse() const;
-
45 bool canWrite() const;
-
46 bool canNotify() const;
-
47 bool canIndicate() const;
-
48 bool canWriteSigned() const;
-
49 bool hasExtendedProps() const;
-
50 NimBLEClient* getClient() const override;
+
38 std::string toString() const;
+
39 const NimBLERemoteService* getRemoteService() const;
+
40 void deleteDescriptors() const;
+
41 size_t deleteDescriptor(const NimBLEUUID& uuid) const;
+
42 bool canBroadcast() const;
+
43 bool canRead() const;
+
44 bool canWriteNoResponse() const;
+
45 bool canWrite() const;
+
46 bool canNotify() const;
+
47 bool canIndicate() const;
+
48 bool canWriteSigned() const;
+
49 bool hasExtendedProps() const;
+
50 NimBLEClient* getClient() const override;
51
-
52 typedef std::function<void(NimBLERemoteCharacteristic* pBLERemoteCharacteristic, uint8_t* pData, size_t length, bool isNotify)> notify_callback;
+
52 typedef std::function<void(NimBLERemoteCharacteristic* pBLERemoteCharacteristic, uint8_t* pData, size_t length, bool isNotify)> notify_callback;
53
-
54 bool subscribe(bool notifications = true, const notify_callback notifyCallback = nullptr, bool response = true) const;
-
55 bool unsubscribe(bool response = true) const;
+
54 bool subscribe(bool notifications = true, const notify_callback notifyCallback = nullptr, bool response = true) const;
+
55 bool unsubscribe(bool response = true) const;
56
-
57 std::vector<NimBLERemoteDescriptor*>::iterator begin() const;
-
58 std::vector<NimBLERemoteDescriptor*>::iterator end() const;
- -
60 const std::vector<NimBLERemoteDescriptor*>& getDescriptors(bool refresh = false) const;
+
57 std::vector<NimBLERemoteDescriptor*>::iterator begin() const;
+
58 std::vector<NimBLERemoteDescriptor*>::iterator end() const;
+
59 NimBLERemoteDescriptor* getDescriptor(const NimBLEUUID& uuid) const;
+
60 const std::vector<NimBLERemoteDescriptor*>& getDescriptors(bool refresh = false) const;
61
62 private:
-
63 friend class NimBLEClient;
-
64 friend class NimBLERemoteService;
+
63 friend class NimBLEClient;
+
64 friend class NimBLERemoteService;
65
-
66 NimBLERemoteCharacteristic(const NimBLERemoteService* pRemoteService, const ble_gatt_chr* chr);
- +
66 NimBLERemoteCharacteristic(const NimBLERemoteService* pRemoteService, const ble_gatt_chr* chr);
+
67 ~NimBLERemoteCharacteristic();
68
69 bool setNotify(uint16_t val, notify_callback notifyCallback = nullptr, bool response = true) const;
70 bool retrieveDescriptors(NimBLEDescriptorFilter* pFilter = nullptr) const;
@@ -169,40 +168,16 @@ $(document).ready(function(){initNavTree('_nim_b_l_e_remote_characteristic_8h_so
72 static int descriptorDiscCB(
73 uint16_t connHandle, const ble_gatt_error* error, uint16_t chrHandle, const ble_gatt_dsc* dsc, void* arg);
74
-
75 const NimBLERemoteService* m_pRemoteService{nullptr};
+
75 const NimBLERemoteService* m_pRemoteService{nullptr};
76 uint8_t m_properties{0};
77 mutable notify_callback m_notifyCallback{nullptr};
78 mutable std::vector<NimBLERemoteDescriptor*> m_vDescriptors{};
79
80}; // NimBLERemoteCharacteristic
-
81
-
82#endif /* CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_CENTRAL */
+
82#endif /* CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_ROLE_CENTRAL) */
83#endif /* NIMBLE_CPP_REMOTE_CHARACTERISTIC_H_ */
-
A model of a BLE client.
Definition NimBLEClient.h:49
-
A model of a remote BLE characteristic.
Definition NimBLERemoteCharacteristic.h:36
-
size_t deleteDescriptor(const NimBLEUUID &uuid) const
Delete descriptor by UUID.
Definition NimBLERemoteCharacteristic.cpp:282
-
bool canWriteNoResponse() const
Does the characteristic support writing without a response?
Definition NimBLERemoteCharacteristic.cpp:317
-
bool canBroadcast() const
Does the characteristic support value broadcasting?
Definition NimBLERemoteCharacteristic.cpp:301
-
std::vector< NimBLERemoteDescriptor * >::iterator begin() const
Get iterator to the beginning of the vector of remote descriptor pointers.
Definition NimBLERemoteCharacteristic.cpp:197
-
std::vector< NimBLERemoteDescriptor * >::iterator end() const
Get iterator to the end of the vector of remote descriptor pointers.
Definition NimBLERemoteCharacteristic.cpp:205
-
void deleteDescriptors() const
Delete the descriptors in the descriptor vector.
Definition NimBLERemoteCharacteristic.cpp:266
-
const NimBLERemoteService * getRemoteService() const
Get the remote service associated with this characteristic.
Definition NimBLERemoteCharacteristic.cpp:213
-
const std::vector< NimBLERemoteDescriptor * > & getDescriptors(bool refresh=false) const
Get a pointer to the vector of found descriptors.
Definition NimBLERemoteCharacteristic.cpp:184
-
bool canWrite() const
Does the characteristic support writing?
Definition NimBLERemoteCharacteristic.cpp:325
-
bool canRead() const
Does the characteristic support reading?
Definition NimBLERemoteCharacteristic.cpp:309
-
bool unsubscribe(bool response=true) const
Unsubscribe for notifications or indications.
Definition NimBLERemoteCharacteristic.cpp:256
-
bool canIndicate() const
Does the characteristic support indication?
Definition NimBLERemoteCharacteristic.cpp:341
-
NimBLERemoteDescriptor * getDescriptor(const NimBLEUUID &uuid) const
Get the descriptor instance with the given UUID that belongs to this characteristic.
Definition NimBLERemoteCharacteristic.cpp:140
-
std::string toString() const
Convert a NimBLERemoteCharacteristic to a string representation;.
Definition NimBLERemoteCharacteristic.cpp:365
-
bool subscribe(bool notifications=true, const notify_callback notifyCallback=nullptr, bool response=true) const
Subscribe for notifications or indications.
Definition NimBLERemoteCharacteristic.cpp:247
-
bool canNotify() const
Does the characteristic support reading with encryption?
Definition NimBLERemoteCharacteristic.cpp:333
-
bool canWriteSigned() const
Does the characteristic support signed writing?
Definition NimBLERemoteCharacteristic.cpp:349
-
bool hasExtendedProps() const
Does the characteristic support extended properties?
Definition NimBLERemoteCharacteristic.cpp:357
-
A model of remote BLE descriptor.
Definition NimBLERemoteDescriptor.h:32
-
A model of a remote BLE service.
Definition NimBLERemoteService.h:34
A model of a BLE UUID.
Definition NimBLEUUID.h:41
-
diff --git a/_nim_b_l_e_remote_descriptor_8h_source.html b/_nim_b_l_e_remote_descriptor_8h_source.html index 6902dcc..2bdbd21 100644 --- a/_nim_b_l_e_remote_descriptor_8h_source.html +++ b/_nim_b_l_e_remote_descriptor_8h_source.html @@ -25,7 +25,7 @@ -
esp-nimble-cpp 2.3.1 +
esp-nimble-cpp 2.3.2
@@ -117,39 +117,31 @@ $(document).ready(function(){initNavTree('_nim_b_l_e_remote_descriptor_8h_source
18#ifndef NIMBLE_CPP_REMOTE_DESCRIPTOR_H_
19#define NIMBLE_CPP_REMOTE_DESCRIPTOR_H_
20
-
21#include "nimconfig.h"
-
22#if CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_CENTRAL
+
21#include "syscfg/syscfg.h"
+
22#if CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_ROLE_CENTRAL)
23
24# include "NimBLERemoteValueAttribute.h"
25
- -
27class NimBLEClient;
+
26class NimBLERemoteCharacteristic;
+
27class NimBLEClient;
28
-
-
32class NimBLERemoteDescriptor : public NimBLERemoteValueAttribute {
+
32class NimBLERemoteDescriptor : public NimBLERemoteValueAttribute {
33 public:
- -
35 std::string toString(void) const;
-
36 NimBLEClient* getClient() const override;
+
34 NimBLERemoteCharacteristic* getRemoteCharacteristic() const;
+
35 std::string toString(void) const;
+
36 NimBLEClient* getClient() const override;
37
38 private:
-
39 friend class NimBLERemoteCharacteristic;
+
39 friend class NimBLERemoteCharacteristic;
40
-
41 NimBLERemoteDescriptor(const NimBLERemoteCharacteristic* pRemoteCharacteristic, const ble_gatt_dsc* dsc);
-
42 ~NimBLERemoteDescriptor() = default;
+
41 NimBLERemoteDescriptor(const NimBLERemoteCharacteristic* pRemoteCharacteristic, const ble_gatt_dsc* dsc);
+
42 ~NimBLERemoteDescriptor() = default;
43
-
44 const NimBLERemoteCharacteristic* m_pRemoteCharacteristic;
+
44 const NimBLERemoteCharacteristic* m_pRemoteCharacteristic;
45};
-
46
-
47#endif // CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_CENTRAL
+
47#endif // CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_ROLE_CENTRAL)
48#endif // NIMBLE_CPP_REMOTE_DESCRIPTOR_H_
-
A model of a BLE client.
Definition NimBLEClient.h:49
-
A model of a remote BLE characteristic.
Definition NimBLERemoteCharacteristic.h:36
-
A model of remote BLE descriptor.
Definition NimBLERemoteDescriptor.h:32
-
NimBLERemoteCharacteristic * getRemoteCharacteristic() const
Get the characteristic that owns this descriptor.
Definition NimBLERemoteDescriptor.cpp:37
-
std::string toString(void) const
Return a string representation of this Remote Descriptor.
Definition NimBLERemoteDescriptor.cpp:45
-
diff --git a/_nim_b_l_e_remote_service_8h_source.html b/_nim_b_l_e_remote_service_8h_source.html index 5f24c5e..697a655 100644 --- a/_nim_b_l_e_remote_service_8h_source.html +++ b/_nim_b_l_e_remote_service_8h_source.html @@ -25,7 +25,7 @@ -
esp-nimble-cpp 2.3.1 +
esp-nimble-cpp 2.3.2
@@ -117,39 +117,38 @@ $(document).ready(function(){initNavTree('_nim_b_l_e_remote_service_8h_source.ht
18#ifndef NIMBLE_CPP_REMOTE_SERVICE_H_
19#define NIMBLE_CPP_REMOTE_SERVICE_H_
20
-
21#include "nimconfig.h"
-
22#if CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_CENTRAL
+
21#include "syscfg/syscfg.h"
+
22#if CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_ROLE_CENTRAL)
23
24# include "NimBLEAttribute.h"
25# include <vector>
26
- -
28class NimBLEClient;
+
27class NimBLERemoteCharacteristic;
+
28class NimBLEClient;
29class NimBLEAttValue;
30
-
- +
34class NimBLERemoteService : public NimBLEAttribute {
35 public:
-
36 NimBLERemoteCharacteristic* getCharacteristic(const char* uuid) const;
- -
38 void deleteCharacteristics() const;
-
39 size_t deleteCharacteristic(const NimBLEUUID& uuid) const;
-
40 NimBLEClient* getClient(void) const;
-
41 NimBLEAttValue getValue(const NimBLEUUID& characteristicUuid) const;
-
42 bool setValue(const NimBLEUUID& characteristicUuid, const NimBLEAttValue& value) const;
-
43 std::string toString(void) const;
-
44 uint16_t getStartHandle() const { return getHandle(); }
+
36 NimBLERemoteCharacteristic* getCharacteristic(const char* uuid) const;
+
37 NimBLERemoteCharacteristic* getCharacteristic(const NimBLEUUID& uuid) const;
+
38 void deleteCharacteristics() const;
+
39 size_t deleteCharacteristic(const NimBLEUUID& uuid) const;
+
40 NimBLEClient* getClient(void) const;
+
41 NimBLEAttValue getValue(const NimBLEUUID& characteristicUuid) const;
+
42 bool setValue(const NimBLEUUID& characteristicUuid, const NimBLEAttValue& value) const;
+
43 std::string toString(void) const;
+
44 uint16_t getStartHandle() const { return getHandle(); }
45 uint16_t getEndHandle() const { return m_endHandle; }
46
-
47 const std::vector<NimBLERemoteCharacteristic*>& getCharacteristics(bool refresh = false) const;
-
48 std::vector<NimBLERemoteCharacteristic*>::iterator begin() const;
-
49 std::vector<NimBLERemoteCharacteristic*>::iterator end() const;
+
47 const std::vector<NimBLERemoteCharacteristic*>& getCharacteristics(bool refresh = false) const;
+
48 std::vector<NimBLERemoteCharacteristic*>::iterator begin() const;
+
49 std::vector<NimBLERemoteCharacteristic*>::iterator end() const;
50
51 private:
-
52 friend class NimBLEClient;
+
52 friend class NimBLEClient;
53
-
54 NimBLERemoteService(NimBLEClient* pClient, const struct ble_gatt_svc* service);
- +
54 NimBLERemoteService(NimBLEClient* pClient, const struct ble_gatt_svc* service);
+
55 ~NimBLERemoteService();
56 bool retrieveCharacteristics(const NimBLEUUID* uuidFilter = nullptr) const;
57 static int characteristicDiscCB(uint16_t conn_handle,
58 const struct ble_gatt_error* error,
@@ -157,31 +156,14 @@ $(document).ready(function(){initNavTree('_nim_b_l_e_remote_service_8h_source.ht
60 void* arg);
61
62 mutable std::vector<NimBLERemoteCharacteristic*> m_vChars{};
-
63 NimBLEClient* m_pClient{nullptr};
+
63 NimBLEClient* m_pClient{nullptr};
64 uint16_t m_endHandle{0};
65}; // NimBLERemoteService
-
66
-
67#endif // CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_CENTRAL
+
67#endif // CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_ROLE_CENTRAL)
68#endif // NIMBLE_CPP_REMOTE_SERVICE_H_
A specialized container class to hold BLE attribute values.
Definition NimBLEAttValue.h:72
-
A base class for BLE attributes.
Definition NimBLEAttribute.h:29
-
uint16_t getHandle() const
Get the handle of the attribute.
Definition NimBLEAttribute.h:40
-
A model of a BLE client.
Definition NimBLEClient.h:49
-
A model of a remote BLE characteristic.
Definition NimBLERemoteCharacteristic.h:36
-
A model of a remote BLE service.
Definition NimBLERemoteService.h:34
-
bool setValue(const NimBLEUUID &characteristicUuid, const NimBLEAttValue &value) const
Set the value of a characteristic.
Definition NimBLERemoteService.cpp:246
-
NimBLEClient * getClient(void) const
Get the client associated with this service.
Definition NimBLERemoteService.cpp:222
-
std::string toString(void) const
Create a string representation of this remote service.
Definition NimBLERemoteService.cpp:289
-
std::vector< NimBLERemoteCharacteristic * >::iterator end() const
Get iterator to the end of the vector of remote characteristic pointers.
Definition NimBLERemoteService.cpp:58
-
const std::vector< NimBLERemoteCharacteristic * > & getCharacteristics(bool refresh=false) const
Get a pointer to the vector of found characteristics.
Definition NimBLERemoteService.cpp:132
-
void deleteCharacteristics() const
Delete the characteristics in the characteristics vector.
Definition NimBLERemoteService.cpp:261
-
size_t deleteCharacteristic(const NimBLEUUID &uuid) const
Delete characteristic by UUID.
Definition NimBLERemoteService.cpp:273
-
std::vector< NimBLERemoteCharacteristic * >::iterator begin() const
Get iterator to the beginning of the vector of remote characteristic pointers.
Definition NimBLERemoteService.cpp:50
-
NimBLEAttValue getValue(const NimBLEUUID &characteristicUuid) const
Read the value of a characteristic associated with this service.
Definition NimBLERemoteService.cpp:231
-
NimBLERemoteCharacteristic * getCharacteristic(const char *uuid) const
Get the remote characteristic object for the characteristic UUID.
Definition NimBLERemoteService.cpp:67
A model of a BLE UUID.
Definition NimBLEUUID.h:41
-
diff --git a/_nim_b_l_e_remote_value_attribute_8h_source.html b/_nim_b_l_e_remote_value_attribute_8h_source.html index 13f237a..b2d206f 100644 --- a/_nim_b_l_e_remote_value_attribute_8h_source.html +++ b/_nim_b_l_e_remote_value_attribute_8h_source.html @@ -25,7 +25,7 @@ -
esp-nimble-cpp 2.3.1 +
esp-nimble-cpp 2.3.2
@@ -117,8 +117,8 @@ $(document).ready(function(){initNavTree('_nim_b_l_e_remote_value_attribute_8h_s
18#ifndef NIMBLE_CPP_REMOTE_VALUE_ATTRIBUTE_H_
19#define NIMBLE_CPP_REMOTE_VALUE_ATTRIBUTE_H_
20
-
21#include "nimconfig.h"
-
22#if CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_CENTRAL
+
21#include "syscfg/syscfg.h"
+
22#if CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_ROLE_CENTRAL)
23
24# if defined(CONFIG_NIMBLE_CPP_IDF)
25# include <host/ble_gatt.h>
@@ -134,13 +134,13 @@ $(document).ready(function(){initNavTree('_nim_b_l_e_remote_value_attribute_8h_s
35# include "NimBLEValueAttribute.h"
36# include "NimBLEAttValue.h"
37
-
38class NimBLEClient;
+
38class NimBLEClient;
39
-
40class NimBLERemoteValueAttribute : public NimBLEValueAttribute, public NimBLEAttribute {
+
40class NimBLERemoteValueAttribute : public NimBLEValueAttribute, public NimBLEAttribute {
41 public:
47 NimBLEAttValue readValue(time_t* timestamp = nullptr);
48
-
52 virtual NimBLEClient* getClient() const = 0;
+
52 virtual NimBLEClient* getClient() const = 0;
53
61 bool writeValue(const uint8_t* data, size_t length, bool response = false) const;
62
@@ -199,7 +199,7 @@ $(document).ready(function(){initNavTree('_nim_b_l_e_remote_value_attribute_8h_s
156 }
157
158 protected:
-
162 NimBLERemoteValueAttribute(const ble_uuid_any_t& uuid, uint16_t handle) : NimBLEAttribute{uuid, handle} {}
+
162 NimBLERemoteValueAttribute(const ble_uuid_any_t& uuid, uint16_t handle) : NimBLEAttribute{uuid, handle} {}
163
167 virtual ~NimBLERemoteValueAttribute() = default;
168
@@ -207,12 +207,9 @@ $(document).ready(function(){initNavTree('_nim_b_l_e_remote_value_attribute_8h_s
170 static int onWriteCB(uint16_t conn_handle, const ble_gatt_error* error, ble_gatt_attr* attr, void* arg);
171};
172
-
173#endif // CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_CENTRAL
+
173#endif // CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_ROLE_CENTRAL)
174#endif // NIMBLE_CPP_REMOTE_VALUE_ATTRIBUTE_H_
A specialized container class to hold BLE attribute values.
Definition NimBLEAttValue.h:72
-
A base class for BLE attributes.
Definition NimBLEAttribute.h:29
-
A model of a BLE client.
Definition NimBLEClient.h:49
-
diff --git a/_nim_b_l_e_scan_8h_source.html b/_nim_b_l_e_scan_8h_source.html index 0dee68b..9c88f32 100644 --- a/_nim_b_l_e_scan_8h_source.html +++ b/_nim_b_l_e_scan_8h_source.html @@ -25,7 +25,7 @@ -
esp-nimble-cpp 2.3.1 +
esp-nimble-cpp 2.3.2
@@ -117,8 +117,8 @@ $(document).ready(function(){initNavTree('_nim_b_l_e_scan_8h_source.html',''); i
18#ifndef NIMBLE_CPP_SCAN_H_
19#define NIMBLE_CPP_SCAN_H_
20
-
21#include "nimconfig.h"
-
22#if CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_OBSERVER
+
21#include "syscfg/syscfg.h"
+
22#if CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_ROLE_OBSERVER)
23
24# include "NimBLEAdvertisedDevice.h"
25# include "NimBLEUtils.h"
@@ -132,121 +132,86 @@ $(document).ready(function(){initNavTree('_nim_b_l_e_scan_8h_source.html',''); i
33# include <vector>
34
35class NimBLEDevice;
-
36class NimBLEScan;
- - +
36class NimBLEScan;
+
37class NimBLEAdvertisedDevice;
+
38class NimBLEScanCallbacks;
39class NimBLEAddress;
40
-
- +
48class NimBLEScanResults {
49 public:
-
50 void dump() const;
-
51 int getCount() const;
-
52 const NimBLEAdvertisedDevice* getDevice(uint32_t idx) const;
-
53 const NimBLEAdvertisedDevice* getDevice(const NimBLEAddress& address) const;
-
54 std::vector<NimBLEAdvertisedDevice*>::const_iterator begin() const;
-
55 std::vector<NimBLEAdvertisedDevice*>::const_iterator end() const;
+
50 void dump() const;
+
51 int getCount() const;
+
52 const NimBLEAdvertisedDevice* getDevice(uint32_t idx) const;
+
53 const NimBLEAdvertisedDevice* getDevice(const NimBLEAddress& address) const;
+
54 std::vector<NimBLEAdvertisedDevice*>::const_iterator begin() const;
+
55 std::vector<NimBLEAdvertisedDevice*>::const_iterator end() const;
56
57 private:
-
58 friend NimBLEScan;
+
58 friend NimBLEScan;
59 std::vector<NimBLEAdvertisedDevice*> m_deviceVec;
60};
-
61
-
- +
67class NimBLEScan {
68 public:
-
69 bool start(uint32_t duration, bool isContinue = false, bool restart = true);
-
70 bool isScanning();
-
71 void setScanCallbacks(NimBLEScanCallbacks* pScanCallbacks, bool wantDuplicates = false);
-
72 void setActiveScan(bool active);
-
73 void setInterval(uint16_t intervalMs);
-
74 void setWindow(uint16_t windowMs);
-
75 void setDuplicateFilter(uint8_t enabled);
-
76 void setLimitedOnly(bool enabled);
-
77 void setFilterPolicy(uint8_t filter);
-
78 bool stop();
-
79 void clearResults();
- -
81 NimBLEScanResults getResults(uint32_t duration, bool is_continue = false);
-
82 void setMaxResults(uint8_t maxResults);
-
83 void erase(const NimBLEAddress& address);
-
84 void erase(const NimBLEAdvertisedDevice* device);
+
69 bool start(uint32_t duration, bool isContinue = false, bool restart = true);
+
70 bool isScanning();
+
71 void setScanCallbacks(NimBLEScanCallbacks* pScanCallbacks, bool wantDuplicates = false);
+
72 void setActiveScan(bool active);
+
73 void setInterval(uint16_t intervalMs);
+
74 void setWindow(uint16_t windowMs);
+
75 void setDuplicateFilter(uint8_t enabled);
+
76 void setLimitedOnly(bool enabled);
+
77 void setFilterPolicy(uint8_t filter);
+
78 bool stop();
+
79 void clearResults();
+
80 NimBLEScanResults getResults();
+
81 NimBLEScanResults getResults(uint32_t duration, bool is_continue = false);
+
82 void setMaxResults(uint8_t maxResults);
+
83 void erase(const NimBLEAddress& address);
+
84 void erase(const NimBLEAdvertisedDevice* device);
85
-
86# if CONFIG_BT_NIMBLE_EXT_ADV
+
86# if MYNEWT_VAL(BLE_EXT_ADV)
87 enum Phy { SCAN_1M = 0x01, SCAN_CODED = 0x02, SCAN_ALL = 0x03 };
-
88 void setPhy(Phy phyMask);
-
89 void setPeriod(uint32_t periodMs);
+
88 void setPhy(Phy phyMask);
+
89 void setPeriod(uint32_t periodMs);
90# endif
91
92 private:
93 friend class NimBLEDevice;
94
-
95 NimBLEScan();
- +
95 NimBLEScan();
+
96 ~NimBLEScan();
97 static int handleGapEvent(ble_gap_event* event, void* arg);
98 void onHostSync();
99
-
100 NimBLEScanCallbacks* m_pScanCallbacks;
+
100 NimBLEScanCallbacks* m_pScanCallbacks;
101 ble_gap_disc_params m_scanParams;
-
102 NimBLEScanResults m_scanResults;
+
102 NimBLEScanResults m_scanResults;
103 NimBLETaskData* m_pTaskData;
104 uint8_t m_maxResults;
105
-
106# if CONFIG_BT_NIMBLE_EXT_ADV
+
106# if MYNEWT_VAL(BLE_EXT_ADV)
107 uint8_t m_phy{SCAN_ALL};
108 uint16_t m_period{0};
109# endif
110};
-
111
-
- +
115class NimBLEScanCallbacks {
116 public:
-
117 virtual ~NimBLEScanCallbacks() {}
+
117 virtual ~NimBLEScanCallbacks() {}
118
-
123 virtual void onDiscovered(const NimBLEAdvertisedDevice* advertisedDevice);
+
123 virtual void onDiscovered(const NimBLEAdvertisedDevice* advertisedDevice);
124
-
129 virtual void onResult(const NimBLEAdvertisedDevice* advertisedDevice);
+
129 virtual void onResult(const NimBLEAdvertisedDevice* advertisedDevice);
130
-
136 virtual void onScanEnd(const NimBLEScanResults& scanResults, int reason);
+
136 virtual void onScanEnd(const NimBLEScanResults& scanResults, int reason);
137};
-
138
-
139#endif // CONFIG_BT_ENABLED CONFIG_BT_NIMBLE_ROLE_OBSERVER
+
139#endif // CONFIG_BT_NIMBLE_ENABLED MYNEWT_VAL(BLE_ROLE_OBSERVER)
140#endif // NIMBLE_CPP_SCAN_H_
A BLE device address.
Definition NimBLEAddress.h:42
-
A representation of a BLE advertised device found by a scan.
Definition NimBLEAdvertisedDevice.h:45
-
A model of a BLE Device from which all the BLE roles are created.
Definition NimBLEDevice.h:122
-
A callback handler for callbacks associated device scanning.
Definition NimBLEScan.h:115
-
virtual void onDiscovered(const NimBLEAdvertisedDevice *advertisedDevice)
Called when a new device is discovered, before the scan result is received (if applicable).
Definition NimBLEScan.cpp:551
-
virtual void onScanEnd(const NimBLEScanResults &scanResults, int reason)
Called when a scan operation ends.
Definition NimBLEScan.cpp:559
-
virtual void onResult(const NimBLEAdvertisedDevice *advertisedDevice)
Called when a new scan result is complete, including scan response data (if applicable).
Definition NimBLEScan.cpp:555
-
Perform and manage BLE scans.
Definition NimBLEScan.h:67
-
void setWindow(uint16_t windowMs)
Set the window to actively scan.
Definition NimBLEScan.cpp:263
-
void setPhy(Phy phyMask)
Set the PHYs to scan.
Definition NimBLEScan.cpp:282
-
NimBLEScanResults getResults()
Get the results of the scan.
Definition NimBLEScan.cpp:469
-
void setScanCallbacks(NimBLEScanCallbacks *pScanCallbacks, bool wantDuplicates=false)
Set the call backs to be invoked.
Definition NimBLEScan.cpp:240
-
void setFilterPolicy(uint8_t filter)
Sets the scan filter policy.
Definition NimBLEScan.cpp:222
-
void setInterval(uint16_t intervalMs)
Set the interval to scan.
Definition NimBLEScan.cpp:255
-
void erase(const NimBLEAddress &address)
Delete peer device from the scan results vector.
Definition NimBLEScan.cpp:404
-
bool stop()
Stop an in progress scan.
Definition NimBLEScan.cpp:379
-
void setLimitedOnly(bool enabled)
Set whether or not the BLE controller only reports scan results from devices advertising in limited d...
Definition NimBLEScan.cpp:200
-
void setActiveScan(bool active)
Should we perform an active or passive scan? The default is a passive scan. An active scan means that...
Definition NimBLEScan.cpp:177
-
void setPeriod(uint32_t periodMs)
Set the extended scanning period.
Definition NimBLEScan.cpp:293
-
void setDuplicateFilter(uint8_t enabled)
Set whether or not the BLE controller should only report results from devices it has not already seen...
Definition NimBLEScan.cpp:191
-
void setMaxResults(uint8_t maxResults)
Sets the max number of results to store.
Definition NimBLEScan.cpp:231
-
bool isScanning()
Get the status of the scanner.
Definition NimBLEScan.cpp:271
-
bool start(uint32_t duration, bool isContinue=false, bool restart=true)
Start scanning.
Definition NimBLEScan.cpp:306
-
void clearResults()
Clear the stored results of the scan.
Definition NimBLEScan.cpp:476
-
A class that contains and operates on the results of a BLE scan.
Definition NimBLEScan.h:48
-
std::vector< NimBLEAdvertisedDevice * >::const_iterator end() const
Get iterator to the end of the vector of advertised device pointers.
Definition NimBLEScan.cpp:529
-
int getCount() const
Get the count of devices found in the last scan.
Definition NimBLEScan.cpp:503
-
std::vector< NimBLEAdvertisedDevice * >::const_iterator begin() const
Get iterator to the beginning of the vector of advertised device pointers.
Definition NimBLEScan.cpp:521
-
const NimBLEAdvertisedDevice * getDevice(uint32_t idx) const
Return the specified device at the given index. The index should be between 0 and getCount()-1.
Definition NimBLEScan.cpp:513
-
void dump() const
Dump the scan results to the log.
Definition NimBLEScan.cpp:491
- -
A structure to hold data for a task that is waiting for a response.
Definition NimBLEUtils.h:33
+
A model of a BLE Device from which all the BLE roles are created.
Definition NimBLEDevice.h:116
+
A structure to hold data for a task that is waiting for a response.
Definition NimBLEUtils.h:45
diff --git a/_nim_b_l_e_server_8h_source.html b/_nim_b_l_e_server_8h_source.html index 0c6d3c4..6a50581 100644 --- a/_nim_b_l_e_server_8h_source.html +++ b/_nim_b_l_e_server_8h_source.html @@ -25,7 +25,7 @@ -
esp-nimble-cpp 2.3.1 +
esp-nimble-cpp 2.3.2
@@ -117,8 +117,8 @@ $(document).ready(function(){initNavTree('_nim_b_l_e_server_8h_source.html','');
18#ifndef NIMBLE_CPP_SERVER_H_
19#define NIMBLE_CPP_SERVER_H_
20
-
21#include "nimconfig.h"
-
22#if CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_PERIPHERAL
+
21#include "syscfg/syscfg.h"
+
22#if CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_ROLE_PERIPHERAL)
23
24# if defined(CONFIG_NIMBLE_CPP_IDF)
25# include "host/ble_gap.h"
@@ -137,97 +137,96 @@ $(document).ready(function(){initNavTree('_nim_b_l_e_server_8h_source.html','');
38# define NIMBLE_ATT_REMOVE_HIDE 1
39# define NIMBLE_ATT_REMOVE_DELETE 2
40
-
41class NimBLEService;
- +
41class NimBLEService;
+
42class NimBLEServerCallbacks;
43class NimBLEUUID;
44class NimBLEConnInfo;
45class NimBLEAddress;
-
46class NimBLEService;
- -
48# if CONFIG_BT_NIMBLE_ROLE_BROADCASTER
-
49# if CONFIG_BT_NIMBLE_EXT_ADV
- +
46class NimBLEService;
+
47class NimBLECharacteristic;
+
48# if MYNEWT_VAL(BLE_ROLE_BROADCASTER)
+
49# if MYNEWT_VAL(BLE_EXT_ADV)
+
50class NimBLEExtAdvertising;
51# else
53# endif
54# endif
-
55# if CONFIG_BT_NIMBLE_ROLE_CENTRAL
-
56class NimBLEClient;
+
55# if MYNEWT_VAL(BLE_ROLE_CENTRAL)
+
56class NimBLEClient;
57# endif
58
-
- +
62class NimBLEServer {
63 public:
-
64 void start();
-
65 uint8_t getConnectedCount() const;
-
66 bool disconnect(uint16_t connHandle, uint8_t reason = BLE_ERR_REM_USER_CONN_TERM) const;
-
67 bool disconnect(const NimBLEConnInfo& connInfo, uint8_t reason = BLE_ERR_REM_USER_CONN_TERM) const;
-
68 void setCallbacks(NimBLEServerCallbacks* pCallbacks, bool deleteCallbacks = true);
-
69 void updateConnParams(uint16_t connHandle, uint16_t minInterval, uint16_t maxInterval, uint16_t latency, uint16_t timeout) const;
-
70 NimBLEService* createService(const char* uuid);
- -
72 NimBLEService* getServiceByUUID(const char* uuid, uint16_t instanceId = 0) const;
-
73 NimBLEService* getServiceByUUID(const NimBLEUUID& uuid, uint16_t instanceId = 0) const;
-
74 NimBLEService* getServiceByHandle(uint16_t handle) const;
-
75 void removeService(NimBLEService* service, bool deleteSvc = false);
-
76 void addService(NimBLEService* service);
-
77 uint16_t getPeerMTU(uint16_t connHandle) const;
-
78 std::vector<uint16_t> getPeerDevices() const;
-
79 NimBLEConnInfo getPeerInfo(uint8_t index) const;
-
80 NimBLEConnInfo getPeerInfo(const NimBLEAddress& address) const;
-
81 NimBLEConnInfo getPeerInfoByHandle(uint16_t connHandle) const;
-
82 void advertiseOnDisconnect(bool enable);
-
83 void setDataLen(uint16_t connHandle, uint16_t tx_octets) const;
-
84 bool updatePhy(uint16_t connHandle, uint8_t txPhysMask, uint8_t rxPhysMask, uint16_t phyOptions);
-
85 bool getPhy(uint16_t connHandle, uint8_t* txPhy, uint8_t* rxPhy);
+
64 void start();
+
65 uint8_t getConnectedCount() const;
+
66 bool disconnect(uint16_t connHandle, uint8_t reason = BLE_ERR_REM_USER_CONN_TERM) const;
+
67 bool disconnect(const NimBLEConnInfo& connInfo, uint8_t reason = BLE_ERR_REM_USER_CONN_TERM) const;
+
68 void setCallbacks(NimBLEServerCallbacks* pCallbacks, bool deleteCallbacks = true);
+
69 void updateConnParams(uint16_t connHandle, uint16_t minInterval, uint16_t maxInterval, uint16_t latency, uint16_t timeout) const;
+
70 NimBLEService* createService(const char* uuid);
+
71 NimBLEService* createService(const NimBLEUUID& uuid);
+
72 NimBLEService* getServiceByUUID(const char* uuid, uint16_t instanceId = 0) const;
+
73 NimBLEService* getServiceByUUID(const NimBLEUUID& uuid, uint16_t instanceId = 0) const;
+
74 NimBLEService* getServiceByHandle(uint16_t handle) const;
+
75 void removeService(NimBLEService* service, bool deleteSvc = false);
+
76 void addService(NimBLEService* service);
+
77 uint16_t getPeerMTU(uint16_t connHandle) const;
+
78 std::vector<uint16_t> getPeerDevices() const;
+
79 NimBLEConnInfo getPeerInfo(uint8_t index) const;
+
80 NimBLEConnInfo getPeerInfo(const NimBLEAddress& address) const;
+
81 NimBLEConnInfo getPeerInfoByHandle(uint16_t connHandle) const;
+
82 void advertiseOnDisconnect(bool enable);
+
83 void setDataLen(uint16_t connHandle, uint16_t tx_octets) const;
+
84 bool updatePhy(uint16_t connHandle, uint8_t txPhysMask, uint8_t rxPhysMask, uint16_t phyOptions);
+
85 bool getPhy(uint16_t connHandle, uint8_t* txPhy, uint8_t* rxPhy);
86
-
87# if CONFIG_BT_NIMBLE_ROLE_CENTRAL
-
88 NimBLEClient* getClient(uint16_t connHandle);
-
89 NimBLEClient* getClient(const NimBLEConnInfo& connInfo);
-
90 void deleteClient();
+
87# if MYNEWT_VAL(BLE_ROLE_CENTRAL)
+
88 NimBLEClient* getClient(uint16_t connHandle);
+
89 NimBLEClient* getClient(const NimBLEConnInfo& connInfo);
+
90 void deleteClient();
91# endif
92
-
93# if CONFIG_BT_NIMBLE_ROLE_BROADCASTER
-
94# if CONFIG_BT_NIMBLE_EXT_ADV
- -
96 bool startAdvertising(uint8_t instanceId, int duration = 0, int maxEvents = 0) const;
-
97 bool stopAdvertising(uint8_t instanceId) const;
+
93# if MYNEWT_VAL(BLE_ROLE_BROADCASTER)
+
94# if MYNEWT_VAL(BLE_EXT_ADV)
+
95 NimBLEExtAdvertising* getAdvertising() const;
+
96 bool startAdvertising(uint8_t instanceId, int duration = 0, int maxEvents = 0) const;
+
97 bool stopAdvertising(uint8_t instanceId) const;
98# endif
99
-
100# if !CONFIG_BT_NIMBLE_EXT_ADV || defined(_DOXYGEN_)
- -
102 bool startAdvertising(uint32_t duration = 0) const;
-
103 bool stopAdvertising() const;
+
100# if !MYNEWT_VAL(BLE_EXT_ADV) || defined(_DOXYGEN_)
+
101 NimBLEAdvertising* getAdvertising() const;
+
102 bool startAdvertising(uint32_t duration = 0) const;
+
103 bool stopAdvertising() const;
104# endif
105# endif
106
107 private:
108 friend class NimBLEDevice;
-
109 friend class NimBLEService;
-
110 friend class NimBLECharacteristic;
-
111# if CONFIG_BT_NIMBLE_ROLE_BROADCASTER
-
112# if CONFIG_BT_NIMBLE_EXT_ADV
-
113 friend class NimBLEExtAdvertising;
+
109 friend class NimBLEService;
+
110 friend class NimBLECharacteristic;
+
111# if MYNEWT_VAL(BLE_ROLE_BROADCASTER)
+
112# if MYNEWT_VAL(BLE_EXT_ADV)
+
113 friend class NimBLEExtAdvertising;
114# else
115 friend class NimBLEAdvertising;
116# endif
117# endif
118
-
119 NimBLEServer();
- +
119 NimBLEServer();
+
120 ~NimBLEServer();
121
122 bool m_gattsStarted : 1;
123 bool m_svcChanged : 1;
124 bool m_deleteCallbacks : 1;
-
125# if !CONFIG_BT_NIMBLE_EXT_ADV
+
125# if !MYNEWT_VAL(BLE_EXT_ADV)
126 bool m_advertiseOnDisconnect : 1;
127# endif
-
128 NimBLEServerCallbacks* m_pServerCallbacks;
+
128 NimBLEServerCallbacks* m_pServerCallbacks;
129 std::vector<NimBLEService*> m_svcVec;
-
130 std::array<uint16_t, CONFIG_BT_NIMBLE_MAX_CONNECTIONS> m_connectedPeers;
+
130 std::array<uint16_t, MYNEWT_VAL(BLE_MAX_CONNECTIONS)> m_connectedPeers;
131
-
132# if CONFIG_BT_NIMBLE_ROLE_CENTRAL
-
133 NimBLEClient* m_pClient{nullptr};
+
132# if MYNEWT_VAL(BLE_ROLE_CENTRAL)
+
133 NimBLEClient* m_pClient{nullptr};
134# endif
135
136 static int handleGapEvent(struct ble_gap_event* event, void* arg);
@@ -236,79 +235,37 @@ $(document).ready(function(){initNavTree('_nim_b_l_e_server_8h_source.html','');
139 void resetGATT();
140
141}; // NimBLEServer
-
142
-
- +
146class NimBLEServerCallbacks {
147 public:
-
148 virtual ~NimBLEServerCallbacks() {};
+
148 virtual ~NimBLEServerCallbacks() {};
149
-
157 virtual void onConnect(NimBLEServer* pServer, NimBLEConnInfo& connInfo);
+
157 virtual void onConnect(NimBLEServer* pServer, NimBLEConnInfo& connInfo);
158
-
167 virtual void onDisconnect(NimBLEServer* pServer, NimBLEConnInfo& connInfo, int reason);
+
167 virtual void onDisconnect(NimBLEServer* pServer, NimBLEConnInfo& connInfo, int reason);
168
-
175 virtual void onMTUChange(uint16_t MTU, NimBLEConnInfo& connInfo);
+
175 virtual void onMTUChange(uint16_t MTU, NimBLEConnInfo& connInfo);
176
-
181 virtual uint32_t onPassKeyDisplay();
+
181 virtual uint32_t onPassKeyDisplay();
182
-
189 virtual void onConfirmPassKey(NimBLEConnInfo& connInfo, uint32_t pin);
+
189 virtual void onConfirmPassKey(NimBLEConnInfo& connInfo, uint32_t pin);
190
-
196 virtual void onAuthenticationComplete(NimBLEConnInfo& connInfo);
+
196 virtual void onAuthenticationComplete(NimBLEConnInfo& connInfo);
197
-
202 virtual void onIdentity(NimBLEConnInfo& connInfo);
+
202 virtual void onIdentity(NimBLEConnInfo& connInfo);
203
-
210 virtual void onConnParamsUpdate(NimBLEConnInfo& connInfo);
+
210 virtual void onConnParamsUpdate(NimBLEConnInfo& connInfo);
211
-
223 virtual void onPhyUpdate(NimBLEConnInfo& connInfo, uint8_t txPhy, uint8_t rxPhy);
+
223 virtual void onPhyUpdate(NimBLEConnInfo& connInfo, uint8_t txPhy, uint8_t rxPhy);
224}; // NimBLEServerCallbacks
-
225
-
226#endif // CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_PERIPHERAL
+
226#endif // CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_ROLE_PERIPHERAL)
227#endif // NIMBLE_CPP_SERVER_H_
A BLE device address.
Definition NimBLEAddress.h:42
Perform and manage BLE advertising.
Definition NimBLEAdvertising.h:51
-
The model of a BLE Characteristic.
Definition NimBLECharacteristic.h:41
-
A model of a BLE client.
Definition NimBLEClient.h:49
Connection information.
Definition NimBLEConnInfo.h:32
-
A model of a BLE Device from which all the BLE roles are created.
Definition NimBLEDevice.h:122
-
Extended advertising class.
Definition NimBLEExtAdvertising.h:110
-
Callbacks associated with the operation of a BLE server.
Definition NimBLEServer.h:146
-
virtual void onConnect(NimBLEServer *pServer, NimBLEConnInfo &connInfo)
Handle a client connection. This is called when a client connects.
Definition NimBLEServer.cpp:990
-
virtual uint32_t onPassKeyDisplay()
Called when a client requests a passkey for pairing (display).
Definition NimBLEServer.cpp:1002
-
virtual void onDisconnect(NimBLEServer *pServer, NimBLEConnInfo &connInfo, int reason)
Handle a client disconnection. This is called when a client disconnects.
Definition NimBLEServer.cpp:994
-
virtual void onConfirmPassKey(NimBLEConnInfo &connInfo, uint32_t pin)
Called when using numeric comparision for pairing.
Definition NimBLEServer.cpp:1007
-
virtual void onPhyUpdate(NimBLEConnInfo &connInfo, uint8_t txPhy, uint8_t rxPhy)
Called when the PHY update procedure is complete.
Definition NimBLEServer.cpp:1024
-
virtual void onAuthenticationComplete(NimBLEConnInfo &connInfo)
Called when the pairing procedure is complete.
Definition NimBLEServer.cpp:1016
-
virtual void onConnParamsUpdate(NimBLEConnInfo &connInfo)
Called when connection parameters are updated following a request to update via NimBLEServer::updateC...
Definition NimBLEServer.cpp:1020
-
virtual void onMTUChange(uint16_t MTU, NimBLEConnInfo &connInfo)
Called when the connection MTU changes.
Definition NimBLEServer.cpp:998
-
virtual void onIdentity(NimBLEConnInfo &connInfo)
Called when the peer identity address is resolved.
Definition NimBLEServer.cpp:1012
-
The model of a BLE server.
Definition NimBLEServer.h:62
-
void removeService(NimBLEService *service, bool deleteSvc=false)
Remove a service from the server.
Definition NimBLEServer.cpp:708
-
NimBLEConnInfo getPeerInfoByHandle(uint16_t connHandle) const
Get the connection information of a connected peer by connection handle.
Definition NimBLEServer.cpp:336
-
NimBLEService * getServiceByHandle(uint16_t handle) const
Get a BLE Service by its handle.
Definition NimBLEServer.cpp:136
-
NimBLEConnInfo getPeerInfo(uint8_t index) const
Get the connection information of a connected peer by vector index.
Definition NimBLEServer.cpp:298
-
std::vector< uint16_t > getPeerDevices() const
Get a vector of the connected client handles.
Definition NimBLEServer.cpp:282
-
bool stopAdvertising() const
Stop advertising.
Definition NimBLEServer.cpp:880
-
NimBLEService * getServiceByUUID(const char *uuid, uint16_t instanceId=0) const
Get a BLE Service by its UUID.
Definition NimBLEServer.cpp:107
-
NimBLEClient * getClient(uint16_t connHandle)
Create a client instance from the connection handle.
Definition NimBLEServer.cpp:949
-
uint16_t getPeerMTU(uint16_t connHandle) const
Get the MTU value of a client connection.
Definition NimBLEServer.cpp:890
-
uint8_t getConnectedCount() const
Return the number of connected clients.
Definition NimBLEServer.cpp:267
-
void setCallbacks(NimBLEServerCallbacks *pCallbacks, bool deleteCallbacks=true)
Set the server callbacks.
Definition NimBLEServer.cpp:680
-
void updateConnParams(uint16_t connHandle, uint16_t minInterval, uint16_t maxInterval, uint16_t latency, uint16_t timeout) const
Request an Update the connection parameters:
Definition NimBLEServer.cpp:903
-
void addService(NimBLEService *service)
Adds a service which was either already created but removed from availability, or created and later a...
Definition NimBLEServer.cpp:745
-
bool getPhy(uint16_t connHandle, uint8_t *txPhy, uint8_t *rxPhy)
Get the PHY used for a peer connection.
Definition NimBLEServer.cpp:830
-
NimBLEExtAdvertising * getAdvertising() const
Retrieve the advertising object that can be used to advertise the existence of the server.
Definition NimBLEServer.cpp:151
-
void deleteClient()
Delete the NimBLEClient instance that was created with getClient()
Definition NimBLEServer.cpp:981
-
NimBLEService * createService(const char *uuid)
Create a BLE Service.
Definition NimBLEServer.cpp:84
-
bool startAdvertising(uint8_t instanceId, int duration=0, int maxEvents=0) const
Start advertising.
Definition NimBLEServer.cpp:849
-
bool updatePhy(uint16_t connHandle, uint8_t txPhysMask, uint8_t rxPhysMask, uint16_t phyOptions)
Request an update to the PHY used for a peer connection.
Definition NimBLEServer.cpp:814
-
bool disconnect(uint16_t connHandle, uint8_t reason=BLE_ERR_REM_USER_CONN_TERM) const
Disconnect the specified client with optional reason.
Definition NimBLEServer.cpp:233
-
void start()
Start the GATT server.
Definition NimBLEServer.cpp:181
-
void advertiseOnDisconnect(bool enable)
Set the server to automatically start advertising when a client disconnects.
Definition NimBLEServer.cpp:258
-
void setDataLen(uint16_t connHandle, uint16_t tx_octets) const
Request an update of the data packet length.
Definition NimBLEServer.cpp:927
-
The model of a BLE service.
Definition NimBLEService.h:34
+
A model of a BLE Device from which all the BLE roles are created.
Definition NimBLEDevice.h:116
A model of a BLE UUID.
Definition NimBLEUUID.h:41
-
diff --git a/_nim_b_l_e_service_8h_source.html b/_nim_b_l_e_service_8h_source.html index 9a6f4c9..6972e61 100644 --- a/_nim_b_l_e_service_8h_source.html +++ b/_nim_b_l_e_service_8h_source.html @@ -25,7 +25,7 @@ -
esp-nimble-cpp 2.3.1 +
esp-nimble-cpp 2.3.2
@@ -117,46 +117,45 @@ $(document).ready(function(){initNavTree('_nim_b_l_e_service_8h_source.html','')
18#ifndef NIMBLE_CPP_SERVICE_H_
19#define NIMBLE_CPP_SERVICE_H_
20
-
21#include "nimconfig.h"
-
22#if CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_PERIPHERAL
+
21#include "syscfg/syscfg.h"
+
22#if CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_ROLE_PERIPHERAL)
23
-
24class NimBLEService;
+
24class NimBLEService;
25
26# include "NimBLEAttribute.h"
27# include "NimBLEServer.h"
28# include "NimBLECharacteristic.h"
29
-
- +
34class NimBLEService : public NimBLELocalAttribute {
35 public:
-
36 NimBLEService(const char* uuid);
-
37 NimBLEService(const NimBLEUUID& uuid);
- +
36 NimBLEService(const char* uuid);
+
37 NimBLEService(const NimBLEUUID& uuid);
+
38 ~NimBLEService();
39
-
40 NimBLEServer* getServer() const;
-
41 std::string toString() const;
-
42 void dump() const;
-
43 bool isStarted() const;
-
44 bool start();
- +
40 NimBLEServer* getServer() const;
+
41 std::string toString() const;
+
42 void dump() const;
+
43 bool isStarted() const;
+
44 bool start();
+
45 NimBLECharacteristic* createCharacteristic(const char* uuid,
46 uint32_t properties = NIMBLE_PROPERTY::READ | NIMBLE_PROPERTY::WRITE,
47 uint16_t max_len = BLE_ATT_ATTR_MAX_LEN);
48
- +
49 NimBLECharacteristic* createCharacteristic(const NimBLEUUID& uuid,
50 uint32_t properties = NIMBLE_PROPERTY::READ | NIMBLE_PROPERTY::WRITE,
51 uint16_t max_len = BLE_ATT_ATTR_MAX_LEN);
-
52 void addCharacteristic(NimBLECharacteristic* pCharacteristic);
-
53 void removeCharacteristic(NimBLECharacteristic* pCharacteristic, bool deleteChr = false);
-
54 NimBLECharacteristic* getCharacteristic(const char* uuid, uint16_t instanceId = 0) const;
-
55 NimBLECharacteristic* getCharacteristic(const NimBLEUUID& uuid, uint16_t instanceId = 0) const;
-
56 NimBLECharacteristic* getCharacteristicByHandle(uint16_t handle) const;
+
52 void addCharacteristic(NimBLECharacteristic* pCharacteristic);
+
53 void removeCharacteristic(NimBLECharacteristic* pCharacteristic, bool deleteChr = false);
+
54 NimBLECharacteristic* getCharacteristic(const char* uuid, uint16_t instanceId = 0) const;
+
55 NimBLECharacteristic* getCharacteristic(const NimBLEUUID& uuid, uint16_t instanceId = 0) const;
+
56 NimBLECharacteristic* getCharacteristicByHandle(uint16_t handle) const;
57
-
58 const std::vector<NimBLECharacteristic*>& getCharacteristics() const;
-
59 std::vector<NimBLECharacteristic*> getCharacteristics(const char* uuid) const;
-
60 std::vector<NimBLECharacteristic*> getCharacteristics(const NimBLEUUID& uuid) const;
+
58 const std::vector<NimBLECharacteristic*>& getCharacteristics() const;
+
59 std::vector<NimBLECharacteristic*> getCharacteristics(const char* uuid) const;
+
60 std::vector<NimBLECharacteristic*> getCharacteristics(const NimBLEUUID& uuid) const;
61
62 private:
-
63 friend class NimBLEServer;
+
63 friend class NimBLEServer;
64
65 std::vector<NimBLECharacteristic*> m_vChars{};
66 // Nimble requires an array of services to be sent to the api
@@ -164,28 +163,10 @@ $(document).ready(function(){initNavTree('_nim_b_l_e_service_8h_source.html','')
68 // of the second service to 0 to indicate the end of the array.
69 ble_gatt_svc_def m_pSvcDef[2]{};
70}; // NimBLEService
-
71
-
72#endif // CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_PERIPHERAL
+
72#endif // CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_ROLE_PERIPHERAL)
73#endif // NIMBLE_CPP_SERVICE_H_
-
The model of a BLE Characteristic.
Definition NimBLECharacteristic.h:41
-
A base class for local BLE attributes.
Definition NimBLELocalAttribute.h:29
-
The model of a BLE server.
Definition NimBLEServer.h:62
-
The model of a BLE service.
Definition NimBLEService.h:34
-
NimBLECharacteristic * createCharacteristic(const char *uuid, uint32_t properties=NIMBLE_PROPERTY::READ|NIMBLE_PROPERTY::WRITE, uint16_t max_len=BLE_ATT_ATTR_MAX_LEN)
Create a new BLE Characteristic associated with this service.
Definition NimBLEService.cpp:194
-
NimBLECharacteristic * getCharacteristicByHandle(uint16_t handle) const
Get a pointer to the characteristic object with the specified handle.
Definition NimBLEService.cpp:308
-
std::string toString() const
Return a string representation of this service. A service is defined by:
Definition NimBLEService.cpp:353
-
const std::vector< NimBLECharacteristic * > & getCharacteristics() const
Definition NimBLEService.cpp:321
-
~NimBLEService()
Destructor, make sure we release the resources allocated for the service.
Definition NimBLEService.cpp:50
-
void dump() const
Dump details of this BLE GATT service.
Definition NimBLEService.cpp:66
-
bool isStarted() const
Checks if the service has been started.
Definition NimBLEService.cpp:374
-
NimBLEServer * getServer() const
Get the BLE server associated with this service.
Definition NimBLEService.cpp:366
-
bool start()
Builds the database of characteristics/descriptors for the service and registers it with the NimBLE s...
Definition NimBLEService.cpp:91
-
NimBLECharacteristic * getCharacteristic(const char *uuid, uint16_t instanceId=0) const
Get a pointer to the characteristic object with the specified UUID.
Definition NimBLEService.cpp:279
-
void addCharacteristic(NimBLECharacteristic *pCharacteristic)
Add a characteristic to the service.
Definition NimBLEService.cpp:219
-
void removeCharacteristic(NimBLECharacteristic *pCharacteristic, bool deleteChr=false)
Remove a characteristic from the service.
Definition NimBLEService.cpp:251
A model of a BLE UUID.
Definition NimBLEUUID.h:41
-
diff --git a/_nim_b_l_e_u_u_i_d_8h_source.html b/_nim_b_l_e_u_u_i_d_8h_source.html index 99ffe91..66db724 100644 --- a/_nim_b_l_e_u_u_i_d_8h_source.html +++ b/_nim_b_l_e_u_u_i_d_8h_source.html @@ -25,7 +25,7 @@ -
esp-nimble-cpp 2.3.1 +
esp-nimble-cpp 2.3.2
@@ -117,8 +117,8 @@ $(document).ready(function(){initNavTree('_nim_b_l_e_u_u_i_d_8h_source.html','')
18#ifndef NIMBLE_CPP_UUID_H_
19#define NIMBLE_CPP_UUID_H_
20
-
21#include "nimconfig.h"
-
22#if CONFIG_BT_ENABLED
+
21#include "syscfg/syscfg.h"
+
22#if CONFIG_BT_NIMBLE_ENABLED
23
24# if defined(CONFIG_NIMBLE_CPP_IDF)
25# include "host/ble_uuid.h"
@@ -138,20 +138,20 @@ $(document).ready(function(){initNavTree('_nim_b_l_e_u_u_i_d_8h_source.html','')
42 public:
46 NimBLEUUID() = default;
-
47 NimBLEUUID(const ble_uuid_any_t& uuid);
-
48 NimBLEUUID(const std::string& uuid);
-
49 NimBLEUUID(uint16_t uuid);
-
50 NimBLEUUID(uint32_t uuid);
-
51 NimBLEUUID(const ble_uuid128_t* uuid);
+ +
48 NimBLEUUID(const std::string& uuid);
+ + +
52 NimBLEUUID(const uint8_t* pData, size_t size);
54
55 uint8_t bitSize() const;
56 const uint8_t* getValue() const;
57 const ble_uuid_t* getBase() const;
-
58 bool equals(const NimBLEUUID& uuid) const;
+
58 bool equals(const NimBLEUUID& uuid) const;
59 std::string toString() const;
-
60 static NimBLEUUID fromString(const std::string& uuid);
+
60 static NimBLEUUID fromString(const std::string& uuid);
61 const NimBLEUUID& to128();
62 const NimBLEUUID& to16();
@@ -165,7 +165,7 @@ $(document).ready(function(){initNavTree('_nim_b_l_e_u_u_i_d_8h_source.html','')
71}; // NimBLEUUID
72
-
73#endif // CONFIG_BT_ENABLED
+
73#endif // CONFIG_BT_NIMBLE_ENABLED
74#endif // NIMBLE_CPP_UUID_H_
A model of a BLE UUID.
Definition NimBLEUUID.h:41
bool equals(const NimBLEUUID &uuid) const
Compare a UUID against this UUID.
Definition NimBLEUUID.cpp:180
@@ -180,7 +180,6 @@ $(document).ready(function(){initNavTree('_nim_b_l_e_u_u_i_d_8h_source.html','')
const uint8_t * getValue() const
Get the uuid value.
Definition NimBLEUUID.cpp:152
static NimBLEUUID fromString(const std::string &uuid)
Definition NimBLEUUID.cpp:195
uint8_t bitSize() const
Get the bit size of the UUID, 16, 32 or 128.
Definition NimBLEUUID.cpp:143
-
diff --git a/_nim_b_l_e_utils_8h_source.html b/_nim_b_l_e_utils_8h_source.html index c974082..9723431 100644 --- a/_nim_b_l_e_utils_8h_source.html +++ b/_nim_b_l_e_utils_8h_source.html @@ -25,7 +25,7 @@ -
esp-nimble-cpp 2.3.1 +
esp-nimble-cpp 2.3.2
@@ -117,44 +117,56 @@ $(document).ready(function(){initNavTree('_nim_b_l_e_utils_8h_source.html','');
18#ifndef NIMBLE_CPP_UTILS_H_
19#define NIMBLE_CPP_UTILS_H_
20
-
21#include "nimconfig.h"
-
22#if CONFIG_BT_ENABLED
+
21#include "syscfg/syscfg.h"
+
22#if CONFIG_BT_NIMBLE_ENABLED
23
-
24# include <string>
-
25
-
26class NimBLEAddress;
-
27
-
- -
34 NimBLETaskData(void* pInstance = nullptr, int flags = 0, void* buf = nullptr);
- -
36 void* m_pInstance{nullptr};
-
37 mutable int m_flags{0};
-
38 void* m_pBuf{nullptr};
+
24#if CONFIG_NIMBLE_CPP_DEBUG_ASSERT_ENABLED && !defined NDEBUG
+
25void nimble_cpp_assert(const char *file, unsigned line) __attribute((weak, noreturn));
+
26# define NIMBLE_ATT_VAL_FILE (__builtin_strrchr(__FILE__, '/') ? \
+
27 __builtin_strrchr (__FILE__, '/') + 1 : __FILE__)
+
28# define NIMBLE_CPP_DEBUG_ASSERT(cond) \
+
29 if (!(cond)) { \
+
30 nimble_cpp_assert(NIMBLE_ATT_VAL_FILE, __LINE__); \
+
31 }
+
32#else
+
33# define NIMBLE_CPP_DEBUG_ASSERT(cond) (void(0))
+
34#endif
+
35
+
36# include <string>
+
37
+
38class NimBLEAddress;
39
-
40 private:
-
41 mutable void* m_pHandle{nullptr}; // semaphore or task handle
-
42 friend class NimBLEUtils;
-
43};
+
+ +
46 NimBLETaskData(void* pInstance = nullptr, int flags = 0, void* buf = nullptr);
+ +
48 void* m_pInstance{nullptr};
+
49 mutable int m_flags{0};
+
50 void* m_pBuf{nullptr};
+
51
+
52 private:
+
53 mutable void* m_pHandle{nullptr}; // semaphore or task handle
+
54 friend class NimBLEUtils;
+
55};
-
44
-
- -
49 public:
-
50 static const char* gapEventToString(uint8_t eventType);
-
51 static std::string dataToHexString(const uint8_t* source, uint8_t length);
-
52 static const char* advTypeToString(uint8_t advType);
-
53 static const char* returnCodeToString(int rc);
-
54 static NimBLEAddress generateAddr(bool nrpa);
-
55 static bool taskWait(const NimBLETaskData& taskData, uint32_t timeout);
-
56 static void taskRelease(const NimBLETaskData& taskData, int rc = 0);
-
57};
+
56
+
+ +
61 public:
+
62 static const char* gapEventToString(uint8_t eventType);
+
63 static std::string dataToHexString(const uint8_t* source, uint8_t length);
+
64 static const char* advTypeToString(uint8_t advType);
+
65 static const char* returnCodeToString(int rc);
+
66 static NimBLEAddress generateAddr(bool nrpa);
+
67 static bool taskWait(const NimBLETaskData& taskData, uint32_t timeout);
+
68 static void taskRelease(const NimBLETaskData& taskData, int rc = 0);
+
69};
-
58
-
59#endif // CONFIG_BT_ENABLED
-
60#endif // NIMBLE_CPP_UTILS_H_
+
70
+
71#endif // CONFIG_BT_NIMBLE_ENABLED
+
72#endif // NIMBLE_CPP_UTILS_H_
A BLE device address.
Definition NimBLEAddress.h:42
-
A BLE Utility class with methods for debugging and general purpose use.
Definition NimBLEUtils.h:48
+
A BLE Utility class with methods for debugging and general purpose use.
Definition NimBLEUtils.h:60
static std::string dataToHexString(const uint8_t *source, uint8_t length)
Create a hexadecimal string representation of the input data.
Definition NimBLEUtils.cpp:550
static bool taskWait(const NimBLETaskData &taskData, uint32_t timeout)
Blocks the calling task until released or timeout.
Definition NimBLEUtils.cpp:92
static NimBLEAddress generateAddr(bool nrpa)
Generate a random BLE address.
Definition NimBLEUtils.cpp:569
@@ -162,8 +174,7 @@ $(document).ready(function(){initNavTree('_nim_b_l_e_utils_8h_source.html','');
static void taskRelease(const NimBLETaskData &taskData, int rc=0)
Release a task.
Definition NimBLEUtils.cpp:119
static const char * returnCodeToString(int rc)
Converts a return code from the NimBLE stack to a text string.
Definition NimBLEUtils.cpp:135
static const char * gapEventToString(uint8_t eventType)
Convert a GAP event type to a string representation.
Definition NimBLEUtils.cpp:457
- -
A structure to hold data for a task that is waiting for a response.
Definition NimBLEUtils.h:33
+
A structure to hold data for a task that is waiting for a response.
Definition NimBLEUtils.h:45
~NimBLETaskData()
Destructor.
Definition NimBLEUtils.cpp:77
diff --git a/_nim_b_l_e_value_attribute_8h_source.html b/_nim_b_l_e_value_attribute_8h_source.html index e897eb0..95733e1 100644 --- a/_nim_b_l_e_value_attribute_8h_source.html +++ b/_nim_b_l_e_value_attribute_8h_source.html @@ -25,7 +25,7 @@ -
esp-nimble-cpp 2.3.1 +
esp-nimble-cpp 2.3.2
@@ -117,15 +117,15 @@ $(document).ready(function(){initNavTree('_nim_b_l_e_value_attribute_8h_source.h
18#ifndef NIMBLE_CPP_VALUE_ATTRIBUTE_H_
19#define NIMBLE_CPP_VALUE_ATTRIBUTE_H_
20
-
21#include "nimconfig.h"
-
22#if CONFIG_BT_ENABLED && (CONFIG_BT_NIMBLE_ROLE_PERIPHERAL || CONFIG_BT_NIMBLE_ROLE_CENTRAL)
+
21#include "syscfg/syscfg.h"
+
22#if CONFIG_BT_NIMBLE_ENABLED && (MYNEWT_VAL(BLE_ROLE_PERIPHERAL) || MYNEWT_VAL(BLE_ROLE_CENTRAL))
23
24# include "NimBLEAttribute.h"
25# include "NimBLEAttValue.h"
26
27class NimBLEValueAttribute {
28 public:
-
29 NimBLEValueAttribute(uint16_t maxLen = BLE_ATT_ATTR_MAX_LEN, uint16_t initLen = CONFIG_NIMBLE_CPP_ATT_VALUE_INIT_LENGTH)
+
29 NimBLEValueAttribute(uint16_t maxLen = BLE_ATT_ATTR_MAX_LEN, uint16_t initLen = CONFIG_NIMBLE_CPP_ATT_VALUE_INIT_LENGTH)
30 : m_value(initLen, maxLen) {}
31
37 NimBLEAttValue getValue(time_t* timestamp) const { return m_value.getValue(timestamp); }
@@ -150,12 +150,10 @@ $(document).ready(function(){initNavTree('_nim_b_l_e_value_attribute_8h_source.h
82 NimBLEAttValue m_value{};
83};
84
-
85#endif // CONFIG_BT_ENABLED && (CONFIG_BT_NIMBLE_ROLE_PERIPHERAL || CONFIG_BT_NIMBLE_ROLE_CENTRAL)
+
85#endif // CONFIG_BT_NIMBLE_ENABLED && (MYNEWT_VAL(BLE_ROLE_PERIPHERAL) || MYNEWT_VAL(BLE_ROLE_CENTRAL))
86#endif // NIMBLE_CPP_ATTRIBUTE_H_
A specialized container class to hold BLE attribute values.
Definition NimBLEAttValue.h:72
uint16_t size() const
Returns the current size of the value in bytes.
Definition NimBLEAttValue.h:159
- -
#define CONFIG_NIMBLE_CPP_ATT_VALUE_INIT_LENGTH
Uncomment to set the default allocation size (bytes) for each attribute if not specified when the con...
Definition nimconfig.h:68
diff --git a/annotated.html b/annotated.html index ed0b12a..dd240a4 100644 --- a/annotated.html +++ b/annotated.html @@ -25,7 +25,7 @@ -
esp-nimble-cpp 2.3.1 +
esp-nimble-cpp 2.3.2
@@ -94,41 +94,16 @@ $(document).ready(function(){initNavTree('annotated.html',''); initResizable();
Here are the classes, structs, unions and interfaces with brief descriptions:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + +
 CNimBLE2904Descriptor for Characteristic Presentation Format
 CNimBLEAddressA BLE device address
 CNimBLEAdvertisedDeviceA representation of a BLE advertised device found by a scan
 CNimBLEAdvertisementDataAdvertisement data set by the programmer to be published by the BLE server
 CNimBLEAdvertisingPerform and manage BLE advertising
 CNimBLEAttributeA base class for BLE attributes
 CNimBLEAttValueA specialized container class to hold BLE attribute values
 CNimBLEBeaconRepresentation of a beacon. See:
 CNimBLECharacteristicThe model of a BLE Characteristic
 CNimBLECharacteristicCallbacksCallbacks that can be associated with a BLE characteristic to inform of events
 CNimBLEClientA model of a BLE client
 CNimBLEClientCallbacksCallbacks associated with a BLE client
 CNimBLEConnInfoConnection information
 CNimBLEDescriptorA model of a BLE descriptor
 CNimBLEDescriptorCallbacksCallbacks that can be associated with a BLE descriptors to inform of events
 CNimBLEDeviceA model of a BLE Device from which all the BLE roles are created
 CNimBLEDeviceCallbacksCallbacks associated with a BLE device
 CNimBLEEddystoneTLMRepresentation of a beacon. See:
 CNimBLEExtAdvertisementExtended advertisement data
 CNimBLEExtAdvertisingExtended advertising class
 CNimBLEExtAdvertisingCallbacksCallbacks associated with NimBLEExtAdvertising class
 CNimBLEHIDDeviceA model of a BLE Human Interface Device
 CNimBLELocalAttributeA base class for local BLE attributes
 CNimBLERemoteCharacteristicA model of a remote BLE characteristic
 CNimBLERemoteDescriptorA model of remote BLE descriptor
 CNimBLERemoteServiceA model of a remote BLE service
 CNimBLEScanPerform and manage BLE scans
 CNimBLEScanCallbacksA callback handler for callbacks associated device scanning
 CNimBLEScanResultsA class that contains and operates on the results of a BLE scan
 CNimBLEServerThe model of a BLE server
 CNimBLEServerCallbacksCallbacks associated with the operation of a BLE server
 CNimBLEServiceThe model of a BLE service
 CNimBLETaskDataA structure to hold data for a task that is waiting for a response
 CNimBLEUtilsA BLE Utility class with methods for debugging and general purpose use
 CNimBLEUUIDA model of a BLE UUID
 CNimBLEAddressA BLE device address
 CNimBLEAdvertisementDataAdvertisement data set by the programmer to be published by the BLE server
 CNimBLEAdvertisingPerform and manage BLE advertising
 CNimBLEAttValueA specialized container class to hold BLE attribute values
 CNimBLEConnInfoConnection information
 CNimBLEDeviceA model of a BLE Device from which all the BLE roles are created
 CNimBLEDeviceCallbacksCallbacks associated with a BLE device
 CNimBLETaskDataA structure to hold data for a task that is waiting for a response
 CNimBLEUtilsA BLE Utility class with methods for debugging and general purpose use
 CNimBLEUUIDA model of a BLE UUID
diff --git a/annotated_dup.js b/annotated_dup.js index 8bba952..944dfae 100644 --- a/annotated_dup.js +++ b/annotated_dup.js @@ -1,37 +1,12 @@ var annotated_dup = [ - [ "NimBLE2904", "class_nim_b_l_e2904.html", "class_nim_b_l_e2904" ], [ "NimBLEAddress", "class_nim_b_l_e_address.html", "class_nim_b_l_e_address" ], - [ "NimBLEAdvertisedDevice", "class_nim_b_l_e_advertised_device.html", "class_nim_b_l_e_advertised_device" ], [ "NimBLEAdvertisementData", "class_nim_b_l_e_advertisement_data.html", "class_nim_b_l_e_advertisement_data" ], [ "NimBLEAdvertising", "class_nim_b_l_e_advertising.html", "class_nim_b_l_e_advertising" ], - [ "NimBLEAttribute", "class_nim_b_l_e_attribute.html", "class_nim_b_l_e_attribute" ], [ "NimBLEAttValue", "class_nim_b_l_e_att_value.html", "class_nim_b_l_e_att_value" ], - [ "NimBLEBeacon", "class_nim_b_l_e_beacon.html", "class_nim_b_l_e_beacon" ], - [ "NimBLECharacteristic", "class_nim_b_l_e_characteristic.html", "class_nim_b_l_e_characteristic" ], - [ "NimBLECharacteristicCallbacks", "class_nim_b_l_e_characteristic_callbacks.html", "class_nim_b_l_e_characteristic_callbacks" ], - [ "NimBLEClient", "class_nim_b_l_e_client.html", "class_nim_b_l_e_client" ], - [ "NimBLEClientCallbacks", "class_nim_b_l_e_client_callbacks.html", "class_nim_b_l_e_client_callbacks" ], [ "NimBLEConnInfo", "class_nim_b_l_e_conn_info.html", "class_nim_b_l_e_conn_info" ], - [ "NimBLEDescriptor", "class_nim_b_l_e_descriptor.html", "class_nim_b_l_e_descriptor" ], - [ "NimBLEDescriptorCallbacks", "class_nim_b_l_e_descriptor_callbacks.html", "class_nim_b_l_e_descriptor_callbacks" ], [ "NimBLEDevice", "class_nim_b_l_e_device.html", null ], [ "NimBLEDeviceCallbacks", "class_nim_b_l_e_device_callbacks.html", "class_nim_b_l_e_device_callbacks" ], - [ "NimBLEEddystoneTLM", "class_nim_b_l_e_eddystone_t_l_m.html", "class_nim_b_l_e_eddystone_t_l_m" ], - [ "NimBLEExtAdvertisement", "class_nim_b_l_e_ext_advertisement.html", "class_nim_b_l_e_ext_advertisement" ], - [ "NimBLEExtAdvertising", "class_nim_b_l_e_ext_advertising.html", "class_nim_b_l_e_ext_advertising" ], - [ "NimBLEExtAdvertisingCallbacks", "class_nim_b_l_e_ext_advertising_callbacks.html", "class_nim_b_l_e_ext_advertising_callbacks" ], - [ "NimBLEHIDDevice", "class_nim_b_l_e_h_i_d_device.html", "class_nim_b_l_e_h_i_d_device" ], - [ "NimBLELocalAttribute", "class_nim_b_l_e_local_attribute.html", "class_nim_b_l_e_local_attribute" ], - [ "NimBLERemoteCharacteristic", "class_nim_b_l_e_remote_characteristic.html", "class_nim_b_l_e_remote_characteristic" ], - [ "NimBLERemoteDescriptor", "class_nim_b_l_e_remote_descriptor.html", "class_nim_b_l_e_remote_descriptor" ], - [ "NimBLERemoteService", "class_nim_b_l_e_remote_service.html", "class_nim_b_l_e_remote_service" ], - [ "NimBLEScan", "class_nim_b_l_e_scan.html", "class_nim_b_l_e_scan" ], - [ "NimBLEScanCallbacks", "class_nim_b_l_e_scan_callbacks.html", "class_nim_b_l_e_scan_callbacks" ], - [ "NimBLEScanResults", "class_nim_b_l_e_scan_results.html", "class_nim_b_l_e_scan_results" ], - [ "NimBLEServer", "class_nim_b_l_e_server.html", "class_nim_b_l_e_server" ], - [ "NimBLEServerCallbacks", "class_nim_b_l_e_server_callbacks.html", "class_nim_b_l_e_server_callbacks" ], - [ "NimBLEService", "class_nim_b_l_e_service.html", "class_nim_b_l_e_service" ], [ "NimBLETaskData", "struct_nim_b_l_e_task_data.html", "struct_nim_b_l_e_task_data" ], [ "NimBLEUtils", "class_nim_b_l_e_utils.html", null ], [ "NimBLEUUID", "class_nim_b_l_e_u_u_i_d.html", "class_nim_b_l_e_u_u_i_d" ] diff --git a/class_nim_b_l_e2904-members.html b/class_nim_b_l_e2904-members.html deleted file mode 100644 index 1ad3b5f..0000000 --- a/class_nim_b_l_e2904-members.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - - -esp-nimble-cpp: Member List - - - - - - - - - - - - - -
-
- - - - - - -
-
esp-nimble-cpp 2.3.1 -
-
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
-
NimBLE2904 Member List
-
-
- -

This is the complete list of members for NimBLE2904, including all inherited members.

- - - - - - - - - - - - - - - - - - - -
getCharacteristic() constNimBLEDescriptor
getHandle() constNimBLEAttributeinline
getRemoved() constNimBLELocalAttributeinline
getUUID() constNimBLEAttributeinline
NimBLEAttribute(const NimBLEUUID &uuid, uint16_t handle)NimBLEAttributeinlineprotected
NimBLEDescriptor(const char *uuid, uint16_t properties, uint16_t maxLen, NimBLECharacteristic *pCharacteristic=nullptr)NimBLEDescriptor
NimBLEDescriptor(const NimBLEUUID &uuid, uint16_t properties, uint16_t maxLen, NimBLECharacteristic *pCharacteristic=nullptr)NimBLEDescriptor
NimBLELocalAttribute(const NimBLEUUID &uuid, uint16_t handle)NimBLELocalAttributeinlineprotected
setCallbacks(NimBLEDescriptorCallbacks *pCallbacks)NimBLEDescriptor
setDescription(uint16_t description)NimBLE2904
setExponent(int8_t exponent)NimBLE2904
setFormat(uint8_t format)NimBLE2904
setNamespace(uint8_t namespace_value)NimBLE2904
setRemoved(uint8_t removed)NimBLELocalAttributeinlineprotected
setUnit(uint16_t unit)NimBLE2904
toString() constNimBLEDescriptor
~NimBLEAttribute()=defaultNimBLEAttributeprotected
~NimBLELocalAttribute()=defaultNimBLELocalAttributeprotected
-
- - - - diff --git a/class_nim_b_l_e2904.html b/class_nim_b_l_e2904.html deleted file mode 100644 index 5a20d8a..0000000 --- a/class_nim_b_l_e2904.html +++ /dev/null @@ -1,285 +0,0 @@ - - - - - - - -esp-nimble-cpp: NimBLE2904 Class Reference - - - - - - - - - - - - - -
-
- - - - - - -
-
esp-nimble-cpp 2.3.1 -
-
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
- -
NimBLE2904 Class Reference
-
-
- -

Descriptor for Characteristic Presentation Format. - More...

- -

#include <NimBLE2904.h>

- -

Inherits NimBLEDescriptor.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

void setDescription (uint16_t description)
 Set the description.
 
void setExponent (int8_t exponent)
 Set the exponent.
 
void setFormat (uint8_t format)
 Set the format.
 
void setNamespace (uint8_t namespace_value)
 Set the namespace.
 
void setUnit (uint16_t unit)
 Set the units for this value.
 
- Public Member Functions inherited from NimBLEDescriptor
 NimBLEDescriptor (const char *uuid, uint16_t properties, uint16_t maxLen, NimBLECharacteristic *pCharacteristic=nullptr)
 Construct a descriptor.
 
 NimBLEDescriptor (const NimBLEUUID &uuid, uint16_t properties, uint16_t maxLen, NimBLECharacteristic *pCharacteristic=nullptr)
 Construct a descriptor.
 
std::string toString () const
 Return a string representation of the descriptor.
 
void setCallbacks (NimBLEDescriptorCallbacks *pCallbacks)
 Set the callback handlers for this descriptor.
 
NimBLECharacteristicgetCharacteristic () const
 Get the characteristic this descriptor belongs to.
 
-

Detailed Description

-

Descriptor for Characteristic Presentation Format.

-

This is a convenience descriptor for the Characteristic Presentation Format which has a UUID of 0x2904.

-

Member Function Documentation

- -

◆ setDescription()

- -
-
- - - - - - - - -
void NimBLE2904::setDescription (uint16_t description)
-
- -

Set the description.

-
Parameters
- - -
[in]descriptionThe description value to set.
-
-
- -
-
- -

◆ setExponent()

- -
-
- - - - - - - - -
void NimBLE2904::setExponent (int8_t exponent)
-
- -

Set the exponent.

-
Parameters
- - -
[in]exponentThe exponent value to set.
-
-
- -
-
- -

◆ setFormat()

- -
-
- - - - - - - - -
void NimBLE2904::setFormat (uint8_t format)
-
- -

Set the format.

-
Parameters
- - -
[in]formatThe format value to set.
-
-
- -
-
- -

◆ setNamespace()

- -
-
- - - - - - - - -
void NimBLE2904::setNamespace (uint8_t namespace_value)
-
- -

Set the namespace.

-
Parameters
- - -
[in]namespace_valueThe namespace value toset.
-
-
- -
-
- -

◆ setUnit()

- -
-
- - - - - - - - -
void NimBLE2904::setUnit (uint16_t unit)
-
- -

Set the units for this value.

-
Parameters
- - -
[in]unitThe type of units of this characteristic as defined by assigned numbers.
-
-
-

See https://www.bluetooth.com/specifications/assigned-numbers/units

- -
-
-
-
- - - - diff --git a/class_nim_b_l_e2904.js b/class_nim_b_l_e2904.js deleted file mode 100644 index ab5cbea..0000000 --- a/class_nim_b_l_e2904.js +++ /dev/null @@ -1,8 +0,0 @@ -var class_nim_b_l_e2904 = -[ - [ "setDescription", "class_nim_b_l_e2904.html#a08cdb490d2f88f82856a7666757bc40c", null ], - [ "setExponent", "class_nim_b_l_e2904.html#ab1c53f99246f67dca1d63b812bef631d", null ], - [ "setFormat", "class_nim_b_l_e2904.html#ab7f21651b4493fd3daaa0f1545032ff1", null ], - [ "setNamespace", "class_nim_b_l_e2904.html#a2206274c217d43a8ba121e1d279f8962", null ], - [ "setUnit", "class_nim_b_l_e2904.html#ad0cf78a2a1c3418be9a39beaa0c826ee", null ] -]; \ No newline at end of file diff --git a/class_nim_b_l_e_address-members.html b/class_nim_b_l_e_address-members.html index 87dac8d..2fad62c 100644 --- a/class_nim_b_l_e_address-members.html +++ b/class_nim_b_l_e_address-members.html @@ -25,7 +25,7 @@ -
esp-nimble-cpp 2.3.1 +
esp-nimble-cpp 2.3.2
diff --git a/class_nim_b_l_e_address.html b/class_nim_b_l_e_address.html index cbf2647..aa63dfe 100644 --- a/class_nim_b_l_e_address.html +++ b/class_nim_b_l_e_address.html @@ -25,7 +25,7 @@ -
esp-nimble-cpp 2.3.1 +
esp-nimble-cpp 2.3.2
diff --git a/class_nim_b_l_e_advertised_device-members.html b/class_nim_b_l_e_advertised_device-members.html deleted file mode 100644 index c17d132..0000000 --- a/class_nim_b_l_e_advertised_device-members.html +++ /dev/null @@ -1,159 +0,0 @@ - - - - - - - -esp-nimble-cpp: Member List - - - - - - - - - - - - - -
-
- - - - - - -
-
esp-nimble-cpp 2.3.1 -
-
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
-
NimBLEAdvertisedDevice Member List
-
-
- -

This is the complete list of members for NimBLEAdvertisedDevice, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
begin() constNimBLEAdvertisedDevice
end() constNimBLEAdvertisedDevice
getAddress() constNimBLEAdvertisedDevice
getAddressType() constNimBLEAdvertisedDevice
getAdvFlags() constNimBLEAdvertisedDevice
getAdvInterval() constNimBLEAdvertisedDevice
getAdvLength() constNimBLEAdvertisedDevice
getAdvType() constNimBLEAdvertisedDevice
getAppearance() constNimBLEAdvertisedDevice
getManufacturerData(uint8_t index=0) constNimBLEAdvertisedDevice
getManufacturerData(bool skipSizeCheck=false) constNimBLEAdvertisedDeviceinline
getManufacturerDataCount() constNimBLEAdvertisedDevice
getMaxInterval() constNimBLEAdvertisedDevice
getMinInterval() constNimBLEAdvertisedDevice
getName() constNimBLEAdvertisedDevice
getPayload() constNimBLEAdvertisedDevice
getPayloadByType(uint16_t type, uint8_t index=0) constNimBLEAdvertisedDevice
getPeriodicInterval() constNimBLEAdvertisedDevice
getPrimaryPhy() constNimBLEAdvertisedDevice
getRSSI() constNimBLEAdvertisedDevice
getScan() constNimBLEAdvertisedDevice
getSecondaryPhy() constNimBLEAdvertisedDevice
getServiceData(uint8_t index=0) constNimBLEAdvertisedDevice
getServiceData(const NimBLEUUID &uuid) constNimBLEAdvertisedDevice
getServiceData(uint8_t index=0, bool skipSizeCheck=false) constNimBLEAdvertisedDeviceinline
getServiceData(const NimBLEUUID &uuid, bool skipSizeCheck=false) constNimBLEAdvertisedDeviceinline
getServiceDataCount() constNimBLEAdvertisedDevice
getServiceDataUUID(uint8_t index=0) constNimBLEAdvertisedDevice
getServiceUUID(uint8_t index=0) constNimBLEAdvertisedDevice
getServiceUUIDCount() constNimBLEAdvertisedDevice
getSetId() constNimBLEAdvertisedDevice
getTargetAddress(uint8_t index=0) constNimBLEAdvertisedDevice
getTargetAddressCount() constNimBLEAdvertisedDevice
getTXPower() constNimBLEAdvertisedDevice
getURI() constNimBLEAdvertisedDevice
haveAdvInterval() constNimBLEAdvertisedDevice
haveAppearance() constNimBLEAdvertisedDevice
haveConnParams() constNimBLEAdvertisedDevice
haveManufacturerData() constNimBLEAdvertisedDevice
haveName() constNimBLEAdvertisedDevice
haveServiceData() constNimBLEAdvertisedDevice
haveServiceUUID() constNimBLEAdvertisedDevice
haveTargetAddress() constNimBLEAdvertisedDevice
haveTXPower() constNimBLEAdvertisedDevice
haveType(uint16_t type) constNimBLEAdvertisedDevice
haveURI() constNimBLEAdvertisedDevice
isAdvertisingService(const NimBLEUUID &uuid) constNimBLEAdvertisedDevice
isConnectable() constNimBLEAdvertisedDevice
isLegacyAdvertisement() constNimBLEAdvertisedDevice
isScannable() constNimBLEAdvertisedDevice
operator NimBLEAddress() constNimBLEAdvertisedDevice
toString() constNimBLEAdvertisedDevice
-
- - - - diff --git a/class_nim_b_l_e_advertised_device.html b/class_nim_b_l_e_advertised_device.html deleted file mode 100644 index 2be29b7..0000000 --- a/class_nim_b_l_e_advertised_device.html +++ /dev/null @@ -1,1505 +0,0 @@ - - - - - - - -esp-nimble-cpp: NimBLEAdvertisedDevice Class Reference - - - - - - - - - - - - - -
-
- - - - - - -
-
esp-nimble-cpp 2.3.1 -
-
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
- -
NimBLEAdvertisedDevice Class Reference
-
-
- -

A representation of a BLE advertised device found by a scan. - More...

- -

#include <NimBLEAdvertisedDevice.h>

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

uint8_t getAdvType () const
 Get the advertisement type.
 
uint8_t getAdvFlags () const
 Get the advertisement flags.
 
uint16_t getAppearance () const
 Get the appearance.
 
uint16_t getAdvInterval () const
 Get the advertisement interval.
 
uint16_t getMinInterval () const
 Get the preferred min connection interval.
 
uint16_t getMaxInterval () const
 Get the preferred max connection interval.
 
uint8_t getManufacturerDataCount () const
 Get the count of manufacturer data sets.
 
const NimBLEAddressgetAddress () const
 Get the address of the advertising device.
 
std::string getManufacturerData (uint8_t index=0) const
 Get the manufacturer data.
 
std::string getURI () const
 Get the URI from the advertisement.
 
std::string getPayloadByType (uint16_t type, uint8_t index=0) const
 Get the data from any type available in the advertisement.
 
std::string getName () const
 Get the advertised name.
 
int8_t getRSSI () const
 Get the RSSI.
 
NimBLEScangetScan () const
 Get the scan object that created this advertised device.
 
uint8_t getServiceDataCount () const
 Get the count of advertised service data UUIDS.
 
std::string getServiceData (uint8_t index=0) const
 Get the service data.
 
std::string getServiceData (const NimBLEUUID &uuid) const
 Get the service data.
 
NimBLEUUID getServiceDataUUID (uint8_t index=0) const
 Get the UUID of the service data at the index.
 
NimBLEUUID getServiceUUID (uint8_t index=0) const
 Get the Service UUID.
 
uint8_t getServiceUUIDCount () const
 Get the number of services advertised.
 
NimBLEAddress getTargetAddress (uint8_t index=0) const
 Get the target address at the index.
 
uint8_t getTargetAddressCount () const
 Get the number of target addresses.
 
int8_t getTXPower () const
 Get the TX Power.
 
uint8_t getAdvLength () const
 Get the length of the advertisement data in the payload.
 
uint8_t getAddressType () const
 Get the advertised device address type.
 
bool isAdvertisingService (const NimBLEUUID &uuid) const
 Check advertised services for existence of the required UUID.
 
bool haveAppearance () const
 Does this advertisement have an appearance value?
 
bool haveManufacturerData () const
 Does this advertisement have manufacturer data?
 
bool haveName () const
 Does this advertisement have a name value?
 
bool haveServiceData () const
 Does this advertisement have a service data value?
 
bool haveServiceUUID () const
 Does this advertisement have a service UUID value?
 
bool haveTXPower () const
 Does this advertisement have a transmission power value?
 
bool haveConnParams () const
 Does this advertisement have preferred connection parameters?
 
bool haveAdvInterval () const
 Does this advertisement have have the advertising interval?
 
bool haveTargetAddress () const
 Does the advertisement contain a target address?
 
bool haveURI () const
 Does this advertisement have a URI?
 
bool haveType (uint16_t type) const
 Does this advertisement have a adv type type?
 
std::string toString () const
 Create a string representation of this device.
 
bool isConnectable () const
 Check if this device is advertising as connectable.
 
bool isScannable () const
 Check if this device is advertising as scannable.
 
bool isLegacyAdvertisement () const
 Check if this advertisement is a legacy or extended type.
 
uint8_t getSetId () const
 Get the set ID of the extended advertisement.
 
uint8_t getPrimaryPhy () const
 Get the primary PHY used by this advertisement.
 
uint8_t getSecondaryPhy () const
 Get the primary PHY used by this advertisement.
 
uint16_t getPeriodicInterval () const
 Get the periodic interval of the advertisement.
 
 operator NimBLEAddress () const
 Convenience operator to convert this NimBLEAdvertisedDevice to NimBLEAddress representation.
 
const std::vector< uint8_t > & getPayload () const
 Get the payload advertised by the device.
 
const std::vector< uint8_t >::const_iterator begin () const
 Get the begin iterator for the payload.
 
const std::vector< uint8_t >::const_iterator end () const
 Get the end iterator for the payload.
 
template<typename T >
getManufacturerData (bool skipSizeCheck=false) const
 A template to convert the service data to <type>.
 
template<typename T >
getServiceData (uint8_t index=0, bool skipSizeCheck=false) const
 A template to convert the service data to <type>.
 
template<typename T >
getServiceData (const NimBLEUUID &uuid, bool skipSizeCheck=false) const
 A template to convert the service data to <type>.
 
-

Detailed Description

-

A representation of a BLE advertised device found by a scan.

-

When we perform a BLE scan, the result will be a set of devices that are advertising. This class provides a model of a detected device.

-

Member Function Documentation

- -

◆ begin()

- -
-
- - - - - - - -
const std::vector< uint8_t >::const_iterator NimBLEAdvertisedDevice::begin () const
-
- -

Get the begin iterator for the payload.

-
Returns
A read only iterator pointing to the first byte in the payload.
- -
-
- -

◆ end()

- -
-
- - - - - - - -
const std::vector< uint8_t >::const_iterator NimBLEAdvertisedDevice::end () const
-
- -

Get the end iterator for the payload.

-
Returns
A read only iterator pointing to one past the last byte of the payload.
- -
-
- -

◆ getAddress()

- -
-
- - - - - - - -
const NimBLEAddress & NimBLEAdvertisedDevice::getAddress () const
-
- -

Get the address of the advertising device.

-
Returns
The address of the advertised device.
- -
-
- -

◆ getAddressType()

- -
-
- - - - - - - -
uint8_t NimBLEAdvertisedDevice::getAddressType () const
-
- -

Get the advertised device address type.

-
Returns
The device address type:
    -
  • BLE_ADDR_PUBLIC (0x00)
  • -
  • BLE_ADDR_RANDOM (0x01)
  • -
  • BLE_ADDR_PUBLIC_ID (0x02)
  • -
  • BLE_ADDR_RANDOM_ID (0x03)
  • -
-
- -
-
- -

◆ getAdvFlags()

- -
-
- - - - - - - -
uint8_t NimBLEAdvertisedDevice::getAdvFlags () const
-
- -

Get the advertisement flags.

-
Returns
The advertisement flags, a bitmask of: BLE_HS_ADV_F_DISC_LTD (0x01) - limited discoverability BLE_HS_ADV_F_DISC_GEN (0x02) - general discoverability BLE_HS_ADV_F_BREDR_UNSUP - BR/EDR not supported
- -
-
- -

◆ getAdvInterval()

- -
-
- - - - - - - -
uint16_t NimBLEAdvertisedDevice::getAdvInterval () const
-
- -

Get the advertisement interval.

-
Returns
The advertisement interval in 0.625ms units.
- -
-
- -

◆ getAdvLength()

- -
-
- - - - - - - -
uint8_t NimBLEAdvertisedDevice::getAdvLength () const
-
- -

Get the length of the advertisement data in the payload.

-
Returns
The number of bytes in the payload that is from the advertisement.
- -
-
- -

◆ getAdvType()

- -
-
- - - - - - - -
uint8_t NimBLEAdvertisedDevice::getAdvType () const
-
- -

Get the advertisement type.

-
Returns
The advertising type the device is reporting:
    -
  • BLE_HCI_ADV_TYPE_ADV_IND (0) - indirect advertising
  • -
  • BLE_HCI_ADV_TYPE_ADV_DIRECT_IND_HD (1) - direct advertising - high duty cycle
  • -
  • BLE_HCI_ADV_TYPE_ADV_SCAN_IND (2) - indirect scan response
  • -
  • BLE_HCI_ADV_TYPE_ADV_NONCONN_IND (3) - indirect advertising - not connectable
  • -
  • BLE_HCI_ADV_TYPE_ADV_DIRECT_IND_LD (4) - direct advertising - low duty cycle
  • -
-
- -
-
- -

◆ getAppearance()

- -
-
- - - - - - - -
uint16_t NimBLEAdvertisedDevice::getAppearance () const
-
- -

Get the appearance.

-

A BLE device can declare its own appearance. The appearance is how it would like to be shown to an end user typically in the form of an icon.

-
Returns
The appearance of the advertised device.
- -
-
- -

◆ getManufacturerData() [1/2]

- -
-
-
-template<typename T >
- - - - - -
- - - - - - - - -
T NimBLEAdvertisedDevice::getManufacturerData (bool skipSizeCheck = false) const
-
-inline
-
- -

A template to convert the service data to <type>.

-
Template Parameters
- - -
TThe type to convert the data to.
-
-
-
Parameters
- - -
[in]skipSizeCheckIf true it will skip checking if the data size is less than sizeof(<type>).
-
-
-
Returns
The data converted to <type> or NULL if skipSizeCheck is false and the data is less than sizeof(<type>).
-

Use: getManufacturerData<type>(skipSizeCheck);

- -
-
- -

◆ getManufacturerData() [2/2]

- -
-
- - - - - - - - -
std::string NimBLEAdvertisedDevice::getManufacturerData (uint8_t index = 0) const
-
- -

Get the manufacturer data.

-
Parameters
- - -
[in]indexThe index of the of the manufacturer data set to get.
-
-
-
Returns
The manufacturer data.
- -
-
- -

◆ getManufacturerDataCount()

- -
-
- - - - - - - -
uint8_t NimBLEAdvertisedDevice::getManufacturerDataCount () const
-
- -

Get the count of manufacturer data sets.

-
Returns
The number of manufacturer data sets.
- -
-
- -

◆ getMaxInterval()

- -
-
- - - - - - - -
uint16_t NimBLEAdvertisedDevice::getMaxInterval () const
-
- -

Get the preferred max connection interval.

-
Returns
The preferred max connection interval in 1.25ms units.
- -
-
- -

◆ getMinInterval()

- -
-
- - - - - - - -
uint16_t NimBLEAdvertisedDevice::getMinInterval () const
-
- -

Get the preferred min connection interval.

-
Returns
The preferred min connection interval in 1.25ms units.
- -
-
- -

◆ getName()

- -
-
- - - - - - - -
std::string NimBLEAdvertisedDevice::getName () const
-
- -

Get the advertised name.

-
Returns
The name of the advertised device.
- -
-
- -

◆ getPayload()

- -
-
- - - - - - - -
const std::vector< uint8_t > & NimBLEAdvertisedDevice::getPayload () const
-
- -

Get the payload advertised by the device.

-
Returns
The advertisement payload.
- -
-
- -

◆ getPayloadByType()

- -
-
- - - - - - - - - - - - - - - - - - -
std::string NimBLEAdvertisedDevice::getPayloadByType (uint16_t type,
uint8_t index = 0 
) const
-
- -

Get the data from any type available in the advertisement.

-
Parameters
- - - -
[in]typeThe advertised data type BLE_HS_ADV_TYPE.
[in]indexThe index of the data type.
-
-
-
Returns
The data available under the type type.
- -
-
- -

◆ getPeriodicInterval()

- -
-
- - - - - - - -
uint16_t NimBLEAdvertisedDevice::getPeriodicInterval () const
-
- -

Get the periodic interval of the advertisement.

-
Returns
The periodic advertising interval, 0 if not periodic advertising.
- -
-
- -

◆ getPrimaryPhy()

- -
-
- - - - - - - -
uint8_t NimBLEAdvertisedDevice::getPrimaryPhy () const
-
- -

Get the primary PHY used by this advertisement.

-
Returns
The PHY type, one of:
    -
  • BLE_HCI_LE_PHY_1M
  • -
  • BLE_HCI_LE_PHY_CODED
  • -
-
- -
-
- -

◆ getRSSI()

- -
-
- - - - - - - -
int8_t NimBLEAdvertisedDevice::getRSSI () const
-
- -

Get the RSSI.

-
Returns
The RSSI of the advertised device.
- -
-
- -

◆ getScan()

- -
-
- - - - - - - -
NimBLEScan * NimBLEAdvertisedDevice::getScan () const
-
- -

Get the scan object that created this advertised device.

-
Returns
The scan object.
- -
-
- -

◆ getSecondaryPhy()

- -
-
- - - - - - - -
uint8_t NimBLEAdvertisedDevice::getSecondaryPhy () const
-
- -

Get the primary PHY used by this advertisement.

-
Returns
The PHY type, one of:
    -
  • BLE_HCI_LE_PHY_1M
  • -
  • BLE_HCI_LE_PHY_2M
  • -
  • BLE_HCI_LE_PHY_CODED
  • -
-
- -
-
- -

◆ getServiceData() [1/4]

- -
-
- - - - - - - - -
std::string NimBLEAdvertisedDevice::getServiceData (const NimBLEUUIDuuid) const
-
- -

Get the service data.

-
Parameters
- - -
[in]uuidThe uuid of the service data requested.
-
-
-
Returns
The advertised service data or empty string if no data.
- -
-
- -

◆ getServiceData() [2/4]

- -
-
-
-template<typename T >
- - - - - -
- - - - - - - - - - - - - - - - - - -
T NimBLEAdvertisedDevice::getServiceData (const NimBLEUUIDuuid,
bool skipSizeCheck = false 
) const
-
-inline
-
- -

A template to convert the service data to <type>.

-
Template Parameters
- - -
TThe type to convert the data to.
-
-
-
Parameters
- - - -
[in]uuidThe uuid of the service data requested.
[in]skipSizeCheckIf true it will skip checking if the data size is less than sizeof(<type>).
-
-
-
Returns
The data converted to <type> or NULL if skipSizeCheck is false and the data is less than sizeof(<type>).
-

Use: getServiceData<type>(skipSizeCheck);

- -
-
- -

◆ getServiceData() [3/4]

- -
-
- - - - - - - - -
std::string NimBLEAdvertisedDevice::getServiceData (uint8_t index = 0) const
-
- -

Get the service data.

-
Parameters
- - -
[in]indexThe index of the service data requested.
-
-
-
Returns
The advertised service data or empty string if no data.
- -
-
- -

◆ getServiceData() [4/4]

- -
-
-
-template<typename T >
- - - - - -
- - - - - - - - - - - - - - - - - - -
T NimBLEAdvertisedDevice::getServiceData (uint8_t index = 0,
bool skipSizeCheck = false 
) const
-
-inline
-
- -

A template to convert the service data to <type>.

-
Template Parameters
- - -
TThe type to convert the data to.
-
-
-
Parameters
- - - -
[in]indexThe vector index of the service data requested.
[in]skipSizeCheckIf true it will skip checking if the data size is less than sizeof(<type>).
-
-
-
Returns
The data converted to <type> or NULL if skipSizeCheck is false and the data is less than sizeof(<type>).
-

Use: getServiceData<type>(skipSizeCheck);

- -
-
- -

◆ getServiceDataCount()

- -
-
- - - - - - - -
uint8_t NimBLEAdvertisedDevice::getServiceDataCount () const
-
- -

Get the count of advertised service data UUIDS.

-
Returns
The number of service data UUIDS in the vector.
- -
-
- -

◆ getServiceDataUUID()

- -
-
- - - - - - - - -
NimBLEUUID NimBLEAdvertisedDevice::getServiceDataUUID (uint8_t index = 0) const
-
- -

Get the UUID of the service data at the index.

-
Parameters
- - -
[in]indexThe index of the service data UUID requested.
-
-
-
Returns
The advertised service data UUID or an empty UUID if not found.
- -
-
- -

◆ getServiceUUID()

- -
-
- - - - - - - - -
NimBLEUUID NimBLEAdvertisedDevice::getServiceUUID (uint8_t index = 0) const
-
- -

Get the Service UUID.

-
Parameters
- - -
[in]indexThe index of the service UUID requested.
-
-
-
Returns
The Service UUID of the advertised service, or an empty UUID if not found.
- -
-
- -

◆ getServiceUUIDCount()

- -
-
- - - - - - - -
uint8_t NimBLEAdvertisedDevice::getServiceUUIDCount () const
-
- -

Get the number of services advertised.

-
Returns
The count of services in the advertising packet.
- -
-
- -

◆ getSetId()

- -
-
- - - - - - - -
uint8_t NimBLEAdvertisedDevice::getSetId () const
-
- -

Get the set ID of the extended advertisement.

-
Returns
The set ID.
- -
-
- -

◆ getTargetAddress()

- -
-
- - - - - - - - -
NimBLEAddress NimBLEAdvertisedDevice::getTargetAddress (uint8_t index = 0) const
-
- -

Get the target address at the index.

-
Parameters
- - -
[in]indexThe index of the target address.
-
-
-
Returns
The target address.
- -
-
- -

◆ getTargetAddressCount()

- -
-
- - - - - - - -
uint8_t NimBLEAdvertisedDevice::getTargetAddressCount () const
-
- -

Get the number of target addresses.

-
Returns
The number of addresses.
- -
-
- -

◆ getTXPower()

- -
-
- - - - - - - -
int8_t NimBLEAdvertisedDevice::getTXPower () const
-
- -

Get the TX Power.

-
Returns
The TX Power of the advertised device.
- -
-
- -

◆ getURI()

- -
-
- - - - - - - -
std::string NimBLEAdvertisedDevice::getURI () const
-
- -

Get the URI from the advertisement.

-
Returns
The URI data.
- -
-
- -

◆ haveAdvInterval()

- -
-
- - - - - - - -
bool NimBLEAdvertisedDevice::haveAdvInterval () const
-
- -

Does this advertisement have have the advertising interval?

-
Returns
True if the advertisement interval is present.
- -
-
- -

◆ haveAppearance()

- -
-
- - - - - - - -
bool NimBLEAdvertisedDevice::haveAppearance () const
-
- -

Does this advertisement have an appearance value?

-
Returns
True if there is an appearance value present.
- -
-
- -

◆ haveConnParams()

- -
-
- - - - - - - -
bool NimBLEAdvertisedDevice::haveConnParams () const
-
- -

Does this advertisement have preferred connection parameters?

-
Returns
True if connection parameters are present.
- -
-
- -

◆ haveManufacturerData()

- -
-
- - - - - - - -
bool NimBLEAdvertisedDevice::haveManufacturerData () const
-
- -

Does this advertisement have manufacturer data?

-
Returns
True if there is manufacturer data present.
- -
-
- -

◆ haveName()

- -
-
- - - - - - - -
bool NimBLEAdvertisedDevice::haveName () const
-
- -

Does this advertisement have a name value?

-
Returns
True if there is a name value present.
- -
-
- -

◆ haveServiceData()

- -
-
- - - - - - - -
bool NimBLEAdvertisedDevice::haveServiceData () const
-
- -

Does this advertisement have a service data value?

-
Returns
True if there is a service data value present.
- -
-
- -

◆ haveServiceUUID()

- -
-
- - - - - - - -
bool NimBLEAdvertisedDevice::haveServiceUUID () const
-
- -

Does this advertisement have a service UUID value?

-
Returns
True if there is a service UUID value present.
- -
-
- -

◆ haveTargetAddress()

- -
-
- - - - - - - -
bool NimBLEAdvertisedDevice::haveTargetAddress () const
-
- -

Does the advertisement contain a target address?

-
Returns
True if an address is present.
- -
-
- -

◆ haveTXPower()

- -
-
- - - - - - - -
bool NimBLEAdvertisedDevice::haveTXPower () const
-
- -

Does this advertisement have a transmission power value?

-
Returns
True if there is a transmission power value present.
- -
-
- -

◆ haveType()

- -
-
- - - - - - - - -
bool NimBLEAdvertisedDevice::haveType (uint16_t type) const
-
- -

Does this advertisement have a adv type type?

-
Returns
True if there is a type present.
- -
-
- -

◆ haveURI()

- -
-
- - - - - - - -
bool NimBLEAdvertisedDevice::haveURI () const
-
- -

Does this advertisement have a URI?

-
Returns
True if there is a URI present.
- -
-
- -

◆ isAdvertisingService()

- -
-
- - - - - - - - -
bool NimBLEAdvertisedDevice::isAdvertisingService (const NimBLEUUIDuuid) const
-
- -

Check advertised services for existence of the required UUID.

-
Parameters
- - -
[in]uuidThe service uuid to look for in the advertisement.
-
-
-
Returns
Return true if service is advertised
- -
-
- -

◆ isConnectable()

- -
-
- - - - - - - -
bool NimBLEAdvertisedDevice::isConnectable () const
-
- -

Check if this device is advertising as connectable.

-
Returns
True if the device is connectable.
- -
-
- -

◆ isLegacyAdvertisement()

- -
-
- - - - - - - -
bool NimBLEAdvertisedDevice::isLegacyAdvertisement () const
-
- -

Check if this advertisement is a legacy or extended type.

-
Returns
True if legacy (Bluetooth 4.x), false if extended (bluetooth 5.x).
- -
-
- -

◆ isScannable()

- -
-
- - - - - - - -
bool NimBLEAdvertisedDevice::isScannable () const
-
- -

Check if this device is advertising as scannable.

-
Returns
True if the device is scannable.
- -
-
- -

◆ operator NimBLEAddress()

- -
-
- - - - - - - -
NimBLEAdvertisedDevice::operator NimBLEAddress () const
-
- -

Convenience operator to convert this NimBLEAdvertisedDevice to NimBLEAddress representation.

-

This allows passing NimBLEAdvertisedDevice to functions that accept NimBLEAddress and/or or it's methods as a parameter.

- -
-
- -

◆ toString()

- -
-
- - - - - - - -
std::string NimBLEAdvertisedDevice::toString () const
-
- -

Create a string representation of this device.

-
Returns
A string representation of this device.
- -
-
-
-
- - - - diff --git a/class_nim_b_l_e_advertised_device.js b/class_nim_b_l_e_advertised_device.js deleted file mode 100644 index a7f35bf..0000000 --- a/class_nim_b_l_e_advertised_device.js +++ /dev/null @@ -1,55 +0,0 @@ -var class_nim_b_l_e_advertised_device = -[ - [ "begin", "class_nim_b_l_e_advertised_device.html#aabb14f9df146ebe6fb50d74a4ec8a878", null ], - [ "end", "class_nim_b_l_e_advertised_device.html#a8530d1dfdb57cb2f9fc9a917f12797e6", null ], - [ "getAddress", "class_nim_b_l_e_advertised_device.html#acb3c376962b317b91628fb96ad215923", null ], - [ "getAddressType", "class_nim_b_l_e_advertised_device.html#a455ebaf550d1e7e025ada171cb611503", null ], - [ "getAdvFlags", "class_nim_b_l_e_advertised_device.html#acbdfac3f9febbe11d1a1317bc7524810", null ], - [ "getAdvInterval", "class_nim_b_l_e_advertised_device.html#ad06e4e81a8d568199d1145f437175749", null ], - [ "getAdvLength", "class_nim_b_l_e_advertised_device.html#afb7a089c220e4987852ea1d7a0b5dca4", null ], - [ "getAdvType", "class_nim_b_l_e_advertised_device.html#ab348469f8d9325e6bb619dce9bbd4e24", null ], - [ "getAppearance", "class_nim_b_l_e_advertised_device.html#a778d8b099f7e006d8e213cf638276a81", null ], - [ "getManufacturerData", "class_nim_b_l_e_advertised_device.html#a3ce52d33ea39b9c8b6b96cc19a2a3170", null ], - [ "getManufacturerData", "class_nim_b_l_e_advertised_device.html#aaf936703902681e7af785d7b751e68e0", null ], - [ "getManufacturerDataCount", "class_nim_b_l_e_advertised_device.html#a08c0fb778eedde4c4004410d124799f1", null ], - [ "getMaxInterval", "class_nim_b_l_e_advertised_device.html#aeef5bef4ba2e1afb5f0a6838ab9762d3", null ], - [ "getMinInterval", "class_nim_b_l_e_advertised_device.html#accf2225a99742fdeb86a1b4738eac164", null ], - [ "getName", "class_nim_b_l_e_advertised_device.html#acf7ec676680fd4eb800b85779a220b67", null ], - [ "getPayload", "class_nim_b_l_e_advertised_device.html#a12971984cf749647c659b659bdfeda5d", null ], - [ "getPayloadByType", "class_nim_b_l_e_advertised_device.html#a74be6cf94bbc2e69d04de25a37d28153", null ], - [ "getPeriodicInterval", "class_nim_b_l_e_advertised_device.html#a899abd2a02e0c9bf941a998f4184a9ee", null ], - [ "getPrimaryPhy", "class_nim_b_l_e_advertised_device.html#a927a8418e4078107e5bf457c0bb56cbc", null ], - [ "getRSSI", "class_nim_b_l_e_advertised_device.html#a749abe7ac0331c0c0f80bc145591a392", null ], - [ "getScan", "class_nim_b_l_e_advertised_device.html#a29f6e671bffb6d431d183a63074709b3", null ], - [ "getSecondaryPhy", "class_nim_b_l_e_advertised_device.html#a4738e8e37b3509f62b63afb592c9b73e", null ], - [ "getServiceData", "class_nim_b_l_e_advertised_device.html#adc0e859c8403906c12196906b3c514c8", null ], - [ "getServiceData", "class_nim_b_l_e_advertised_device.html#ae1c188511703f101eaa3995c7b4a5aac", null ], - [ "getServiceData", "class_nim_b_l_e_advertised_device.html#a94ac18b573bace31613339e573076a70", null ], - [ "getServiceData", "class_nim_b_l_e_advertised_device.html#a2c0a851fe464217ae7ace84148d8849a", null ], - [ "getServiceDataCount", "class_nim_b_l_e_advertised_device.html#a99d902853af4e0d5d3b7c7222f11eba0", null ], - [ "getServiceDataUUID", "class_nim_b_l_e_advertised_device.html#a52fff852e23293d807a6719527eceff2", null ], - [ "getServiceUUID", "class_nim_b_l_e_advertised_device.html#ae44d13d47f80ed0499be7d84239f7ecb", null ], - [ "getServiceUUIDCount", "class_nim_b_l_e_advertised_device.html#adbdb381a86c556344e676a1e4e654d9f", null ], - [ "getSetId", "class_nim_b_l_e_advertised_device.html#ad7313053fa990a9aa8f4bc832f35ee13", null ], - [ "getTargetAddress", "class_nim_b_l_e_advertised_device.html#af51c0ff723dcb7bb1bc03460a9f0a25b", null ], - [ "getTargetAddressCount", "class_nim_b_l_e_advertised_device.html#a16738b3a745d29edff39bb4bbf4dfb28", null ], - [ "getTXPower", "class_nim_b_l_e_advertised_device.html#a47b8224e031fd6ab5db93b457ec35b33", null ], - [ "getURI", "class_nim_b_l_e_advertised_device.html#a56d07a328ebdea4112087dc02dac4fc2", null ], - [ "haveAdvInterval", "class_nim_b_l_e_advertised_device.html#a9b6ff6bd4e530dc9b5c76f9333d4420f", null ], - [ "haveAppearance", "class_nim_b_l_e_advertised_device.html#a89e65eba150a40326fe1c12f2be9fbea", null ], - [ "haveConnParams", "class_nim_b_l_e_advertised_device.html#a6bb91e0c3b66a54ef9f53496fba1d748", null ], - [ "haveManufacturerData", "class_nim_b_l_e_advertised_device.html#ad68b1b03f59266f4aac9070e5e33d15f", null ], - [ "haveName", "class_nim_b_l_e_advertised_device.html#aefa0142915204ace20ecb56a539396a2", null ], - [ "haveServiceData", "class_nim_b_l_e_advertised_device.html#ab91aaf87b4bd03a6599f466b1a6c3299", null ], - [ "haveServiceUUID", "class_nim_b_l_e_advertised_device.html#a1e61faae3ba0bdbb1bc197d1ca113f61", null ], - [ "haveTargetAddress", "class_nim_b_l_e_advertised_device.html#a6e7a4b9be93386e393addaa4a732e516", null ], - [ "haveTXPower", "class_nim_b_l_e_advertised_device.html#afde2edb305d4d78804b4750d1bc7aa38", null ], - [ "haveType", "class_nim_b_l_e_advertised_device.html#a8f4fc5c352487f816598796fb5430865", null ], - [ "haveURI", "class_nim_b_l_e_advertised_device.html#a2e127b14ea79ebe88d291d7c8cc91b5a", null ], - [ "isAdvertisingService", "class_nim_b_l_e_advertised_device.html#ad006b08552281a3e6c9d9444e7942709", null ], - [ "isConnectable", "class_nim_b_l_e_advertised_device.html#ab9710a6c3a141b6413d5159dfe4a4040", null ], - [ "isLegacyAdvertisement", "class_nim_b_l_e_advertised_device.html#a49b445130f028b49175d01cd3f6db050", null ], - [ "isScannable", "class_nim_b_l_e_advertised_device.html#a6f55263d4a86d3e2f6b23b71eb68ef98", null ], - [ "operator NimBLEAddress", "class_nim_b_l_e_advertised_device.html#a0e36b522584f14687657cd29739c491b", null ], - [ "toString", "class_nim_b_l_e_advertised_device.html#ad46b9300d435e3d20997fbafa5305148", null ] -]; \ No newline at end of file diff --git a/class_nim_b_l_e_advertisement_data-members.html b/class_nim_b_l_e_advertisement_data-members.html index 020d0a7..bcabf54 100644 --- a/class_nim_b_l_e_advertisement_data-members.html +++ b/class_nim_b_l_e_advertisement_data-members.html @@ -25,7 +25,7 @@ -
esp-nimble-cpp 2.3.1 +
esp-nimble-cpp 2.3.2
diff --git a/class_nim_b_l_e_advertisement_data.html b/class_nim_b_l_e_advertisement_data.html index 4f77fee..576890e 100644 --- a/class_nim_b_l_e_advertisement_data.html +++ b/class_nim_b_l_e_advertisement_data.html @@ -25,7 +25,7 @@ -
esp-nimble-cpp 2.3.1 +
esp-nimble-cpp 2.3.2
diff --git a/class_nim_b_l_e_advertising-members.html b/class_nim_b_l_e_advertising-members.html index ff52510..182a41f 100644 --- a/class_nim_b_l_e_advertising-members.html +++ b/class_nim_b_l_e_advertising-members.html @@ -25,7 +25,7 @@ -
esp-nimble-cpp 2.3.1 +
esp-nimble-cpp 2.3.2
diff --git a/class_nim_b_l_e_advertising.html b/class_nim_b_l_e_advertising.html index 8197f5f..b6a8f44 100644 --- a/class_nim_b_l_e_advertising.html +++ b/class_nim_b_l_e_advertising.html @@ -25,7 +25,7 @@ -
esp-nimble-cpp 2.3.1 +
esp-nimble-cpp 2.3.2
diff --git a/class_nim_b_l_e_att_value-members.html b/class_nim_b_l_e_att_value-members.html index a9acb89..a95dab1 100644 --- a/class_nim_b_l_e_att_value-members.html +++ b/class_nim_b_l_e_att_value-members.html @@ -25,7 +25,7 @@ -
esp-nimble-cpp 2.3.1 +
esp-nimble-cpp 2.3.2
diff --git a/class_nim_b_l_e_att_value.html b/class_nim_b_l_e_att_value.html index be222ef..ea8b379 100644 --- a/class_nim_b_l_e_att_value.html +++ b/class_nim_b_l_e_att_value.html @@ -25,7 +25,7 @@ -
esp-nimble-cpp 2.3.1 +
esp-nimble-cpp 2.3.2
@@ -103,7 +103,7 @@ $(document).ready(function(){initNavTree('class_nim_b_l_e_att_value.html',''); i - + @@ -247,7 +247,7 @@ many different container classes.

- + diff --git a/class_nim_b_l_e_attribute-members.html b/class_nim_b_l_e_attribute-members.html deleted file mode 100644 index 95afbb0..0000000 --- a/class_nim_b_l_e_attribute-members.html +++ /dev/null @@ -1,111 +0,0 @@ - - - - - - - -esp-nimble-cpp: Member List - - - - - - - - - - - - - -
-
-

Public Member Functions

 NimBLEAttValue (uint16_t init_len=CONFIG_NIMBLE_CPP_ATT_VALUE_INIT_LENGTH, uint16_t max_len=BLE_ATT_ATTR_MAX_LEN)
 NimBLEAttValue (uint16_t init_len=CONFIG_NIMBLE_CPP_ATT_VALUE_INIT_LENGTH, uint16_t max_len=BLE_ATT_ATTR_MAX_LEN)
 Default constructor.
 
 NimBLEAttValue (const uint8_t *value, uint16_t len, uint16_t max_len=BLE_ATT_ATTR_MAX_LEN)
NimBLEAttValue::NimBLEAttValue ( uint16_t init_len = CONFIG_NIMBLE_CPP_ATT_VALUE_INIT_LENGTH, init_len = CONFIG_NIMBLE_CPP_ATT_VALUE_INIT_LENGTH,
- - - - - -
-
esp-nimble-cpp 2.3.1 -
-
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
-
NimBLEAttribute Member List
-
-
- -

This is the complete list of members for NimBLEAttribute, including all inherited members.

- - - - - -
getHandle() constNimBLEAttributeinline
getUUID() constNimBLEAttributeinline
NimBLEAttribute(const NimBLEUUID &uuid, uint16_t handle)NimBLEAttributeinlineprotected
~NimBLEAttribute()=defaultNimBLEAttributeprotected
-
- - - - diff --git a/class_nim_b_l_e_attribute.html b/class_nim_b_l_e_attribute.html deleted file mode 100644 index 6a24aca..0000000 --- a/class_nim_b_l_e_attribute.html +++ /dev/null @@ -1,214 +0,0 @@ - - - - - - - -esp-nimble-cpp: NimBLEAttribute Class Reference - - - - - - - - - - - - - -
-
- - - - - - -
-
esp-nimble-cpp 2.3.1 -
-
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
- -
NimBLEAttribute Class Reference
-
-
- -

A base class for BLE attributes. - More...

- -

#include <NimBLEAttribute.h>

- -

Inherited by NimBLELocalAttribute, NimBLERemoteService, and NimBLERemoteValueAttribute.

- - - - - - - - -

-Public Member Functions

const NimBLEUUIDgetUUID () const
 Get the UUID of the attribute.
 
-uint16_t getHandle () const
 Get the handle of the attribute.
 
- - - - - - - -

-Protected Member Functions

 NimBLEAttribute (const NimBLEUUID &uuid, uint16_t handle)
 Construct a new NimBLEAttribute object.
 
~NimBLEAttribute ()=default
 Destroy the NimBLEAttribute object.
 
-

Detailed Description

-

A base class for BLE attributes.

-

Constructor & Destructor Documentation

- -

◆ NimBLEAttribute()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
NimBLEAttribute::NimBLEAttribute (const NimBLEUUIDuuid,
uint16_t handle 
)
-
-inlineprotected
-
- -

Construct a new NimBLEAttribute object.

-
Parameters
- - - -
[in]handleThe handle of the attribute.
[in]uuidThe UUID of the attribute.
-
-
- -
-
-

Member Function Documentation

- -

◆ getUUID()

- -
-
- - - - - -
- - - - - - - -
const NimBLEUUID & NimBLEAttribute::getUUID () const
-
-inline
-
- -

Get the UUID of the attribute.

-
Returns
The UUID.
- -
-
-
-
- - - - diff --git a/class_nim_b_l_e_attribute.js b/class_nim_b_l_e_attribute.js deleted file mode 100644 index 1b8c8d7..0000000 --- a/class_nim_b_l_e_attribute.js +++ /dev/null @@ -1,7 +0,0 @@ -var class_nim_b_l_e_attribute = -[ - [ "NimBLEAttribute", "class_nim_b_l_e_attribute.html#a51ce8e9cd9609f42b9b9248a0b6c642c", null ], - [ "~NimBLEAttribute", "class_nim_b_l_e_attribute.html#a8a060f480742cfb09ed47c1f5421d00f", null ], - [ "getHandle", "class_nim_b_l_e_attribute.html#a7907cb5b0a2d0f8cd9eb016a4ed876d1", null ], - [ "getUUID", "class_nim_b_l_e_attribute.html#afd4500e543c9480c52ca994ed5473e49", null ] -]; \ No newline at end of file diff --git a/class_nim_b_l_e_beacon-members.html b/class_nim_b_l_e_beacon-members.html deleted file mode 100644 index 08c9979..0000000 --- a/class_nim_b_l_e_beacon-members.html +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - -esp-nimble-cpp: Member List - - - - - - - - - - - - - -
-
- - - - - - -
-
esp-nimble-cpp 2.3.1 -
-
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
-
NimBLEBeacon Member List
-
-
- -

This is the complete list of members for NimBLEBeacon, including all inherited members.

- - - - - - - - - - - - - - -
getData()NimBLEBeacon
getMajor()NimBLEBeacon
getManufacturerId()NimBLEBeacon
getMinor()NimBLEBeacon
getProximityUUID()NimBLEBeacon
getSignalPower()NimBLEBeacon
setData(const uint8_t *data, uint8_t length)NimBLEBeacon
setData(const BeaconData &data)NimBLEBeacon
setMajor(uint16_t major)NimBLEBeacon
setManufacturerId(uint16_t manufacturerId)NimBLEBeacon
setMinor(uint16_t minor)NimBLEBeacon
setProximityUUID(const NimBLEUUID &uuid)NimBLEBeacon
setSignalPower(int8_t signalPower)NimBLEBeacon
-
- - - - diff --git a/class_nim_b_l_e_beacon.html b/class_nim_b_l_e_beacon.html deleted file mode 100644 index 91fc4c7..0000000 --- a/class_nim_b_l_e_beacon.html +++ /dev/null @@ -1,475 +0,0 @@ - - - - - - - -esp-nimble-cpp: NimBLEBeacon Class Reference - - - - - - - - - - - - - -
-
- - - - - - -
-
esp-nimble-cpp 2.3.1 -
-
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
- -
NimBLEBeacon Class Reference
-
-
- -

Representation of a beacon. See: - More...

- -

#include <NimBLEBeacon.h>

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

const BeaconData & getData ()
 Retrieve the data that is being advertised.
 
uint16_t getMajor ()
 Get the major value being advertised.
 
uint16_t getMinor ()
 Get the minor value being advertised.
 
uint16_t getManufacturerId ()
 Get the manufacturer ID being advertised.
 
NimBLEUUID getProximityUUID ()
 Get the proximity UUID being advertised.
 
int8_t getSignalPower ()
 Get the signal power being advertised.
 
void setData (const uint8_t *data, uint8_t length)
 Set the beacon data.
 
void setData (const BeaconData &data)
 Set the beacon data.
 
void setMajor (uint16_t major)
 Set the major value.
 
void setMinor (uint16_t minor)
 Set the minor value.
 
void setManufacturerId (uint16_t manufacturerId)
 Set the manufacturer ID.
 
void setProximityUUID (const NimBLEUUID &uuid)
 Set the proximity UUID.
 
void setSignalPower (int8_t signalPower)
 Set the signal power.
 
-

Detailed Description

-

Representation of a beacon. See:

- -

Member Function Documentation

- -

◆ getData()

- -
-
- - - - - - - -
const NimBLEBeacon::BeaconData & NimBLEBeacon::getData ()
-
- -

Retrieve the data that is being advertised.

-
Returns
The advertised data.
- -
-
- -

◆ getMajor()

- -
-
- - - - - - - -
uint16_t NimBLEBeacon::getMajor ()
-
- -

Get the major value being advertised.

-
Returns
The major value advertised.
- -
-
- -

◆ getManufacturerId()

- -
-
- - - - - - - -
uint16_t NimBLEBeacon::getManufacturerId ()
-
- -

Get the manufacturer ID being advertised.

-
Returns
The manufacturer ID value advertised.
- -
-
- -

◆ getMinor()

- -
-
- - - - - - - -
uint16_t NimBLEBeacon::getMinor ()
-
- -

Get the minor value being advertised.

-
Returns
minor value advertised.
- -
-
- -

◆ getProximityUUID()

- -
-
- - - - - - - -
NimBLEUUID NimBLEBeacon::getProximityUUID ()
-
- -

Get the proximity UUID being advertised.

-
Returns
The UUID advertised.
- -
-
- -

◆ getSignalPower()

- -
-
- - - - - - - -
int8_t NimBLEBeacon::getSignalPower ()
-
- -

Get the signal power being advertised.

-
Returns
signal power level advertised.
- -
-
- -

◆ setData() [1/2]

- -
-
- - - - - - - - -
void NimBLEBeacon::setData (const BeaconData & data)
-
- -

Set the beacon data.

-
Parameters
- - -
[in]dataThe data that the beacon should advertise.
-
-
- -
-
- -

◆ setData() [2/2]

- -
-
- - - - - - - - - - - - - - - - - - -
void NimBLEBeacon::setData (const uint8_t * data,
uint8_t length 
)
-
- -

Set the beacon data.

-
Parameters
- - - -
[in]dataA pointer to the raw data that the beacon should advertise.
[in]lengthThe length of the data.
-
-
- -
-
- -

◆ setMajor()

- -
-
- - - - - - - - -
void NimBLEBeacon::setMajor (uint16_t major)
-
- -

Set the major value.

-
Parameters
- - -
[in]majorThe major value.
-
-
- -
-
- -

◆ setManufacturerId()

- -
-
- - - - - - - - -
void NimBLEBeacon::setManufacturerId (uint16_t manufacturerId)
-
- -

Set the manufacturer ID.

-
Parameters
- - -
[in]manufacturerIdThe manufacturer ID value.
-
-
- -
-
- -

◆ setMinor()

- -
-
- - - - - - - - -
void NimBLEBeacon::setMinor (uint16_t minor)
-
- -

Set the minor value.

-
Parameters
- - -
[in]minorThe minor value.
-
-
- -
-
- -

◆ setProximityUUID()

- -
-
- - - - - - - - -
void NimBLEBeacon::setProximityUUID (const NimBLEUUIDuuid)
-
- -

Set the proximity UUID.

-
Parameters
- - -
[in]uuidThe proximity UUID.
-
-
- -
-
- -

◆ setSignalPower()

- -
-
- - - - - - - - -
void NimBLEBeacon::setSignalPower (int8_t signalPower)
-
- -

Set the signal power.

-
Parameters
- - -
[in]signalPowerThe signal power value.
-
-
- -
-
-
-
- - - - diff --git a/class_nim_b_l_e_beacon.js b/class_nim_b_l_e_beacon.js deleted file mode 100644 index 5178e9a..0000000 --- a/class_nim_b_l_e_beacon.js +++ /dev/null @@ -1,16 +0,0 @@ -var class_nim_b_l_e_beacon = -[ - [ "getData", "class_nim_b_l_e_beacon.html#a8ac2cd99dd5a8a996f3556f9e5d20bbb", null ], - [ "getMajor", "class_nim_b_l_e_beacon.html#aac32b7f86c73221152909528c8dbad3c", null ], - [ "getManufacturerId", "class_nim_b_l_e_beacon.html#a8803d70e8c238ccb98edcf31af0ead40", null ], - [ "getMinor", "class_nim_b_l_e_beacon.html#a4bc9fd3a68b4b1772dc4d102573c6788", null ], - [ "getProximityUUID", "class_nim_b_l_e_beacon.html#a999ade63059620d619609676d85186ad", null ], - [ "getSignalPower", "class_nim_b_l_e_beacon.html#a4eb27b3e447f8f0b44128f77933be668", null ], - [ "setData", "class_nim_b_l_e_beacon.html#ab204f2a919c5da7308e74bd3590a29c3", null ], - [ "setData", "class_nim_b_l_e_beacon.html#ab6475aaa5d8a93e24401da3b4b272496", null ], - [ "setMajor", "class_nim_b_l_e_beacon.html#abef1334108f8049832da7fffb56f6eea", null ], - [ "setManufacturerId", "class_nim_b_l_e_beacon.html#a1ec99fe7684181e7b899cd763f9b44d9", null ], - [ "setMinor", "class_nim_b_l_e_beacon.html#a44d03b0c2b1bea3bee8f15feeb73fb8e", null ], - [ "setProximityUUID", "class_nim_b_l_e_beacon.html#a7f33ffc298285d1ab02088b2584f2256", null ], - [ "setSignalPower", "class_nim_b_l_e_beacon.html#ae2dd8cd367260dd8374309576457cec0", null ] -]; \ No newline at end of file diff --git a/class_nim_b_l_e_characteristic-members.html b/class_nim_b_l_e_characteristic-members.html deleted file mode 100644 index de2ce6b..0000000 --- a/class_nim_b_l_e_characteristic-members.html +++ /dev/null @@ -1,141 +0,0 @@ - - - - - - - -esp-nimble-cpp: Member List - - - - - - - - - - - - - -
-
- - - - - - -
-
esp-nimble-cpp 2.3.1 -
-
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
-
NimBLECharacteristic Member List
-
-
- -

This is the complete list of members for NimBLECharacteristic, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
addDescriptor(NimBLEDescriptor *pDescriptor)NimBLECharacteristic
create2904()NimBLECharacteristic
createDescriptor(const char *uuid, uint32_t properties=NIMBLE_PROPERTY::READ|NIMBLE_PROPERTY::WRITE, uint16_t maxLen=BLE_ATT_ATTR_MAX_LEN)NimBLECharacteristic
createDescriptor(const NimBLEUUID &uuid, uint32_t properties=NIMBLE_PROPERTY::READ|NIMBLE_PROPERTY::WRITE, uint16_t maxLen=BLE_ATT_ATTR_MAX_LEN)NimBLECharacteristic
getCallbacks() constNimBLECharacteristic
getDescriptorByHandle(uint16_t handle) constNimBLECharacteristic
getDescriptorByUUID(const char *uuid) constNimBLECharacteristic
getDescriptorByUUID(const NimBLEUUID &uuid) constNimBLECharacteristic
getHandle() constNimBLEAttributeinline
getProperties() constNimBLECharacteristic
getRemoved() constNimBLELocalAttributeinline
getService() constNimBLECharacteristic
getUUID() constNimBLEAttributeinline
indicate(uint16_t connHandle=BLE_HS_CONN_HANDLE_NONE) constNimBLECharacteristic
indicate(const uint8_t *value, size_t length, uint16_t connHandle=BLE_HS_CONN_HANDLE_NONE) constNimBLECharacteristic
indicate(const T &v, uint16_t connHandle=BLE_HS_CONN_HANDLE_NONE) constNimBLECharacteristicinline
indicate(const T &s, uint16_t connHandle=BLE_HS_CONN_HANDLE_NONE) constNimBLECharacteristicinline
indicate(const T &v, uint16_t connHandle=BLE_HS_CONN_HANDLE_NONE) constNimBLECharacteristicinline
NimBLEAttribute(const NimBLEUUID &uuid, uint16_t handle)NimBLEAttributeinlineprotected
NimBLECharacteristic(const char *uuid, uint16_t properties=NIMBLE_PROPERTY::READ|NIMBLE_PROPERTY::WRITE, uint16_t maxLen=BLE_ATT_ATTR_MAX_LEN, NimBLEService *pService=nullptr)NimBLECharacteristic
NimBLECharacteristic(const NimBLEUUID &uuid, uint16_t properties=NIMBLE_PROPERTY::READ|NIMBLE_PROPERTY::WRITE, uint16_t maxLen=BLE_ATT_ATTR_MAX_LEN, NimBLEService *pService=nullptr)NimBLECharacteristic
NimBLELocalAttribute(const NimBLEUUID &uuid, uint16_t handle)NimBLELocalAttributeinlineprotected
notify(uint16_t connHandle=BLE_HS_CONN_HANDLE_NONE) constNimBLECharacteristic
notify(const uint8_t *value, size_t length, uint16_t connHandle=BLE_HS_CONN_HANDLE_NONE) constNimBLECharacteristic
notify(const T &v, uint16_t connHandle=BLE_HS_CONN_HANDLE_NONE) constNimBLECharacteristicinline
notify(const T &s, uint16_t connHandle=BLE_HS_CONN_HANDLE_NONE) constNimBLECharacteristicinline
notify(const T &v, uint16_t connHandle=BLE_HS_CONN_HANDLE_NONE) constNimBLECharacteristicinline
removeDescriptor(NimBLEDescriptor *pDescriptor, bool deleteDsc=false)NimBLECharacteristic
setCallbacks(NimBLECharacteristicCallbacks *pCallbacks)NimBLECharacteristic
setRemoved(uint8_t removed)NimBLELocalAttributeinlineprotected
toString() constNimBLECharacteristic
~NimBLEAttribute()=defaultNimBLEAttributeprotected
~NimBLECharacteristic()NimBLECharacteristic
~NimBLELocalAttribute()=defaultNimBLELocalAttributeprotected
-
- - - - diff --git a/class_nim_b_l_e_characteristic.html b/class_nim_b_l_e_characteristic.html deleted file mode 100644 index 63da625..0000000 --- a/class_nim_b_l_e_characteristic.html +++ /dev/null @@ -1,1062 +0,0 @@ - - - - - - - -esp-nimble-cpp: NimBLECharacteristic Class Reference - - - - - - - - - - - - - -
-
- - - - - - -
-
esp-nimble-cpp 2.3.1 -
-
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
- -
NimBLECharacteristic Class Reference
-
-
- -

The model of a BLE Characteristic. - More...

- -

#include <NimBLECharacteristic.h>

- -

Inherits NimBLELocalValueAttribute.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 NimBLECharacteristic (const char *uuid, uint16_t properties=NIMBLE_PROPERTY::READ|NIMBLE_PROPERTY::WRITE, uint16_t maxLen=BLE_ATT_ATTR_MAX_LEN, NimBLEService *pService=nullptr)
 Construct a characteristic.
 
 NimBLECharacteristic (const NimBLEUUID &uuid, uint16_t properties=NIMBLE_PROPERTY::READ|NIMBLE_PROPERTY::WRITE, uint16_t maxLen=BLE_ATT_ATTR_MAX_LEN, NimBLEService *pService=nullptr)
 Construct a characteristic.
 
~NimBLECharacteristic ()
 Destructor.
 
std::string toString () const
 Return a string representation of the characteristic.
 
void addDescriptor (NimBLEDescriptor *pDescriptor)
 Add a descriptor to the characteristic.
 
void removeDescriptor (NimBLEDescriptor *pDescriptor, bool deleteDsc=false)
 Remove a descriptor from the characteristic.
 
uint16_t getProperties () const
 Get the properties of the characteristic.
 
void setCallbacks (NimBLECharacteristicCallbacks *pCallbacks)
 Set the callback handlers for this characteristic.
 
bool indicate (uint16_t connHandle=BLE_HS_CONN_HANDLE_NONE) const
 Send an indication.
 
bool indicate (const uint8_t *value, size_t length, uint16_t connHandle=BLE_HS_CONN_HANDLE_NONE) const
 Send an indication.
 
bool notify (uint16_t connHandle=BLE_HS_CONN_HANDLE_NONE) const
 Send a notification.
 
bool notify (const uint8_t *value, size_t length, uint16_t connHandle=BLE_HS_CONN_HANDLE_NONE) const
 Send a notification.
 
NimBLEDescriptorcreateDescriptor (const char *uuid, uint32_t properties=NIMBLE_PROPERTY::READ|NIMBLE_PROPERTY::WRITE, uint16_t maxLen=BLE_ATT_ATTR_MAX_LEN)
 Create a new BLE Descriptor associated with this characteristic.
 
NimBLEDescriptorcreateDescriptor (const NimBLEUUID &uuid, uint32_t properties=NIMBLE_PROPERTY::READ|NIMBLE_PROPERTY::WRITE, uint16_t maxLen=BLE_ATT_ATTR_MAX_LEN)
 Create a new BLE Descriptor associated with this characteristic.
 
NimBLE2904create2904 ()
 Create a Characteristic Presentation Format Descriptor for this characteristic.
 
NimBLEDescriptorgetDescriptorByUUID (const char *uuid) const
 Return the BLE Descriptor for the given UUID.
 
NimBLEDescriptorgetDescriptorByUUID (const NimBLEUUID &uuid) const
 Return the BLE Descriptor for the given UUID.
 
NimBLEDescriptorgetDescriptorByHandle (uint16_t handle) const
 Return the BLE Descriptor for the given handle.
 
-NimBLEServicegetService () const
 Get the service that owns this characteristic.
 
-NimBLECharacteristicCallbacksgetCallbacks () const
 Get the callback handlers for this characteristic.
 
template<typename T >
bool notify (const T &v, uint16_t connHandle=BLE_HS_CONN_HANDLE_NONE) const
 Template to send a notification with a value from a struct or array.
 
template<typename T >
bool notify (const T &s, uint16_t connHandle=BLE_HS_CONN_HANDLE_NONE) const
 Template to send a notification with a value from a class that has a c_str() and length() method.
 
template<typename T >
bool notify (const T &v, uint16_t connHandle=BLE_HS_CONN_HANDLE_NONE) const
 Template to send a notification with a value from a class that has a data() and size() method.
 
template<typename T >
bool indicate (const T &v, uint16_t connHandle=BLE_HS_CONN_HANDLE_NONE) const
 Template to send an indication with a value from a struct or array.
 
template<typename T >
bool indicate (const T &s, uint16_t connHandle=BLE_HS_CONN_HANDLE_NONE) const
 Template to send a indication with a value from a class that has a c_str() and length() method.
 
template<typename T >
bool indicate (const T &v, uint16_t connHandle=BLE_HS_CONN_HANDLE_NONE) const
 Template to send a indication with a value from a class that has a data() and size() method.
 
-

Detailed Description

-

The model of a BLE Characteristic.

-

A BLE Characteristic is an identified value container that manages a value. It is exposed by a BLE service and can be read and written to by a BLE client.

-

Constructor & Destructor Documentation

- -

◆ NimBLECharacteristic() [1/2]

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NimBLECharacteristic::NimBLECharacteristic (const char * uuid,
uint16_t properties = NIMBLE_PROPERTY::READ | NIMBLE_PROPERTY::WRITE,
uint16_t maxLen = BLE_ATT_ATTR_MAX_LEN,
NimBLEServicepService = nullptr 
)
-
- -

Construct a characteristic.

-
Parameters
- - - - - -
[in]uuid- UUID (const char*) for the characteristic.
[in]properties- Properties for the characteristic.
[in]maxLen- The maximum length in bytes that the characteristic value can hold. (Default: 512 bytes for esp32, 20 for all others).
[in]pService- pointer to the service instance this characteristic belongs to.
-
-
- -
-
- -

◆ NimBLECharacteristic() [2/2]

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NimBLECharacteristic::NimBLECharacteristic (const NimBLEUUIDuuid,
uint16_t properties = NIMBLE_PROPERTY::READ | NIMBLE_PROPERTY::WRITE,
uint16_t maxLen = BLE_ATT_ATTR_MAX_LEN,
NimBLEServicepService = nullptr 
)
-
- -

Construct a characteristic.

-
Parameters
- - - - - -
[in]uuid- UUID for the characteristic.
[in]properties- Properties for the characteristic.
[in]maxLen- The maximum length in bytes that the characteristic value can hold. (Default: 512 bytes for esp32, 20 for all others).
[in]pService- pointer to the service instance this characteristic belongs to.
-
-
- -
-
-

Member Function Documentation

- -

◆ addDescriptor()

- -
-
- - - - - - - - -
void NimBLECharacteristic::addDescriptor (NimBLEDescriptorpDescriptor)
-
- -

Add a descriptor to the characteristic.

-
Parameters
- - -
[in]pDescriptorA pointer to the descriptor to add.
-
-
- -
-
- -

◆ create2904()

- -
-
- - - - - - - -
NimBLE2904 * NimBLECharacteristic::create2904 ()
-
- -

Create a Characteristic Presentation Format Descriptor for this characteristic.

-
Returns
A pointer to a NimBLE2904 descriptor.
- -
-
- -

◆ createDescriptor() [1/2]

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
NimBLEDescriptor * NimBLECharacteristic::createDescriptor (const char * uuid,
uint32_t properties = NIMBLE_PROPERTY::READ | NIMBLE_PROPERTY::WRITE,
uint16_t maxLen = BLE_ATT_ATTR_MAX_LEN 
)
-
- -

Create a new BLE Descriptor associated with this characteristic.

-
Parameters
- - - - -
[in]uuid- The UUID of the descriptor.
[in]properties- The properties of the descriptor.
[in]maxLen- The max length in bytes of the descriptor value.
-
-
-
Returns
The new BLE descriptor.
- -
-
- -

◆ createDescriptor() [2/2]

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
NimBLEDescriptor * NimBLECharacteristic::createDescriptor (const NimBLEUUIDuuid,
uint32_t properties = NIMBLE_PROPERTY::READ | NIMBLE_PROPERTY::WRITE,
uint16_t maxLen = BLE_ATT_ATTR_MAX_LEN 
)
-
- -

Create a new BLE Descriptor associated with this characteristic.

-
Parameters
- - - - -
[in]uuid- The UUID of the descriptor.
[in]properties- The properties of the descriptor.
[in]maxLen- The max length in bytes of the descriptor value.
-
-
-
Returns
The new BLE descriptor.
- -
-
- -

◆ getDescriptorByHandle()

- -
-
- - - - - - - - -
NimBLEDescriptor * NimBLECharacteristic::getDescriptorByHandle (uint16_t handle) const
-
- -

Return the BLE Descriptor for the given handle.

-
Parameters
- - -
[in]handleThe handle of the descriptor.
-
-
-
Returns
A pointer to the descriptor object or nullptr if not found.
- -
-
- -

◆ getDescriptorByUUID() [1/2]

- -
-
- - - - - - - - -
NimBLEDescriptor * NimBLECharacteristic::getDescriptorByUUID (const char * uuid) const
-
- -

Return the BLE Descriptor for the given UUID.

-
Parameters
- - -
[in]uuidThe UUID of the descriptor.
-
-
-
Returns
A pointer to the descriptor object or nullptr if not found.
- -
-
- -

◆ getDescriptorByUUID() [2/2]

- -
-
- - - - - - - - -
NimBLEDescriptor * NimBLECharacteristic::getDescriptorByUUID (const NimBLEUUIDuuid) const
-
- -

Return the BLE Descriptor for the given UUID.

-
Parameters
- - -
[in]uuidThe UUID of the descriptor.
-
-
-
Returns
A pointer to the descriptor object or nullptr if not found.
- -
-
- -

◆ getProperties()

- -
-
- - - - - - - -
uint16_t NimBLECharacteristic::getProperties () const
-
- -

Get the properties of the characteristic.

-
Returns
The properties of the characteristic.
- -
-
- -

◆ indicate() [1/5]

- -
-
-
-template<typename T >
- - - - - -
- - - - - - - - - - - - - - - - - - -
bool NimBLECharacteristic::indicate (const T & s,
uint16_t connHandle = BLE_HS_CONN_HANDLE_NONE 
) const
-
-inline
-
- -

Template to send a indication with a value from a class that has a c_str() and length() method.

-
Parameters
- - - -
[in]sThe value to send.
[in]connHandleOptional, a connection handle to send the notification to.
-
-
- -
-
- -

◆ indicate() [2/5]

- -
-
-
-template<typename T >
- - - - - -
- - - - - - - - - - - - - - - - - - -
bool NimBLECharacteristic::indicate (const T & v,
uint16_t connHandle = BLE_HS_CONN_HANDLE_NONE 
) const
-
-inline
-
- -

Template to send an indication with a value from a struct or array.

-
Parameters
- - - -
[in]vThe value to send.
[in]connHandleOptional, a connection handle to send the notification to.
-
-
-

<type> size must be evaluatable by sizeof().

- -
-
- -

◆ indicate() [3/5]

- -
-
-
-template<typename T >
- - - - - -
- - - - - - - - - - - - - - - - - - -
bool NimBLECharacteristic::indicate (const T & v,
uint16_t connHandle = BLE_HS_CONN_HANDLE_NONE 
) const
-
-inline
-
- -

Template to send a indication with a value from a class that has a data() and size() method.

-
Parameters
- - - -
[in]vThe value to send.
[in]connHandleOptional, a connection handle to send the notification to.
-
-
- -
-
- -

◆ indicate() [4/5]

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
bool NimBLECharacteristic::indicate (const uint8_t * value,
size_t length,
uint16_t connHandle = BLE_HS_CONN_HANDLE_NONE 
) const
-
- -

Send an indication.

-
Parameters
- - - - -
[in]valueA pointer to the data to send.
[in]lengthThe length of the data to send.
[in]connHandleConnection handle to send an individual indication, or BLE_HS_CONN_HANDLE_NONE to send the indication to all subscribed clients.
-
-
-
Returns
True if the indication was sent successfully, false otherwise.
- -
-
- -

◆ indicate() [5/5]

- -
-
- - - - - - - - -
bool NimBLECharacteristic::indicate (uint16_t connHandle = BLE_HS_CONN_HANDLE_NONE) const
-
- -

Send an indication.

-
Parameters
- - -
[in]connHandleConnection handle to send an individual indication, or BLE_HS_CONN_HANDLE_NONE to send the indication to all subscribed clients.
-
-
-
Returns
True if the indication was sent successfully, false otherwise.
- -
-
- -

◆ notify() [1/5]

- -
-
-
-template<typename T >
- - - - - -
- - - - - - - - - - - - - - - - - - -
bool NimBLECharacteristic::notify (const T & s,
uint16_t connHandle = BLE_HS_CONN_HANDLE_NONE 
) const
-
-inline
-
- -

Template to send a notification with a value from a class that has a c_str() and length() method.

-
Parameters
- - - -
[in]sThe value to send.
[in]connHandleOptional, a connection handle to send the notification to.
-
-
- -
-
- -

◆ notify() [2/5]

- -
-
-
-template<typename T >
- - - - - -
- - - - - - - - - - - - - - - - - - -
bool NimBLECharacteristic::notify (const T & v,
uint16_t connHandle = BLE_HS_CONN_HANDLE_NONE 
) const
-
-inline
-
- -

Template to send a notification with a value from a struct or array.

-
Parameters
- - - -
[in]vThe value to send.
[in]connHandleOptional, a connection handle to send the notification to.
-
-
-

<type> size must be evaluatable by sizeof().

- -
-
- -

◆ notify() [3/5]

- -
-
-
-template<typename T >
- - - - - -
- - - - - - - - - - - - - - - - - - -
bool NimBLECharacteristic::notify (const T & v,
uint16_t connHandle = BLE_HS_CONN_HANDLE_NONE 
) const
-
-inline
-
- -

Template to send a notification with a value from a class that has a data() and size() method.

-
Parameters
- - - -
[in]vThe value to send.
[in]connHandleOptional, a connection handle to send the notification to.
-
-
- -
-
- -

◆ notify() [4/5]

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
bool NimBLECharacteristic::notify (const uint8_t * value,
size_t length,
uint16_t connHandle = BLE_HS_CONN_HANDLE_NONE 
) const
-
- -

Send a notification.

-
Parameters
- - - - -
[in]valueA pointer to the data to send.
[in]lengthThe length of the data to send.
[in]connHandleConnection handle to send an individual notification, or BLE_HS_CONN_HANDLE_NONE to send the notification to all subscribed clients.
-
-
-
Returns
True if the notification was sent successfully, false otherwise.
- -
-
- -

◆ notify() [5/5]

- -
-
- - - - - - - - -
bool NimBLECharacteristic::notify (uint16_t connHandle = BLE_HS_CONN_HANDLE_NONE) const
-
- -

Send a notification.

-
Parameters
- - -
[in]connHandleConnection handle to send an individual notification, or BLE_HS_CONN_HANDLE_NONE to send the notification to all subscribed clients.
-
-
-
Returns
True if the notification was sent successfully, false otherwise.
- -
-
- -

◆ removeDescriptor()

- -
-
- - - - - - - - - - - - - - - - - - -
void NimBLECharacteristic::removeDescriptor (NimBLEDescriptorpDescriptor,
bool deleteDsc = false 
)
-
- -

Remove a descriptor from the characteristic.

-
Parameters
- - - -
[in]pDescriptorA pointer to the descriptor instance to remove from the characteristic.
[in]deleteDscIf true it will delete the descriptor instance and free it's resources.
-
-
- -
-
- -

◆ setCallbacks()

- -
-
- - - - - - - - -
void NimBLECharacteristic::setCallbacks (NimBLECharacteristicCallbackspCallbacks)
-
- -

Set the callback handlers for this characteristic.

-
Parameters
- - -
[in]pCallbacksAn instance of a NimBLECharacteristicCallbacks class
-used to define any callbacks for the characteristic.
-
-
- -
-
- -

◆ toString()

- -
-
- - - - - - - -
std::string NimBLECharacteristic::toString () const
-
- -

Return a string representation of the characteristic.

-
Returns
A string representation of the characteristic.
- -
-
-
-
- - - - diff --git a/class_nim_b_l_e_characteristic.js b/class_nim_b_l_e_characteristic.js deleted file mode 100644 index 63aa481..0000000 --- a/class_nim_b_l_e_characteristic.js +++ /dev/null @@ -1,29 +0,0 @@ -var class_nim_b_l_e_characteristic = -[ - [ "NimBLECharacteristic", "class_nim_b_l_e_characteristic.html#ad136cb471195c1889804542afe0f628b", null ], - [ "NimBLECharacteristic", "class_nim_b_l_e_characteristic.html#af5bacf6c6f1cf033897b6a99ef98438f", null ], - [ "~NimBLECharacteristic", "class_nim_b_l_e_characteristic.html#a7fe29c5ec571d0513c51b8cbac942f4a", null ], - [ "addDescriptor", "class_nim_b_l_e_characteristic.html#aed4b2241c89ad2a8f49117e2b9433e5b", null ], - [ "create2904", "class_nim_b_l_e_characteristic.html#acc3402da680a988f6fa38100d9c98275", null ], - [ "createDescriptor", "class_nim_b_l_e_characteristic.html#aa9817ffdcc2d57e65e4ec3d88836af3f", null ], - [ "createDescriptor", "class_nim_b_l_e_characteristic.html#ac7c63b770d181de28869fda0f4d902fa", null ], - [ "getCallbacks", "class_nim_b_l_e_characteristic.html#ac194f58f909f9e447949a41c2a7cdf00", null ], - [ "getDescriptorByHandle", "class_nim_b_l_e_characteristic.html#a283bd1661b5865dd247b1b59bcbf46d6", null ], - [ "getDescriptorByUUID", "class_nim_b_l_e_characteristic.html#a3dd5745ea2cd75e12d27c51fc90b4914", null ], - [ "getDescriptorByUUID", "class_nim_b_l_e_characteristic.html#a15d9945ee9549e60db77666a2ef5d0c8", null ], - [ "getProperties", "class_nim_b_l_e_characteristic.html#a0a7d8e25403d4045f0790a4baeb5248c", null ], - [ "getService", "class_nim_b_l_e_characteristic.html#a8afe29701cd595d8b3c34cc59400b86b", null ], - [ "indicate", "class_nim_b_l_e_characteristic.html#a3ae5959f98c503de42660e195470192b", null ], - [ "indicate", "class_nim_b_l_e_characteristic.html#aa824e4b90d8f9418d7c9ccc8735a6e31", null ], - [ "indicate", "class_nim_b_l_e_characteristic.html#aa824e4b90d8f9418d7c9ccc8735a6e31", null ], - [ "indicate", "class_nim_b_l_e_characteristic.html#aa5eb7de28ee6ec5661acac5c07abb11c", null ], - [ "indicate", "class_nim_b_l_e_characteristic.html#aabdc2745d2523239a9ab3f02e39aa3cf", null ], - [ "notify", "class_nim_b_l_e_characteristic.html#ab05a81528522e7f12acff65fa86f9a28", null ], - [ "notify", "class_nim_b_l_e_characteristic.html#a95e454eacf23ae8e1e251b76d7857954", null ], - [ "notify", "class_nim_b_l_e_characteristic.html#a95e454eacf23ae8e1e251b76d7857954", null ], - [ "notify", "class_nim_b_l_e_characteristic.html#a7676bd1b73979101c394471299d71c0b", null ], - [ "notify", "class_nim_b_l_e_characteristic.html#ac4482e038124724d8bb6d147bcdb5481", null ], - [ "removeDescriptor", "class_nim_b_l_e_characteristic.html#a2c0ed8932ee257a8632e3d72e353489b", null ], - [ "setCallbacks", "class_nim_b_l_e_characteristic.html#a29dc2505e1d3b4a7d6800d1547965d17", null ], - [ "toString", "class_nim_b_l_e_characteristic.html#afd70c1d2f95f78e01dbdb92cd009559a", null ] -]; \ No newline at end of file diff --git a/class_nim_b_l_e_characteristic_callbacks-members.html b/class_nim_b_l_e_characteristic_callbacks-members.html deleted file mode 100644 index 1c6e3fd..0000000 --- a/class_nim_b_l_e_characteristic_callbacks-members.html +++ /dev/null @@ -1,111 +0,0 @@ - - - - - - - -esp-nimble-cpp: Member List - - - - - - - - - - - - - -
-
- - - - - - -
-
esp-nimble-cpp 2.3.1 -
-
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
-
NimBLECharacteristicCallbacks Member List
-
-
- -

This is the complete list of members for NimBLECharacteristicCallbacks, including all inherited members.

- - - - - -
onRead(NimBLECharacteristic *pCharacteristic, NimBLEConnInfo &connInfo)NimBLECharacteristicCallbacksvirtual
onStatus(NimBLECharacteristic *pCharacteristic, int code)NimBLECharacteristicCallbacksvirtual
onSubscribe(NimBLECharacteristic *pCharacteristic, NimBLEConnInfo &connInfo, uint16_t subValue)NimBLECharacteristicCallbacksvirtual
onWrite(NimBLECharacteristic *pCharacteristic, NimBLEConnInfo &connInfo)NimBLECharacteristicCallbacksvirtual
-
- - - - diff --git a/class_nim_b_l_e_characteristic_callbacks.html b/class_nim_b_l_e_characteristic_callbacks.html deleted file mode 100644 index 0f8b896..0000000 --- a/class_nim_b_l_e_characteristic_callbacks.html +++ /dev/null @@ -1,327 +0,0 @@ - - - - - - - -esp-nimble-cpp: NimBLECharacteristicCallbacks Class Reference - - - - - - - - - - - - - -
-
- - - - - - -
-
esp-nimble-cpp 2.3.1 -
-
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
- -
NimBLECharacteristicCallbacks Class Reference
-
-
- -

Callbacks that can be associated with a BLE characteristic to inform of events. - More...

- -

#include <NimBLECharacteristic.h>

- - - - - - - - - - - - - - -

-Public Member Functions

virtual void onRead (NimBLECharacteristic *pCharacteristic, NimBLEConnInfo &connInfo)
 Callback function to support a read request.
 
virtual void onWrite (NimBLECharacteristic *pCharacteristic, NimBLEConnInfo &connInfo)
 Callback function to support a write request.
 
virtual void onStatus (NimBLECharacteristic *pCharacteristic, int code)
 Callback function to support a Notify/Indicate Status report.
 
virtual void onSubscribe (NimBLECharacteristic *pCharacteristic, NimBLEConnInfo &connInfo, uint16_t subValue)
 Callback function called when a client changes subscription status.
 
-

Detailed Description

-

Callbacks that can be associated with a BLE characteristic to inform of events.

-

When a server application creates a BLE characteristic, we may wish to be informed when there is either a read or write request to the characteristic's value. An application can register a sub-classed instance of this class and will be notified when such an event happens.

-

Member Function Documentation

- -

◆ onRead()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
void NimBLECharacteristicCallbacks::onRead (NimBLECharacteristicpCharacteristic,
NimBLEConnInfoconnInfo 
)
-
-virtual
-
- -

Callback function to support a read request.

-
Parameters
- - - -
[in]pCharacteristicThe characteristic that is the source of the event.
[in]connInfoA reference to a NimBLEConnInfo instance containing the peer info.
-
-
- -
-
- -

◆ onStatus()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
void NimBLECharacteristicCallbacks::onStatus (NimBLECharacteristicpCharacteristic,
int code 
)
-
-virtual
-
- -

Callback function to support a Notify/Indicate Status report.

-
Parameters
- - - -
[in]pCharacteristicThe characteristic that is the source of the event.
[in]codeStatus return code from the NimBLE stack.
-
-
-

The status code for success is 0 for notifications and BLE_HS_EDONE for indications, any other value is an error.

- -
-
- -

◆ onSubscribe()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
void NimBLECharacteristicCallbacks::onSubscribe (NimBLECharacteristicpCharacteristic,
NimBLEConnInfoconnInfo,
uint16_t subValue 
)
-
-virtual
-
- -

Callback function called when a client changes subscription status.

-
Parameters
- - - - -
[in]pCharacteristicThe characteristic that is the source of the event.
[in]connInfoA reference to a NimBLEConnInfo instance containing the peer info.
[in]subValueThe subscription status:
    -
  • 0 = Un-Subscribed
  • -
  • 1 = Notifications
  • -
  • 2 = Indications
  • -
  • 3 = Notifications and Indications
  • -
-
-
-
- -
-
- -

◆ onWrite()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
void NimBLECharacteristicCallbacks::onWrite (NimBLECharacteristicpCharacteristic,
NimBLEConnInfoconnInfo 
)
-
-virtual
-
- -

Callback function to support a write request.

-
Parameters
- - - -
[in]pCharacteristicThe characteristic that is the source of the event.
[in]connInfoA reference to a NimBLEConnInfo instance containing the peer info.
-
-
- -
-
-
-
- - - - diff --git a/class_nim_b_l_e_characteristic_callbacks.js b/class_nim_b_l_e_characteristic_callbacks.js deleted file mode 100644 index ad1b07f..0000000 --- a/class_nim_b_l_e_characteristic_callbacks.js +++ /dev/null @@ -1,7 +0,0 @@ -var class_nim_b_l_e_characteristic_callbacks = -[ - [ "onRead", "class_nim_b_l_e_characteristic_callbacks.html#a120d3dade06fbc941a93edbdc0e4d830", null ], - [ "onStatus", "class_nim_b_l_e_characteristic_callbacks.html#a6f9b1f0f15492e3d47662e5e2ff0baee", null ], - [ "onSubscribe", "class_nim_b_l_e_characteristic_callbacks.html#a024951384bb777d7ee71bfd1d5eff185", null ], - [ "onWrite", "class_nim_b_l_e_characteristic_callbacks.html#ab4edbb758f0212fd190dedad6c9b8ec9", null ] -]; \ No newline at end of file diff --git a/class_nim_b_l_e_client-members.html b/class_nim_b_l_e_client-members.html deleted file mode 100644 index 4f0ccb3..0000000 --- a/class_nim_b_l_e_client-members.html +++ /dev/null @@ -1,145 +0,0 @@ - - - - - - - -esp-nimble-cpp: Member List - - - - - - - - - - - - - -
-
- - - - - - -
-
esp-nimble-cpp 2.3.1 -
-
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
-
NimBLEClient Member List
-
-
- -

This is the complete list of members for NimBLEClient, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
begin()NimBLEClient
cancelConnect() constNimBLEClient
connect(const NimBLEAdvertisedDevice *device, bool deleteAttributes=true, bool asyncConnect=false, bool exchangeMTU=true)NimBLEClient
connect(const NimBLEAddress &address, bool deleteAttributes=true, bool asyncConnect=false, bool exchangeMTU=true)NimBLEClient
connect(bool deleteAttributes=true, bool asyncConnect=false, bool exchangeMTU=true)NimBLEClient
deleteService(const NimBLEUUID &uuid)NimBLEClient
deleteServices()NimBLEClient
disconnect(uint8_t reason=BLE_ERR_REM_USER_CONN_TERM)NimBLEClient
discoverAttributes()NimBLEClient
end()NimBLEClient
exchangeMTU()NimBLEClient
getCharacteristic(uint16_t handle)NimBLEClient
getConfig() constNimBLEClient
getConnHandle() constNimBLEClient
getConnInfo() constNimBLEClient
getLastError() constNimBLEClient
getMTU() constNimBLEClient
getPeerAddress() constNimBLEClient
getPhy(uint8_t *txPhy, uint8_t *rxPhy)NimBLEClient
getRssi() constNimBLEClient
getService(const char *uuid)NimBLEClient
getService(const NimBLEUUID &uuid)NimBLEClient
getServices(bool refresh=false)NimBLEClient
getValue(const NimBLEUUID &serviceUUID, const NimBLEUUID &characteristicUUID)NimBLEClient
isConnected() constNimBLEClient
secureConnection(bool async=false) constNimBLEClient
setClientCallbacks(NimBLEClientCallbacks *pClientCallbacks, bool deleteCallbacks=true)NimBLEClient
setConfig(Config config)NimBLEClient
setConnectionParams(uint16_t minInterval, uint16_t maxInterval, uint16_t latency, uint16_t timeout, uint16_t scanInterval=16, uint16_t scanWindow=16)NimBLEClient
setConnectPhy(uint8_t phyMask)NimBLEClient
setConnectTimeout(uint32_t timeout)NimBLEClient
setDataLen(uint16_t txOctets)NimBLEClient
setPeerAddress(const NimBLEAddress &address)NimBLEClient
setSelfDelete(bool deleteOnDisconnect, bool deleteOnConnectFail)NimBLEClient
setValue(const NimBLEUUID &serviceUUID, const NimBLEUUID &characteristicUUID, const NimBLEAttValue &value, bool response=false)NimBLEClient
toString() constNimBLEClient
updateConnParams(uint16_t minInterval, uint16_t maxInterval, uint16_t latency, uint16_t timeout)NimBLEClient
updatePhy(uint8_t txPhysMask, uint8_t rxPhysMask, uint16_t phyOptions=0)NimBLEClient
-
- - - - diff --git a/class_nim_b_l_e_client.html b/class_nim_b_l_e_client.html deleted file mode 100644 index 9fb57b4..0000000 --- a/class_nim_b_l_e_client.html +++ /dev/null @@ -1,1388 +0,0 @@ - - - - - - - -esp-nimble-cpp: NimBLEClient Class Reference - - - - - - - - - - - - - -
-
- - - - - - -
-
esp-nimble-cpp 2.3.1 -
-
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
- -
NimBLEClient Class Reference
-
-
- -

A model of a BLE client. - More...

- -

#include <NimBLEClient.h>

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

bool connect (const NimBLEAdvertisedDevice *device, bool deleteAttributes=true, bool asyncConnect=false, bool exchangeMTU=true)
 Connect to an advertising device.
 
bool connect (const NimBLEAddress &address, bool deleteAttributes=true, bool asyncConnect=false, bool exchangeMTU=true)
 Connect to a BLE Server by address.
 
bool connect (bool deleteAttributes=true, bool asyncConnect=false, bool exchangeMTU=true)
 Connect to the BLE Server using the address of the last connected device, or the address
-passed to the constructor.
 
bool disconnect (uint8_t reason=BLE_ERR_REM_USER_CONN_TERM)
 Disconnect from the peer.
 
bool cancelConnect () const
 Cancel an ongoing connection attempt.
 
void setSelfDelete (bool deleteOnDisconnect, bool deleteOnConnectFail)
 Set or unset a flag to delete this client when disconnected or connection failed.
 
NimBLEAddress getPeerAddress () const
 Retrieve the address of the peer.
 
bool setPeerAddress (const NimBLEAddress &address)
 Set the peer address.
 
int getRssi () const
 Ask the BLE server for the RSSI value.
 
bool isConnected () const
 Are we connected to a server?
 
void setClientCallbacks (NimBLEClientCallbacks *pClientCallbacks, bool deleteCallbacks=true)
 Set the callbacks that will be invoked when events are received.
 
std::string toString () const
 Return a string representation of this client.
 
uint16_t getConnHandle () const
 Get the connection handle for this client.
 
uint16_t getMTU () const
 Get the current mtu of this connection.
 
bool exchangeMTU ()
 Begin the MTU exchange process with the server.
 
bool secureConnection (bool async=false) const
 Initiate a secure connection (pair/bond) with the server.
-Called automatically when a characteristic or descriptor requires encryption or authentication to access it.
 
void setConnectTimeout (uint32_t timeout)
 Set the timeout to wait for connection attempt to complete.
 
bool setDataLen (uint16_t txOctets)
 Request an update of the data packet length.
 
bool discoverAttributes ()
 Retrieves the full database of attributes that the peripheral has available.
 
NimBLEConnInfo getConnInfo () const
 Get detailed information about the current peer connection.
 
int getLastError () const
 Get the last error code reported by the NimBLE host.
 
bool updateConnParams (uint16_t minInterval, uint16_t maxInterval, uint16_t latency, uint16_t timeout)
 Update the connection parameters:
 
void setConnectionParams (uint16_t minInterval, uint16_t maxInterval, uint16_t latency, uint16_t timeout, uint16_t scanInterval=16, uint16_t scanWindow=16)
 Set the connection parameters to use when connecting to a server.
 
const std::vector< NimBLERemoteService * > & getServices (bool refresh=false)
 Get a pointer to the vector of found services.
 
std::vector< NimBLERemoteService * >::iterator begin ()
 Get iterator to the beginning of the vector of remote service pointers.
 
std::vector< NimBLERemoteService * >::iterator end ()
 Get iterator to the end of the vector of remote service pointers.
 
NimBLERemoteCharacteristicgetCharacteristic (uint16_t handle)
 Get the remote characteristic with the specified handle.
 
NimBLERemoteServicegetService (const char *uuid)
 Get the service BLE Remote Service instance corresponding to the uuid.
 
NimBLERemoteServicegetService (const NimBLEUUID &uuid)
 Get the service object corresponding to the uuid.
 
-void deleteServices ()
 Delete all service objects created by this client and clear the vector.
 
size_t deleteService (const NimBLEUUID &uuid)
 Delete a service by UUID from the local database to free resources.
 
NimBLEAttValue getValue (const NimBLEUUID &serviceUUID, const NimBLEUUID &characteristicUUID)
 Get the value of a specific characteristic associated with a specific service.
 
bool setValue (const NimBLEUUID &serviceUUID, const NimBLEUUID &characteristicUUID, const NimBLEAttValue &value, bool response=false)
 Set the value of a specific characteristic associated with a specific service.
 
void setConnectPhy (uint8_t phyMask)
 Set the PHY types to use when connecting to a server.
 
bool updatePhy (uint8_t txPhysMask, uint8_t rxPhysMask, uint16_t phyOptions=0)
 Request a change to the PHY used for this peer connection.
 
bool getPhy (uint8_t *txPhy, uint8_t *rxPhy)
 Get the PHY used for this peer connection.
 
Config getConfig () const
 Get a copy of the clients configuration.
 
void setConfig (Config config)
 Set the client configuration options.
 
-

Detailed Description

-

A model of a BLE client.

-

Member Function Documentation

- -

◆ begin()

- -
-
- - - - - - - -
std::vector< NimBLERemoteService * >::iterator NimBLEClient::begin ()
-
- -

Get iterator to the beginning of the vector of remote service pointers.

-
Returns
An iterator to the beginning of the vector of remote service pointers.
- -
-
- -

◆ cancelConnect()

- -
-
- - - - - - - -
bool NimBLEClient::cancelConnect () const
-
- -

Cancel an ongoing connection attempt.

-
Returns
True if the command was successfully sent.
- -
-
- -

◆ connect() [1/3]

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
bool NimBLEClient::connect (bool deleteAttributes = true,
bool asyncConnect = false,
bool exchangeMTU = true 
)
-
- -

Connect to the BLE Server using the address of the last connected device, or the address
-passed to the constructor.

-
Parameters
- - - - -
[in]deleteAttributesIf true this will delete any attribute objects this client may already
-have created when last connected.
[in]asyncConnectIf true, the connection will be made asynchronously and this function will return immediately.
-If false, this function will block until the connection is established or the connection attempt times out.
[in]exchangeMTUIf true, the client will attempt to exchange MTU with the server after connection.
-If false, the client will use the default MTU size and the application will need to call exchangeMTU() later.
-
-
-
Returns
true on success.
- -
-
- -

◆ connect() [2/3]

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
bool NimBLEClient::connect (const NimBLEAddressaddress,
bool deleteAttributes = true,
bool asyncConnect = false,
bool exchangeMTU = true 
)
-
- -

Connect to a BLE Server by address.

-
Parameters
- - - - - -
[in]addressThe address of the server.
[in]deleteAttributesIf true this will delete any attribute objects this client may already
-have created when last connected.
[in]asyncConnectIf true, the connection will be made asynchronously and this function will return immediately.
-If false, this function will block until the connection is established or the connection attempt times out.
[in]exchangeMTUIf true, the client will attempt to exchange MTU with the server after connection.
-If false, the client will use the default MTU size and the application will need to call exchangeMTU() later.
-
-
-
Returns
true on success.
- -
-
- -

◆ connect() [3/3]

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
bool NimBLEClient::connect (const NimBLEAdvertisedDevicepDevice,
bool deleteAttributes = true,
bool asyncConnect = false,
bool exchangeMTU = true 
)
-
- -

Connect to an advertising device.

-
Parameters
- - - - - -
[in]pDeviceA pointer to the advertised device instance to connect to.
[in]deleteAttributesIf true this will delete any attribute objects this client may already
-have created when last connected.
[in]asyncConnectIf true, the connection will be made asynchronously and this function will return immediately.
-If false, this function will block until the connection is established or the connection attempt times out.
[in]exchangeMTUIf true, the client will attempt to exchange MTU with the server after connection.
-If false, the client will use the default MTU size and the application will need to call exchangeMTU() later.
-
-
-
Returns
true on success.
- -
-
- -

◆ deleteService()

- -
-
- - - - - - - - -
size_t NimBLEClient::deleteService (const NimBLEUUIDuuid)
-
- -

Delete a service by UUID from the local database to free resources.

-
Parameters
- - -
[in]uuidThe UUID of the service to be deleted.
-
-
-
Returns
Number of services left.
- -
-
- -

◆ disconnect()

- -
-
- - - - - - - - -
bool NimBLEClient::disconnect (uint8_t reason = BLE_ERR_REM_USER_CONN_TERM)
-
- -

Disconnect from the peer.

-
Returns
True if the command was successfully sent.
- -
-
- -

◆ discoverAttributes()

- -
-
- - - - - - - -
bool NimBLEClient::discoverAttributes ()
-
- -

Retrieves the full database of attributes that the peripheral has available.

-
Returns
True if successful.
- -
-
- -

◆ end()

- -
-
- - - - - - - -
std::vector< NimBLERemoteService * >::iterator NimBLEClient::end ()
-
- -

Get iterator to the end of the vector of remote service pointers.

-
Returns
An iterator to the end of the vector of remote service pointers.
- -
-
- -

◆ exchangeMTU()

- -
-
- - - - - - - -
bool NimBLEClient::exchangeMTU ()
-
- -

Begin the MTU exchange process with the server.

-
Returns
true if the request was sent successfully.
- -
-
- -

◆ getCharacteristic()

- -
-
- - - - - - - - -
NimBLERemoteCharacteristic * NimBLEClient::getCharacteristic (uint16_t handle)
-
- -

Get the remote characteristic with the specified handle.

-
Parameters
- - -
[in]handleThe handle of the desired characteristic.
-
-
-
Returns
The matching remote characteristic, nullptr otherwise.
- -
-
- -

◆ getConfig()

- -
-
- - - - - - - -
NimBLEClient::Config NimBLEClient::getConfig () const
-
- -

Get a copy of the clients configuration.

-
Returns
A copy of the clients configuration.
- -
-
- -

◆ getConnHandle()

- -
-
- - - - - - - -
uint16_t NimBLEClient::getConnHandle () const
-
- -

Get the connection handle for this client.

-
Returns
The connection handle.
- -
-
- -

◆ getConnInfo()

- -
-
- - - - - - - -
NimBLEConnInfo NimBLEClient::getConnInfo () const
-
- -

Get detailed information about the current peer connection.

-
Returns
A NimBLEConnInfo instance with the data, or a NULL instance if not found.
- -
-
- -

◆ getLastError()

- -
-
- - - - - - - -
int NimBLEClient::getLastError () const
-
- -

Get the last error code reported by the NimBLE host.

-
Returns
int, the NimBLE error code.
- -
-
- -

◆ getMTU()

- -
-
- - - - - - - -
uint16_t NimBLEClient::getMTU () const
-
- -

Get the current mtu of this connection.

-
Returns
The MTU value.
- -
-
- -

◆ getPeerAddress()

- -
-
- - - - - - - -
NimBLEAddress NimBLEClient::getPeerAddress () const
-
- -

Retrieve the address of the peer.

-
Returns
A NimBLEAddress instance with the peer address data.
- -
-
- -

◆ getPhy()

- -
-
- - - - - - - - - - - - - - - - - - -
bool NimBLEClient::getPhy (uint8_ttxPhy,
uint8_trxPhy 
)
-
- -

Get the PHY used for this peer connection.

-
Parameters
- - - -
[out]txPhyThe TX PHY.
[out]rxPhyThe RX PHY.
-
-
-
Returns
True if successful.
- -
-
- -

◆ getRssi()

- -
-
- - - - - - - -
int NimBLEClient::getRssi () const
-
- -

Ask the BLE server for the RSSI value.

-
Returns
The RSSI value or 0 if there was an error.
- -
-
- -

◆ getService() [1/2]

- -
-
- - - - - - - - -
NimBLERemoteService * NimBLEClient::getService (const charuuid)
-
- -

Get the service BLE Remote Service instance corresponding to the uuid.

-
Parameters
- - -
[in]uuidThe UUID of the service being sought.
-
-
-
Returns
A pointer to the service or nullptr if not found.
- -
-
- -

◆ getService() [2/2]

- -
-
- - - - - - - - -
NimBLERemoteService * NimBLEClient::getService (const NimBLEUUIDuuid)
-
- -

Get the service object corresponding to the uuid.

-
Parameters
- - -
[in]uuidThe UUID of the service being sought.
-
-
-
Returns
A pointer to the service or nullptr if not found.
- -
-
- -

◆ getServices()

- -
-
- - - - - - - - -
const std::vector< NimBLERemoteService * > & NimBLEClient::getServices (bool refresh = false)
-
- -

Get a pointer to the vector of found services.

-
Parameters
- - -
[in]refreshIf true the current services vector will be cleared and
-all services will be retrieved from the peripheral.
-If false the vector will be returned with the currently stored services.
-
-
-
Returns
A pointer to the vector of available services.
- -
-
- -

◆ getValue()

- -
-
- - - - - - - - - - - - - - - - - - -
NimBLEAttValue NimBLEClient::getValue (const NimBLEUUIDserviceUUID,
const NimBLEUUIDcharacteristicUUID 
)
-
- -

Get the value of a specific characteristic associated with a specific service.

-
Parameters
- - - -
[in]serviceUUIDThe service that owns the characteristic.
[in]characteristicUUIDThe characteristic whose value we wish to read.
-
-
-
Returns
characteristic value or an empty value if not found.
- -
-
- -

◆ isConnected()

- -
-
- - - - - - - -
bool NimBLEClient::isConnected () const
-
- -

Are we connected to a server?

-
Returns
True if we are connected and false if we are not connected.
- -
-
- -

◆ secureConnection()

- -
-
- - - - - - - - -
bool NimBLEClient::secureConnection (bool async = false) const
-
- -

Initiate a secure connection (pair/bond) with the server.
-Called automatically when a characteristic or descriptor requires encryption or authentication to access it.

-
Parameters
- - -
[in]asyncIf true, the connection will be secured asynchronously and this function will return immediately.
-If false, this function will block until the connection is secured or the client disconnects.
-
-
-
Returns
True on success.
-

If async=false, this function will block and should not be used in a callback.

- -
-
- -

◆ setClientCallbacks()

- -
-
- - - - - - - - - - - - - - - - - - -
void NimBLEClient::setClientCallbacks (NimBLEClientCallbackspClientCallbacks,
bool deleteCallbacks = true 
)
-
- -

Set the callbacks that will be invoked when events are received.

-
Parameters
- - - -
[in]pClientCallbacksA pointer to a class to receive the event callbacks.
[in]deleteCallbacksIf true this will delete the callback class sent when the client is destructed.
-
-
- -
-
- -

◆ setConfig()

- -
-
- - - - - - - - -
void NimBLEClient::setConfig (NimBLEClient::Config config)
-
- -

Set the client configuration options.

-
Parameters
- - -
[in]configThe config options instance to set the client configuration to.
-
-
- -
-
- -

◆ setConnectionParams()

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void NimBLEClient::setConnectionParams (uint16_t minInterval,
uint16_t maxInterval,
uint16_t latency,
uint16_t timeout,
uint16_t scanInterval = 16,
uint16_t scanWindow = 16 
)
-
- -

Set the connection parameters to use when connecting to a server.

-
Parameters
- - - - - - - -
[in]minIntervalThe minimum connection interval in 1.25ms units.
[in]maxIntervalThe maximum connection interval in 1.25ms units.
[in]latencyThe number of packets allowed to skip (extends max interval).
[in]timeoutThe timeout time in 10ms units before disconnecting.
[in]scanIntervalThe scan interval to use when attempting to connect in 0.625ms units.
[in]scanWindowThe scan window to use when attempting to connect in 0.625ms units.
-
-
- -
-
- -

◆ setConnectPhy()

- -
-
- - - - - - - - -
void NimBLEClient::setConnectPhy (uint8_t mask)
-
- -

Set the PHY types to use when connecting to a server.

-
Parameters
- - -
[in]maskA bitmask indicating what PHYS to connect with.
-The available bits are:
    -
  • 0x01 BLE_GAP_LE_PHY_1M_MASK
  • -
  • 0x02 BLE_GAP_LE_PHY_2M_MASK
  • -
  • 0x04 BLE_GAP_LE_PHY_CODED_MASK
  • -
-
-
-
- -
-
- -

◆ setConnectTimeout()

- -
-
- - - - - - - - -
void NimBLEClient::setConnectTimeout (uint32_t time)
-
- -

Set the timeout to wait for connection attempt to complete.

-
Parameters
- - -
[in]timeThe number of milliseconds before timeout, default is 30 seconds.
-
-
- -
-
- -

◆ setDataLen()

- -
-
- - - - - - - - -
bool NimBLEClient::setDataLen (uint16_t txOctets)
-
- -

Request an update of the data packet length.

-
    -
  • Can only be used after a connection has been established.

    -

    Sends a data length update request to the server the client is connected to. The Data Length Extension (DLE) allows to increase the Data Channel Payload from 27 bytes to up to 251 bytes. The server needs to support the Bluetooth 4.2 specifications, to be capable of DLE.

    Parameters
    - - -
    [in]txOctetsThe preferred number of payload octets to use (Range 0x001B-0x00FB).
    -
    -
    -
  • -
- -
-
- -

◆ setPeerAddress()

- -
-
- - - - - - - - -
bool NimBLEClient::setPeerAddress (const NimBLEAddressaddress)
-
- -

Set the peer address.

-
Parameters
- - -
[in]addressThe address of the peer that this client is connected or should connect to.
-
-
-
Returns
True if successful.
- -
-
- -

◆ setSelfDelete()

- -
-
- - - - - - - - - - - - - - - - - - -
void NimBLEClient::setSelfDelete (bool deleteOnDisconnect,
bool deleteOnConnectFail 
)
-
- -

Set or unset a flag to delete this client when disconnected or connection failed.

-
Parameters
- - - -
[in]deleteOnDisconnectSet the client to self delete when disconnected.
[in]deleteOnConnectFailSet the client to self delete when a connection attempt fails.
-
-
- -
-
- -

◆ setValue()

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
bool NimBLEClient::setValue (const NimBLEUUIDserviceUUID,
const NimBLEUUIDcharacteristicUUID,
const NimBLEAttValuevalue,
bool response = false 
)
-
- -

Set the value of a specific characteristic associated with a specific service.

-
Parameters
- - - - - -
[in]serviceUUIDThe service that owns the characteristic.
[in]characteristicUUIDThe characteristic whose value we wish to write.
[in]valueThe value to write to the characteristic.
[in]responseIf true, uses write with response operation.
-
-
-
Returns
true if successful otherwise false
- -
-
- -

◆ toString()

- -
-
- - - - - - - -
std::string NimBLEClient::toString () const
-
- -

Return a string representation of this client.

-
Returns
A string representation of this client.
- -
-
- -

◆ updateConnParams()

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
bool NimBLEClient::updateConnParams (uint16_t minInterval,
uint16_t maxInterval,
uint16_t latency,
uint16_t timeout 
)
-
- -

Update the connection parameters:

-
    -
  • Can only be used after a connection has been established.
    Parameters
    - - - - - -
    [in]minIntervalThe minimum connection interval in 1.25ms units.
    [in]maxIntervalThe maximum connection interval in 1.25ms units.
    [in]latencyThe number of packets allowed to skip (extends max interval).
    [in]timeoutThe timeout time in 10ms units before disconnecting.
    -
    -
    -
  • -
- -
-
- -

◆ updatePhy()

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
bool NimBLEClient::updatePhy (uint8_t txPhyMask,
uint8_t rxPhyMask,
uint16_t phyOptions = 0 
)
-
- -

Request a change to the PHY used for this peer connection.

-
Parameters
- - - - -
[in]txPhyMaskTX PHY. Can be mask of following:
    -
  • BLE_GAP_LE_PHY_1M_MASK
  • -
  • BLE_GAP_LE_PHY_2M_MASK
  • -
  • BLE_GAP_LE_PHY_CODED_MASK
  • -
  • BLE_GAP_LE_PHY_ANY_MASK
  • -
-
[in]rxPhyMaskRX PHY. Can be mask of following:
    -
  • BLE_GAP_LE_PHY_1M_MASK
  • -
  • BLE_GAP_LE_PHY_2M_MASK
  • -
  • BLE_GAP_LE_PHY_CODED_MASK
  • -
  • BLE_GAP_LE_PHY_ANY_MASK
  • -
-
phyOptionsAdditional PHY options. Valid values are:
    -
  • BLE_GAP_LE_PHY_CODED_ANY (default)
  • -
  • BLE_GAP_LE_PHY_CODED_S2
  • -
  • BLE_GAP_LE_PHY_CODED_S8
  • -
-
-
-
-
Returns
True if successful.
- -
-
-
-
- - - - diff --git a/class_nim_b_l_e_client.js b/class_nim_b_l_e_client.js deleted file mode 100644 index 60674d6..0000000 --- a/class_nim_b_l_e_client.js +++ /dev/null @@ -1,41 +0,0 @@ -var class_nim_b_l_e_client = -[ - [ "begin", "class_nim_b_l_e_client.html#ab09639b499fdcd0021a2432b2b8203f5", null ], - [ "cancelConnect", "class_nim_b_l_e_client.html#af77b2a5390ea811e9405ff81dba8ecac", null ], - [ "connect", "class_nim_b_l_e_client.html#a26c8117d56d8b637780390a6506716be", null ], - [ "connect", "class_nim_b_l_e_client.html#a27e53c3746bc2d20ea7cfcea1a123cbf", null ], - [ "connect", "class_nim_b_l_e_client.html#a2b49bc73802bf716cf3df3b5a93f0543", null ], - [ "deleteService", "class_nim_b_l_e_client.html#a0f940c51807469db1f1802b742180beb", null ], - [ "deleteServices", "class_nim_b_l_e_client.html#a668d476de250055a106a9f46bb7719f3", null ], - [ "disconnect", "class_nim_b_l_e_client.html#a36b298b70a42d32b8d578869b0763140", null ], - [ "discoverAttributes", "class_nim_b_l_e_client.html#a1019178a12799ca2c3a84f523b3a7db9", null ], - [ "end", "class_nim_b_l_e_client.html#a0accd665926ea77d85ecb483b2b853fe", null ], - [ "exchangeMTU", "class_nim_b_l_e_client.html#a19d97b47f01f0862e04f3011752b2f2f", null ], - [ "getCharacteristic", "class_nim_b_l_e_client.html#a6b801e91a37745445499dadfb4c38597", null ], - [ "getConfig", "class_nim_b_l_e_client.html#ac053fba7c84201dc6e7455231cf99f4a", null ], - [ "getConnHandle", "class_nim_b_l_e_client.html#ac1e517e5a57b0bd05d4bafa66a17f1bd", null ], - [ "getConnInfo", "class_nim_b_l_e_client.html#a50b691f395c4dcf4b633efede0783805", null ], - [ "getLastError", "class_nim_b_l_e_client.html#aeb0593ebffa7e8833e5854480e41cce5", null ], - [ "getMTU", "class_nim_b_l_e_client.html#a7f3230e45ac77bd4cb50b5c270f9c74c", null ], - [ "getPeerAddress", "class_nim_b_l_e_client.html#a44a6f7f9379e2fc129c37915636db61f", null ], - [ "getPhy", "class_nim_b_l_e_client.html#a6ca4e212d5b69d4759bd695def020525", null ], - [ "getRssi", "class_nim_b_l_e_client.html#a2645d4a2f8e381bf9bbffdfca846ae17", null ], - [ "getService", "class_nim_b_l_e_client.html#ae22379ab10bd82932d2303fb3753c366", null ], - [ "getService", "class_nim_b_l_e_client.html#ad8ba10522d79af1136019606802f0978", null ], - [ "getServices", "class_nim_b_l_e_client.html#adefe48b87e8a814e1643cdb8c3759298", null ], - [ "getValue", "class_nim_b_l_e_client.html#a3903fb7589e2b8b781f8f81f9e0f2a83", null ], - [ "isConnected", "class_nim_b_l_e_client.html#a0bdaf55b06367d1abd6f59bfbe1e8689", null ], - [ "secureConnection", "class_nim_b_l_e_client.html#a2dac3bd373134ae6d22e3b5c96ed65ef", null ], - [ "setClientCallbacks", "class_nim_b_l_e_client.html#aeede4deef7421b9121387a786c07820c", null ], - [ "setConfig", "class_nim_b_l_e_client.html#ad89d8202400ecb573ce0e2ec5fc801dc", null ], - [ "setConnectionParams", "class_nim_b_l_e_client.html#a17718339f76eb621db0d7919c73b9267", null ], - [ "setConnectPhy", "class_nim_b_l_e_client.html#a004a85999b1ee4283e1e8e1e31090cca", null ], - [ "setConnectTimeout", "class_nim_b_l_e_client.html#aeb3675ab243ae6f0e4e7165cd07f7b80", null ], - [ "setDataLen", "class_nim_b_l_e_client.html#a4e8b16bb2c8ba3534bbd04803a411911", null ], - [ "setPeerAddress", "class_nim_b_l_e_client.html#a89d5aee4deaba953b8f77af75e3ee910", null ], - [ "setSelfDelete", "class_nim_b_l_e_client.html#a665a5ef97b3ab0307bccc54872d3c218", null ], - [ "setValue", "class_nim_b_l_e_client.html#a967d0c75083706f336f2283eac6d0de2", null ], - [ "toString", "class_nim_b_l_e_client.html#a8ead2efdfdf23db4f7847a133939cd75", null ], - [ "updateConnParams", "class_nim_b_l_e_client.html#ad168d34de0f57f91824a78688b88b2b8", null ], - [ "updatePhy", "class_nim_b_l_e_client.html#a165957953c2773dacc6a203c969f6069", null ] -]; \ No newline at end of file diff --git a/class_nim_b_l_e_client_callbacks-members.html b/class_nim_b_l_e_client_callbacks-members.html deleted file mode 100644 index c8fc588..0000000 --- a/class_nim_b_l_e_client_callbacks-members.html +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - -esp-nimble-cpp: Member List - - - - - - - - - - - - - -
-
- - - - - - -
-
esp-nimble-cpp 2.3.1 -
-
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
-
NimBLEClientCallbacks Member List
-
-
- -

This is the complete list of members for NimBLEClientCallbacks, including all inherited members.

- - - - - - - - - - - -
onAuthenticationComplete(NimBLEConnInfo &connInfo)NimBLEClientCallbacksvirtual
onConfirmPasskey(NimBLEConnInfo &connInfo, uint32_t pin)NimBLEClientCallbacksvirtual
onConnect(NimBLEClient *pClient)NimBLEClientCallbacksvirtual
onConnectFail(NimBLEClient *pClient, int reason)NimBLEClientCallbacksvirtual
onConnParamsUpdateRequest(NimBLEClient *pClient, const ble_gap_upd_params *params)NimBLEClientCallbacksvirtual
onDisconnect(NimBLEClient *pClient, int reason)NimBLEClientCallbacksvirtual
onIdentity(NimBLEConnInfo &connInfo)NimBLEClientCallbacksvirtual
onMTUChange(NimBLEClient *pClient, uint16_t MTU)NimBLEClientCallbacksvirtual
onPassKeyEntry(NimBLEConnInfo &connInfo)NimBLEClientCallbacksvirtual
onPhyUpdate(NimBLEClient *pClient, uint8_t txPhy, uint8_t rxPhy)NimBLEClientCallbacksvirtual
-
- - - - diff --git a/class_nim_b_l_e_client_callbacks.html b/class_nim_b_l_e_client_callbacks.html deleted file mode 100644 index 2527808..0000000 --- a/class_nim_b_l_e_client_callbacks.html +++ /dev/null @@ -1,570 +0,0 @@ - - - - - - - -esp-nimble-cpp: NimBLEClientCallbacks Class Reference - - - - - - - - - - - - - -
-
- - - - - - -
-
esp-nimble-cpp 2.3.1 -
-
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
- -
NimBLEClientCallbacks Class Reference
-
-
- -

Callbacks associated with a BLE client. - More...

- -

#include <NimBLEClient.h>

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

virtual void onConnect (NimBLEClient *pClient)
 Called after client connects.
 
virtual void onConnectFail (NimBLEClient *pClient, int reason)
 Called when a connection attempt fails.
 
virtual void onDisconnect (NimBLEClient *pClient, int reason)
 Called when disconnected from the server.
 
virtual bool onConnParamsUpdateRequest (NimBLEClient *pClient, const ble_gap_upd_params *params)
 Called when server requests to update the connection parameters.
 
virtual void onPassKeyEntry (NimBLEConnInfo &connInfo)
 Called when server requests a passkey for pairing.
 
virtual void onAuthenticationComplete (NimBLEConnInfo &connInfo)
 Called when the pairing procedure is complete.
 
virtual void onConfirmPasskey (NimBLEConnInfo &connInfo, uint32_t pin)
 Called when using numeric comparision for pairing.
 
virtual void onIdentity (NimBLEConnInfo &connInfo)
 Called when the peer identity address is resolved.
 
virtual void onMTUChange (NimBLEClient *pClient, uint16_t MTU)
 Called when the connection MTU changes.
 
virtual void onPhyUpdate (NimBLEClient *pClient, uint8_t txPhy, uint8_t rxPhy)
 Called when the PHY update procedure is complete.
 
-

Detailed Description

-

Callbacks associated with a BLE client.

-

Member Function Documentation

- -

◆ onAuthenticationComplete()

- -
-
- - - - - -
- - - - - - - - -
void NimBLEClientCallbacks::onAuthenticationComplete (NimBLEConnInfoconnInfo)
-
-virtual
-
- -

Called when the pairing procedure is complete.

-
Parameters
- - -
[in]connInfoA reference to a NimBLEConnInfo instance containing the peer info.
-This can be used to check the status of the connection encryption/pairing.
-
-
- -
-
- -

◆ onConfirmPasskey()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
void NimBLEClientCallbacks::onConfirmPasskey (NimBLEConnInfoconnInfo,
uint32_t pin 
)
-
-virtual
-
- -

Called when using numeric comparision for pairing.

-
Parameters
- - - -
[in]connInfoA reference to a NimBLEConnInfo instance containing the peer info.
[in]pinThe pin to compare with the server.
-
-
- -
-
- -

◆ onConnect()

- -
-
- - - - - -
- - - - - - - - -
void NimBLEClientCallbacks::onConnect (NimBLEClientpClient)
-
-virtual
-
- -

Called after client connects.

-
Parameters
- - -
[in]pClientA pointer to the connecting client object.
-
-
- -
-
- -

◆ onConnectFail()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
void NimBLEClientCallbacks::onConnectFail (NimBLEClientpClient,
int reason 
)
-
-virtual
-
- -

Called when a connection attempt fails.

-
Parameters
- - - -
[in]pClientA pointer to the connecting client object.
[in]reasonContains the reason code for the connection failure.
-
-
- -
-
- -

◆ onConnParamsUpdateRequest()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
bool NimBLEClientCallbacks::onConnParamsUpdateRequest (NimBLEClientpClient,
const ble_gap_upd_params * params 
)
-
-virtual
-
- -

Called when server requests to update the connection parameters.

-
Parameters
- - - -
[in]pClientA pointer to the calling client object.
[in]paramsA pointer to the struct containing the connection parameters requested.
-
-
-
Returns
True to accept the parameters.
- -
-
- -

◆ onDisconnect()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
void NimBLEClientCallbacks::onDisconnect (NimBLEClientpClient,
int reason 
)
-
-virtual
-
- -

Called when disconnected from the server.

-
Parameters
- - - -
[in]pClientA pointer to the calling client object.
[in]reasonContains the reason code for the disconnection.
-
-
- -
-
- -

◆ onIdentity()

- -
-
- - - - - -
- - - - - - - - -
void NimBLEClientCallbacks::onIdentity (NimBLEConnInfoconnInfo)
-
-virtual
-
- -

Called when the peer identity address is resolved.

-
Parameters
- - -
[in]connInfoA reference to a NimBLEConnInfo instance with information
-
-
- -
-
- -

◆ onMTUChange()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
void NimBLEClientCallbacks::onMTUChange (NimBLEClientpClient,
uint16_t MTU 
)
-
-virtual
-
- -

Called when the connection MTU changes.

-
Parameters
- - - -
[in]pClientA pointer to the client that the MTU change is associated with.
[in]MTUThe new MTU value. about the peer connection parameters.
-
-
- -
-
- -

◆ onPassKeyEntry()

- -
-
- - - - - -
- - - - - - - - -
void NimBLEClientCallbacks::onPassKeyEntry (NimBLEConnInfoconnInfo)
-
-virtual
-
- -

Called when server requests a passkey for pairing.

-
Parameters
- - -
[in]connInfoA reference to a NimBLEConnInfo instance containing the peer info.
-
-
- -
-
- -

◆ onPhyUpdate()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
void NimBLEClientCallbacks::onPhyUpdate (NimBLEClientpClient,
uint8_t txPhy,
uint8_t rxPhy 
)
-
-virtual
-
- -

Called when the PHY update procedure is complete.

-
Parameters
- - - - -
[in]pClientA pointer to the client whose PHY was updated. about the peer connection parameters.
[in]txPhyThe transmit PHY.
[in]rxPhyThe receive PHY. Possible values:
    -
  • BLE_GAP_LE_PHY_1M
  • -
  • BLE_GAP_LE_PHY_2M
  • -
  • BLE_GAP_LE_PHY_CODED
  • -
-
-
-
- -
-
-
-
- - - - diff --git a/class_nim_b_l_e_client_callbacks.js b/class_nim_b_l_e_client_callbacks.js deleted file mode 100644 index bd962e2..0000000 --- a/class_nim_b_l_e_client_callbacks.js +++ /dev/null @@ -1,13 +0,0 @@ -var class_nim_b_l_e_client_callbacks = -[ - [ "onAuthenticationComplete", "class_nim_b_l_e_client_callbacks.html#ae8e2abef6949ac87abf5ecad1a4dfe35", null ], - [ "onConfirmPasskey", "class_nim_b_l_e_client_callbacks.html#a6e7cfa81cd43420f78d6da727c67928b", null ], - [ "onConnect", "class_nim_b_l_e_client_callbacks.html#a96de53d9745f243d544cd89498f979ae", null ], - [ "onConnectFail", "class_nim_b_l_e_client_callbacks.html#ad0eb6bee07ef8c41dd8924aaca3bc71e", null ], - [ "onConnParamsUpdateRequest", "class_nim_b_l_e_client_callbacks.html#a8bc6a072e1cc974ef084eb2cad18dac6", null ], - [ "onDisconnect", "class_nim_b_l_e_client_callbacks.html#ad618179ade926482a7f2d94b0deabd69", null ], - [ "onIdentity", "class_nim_b_l_e_client_callbacks.html#ac03333d26d570e55b285da460c0def76", null ], - [ "onMTUChange", "class_nim_b_l_e_client_callbacks.html#a92662eb9ecf882b2c55bc6d9b4de97bc", null ], - [ "onPassKeyEntry", "class_nim_b_l_e_client_callbacks.html#aacb0b757e6e7c7984d8389c83fe1937d", null ], - [ "onPhyUpdate", "class_nim_b_l_e_client_callbacks.html#a4e91ebb66e46b7f3ccc6291ece0b549c", null ] -]; \ No newline at end of file diff --git a/class_nim_b_l_e_conn_info-members.html b/class_nim_b_l_e_conn_info-members.html index dac7552..5a724fa 100644 --- a/class_nim_b_l_e_conn_info-members.html +++ b/class_nim_b_l_e_conn_info-members.html @@ -25,7 +25,7 @@ -
esp-nimble-cpp 2.3.1 +
esp-nimble-cpp 2.3.2
diff --git a/class_nim_b_l_e_conn_info.html b/class_nim_b_l_e_conn_info.html index afd4e3b..e11defd 100644 --- a/class_nim_b_l_e_conn_info.html +++ b/class_nim_b_l_e_conn_info.html @@ -25,7 +25,7 @@ -
esp-nimble-cpp 2.3.1 +
esp-nimble-cpp 2.3.2
diff --git a/class_nim_b_l_e_descriptor-members.html b/class_nim_b_l_e_descriptor-members.html deleted file mode 100644 index a61ac53..0000000 --- a/class_nim_b_l_e_descriptor-members.html +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - -esp-nimble-cpp: Member List - - - - - - - - - - - - - -
-
- - - - - - -
-
esp-nimble-cpp 2.3.1 -
-
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
-
NimBLEDescriptor Member List
-
-
- -

This is the complete list of members for NimBLEDescriptor, including all inherited members.

- - - - - - - - - - - - - - -
getCharacteristic() constNimBLEDescriptor
getHandle() constNimBLEAttributeinline
getRemoved() constNimBLELocalAttributeinline
getUUID() constNimBLEAttributeinline
NimBLEAttribute(const NimBLEUUID &uuid, uint16_t handle)NimBLEAttributeinlineprotected
NimBLEDescriptor(const char *uuid, uint16_t properties, uint16_t maxLen, NimBLECharacteristic *pCharacteristic=nullptr)NimBLEDescriptor
NimBLEDescriptor(const NimBLEUUID &uuid, uint16_t properties, uint16_t maxLen, NimBLECharacteristic *pCharacteristic=nullptr)NimBLEDescriptor
NimBLELocalAttribute(const NimBLEUUID &uuid, uint16_t handle)NimBLELocalAttributeinlineprotected
setCallbacks(NimBLEDescriptorCallbacks *pCallbacks)NimBLEDescriptor
setRemoved(uint8_t removed)NimBLELocalAttributeinlineprotected
toString() constNimBLEDescriptor
~NimBLEAttribute()=defaultNimBLEAttributeprotected
~NimBLELocalAttribute()=defaultNimBLELocalAttributeprotected
-
- - - - diff --git a/class_nim_b_l_e_descriptor.html b/class_nim_b_l_e_descriptor.html deleted file mode 100644 index 863091d..0000000 --- a/class_nim_b_l_e_descriptor.html +++ /dev/null @@ -1,308 +0,0 @@ - - - - - - - -esp-nimble-cpp: NimBLEDescriptor Class Reference - - - - - - - - - - - - - -
-
- - - - - - -
-
esp-nimble-cpp 2.3.1 -
-
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
- -
NimBLEDescriptor Class Reference
-
-
- -

A model of a BLE descriptor. - More...

- -

#include <NimBLEDescriptor.h>

- -

Inherits NimBLELocalValueAttribute.

- -

Inherited by NimBLE2904.

- - - - - - - - - - - - - - - - - -

-Public Member Functions

 NimBLEDescriptor (const char *uuid, uint16_t properties, uint16_t maxLen, NimBLECharacteristic *pCharacteristic=nullptr)
 Construct a descriptor.
 
 NimBLEDescriptor (const NimBLEUUID &uuid, uint16_t properties, uint16_t maxLen, NimBLECharacteristic *pCharacteristic=nullptr)
 Construct a descriptor.
 
std::string toString () const
 Return a string representation of the descriptor.
 
void setCallbacks (NimBLEDescriptorCallbacks *pCallbacks)
 Set the callback handlers for this descriptor.
 
NimBLECharacteristicgetCharacteristic () const
 Get the characteristic this descriptor belongs to.
 
-

Detailed Description

-

A model of a BLE descriptor.

-

Constructor & Destructor Documentation

- -

◆ NimBLEDescriptor() [1/2]

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NimBLEDescriptor::NimBLEDescriptor (const char * uuid,
uint16_t properties,
uint16_t max_len,
NimBLECharacteristicpCharacteristic = nullptr 
)
-
- -

Construct a descriptor.

-
Parameters
- - - - - -
[in]uuid- UUID (const char*) for the descriptor.
[in]properties- Properties for the descriptor.
[in]max_len- The maximum length in bytes that the descriptor value can hold. (Default: 512 bytes for esp32, 20 for all others).
[in]pCharacteristic- pointer to the characteristic instance this descriptor belongs to.
-
-
- -
-
- -

◆ NimBLEDescriptor() [2/2]

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NimBLEDescriptor::NimBLEDescriptor (const NimBLEUUIDuuid,
uint16_t properties,
uint16_t max_len,
NimBLECharacteristicpCharacteristic = nullptr 
)
-
- -

Construct a descriptor.

-
Parameters
- - - - - -
[in]uuid- UUID (const char*) for the descriptor.
[in]properties- Properties for the descriptor.
[in]max_len- The maximum length in bytes that the descriptor value can hold. (Default: 512 bytes for esp32, 20 for all others).
[in]pCharacteristic- pointer to the characteristic instance this descriptor belongs to.
-
-
- -
-
-

Member Function Documentation

- -

◆ getCharacteristic()

- -
-
- - - - - - - -
NimBLECharacteristic * NimBLEDescriptor::getCharacteristic () const
-
- -

Get the characteristic this descriptor belongs to.

-
Returns
A pointer to the characteristic this descriptor belongs to.
- -
-
- -

◆ setCallbacks()

- -
-
- - - - - - - - -
void NimBLEDescriptor::setCallbacks (NimBLEDescriptorCallbackspCallbacks)
-
- -

Set the callback handlers for this descriptor.

-
Parameters
- - -
[in]pCallbacksAn instance of a callback structure used to define any callbacks for the descriptor.
-
-
- -
-
- -

◆ toString()

- -
-
- - - - - - - -
std::string NimBLEDescriptor::toString () const
-
- -

Return a string representation of the descriptor.

-
Returns
A string representation of the descriptor.
- -
-
-
-
- - - - diff --git a/class_nim_b_l_e_descriptor.js b/class_nim_b_l_e_descriptor.js deleted file mode 100644 index d3b464c..0000000 --- a/class_nim_b_l_e_descriptor.js +++ /dev/null @@ -1,8 +0,0 @@ -var class_nim_b_l_e_descriptor = -[ - [ "NimBLEDescriptor", "class_nim_b_l_e_descriptor.html#acdae256772e6ba433df5ff3217335a1b", null ], - [ "NimBLEDescriptor", "class_nim_b_l_e_descriptor.html#a9b371ae4807648762cad1346ba6fd3c3", null ], - [ "getCharacteristic", "class_nim_b_l_e_descriptor.html#aa61b5f14156e9f378688ec875cf48309", null ], - [ "setCallbacks", "class_nim_b_l_e_descriptor.html#aa9cb8727f9e17cf8050cf619e5fe3096", null ], - [ "toString", "class_nim_b_l_e_descriptor.html#a83b589a2022bbd86743b0ee4c3670a37", null ] -]; \ No newline at end of file diff --git a/class_nim_b_l_e_descriptor_callbacks-members.html b/class_nim_b_l_e_descriptor_callbacks-members.html deleted file mode 100644 index 4af7cec..0000000 --- a/class_nim_b_l_e_descriptor_callbacks-members.html +++ /dev/null @@ -1,109 +0,0 @@ - - - - - - - -esp-nimble-cpp: Member List - - - - - - - - - - - - - -
-
- - - - - - -
-
esp-nimble-cpp 2.3.1 -
-
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
-
NimBLEDescriptorCallbacks Member List
-
-
- -

This is the complete list of members for NimBLEDescriptorCallbacks, including all inherited members.

- - - -
onRead(NimBLEDescriptor *pDescriptor, NimBLEConnInfo &connInfo)NimBLEDescriptorCallbacksvirtual
onWrite(NimBLEDescriptor *pDescriptor, NimBLEConnInfo &connInfo)NimBLEDescriptorCallbacksvirtual
-
- - - - diff --git a/class_nim_b_l_e_descriptor_callbacks.html b/class_nim_b_l_e_descriptor_callbacks.html deleted file mode 100644 index 05d8fd5..0000000 --- a/class_nim_b_l_e_descriptor_callbacks.html +++ /dev/null @@ -1,217 +0,0 @@ - - - - - - - -esp-nimble-cpp: NimBLEDescriptorCallbacks Class Reference - - - - - - - - - - - - - -
-
- - - - - - -
-
esp-nimble-cpp 2.3.1 -
-
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
- -
NimBLEDescriptorCallbacks Class Reference
-
-
- -

Callbacks that can be associated with a BLE descriptors to inform of events. - More...

- -

#include <NimBLEDescriptor.h>

- - - - - - - - -

-Public Member Functions

virtual void onRead (NimBLEDescriptor *pDescriptor, NimBLEConnInfo &connInfo)
 Callback function to support a read request.
 
virtual void onWrite (NimBLEDescriptor *pDescriptor, NimBLEConnInfo &connInfo)
 Callback function to support a write request.
 
-

Detailed Description

-

Callbacks that can be associated with a BLE descriptors to inform of events.

-

When a server application creates a BLE descriptor, we may wish to be informed when there is either a read or write request to the descriptors value. An application can register a sub-classed instance of this class and will be notified when such an event happens.

-

Member Function Documentation

- -

◆ onRead()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
void NimBLEDescriptorCallbacks::onRead (NimBLEDescriptorpDescriptor,
NimBLEConnInfoconnInfo 
)
-
-virtual
-
- -

Callback function to support a read request.

-
Parameters
- - - -
[in]pDescriptorThe descriptor that is the source of the event.
[in]connInfoA reference to a NimBLEConnInfo instance containing the peer info.
-
-
- -
-
- -

◆ onWrite()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
void NimBLEDescriptorCallbacks::onWrite (NimBLEDescriptorpDescriptor,
NimBLEConnInfoconnInfo 
)
-
-virtual
-
- -

Callback function to support a write request.

-
Parameters
- - - -
[in]pDescriptorThe descriptor that is the source of the event.
[in]connInfoA reference to a NimBLEConnInfo instance containing the peer info.
-
-
- -
-
-
-
- - - - diff --git a/class_nim_b_l_e_descriptor_callbacks.js b/class_nim_b_l_e_descriptor_callbacks.js deleted file mode 100644 index dc585d9..0000000 --- a/class_nim_b_l_e_descriptor_callbacks.js +++ /dev/null @@ -1,5 +0,0 @@ -var class_nim_b_l_e_descriptor_callbacks = -[ - [ "onRead", "class_nim_b_l_e_descriptor_callbacks.html#a061576b56702a6aca62a38f2ba27ba98", null ], - [ "onWrite", "class_nim_b_l_e_descriptor_callbacks.html#a2872d9e602d4e23cc63f55f5b2f76dd7", null ] -]; \ No newline at end of file diff --git a/class_nim_b_l_e_device-members.html b/class_nim_b_l_e_device-members.html index 61c7976..5bb2fc4 100644 --- a/class_nim_b_l_e_device-members.html +++ b/class_nim_b_l_e_device-members.html @@ -25,7 +25,7 @@ -
esp-nimble-cpp 2.3.1 +
esp-nimble-cpp 2.3.2
@@ -95,60 +95,37 @@ $(document).ready(function(){initNavTree('class_nim_b_l_e_device.html',''); init

This is the complete list of members for NimBLEDevice, including all inherited members.

- - - - - - - + - - - - - - - - - + - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + +
createClient()NimBLEDevicestatic
createClient(const NimBLEAddress &peerAddress)NimBLEDevicestatic
createServer()NimBLEDevicestatic
deinit(bool clearAll=false)NimBLEDevicestatic
deleteAllBonds()NimBLEDevicestatic
deleteBond(const NimBLEAddress &address)NimBLEDevicestatic
deleteClient(NimBLEClient *pClient)NimBLEDevicestatic
deinit(bool clearAll=false)NimBLEDevicestatic
getAddress()NimBLEDevicestatic
getAdvertising()NimBLEDevicestatic
getBondedAddress(int index)NimBLEDevicestatic
getClientByHandle(uint16_t connHandle)NimBLEDevicestatic
getClientByPeerAddress(const NimBLEAddress &peerAddress)NimBLEDevicestatic
getConnectedClients()NimBLEDevicestatic
getCreatedClientCount()NimBLEDevicestatic
getDisconnectedClient()NimBLEDevicestatic
getMTU()NimBLEDevicestatic
getNumBonds()NimBLEDevicestatic
getMTU()NimBLEDevicestatic
getPower(NimBLETxPowerType type=NimBLETxPowerType::All)NimBLEDevicestatic
getScan()NimBLEDevicestatic
getSecurityPasskey()NimBLEDevicestatic
getServer()NimBLEDevicestatic
getSecurityPasskey()NimBLEDevicestatic
getWhiteListAddress(size_t index)NimBLEDevicestatic
getWhiteListCount()NimBLEDevicestatic
host_task(void *param)NimBLEDevicestatic
init(const std::string &deviceName)NimBLEDevicestatic
injectConfirmPasskey(const NimBLEConnInfo &peerInfo, bool accept)NimBLEDevicestatic
injectPassKey(const NimBLEConnInfo &peerInfo, uint32_t pin)NimBLEDevicestatic
isBonded(const NimBLEAddress &address)NimBLEDevicestatic
isInitialized()NimBLEDevicestatic
onReset(int reason)NimBLEDevicestatic
onSync(void)NimBLEDevicestatic
onWhiteList(const NimBLEAddress &address)NimBLEDevicestatic
setCustomGapHandler(gap_event_handler handler)NimBLEDevicestatic
setDefaultPhy(uint8_t txPhyMask, uint8_t rxPhyMask)NimBLEDevicestatic
setDeviceName(const std::string &deviceName)NimBLEDevicestatic
setMTU(uint16_t mtu)NimBLEDevicestatic
setOwnAddr(const NimBLEAddress &addr)NimBLEDevicestatic
setOwnAddr(const uint8_t *addr)NimBLEDevicestatic
setOwnAddrType(uint8_t type)NimBLEDevicestatic
setPower(int8_t dbm, NimBLETxPowerType type=NimBLETxPowerType::All)NimBLEDevicestatic
setSecurityAuth(bool bonding, bool mitm, bool sc)NimBLEDevicestatic
setSecurityAuth(uint8_t auth)NimBLEDevicestatic
setSecurityInitKey(uint8_t initKey)NimBLEDevicestatic
setSecurityIOCap(uint8_t iocap)NimBLEDevicestatic
setSecurityPasskey(uint32_t passKey)NimBLEDevicestatic
setSecurityRespKey(uint8_t respKey)NimBLEDevicestatic
startAdvertising(uint8_t instId, int duration=0, int maxEvents=0)NimBLEDevicestatic
startAdvertising(uint32_t duration=0)NimBLEDevicestatic
startSecurity(uint16_t connHandle, int *rcPtr=nullptr)NimBLEDevicestatic
stopAdvertising(uint8_t instId)NimBLEDevicestatic
stopAdvertising()NimBLEDevicestatic
toString()NimBLEDevicestatic
whiteListAdd(const NimBLEAddress &address)NimBLEDevicestatic
whiteListRemove(const NimBLEAddress &address)NimBLEDevicestatic
isInitialized()NimBLEDevicestatic
onReset(int reason)NimBLEDevicestatic
onSync(void)NimBLEDevicestatic
onWhiteList(const NimBLEAddress &address)NimBLEDevicestatic
setCustomGapHandler(gap_event_handler handler)NimBLEDevicestatic
setDefaultPhy(uint8_t txPhyMask, uint8_t rxPhyMask)NimBLEDevicestatic
setDeviceName(const std::string &deviceName)NimBLEDevicestatic
setMTU(uint16_t mtu)NimBLEDevicestatic
setOwnAddr(const NimBLEAddress &addr)NimBLEDevicestatic
setOwnAddr(const uint8_t *addr)NimBLEDevicestatic
setOwnAddrType(uint8_t type)NimBLEDevicestatic
setPower(int8_t dbm, NimBLETxPowerType type=NimBLETxPowerType::All)NimBLEDevicestatic
setSecurityAuth(bool bonding, bool mitm, bool sc)NimBLEDevicestatic
setSecurityAuth(uint8_t auth)NimBLEDevicestatic
setSecurityInitKey(uint8_t initKey)NimBLEDevicestatic
setSecurityIOCap(uint8_t iocap)NimBLEDevicestatic
setSecurityPasskey(uint32_t passKey)NimBLEDevicestatic
setSecurityRespKey(uint8_t respKey)NimBLEDevicestatic
startSecurity(uint16_t connHandle, int *rcPtr=nullptr)NimBLEDevicestatic
toString()NimBLEDevicestatic
whiteListAdd(const NimBLEAddress &address)NimBLEDevicestatic
whiteListRemove(const NimBLEAddress &address)NimBLEDevicestatic
diff --git a/class_nim_b_l_e_device.html b/class_nim_b_l_e_device.html index 8f0732b..4759803 100644 --- a/class_nim_b_l_e_device.html +++ b/class_nim_b_l_e_device.html @@ -25,7 +25,7 @@ -
esp-nimble-cpp 2.3.1 +
esp-nimble-cpp 2.3.2
@@ -193,177 +193,15 @@ static void host_task  Get the transmission power.
  static bool setPower (int8_t dbm, NimBLETxPowerType type=NimBLETxPowerType::All) - Set the transmission power.
+ Retrieve the Scan object that we use for scanning.
  static bool setDefaultPhy (uint8_t txPhyMask, uint8_t rxPhyMask)  Set the preferred default phy to use for connections.
  -static NimBLEScangetScan () - Retrieve the Scan object that we use for scanning.
-  -static NimBLEServercreateServer () - Create an instance of a server.
-  -static NimBLEServergetServer () - Get the instance of the server.
-  -static bool injectConfirmPasskey (const NimBLEConnInfo &peerInfo, bool accept) - Inject the provided numeric comparison response into the Security Manager.
-  -static bool injectPassKey (const NimBLEConnInfo &peerInfo, uint32_t pin) - Inject the provided passkey into the Security Manager.
-  -static NimBLEExtAdvertisinggetAdvertising () - Get the instance of the extended advertising object.
-  -static bool startAdvertising (uint8_t instId, int duration=0, int maxEvents=0) - Convenience function to begin advertising.
-  -static bool stopAdvertising (uint8_t instId) - Convenience function to stop advertising a data set.
-  -static bool stopAdvertising () - Convenience function to stop all advertising.
-  -static bool startAdvertising (uint32_t duration=0) - Convenience function to begin advertising.
-  -static NimBLEClientcreateClient () - Creates a new client object, each client can connect to 1 peripheral device.
-  -static NimBLEClientcreateClient (const NimBLEAddress &peerAddress) - Creates a new client object, each client can connect to 1 peripheral device.
-  -static bool deleteClient (NimBLEClient *pClient) - Delete the client object and remove it from the list.
-Checks if it is connected or trying to connect and disconnects/stops it first.
-  -static NimBLEClientgetClientByHandle (uint16_t connHandle) - Get a reference to a client by connection handle.
-  -static NimBLEClientgetClientByPeerAddress (const NimBLEAddress &peerAddress) - Get a reference to a client by peer address.
-  -static NimBLEClientgetDisconnectedClient () - Finds the first disconnected client available.
-  -static size_t getCreatedClientCount () - Get the number of created client objects.
-  -static std::vector< NimBLEClient * > getConnectedClients () - Get a list of connected clients.
-  -static bool deleteBond (const NimBLEAddress &address) - Deletes a peer bond.
-  - -static int getNumBonds () - Gets the number of bonded peers stored.
-  -static bool isBonded (const NimBLEAddress &address) - Checks if a peer device is bonded.
-  -static bool deleteAllBonds () - Deletes all bonding information.
-  -static NimBLEAddress getBondedAddress (int index) - Get the address of a bonded peer device by index.

Detailed Description

A model of a BLE Device from which all the BLE roles are created.

Member Function Documentation

- -

◆ createClient() [1/2]

- -
-
- - - - - -
- - - - - - - -
NimBLEClient * NimBLEDevice::createClient ()
-
-static
-
- -

Creates a new client object, each client can connect to 1 peripheral device.

-
Returns
A pointer to the new client object, or nullptr on error.
- -
-
- -

◆ createClient() [2/2]

- -
-
- - - - - -
- - - - - - - - -
NimBLEClient * NimBLEDevice::createClient (const NimBLEAddresspeerAddress)
-
-static
-
- -

Creates a new client object, each client can connect to 1 peripheral device.

-
Parameters
- - -
[in]peerAddressA peer address reference that is copied to the new client object, allows for calling NimBLEClient::connect(bool) without a device or address parameter.
-
-
-
Returns
A pointer to the new client object, or nullptr on error.
- -
-
- -

◆ createServer()

- -
-
- - - - - -
- - - - - - - -
NimBLEServer * NimBLEDevice::createServer ()
-
-static
-
- -

Create an instance of a server.

-
Returns
A pointer to the instance of the server.
- -
-

◆ deinit()

@@ -397,104 +235,6 @@ static int getNumBonds
Note
If clearAll is true when called all objects created will be deleted and any references to the created objects become invalid. If clearAll is false, the objects will remain and can be used again after re-initializing the stack. If the stack was not already initialized, the objects created can be deleted when clearAll is true with no effect on the stack.
-
-
- -

◆ deleteAllBonds()

- -
-
- - - - - -
- - - - - - - -
bool NimBLEDevice::deleteAllBonds ()
-
-static
-
- -

Deletes all bonding information.

-
Returns
True on success.
- -
-
- -

◆ deleteBond()

- -
-
- - - - - -
- - - - - - - - -
bool NimBLEDevice::deleteBond (const NimBLEAddressaddress)
-
-static
-
- -

Deletes a peer bond.

-
Parameters
- - -
[in]addressThe address of the peer with which to delete bond info.
-
-
-
Returns
True on success.
- -
-
- -

◆ deleteClient()

- -
-
- - - - - -
- - - - - - - - -
bool NimBLEDevice::deleteClient (NimBLEClientpClient)
-
-static
-
- -

Delete the client object and remove it from the list.
-Checks if it is connected or trying to connect and disconnects/stops it first.

-
Parameters
- - -
[in]pClientA pointer to the client object.
-
-
-
@@ -523,226 +263,6 @@ Checks if it is connected or trying to connect and disconnects/stops it first. <

Get our device address.

Returns
A NimBLEAddress object with the currently used address, or a NULL address if not set.
-
-
- -

◆ getAdvertising()

- -
-
- - - - - -
- - - - - - - -
NimBLEAdvertising * NimBLEDevice::getAdvertising ()
-
-static
-
- -

Get the instance of the extended advertising object.

-

Get the instance of the advertising object.

-
Returns
A pointer to the extended advertising object.
-
-A pointer to the advertising object.
- -
-
- -

◆ getBondedAddress()

- -
-
- - - - - -
- - - - - - - - -
NimBLEAddress NimBLEDevice::getBondedAddress (int index)
-
-static
-
- -

Get the address of a bonded peer device by index.

-
Parameters
- - -
[in]indexThe index to retrieve the peer address of.
-
-
-
Returns
NimBLEAddress of the found bonded peer or null address if not found.
- -
-
- -

◆ getClientByHandle()

- -
-
- - - - - -
- - - - - - - - -
NimBLEClient * NimBLEDevice::getClientByHandle (uint16_t connHandle)
-
-static
-
- -

Get a reference to a client by connection handle.

-
Parameters
- - -
[in]connHandleThe client connection handle to search for.
-
-
-
Returns
A pointer to the client object with the specified connection handle or nullptr.
- -
-
- -

◆ getClientByPeerAddress()

- -
-
- - - - - -
- - - - - - - - -
NimBLEClient * NimBLEDevice::getClientByPeerAddress (const NimBLEAddressaddr)
-
-static
-
- -

Get a reference to a client by peer address.

-
Parameters
- - -
[in]addrThe address of the peer to search for.
-
-
-
Returns
A pointer to the client object with the peer address or nullptr.
- -
-
- -

◆ getConnectedClients()

- -
-
- - - - - -
- - - - - - - -
std::vector< NimBLEClient * > NimBLEDevice::getConnectedClients ()
-
-static
-
- -

Get a list of connected clients.

-
Returns
A vector of connected client objects.
- -
-
- -

◆ getCreatedClientCount()

- -
-
- - - - - -
- - - - - - - -
size_t NimBLEDevice::getCreatedClientCount ()
-
-static
-
- -

Get the number of created client objects.

-
Returns
Number of client objects created.
- -
-
- -

◆ getDisconnectedClient()

- -
-
- - - - - -
- - - - - - - -
NimBLEClient * NimBLEDevice::getDisconnectedClient ()
-
-static
-
- -

Finds the first disconnected client available.

-
Returns
A pointer to the first client object that is not connected to a peer or nullptr.
-
@@ -800,34 +320,6 @@ A pointer to the advertising object.

Get the transmission power.

Returns
The power level currently used in dbm or 0xFF on error.
-
-
- -

◆ getScan()

- -
-
- - - - - -
- - - - - - - -
NimBLEScan * NimBLEDevice::getScan ()
-
-static
-
- -

Retrieve the Scan object that we use for scanning.

-
Returns
The scanning object reference. This is a singleton object. The caller should not try and release/delete it.
-
@@ -856,34 +348,6 @@ A pointer to the advertising object.

Get the current passkey used for pairing.

Returns
The current passkey.
-
-
- -

◆ getServer()

- -
-
- - - - - -
- - - - - - - -
NimBLEServer * NimBLEDevice::getServer ()
-
-static
-
- -

Get the instance of the server.

-
Returns
A pointer to the server instance or nullptr if none have been created.
-
@@ -981,132 +445,6 @@ A pointer to the advertising object. -
- - -

◆ injectConfirmPasskey()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
bool NimBLEDevice::injectConfirmPasskey (const NimBLEConnInfopeerInfo,
bool accept 
)
-
-static
-
- -

Inject the provided numeric comparison response into the Security Manager.

-
Parameters
- - - -
[in]peerInfoConnection information for the peer.
[in]acceptWhether the user confirmed or declined the comparison.
-
-
- -
-
- -

◆ injectPassKey()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
bool NimBLEDevice::injectPassKey (const NimBLEConnInfopeerInfo,
uint32_t passkey 
)
-
-static
-
- -

Inject the provided passkey into the Security Manager.

-
Parameters
- - - -
[in]peerInfoConnection information for the peer.
[in]passkeyThe 6-digit passkey to inject.
-
-
-
Returns
true if the passkey was injected successfully.
- -
-
- -

◆ isBonded()

- -
-
- - - - - -
- - - - - - - - -
bool NimBLEDevice::isBonded (const NimBLEAddressaddress)
-
-static
-
- -

Checks if a peer device is bonded.

-
Parameters
- - -
[in]addressThe address to check for bonding.
-
-
-
Returns
True if bonded.
-
@@ -1517,8 +855,9 @@ A pointer to the advertising object.
-

Set the transmission power.

-
Parameters
+

Retrieve the Scan object that we use for scanning.

+
Returns
The scanning object reference. This is a singleton object. The caller should not try and release/delete it.
+

Set the transmission power.

Parameters
[in]dbmThe power level to set in dBm.
@@ -1775,94 +1114,6 @@ The available bits are defined as:
-
- - -

◆ startAdvertising() [1/2]

- -
-
- - - - - -
- - - - - - - - -
bool NimBLEDevice::startAdvertising (uint32_t duration = 0)
-
-static
-
- -

Convenience function to begin advertising.

-
Parameters
- - -
[in]durationThe duration in milliseconds to advertise for, default = forever.
-
-
-
Returns
True if advertising started successfully.
- -
-
- -

◆ startAdvertising() [2/2]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
bool NimBLEDevice::startAdvertising (uint8_t instId,
int duration = 0,
int maxEvents = 0 
)
-
-static
-
- -

Convenience function to begin advertising.

-
Parameters
- - - - -
[in]instIdThe extended advertisement instance ID to start.
[in]durationHow long to advertise for in milliseconds, 0 = forever (default).
[in]maxEventsMaximum number of advertisement events to send, 0 = no limit (default).
-
-
-
Returns
True if advertising started successfully.
-
@@ -1909,69 +1160,6 @@ The available bits are defined as:

@@ -167,9 +167,9 @@ BLE UUID's

Server

[2.1.1] 2025-01-26

-

+

Fixed

[2.1.0] 2025-01-12

-

+

Fixed

-

+

Changed

Added

@@ -188,20 +203,20 @@ Added

[2.0.3] 2025-01-05

-

+

Fixed

-

+

Changed

Added

@@ -213,26 +228,26 @@ Added

[2.0.2] 2024-12-21

-

+

Fixed

-

+

Changed

[2.0.1] 2024-12-16

-

+

Fixed

-

+

Changed

-

+

Fixed

-

+

Changed