esp-nimble-cpp/_nim_b_l_e_characteristic_8h_source.html
2022-01-15 15:23:57 -07:00

305 lines
49 KiB
HTML

<!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">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>esp-nimble-cpp: K:/Users/Ryan/Desktop/thermo-git/components/esp-nimble-cpp/src/NimBLECharacteristic.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 style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">esp-nimble-cpp
&#160;<span id="projectnumber">1.3.2</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'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:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</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:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('_nim_b_l_e_characteristic_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">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div class="header">
<div class="headertitle">
<div class="title">NimBLECharacteristic.h</div> </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#160;<span class="comment">/*</span></div>
<div class="line"><a name="l00002"></a><span class="lineno"> 2</span>&#160;<span class="comment"> * NimBLECharacteristic.h</span></div>
<div class="line"><a name="l00003"></a><span class="lineno"> 3</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00004"></a><span class="lineno"> 4</span>&#160;<span class="comment"> * Created: on March 3, 2020</span></div>
<div class="line"><a name="l00005"></a><span class="lineno"> 5</span>&#160;<span class="comment"> * Author H2zero</span></div>
<div class="line"><a name="l00006"></a><span class="lineno"> 6</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00007"></a><span class="lineno"> 7</span>&#160;<span class="comment"> * Originally:</span></div>
<div class="line"><a name="l00008"></a><span class="lineno"> 8</span>&#160;<span class="comment"> * BLECharacteristic.h</span></div>
<div class="line"><a name="l00009"></a><span class="lineno"> 9</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00010"></a><span class="lineno"> 10</span>&#160;<span class="comment"> * Created on: Jun 22, 2017</span></div>
<div class="line"><a name="l00011"></a><span class="lineno"> 11</span>&#160;<span class="comment"> * Author: kolban</span></div>
<div class="line"><a name="l00012"></a><span class="lineno"> 12</span>&#160;<span class="comment"> */</span></div>
<div class="line"><a name="l00013"></a><span class="lineno"> 13</span>&#160; </div>
<div class="line"><a name="l00014"></a><span class="lineno"> 14</span>&#160;<span class="preprocessor">#ifndef MAIN_NIMBLECHARACTERISTIC_H_</span></div>
<div class="line"><a name="l00015"></a><span class="lineno"> 15</span>&#160;<span class="preprocessor">#define MAIN_NIMBLECHARACTERISTIC_H_</span></div>
<div class="line"><a name="l00016"></a><span class="lineno"> 16</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="nimconfig_8h.html">nimconfig.h</a>&quot;</span></div>
<div class="line"><a name="l00017"></a><span class="lineno"> 17</span>&#160;<span class="preprocessor">#if defined(CONFIG_BT_ENABLED) &amp;&amp; defined(CONFIG_BT_NIMBLE_ROLE_PERIPHERAL)</span></div>
<div class="line"><a name="l00018"></a><span class="lineno"> 18</span>&#160; </div>
<div class="line"><a name="l00019"></a><span class="lineno"> 19</span>&#160;<span class="preprocessor">#if defined(CONFIG_NIMBLE_CPP_IDF)</span></div>
<div class="line"><a name="l00020"></a><span class="lineno"> 20</span>&#160;<span class="preprocessor">#include &quot;host/ble_hs.h&quot;</span></div>
<div class="line"><a name="l00021"></a><span class="lineno"> 21</span>&#160;<span class="preprocessor">#else</span></div>
<div class="line"><a name="l00022"></a><span class="lineno"> 22</span>&#160;<span class="preprocessor">#include &quot;nimble/nimble/host/include/host/ble_hs.h&quot;</span></div>
<div class="line"><a name="l00023"></a><span class="lineno"> 23</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00024"></a><span class="lineno"> 24</span>&#160; </div>
<div class="line"><a name="l00025"></a><span class="lineno"> 25</span>&#160;<span class="comment">/**** FIX COMPILATION ****/</span></div>
<div class="line"><a name="l00026"></a><span class="lineno"> 26</span>&#160;<span class="preprocessor">#undef min</span></div>
<div class="line"><a name="l00027"></a><span class="lineno"> 27</span>&#160;<span class="preprocessor">#undef max</span></div>
<div class="line"><a name="l00028"></a><span class="lineno"> 28</span>&#160;<span class="comment">/**************************/</span></div>
<div class="line"><a name="l00029"></a><span class="lineno"> 29</span>&#160; </div>
<div class="line"><a name="l00030"></a><span class="lineno"> 30</span>&#160;<span class="keyword">typedef</span> <span class="keyword">enum</span> {</div>
<div class="line"><a name="l00031"></a><span class="lineno"> 31</span>&#160; READ = BLE_GATT_CHR_F_READ,</div>
<div class="line"><a name="l00032"></a><span class="lineno"> 32</span>&#160; READ_ENC = BLE_GATT_CHR_F_READ_ENC,</div>
<div class="line"><a name="l00033"></a><span class="lineno"> 33</span>&#160; READ_AUTHEN = BLE_GATT_CHR_F_READ_AUTHEN,</div>
<div class="line"><a name="l00034"></a><span class="lineno"> 34</span>&#160; READ_AUTHOR = BLE_GATT_CHR_F_READ_AUTHOR,</div>
<div class="line"><a name="l00035"></a><span class="lineno"> 35</span>&#160; WRITE = BLE_GATT_CHR_F_WRITE,</div>
<div class="line"><a name="l00036"></a><span class="lineno"> 36</span>&#160; WRITE_NR = BLE_GATT_CHR_F_WRITE_NO_RSP,</div>
<div class="line"><a name="l00037"></a><span class="lineno"> 37</span>&#160; WRITE_ENC = BLE_GATT_CHR_F_WRITE_ENC,</div>
<div class="line"><a name="l00038"></a><span class="lineno"> 38</span>&#160; WRITE_AUTHEN = BLE_GATT_CHR_F_WRITE_AUTHEN,</div>
<div class="line"><a name="l00039"></a><span class="lineno"> 39</span>&#160; WRITE_AUTHOR = BLE_GATT_CHR_F_WRITE_AUTHOR,</div>
<div class="line"><a name="l00040"></a><span class="lineno"> 40</span>&#160; BROADCAST = BLE_GATT_CHR_F_BROADCAST,</div>
<div class="line"><a name="l00041"></a><span class="lineno"> 41</span>&#160; NOTIFY = BLE_GATT_CHR_F_NOTIFY,</div>
<div class="line"><a name="l00042"></a><span class="lineno"> 42</span>&#160; INDICATE = BLE_GATT_CHR_F_INDICATE</div>
<div class="line"><a name="l00043"></a><span class="lineno"> 43</span>&#160;} NIMBLE_PROPERTY;</div>
<div class="line"><a name="l00044"></a><span class="lineno"> 44</span>&#160; </div>
<div class="line"><a name="l00045"></a><span class="lineno"> 45</span>&#160;<span class="preprocessor">#include &quot;NimBLEService.h&quot;</span></div>
<div class="line"><a name="l00046"></a><span class="lineno"> 46</span>&#160;<span class="preprocessor">#include &quot;NimBLEDescriptor.h&quot;</span></div>
<div class="line"><a name="l00047"></a><span class="lineno"> 47</span>&#160; </div>
<div class="line"><a name="l00048"></a><span class="lineno"> 48</span>&#160;<span class="preprocessor">#include &lt;string&gt;</span></div>
<div class="line"><a name="l00049"></a><span class="lineno"> 49</span>&#160;<span class="preprocessor">#include &lt;vector&gt;</span></div>
<div class="line"><a name="l00050"></a><span class="lineno"> 50</span>&#160; </div>
<div class="line"><a name="l00051"></a><span class="lineno"> 51</span>&#160;<span class="keyword">class </span><a class="code" href="class_nim_b_l_e_service.html">NimBLEService</a>;</div>
<div class="line"><a name="l00052"></a><span class="lineno"> 52</span>&#160;<span class="keyword">class </span><a class="code" href="class_nim_b_l_e_descriptor.html">NimBLEDescriptor</a>;</div>
<div class="line"><a name="l00053"></a><span class="lineno"> 53</span>&#160;<span class="keyword">class </span><a class="code" href="class_nim_b_l_e_characteristic_callbacks.html">NimBLECharacteristicCallbacks</a>;</div>
<div class="line"><a name="l00054"></a><span class="lineno"> 54</span>&#160; </div>
<div class="line"><a name="l00055"></a><span class="lineno"> 55</span>&#160; </div>
<div class="line"><a name="l00062"></a><span class="lineno"><a class="line" href="class_nim_b_l_e_characteristic.html"> 62</a></span>&#160;<span class="keyword">class </span><a class="code" href="class_nim_b_l_e_characteristic.html">NimBLECharacteristic</a> {</div>
<div class="line"><a name="l00063"></a><span class="lineno"> 63</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00064"></a><span class="lineno"> 64</span>&#160; <a class="code" href="class_nim_b_l_e_characteristic.html#a942b2d29d77fcef233549d0c4fd798da">NimBLECharacteristic</a>(<span class="keyword">const</span> <span class="keywordtype">char</span>* uuid,</div>
<div class="line"><a name="l00065"></a><span class="lineno"> 65</span>&#160; uint16_t properties =</div>
<div class="line"><a name="l00066"></a><span class="lineno"> 66</span>&#160; NIMBLE_PROPERTY::READ |</div>
<div class="line"><a name="l00067"></a><span class="lineno"> 67</span>&#160; NIMBLE_PROPERTY::WRITE,</div>
<div class="line"><a name="l00068"></a><span class="lineno"> 68</span>&#160; <a class="code" href="class_nim_b_l_e_service.html">NimBLEService</a>* pService = <span class="keyword">nullptr</span>);</div>
<div class="line"><a name="l00069"></a><span class="lineno"> 69</span>&#160; <a class="code" href="class_nim_b_l_e_characteristic.html#a942b2d29d77fcef233549d0c4fd798da">NimBLECharacteristic</a>(<span class="keyword">const</span> <a class="code" href="class_nim_b_l_e_u_u_i_d.html">NimBLEUUID</a> &amp;uuid,</div>
<div class="line"><a name="l00070"></a><span class="lineno"> 70</span>&#160; uint16_t properties =</div>
<div class="line"><a name="l00071"></a><span class="lineno"> 71</span>&#160; NIMBLE_PROPERTY::READ |</div>
<div class="line"><a name="l00072"></a><span class="lineno"> 72</span>&#160; NIMBLE_PROPERTY::WRITE,</div>
<div class="line"><a name="l00073"></a><span class="lineno"> 73</span>&#160; <a class="code" href="class_nim_b_l_e_service.html">NimBLEService</a>* pService = <span class="keyword">nullptr</span>);</div>
<div class="line"><a name="l00074"></a><span class="lineno"> 74</span>&#160; </div>
<div class="line"><a name="l00075"></a><span class="lineno"> 75</span>&#160; <a class="code" href="class_nim_b_l_e_characteristic.html#a7fe29c5ec571d0513c51b8cbac942f4a">~NimBLECharacteristic</a>();</div>
<div class="line"><a name="l00076"></a><span class="lineno"> 76</span>&#160; </div>
<div class="line"><a name="l00077"></a><span class="lineno"> 77</span>&#160; uint16_t <a class="code" href="class_nim_b_l_e_characteristic.html#acc3ea122771cd447103adfce22537379">getHandle</a>();</div>
<div class="line"><a name="l00078"></a><span class="lineno"> 78</span>&#160; <a class="code" href="class_nim_b_l_e_u_u_i_d.html">NimBLEUUID</a> <a class="code" href="class_nim_b_l_e_characteristic.html#a28b03617fe753133582ba4e58c60e52e">getUUID</a>();</div>
<div class="line"><a name="l00079"></a><span class="lineno"> 79</span>&#160; std::string <a class="code" href="class_nim_b_l_e_characteristic.html#a4fa6b8ed011d12e2b1f16e92a02b9a89">toString</a>();</div>
<div class="line"><a name="l00080"></a><span class="lineno"> 80</span>&#160; </div>
<div class="line"><a name="l00081"></a><span class="lineno"> 81</span>&#160; <span class="keywordtype">void</span> <a class="code" href="class_nim_b_l_e_characteristic.html#a29dc2505e1d3b4a7d6800d1547965d17">setCallbacks</a>(<a class="code" href="class_nim_b_l_e_characteristic_callbacks.html">NimBLECharacteristicCallbacks</a>* pCallbacks);</div>
<div class="line"><a name="l00082"></a><span class="lineno"> 82</span>&#160; <a class="code" href="class_nim_b_l_e_characteristic_callbacks.html">NimBLECharacteristicCallbacks</a>*</div>
<div class="line"><a name="l00083"></a><span class="lineno"> 83</span>&#160; <a class="code" href="class_nim_b_l_e_characteristic.html#a1747ac4889c7adbb93a2d88a10327a47">getCallbacks</a>();</div>
<div class="line"><a name="l00084"></a><span class="lineno"> 84</span>&#160; </div>
<div class="line"><a name="l00085"></a><span class="lineno"> 85</span>&#160; <span class="keywordtype">void</span> <a class="code" href="class_nim_b_l_e_characteristic.html#a2ce9f62ecc3d1644ef4d58efe7a3c434">indicate</a>();</div>
<div class="line"><a name="l00086"></a><span class="lineno"> 86</span>&#160; <span class="keywordtype">void</span> <a class="code" href="class_nim_b_l_e_characteristic.html#aa45461059e1992c816e32c371d17e813">notify</a>(<span class="keywordtype">bool</span> is_notification = <span class="keyword">true</span>);</div>
<div class="line"><a name="l00087"></a><span class="lineno"> 87</span>&#160; <span class="keywordtype">void</span> <a class="code" href="class_nim_b_l_e_characteristic.html#aa45461059e1992c816e32c371d17e813">notify</a>(std::string value, <span class="keywordtype">bool</span> is_notification = <span class="keyword">true</span>);</div>
<div class="line"><a name="l00088"></a><span class="lineno"> 88</span>&#160; </div>
<div class="line"><a name="l00089"></a><span class="lineno"> 89</span>&#160; <span class="keywordtype">size_t</span> <a class="code" href="class_nim_b_l_e_characteristic.html#aced225d46153b6969f6ded30c0190e39">getSubscribedCount</a>();</div>
<div class="line"><a name="l00090"></a><span class="lineno"> 90</span>&#160; </div>
<div class="line"><a name="l00091"></a><span class="lineno"> 91</span>&#160; <a class="code" href="class_nim_b_l_e_descriptor.html">NimBLEDescriptor</a>* <a class="code" href="class_nim_b_l_e_characteristic.html#aae014669e9ce1ad01520d68fe0cc0fda">createDescriptor</a>(<span class="keyword">const</span> <span class="keywordtype">char</span>* uuid,</div>
<div class="line"><a name="l00092"></a><span class="lineno"> 92</span>&#160; uint32_t properties =</div>
<div class="line"><a name="l00093"></a><span class="lineno"> 93</span>&#160; NIMBLE_PROPERTY::READ |</div>
<div class="line"><a name="l00094"></a><span class="lineno"> 94</span>&#160; NIMBLE_PROPERTY::WRITE,</div>
<div class="line"><a name="l00095"></a><span class="lineno"> 95</span>&#160; uint16_t max_len = 100);</div>
<div class="line"><a name="l00096"></a><span class="lineno"> 96</span>&#160; <a class="code" href="class_nim_b_l_e_descriptor.html">NimBLEDescriptor</a>* <a class="code" href="class_nim_b_l_e_characteristic.html#aae014669e9ce1ad01520d68fe0cc0fda">createDescriptor</a>(<span class="keyword">const</span> <a class="code" href="class_nim_b_l_e_u_u_i_d.html">NimBLEUUID</a> &amp;uuid,</div>
<div class="line"><a name="l00097"></a><span class="lineno"> 97</span>&#160; uint32_t properties =</div>
<div class="line"><a name="l00098"></a><span class="lineno"> 98</span>&#160; NIMBLE_PROPERTY::READ |</div>
<div class="line"><a name="l00099"></a><span class="lineno"> 99</span>&#160; NIMBLE_PROPERTY::WRITE,</div>
<div class="line"><a name="l00100"></a><span class="lineno"> 100</span>&#160; uint16_t max_len = 100);</div>
<div class="line"><a name="l00101"></a><span class="lineno"> 101</span>&#160; </div>
<div class="line"><a name="l00102"></a><span class="lineno"> 102</span>&#160; <span class="keywordtype">void</span> <a class="code" href="class_nim_b_l_e_characteristic.html#aed4b2241c89ad2a8f49117e2b9433e5b">addDescriptor</a>(<a class="code" href="class_nim_b_l_e_descriptor.html">NimBLEDescriptor</a> *pDescriptor);</div>
<div class="line"><a name="l00103"></a><span class="lineno"> 103</span>&#160; <a class="code" href="class_nim_b_l_e_descriptor.html">NimBLEDescriptor</a>* <a class="code" href="class_nim_b_l_e_characteristic.html#abc5f4819e4d2c0956857ddd7a1064189">getDescriptorByUUID</a>(<span class="keyword">const</span> <span class="keywordtype">char</span>* uuid);</div>
<div class="line"><a name="l00104"></a><span class="lineno"> 104</span>&#160; <a class="code" href="class_nim_b_l_e_descriptor.html">NimBLEDescriptor</a>* <a class="code" href="class_nim_b_l_e_characteristic.html#abc5f4819e4d2c0956857ddd7a1064189">getDescriptorByUUID</a>(<span class="keyword">const</span> <a class="code" href="class_nim_b_l_e_u_u_i_d.html">NimBLEUUID</a> &amp;uuid);</div>
<div class="line"><a name="l00105"></a><span class="lineno"> 105</span>&#160; <a class="code" href="class_nim_b_l_e_descriptor.html">NimBLEDescriptor</a>* <a class="code" href="class_nim_b_l_e_characteristic.html#a062f52918f13c49a37ce8e58b9e7382a">getDescriptorByHandle</a>(uint16_t handle);</div>
<div class="line"><a name="l00106"></a><span class="lineno"> 106</span>&#160; <span class="keywordtype">void</span> <a class="code" href="class_nim_b_l_e_characteristic.html#a2c0ed8932ee257a8632e3d72e353489b">removeDescriptor</a>(<a class="code" href="class_nim_b_l_e_descriptor.html">NimBLEDescriptor</a> *pDescriptor, <span class="keywordtype">bool</span> deleteDsc = <span class="keyword">false</span>);</div>
<div class="line"><a name="l00107"></a><span class="lineno"> 107</span>&#160; </div>
<div class="line"><a name="l00108"></a><span class="lineno"> 108</span>&#160; std::string <a class="code" href="class_nim_b_l_e_characteristic.html#a37e908d114f6ad2b4bf19c7cc4db9c54">getValue</a>(time_t *timestamp = <span class="keyword">nullptr</span>);</div>
<div class="line"><a name="l00109"></a><span class="lineno"> 109</span>&#160; <span class="keywordtype">size_t</span> <a class="code" href="class_nim_b_l_e_characteristic.html#a580ad0133fd82a673027c91cbb1c74fa">getDataLength</a>();</div>
<div class="line"><a name="l00119"></a><span class="lineno"> 119</span>&#160; <span class="keyword">template</span>&lt;<span class="keyword">typename</span> T&gt;</div>
<div class="line"><a name="l00120"></a><span class="lineno"><a class="line" href="class_nim_b_l_e_characteristic.html#a7d09c29b26362f6ddcaf51a9c9dc8be4"> 120</a></span>&#160; T <a class="code" href="class_nim_b_l_e_characteristic.html#a7d09c29b26362f6ddcaf51a9c9dc8be4">getValue</a>(time_t *timestamp = <span class="keyword">nullptr</span>, <span class="keywordtype">bool</span> skipSizeCheck = <span class="keyword">false</span>) {</div>
<div class="line"><a name="l00121"></a><span class="lineno"> 121</span>&#160; std::string value = <a class="code" href="class_nim_b_l_e_characteristic.html#a37e908d114f6ad2b4bf19c7cc4db9c54">getValue</a>();</div>
<div class="line"><a name="l00122"></a><span class="lineno"> 122</span>&#160; <span class="keywordflow">if</span>(!skipSizeCheck &amp;&amp; value.size() &lt; <span class="keyword">sizeof</span>(T)) <span class="keywordflow">return</span> T();</div>
<div class="line"><a name="l00123"></a><span class="lineno"> 123</span>&#160; <span class="keyword">const</span> <span class="keywordtype">char</span> *pData = value.data();</div>
<div class="line"><a name="l00124"></a><span class="lineno"> 124</span>&#160; <span class="keywordflow">return</span> *((T *)pData);</div>
<div class="line"><a name="l00125"></a><span class="lineno"> 125</span>&#160; }</div>
<div class="line"><a name="l00126"></a><span class="lineno"> 126</span>&#160; </div>
<div class="line"><a name="l00127"></a><span class="lineno"> 127</span>&#160; <span class="keywordtype">void</span> <a class="code" href="class_nim_b_l_e_characteristic.html#a7cd211a8bb9a0c2ffaed57f2af273677">setValue</a>(<span class="keyword">const</span> uint8_t* data, <span class="keywordtype">size_t</span> size);</div>
<div class="line"><a name="l00128"></a><span class="lineno"> 128</span>&#160; <span class="keywordtype">void</span> <a class="code" href="class_nim_b_l_e_characteristic.html#a7cd211a8bb9a0c2ffaed57f2af273677">setValue</a>(<span class="keyword">const</span> std::string &amp;value);</div>
<div class="line"><a name="l00133"></a><span class="lineno"> 133</span>&#160; <span class="keyword">template</span>&lt;<span class="keyword">typename</span> T&gt;</div>
<div class="line"><a name="l00134"></a><span class="lineno"><a class="line" href="class_nim_b_l_e_characteristic.html#aba05898f446e31222fbe509fa357c730"> 134</a></span>&#160; <span class="keywordtype">void</span> <a class="code" href="class_nim_b_l_e_characteristic.html#aba05898f446e31222fbe509fa357c730">setValue</a>(<span class="keyword">const</span> T &amp;s) {</div>
<div class="line"><a name="l00135"></a><span class="lineno"> 135</span>&#160; <a class="code" href="class_nim_b_l_e_characteristic.html#a7cd211a8bb9a0c2ffaed57f2af273677">setValue</a>((uint8_t*)&amp;s, <span class="keyword">sizeof</span>(T));</div>
<div class="line"><a name="l00136"></a><span class="lineno"> 136</span>&#160; }</div>
<div class="line"><a name="l00137"></a><span class="lineno"> 137</span>&#160; </div>
<div class="line"><a name="l00138"></a><span class="lineno"> 138</span>&#160; <a class="code" href="class_nim_b_l_e_service.html">NimBLEService</a>* <a class="code" href="class_nim_b_l_e_characteristic.html#a84aa251a612810ec8d07e77ab03cb483">getService</a>();</div>
<div class="line"><a name="l00139"></a><span class="lineno"> 139</span>&#160; uint16_t <a class="code" href="class_nim_b_l_e_characteristic.html#a79759a98d9bdb761cb12c1ea6f601afc">getProperties</a>();</div>
<div class="line"><a name="l00140"></a><span class="lineno"> 140</span>&#160; </div>
<div class="line"><a name="l00141"></a><span class="lineno"> 141</span>&#160;<span class="keyword">private</span>:</div>
<div class="line"><a name="l00142"></a><span class="lineno"> 142</span>&#160; </div>
<div class="line"><a name="l00143"></a><span class="lineno"> 143</span>&#160; <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="class_nim_b_l_e_server.html">NimBLEServer</a>;</div>
<div class="line"><a name="l00144"></a><span class="lineno"> 144</span>&#160; <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="class_nim_b_l_e_service.html">NimBLEService</a>;</div>
<div class="line"><a name="l00145"></a><span class="lineno"> 145</span>&#160; </div>
<div class="line"><a name="l00146"></a><span class="lineno"> 146</span>&#160; <span class="keywordtype">void</span> setService(<a class="code" href="class_nim_b_l_e_service.html">NimBLEService</a> *pService);</div>
<div class="line"><a name="l00147"></a><span class="lineno"> 147</span>&#160; <span class="keywordtype">void</span> setSubscribe(<span class="keyword">struct</span> ble_gap_event *event);</div>
<div class="line"><a name="l00148"></a><span class="lineno"> 148</span>&#160; <span class="keyword">static</span> <span class="keywordtype">int</span> handleGapEvent(uint16_t conn_handle, uint16_t attr_handle,</div>
<div class="line"><a name="l00149"></a><span class="lineno"> 149</span>&#160; <span class="keyword">struct</span> ble_gatt_access_ctxt *ctxt, <span class="keywordtype">void</span> *arg);</div>
<div class="line"><a name="l00150"></a><span class="lineno"> 150</span>&#160; </div>
<div class="line"><a name="l00151"></a><span class="lineno"> 151</span>&#160; <a class="code" href="class_nim_b_l_e_u_u_i_d.html">NimBLEUUID</a> m_uuid;</div>
<div class="line"><a name="l00152"></a><span class="lineno"> 152</span>&#160; uint16_t m_handle;</div>
<div class="line"><a name="l00153"></a><span class="lineno"> 153</span>&#160; uint16_t m_properties;</div>
<div class="line"><a name="l00154"></a><span class="lineno"> 154</span>&#160; <a class="code" href="class_nim_b_l_e_characteristic_callbacks.html">NimBLECharacteristicCallbacks</a>* m_pCallbacks;</div>
<div class="line"><a name="l00155"></a><span class="lineno"> 155</span>&#160; <a class="code" href="class_nim_b_l_e_service.html">NimBLEService</a>* m_pService;</div>
<div class="line"><a name="l00156"></a><span class="lineno"> 156</span>&#160; std::string m_value;</div>
<div class="line"><a name="l00157"></a><span class="lineno"> 157</span>&#160; std::vector&lt;NimBLEDescriptor*&gt; m_dscVec;</div>
<div class="line"><a name="l00158"></a><span class="lineno"> 158</span>&#160; time_t m_timestamp;</div>
<div class="line"><a name="l00159"></a><span class="lineno"> 159</span>&#160; uint8_t m_removed;</div>
<div class="line"><a name="l00160"></a><span class="lineno"> 160</span>&#160; </div>
<div class="line"><a name="l00161"></a><span class="lineno"> 161</span>&#160; std::vector&lt;std::pair&lt;uint16_t, uint16_t&gt;&gt; m_subscribedVec;</div>
<div class="line"><a name="l00162"></a><span class="lineno"> 162</span>&#160;}; <span class="comment">// NimBLECharacteristic</span></div>
<div class="line"><a name="l00163"></a><span class="lineno"> 163</span>&#160; </div>
<div class="line"><a name="l00164"></a><span class="lineno"> 164</span>&#160; </div>
<div class="line"><a name="l00172"></a><span class="lineno"><a class="line" href="class_nim_b_l_e_characteristic_callbacks.html"> 172</a></span>&#160;<span class="keyword">class </span><a class="code" href="class_nim_b_l_e_characteristic_callbacks.html">NimBLECharacteristicCallbacks</a> {</div>
<div class="line"><a name="l00173"></a><span class="lineno"> 173</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00174"></a><span class="lineno"> 174</span>&#160; </div>
<div class="line"><a name="l00180"></a><span class="lineno"><a class="line" href="class_nim_b_l_e_characteristic_callbacks.html#a104baba3c4bbdee7aa28273d265e4c6f"> 180</a></span>&#160; <span class="keyword">typedef</span> <span class="keyword">enum</span> {</div>
<div class="line"><a name="l00181"></a><span class="lineno"> 181</span>&#160; SUCCESS_INDICATE,</div>
<div class="line"><a name="l00182"></a><span class="lineno"> 182</span>&#160; SUCCESS_NOTIFY,</div>
<div class="line"><a name="l00183"></a><span class="lineno"> 183</span>&#160; ERROR_INDICATE_DISABLED,</div>
<div class="line"><a name="l00184"></a><span class="lineno"> 184</span>&#160; ERROR_NOTIFY_DISABLED,</div>
<div class="line"><a name="l00185"></a><span class="lineno"> 185</span>&#160; ERROR_GATT,</div>
<div class="line"><a name="l00186"></a><span class="lineno"> 186</span>&#160; ERROR_NO_CLIENT,</div>
<div class="line"><a name="l00187"></a><span class="lineno"> 187</span>&#160; ERROR_INDICATE_TIMEOUT,</div>
<div class="line"><a name="l00188"></a><span class="lineno"> 188</span>&#160; ERROR_INDICATE_FAILURE</div>
<div class="line"><a name="l00189"></a><span class="lineno"> 189</span>&#160; }<a class="code" href="class_nim_b_l_e_characteristic_callbacks.html#a104baba3c4bbdee7aa28273d265e4c6f">Status</a>;</div>
<div class="line"><a name="l00190"></a><span class="lineno"> 190</span>&#160; </div>
<div class="line"><a name="l00191"></a><span class="lineno"> 191</span>&#160; <span class="keyword">virtual</span> ~<a class="code" href="class_nim_b_l_e_characteristic_callbacks.html">NimBLECharacteristicCallbacks</a>();</div>
<div class="line"><a name="l00192"></a><span class="lineno"> 192</span>&#160; <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="class_nim_b_l_e_characteristic_callbacks.html#a523904b8d39e364db094f623403bad93">onRead</a>(<a class="code" href="class_nim_b_l_e_characteristic.html">NimBLECharacteristic</a>* pCharacteristic);</div>
<div class="line"><a name="l00193"></a><span class="lineno"> 193</span>&#160; <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="class_nim_b_l_e_characteristic_callbacks.html#a523904b8d39e364db094f623403bad93">onRead</a>(<a class="code" href="class_nim_b_l_e_characteristic.html">NimBLECharacteristic</a>* pCharacteristic, ble_gap_conn_desc* desc);</div>
<div class="line"><a name="l00194"></a><span class="lineno"> 194</span>&#160; <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="class_nim_b_l_e_characteristic_callbacks.html#aac7caf4a80da061b5beda5ebcd214fc3">onWrite</a>(<a class="code" href="class_nim_b_l_e_characteristic.html">NimBLECharacteristic</a>* pCharacteristic);</div>
<div class="line"><a name="l00195"></a><span class="lineno"> 195</span>&#160; <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="class_nim_b_l_e_characteristic_callbacks.html#aac7caf4a80da061b5beda5ebcd214fc3">onWrite</a>(<a class="code" href="class_nim_b_l_e_characteristic.html">NimBLECharacteristic</a>* pCharacteristic, ble_gap_conn_desc* desc);</div>
<div class="line"><a name="l00196"></a><span class="lineno"> 196</span>&#160; <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="class_nim_b_l_e_characteristic_callbacks.html#a185eb5298cc042f1aceeba21caf0dcc9">onNotify</a>(<a class="code" href="class_nim_b_l_e_characteristic.html">NimBLECharacteristic</a>* pCharacteristic);</div>
<div class="line"><a name="l00197"></a><span class="lineno"> 197</span>&#160; <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="class_nim_b_l_e_characteristic_callbacks.html#ab17e7c61723a33cd3c922e3ca9c20f1e">onStatus</a>(<a class="code" href="class_nim_b_l_e_characteristic.html">NimBLECharacteristic</a>* pCharacteristic, <a class="code" href="class_nim_b_l_e_characteristic_callbacks.html#a104baba3c4bbdee7aa28273d265e4c6f">Status</a> s, <span class="keywordtype">int</span> code);</div>
<div class="line"><a name="l00198"></a><span class="lineno"> 198</span>&#160; <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="class_nim_b_l_e_characteristic_callbacks.html#a3c0c0f524bc0d00d24a7c5ea92c5cb7e">onSubscribe</a>(<a class="code" href="class_nim_b_l_e_characteristic.html">NimBLECharacteristic</a>* pCharacteristic, ble_gap_conn_desc* desc, uint16_t subValue);</div>
<div class="line"><a name="l00199"></a><span class="lineno"> 199</span>&#160;};</div>
<div class="line"><a name="l00200"></a><span class="lineno"> 200</span>&#160; </div>
<div class="line"><a name="l00201"></a><span class="lineno"> 201</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* CONFIG_BT_ENABLED &amp;&amp; CONFIG_BT_NIMBLE_ROLE_PERIPHERAL */</span><span class="preprocessor"></span></div>
<div class="line"><a name="l00202"></a><span class="lineno"> 202</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/*MAIN_NIMBLECHARACTERISTIC_H_*/</span><span class="preprocessor"></span></div>
<div class="ttc" id="aclass_nim_b_l_e_characteristic_callbacks_html"><div class="ttname"><a href="class_nim_b_l_e_characteristic_callbacks.html">NimBLECharacteristicCallbacks</a></div><div class="ttdoc">Callbacks that can be associated with a BLE characteristic to inform of events.</div><div class="ttdef"><b>Definition:</b> NimBLECharacteristic.h:172</div></div>
<div class="ttc" id="aclass_nim_b_l_e_characteristic_callbacks_html_a104baba3c4bbdee7aa28273d265e4c6f"><div class="ttname"><a href="class_nim_b_l_e_characteristic_callbacks.html#a104baba3c4bbdee7aa28273d265e4c6f">NimBLECharacteristicCallbacks::Status</a></div><div class="ttdeci">Status</div><div class="ttdoc">An enum to provide the callback the status of the notification/indication, implemented for backward c...</div><div class="ttdef"><b>Definition:</b> NimBLECharacteristic.h:180</div></div>
<div class="ttc" id="aclass_nim_b_l_e_characteristic_callbacks_html_a185eb5298cc042f1aceeba21caf0dcc9"><div class="ttname"><a href="class_nim_b_l_e_characteristic_callbacks.html#a185eb5298cc042f1aceeba21caf0dcc9">NimBLECharacteristicCallbacks::onNotify</a></div><div class="ttdeci">virtual void onNotify(NimBLECharacteristic *pCharacteristic)</div><div class="ttdoc">Callback function to support a Notify request.</div><div class="ttdef"><b>Definition:</b> NimBLECharacteristic.cpp:616</div></div>
<div class="ttc" id="aclass_nim_b_l_e_characteristic_callbacks_html_a3c0c0f524bc0d00d24a7c5ea92c5cb7e"><div class="ttname"><a href="class_nim_b_l_e_characteristic_callbacks.html#a3c0c0f524bc0d00d24a7c5ea92c5cb7e">NimBLECharacteristicCallbacks::onSubscribe</a></div><div class="ttdeci">virtual void onSubscribe(NimBLECharacteristic *pCharacteristic, ble_gap_conn_desc *desc, uint16_t subValue)</div><div class="ttdoc">Callback function called when a client changes subscription status.</div><div class="ttdef"><b>Definition:</b> NimBLECharacteristic.cpp:642</div></div>
<div class="ttc" id="aclass_nim_b_l_e_characteristic_callbacks_html_a523904b8d39e364db094f623403bad93"><div class="ttname"><a href="class_nim_b_l_e_characteristic_callbacks.html#a523904b8d39e364db094f623403bad93">NimBLECharacteristicCallbacks::onRead</a></div><div class="ttdeci">virtual void onRead(NimBLECharacteristic *pCharacteristic)</div><div class="ttdoc">Callback function to support a read request.</div><div class="ttdef"><b>Definition:</b> NimBLECharacteristic.cpp:582</div></div>
<div class="ttc" id="aclass_nim_b_l_e_characteristic_callbacks_html_aac7caf4a80da061b5beda5ebcd214fc3"><div class="ttname"><a href="class_nim_b_l_e_characteristic_callbacks.html#aac7caf4a80da061b5beda5ebcd214fc3">NimBLECharacteristicCallbacks::onWrite</a></div><div class="ttdeci">virtual void onWrite(NimBLECharacteristic *pCharacteristic)</div><div class="ttdoc">Callback function to support a write request.</div><div class="ttdef"><b>Definition:</b> NimBLECharacteristic.cpp:599</div></div>
<div class="ttc" id="aclass_nim_b_l_e_characteristic_callbacks_html_ab17e7c61723a33cd3c922e3ca9c20f1e"><div class="ttname"><a href="class_nim_b_l_e_characteristic_callbacks.html#ab17e7c61723a33cd3c922e3ca9c20f1e">NimBLECharacteristicCallbacks::onStatus</a></div><div class="ttdeci">virtual void onStatus(NimBLECharacteristic *pCharacteristic, Status s, int code)</div><div class="ttdoc">Callback function to support a Notify/Indicate Status report.</div><div class="ttdef"><b>Definition:</b> NimBLECharacteristic.cpp:627</div></div>
<div class="ttc" id="aclass_nim_b_l_e_characteristic_html"><div class="ttname"><a href="class_nim_b_l_e_characteristic.html">NimBLECharacteristic</a></div><div class="ttdoc">The model of a BLE Characteristic.</div><div class="ttdef"><b>Definition:</b> NimBLECharacteristic.h:62</div></div>
<div class="ttc" id="aclass_nim_b_l_e_characteristic_html_a062f52918f13c49a37ce8e58b9e7382a"><div class="ttname"><a href="class_nim_b_l_e_characteristic.html#a062f52918f13c49a37ce8e58b9e7382a">NimBLECharacteristic::getDescriptorByHandle</a></div><div class="ttdeci">NimBLEDescriptor * getDescriptorByHandle(uint16_t handle)</div><div class="ttdoc">Return the BLE Descriptor for the given handle.</div><div class="ttdef"><b>Definition:</b> NimBLECharacteristic.cpp:182</div></div>
<div class="ttc" id="aclass_nim_b_l_e_characteristic_html_a1747ac4889c7adbb93a2d88a10327a47"><div class="ttname"><a href="class_nim_b_l_e_characteristic.html#a1747ac4889c7adbb93a2d88a10327a47">NimBLECharacteristic::getCallbacks</a></div><div class="ttdeci">NimBLECharacteristicCallbacks * getCallbacks()</div><div class="ttdoc">Get the callback handlers for this characteristic.</div><div class="ttdef"><b>Definition:</b> NimBLECharacteristic.cpp:513</div></div>
<div class="ttc" id="aclass_nim_b_l_e_characteristic_html_a28b03617fe753133582ba4e58c60e52e"><div class="ttname"><a href="class_nim_b_l_e_characteristic.html#a28b03617fe753133582ba4e58c60e52e">NimBLECharacteristic::getUUID</a></div><div class="ttdeci">NimBLEUUID getUUID()</div><div class="ttdoc">Get the UUID of the characteristic.</div><div class="ttdef"><b>Definition:</b> NimBLECharacteristic.cpp:227</div></div>
<div class="ttc" id="aclass_nim_b_l_e_characteristic_html_a29dc2505e1d3b4a7d6800d1547965d17"><div class="ttname"><a href="class_nim_b_l_e_characteristic.html#a29dc2505e1d3b4a7d6800d1547965d17">NimBLECharacteristic::setCallbacks</a></div><div class="ttdeci">void setCallbacks(NimBLECharacteristicCallbacks *pCallbacks)</div><div class="ttdoc">Set the callback handlers for this characteristic.</div><div class="ttdef"><b>Definition:</b> NimBLECharacteristic.cpp:502</div></div>
<div class="ttc" id="aclass_nim_b_l_e_characteristic_html_a2c0ed8932ee257a8632e3d72e353489b"><div class="ttname"><a href="class_nim_b_l_e_characteristic.html#a2c0ed8932ee257a8632e3d72e353489b">NimBLECharacteristic::removeDescriptor</a></div><div class="ttdeci">void removeDescriptor(NimBLEDescriptor *pDescriptor, bool deleteDsc=false)</div><div class="ttdoc">Remove a descriptor from the characterisitc.</div><div class="ttdef"><b>Definition:</b> NimBLECharacteristic.cpp:130</div></div>
<div class="ttc" id="aclass_nim_b_l_e_characteristic_html_a2ce9f62ecc3d1644ef4d58efe7a3c434"><div class="ttname"><a href="class_nim_b_l_e_characteristic.html#a2ce9f62ecc3d1644ef4d58efe7a3c434">NimBLECharacteristic::indicate</a></div><div class="ttdeci">void indicate()</div><div class="ttdoc">Send an indication. An indication is a transmission of up to the first 20 bytes of the characteristic...</div><div class="ttdef"><b>Definition:</b> NimBLECharacteristic.cpp:391</div></div>
<div class="ttc" id="aclass_nim_b_l_e_characteristic_html_a37e908d114f6ad2b4bf19c7cc4db9c54"><div class="ttname"><a href="class_nim_b_l_e_characteristic.html#a37e908d114f6ad2b4bf19c7cc4db9c54">NimBLECharacteristic::getValue</a></div><div class="ttdeci">std::string getValue(time_t *timestamp=nullptr)</div><div class="ttdoc">Retrieve the current value of the characteristic.</div><div class="ttdef"><b>Definition:</b> NimBLECharacteristic.cpp:236</div></div>
<div class="ttc" id="aclass_nim_b_l_e_characteristic_html_a4fa6b8ed011d12e2b1f16e92a02b9a89"><div class="ttname"><a href="class_nim_b_l_e_characteristic.html#a4fa6b8ed011d12e2b1f16e92a02b9a89">NimBLECharacteristic::toString</a></div><div class="ttdeci">std::string toString()</div><div class="ttdoc">Return a string representation of the characteristic.</div><div class="ttdef"><b>Definition:</b> NimBLECharacteristic.cpp:559</div></div>
<div class="ttc" id="aclass_nim_b_l_e_characteristic_html_a580ad0133fd82a673027c91cbb1c74fa"><div class="ttname"><a href="class_nim_b_l_e_characteristic.html#a580ad0133fd82a673027c91cbb1c74fa">NimBLECharacteristic::getDataLength</a></div><div class="ttdeci">size_t getDataLength()</div><div class="ttdoc">Retrieve the the current data length of the characteristic.</div><div class="ttdef"><b>Definition:</b> NimBLECharacteristic.cpp:252</div></div>
<div class="ttc" id="aclass_nim_b_l_e_characteristic_html_a79759a98d9bdb761cb12c1ea6f601afc"><div class="ttname"><a href="class_nim_b_l_e_characteristic.html#a79759a98d9bdb761cb12c1ea6f601afc">NimBLECharacteristic::getProperties</a></div><div class="ttdeci">uint16_t getProperties()</div><div class="ttdoc">Get the properties of the characteristic.</div><div class="ttdef"><b>Definition:</b> NimBLECharacteristic.cpp:205</div></div>
<div class="ttc" id="aclass_nim_b_l_e_characteristic_html_a7cd211a8bb9a0c2ffaed57f2af273677"><div class="ttname"><a href="class_nim_b_l_e_characteristic.html#a7cd211a8bb9a0c2ffaed57f2af273677">NimBLECharacteristic::setValue</a></div><div class="ttdeci">void setValue(const uint8_t *data, size_t size)</div><div class="ttdoc">Set the value of the characteristic.</div><div class="ttdef"><b>Definition:</b> NimBLECharacteristic.cpp:523</div></div>
<div class="ttc" id="aclass_nim_b_l_e_characteristic_html_a7d09c29b26362f6ddcaf51a9c9dc8be4"><div class="ttname"><a href="class_nim_b_l_e_characteristic.html#a7d09c29b26362f6ddcaf51a9c9dc8be4">NimBLECharacteristic::getValue</a></div><div class="ttdeci">T getValue(time_t *timestamp=nullptr, bool skipSizeCheck=false)</div><div class="ttdoc">A template to convert the characteristic data to &lt;type&gt;.</div><div class="ttdef"><b>Definition:</b> NimBLECharacteristic.h:120</div></div>
<div class="ttc" id="aclass_nim_b_l_e_characteristic_html_a7fe29c5ec571d0513c51b8cbac942f4a"><div class="ttname"><a href="class_nim_b_l_e_characteristic.html#a7fe29c5ec571d0513c51b8cbac942f4a">NimBLECharacteristic::~NimBLECharacteristic</a></div><div class="ttdeci">~NimBLECharacteristic()</div><div class="ttdoc">Destructor.</div><div class="ttdef"><b>Definition:</b> NimBLECharacteristic.cpp:59</div></div>
<div class="ttc" id="aclass_nim_b_l_e_characteristic_html_a84aa251a612810ec8d07e77ab03cb483"><div class="ttname"><a href="class_nim_b_l_e_characteristic.html#a84aa251a612810ec8d07e77ab03cb483">NimBLECharacteristic::getService</a></div><div class="ttdeci">NimBLEService * getService()</div><div class="ttdoc">Get the service associated with this characteristic.</div><div class="ttdef"><b>Definition:</b> NimBLECharacteristic.cpp:213</div></div>
<div class="ttc" id="aclass_nim_b_l_e_characteristic_html_a942b2d29d77fcef233549d0c4fd798da"><div class="ttname"><a href="class_nim_b_l_e_characteristic.html#a942b2d29d77fcef233549d0c4fd798da">NimBLECharacteristic::NimBLECharacteristic</a></div><div class="ttdeci">NimBLECharacteristic(const char *uuid, uint16_t properties=NIMBLE_PROPERTY::READ|NIMBLE_PROPERTY::WRITE, NimBLEService *pService=nullptr)</div><div class="ttdoc">Construct a characteristic.</div><div class="ttdef"><b>Definition:</b> NimBLECharacteristic.cpp:35</div></div>
<div class="ttc" id="aclass_nim_b_l_e_characteristic_html_aa45461059e1992c816e32c371d17e813"><div class="ttname"><a href="class_nim_b_l_e_characteristic.html#aa45461059e1992c816e32c371d17e813">NimBLECharacteristic::notify</a></div><div class="ttdeci">void notify(bool is_notification=true)</div><div class="ttdoc">Send a notification. A notification is a transmission of up to the first 20 bytes of the characterist...</div><div class="ttdef"><b>Definition:</b> NimBLECharacteristic.cpp:404</div></div>
<div class="ttc" id="aclass_nim_b_l_e_characteristic_html_aae014669e9ce1ad01520d68fe0cc0fda"><div class="ttname"><a href="class_nim_b_l_e_characteristic.html#aae014669e9ce1ad01520d68fe0cc0fda">NimBLECharacteristic::createDescriptor</a></div><div class="ttdeci">NimBLEDescriptor * createDescriptor(const char *uuid, uint32_t properties=NIMBLE_PROPERTY::READ|NIMBLE_PROPERTY::WRITE, uint16_t max_len=100)</div><div class="ttdoc">Create a new BLE Descriptor associated with this characteristic.</div><div class="ttdef"><b>Definition:</b> NimBLECharacteristic.cpp:73</div></div>
<div class="ttc" id="aclass_nim_b_l_e_characteristic_html_aba05898f446e31222fbe509fa357c730"><div class="ttname"><a href="class_nim_b_l_e_characteristic.html#aba05898f446e31222fbe509fa357c730">NimBLECharacteristic::setValue</a></div><div class="ttdeci">void setValue(const T &amp;s)</div><div class="ttdoc">Convenience template to set the characteristic value to &lt;type&gt;val.</div><div class="ttdef"><b>Definition:</b> NimBLECharacteristic.h:134</div></div>
<div class="ttc" id="aclass_nim_b_l_e_characteristic_html_abc5f4819e4d2c0956857ddd7a1064189"><div class="ttname"><a href="class_nim_b_l_e_characteristic.html#abc5f4819e4d2c0956857ddd7a1064189">NimBLECharacteristic::getDescriptorByUUID</a></div><div class="ttdeci">NimBLEDescriptor * getDescriptorByUUID(const char *uuid)</div><div class="ttdoc">Return the BLE Descriptor for the given UUID.</div><div class="ttdef"><b>Definition:</b> NimBLECharacteristic.cpp:158</div></div>
<div class="ttc" id="aclass_nim_b_l_e_characteristic_html_acc3ea122771cd447103adfce22537379"><div class="ttname"><a href="class_nim_b_l_e_characteristic.html#acc3ea122771cd447103adfce22537379">NimBLECharacteristic::getHandle</a></div><div class="ttdeci">uint16_t getHandle()</div><div class="ttdoc">Get the handle of the characteristic.</div><div class="ttdef"><b>Definition:</b> NimBLECharacteristic.cpp:196</div></div>
<div class="ttc" id="aclass_nim_b_l_e_characteristic_html_aced225d46153b6969f6ded30c0190e39"><div class="ttname"><a href="class_nim_b_l_e_characteristic.html#aced225d46153b6969f6ded30c0190e39">NimBLECharacteristic::getSubscribedCount</a></div><div class="ttdeci">size_t getSubscribedCount()</div><div class="ttdoc">Get the number of clients subscribed to the characteristic.</div><div class="ttdef"><b>Definition:</b> NimBLECharacteristic.cpp:334</div></div>
<div class="ttc" id="aclass_nim_b_l_e_characteristic_html_aed4b2241c89ad2a8f49117e2b9433e5b"><div class="ttname"><a href="class_nim_b_l_e_characteristic.html#aed4b2241c89ad2a8f49117e2b9433e5b">NimBLECharacteristic::addDescriptor</a></div><div class="ttdeci">void addDescriptor(NimBLEDescriptor *pDescriptor)</div><div class="ttdoc">Add a descriptor to the characteristic.</div><div class="ttdef"><b>Definition:</b> NimBLECharacteristic.cpp:104</div></div>
<div class="ttc" id="aclass_nim_b_l_e_descriptor_html"><div class="ttname"><a href="class_nim_b_l_e_descriptor.html">NimBLEDescriptor</a></div><div class="ttdoc">A model of a BLE descriptor.</div><div class="ttdef"><b>Definition:</b> NimBLEDescriptor.h:42</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:42</div></div>
<div class="ttc" id="aclass_nim_b_l_e_service_html"><div class="ttname"><a href="class_nim_b_l_e_service.html">NimBLEService</a></div><div class="ttdoc">The model of a BLE service.</div><div class="ttdef"><b>Definition:</b> NimBLEService.h:34</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:37</div></div>
<div class="ttc" id="animconfig_8h_html"><div class="ttname"><a href="nimconfig_8h.html">nimconfig.h</a></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>NimBLECharacteristic.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.1 </li>
</ul>
</div>
</body>
</html>