esp-nimble-cpp/_nim_b_l_e_client_8h_source.html

345 lines
64 KiB
HTML
Raw Permalink Normal View History

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>esp-nimble-cpp: /github/workspace/src/NimBLEClient.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr id="projectrow">
<td id="projectalign">
<div id="projectname">esp-nimble-cpp<span id="projectnumber">&#160;2.0.2</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.8 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function() { init_codefold(0); });
/* @license-end */
</script>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('_nim_b_l_e_client_8h_source.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div class="header">
<div class="headertitle"><div class="title">NimBLEClient.h</div></div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span><span class="comment">/*</span></div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno"> 2</span><span class="comment"> * Copyright 2020-2024 Ryan Powell &lt;ryan@nable-embedded.io&gt; and</span></div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno"> 3</span><span class="comment"> * esp-nimble-cpp, NimBLE-Arduino contributors.</span></div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span><span class="comment"> *</span></div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span><span class="comment"> * Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);</span></div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span><span class="comment"> * you may not use this file except in compliance with the License.</span></div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span><span class="comment"> * You may obtain a copy of the License at</span></div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span><span class="comment"> *</span></div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span><span class="comment"> * http://www.apache.org/licenses/LICENSE-2.0</span></div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span><span class="comment"> *</span></div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span><span class="comment"> * Unless required by applicable law or agreed to in writing, software</span></div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span><span class="comment"> * distributed under the License is distributed on an &quot;AS IS&quot; BASIS,</span></div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span><span class="comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span></div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span><span class="comment"> * See the License for the specific language governing permissions and</span></div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span><span class="comment"> * limitations under the License.</span></div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span><span class="comment"> */</span></div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span> </div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span><span class="preprocessor">#ifndef NIMBLE_CPP_CLIENT_H_</span></div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span><span class="preprocessor">#define NIMBLE_CPP_CLIENT_H_</span></div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span> </div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span><span class="preprocessor">#include &quot;<a class="code" href="nimconfig_8h.html">nimconfig.h</a>&quot;</span></div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span><span class="preprocessor">#if defined(CONFIG_BT_ENABLED) &amp;&amp; defined(CONFIG_BT_NIMBLE_ROLE_CENTRAL)</span></div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span> </div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span><span class="preprocessor"># if defined(CONFIG_NIMBLE_CPP_IDF)</span></div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span><span class="preprocessor"># include &quot;host/ble_gap.h&quot;</span></div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span><span class="preprocessor"># else</span></div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span><span class="preprocessor"># include &quot;nimble/nimble/host/include/host/ble_gap.h&quot;</span></div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span><span class="preprocessor"># endif</span></div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span> </div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span><span class="preprocessor"># include &quot;NimBLEAddress.h&quot;</span></div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span> </div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span><span class="preprocessor"># include &lt;stdint.h&gt;</span></div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span><span class="preprocessor"># include &lt;vector&gt;</span></div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span><span class="preprocessor"># include &lt;string&gt;</span></div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span> </div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span><span class="keyword">class </span><a class="code hl_class" href="class_nim_b_l_e_address.html">NimBLEAddress</a>;</div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span><span class="keyword">class </span><a class="code hl_class" href="class_nim_b_l_e_u_u_i_d.html">NimBLEUUID</a>;</div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span><span class="keyword">class </span><a class="code hl_class" href="class_nim_b_l_e_remote_service.html">NimBLERemoteService</a>;</div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span><span class="keyword">class </span><a class="code hl_class" href="class_nim_b_l_e_remote_characteristic.html">NimBLERemoteCharacteristic</a>;</div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span><span class="keyword">class </span><a class="code hl_class" href="class_nim_b_l_e_advertised_device.html">NimBLEAdvertisedDevice</a>;</div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span><span class="keyword">class </span><a class="code hl_class" href="class_nim_b_l_e_att_value.html">NimBLEAttValue</a>;</div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span><span class="keyword">class </span><a class="code hl_class" href="class_nim_b_l_e_client_callbacks.html">NimBLEClientCallbacks</a>;</div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span><span class="keyword">class </span><a class="code hl_class" href="class_nim_b_l_e_conn_info.html">NimBLEConnInfo</a>;</div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span><span class="keyword">struct </span><a class="code hl_struct" href="struct_nim_b_l_e_task_data.html">NimBLETaskData</a>;</div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> </div>
<div class="foldopen" id="foldopen00049" data-start="{" data-end="};">
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"><a class="line" href="class_nim_b_l_e_client.html"> 49</a></span><span class="keyword">class </span><a class="code hl_class" href="class_nim_b_l_e_client.html">NimBLEClient</a> {</div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span> <span class="keyword">public</span>:</div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="class_nim_b_l_e_client.html#a2b49bc73802bf716cf3df3b5a93f0543">connect</a>(<span class="keyword">const</span> <a class="code hl_class" href="class_nim_b_l_e_advertised_device.html">NimBLEAdvertisedDevice</a>* device,</div>
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> <span class="keywordtype">bool</span> deleteAttributes = <span class="keyword">true</span>,</div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> <span class="keywordtype">bool</span> asyncConnect = <span class="keyword">false</span>,</div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="class_nim_b_l_e_client.html#a19d97b47f01f0862e04f3011752b2f2f">exchangeMTU</a> = <span class="keyword">true</span>);</div>
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="class_nim_b_l_e_client.html#a2b49bc73802bf716cf3df3b5a93f0543">connect</a>(<span class="keyword">const</span> <a class="code hl_class" href="class_nim_b_l_e_address.html">NimBLEAddress</a>&amp; address, <span class="keywordtype">bool</span> deleteAttributes = <span class="keyword">true</span>, <span class="keywordtype">bool</span> asyncConnect = <span class="keyword">false</span>, <span class="keywordtype">bool</span> <a class="code hl_function" href="class_nim_b_l_e_client.html#a19d97b47f01f0862e04f3011752b2f2f">exchangeMTU</a> = <span class="keyword">true</span>);</div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="class_nim_b_l_e_client.html#a2b49bc73802bf716cf3df3b5a93f0543">connect</a>(<span class="keywordtype">bool</span> deleteAttributes = <span class="keyword">true</span>, <span class="keywordtype">bool</span> asyncConnect = <span class="keyword">false</span>, <span class="keywordtype">bool</span> <a class="code hl_function" href="class_nim_b_l_e_client.html#a19d97b47f01f0862e04f3011752b2f2f">exchangeMTU</a> = <span class="keyword">true</span>);</div>
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="class_nim_b_l_e_client.html#a36b298b70a42d32b8d578869b0763140">disconnect</a>(uint8_t reason = BLE_ERR_REM_USER_CONN_TERM);</div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="class_nim_b_l_e_client.html#af77b2a5390ea811e9405ff81dba8ecac">cancelConnect</a>() <span class="keyword">const</span>;</div>
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span> <span class="keywordtype">void</span> <a class="code hl_function" href="class_nim_b_l_e_client.html#a665a5ef97b3ab0307bccc54872d3c218">setSelfDelete</a>(<span class="keywordtype">bool</span> deleteOnDisconnect, <span class="keywordtype">bool</span> deleteOnConnectFail);</div>
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span> <a class="code hl_class" href="class_nim_b_l_e_address.html">NimBLEAddress</a> <a class="code hl_function" href="class_nim_b_l_e_client.html#a44a6f7f9379e2fc129c37915636db61f">getPeerAddress</a>() <span class="keyword">const</span>;</div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="class_nim_b_l_e_client.html#a89d5aee4deaba953b8f77af75e3ee910">setPeerAddress</a>(<span class="keyword">const</span> <a class="code hl_class" href="class_nim_b_l_e_address.html">NimBLEAddress</a>&amp; address);</div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span> <span class="keywordtype">int</span> <a class="code hl_function" href="class_nim_b_l_e_client.html#a2645d4a2f8e381bf9bbffdfca846ae17">getRssi</a>() <span class="keyword">const</span>;</div>
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="class_nim_b_l_e_client.html#a0bdaf55b06367d1abd6f59bfbe1e8689">isConnected</a>() <span class="keyword">const</span>;</div>
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span> <span class="keywordtype">void</span> <a class="code hl_function" href="class_nim_b_l_e_client.html#aeede4deef7421b9121387a786c07820c">setClientCallbacks</a>(<a class="code hl_class" href="class_nim_b_l_e_client_callbacks.html">NimBLEClientCallbacks</a>* pClientCallbacks, <span class="keywordtype">bool</span> deleteCallbacks = <span class="keyword">true</span>);</div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span> std::string <a class="code hl_function" href="class_nim_b_l_e_client.html#a8ead2efdfdf23db4f7847a133939cd75">toString</a>() <span class="keyword">const</span>;</div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> uint16_t <a class="code hl_function" href="class_nim_b_l_e_client.html#ac1e517e5a57b0bd05d4bafa66a17f1bd">getConnHandle</a>() <span class="keyword">const</span>;</div>
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> uint16_t <a class="code hl_function" href="class_nim_b_l_e_client.html#a7f3230e45ac77bd4cb50b5c270f9c74c">getMTU</a>() <span class="keyword">const</span>;</div>
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="class_nim_b_l_e_client.html#a19d97b47f01f0862e04f3011752b2f2f">exchangeMTU</a>();</div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="class_nim_b_l_e_client.html#a2dac3bd373134ae6d22e3b5c96ed65ef">secureConnection</a>(<span class="keywordtype">bool</span> async = <span class="keyword">false</span>) <span class="keyword">const</span>;</div>
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span> <span class="keywordtype">void</span> <a class="code hl_function" href="class_nim_b_l_e_client.html#aeb3675ab243ae6f0e4e7165cd07f7b80">setConnectTimeout</a>(uint32_t timeout);</div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="class_nim_b_l_e_client.html#a4e8b16bb2c8ba3534bbd04803a411911">setDataLen</a>(uint16_t txOctets);</div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="class_nim_b_l_e_client.html#a1019178a12799ca2c3a84f523b3a7db9">discoverAttributes</a>();</div>
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span> <a class="code hl_class" href="class_nim_b_l_e_conn_info.html">NimBLEConnInfo</a> <a class="code hl_function" href="class_nim_b_l_e_client.html#a50b691f395c4dcf4b633efede0783805">getConnInfo</a>() <span class="keyword">const</span>;</div>
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span> <span class="keywordtype">int</span> <a class="code hl_function" href="class_nim_b_l_e_client.html#aeb0593ebffa7e8833e5854480e41cce5">getLastError</a>() <span class="keyword">const</span>;</div>
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="class_nim_b_l_e_client.html#ad168d34de0f57f91824a78688b88b2b8">updateConnParams</a>(uint16_t minInterval, uint16_t maxInterval, uint16_t latency, uint16_t timeout);</div>
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span> <span class="keywordtype">void</span> <a class="code hl_function" href="class_nim_b_l_e_client.html#a17718339f76eb621db0d7919c73b9267">setConnectionParams</a>(uint16_t minInterval,</div>
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span> uint16_t maxInterval,</div>
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span> uint16_t latency,</div>
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span> uint16_t timeout,</div>
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span> uint16_t scanInterval = 16,</div>
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span> uint16_t scanWindow = 16);</div>
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"> 82</span> <span class="keyword">const</span> std::vector&lt;NimBLERemoteService*&gt;&amp; <a class="code hl_function" href="class_nim_b_l_e_client.html#adefe48b87e8a814e1643cdb8c3759298">getServices</a>(<span class="keywordtype">bool</span> refresh = <span class="keyword">false</span>);</div>
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"> 83</span> std::vector&lt;NimBLERemoteService*&gt;::iterator <a class="code hl_function" href="class_nim_b_l_e_client.html#ab09639b499fdcd0021a2432b2b8203f5">begin</a>();</div>
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span> std::vector&lt;NimBLERemoteService*&gt;::iterator <a class="code hl_function" href="class_nim_b_l_e_client.html#a0accd665926ea77d85ecb483b2b853fe">end</a>();</div>
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span> <a class="code hl_class" href="class_nim_b_l_e_remote_characteristic.html">NimBLERemoteCharacteristic</a>* <a class="code hl_function" href="class_nim_b_l_e_client.html#a6b801e91a37745445499dadfb4c38597">getCharacteristic</a>(uint16_t handle);</div>
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"> 86</span> <a class="code hl_class" href="class_nim_b_l_e_remote_service.html">NimBLERemoteService</a>* <a class="code hl_function" href="class_nim_b_l_e_client.html#ae22379ab10bd82932d2303fb3753c366">getService</a>(<span class="keyword">const</span> <span class="keywordtype">char</span>* uuid);</div>
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"> 87</span> <a class="code hl_class" href="class_nim_b_l_e_remote_service.html">NimBLERemoteService</a>* <a class="code hl_function" href="class_nim_b_l_e_client.html#ae22379ab10bd82932d2303fb3753c366">getService</a>(<span class="keyword">const</span> <a class="code hl_class" href="class_nim_b_l_e_u_u_i_d.html">NimBLEUUID</a>&amp; uuid);</div>
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"> 88</span> <span class="keywordtype">void</span> <a class="code hl_function" href="class_nim_b_l_e_client.html#a668d476de250055a106a9f46bb7719f3">deleteServices</a>();</div>
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno"> 89</span> <span class="keywordtype">size_t</span> <a class="code hl_function" href="class_nim_b_l_e_client.html#a0f940c51807469db1f1802b742180beb">deleteService</a>(<span class="keyword">const</span> <a class="code hl_class" href="class_nim_b_l_e_u_u_i_d.html">NimBLEUUID</a>&amp; uuid);</div>
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span> <a class="code hl_class" href="class_nim_b_l_e_att_value.html">NimBLEAttValue</a> <a class="code hl_function" href="class_nim_b_l_e_client.html#a3903fb7589e2b8b781f8f81f9e0f2a83">getValue</a>(<span class="keyword">const</span> <a class="code hl_class" href="class_nim_b_l_e_u_u_i_d.html">NimBLEUUID</a>&amp; serviceUUID, <span class="keyword">const</span> <a class="code hl_class" href="class_nim_b_l_e_u_u_i_d.html">NimBLEUUID</a>&amp; characteristicUUID);</div>
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno"> 91</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="class_nim_b_l_e_client.html#a967d0c75083706f336f2283eac6d0de2">setValue</a>(<span class="keyword">const</span> <a class="code hl_class" href="class_nim_b_l_e_u_u_i_d.html">NimBLEUUID</a>&amp; serviceUUID,</div>
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"> 92</span> <span class="keyword">const</span> <a class="code hl_class" href="class_nim_b_l_e_u_u_i_d.html">NimBLEUUID</a>&amp; characteristicUUID,</div>
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno"> 93</span> <span class="keyword">const</span> <a class="code hl_class" href="class_nim_b_l_e_att_value.html">NimBLEAttValue</a>&amp; value,</div>
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno"> 94</span> <span class="keywordtype">bool</span> response = <span class="keyword">false</span>);</div>
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno"> 95</span> </div>
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"> 96</span><span class="preprocessor"># if CONFIG_BT_NIMBLE_EXT_ADV</span></div>
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"> 97</span> <span class="keywordtype">void</span> <a class="code hl_function" href="class_nim_b_l_e_client.html#a004a85999b1ee4283e1e8e1e31090cca">setConnectPhy</a>(uint8_t phyMask);</div>
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="class_nim_b_l_e_client.html#a165957953c2773dacc6a203c969f6069">updatePhy</a>(uint8_t txPhysMask, uint8_t rxPhysMask, uint16_t phyOptions = 0);</div>
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"> 99</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="class_nim_b_l_e_client.html#a6ca4e212d5b69d4759bd695def020525">getPhy</a>(uint8_t* txPhy, uint8_t* rxPhy);</div>
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"> 100</span><span class="preprocessor"># endif</span></div>
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno"> 101</span> </div>
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno"> 102</span> <span class="keyword">struct </span>Config {</div>
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno"> 103</span> uint8_t deleteCallbacks : 1; <span class="comment">// Delete the callback object when the client is deleted.</span></div>
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno"> 104</span> uint8_t deleteOnDisconnect : 1; <span class="comment">// Delete the client when disconnected.</span></div>
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno"> 105</span> uint8_t deleteOnConnectFail : 1; <span class="comment">// Delete the client when a connection attempt fails.</span></div>
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno"> 106</span> uint8_t asyncConnect : 1; <span class="comment">// Connect asynchronously.</span></div>
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno"> 107</span> uint8_t exchangeMTU : 1; <span class="comment">// Exchange MTU after connection.</span></div>
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno"> 108</span> };</div>
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno"> 109</span> </div>
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno"> 110</span> Config <a class="code hl_function" href="class_nim_b_l_e_client.html#ac053fba7c84201dc6e7455231cf99f4a">getConfig</a>() <span class="keyword">const</span>;</div>
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno"> 111</span> <span class="keywordtype">void</span> <a class="code hl_function" href="class_nim_b_l_e_client.html#ad89d8202400ecb573ce0e2ec5fc801dc">setConfig</a>(Config config);</div>
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno"> 112</span> </div>
<div class="line"><a id="l00113" name="l00113"></a><span class="lineno"> 113</span> <span class="keyword">private</span>:</div>
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno"> 114</span> <a class="code hl_class" href="class_nim_b_l_e_client.html">NimBLEClient</a>(<span class="keyword">const</span> <a class="code hl_class" href="class_nim_b_l_e_address.html">NimBLEAddress</a>&amp; peerAddress);</div>
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno"> 115</span> <a class="code hl_class" href="class_nim_b_l_e_client.html">~NimBLEClient</a>();</div>
<div class="line"><a id="l00116" name="l00116"></a><span class="lineno"> 116</span> <a class="code hl_class" href="class_nim_b_l_e_client.html">NimBLEClient</a>(<span class="keyword">const</span> <a class="code hl_class" href="class_nim_b_l_e_client.html">NimBLEClient</a>&amp;) = <span class="keyword">delete</span>;</div>
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno"> 117</span> <a class="code hl_class" href="class_nim_b_l_e_client.html">NimBLEClient</a>&amp; operator=(<span class="keyword">const</span> <a class="code hl_class" href="class_nim_b_l_e_client.html">NimBLEClient</a>&amp;) = <span class="keyword">delete</span>;</div>
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno"> 118</span> </div>
<div class="line"><a id="l00119" name="l00119"></a><span class="lineno"> 119</span> <span class="keywordtype">bool</span> retrieveServices(<span class="keyword">const</span> <a class="code hl_class" href="class_nim_b_l_e_u_u_i_d.html">NimBLEUUID</a>* uuidFilter = <span class="keyword">nullptr</span>);</div>
<div class="line"><a id="l00120" name="l00120"></a><span class="lineno"> 120</span> <span class="keyword">static</span> <span class="keywordtype">int</span> handleGapEvent(<span class="keyword">struct</span> ble_gap_event* event, <span class="keywordtype">void</span>* arg);</div>
<div class="line"><a id="l00121" name="l00121"></a><span class="lineno"> 121</span> <span class="keyword">static</span> <span class="keywordtype">int</span> exchangeMTUCb(uint16_t conn_handle, <span class="keyword">const</span> ble_gatt_error* error, uint16_t mtu, <span class="keywordtype">void</span>* arg);</div>
<div class="line"><a id="l00122" name="l00122"></a><span class="lineno"> 122</span> <span class="keyword">static</span> <span class="keywordtype">int</span> serviceDiscoveredCB(uint16_t connHandle,</div>
<div class="line"><a id="l00123" name="l00123"></a><span class="lineno"> 123</span> <span class="keyword">const</span> <span class="keyword">struct</span> ble_gatt_error* error,</div>
<div class="line"><a id="l00124" name="l00124"></a><span class="lineno"> 124</span> <span class="keyword">const</span> <span class="keyword">struct</span> ble_gatt_svc* service,</div>
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno"> 125</span> <span class="keywordtype">void</span>* arg);</div>
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno"> 126</span> </div>
<div class="line"><a id="l00127" name="l00127"></a><span class="lineno"> 127</span> <a class="code hl_class" href="class_nim_b_l_e_address.html">NimBLEAddress</a> m_peerAddress;</div>
<div class="line"><a id="l00128" name="l00128"></a><span class="lineno"> 128</span> <span class="keyword">mutable</span> <span class="keywordtype">int</span> m_lastErr;</div>
<div class="line"><a id="l00129" name="l00129"></a><span class="lineno"> 129</span> int32_t m_connectTimeout;</div>
<div class="line"><a id="l00130" name="l00130"></a><span class="lineno"> 130</span> <span class="keyword">mutable</span> <a class="code hl_struct" href="struct_nim_b_l_e_task_data.html">NimBLETaskData</a>* m_pTaskData;</div>
<div class="line"><a id="l00131" name="l00131"></a><span class="lineno"> 131</span> std::vector&lt;NimBLERemoteService*&gt; m_svcVec;</div>
<div class="line"><a id="l00132" name="l00132"></a><span class="lineno"> 132</span> <a class="code hl_class" href="class_nim_b_l_e_client_callbacks.html">NimBLEClientCallbacks</a>* m_pClientCallbacks;</div>
<div class="line"><a id="l00133" name="l00133"></a><span class="lineno"> 133</span> uint16_t m_connHandle;</div>
<div class="line"><a id="l00134" name="l00134"></a><span class="lineno"> 134</span> uint8_t m_terminateFailCount;</div>
<div class="line"><a id="l00135" name="l00135"></a><span class="lineno"> 135</span> <span class="keyword">mutable</span> uint8_t m_asyncSecureAttempt;</div>
<div class="line"><a id="l00136" name="l00136"></a><span class="lineno"> 136</span> Config m_config;</div>
<div class="line"><a id="l00137" name="l00137"></a><span class="lineno"> 137</span> </div>
<div class="line"><a id="l00138" name="l00138"></a><span class="lineno"> 138</span><span class="preprocessor"># if CONFIG_BT_NIMBLE_EXT_ADV</span></div>
<div class="line"><a id="l00139" name="l00139"></a><span class="lineno"> 139</span> uint8_t m_phyMask;</div>
<div class="line"><a id="l00140" name="l00140"></a><span class="lineno"> 140</span><span class="preprocessor"># endif</span></div>
<div class="line"><a id="l00141" name="l00141"></a><span class="lineno"> 141</span> ble_gap_conn_params m_connParams;</div>
<div class="line"><a id="l00142" name="l00142"></a><span class="lineno"> 142</span> </div>
<div class="line"><a id="l00143" name="l00143"></a><span class="lineno"> 143</span> <span class="keyword">friend</span> <span class="keyword">class </span><a class="code hl_class" href="class_nim_b_l_e_device.html">NimBLEDevice</a>;</div>
<div class="line"><a id="l00144" name="l00144"></a><span class="lineno"> 144</span> <span class="keyword">friend</span> <span class="keyword">class </span><a class="code hl_class" href="class_nim_b_l_e_server.html">NimBLEServer</a>;</div>
<div class="line"><a id="l00145" name="l00145"></a><span class="lineno"> 145</span>}; <span class="comment">// class NimBLEClient</span></div>
</div>
<div class="line"><a id="l00146" name="l00146"></a><span class="lineno"> 146</span> </div>
<div class="foldopen" id="foldopen00150" data-start="{" data-end="};">
<div class="line"><a id="l00150" name="l00150"></a><span class="lineno"><a class="line" href="class_nim_b_l_e_client_callbacks.html"> 150</a></span><span class="keyword">class </span><a class="code hl_class" href="class_nim_b_l_e_client_callbacks.html">NimBLEClientCallbacks</a> {</div>
<div class="line"><a id="l00151" name="l00151"></a><span class="lineno"> 151</span> <span class="keyword">public</span>:</div>
<div class="line"><a id="l00152" name="l00152"></a><span class="lineno"> 152</span> <span class="keyword">virtual</span> <a class="code hl_class" href="class_nim_b_l_e_client_callbacks.html">~NimBLEClientCallbacks</a>() {};</div>
<div class="line"><a id="l00153" name="l00153"></a><span class="lineno"> 153</span> </div>
<div class="line"><a id="l00158" name="l00158"></a><span class="lineno"> 158</span> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code hl_function" href="class_nim_b_l_e_client_callbacks.html#a96de53d9745f243d544cd89498f979ae">onConnect</a>(<a class="code hl_class" href="class_nim_b_l_e_client.html">NimBLEClient</a>* pClient);</div>
<div class="line"><a id="l00159" name="l00159"></a><span class="lineno"> 159</span> </div>
<div class="line"><a id="l00165" name="l00165"></a><span class="lineno"> 165</span> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code hl_function" href="class_nim_b_l_e_client_callbacks.html#ad0eb6bee07ef8c41dd8924aaca3bc71e">onConnectFail</a>(<a class="code hl_class" href="class_nim_b_l_e_client.html">NimBLEClient</a>* pClient, <span class="keywordtype">int</span> reason);</div>
<div class="line"><a id="l00166" name="l00166"></a><span class="lineno"> 166</span> </div>
<div class="line"><a id="l00172" name="l00172"></a><span class="lineno"> 172</span> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code hl_function" href="class_nim_b_l_e_client_callbacks.html#ad618179ade926482a7f2d94b0deabd69">onDisconnect</a>(<a class="code hl_class" href="class_nim_b_l_e_client.html">NimBLEClient</a>* pClient, <span class="keywordtype">int</span> reason);</div>
<div class="line"><a id="l00173" name="l00173"></a><span class="lineno"> 173</span> </div>
<div class="line"><a id="l00180" name="l00180"></a><span class="lineno"> 180</span> <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="class_nim_b_l_e_client_callbacks.html#a8bc6a072e1cc974ef084eb2cad18dac6">onConnParamsUpdateRequest</a>(<a class="code hl_class" href="class_nim_b_l_e_client.html">NimBLEClient</a>* pClient, <span class="keyword">const</span> ble_gap_upd_params* params);</div>
<div class="line"><a id="l00181" name="l00181"></a><span class="lineno"> 181</span> </div>
<div class="line"><a id="l00186" name="l00186"></a><span class="lineno"> 186</span> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code hl_function" href="class_nim_b_l_e_client_callbacks.html#aacb0b757e6e7c7984d8389c83fe1937d">onPassKeyEntry</a>(<a class="code hl_class" href="class_nim_b_l_e_conn_info.html">NimBLEConnInfo</a>&amp; connInfo);</div>
<div class="line"><a id="l00187" name="l00187"></a><span class="lineno"> 187</span> </div>
<div class="line"><a id="l00193" name="l00193"></a><span class="lineno"> 193</span> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code hl_function" href="class_nim_b_l_e_client_callbacks.html#ae8e2abef6949ac87abf5ecad1a4dfe35">onAuthenticationComplete</a>(<a class="code hl_class" href="class_nim_b_l_e_conn_info.html">NimBLEConnInfo</a>&amp; connInfo);</div>
<div class="line"><a id="l00194" name="l00194"></a><span class="lineno"> 194</span> </div>
<div class="line"><a id="l00200" name="l00200"></a><span class="lineno"> 200</span> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code hl_function" href="class_nim_b_l_e_client_callbacks.html#a6e7cfa81cd43420f78d6da727c67928b">onConfirmPasskey</a>(<a class="code hl_class" href="class_nim_b_l_e_conn_info.html">NimBLEConnInfo</a>&amp; connInfo, uint32_t pin);</div>
<div class="line"><a id="l00201" name="l00201"></a><span class="lineno"> 201</span> </div>
<div class="line"><a id="l00206" name="l00206"></a><span class="lineno"> 206</span> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code hl_function" href="class_nim_b_l_e_client_callbacks.html#ac03333d26d570e55b285da460c0def76">onIdentity</a>(<a class="code hl_class" href="class_nim_b_l_e_conn_info.html">NimBLEConnInfo</a>&amp; connInfo);</div>
<div class="line"><a id="l00207" name="l00207"></a><span class="lineno"> 207</span> </div>
<div class="line"><a id="l00214" name="l00214"></a><span class="lineno"> 214</span> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code hl_function" href="class_nim_b_l_e_client_callbacks.html#a92662eb9ecf882b2c55bc6d9b4de97bc">onMTUChange</a>(<a class="code hl_class" href="class_nim_b_l_e_client.html">NimBLEClient</a>* pClient, uint16_t MTU);</div>
<div class="line"><a id="l00215" name="l00215"></a><span class="lineno"> 215</span> </div>
<div class="line"><a id="l00216" name="l00216"></a><span class="lineno"> 216</span><span class="preprocessor"># if CONFIG_BT_NIMBLE_EXT_ADV</span></div>
<div class="line"><a id="l00228" name="l00228"></a><span class="lineno"> 228</span> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code hl_function" href="class_nim_b_l_e_client_callbacks.html#a4e91ebb66e46b7f3ccc6291ece0b549c">onPhyUpdate</a>(<a class="code hl_class" href="class_nim_b_l_e_client.html">NimBLEClient</a>* pClient, uint8_t txPhy, uint8_t rxPhy);</div>
<div class="line"><a id="l00229" name="l00229"></a><span class="lineno"> 229</span><span class="preprocessor"># endif</span></div>
<div class="line"><a id="l00230" name="l00230"></a><span class="lineno"> 230</span>};</div>
</div>
<div class="line"><a id="l00231" name="l00231"></a><span class="lineno"> 231</span> </div>
<div class="line"><a id="l00232" name="l00232"></a><span class="lineno"> 232</span><span class="preprocessor">#endif </span><span class="comment">/* CONFIG_BT_ENABLED &amp;&amp; CONFIG_BT_NIMBLE_ROLE_CENTRAL */</span><span class="preprocessor"></span></div>
<div class="line"><a id="l00233" name="l00233"></a><span class="lineno"> 233</span><span class="preprocessor">#endif </span><span class="comment">/* NIMBLE_CPP_CLIENT_H_ */</span><span class="preprocessor"></span></div>
<div class="ttc" id="aclass_nim_b_l_e_address_html"><div class="ttname"><a href="class_nim_b_l_e_address.html">NimBLEAddress</a></div><div class="ttdoc">A BLE device address.</div><div class="ttdef"><b>Definition</b> NimBLEAddress.h:41</div></div>
<div class="ttc" id="aclass_nim_b_l_e_advertised_device_html"><div class="ttname"><a href="class_nim_b_l_e_advertised_device.html">NimBLEAdvertisedDevice</a></div><div class="ttdoc">A representation of a BLE advertised device found by a scan.</div><div class="ttdef"><b>Definition</b> NimBLEAdvertisedDevice.h:45</div></div>
<div class="ttc" id="aclass_nim_b_l_e_att_value_html"><div class="ttname"><a href="class_nim_b_l_e_att_value.html">NimBLEAttValue</a></div><div class="ttdoc">A specialized container class to hold BLE attribute values.</div><div class="ttdef"><b>Definition</b> NimBLEAttValue.h:72</div></div>
<div class="ttc" id="aclass_nim_b_l_e_client_callbacks_html"><div class="ttname"><a href="class_nim_b_l_e_client_callbacks.html">NimBLEClientCallbacks</a></div><div class="ttdoc">Callbacks associated with a BLE client.</div><div class="ttdef"><b>Definition</b> NimBLEClient.h:150</div></div>
<div class="ttc" id="aclass_nim_b_l_e_client_callbacks_html_a4e91ebb66e46b7f3ccc6291ece0b549c"><div class="ttname"><a href="class_nim_b_l_e_client_callbacks.html#a4e91ebb66e46b7f3ccc6291ece0b549c">NimBLEClientCallbacks::onPhyUpdate</a></div><div class="ttdeci">virtual void onPhyUpdate(NimBLEClient *pClient, uint8_t txPhy, uint8_t rxPhy)</div><div class="ttdoc">Called when the PHY update procedure is complete.</div><div class="ttdef"><b>Definition</b> NimBLEClient.cpp:1302</div></div>
<div class="ttc" id="aclass_nim_b_l_e_client_callbacks_html_a6e7cfa81cd43420f78d6da727c67928b"><div class="ttname"><a href="class_nim_b_l_e_client_callbacks.html#a6e7cfa81cd43420f78d6da727c67928b">NimBLEClientCallbacks::onConfirmPasskey</a></div><div class="ttdeci">virtual void onConfirmPasskey(NimBLEConnInfo &amp;connInfo, uint32_t pin)</div><div class="ttdoc">Called when using numeric comparision for pairing.</div><div class="ttdef"><b>Definition</b> NimBLEClient.cpp:1292</div></div>
<div class="ttc" id="aclass_nim_b_l_e_client_callbacks_html_a8bc6a072e1cc974ef084eb2cad18dac6"><div class="ttname"><a href="class_nim_b_l_e_client_callbacks.html#a8bc6a072e1cc974ef084eb2cad18dac6">NimBLEClientCallbacks::onConnParamsUpdateRequest</a></div><div class="ttdeci">virtual bool onConnParamsUpdateRequest(NimBLEClient *pClient, const ble_gap_upd_params *params)</div><div class="ttdoc">Called when server requests to update the connection parameters.</div><div class="ttdef"><b>Definition</b> NimBLEClient.cpp:1274</div></div>
<div class="ttc" id="aclass_nim_b_l_e_client_callbacks_html_a92662eb9ecf882b2c55bc6d9b4de97bc"><div class="ttname"><a href="class_nim_b_l_e_client_callbacks.html#a92662eb9ecf882b2c55bc6d9b4de97bc">NimBLEClientCallbacks::onMTUChange</a></div><div class="ttdeci">virtual void onMTUChange(NimBLEClient *pClient, uint16_t MTU)</div><div class="ttdoc">Called when the connection MTU changes.</div><div class="ttdef"><b>Definition</b> NimBLEClient.cpp:1297</div></div>
<div class="ttc" id="aclass_nim_b_l_e_client_callbacks_html_a96de53d9745f243d544cd89498f979ae"><div class="ttname"><a href="class_nim_b_l_e_client_callbacks.html#a96de53d9745f243d544cd89498f979ae">NimBLEClientCallbacks::onConnect</a></div><div class="ttdeci">virtual void onConnect(NimBLEClient *pClient)</div><div class="ttdoc">Called after client connects.</div><div class="ttdef"><b>Definition</b> NimBLEClient.cpp:1262</div></div>
<div class="ttc" id="aclass_nim_b_l_e_client_callbacks_html_aacb0b757e6e7c7984d8389c83fe1937d"><div class="ttname"><a href="class_nim_b_l_e_client_callbacks.html#aacb0b757e6e7c7984d8389c83fe1937d">NimBLEClientCallbacks::onPassKeyEntry</a></div><div class="ttdeci">virtual void onPassKeyEntry(NimBLEConnInfo &amp;connInfo)</div><div class="ttdoc">Called when server requests a passkey for pairing.</div><div class="ttdef"><b>Definition</b> NimBLEClient.cpp:1279</div></div>
<div class="ttc" id="aclass_nim_b_l_e_client_callbacks_html_ac03333d26d570e55b285da460c0def76"><div class="ttname"><a href="class_nim_b_l_e_client_callbacks.html#ac03333d26d570e55b285da460c0def76">NimBLEClientCallbacks::onIdentity</a></div><div class="ttdeci">virtual void onIdentity(NimBLEConnInfo &amp;connInfo)</div><div class="ttdoc">Called when the peer identity address is resolved.</div><div class="ttdef"><b>Definition</b> NimBLEClient.cpp:1288</div></div>
<div class="ttc" id="aclass_nim_b_l_e_client_callbacks_html_ad0eb6bee07ef8c41dd8924aaca3bc71e"><div class="ttname"><a href="class_nim_b_l_e_client_callbacks.html#ad0eb6bee07ef8c41dd8924aaca3bc71e">NimBLEClientCallbacks::onConnectFail</a></div><div class="ttdeci">virtual void onConnectFail(NimBLEClient *pClient, int reason)</div><div class="ttdoc">Called when a connection attempt fails.</div><div class="ttdef"><b>Definition</b> NimBLEClient.cpp:1266</div></div>
<div class="ttc" id="aclass_nim_b_l_e_client_callbacks_html_ad618179ade926482a7f2d94b0deabd69"><div class="ttname"><a href="class_nim_b_l_e_client_callbacks.html#ad618179ade926482a7f2d94b0deabd69">NimBLEClientCallbacks::onDisconnect</a></div><div class="ttdeci">virtual void onDisconnect(NimBLEClient *pClient, int reason)</div><div class="ttdoc">Called when disconnected from the server.</div><div class="ttdef"><b>Definition</b> NimBLEClient.cpp:1270</div></div>
<div class="ttc" id="aclass_nim_b_l_e_client_callbacks_html_ae8e2abef6949ac87abf5ecad1a4dfe35"><div class="ttname"><a href="class_nim_b_l_e_client_callbacks.html#ae8e2abef6949ac87abf5ecad1a4dfe35">NimBLEClientCallbacks::onAuthenticationComplete</a></div><div class="ttdeci">virtual void onAuthenticationComplete(NimBLEConnInfo &amp;connInfo)</div><div class="ttdoc">Called when the pairing procedure is complete.</div><div class="ttdef"><b>Definition</b> NimBLEClient.cpp:1284</div></div>
<div class="ttc" id="aclass_nim_b_l_e_client_html"><div class="ttname"><a href="class_nim_b_l_e_client.html">NimBLEClient</a></div><div class="ttdoc">A model of a BLE client.</div><div class="ttdef"><b>Definition</b> NimBLEClient.h:49</div></div>
<div class="ttc" id="aclass_nim_b_l_e_client_html_a004a85999b1ee4283e1e8e1e31090cca"><div class="ttname"><a href="class_nim_b_l_e_client.html#a004a85999b1ee4283e1e8e1e31090cca">NimBLEClient::setConnectPhy</a></div><div class="ttdeci">void setConnectPhy(uint8_t phyMask)</div><div class="ttdoc">Set the PHY types to use when connecting to a server.</div><div class="ttdef"><b>Definition</b> NimBLEClient.cpp:408</div></div>
<div class="ttc" id="aclass_nim_b_l_e_client_html_a0accd665926ea77d85ecb483b2b853fe"><div class="ttname"><a href="class_nim_b_l_e_client.html#a0accd665926ea77d85ecb483b2b853fe">NimBLEClient::end</a></div><div class="ttdeci">std::vector&lt; NimBLERemoteService * &gt;::iterator end()</div><div class="ttdoc">Get iterator to the end of the vector of remote service pointers.</div><div class="ttdef"><b>Definition</b> NimBLEClient.cpp:614</div></div>
<div class="ttc" id="aclass_nim_b_l_e_client_html_a0bdaf55b06367d1abd6f59bfbe1e8689"><div class="ttname"><a href="class_nim_b_l_e_client.html#a0bdaf55b06367d1abd6f59bfbe1e8689">NimBLEClient::isConnected</a></div><div class="ttdeci">bool isConnected() const</div><div class="ttdoc">Are we connected to a server?</div><div class="ttdef"><b>Definition</b> NimBLEClient.cpp:1218</div></div>
<div class="ttc" id="aclass_nim_b_l_e_client_html_a0f940c51807469db1f1802b742180beb"><div class="ttname"><a href="class_nim_b_l_e_client.html#a0f940c51807469db1f1802b742180beb">NimBLEClient::deleteService</a></div><div class="ttdeci">size_t deleteService(const NimBLEUUID &amp;uuid)</div><div class="ttdoc">Delete a service by UUID from the local database to free resources.</div><div class="ttdef"><b>Definition</b> NimBLEClient.cpp:116</div></div>
<div class="ttc" id="aclass_nim_b_l_e_client_html_a1019178a12799ca2c3a84f523b3a7db9"><div class="ttname"><a href="class_nim_b_l_e_client.html#a1019178a12799ca2c3a84f523b3a7db9">NimBLEClient::discoverAttributes</a></div><div class="ttdeci">bool discoverAttributes()</div><div class="ttdoc">Retrieves the full database of attributes that the peripheral has available.</div><div class="ttdef"><b>Definition</b> NimBLEClient.cpp:702</div></div>
<div class="ttc" id="aclass_nim_b_l_e_client_html_a165957953c2773dacc6a203c969f6069"><div class="ttname"><a href="class_nim_b_l_e_client.html#a165957953c2773dacc6a203c969f6069">NimBLEClient::updatePhy</a></div><div class="ttdeci">bool updatePhy(uint8_t txPhysMask, uint8_t rxPhysMask, uint16_t phyOptions=0)</div><div class="ttdoc">Request a change to the PHY used for this peer connection.</div><div class="ttdef"><b>Definition</b> NimBLEClient.cpp:430</div></div>
<div class="ttc" id="aclass_nim_b_l_e_client_html_a17718339f76eb621db0d7919c73b9267"><div class="ttname"><a href="class_nim_b_l_e_client.html#a17718339f76eb621db0d7919c73b9267">NimBLEClient::setConnectionParams</a></div><div class="ttdeci">void setConnectionParams(uint16_t minInterval, uint16_t maxInterval, uint16_t latency, uint16_t timeout, uint16_t scanInterval=16, uint16_t scanWindow=16)</div><div class="ttdoc">Set the connection parameters to use when connecting to a server.</div><div class="ttdef"><b>Definition</b> NimBLEClient.cpp:464</div></div>
<div class="ttc" id="aclass_nim_b_l_e_client_html_a19d97b47f01f0862e04f3011752b2f2f"><div class="ttname"><a href="class_nim_b_l_e_client.html#a19d97b47f01f0862e04f3011752b2f2f">NimBLEClient::exchangeMTU</a></div><div class="ttdeci">bool exchangeMTU()</div><div class="ttdoc">Begin the MTU exchange process with the server.</div><div class="ttdef"><b>Definition</b> NimBLEClient.cpp:905</div></div>
<div class="ttc" id="aclass_nim_b_l_e_client_html_a2645d4a2f8e381bf9bbffdfca846ae17"><div class="ttname"><a href="class_nim_b_l_e_client.html#a2645d4a2f8e381bf9bbffdfca846ae17">NimBLEClient::getRssi</a></div><div class="ttdeci">int getRssi() const</div><div class="ttdoc">Ask the BLE server for the RSSI value.</div><div class="ttdef"><b>Definition</b> NimBLEClient.cpp:585</div></div>
<div class="ttc" id="aclass_nim_b_l_e_client_html_a2b49bc73802bf716cf3df3b5a93f0543"><div class="ttname"><a href="class_nim_b_l_e_client.html#a2b49bc73802bf716cf3df3b5a93f0543">NimBLEClient::connect</a></div><div class="ttdeci">bool connect(const NimBLEAdvertisedDevice *device, bool deleteAttributes=true, bool asyncConnect=false, bool exchangeMTU=true)</div><div class="ttdoc">Connect to an advertising device.</div><div class="ttdef"><b>Definition</b> NimBLEClient.cpp:155</div></div>
<div class="ttc" id="aclass_nim_b_l_e_client_html_a2dac3bd373134ae6d22e3b5c96ed65ef"><div class="ttname"><a href="class_nim_b_l_e_client.html#a2dac3bd373134ae6d22e3b5c96ed65ef">NimBLEClient::secureConnection</a></div><div class="ttdeci">bool secureConnection(bool async=false) const</div><div class="ttdoc">Initiate a secure connection (pair/bond) with the server. Called automatically when a characteristic ...</div><div class="ttdef"><b>Definition</b> NimBLEClient.cpp:306</div></div>
<div class="ttc" id="aclass_nim_b_l_e_client_html_a36b298b70a42d32b8d578869b0763140"><div class="ttname"><a href="class_nim_b_l_e_client.html#a36b298b70a42d32b8d578869b0763140">NimBLEClient::disconnect</a></div><div class="ttdeci">bool disconnect(uint8_t reason=BLE_ERR_REM_USER_CONN_TERM)</div><div class="ttdoc">Disconnect from the peer.</div><div class="ttdef"><b>Definition</b> NimBLEClient.cpp:347</div></div>
<div class="ttc" id="aclass_nim_b_l_e_client_html_a3903fb7589e2b8b781f8f81f9e0f2a83"><div class="ttname"><a href="class_nim_b_l_e_client.html#a3903fb7589e2b8b781f8f81f9e0f2a83">NimBLEClient::getValue</a></div><div class="ttdeci">NimBLEAttValue getValue(const NimBLEUUID &amp;serviceUUID, const NimBLEUUID &amp;characteristicUUID)</div><div class="ttdoc">Get the value of a specific characteristic associated with a specific service.</div><div class="ttdef"><b>Definition</b> NimBLEClient.cpp:805</div></div>
<div class="ttc" id="aclass_nim_b_l_e_client_html_a44a6f7f9379e2fc129c37915636db61f"><div class="ttname"><a href="class_nim_b_l_e_client.html#a44a6f7f9379e2fc129c37915636db61f">NimBLEClient::getPeerAddress</a></div><div class="ttdeci">NimBLEAddress getPeerAddress() const</div><div class="ttdoc">Retrieve the address of the peer.</div><div class="ttdef"><b>Definition</b> NimBLEClient.cpp:562</div></div>
<div class="ttc" id="aclass_nim_b_l_e_client_html_a4e8b16bb2c8ba3534bbd04803a411911"><div class="ttname"><a href="class_nim_b_l_e_client.html#a4e8b16bb2c8ba3534bbd04803a411911">NimBLEClient::setDataLen</a></div><div class="ttdeci">bool setDataLen(uint16_t txOctets)</div><div class="ttdoc">Request an update of the data packet length.</div><div class="ttdef"><b>Definition</b> NimBLEClient.cpp:514</div></div>
<div class="ttc" id="aclass_nim_b_l_e_client_html_a50b691f395c4dcf4b633efede0783805"><div class="ttname"><a href="class_nim_b_l_e_client.html#a50b691f395c4dcf4b633efede0783805">NimBLEClient::getConnInfo</a></div><div class="ttdeci">NimBLEConnInfo getConnInfo() const</div><div class="ttdoc">Get detailed information about the current peer connection.</div><div class="ttdef"><b>Definition</b> NimBLEClient.cpp:533</div></div>
<div class="ttc" id="aclass_nim_b_l_e_client_html_a665a5ef97b3ab0307bccc54872d3c218"><div class="ttname"><a href="class_nim_b_l_e_client.html#a665a5ef97b3ab0307bccc54872d3c218">NimBLEClient::setSelfDelete</a></div><div class="ttdeci">void setSelfDelete(bool deleteOnDisconnect, bool deleteOnConnectFail)</div><div class="ttdoc">Set or unset a flag to delete this client when disconnected or connection failed.</div><div class="ttdef"><b>Definition</b> NimBLEClient.cpp:378</div></div>
<div class="ttc" id="aclass_nim_b_l_e_client_html_a668d476de250055a106a9f46bb7719f3"><div class="ttname"><a href="class_nim_b_l_e_client.html#a668d476de250055a106a9f46bb7719f3">NimBLEClient::deleteServices</a></div><div class="ttdeci">void deleteServices()</div><div class="ttdoc">Delete all service objects created by this client and clear the vector.</div><div class="ttdef"><b>Definition</b> NimBLEClient.cpp:102</div></div>
<div class="ttc" id="aclass_nim_b_l_e_client_html_a6b801e91a37745445499dadfb4c38597"><div class="ttname"><a href="class_nim_b_l_e_client.html#a6b801e91a37745445499dadfb4c38597">NimBLEClient::getCharacteristic</a></div><div class="ttdeci">NimBLERemoteCharacteristic * getCharacteristic(uint16_t handle)</div><div class="ttdoc">Get the remote characteristic with the specified handle.</div><div class="ttdef"><b>Definition</b> NimBLEClient.cpp:859</div></div>
<div class="ttc" id="aclass_nim_b_l_e_client_html_a6ca4e212d5b69d4759bd695def020525"><div class="ttname"><a href="class_nim_b_l_e_client.html#a6ca4e212d5b69d4759bd695def020525">NimBLEClient::getPhy</a></div><div class="ttdeci">bool getPhy(uint8_t *txPhy, uint8_t *rxPhy)</div><div class="ttdoc">Get the PHY used for this peer connection.</div><div class="ttdef"><b>Definition</b> NimBLEClient.cpp:445</div></div>
<div class="ttc" id="aclass_nim_b_l_e_client_html_a7f3230e45ac77bd4cb50b5c270f9c74c"><div class="ttname"><a href="class_nim_b_l_e_client.html#a7f3230e45ac77bd4cb50b5c270f9c74c">NimBLEClient::getMTU</a></div><div class="ttdeci">uint16_t getMTU() const</div><div class="ttdoc">Get the current mtu of this connection.</div><div class="ttdef"><b>Definition</b> NimBLEClient.cpp:877</div></div>
<div class="ttc" id="aclass_nim_b_l_e_client_html_a89d5aee4deaba953b8f77af75e3ee910"><div class="ttname"><a href="class_nim_b_l_e_client.html#a89d5aee4deaba953b8f77af75e3ee910">NimBLEClient::setPeerAddress</a></div><div class="ttdeci">bool setPeerAddress(const NimBLEAddress &amp;address)</div><div class="ttdoc">Set the peer address.</div><div class="ttdef"><b>Definition</b> NimBLEClient.cpp:571</div></div>
<div class="ttc" id="aclass_nim_b_l_e_client_html_a8ead2efdfdf23db4f7847a133939cd75"><div class="ttname"><a href="class_nim_b_l_e_client.html#a8ead2efdfdf23db4f7847a133939cd75">NimBLEClient::toString</a></div><div class="ttdeci">std::string toString() const</div><div class="ttdoc">Return a string representation of this client.</div><div class="ttdef"><b>Definition</b> NimBLEClient.cpp:1241</div></div>
<div class="ttc" id="aclass_nim_b_l_e_client_html_a967d0c75083706f336f2283eac6d0de2"><div class="ttname"><a href="class_nim_b_l_e_client.html#a967d0c75083706f336f2283eac6d0de2">NimBLEClient::setValue</a></div><div class="ttdeci">bool setValue(const NimBLEUUID &amp;serviceUUID, const NimBLEUUID &amp;characteristicUUID, const NimBLEAttValue &amp;value, bool response=false)</div><div class="ttdoc">Set the value of a specific characteristic associated with a specific service.</div><div class="ttdef"><b>Definition</b> NimBLEClient.cpp:832</div></div>
<div class="ttc" id="aclass_nim_b_l_e_client_html_ab09639b499fdcd0021a2432b2b8203f5"><div class="ttname"><a href="class_nim_b_l_e_client.html#ab09639b499fdcd0021a2432b2b8203f5">NimBLEClient::begin</a></div><div class="ttdeci">std::vector&lt; NimBLERemoteService * &gt;::iterator begin()</div><div class="ttdoc">Get iterator to the beginning of the vector of remote service pointers.</div><div class="ttdef"><b>Definition</b> NimBLEClient.cpp:606</div></div>
<div class="ttc" id="aclass_nim_b_l_e_client_html_ac053fba7c84201dc6e7455231cf99f4a"><div class="ttname"><a href="class_nim_b_l_e_client.html#ac053fba7c84201dc6e7455231cf99f4a">NimBLEClient::getConfig</a></div><div class="ttdeci">Config getConfig() const</div><div class="ttdoc">Get a copy of the clients configuration.</div><div class="ttdef"><b>Definition</b> NimBLEClient.cpp:387</div></div>
<div class="ttc" id="aclass_nim_b_l_e_client_html_ac1e517e5a57b0bd05d4bafa66a17f1bd"><div class="ttname"><a href="class_nim_b_l_e_client.html#ac1e517e5a57b0bd05d4bafa66a17f1bd">NimBLEClient::getConnHandle</a></div><div class="ttdeci">uint16_t getConnHandle() const</div><div class="ttdoc">Get the connection handle for this client.</div><div class="ttdef"><b>Definition</b> NimBLEClient.cpp:554</div></div>
<div class="ttc" id="aclass_nim_b_l_e_client_html_ad168d34de0f57f91824a78688b88b2b8"><div class="ttname"><a href="class_nim_b_l_e_client.html#ad168d34de0f57f91824a78688b88b2b8">NimBLEClient::updateConnParams</a></div><div class="ttdeci">bool updateConnParams(uint16_t minInterval, uint16_t maxInterval, uint16_t latency, uint16_t timeout)</div><div class="ttdoc">Update the connection parameters:</div><div class="ttdef"><b>Definition</b> NimBLEClient.cpp:488</div></div>
<div class="ttc" id="aclass_nim_b_l_e_client_html_ad89d8202400ecb573ce0e2ec5fc801dc"><div class="ttname"><a href="class_nim_b_l_e_client.html#ad89d8202400ecb573ce0e2ec5fc801dc">NimBLEClient::setConfig</a></div><div class="ttdeci">void setConfig(Config config)</div><div class="ttdoc">Set the client configuration options.</div><div class="ttdef"><b>Definition</b> NimBLEClient.cpp:395</div></div>
<div class="ttc" id="aclass_nim_b_l_e_client_html_adefe48b87e8a814e1643cdb8c3759298"><div class="ttname"><a href="class_nim_b_l_e_client.html#adefe48b87e8a814e1643cdb8c3759298">NimBLEClient::getServices</a></div><div class="ttdeci">const std::vector&lt; NimBLERemoteService * &gt; &amp; getServices(bool refresh=false)</div><div class="ttdoc">Get a pointer to the vector of found services.</div><div class="ttdef"><b>Definition</b> NimBLEClient.cpp:685</div></div>
<div class="ttc" id="aclass_nim_b_l_e_client_html_ae22379ab10bd82932d2303fb3753c366"><div class="ttname"><a href="class_nim_b_l_e_client.html#ae22379ab10bd82932d2303fb3753c366">NimBLEClient::getService</a></div><div class="ttdeci">NimBLERemoteService * getService(const char *uuid)</div><div class="ttdoc">Get the service BLE Remote Service instance corresponding to the uuid.</div><div class="ttdef"><b>Definition</b> NimBLEClient.cpp:623</div></div>
<div class="ttc" id="aclass_nim_b_l_e_client_html_aeb0593ebffa7e8833e5854480e41cce5"><div class="ttname"><a href="class_nim_b_l_e_client.html#aeb0593ebffa7e8833e5854480e41cce5">NimBLEClient::getLastError</a></div><div class="ttdeci">int getLastError() const</div><div class="ttdoc">Get the last error code reported by the NimBLE host.</div><div class="ttdef"><b>Definition</b> NimBLEClient.cpp:1258</div></div>
<div class="ttc" id="aclass_nim_b_l_e_client_html_aeb3675ab243ae6f0e4e7165cd07f7b80"><div class="ttname"><a href="class_nim_b_l_e_client.html#aeb3675ab243ae6f0e4e7165cd07f7b80">NimBLEClient::setConnectTimeout</a></div><div class="ttdeci">void setConnectTimeout(uint32_t timeout)</div><div class="ttdoc">Set the timeout to wait for connection attempt to complete.</div><div class="ttdef"><b>Definition</b> NimBLEClient.cpp:546</div></div>
<div class="ttc" id="aclass_nim_b_l_e_client_html_aeede4deef7421b9121387a786c07820c"><div class="ttname"><a href="class_nim_b_l_e_client.html#aeede4deef7421b9121387a786c07820c">NimBLEClient::setClientCallbacks</a></div><div class="ttdeci">void setClientCallbacks(NimBLEClientCallbacks *pClientCallbacks, bool deleteCallbacks=true)</div><div class="ttdoc">Set the callbacks that will be invoked when events are received.</div><div class="ttdef"><b>Definition</b> NimBLEClient.cpp:1227</div></div>
<div class="ttc" id="aclass_nim_b_l_e_client_html_af77b2a5390ea811e9405ff81dba8ecac"><div class="ttname"><a href="class_nim_b_l_e_client.html#af77b2a5390ea811e9405ff81dba8ecac">NimBLEClient::cancelConnect</a></div><div class="ttdeci">bool cancelConnect() const</div><div class="ttdoc">Cancel an ongoing connection attempt.</div><div class="ttdef"><b>Definition</b> NimBLEClient.cpp:362</div></div>
<div class="ttc" id="aclass_nim_b_l_e_conn_info_html"><div class="ttname"><a href="class_nim_b_l_e_conn_info.html">NimBLEConnInfo</a></div><div class="ttdoc">Connection information.</div><div class="ttdef"><b>Definition</b> NimBLEConnInfo.h:32</div></div>
<div class="ttc" id="aclass_nim_b_l_e_device_html"><div class="ttname"><a href="class_nim_b_l_e_device.html">NimBLEDevice</a></div><div class="ttdoc">A model of a BLE Device from which all the BLE roles are created.</div><div class="ttdef"><b>Definition</b> NimBLEDevice.h:109</div></div>
<div class="ttc" id="aclass_nim_b_l_e_remote_characteristic_html"><div class="ttname"><a href="class_nim_b_l_e_remote_characteristic.html">NimBLERemoteCharacteristic</a></div><div class="ttdoc">A model of a remote BLE characteristic.</div><div class="ttdef"><b>Definition</b> NimBLERemoteCharacteristic.h:34</div></div>
<div class="ttc" id="aclass_nim_b_l_e_remote_service_html"><div class="ttname"><a href="class_nim_b_l_e_remote_service.html">NimBLERemoteService</a></div><div class="ttdoc">A model of a remote BLE service.</div><div class="ttdef"><b>Definition</b> NimBLERemoteService.h:34</div></div>
<div class="ttc" id="aclass_nim_b_l_e_server_html"><div class="ttname"><a href="class_nim_b_l_e_server.html">NimBLEServer</a></div><div class="ttdoc">The model of a BLE server.</div><div class="ttdef"><b>Definition</b> NimBLEServer.h:60</div></div>
<div class="ttc" id="aclass_nim_b_l_e_u_u_i_d_html"><div class="ttname"><a href="class_nim_b_l_e_u_u_i_d.html">NimBLEUUID</a></div><div class="ttdoc">A model of a BLE UUID.</div><div class="ttdef"><b>Definition</b> NimBLEUUID.h:41</div></div>
<div class="ttc" id="animconfig_8h_html"><div class="ttname"><a href="nimconfig_8h.html">nimconfig.h</a></div></div>
<div class="ttc" id="astruct_nim_b_l_e_task_data_html"><div class="ttname"><a href="struct_nim_b_l_e_task_data.html">NimBLETaskData</a></div><div class="ttdoc">A structure to hold data for a task that is waiting for a response.</div><div class="ttdef"><b>Definition</b> NimBLEUtils.h:32</div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><b>NimBLEClient.h</b></li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.8 </li>
</ul>
</div>
</body>
</html>