mirror of
https://github.com/h2zero/esp-nimble-cpp.git
synced 2024-12-26 04:30:46 +01:00
327 lines
55 KiB
HTML
327 lines
55 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/test_idf/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
|
|
 <span id="projectnumber">1.4.0</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&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&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&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> <span class="comment">/*</span></div>
|
|
<div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="comment"> * NimBLECharacteristic.h</span></div>
|
|
<div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="comment"> *</span></div>
|
|
<div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="comment"> * Created: on March 3, 2020</span></div>
|
|
<div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="comment"> * Author H2zero</span></div>
|
|
<div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="comment"> *</span></div>
|
|
<div class="line"><a name="l00007"></a><span class="lineno"> 7</span> <span class="comment"> * Originally:</span></div>
|
|
<div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="comment"> * BLECharacteristic.h</span></div>
|
|
<div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <span class="comment"> *</span></div>
|
|
<div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <span class="comment"> * Created on: Jun 22, 2017</span></div>
|
|
<div class="line"><a name="l00011"></a><span class="lineno"> 11</span> <span class="comment"> * Author: kolban</span></div>
|
|
<div class="line"><a name="l00012"></a><span class="lineno"> 12</span> <span class="comment"> */</span></div>
|
|
<div class="line"><a name="l00013"></a><span class="lineno"> 13</span>  </div>
|
|
<div class="line"><a name="l00014"></a><span class="lineno"> 14</span> <span class="preprocessor">#ifndef MAIN_NIMBLECHARACTERISTIC_H_</span></div>
|
|
<div class="line"><a name="l00015"></a><span class="lineno"> 15</span> <span class="preprocessor">#define MAIN_NIMBLECHARACTERISTIC_H_</span></div>
|
|
<div class="line"><a name="l00016"></a><span class="lineno"> 16</span> <span class="preprocessor">#include "<a class="code" href="nimconfig_8h.html">nimconfig.h</a>"</span></div>
|
|
<div class="line"><a name="l00017"></a><span class="lineno"> 17</span> <span class="preprocessor">#if defined(CONFIG_BT_ENABLED) && defined(CONFIG_BT_NIMBLE_ROLE_PERIPHERAL)</span></div>
|
|
<div class="line"><a name="l00018"></a><span class="lineno"> 18</span>  </div>
|
|
<div class="line"><a name="l00019"></a><span class="lineno"> 19</span> <span class="preprocessor">#if defined(CONFIG_NIMBLE_CPP_IDF)</span></div>
|
|
<div class="line"><a name="l00020"></a><span class="lineno"> 20</span> <span class="preprocessor">#include "host/ble_hs.h"</span></div>
|
|
<div class="line"><a name="l00021"></a><span class="lineno"> 21</span> <span class="preprocessor">#else</span></div>
|
|
<div class="line"><a name="l00022"></a><span class="lineno"> 22</span> <span class="preprocessor">#include "nimble/nimble/host/include/host/ble_hs.h"</span></div>
|
|
<div class="line"><a name="l00023"></a><span class="lineno"> 23</span> <span class="preprocessor">#endif</span></div>
|
|
<div class="line"><a name="l00024"></a><span class="lineno"> 24</span>  </div>
|
|
<div class="line"><a name="l00025"></a><span class="lineno"> 25</span> <span class="comment">/**** FIX COMPILATION ****/</span></div>
|
|
<div class="line"><a name="l00026"></a><span class="lineno"> 26</span> <span class="preprocessor">#undef min</span></div>
|
|
<div class="line"><a name="l00027"></a><span class="lineno"> 27</span> <span class="preprocessor">#undef max</span></div>
|
|
<div class="line"><a name="l00028"></a><span class="lineno"> 28</span> <span class="comment">/**************************/</span></div>
|
|
<div class="line"><a name="l00029"></a><span class="lineno"> 29</span>  </div>
|
|
<div class="line"><a name="l00030"></a><span class="lineno"> 30</span> <span class="keyword">typedef</span> <span class="keyword">enum</span> {</div>
|
|
<div class="line"><a name="l00031"></a><span class="lineno"> 31</span>  READ = BLE_GATT_CHR_F_READ,</div>
|
|
<div class="line"><a name="l00032"></a><span class="lineno"> 32</span>  READ_ENC = BLE_GATT_CHR_F_READ_ENC,</div>
|
|
<div class="line"><a name="l00033"></a><span class="lineno"> 33</span>  READ_AUTHEN = BLE_GATT_CHR_F_READ_AUTHEN,</div>
|
|
<div class="line"><a name="l00034"></a><span class="lineno"> 34</span>  READ_AUTHOR = BLE_GATT_CHR_F_READ_AUTHOR,</div>
|
|
<div class="line"><a name="l00035"></a><span class="lineno"> 35</span>  WRITE = BLE_GATT_CHR_F_WRITE,</div>
|
|
<div class="line"><a name="l00036"></a><span class="lineno"> 36</span>  WRITE_NR = BLE_GATT_CHR_F_WRITE_NO_RSP,</div>
|
|
<div class="line"><a name="l00037"></a><span class="lineno"> 37</span>  WRITE_ENC = BLE_GATT_CHR_F_WRITE_ENC,</div>
|
|
<div class="line"><a name="l00038"></a><span class="lineno"> 38</span>  WRITE_AUTHEN = BLE_GATT_CHR_F_WRITE_AUTHEN,</div>
|
|
<div class="line"><a name="l00039"></a><span class="lineno"> 39</span>  WRITE_AUTHOR = BLE_GATT_CHR_F_WRITE_AUTHOR,</div>
|
|
<div class="line"><a name="l00040"></a><span class="lineno"> 40</span>  BROADCAST = BLE_GATT_CHR_F_BROADCAST,</div>
|
|
<div class="line"><a name="l00041"></a><span class="lineno"> 41</span>  NOTIFY = BLE_GATT_CHR_F_NOTIFY,</div>
|
|
<div class="line"><a name="l00042"></a><span class="lineno"> 42</span>  INDICATE = BLE_GATT_CHR_F_INDICATE</div>
|
|
<div class="line"><a name="l00043"></a><span class="lineno"> 43</span> } NIMBLE_PROPERTY;</div>
|
|
<div class="line"><a name="l00044"></a><span class="lineno"> 44</span>  </div>
|
|
<div class="line"><a name="l00045"></a><span class="lineno"> 45</span> <span class="preprocessor">#include "NimBLEService.h"</span></div>
|
|
<div class="line"><a name="l00046"></a><span class="lineno"> 46</span> <span class="preprocessor">#include "NimBLEDescriptor.h"</span></div>
|
|
<div class="line"><a name="l00047"></a><span class="lineno"> 47</span> <span class="preprocessor">#include "NimBLEAttValue.h"</span></div>
|
|
<div class="line"><a name="l00048"></a><span class="lineno"> 48</span>  </div>
|
|
<div class="line"><a name="l00049"></a><span class="lineno"> 49</span> <span class="preprocessor">#include <string></span></div>
|
|
<div class="line"><a name="l00050"></a><span class="lineno"> 50</span> <span class="preprocessor">#include <vector></span></div>
|
|
<div class="line"><a name="l00051"></a><span class="lineno"> 51</span>  </div>
|
|
<div class="line"><a name="l00052"></a><span class="lineno"> 52</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="l00053"></a><span class="lineno"> 53</span> <span class="keyword">class </span><a class="code" href="class_nim_b_l_e_descriptor.html">NimBLEDescriptor</a>;</div>
|
|
<div class="line"><a name="l00054"></a><span class="lineno"> 54</span> <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="l00055"></a><span class="lineno"> 55</span>  </div>
|
|
<div class="line"><a name="l00056"></a><span class="lineno"> 56</span>  </div>
|
|
<div class="line"><a name="l00063"></a><span class="lineno"><a class="line" href="class_nim_b_l_e_characteristic.html"> 63</a></span> <span class="keyword">class </span><a class="code" href="class_nim_b_l_e_characteristic.html">NimBLECharacteristic</a> {</div>
|
|
<div class="line"><a name="l00064"></a><span class="lineno"> 64</span> <span class="keyword">public</span>:</div>
|
|
<div class="line"><a name="l00065"></a><span class="lineno"> 65</span>  <a class="code" href="class_nim_b_l_e_characteristic.html#aa32224e69115e9ba60ac614e8f37a871">NimBLECharacteristic</a>(<span class="keyword">const</span> <span class="keywordtype">char</span>* uuid,</div>
|
|
<div class="line"><a name="l00066"></a><span class="lineno"> 66</span>  uint16_t properties =</div>
|
|
<div class="line"><a name="l00067"></a><span class="lineno"> 67</span>  NIMBLE_PROPERTY::READ |</div>
|
|
<div class="line"><a name="l00068"></a><span class="lineno"> 68</span>  NIMBLE_PROPERTY::WRITE,</div>
|
|
<div class="line"><a name="l00069"></a><span class="lineno"> 69</span>  uint16_t max_len = BLE_ATT_ATTR_MAX_LEN,</div>
|
|
<div class="line"><a name="l00070"></a><span class="lineno"> 70</span>  <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="l00071"></a><span class="lineno"> 71</span>  <a class="code" href="class_nim_b_l_e_characteristic.html#aa32224e69115e9ba60ac614e8f37a871">NimBLECharacteristic</a>(<span class="keyword">const</span> <a class="code" href="class_nim_b_l_e_u_u_i_d.html">NimBLEUUID</a> &uuid,</div>
|
|
<div class="line"><a name="l00072"></a><span class="lineno"> 72</span>  uint16_t properties =</div>
|
|
<div class="line"><a name="l00073"></a><span class="lineno"> 73</span>  NIMBLE_PROPERTY::READ |</div>
|
|
<div class="line"><a name="l00074"></a><span class="lineno"> 74</span>  NIMBLE_PROPERTY::WRITE,</div>
|
|
<div class="line"><a name="l00075"></a><span class="lineno"> 75</span>  uint16_t max_len = BLE_ATT_ATTR_MAX_LEN,</div>
|
|
<div class="line"><a name="l00076"></a><span class="lineno"> 76</span>  <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="l00077"></a><span class="lineno"> 77</span>  </div>
|
|
<div class="line"><a name="l00078"></a><span class="lineno"> 78</span>  <a class="code" href="class_nim_b_l_e_characteristic.html#a7fe29c5ec571d0513c51b8cbac942f4a">~NimBLECharacteristic</a>();</div>
|
|
<div class="line"><a name="l00079"></a><span class="lineno"> 79</span>  </div>
|
|
<div class="line"><a name="l00080"></a><span class="lineno"> 80</span>  uint16_t <a class="code" href="class_nim_b_l_e_characteristic.html#acc3ea122771cd447103adfce22537379">getHandle</a>();</div>
|
|
<div class="line"><a name="l00081"></a><span class="lineno"> 81</span>  <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="l00082"></a><span class="lineno"> 82</span>  std::string <a class="code" href="class_nim_b_l_e_characteristic.html#a4fa6b8ed011d12e2b1f16e92a02b9a89">toString</a>();</div>
|
|
<div class="line"><a name="l00083"></a><span class="lineno"> 83</span>  <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="l00084"></a><span class="lineno"> 84</span>  <span class="keywordtype">void</span> <a class="code" href="class_nim_b_l_e_characteristic.html#a2ce9f62ecc3d1644ef4d58efe7a3c434">indicate</a>(<span class="keyword">const</span> uint8_t* value, <span class="keywordtype">size_t</span> length);</div>
|
|
<div class="line"><a name="l00085"></a><span class="lineno"> 85</span>  <span class="keywordtype">void</span> <a class="code" href="class_nim_b_l_e_characteristic.html#a2ce9f62ecc3d1644ef4d58efe7a3c434">indicate</a>(<span class="keyword">const</span> std::vector<uint8_t>& value);</div>
|
|
<div class="line"><a name="l00086"></a><span class="lineno"> 86</span>  <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>  <span class="keywordtype">void</span> <a class="code" href="class_nim_b_l_e_characteristic.html#aa45461059e1992c816e32c371d17e813">notify</a>(<span class="keyword">const</span> uint8_t* value, <span class="keywordtype">size_t</span> length, <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>  <span class="keywordtype">void</span> <a class="code" href="class_nim_b_l_e_characteristic.html#aa45461059e1992c816e32c371d17e813">notify</a>(<span class="keyword">const</span> std::vector<uint8_t>& value, <span class="keywordtype">bool</span> is_notification = <span class="keyword">true</span>);</div>
|
|
<div class="line"><a name="l00089"></a><span class="lineno"> 89</span>  <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>  <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="l00091"></a><span class="lineno"> 91</span>  <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="l00092"></a><span class="lineno"> 92</span>  <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> &uuid);</div>
|
|
<div class="line"><a name="l00093"></a><span class="lineno"> 93</span>  <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="l00094"></a><span class="lineno"> 94</span>  <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="l00095"></a><span class="lineno"> 95</span>  <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="l00096"></a><span class="lineno"> 96</span>  uint16_t <a class="code" href="class_nim_b_l_e_characteristic.html#a79759a98d9bdb761cb12c1ea6f601afc">getProperties</a>();</div>
|
|
<div class="line"><a name="l00097"></a><span class="lineno"> 97</span>  <a class="code" href="class_nim_b_l_e_att_value.html">NimBLEAttValue</a> <a class="code" href="class_nim_b_l_e_characteristic.html#a78484a01350300176033a09180f7207f">getValue</a>(time_t *timestamp = <span class="keyword">nullptr</span>);</div>
|
|
<div class="line"><a name="l00098"></a><span class="lineno"> 98</span>  <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="l00099"></a><span class="lineno"> 99</span>  <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="l00100"></a><span class="lineno"> 100</span>  <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::vector<uint8_t>& vec);</div>
|
|
<div class="line"><a name="l00101"></a><span class="lineno"> 101</span>  <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="l00102"></a><span class="lineno"> 102</span>  <a class="code" href="class_nim_b_l_e_descriptor.html">NimBLEDescriptor</a>* <a class="code" href="class_nim_b_l_e_characteristic.html#a1fc55adb9d62d8b5fe1be2b172686353">createDescriptor</a>(<span class="keyword">const</span> <span class="keywordtype">char</span>* uuid,</div>
|
|
<div class="line"><a name="l00103"></a><span class="lineno"> 103</span>  uint32_t properties =</div>
|
|
<div class="line"><a name="l00104"></a><span class="lineno"> 104</span>  NIMBLE_PROPERTY::READ |</div>
|
|
<div class="line"><a name="l00105"></a><span class="lineno"> 105</span>  NIMBLE_PROPERTY::WRITE,</div>
|
|
<div class="line"><a name="l00106"></a><span class="lineno"> 106</span>  uint16_t max_len = BLE_ATT_ATTR_MAX_LEN);;</div>
|
|
<div class="line"><a name="l00107"></a><span class="lineno"> 107</span>  <a class="code" href="class_nim_b_l_e_descriptor.html">NimBLEDescriptor</a>* <a class="code" href="class_nim_b_l_e_characteristic.html#a1fc55adb9d62d8b5fe1be2b172686353">createDescriptor</a>(<span class="keyword">const</span> <a class="code" href="class_nim_b_l_e_u_u_i_d.html">NimBLEUUID</a> &uuid,</div>
|
|
<div class="line"><a name="l00108"></a><span class="lineno"> 108</span>  uint32_t properties =</div>
|
|
<div class="line"><a name="l00109"></a><span class="lineno"> 109</span>  NIMBLE_PROPERTY::READ |</div>
|
|
<div class="line"><a name="l00110"></a><span class="lineno"> 110</span>  NIMBLE_PROPERTY::WRITE,</div>
|
|
<div class="line"><a name="l00111"></a><span class="lineno"> 111</span>  uint16_t max_len = BLE_ATT_ATTR_MAX_LEN);</div>
|
|
<div class="line"><a name="l00112"></a><span class="lineno"> 112</span>  </div>
|
|
<div class="line"><a name="l00113"></a><span class="lineno"> 113</span>  <a class="code" href="class_nim_b_l_e_characteristic_callbacks.html">NimBLECharacteristicCallbacks</a>* <a class="code" href="class_nim_b_l_e_characteristic.html#a1747ac4889c7adbb93a2d88a10327a47">getCallbacks</a>();</div>
|
|
<div class="line"><a name="l00114"></a><span class="lineno"> 114</span>  </div>
|
|
<div class="line"><a name="l00115"></a><span class="lineno"> 115</span>  </div>
|
|
<div class="line"><a name="l00116"></a><span class="lineno"> 116</span> <span class="comment"> /*********************** Template Functions ************************/</span></div>
|
|
<div class="line"><a name="l00117"></a><span class="lineno"> 117</span>  </div>
|
|
<div class="line"><a name="l00122"></a><span class="lineno"> 122</span>  <span class="keyword">template</span><<span class="keyword">typename</span> T></div>
|
|
<div class="line"><a name="l00123"></a><span class="lineno"><a class="line" href="class_nim_b_l_e_characteristic.html#aba05898f446e31222fbe509fa357c730"> 123</a></span>  <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 &s) { m_value.<a class="code" href="class_nim_b_l_e_att_value.html#a5c8c5ecfa3864d45ea5b155385e3f9fa">setValue</a><T>(s); }</div>
|
|
<div class="line"><a name="l00124"></a><span class="lineno"> 124</span>  </div>
|
|
<div class="line"><a name="l00133"></a><span class="lineno"> 133</span>  <span class="keyword">template</span><<span class="keyword">typename</span> T></div>
|
|
<div class="line"><a name="l00134"></a><span class="lineno"><a class="line" href="class_nim_b_l_e_characteristic.html#a7d09c29b26362f6ddcaf51a9c9dc8be4"> 134</a></span>  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="l00135"></a><span class="lineno"> 135</span>  <span class="keywordflow">return</span> m_value.<a class="code" href="class_nim_b_l_e_att_value.html#a60fb3dc7057d4ec800c3ef6fd2480a69">getValue</a><T>(timestamp, skipSizeCheck);</div>
|
|
<div class="line"><a name="l00136"></a><span class="lineno"> 136</span>  }</div>
|
|
<div class="line"><a name="l00137"></a><span class="lineno"> 137</span>  </div>
|
|
<div class="line"><a name="l00145"></a><span class="lineno"> 145</span>  <span class="keyword">template</span><<span class="keyword">typename</span> T></div>
|
|
<div class="line"><a name="l00146"></a><span class="lineno"> 146</span> <span class="preprocessor">#ifdef _DOXYGEN_</span></div>
|
|
<div class="line"><a name="l00147"></a><span class="lineno"> 147</span>  <span class="keywordtype">void</span></div>
|
|
<div class="line"><a name="l00148"></a><span class="lineno"> 148</span> <span class="preprocessor">#else</span></div>
|
|
<div class="line"><a name="l00149"></a><span class="lineno"> 149</span>  <span class="keyword">typename</span> std::enable_if<Has_c_str_len<T>::value, <span class="keywordtype">void</span>>::type</div>
|
|
<div class="line"><a name="l00150"></a><span class="lineno"> 150</span> <span class="preprocessor">#endif</span></div>
|
|
<div class="line"><a name="l00151"></a><span class="lineno"><a class="line" href="class_nim_b_l_e_characteristic.html#aed1432c11fadec203104b13aaaf7060d"> 151</a></span>  <a class="code" href="class_nim_b_l_e_characteristic.html#aed1432c11fadec203104b13aaaf7060d">notify</a>(<span class="keyword">const</span> T& value, <span class="keywordtype">bool</span> is_notification = <span class="keyword">true</span>) {</div>
|
|
<div class="line"><a name="l00152"></a><span class="lineno"> 152</span>  <a class="code" href="class_nim_b_l_e_characteristic.html#aa45461059e1992c816e32c371d17e813">notify</a>((uint8_t*)value.c_str(), value.length(), is_notification);</div>
|
|
<div class="line"><a name="l00153"></a><span class="lineno"> 153</span>  }</div>
|
|
<div class="line"><a name="l00154"></a><span class="lineno"> 154</span>  </div>
|
|
<div class="line"><a name="l00161"></a><span class="lineno"> 161</span>  <span class="keyword">template</span><<span class="keyword">typename</span> T></div>
|
|
<div class="line"><a name="l00162"></a><span class="lineno"> 162</span> <span class="preprocessor">#ifdef _DOXYGEN_</span></div>
|
|
<div class="line"><a name="l00163"></a><span class="lineno"> 163</span>  <span class="keywordtype">void</span></div>
|
|
<div class="line"><a name="l00164"></a><span class="lineno"> 164</span> <span class="preprocessor">#else</span></div>
|
|
<div class="line"><a name="l00165"></a><span class="lineno"> 165</span>  <span class="keyword">typename</span> std::enable_if<Has_c_str_len<T>::value, <span class="keywordtype">void</span>>::type</div>
|
|
<div class="line"><a name="l00166"></a><span class="lineno"> 166</span> <span class="preprocessor">#endif</span></div>
|
|
<div class="line"><a name="l00167"></a><span class="lineno"><a class="line" href="class_nim_b_l_e_characteristic.html#af2940e8c314a1ecee1750d20a60c459d"> 167</a></span>  <a class="code" href="class_nim_b_l_e_characteristic.html#af2940e8c314a1ecee1750d20a60c459d">indicate</a>(<span class="keyword">const</span> T& value) {</div>
|
|
<div class="line"><a name="l00168"></a><span class="lineno"> 168</span>  <a class="code" href="class_nim_b_l_e_characteristic.html#a2ce9f62ecc3d1644ef4d58efe7a3c434">indicate</a>((uint8_t*)value.c_str(), value.length());</div>
|
|
<div class="line"><a name="l00169"></a><span class="lineno"> 169</span>  }</div>
|
|
<div class="line"><a name="l00170"></a><span class="lineno"> 170</span>  </div>
|
|
<div class="line"><a name="l00171"></a><span class="lineno"> 171</span> <span class="keyword">private</span>:</div>
|
|
<div class="line"><a name="l00172"></a><span class="lineno"> 172</span>  </div>
|
|
<div class="line"><a name="l00173"></a><span class="lineno"> 173</span>  <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="l00174"></a><span class="lineno"> 174</span>  <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="l00175"></a><span class="lineno"> 175</span>  </div>
|
|
<div class="line"><a name="l00176"></a><span class="lineno"> 176</span>  <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="l00177"></a><span class="lineno"> 177</span>  <span class="keywordtype">void</span> setSubscribe(<span class="keyword">struct</span> ble_gap_event *event);</div>
|
|
<div class="line"><a name="l00178"></a><span class="lineno"> 178</span>  <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="l00179"></a><span class="lineno"> 179</span>  <span class="keyword">struct</span> ble_gatt_access_ctxt *ctxt, <span class="keywordtype">void</span> *arg);</div>
|
|
<div class="line"><a name="l00180"></a><span class="lineno"> 180</span>  </div>
|
|
<div class="line"><a name="l00181"></a><span class="lineno"> 181</span>  <a class="code" href="class_nim_b_l_e_u_u_i_d.html">NimBLEUUID</a> m_uuid;</div>
|
|
<div class="line"><a name="l00182"></a><span class="lineno"> 182</span>  uint16_t m_handle;</div>
|
|
<div class="line"><a name="l00183"></a><span class="lineno"> 183</span>  uint16_t m_properties;</div>
|
|
<div class="line"><a name="l00184"></a><span class="lineno"> 184</span>  <a class="code" href="class_nim_b_l_e_characteristic_callbacks.html">NimBLECharacteristicCallbacks</a>* m_pCallbacks;</div>
|
|
<div class="line"><a name="l00185"></a><span class="lineno"> 185</span>  <a class="code" href="class_nim_b_l_e_service.html">NimBLEService</a>* m_pService;</div>
|
|
<div class="line"><a name="l00186"></a><span class="lineno"> 186</span>  <a class="code" href="class_nim_b_l_e_att_value.html">NimBLEAttValue</a> m_value;</div>
|
|
<div class="line"><a name="l00187"></a><span class="lineno"> 187</span>  std::vector<NimBLEDescriptor*> m_dscVec;</div>
|
|
<div class="line"><a name="l00188"></a><span class="lineno"> 188</span>  uint8_t m_removed;</div>
|
|
<div class="line"><a name="l00189"></a><span class="lineno"> 189</span>  </div>
|
|
<div class="line"><a name="l00190"></a><span class="lineno"> 190</span>  std::vector<std::pair<uint16_t, uint16_t>> m_subscribedVec;</div>
|
|
<div class="line"><a name="l00191"></a><span class="lineno"> 191</span> }; <span class="comment">// NimBLECharacteristic</span></div>
|
|
<div class="line"><a name="l00192"></a><span class="lineno"> 192</span>  </div>
|
|
<div class="line"><a name="l00193"></a><span class="lineno"> 193</span>  </div>
|
|
<div class="line"><a name="l00201"></a><span class="lineno"><a class="line" href="class_nim_b_l_e_characteristic_callbacks.html"> 201</a></span> <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="l00202"></a><span class="lineno"> 202</span> <span class="keyword">public</span>:</div>
|
|
<div class="line"><a name="l00203"></a><span class="lineno"> 203</span>  </div>
|
|
<div class="line"><a name="l00209"></a><span class="lineno"><a class="line" href="class_nim_b_l_e_characteristic_callbacks.html#a104baba3c4bbdee7aa28273d265e4c6f"> 209</a></span>  <span class="keyword">typedef</span> <span class="keyword">enum</span> {</div>
|
|
<div class="line"><a name="l00210"></a><span class="lineno"> 210</span>  SUCCESS_INDICATE,</div>
|
|
<div class="line"><a name="l00211"></a><span class="lineno"> 211</span>  SUCCESS_NOTIFY,</div>
|
|
<div class="line"><a name="l00212"></a><span class="lineno"> 212</span>  ERROR_INDICATE_DISABLED,</div>
|
|
<div class="line"><a name="l00213"></a><span class="lineno"> 213</span>  ERROR_NOTIFY_DISABLED,</div>
|
|
<div class="line"><a name="l00214"></a><span class="lineno"> 214</span>  ERROR_GATT,</div>
|
|
<div class="line"><a name="l00215"></a><span class="lineno"> 215</span>  ERROR_NO_CLIENT,</div>
|
|
<div class="line"><a name="l00216"></a><span class="lineno"> 216</span>  ERROR_INDICATE_TIMEOUT,</div>
|
|
<div class="line"><a name="l00217"></a><span class="lineno"> 217</span>  ERROR_INDICATE_FAILURE</div>
|
|
<div class="line"><a name="l00218"></a><span class="lineno"> 218</span>  }<a class="code" href="class_nim_b_l_e_characteristic_callbacks.html#a104baba3c4bbdee7aa28273d265e4c6f">Status</a>;</div>
|
|
<div class="line"><a name="l00219"></a><span class="lineno"> 219</span>  </div>
|
|
<div class="line"><a name="l00220"></a><span class="lineno"> 220</span>  <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="l00221"></a><span class="lineno"> 221</span>  <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="l00222"></a><span class="lineno"> 222</span>  <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="l00223"></a><span class="lineno"> 223</span>  <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="l00224"></a><span class="lineno"> 224</span>  <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="l00225"></a><span class="lineno"> 225</span>  <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="l00226"></a><span class="lineno"> 226</span>  <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="l00227"></a><span class="lineno"> 227</span>  <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="l00228"></a><span class="lineno"> 228</span> };</div>
|
|
<div class="line"><a name="l00229"></a><span class="lineno"> 229</span>  </div>
|
|
<div class="line"><a name="l00230"></a><span class="lineno"> 230</span> <span class="preprocessor">#endif </span><span class="comment">/* CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_PERIPHERAL */</span><span class="preprocessor"></span></div>
|
|
<div class="line"><a name="l00231"></a><span class="lineno"> 231</span> <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_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:61</div></div>
|
|
<div class="ttc" id="aclass_nim_b_l_e_att_value_html_a5c8c5ecfa3864d45ea5b155385e3f9fa"><div class="ttname"><a href="class_nim_b_l_e_att_value.html#a5c8c5ecfa3864d45ea5b155385e3f9fa">NimBLEAttValue::setValue</a></div><div class="ttdeci">bool setValue(const uint8_t *value, uint16_t len)</div><div class="ttdoc">Set the value from a buffer.</div><div class="ttdef"><b>Definition:</b> NimBLEAttValue.h:380</div></div>
|
|
<div class="ttc" id="aclass_nim_b_l_e_att_value_html_a60fb3dc7057d4ec800c3ef6fd2480a69"><div class="ttname"><a href="class_nim_b_l_e_att_value.html#a60fb3dc7057d4ec800c3ef6fd2480a69">NimBLEAttValue::getValue</a></div><div class="ttdeci">const uint8_t * getValue(time_t *timestamp)</div><div class="ttdoc">Get a pointer to the value buffer with timestamp.</div><div class="ttdef"><b>Definition:</b> NimBLEAttValue.h:369</div></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:201</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:209</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:628</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:654</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:594</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:611</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:639</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:63</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:185</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:535</div></div>
|
|
<div class="ttc" id="aclass_nim_b_l_e_characteristic_html_a1fc55adb9d62d8b5fe1be2b172686353"><div class="ttname"><a href="class_nim_b_l_e_characteristic.html#a1fc55adb9d62d8b5fe1be2b172686353">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=BLE_ATT_ATTR_MAX_LEN)</div><div class="ttdoc">Create a new BLE Descriptor associated with this characteristic.</div><div class="ttdef"><b>Definition:</b> NimBLECharacteristic.cpp:76</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:230</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:524</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 characteristic.</div><div class="ttdef"><b>Definition:</b> NimBLECharacteristic.cpp:133</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.</div><div class="ttdef"><b>Definition:</b> NimBLECharacteristic.cpp:389</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:571</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_a78484a01350300176033a09180f7207f"><div class="ttname"><a href="class_nim_b_l_e_characteristic.html#a78484a01350300176033a09180f7207f">NimBLECharacteristic::getValue</a></div><div class="ttdeci">NimBLEAttValue 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:239</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:208</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 from a data buffer .</div><div class="ttdef"><b>Definition:</b> NimBLECharacteristic.cpp:545</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">Template to convert the characteristic data to <type>.</div><div class="ttdef"><b>Definition:</b> NimBLECharacteristic.h:134</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:62</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:216</div></div>
|
|
<div class="ttc" id="aclass_nim_b_l_e_characteristic_html_aa32224e69115e9ba60ac614e8f37a871"><div class="ttname"><a href="class_nim_b_l_e_characteristic.html#aa32224e69115e9ba60ac614e8f37a871">NimBLECharacteristic::NimBLECharacteristic</a></div><div class="ttdeci">NimBLECharacteristic(const char *uuid, uint16_t properties=NIMBLE_PROPERTY::READ|NIMBLE_PROPERTY::WRITE, uint16_t max_len=BLE_ATT_ATTR_MAX_LEN, NimBLEService *pService=nullptr)</div><div class="ttdoc">Construct a characteristic.</div><div class="ttdef"><b>Definition:</b> NimBLECharacteristic.cpp:36</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 or indication.</div><div class="ttdef"><b>Definition:</b> NimBLECharacteristic.cpp:417</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 &s)</div><div class="ttdoc">Template to set the characteristic value to <type>val.</div><div class="ttdef"><b>Definition:</b> NimBLECharacteristic.h:123</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:161</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:199</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_aed1432c11fadec203104b13aaaf7060d"><div class="ttname"><a href="class_nim_b_l_e_characteristic.html#aed1432c11fadec203104b13aaaf7060d">NimBLECharacteristic::notify</a></div><div class="ttdeci">void notify(const T &value, bool is_notification=true)</div><div class="ttdoc">Template to send a notification from a class type that has a c_str() and length() method.</div><div class="ttdef"><b>Definition:</b> NimBLECharacteristic.h:151</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:107</div></div>
|
|
<div class="ttc" id="aclass_nim_b_l_e_characteristic_html_af2940e8c314a1ecee1750d20a60c459d"><div class="ttname"><a href="class_nim_b_l_e_characteristic.html#af2940e8c314a1ecee1750d20a60c459d">NimBLECharacteristic::indicate</a></div><div class="ttdeci">void indicate(const T &value)</div><div class="ttdoc">Template to send an indication from a class type that has a c_str() and length() method.</div><div class="ttdef"><b>Definition:</b> NimBLECharacteristic.h:167</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:35</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:46</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>
|