esp-nimble-cpp/class_nim_b_l_e_characteristic.html

1146 lines
62 KiB
HTML
Raw Normal View History

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
2022-01-15 23:23:57 +01:00
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
2022-01-15 23:23:57 +01:00
<title>esp-nimble-cpp: NimBLECharacteristic Class Reference</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;">
2022-01-15 23:23:57 +01:00
<div id="projectname">esp-nimble-cpp
&#160;<span id="projectnumber">1.4.1</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
2022-01-15 23:23:57 +01:00
<!-- 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('class_nim_b_l_e_characteristic.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="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="class_nim_b_l_e_characteristic-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">NimBLECharacteristic Class Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>The model of a BLE Characteristic.
<a href="class_nim_b_l_e_characteristic.html#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
2022-07-31 19:38:16 +02:00
<tr class="memitem:aa32224e69115e9ba60ac614e8f37a871"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_characteristic.html#aa32224e69115e9ba60ac614e8f37a871">NimBLECharacteristic</a> (const char *uuid, uint16_t properties=NIMBLE_PROPERTY::READ|NIMBLE_PROPERTY::WRITE, uint16_t max_len=BLE_ATT_ATTR_MAX_LEN, <a class="el" href="class_nim_b_l_e_service.html">NimBLEService</a> *pService=nullptr)</td></tr>
<tr class="memdesc:aa32224e69115e9ba60ac614e8f37a871"><td class="mdescLeft">&#160;</td><td class="mdescRight">Construct a characteristic. <a href="class_nim_b_l_e_characteristic.html#aa32224e69115e9ba60ac614e8f37a871">More...</a><br /></td></tr>
<tr class="separator:aa32224e69115e9ba60ac614e8f37a871"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae2053d941cf8574acbdceb8b549b8264"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_characteristic.html#ae2053d941cf8574acbdceb8b549b8264">NimBLECharacteristic</a> (const <a class="el" href="class_nim_b_l_e_u_u_i_d.html">NimBLEUUID</a> &amp;uuid, uint16_t properties=NIMBLE_PROPERTY::READ|NIMBLE_PROPERTY::WRITE, uint16_t max_len=BLE_ATT_ATTR_MAX_LEN, <a class="el" href="class_nim_b_l_e_service.html">NimBLEService</a> *pService=nullptr)</td></tr>
<tr class="memdesc:ae2053d941cf8574acbdceb8b549b8264"><td class="mdescLeft">&#160;</td><td class="mdescRight">Construct a characteristic. <a href="class_nim_b_l_e_characteristic.html#ae2053d941cf8574acbdceb8b549b8264">More...</a><br /></td></tr>
<tr class="separator:ae2053d941cf8574acbdceb8b549b8264"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7fe29c5ec571d0513c51b8cbac942f4a"><td class="memItemLeft" align="right" valign="top"><a id="a7fe29c5ec571d0513c51b8cbac942f4a"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_characteristic.html#a7fe29c5ec571d0513c51b8cbac942f4a">~NimBLECharacteristic</a> ()</td></tr>
<tr class="memdesc:a7fe29c5ec571d0513c51b8cbac942f4a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destructor. <br /></td></tr>
<tr class="separator:a7fe29c5ec571d0513c51b8cbac942f4a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acc3ea122771cd447103adfce22537379"><td class="memItemLeft" align="right" valign="top">uint16_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_characteristic.html#acc3ea122771cd447103adfce22537379">getHandle</a> ()</td></tr>
<tr class="memdesc:acc3ea122771cd447103adfce22537379"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the handle of the characteristic. <a href="class_nim_b_l_e_characteristic.html#acc3ea122771cd447103adfce22537379">More...</a><br /></td></tr>
<tr class="separator:acc3ea122771cd447103adfce22537379"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a28b03617fe753133582ba4e58c60e52e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_nim_b_l_e_u_u_i_d.html">NimBLEUUID</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_characteristic.html#a28b03617fe753133582ba4e58c60e52e">getUUID</a> ()</td></tr>
<tr class="memdesc:a28b03617fe753133582ba4e58c60e52e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the UUID of the characteristic. <a href="class_nim_b_l_e_characteristic.html#a28b03617fe753133582ba4e58c60e52e">More...</a><br /></td></tr>
<tr class="separator:a28b03617fe753133582ba4e58c60e52e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4fa6b8ed011d12e2b1f16e92a02b9a89"><td class="memItemLeft" align="right" valign="top">std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_characteristic.html#a4fa6b8ed011d12e2b1f16e92a02b9a89">toString</a> ()</td></tr>
<tr class="memdesc:a4fa6b8ed011d12e2b1f16e92a02b9a89"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return a string representation of the characteristic. <a href="class_nim_b_l_e_characteristic.html#a4fa6b8ed011d12e2b1f16e92a02b9a89">More...</a><br /></td></tr>
<tr class="separator:a4fa6b8ed011d12e2b1f16e92a02b9a89"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2ce9f62ecc3d1644ef4d58efe7a3c434"><td class="memItemLeft" align="right" valign="top"><a id="a2ce9f62ecc3d1644ef4d58efe7a3c434"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_characteristic.html#a2ce9f62ecc3d1644ef4d58efe7a3c434">indicate</a> ()</td></tr>
2022-07-31 19:38:16 +02:00
<tr class="memdesc:a2ce9f62ecc3d1644ef4d58efe7a3c434"><td class="mdescLeft">&#160;</td><td class="mdescRight">Send an indication. <br /></td></tr>
<tr class="separator:a2ce9f62ecc3d1644ef4d58efe7a3c434"><td class="memSeparator" colspan="2">&#160;</td></tr>
2022-07-31 19:38:16 +02:00
<tr class="memitem:a8c1875611a1beb192e6c24dff35d0655"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_characteristic.html#a8c1875611a1beb192e6c24dff35d0655">indicate</a> (const uint8_t *value, size_t length)</td></tr>
<tr class="memdesc:a8c1875611a1beb192e6c24dff35d0655"><td class="mdescLeft">&#160;</td><td class="mdescRight">Send an indication. <a href="class_nim_b_l_e_characteristic.html#a8c1875611a1beb192e6c24dff35d0655">More...</a><br /></td></tr>
<tr class="separator:a8c1875611a1beb192e6c24dff35d0655"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2e827aba484add48e52c8eebf80b4a78"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_characteristic.html#a2e827aba484add48e52c8eebf80b4a78">indicate</a> (const std::vector&lt; uint8_t &gt; &amp;value)</td></tr>
<tr class="memdesc:a2e827aba484add48e52c8eebf80b4a78"><td class="mdescLeft">&#160;</td><td class="mdescRight">Send an indication. <a href="class_nim_b_l_e_characteristic.html#a2e827aba484add48e52c8eebf80b4a78">More...</a><br /></td></tr>
<tr class="separator:a2e827aba484add48e52c8eebf80b4a78"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa45461059e1992c816e32c371d17e813"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_characteristic.html#aa45461059e1992c816e32c371d17e813">notify</a> (bool is_notification=true)</td></tr>
2022-07-31 19:38:16 +02:00
<tr class="memdesc:aa45461059e1992c816e32c371d17e813"><td class="mdescLeft">&#160;</td><td class="mdescRight">Send a notification or indication. <a href="class_nim_b_l_e_characteristic.html#aa45461059e1992c816e32c371d17e813">More...</a><br /></td></tr>
<tr class="separator:aa45461059e1992c816e32c371d17e813"><td class="memSeparator" colspan="2">&#160;</td></tr>
2022-07-31 19:38:16 +02:00
<tr class="memitem:a9ce09408a307a6b62a91418ea7723ebf"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_characteristic.html#a9ce09408a307a6b62a91418ea7723ebf">notify</a> (const uint8_t *value, size_t length, bool is_notification=true)</td></tr>
<tr class="memdesc:a9ce09408a307a6b62a91418ea7723ebf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Send a notification or indication. <a href="class_nim_b_l_e_characteristic.html#a9ce09408a307a6b62a91418ea7723ebf">More...</a><br /></td></tr>
<tr class="separator:a9ce09408a307a6b62a91418ea7723ebf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a15a9f056e5a3e85d5cb0bdc7adbdd970"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_characteristic.html#a15a9f056e5a3e85d5cb0bdc7adbdd970">notify</a> (const std::vector&lt; uint8_t &gt; &amp;value, bool is_notification=true)</td></tr>
<tr class="memdesc:a15a9f056e5a3e85d5cb0bdc7adbdd970"><td class="mdescLeft">&#160;</td><td class="mdescRight">Send a notification or indication. <a href="class_nim_b_l_e_characteristic.html#a15a9f056e5a3e85d5cb0bdc7adbdd970">More...</a><br /></td></tr>
<tr class="separator:a15a9f056e5a3e85d5cb0bdc7adbdd970"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aced225d46153b6969f6ded30c0190e39"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_characteristic.html#aced225d46153b6969f6ded30c0190e39">getSubscribedCount</a> ()</td></tr>
<tr class="memdesc:aced225d46153b6969f6ded30c0190e39"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the number of clients subscribed to the characteristic. <a href="class_nim_b_l_e_characteristic.html#aced225d46153b6969f6ded30c0190e39">More...</a><br /></td></tr>
<tr class="separator:aced225d46153b6969f6ded30c0190e39"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aed4b2241c89ad2a8f49117e2b9433e5b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_characteristic.html#aed4b2241c89ad2a8f49117e2b9433e5b">addDescriptor</a> (<a class="el" href="class_nim_b_l_e_descriptor.html">NimBLEDescriptor</a> *pDescriptor)</td></tr>
<tr class="memdesc:aed4b2241c89ad2a8f49117e2b9433e5b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Add a descriptor to the characteristic. <a href="class_nim_b_l_e_characteristic.html#aed4b2241c89ad2a8f49117e2b9433e5b">More...</a><br /></td></tr>
<tr class="separator:aed4b2241c89ad2a8f49117e2b9433e5b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abc5f4819e4d2c0956857ddd7a1064189"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_nim_b_l_e_descriptor.html">NimBLEDescriptor</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_characteristic.html#abc5f4819e4d2c0956857ddd7a1064189">getDescriptorByUUID</a> (const char *uuid)</td></tr>
<tr class="memdesc:abc5f4819e4d2c0956857ddd7a1064189"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the BLE Descriptor for the given UUID. <a href="class_nim_b_l_e_characteristic.html#abc5f4819e4d2c0956857ddd7a1064189">More...</a><br /></td></tr>
<tr class="separator:abc5f4819e4d2c0956857ddd7a1064189"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae310b081d2d7d2a52ab2ddc11d5dbd99"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_nim_b_l_e_descriptor.html">NimBLEDescriptor</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_characteristic.html#ae310b081d2d7d2a52ab2ddc11d5dbd99">getDescriptorByUUID</a> (const <a class="el" href="class_nim_b_l_e_u_u_i_d.html">NimBLEUUID</a> &amp;uuid)</td></tr>
<tr class="memdesc:ae310b081d2d7d2a52ab2ddc11d5dbd99"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the BLE Descriptor for the given UUID. <a href="class_nim_b_l_e_characteristic.html#ae310b081d2d7d2a52ab2ddc11d5dbd99">More...</a><br /></td></tr>
<tr class="separator:ae310b081d2d7d2a52ab2ddc11d5dbd99"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a062f52918f13c49a37ce8e58b9e7382a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_nim_b_l_e_descriptor.html">NimBLEDescriptor</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_characteristic.html#a062f52918f13c49a37ce8e58b9e7382a">getDescriptorByHandle</a> (uint16_t handle)</td></tr>
<tr class="memdesc:a062f52918f13c49a37ce8e58b9e7382a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the BLE Descriptor for the given handle. <a href="class_nim_b_l_e_characteristic.html#a062f52918f13c49a37ce8e58b9e7382a">More...</a><br /></td></tr>
<tr class="separator:a062f52918f13c49a37ce8e58b9e7382a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2c0ed8932ee257a8632e3d72e353489b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_characteristic.html#a2c0ed8932ee257a8632e3d72e353489b">removeDescriptor</a> (<a class="el" href="class_nim_b_l_e_descriptor.html">NimBLEDescriptor</a> *pDescriptor, bool deleteDsc=false)</td></tr>
2022-07-31 19:38:16 +02:00
<tr class="memdesc:a2c0ed8932ee257a8632e3d72e353489b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Remove a descriptor from the characteristic. <a href="class_nim_b_l_e_characteristic.html#a2c0ed8932ee257a8632e3d72e353489b">More...</a><br /></td></tr>
<tr class="separator:a2c0ed8932ee257a8632e3d72e353489b"><td class="memSeparator" colspan="2">&#160;</td></tr>
2022-07-31 19:38:16 +02:00
<tr class="memitem:a84aa251a612810ec8d07e77ab03cb483"><td class="memItemLeft" align="right" valign="top"><a id="a84aa251a612810ec8d07e77ab03cb483"></a>
<a class="el" href="class_nim_b_l_e_service.html">NimBLEService</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_characteristic.html#a84aa251a612810ec8d07e77ab03cb483">getService</a> ()</td></tr>
<tr class="memdesc:a84aa251a612810ec8d07e77ab03cb483"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the service associated with this characteristic. <br /></td></tr>
<tr class="separator:a84aa251a612810ec8d07e77ab03cb483"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a79759a98d9bdb761cb12c1ea6f601afc"><td class="memItemLeft" align="right" valign="top">uint16_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_characteristic.html#a79759a98d9bdb761cb12c1ea6f601afc">getProperties</a> ()</td></tr>
<tr class="memdesc:a79759a98d9bdb761cb12c1ea6f601afc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the properties of the characteristic. <a href="class_nim_b_l_e_characteristic.html#a79759a98d9bdb761cb12c1ea6f601afc">More...</a><br /></td></tr>
<tr class="separator:a79759a98d9bdb761cb12c1ea6f601afc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a78484a01350300176033a09180f7207f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_nim_b_l_e_att_value.html">NimBLEAttValue</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_characteristic.html#a78484a01350300176033a09180f7207f">getValue</a> (time_t *timestamp=nullptr)</td></tr>
<tr class="memdesc:a78484a01350300176033a09180f7207f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieve the current value of the characteristic. <a href="class_nim_b_l_e_characteristic.html#a78484a01350300176033a09180f7207f">More...</a><br /></td></tr>
<tr class="separator:a78484a01350300176033a09180f7207f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a580ad0133fd82a673027c91cbb1c74fa"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_characteristic.html#a580ad0133fd82a673027c91cbb1c74fa">getDataLength</a> ()</td></tr>
<tr class="memdesc:a580ad0133fd82a673027c91cbb1c74fa"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieve the the current data length of the characteristic. <a href="class_nim_b_l_e_characteristic.html#a580ad0133fd82a673027c91cbb1c74fa">More...</a><br /></td></tr>
<tr class="separator:a580ad0133fd82a673027c91cbb1c74fa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7cd211a8bb9a0c2ffaed57f2af273677"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_characteristic.html#a7cd211a8bb9a0c2ffaed57f2af273677">setValue</a> (const uint8_t *data, size_t size)</td></tr>
2022-07-31 19:38:16 +02:00
<tr class="memdesc:a7cd211a8bb9a0c2ffaed57f2af273677"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the value of the characteristic from a data buffer . <a href="class_nim_b_l_e_characteristic.html#a7cd211a8bb9a0c2ffaed57f2af273677">More...</a><br /></td></tr>
<tr class="separator:a7cd211a8bb9a0c2ffaed57f2af273677"><td class="memSeparator" colspan="2">&#160;</td></tr>
2022-07-31 19:38:16 +02:00
<tr class="memitem:a9daeb13599265cb0f8ea94b7ac4ef053"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_characteristic.html#a9daeb13599265cb0f8ea94b7ac4ef053">setValue</a> (const std::vector&lt; uint8_t &gt; &amp;vec)</td></tr>
<tr class="memdesc:a9daeb13599265cb0f8ea94b7ac4ef053"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the value of the characteristic from a <code>std::vector&lt;uint8_t&gt;</code>.<br />
. <a href="class_nim_b_l_e_characteristic.html#a9daeb13599265cb0f8ea94b7ac4ef053">More...</a><br /></td></tr>
<tr class="separator:a9daeb13599265cb0f8ea94b7ac4ef053"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a29dc2505e1d3b4a7d6800d1547965d17"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_characteristic.html#a29dc2505e1d3b4a7d6800d1547965d17">setCallbacks</a> (<a class="el" href="class_nim_b_l_e_characteristic_callbacks.html">NimBLECharacteristicCallbacks</a> *pCallbacks)</td></tr>
<tr class="memdesc:a29dc2505e1d3b4a7d6800d1547965d17"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the callback handlers for this characteristic. <a href="class_nim_b_l_e_characteristic.html#a29dc2505e1d3b4a7d6800d1547965d17">More...</a><br /></td></tr>
<tr class="separator:a29dc2505e1d3b4a7d6800d1547965d17"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1fc55adb9d62d8b5fe1be2b172686353"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_nim_b_l_e_descriptor.html">NimBLEDescriptor</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_characteristic.html#a1fc55adb9d62d8b5fe1be2b172686353">createDescriptor</a> (const char *uuid, uint32_t properties=NIMBLE_PROPERTY::READ|NIMBLE_PROPERTY::WRITE, uint16_t max_len=BLE_ATT_ATTR_MAX_LEN)</td></tr>
<tr class="memdesc:a1fc55adb9d62d8b5fe1be2b172686353"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a new BLE Descriptor associated with this characteristic. <a href="class_nim_b_l_e_characteristic.html#a1fc55adb9d62d8b5fe1be2b172686353">More...</a><br /></td></tr>
<tr class="separator:a1fc55adb9d62d8b5fe1be2b172686353"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a67a1fb8bddfbd47007ccb8b6f5e5611a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_nim_b_l_e_descriptor.html">NimBLEDescriptor</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_characteristic.html#a67a1fb8bddfbd47007ccb8b6f5e5611a">createDescriptor</a> (const <a class="el" href="class_nim_b_l_e_u_u_i_d.html">NimBLEUUID</a> &amp;uuid, uint32_t properties=NIMBLE_PROPERTY::READ|NIMBLE_PROPERTY::WRITE, uint16_t max_len=BLE_ATT_ATTR_MAX_LEN)</td></tr>
<tr class="memdesc:a67a1fb8bddfbd47007ccb8b6f5e5611a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a new BLE Descriptor associated with this characteristic. <a href="class_nim_b_l_e_characteristic.html#a67a1fb8bddfbd47007ccb8b6f5e5611a">More...</a><br /></td></tr>
<tr class="separator:a67a1fb8bddfbd47007ccb8b6f5e5611a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1747ac4889c7adbb93a2d88a10327a47"><td class="memItemLeft" align="right" valign="top"><a id="a1747ac4889c7adbb93a2d88a10327a47"></a>
<a class="el" href="class_nim_b_l_e_characteristic_callbacks.html">NimBLECharacteristicCallbacks</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_characteristic.html#a1747ac4889c7adbb93a2d88a10327a47">getCallbacks</a> ()</td></tr>
<tr class="memdesc:a1747ac4889c7adbb93a2d88a10327a47"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the callback handlers for this characteristic. <br /></td></tr>
<tr class="separator:a1747ac4889c7adbb93a2d88a10327a47"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aba05898f446e31222fbe509fa357c730"><td class="memTemplParams" colspan="2">template&lt;typename T &gt; </td></tr>
<tr class="memitem:aba05898f446e31222fbe509fa357c730"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_characteristic.html#aba05898f446e31222fbe509fa357c730">setValue</a> (const T &amp;s)</td></tr>
2022-07-31 19:38:16 +02:00
<tr class="memdesc:aba05898f446e31222fbe509fa357c730"><td class="mdescLeft">&#160;</td><td class="mdescRight">Template to set the characteristic value to &lt;type&gt;val. <a href="class_nim_b_l_e_characteristic.html#aba05898f446e31222fbe509fa357c730">More...</a><br /></td></tr>
<tr class="separator:aba05898f446e31222fbe509fa357c730"><td class="memSeparator" colspan="2">&#160;</td></tr>
2022-07-31 19:38:16 +02:00
<tr class="memitem:a7d09c29b26362f6ddcaf51a9c9dc8be4"><td class="memTemplParams" colspan="2">template&lt;typename T &gt; </td></tr>
<tr class="memitem:a7d09c29b26362f6ddcaf51a9c9dc8be4"><td class="memTemplItemLeft" align="right" valign="top">T&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_characteristic.html#a7d09c29b26362f6ddcaf51a9c9dc8be4">getValue</a> (time_t *timestamp=nullptr, bool skipSizeCheck=false)</td></tr>
<tr class="memdesc:a7d09c29b26362f6ddcaf51a9c9dc8be4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Template to convert the characteristic data to &lt;type&gt;. <a href="class_nim_b_l_e_characteristic.html#a7d09c29b26362f6ddcaf51a9c9dc8be4">More...</a><br /></td></tr>
<tr class="separator:a7d09c29b26362f6ddcaf51a9c9dc8be4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aed1432c11fadec203104b13aaaf7060d"><td class="memTemplParams" colspan="2">template&lt;typename T &gt; </td></tr>
<tr class="memitem:aed1432c11fadec203104b13aaaf7060d"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_characteristic.html#aed1432c11fadec203104b13aaaf7060d">notify</a> (const T &amp;value, bool is_notification=true)</td></tr>
<tr class="memdesc:aed1432c11fadec203104b13aaaf7060d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Template to send a notification from a class type that has a c_str() and length() method. <a href="class_nim_b_l_e_characteristic.html#aed1432c11fadec203104b13aaaf7060d">More...</a><br /></td></tr>
<tr class="separator:aed1432c11fadec203104b13aaaf7060d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af2940e8c314a1ecee1750d20a60c459d"><td class="memTemplParams" colspan="2">template&lt;typename T &gt; </td></tr>
<tr class="memitem:af2940e8c314a1ecee1750d20a60c459d"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_characteristic.html#af2940e8c314a1ecee1750d20a60c459d">indicate</a> (const T &amp;value)</td></tr>
<tr class="memdesc:af2940e8c314a1ecee1750d20a60c459d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Template to send an indication from a class type that has a c_str() and length() method. <a href="class_nim_b_l_e_characteristic.html#af2940e8c314a1ecee1750d20a60c459d">More...</a><br /></td></tr>
<tr class="separator:af2940e8c314a1ecee1750d20a60c459d"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>The model of a BLE Characteristic. </p>
<p>A BLE Characteristic is an identified value container that manages a value. It is exposed by a BLE server and can be read and written to by a BLE client. </p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
2022-07-31 19:38:16 +02:00
<a id="aa32224e69115e9ba60ac614e8f37a871"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa32224e69115e9ba60ac614e8f37a871">&#9670;&nbsp;</a></span>NimBLECharacteristic() <span class="overload">[1/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">NimBLECharacteristic::NimBLECharacteristic </td>
<td>(</td>
<td class="paramtype">const char *&#160;</td>
<td class="paramname"><em>uuid</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint16_t&#160;</td>
<td class="paramname"><em>properties</em> = <code>NIMBLE_PROPERTY::READ&#160;|&#160;NIMBLE_PROPERTY::WRITE</code>, </td>
</tr>
2022-07-31 19:38:16 +02:00
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint16_t&#160;</td>
<td class="paramname"><em>max_len</em> = <code>BLE_ATT_ATTR_MAX_LEN</code>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="class_nim_b_l_e_service.html">NimBLEService</a> *&#160;</td>
<td class="paramname"><em>pService</em> = <code>nullptr</code>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Construct a characteristic. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">uuid</td><td>- UUID (const char*) for the characteristic. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">properties</td><td>- Properties for the characteristic. </td></tr>
2022-07-31 19:38:16 +02:00
<tr><td class="paramdir">[in]</td><td class="paramname">max_len</td><td>- The maximum length in bytes that the characteristic value can hold. (Default: 512 bytes for esp32, 20 for all others). </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">pService</td><td>- pointer to the service instance this characteristic belongs to. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
2022-07-31 19:38:16 +02:00
<a id="ae2053d941cf8574acbdceb8b549b8264"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae2053d941cf8574acbdceb8b549b8264">&#9670;&nbsp;</a></span>NimBLECharacteristic() <span class="overload">[2/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">NimBLECharacteristic::NimBLECharacteristic </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="class_nim_b_l_e_u_u_i_d.html">NimBLEUUID</a> &amp;&#160;</td>
<td class="paramname"><em>uuid</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint16_t&#160;</td>
<td class="paramname"><em>properties</em> = <code>NIMBLE_PROPERTY::READ&#160;|&#160;NIMBLE_PROPERTY::WRITE</code>, </td>
</tr>
2022-07-31 19:38:16 +02:00
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint16_t&#160;</td>
<td class="paramname"><em>max_len</em> = <code>BLE_ATT_ATTR_MAX_LEN</code>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="class_nim_b_l_e_service.html">NimBLEService</a> *&#160;</td>
<td class="paramname"><em>pService</em> = <code>nullptr</code>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Construct a characteristic. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">uuid</td><td>- UUID for the characteristic. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">properties</td><td>- Properties for the characteristic. </td></tr>
2022-07-31 19:38:16 +02:00
<tr><td class="paramdir">[in]</td><td class="paramname">max_len</td><td>- The maximum length in bytes that the characteristic value can hold. (Default: 512 bytes for esp32, 20 for all others). </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">pService</td><td>- pointer to the service instance this characteristic belongs to. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="aed4b2241c89ad2a8f49117e2b9433e5b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aed4b2241c89ad2a8f49117e2b9433e5b">&#9670;&nbsp;</a></span>addDescriptor()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void NimBLECharacteristic::addDescriptor </td>
<td>(</td>
<td class="paramtype"><a class="el" href="class_nim_b_l_e_descriptor.html">NimBLEDescriptor</a> *&#160;</td>
<td class="paramname"><em>pDescriptor</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Add a descriptor to the characteristic. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">pDescriptor</td><td>A pointer to the descriptor to add. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
2022-07-31 19:38:16 +02:00
<a id="a1fc55adb9d62d8b5fe1be2b172686353"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1fc55adb9d62d8b5fe1be2b172686353">&#9670;&nbsp;</a></span>createDescriptor() <span class="overload">[1/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="class_nim_b_l_e_descriptor.html">NimBLEDescriptor</a> * NimBLECharacteristic::createDescriptor </td>
<td>(</td>
<td class="paramtype">const char *&#160;</td>
<td class="paramname"><em>uuid</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint32_t&#160;</td>
<td class="paramname"><em>properties</em> = <code>NIMBLE_PROPERTY::READ&#160;|&#160;NIMBLE_PROPERTY::WRITE</code>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint16_t&#160;</td>
2022-07-31 19:38:16 +02:00
<td class="paramname"><em>max_len</em> = <code>BLE_ATT_ATTR_MAX_LEN</code>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Create a new BLE Descriptor associated with this characteristic. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">uuid</td><td>- The UUID of the descriptor. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">properties</td><td>- The properties of the descriptor. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">max_len</td><td>- The max length in bytes of the descriptor value. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The new BLE descriptor. </dd></dl>
</div>
</div>
2022-07-31 19:38:16 +02:00
<a id="a67a1fb8bddfbd47007ccb8b6f5e5611a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a67a1fb8bddfbd47007ccb8b6f5e5611a">&#9670;&nbsp;</a></span>createDescriptor() <span class="overload">[2/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="class_nim_b_l_e_descriptor.html">NimBLEDescriptor</a> * NimBLECharacteristic::createDescriptor </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="class_nim_b_l_e_u_u_i_d.html">NimBLEUUID</a> &amp;&#160;</td>
<td class="paramname"><em>uuid</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint32_t&#160;</td>
<td class="paramname"><em>properties</em> = <code>NIMBLE_PROPERTY::READ&#160;|&#160;NIMBLE_PROPERTY::WRITE</code>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint16_t&#160;</td>
2022-07-31 19:38:16 +02:00
<td class="paramname"><em>max_len</em> = <code>BLE_ATT_ATTR_MAX_LEN</code>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Create a new BLE Descriptor associated with this characteristic. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">uuid</td><td>- The UUID of the descriptor. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">properties</td><td>- The properties of the descriptor. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">max_len</td><td>- The max length in bytes of the descriptor value. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The new BLE descriptor. </dd></dl>
</div>
</div>
<a id="a580ad0133fd82a673027c91cbb1c74fa"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a580ad0133fd82a673027c91cbb1c74fa">&#9670;&nbsp;</a></span>getDataLength()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">size_t NimBLECharacteristic::getDataLength </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Retrieve the the current data length of the characteristic. </p>
<dl class="section return"><dt>Returns</dt><dd>The length of the current characteristic data. </dd></dl>
</div>
</div>
<a id="a062f52918f13c49a37ce8e58b9e7382a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a062f52918f13c49a37ce8e58b9e7382a">&#9670;&nbsp;</a></span>getDescriptorByHandle()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="class_nim_b_l_e_descriptor.html">NimBLEDescriptor</a> * NimBLECharacteristic::getDescriptorByHandle </td>
<td>(</td>
<td class="paramtype">uint16_t&#160;</td>
<td class="paramname"><em>handle</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Return the BLE Descriptor for the given handle. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">handle</td><td>The handle of the descriptor. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A pointer to the descriptor object or nullptr if not found. </dd></dl>
</div>
</div>
<a id="abc5f4819e4d2c0956857ddd7a1064189"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abc5f4819e4d2c0956857ddd7a1064189">&#9670;&nbsp;</a></span>getDescriptorByUUID() <span class="overload">[1/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="class_nim_b_l_e_descriptor.html">NimBLEDescriptor</a> * NimBLECharacteristic::getDescriptorByUUID </td>
<td>(</td>
<td class="paramtype">const char *&#160;</td>
<td class="paramname"><em>uuid</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Return the BLE Descriptor for the given UUID. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">uuid</td><td>The UUID of the descriptor. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A pointer to the descriptor object or nullptr if not found. </dd></dl>
</div>
</div>
<a id="ae310b081d2d7d2a52ab2ddc11d5dbd99"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae310b081d2d7d2a52ab2ddc11d5dbd99">&#9670;&nbsp;</a></span>getDescriptorByUUID() <span class="overload">[2/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="class_nim_b_l_e_descriptor.html">NimBLEDescriptor</a> * NimBLECharacteristic::getDescriptorByUUID </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="class_nim_b_l_e_u_u_i_d.html">NimBLEUUID</a> &amp;&#160;</td>
<td class="paramname"><em>uuid</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Return the BLE Descriptor for the given UUID. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">uuid</td><td>The UUID of the descriptor. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A pointer to the descriptor object or nullptr if not found. </dd></dl>
</div>
</div>
<a id="acc3ea122771cd447103adfce22537379"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acc3ea122771cd447103adfce22537379">&#9670;&nbsp;</a></span>getHandle()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint16_t NimBLECharacteristic::getHandle </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Get the handle of the characteristic. </p>
<dl class="section return"><dt>Returns</dt><dd>The handle of the characteristic. </dd></dl>
</div>
</div>
<a id="a79759a98d9bdb761cb12c1ea6f601afc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a79759a98d9bdb761cb12c1ea6f601afc">&#9670;&nbsp;</a></span>getProperties()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint16_t NimBLECharacteristic::getProperties </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Get the properties of the characteristic. </p>
<dl class="section return"><dt>Returns</dt><dd>The properties of the characteristic. </dd></dl>
</div>
</div>
<a id="aced225d46153b6969f6ded30c0190e39"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aced225d46153b6969f6ded30c0190e39">&#9670;&nbsp;</a></span>getSubscribedCount()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">size_t NimBLECharacteristic::getSubscribedCount </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Get the number of clients subscribed to the characteristic. </p>
<dl class="section return"><dt>Returns</dt><dd>Number of clients subscribed to notifications / indications. </dd></dl>
</div>
</div>
<a id="a28b03617fe753133582ba4e58c60e52e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a28b03617fe753133582ba4e58c60e52e">&#9670;&nbsp;</a></span>getUUID()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="class_nim_b_l_e_u_u_i_d.html">NimBLEUUID</a> NimBLECharacteristic::getUUID </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Get the UUID of the characteristic. </p>
<dl class="section return"><dt>Returns</dt><dd>The UUID of the characteristic. </dd></dl>
</div>
</div>
2022-07-31 19:38:16 +02:00
<a id="a78484a01350300176033a09180f7207f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a78484a01350300176033a09180f7207f">&#9670;&nbsp;</a></span>getValue() <span class="overload">[1/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
2022-07-31 19:38:16 +02:00
<td class="memname"><a class="el" href="class_nim_b_l_e_att_value.html">NimBLEAttValue</a> NimBLECharacteristic::getValue </td>
<td>(</td>
<td class="paramtype">time_t *&#160;</td>
<td class="paramname"><em>timestamp</em> = <code>nullptr</code></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Retrieve the current value of the characteristic. </p>
2022-07-31 19:38:16 +02:00
<dl class="section return"><dt>Returns</dt><dd>The <a class="el" href="class_nim_b_l_e_att_value.html" title="A specialized container class to hold BLE attribute values.">NimBLEAttValue</a> containing the current characteristic value. </dd></dl>
</div>
</div>
<a id="a7d09c29b26362f6ddcaf51a9c9dc8be4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7d09c29b26362f6ddcaf51a9c9dc8be4">&#9670;&nbsp;</a></span>getValue() <span class="overload">[2/2]</span></h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">T NimBLECharacteristic::getValue </td>
<td>(</td>
<td class="paramtype">time_t *&#160;</td>
<td class="paramname"><em>timestamp</em> = <code>nullptr</code>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bool&#160;</td>
<td class="paramname"><em>skipSizeCheck</em> = <code>false</code>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
2022-07-31 19:38:16 +02:00
<p>Template to convert the characteristic data to &lt;type&gt;. </p>
<dl class="tparams"><dt>Template Parameters</dt><dd>
<table class="tparams">
<tr><td class="paramname">T</td><td>The type to convert the data to. </td></tr>
</table>
</dd>
</dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
2022-07-31 19:38:16 +02:00
<tr><td class="paramdir">[in]</td><td class="paramname">timestamp</td><td>(Optional) A pointer to a time_t struct to store the time the value was read. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">skipSizeCheck</td><td>(Optional) If true it will skip checking if the data size is less than <code>sizeof(&lt;type&gt;)</code>. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The data converted to &lt;type&gt; or NULL if skipSizeCheck is false and the data is less than <code>sizeof(&lt;type&gt;)</code>.</dd></dl>
<p><b>Use:</b> <code>getValue&lt;type&gt;(&amp;timestamp, skipSizeCheck);</code> </p>
2022-07-31 19:38:16 +02:00
</div>
</div>
<a id="a2e827aba484add48e52c8eebf80b4a78"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2e827aba484add48e52c8eebf80b4a78">&#9670;&nbsp;</a></span>indicate() <span class="overload">[1/3]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void NimBLECharacteristic::indicate </td>
<td>(</td>
<td class="paramtype">const std::vector&lt; uint8_t &gt; &amp;&#160;</td>
<td class="paramname"><em>value</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Send an indication. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">value</td><td>A std::vector&lt;uint8_t&gt; containing the value to send as the notification value. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="af2940e8c314a1ecee1750d20a60c459d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af2940e8c314a1ecee1750d20a60c459d">&#9670;&nbsp;</a></span>indicate() <span class="overload">[2/3]</span></h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void NimBLECharacteristic::indicate </td>
<td>(</td>
<td class="paramtype">const T &amp;&#160;</td>
<td class="paramname"><em>value</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Template to send an indication from a class type that has a c_str() and length() method. </p>
<dl class="tparams"><dt>Template Parameters</dt><dd>
<table class="tparams">
<tr><td class="paramname">T</td><td>The a reference to a class containing the data to send. </td></tr>
</table>
</dd>
</dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">value</td><td>The &lt;type&gt;value to set.</td></tr>
</table>
</dd>
</dl>
<p>Only used if the &lt;type&gt; has a <code>c_str()</code> method. </p>
</div>
</div>
<a id="a8c1875611a1beb192e6c24dff35d0655"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8c1875611a1beb192e6c24dff35d0655">&#9670;&nbsp;</a></span>indicate() <span class="overload">[3/3]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void NimBLECharacteristic::indicate </td>
<td>(</td>
<td class="paramtype">const uint8_t *&#160;</td>
<td class="paramname"><em>value</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t&#160;</td>
<td class="paramname"><em>length</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Send an indication. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">value</td><td>A pointer to the data to send. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">length</td><td>The length of the data to send. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="aa45461059e1992c816e32c371d17e813"></a>
2022-07-31 19:38:16 +02:00
<h2 class="memtitle"><span class="permalink"><a href="#aa45461059e1992c816e32c371d17e813">&#9670;&nbsp;</a></span>notify() <span class="overload">[1/4]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void NimBLECharacteristic::notify </td>
<td>(</td>
<td class="paramtype">bool&#160;</td>
<td class="paramname"><em>is_notification</em> = <code>true</code></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
2022-07-31 19:38:16 +02:00
<p>Send a notification or indication. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">is_notification</td><td>if true sends a notification, false sends an indication. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="a15a9f056e5a3e85d5cb0bdc7adbdd970"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a15a9f056e5a3e85d5cb0bdc7adbdd970">&#9670;&nbsp;</a></span>notify() <span class="overload">[2/4]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void NimBLECharacteristic::notify </td>
<td>(</td>
<td class="paramtype">const std::vector&lt; uint8_t &gt; &amp;&#160;</td>
<td class="paramname"><em>value</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bool&#160;</td>
<td class="paramname"><em>is_notification</em> = <code>true</code>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Send a notification or indication. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
2022-07-31 19:38:16 +02:00
<tr><td class="paramdir">[in]</td><td class="paramname">value</td><td>A std::vector&lt;uint8_t&gt; containing the value to send as the notification value. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">is_notification</td><td>if true sends a notification, false sends an indication. </td></tr>
</table>
</dd>
</dl>
2022-01-15 23:23:57 +01:00
</div>
</div>
2022-07-31 19:38:16 +02:00
<a id="aed1432c11fadec203104b13aaaf7060d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aed1432c11fadec203104b13aaaf7060d">&#9670;&nbsp;</a></span>notify() <span class="overload">[3/4]</span></h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void NimBLECharacteristic::notify </td>
<td>(</td>
<td class="paramtype">const T &amp;&#160;</td>
<td class="paramname"><em>value</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bool&#160;</td>
<td class="paramname"><em>is_notification</em> = <code>true</code>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Template to send a notification from a class type that has a c_str() and length() method. </p>
<dl class="tparams"><dt>Template Parameters</dt><dd>
<table class="tparams">
<tr><td class="paramname">T</td><td>The a reference to a class containing the data to send. </td></tr>
</table>
</dd>
</dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">value</td><td>The &lt;type&gt;value to set. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">is_notification</td><td>if true sends a notification, false sends an indication.</td></tr>
</table>
</dd>
</dl>
<p>Only used if the &lt;type&gt; has a <code>c_str()</code> method. </p>
</div>
</div>
<a id="a9ce09408a307a6b62a91418ea7723ebf"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9ce09408a307a6b62a91418ea7723ebf">&#9670;&nbsp;</a></span>notify() <span class="overload">[4/4]</span></h2>
2022-01-15 23:23:57 +01:00
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void NimBLECharacteristic::notify </td>
<td>(</td>
2022-07-31 19:38:16 +02:00
<td class="paramtype">const uint8_t *&#160;</td>
2022-01-15 23:23:57 +01:00
<td class="paramname"><em>value</em>, </td>
</tr>
2022-07-31 19:38:16 +02:00
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t&#160;</td>
<td class="paramname"><em>length</em>, </td>
</tr>
2022-01-15 23:23:57 +01:00
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bool&#160;</td>
<td class="paramname"><em>is_notification</em> = <code>true</code>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
2022-07-31 19:38:16 +02:00
<p>Send a notification or indication. </p>
2022-01-15 23:23:57 +01:00
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
2022-07-31 19:38:16 +02:00
<tr><td class="paramdir">[in]</td><td class="paramname">value</td><td>A pointer to the data to send. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">length</td><td>The length of the data to send. </td></tr>
2022-01-15 23:23:57 +01:00
<tr><td class="paramdir">[in]</td><td class="paramname">is_notification</td><td>if true sends a notification, false sends an indication. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="a2c0ed8932ee257a8632e3d72e353489b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2c0ed8932ee257a8632e3d72e353489b">&#9670;&nbsp;</a></span>removeDescriptor()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void NimBLECharacteristic::removeDescriptor </td>
<td>(</td>
<td class="paramtype"><a class="el" href="class_nim_b_l_e_descriptor.html">NimBLEDescriptor</a> *&#160;</td>
<td class="paramname"><em>pDescriptor</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bool&#160;</td>
<td class="paramname"><em>deleteDsc</em> = <code>false</code>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
2022-07-31 19:38:16 +02:00
<p>Remove a descriptor from the characteristic. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
2022-07-31 19:38:16 +02:00
<tr><td class="paramdir">[in]</td><td class="paramname">pDescriptor</td><td>A pointer to the descriptor instance to remove from the characteristic. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">deleteDsc</td><td>If true it will delete the descriptor instance and free it's resources. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="a29dc2505e1d3b4a7d6800d1547965d17"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a29dc2505e1d3b4a7d6800d1547965d17">&#9670;&nbsp;</a></span>setCallbacks()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void NimBLECharacteristic::setCallbacks </td>
<td>(</td>
<td class="paramtype"><a class="el" href="class_nim_b_l_e_characteristic_callbacks.html">NimBLECharacteristicCallbacks</a> *&#160;</td>
<td class="paramname"><em>pCallbacks</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Set the callback handlers for this characteristic. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">pCallbacks</td><td>An instance of a <a class="el" href="class_nim_b_l_e_characteristic_callbacks.html" title="Callbacks that can be associated with a BLE characteristic to inform of events.">NimBLECharacteristicCallbacks</a> class<br />
used to define any callbacks for the characteristic. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
2022-07-31 19:38:16 +02:00
<a id="a9daeb13599265cb0f8ea94b7ac4ef053"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9daeb13599265cb0f8ea94b7ac4ef053">&#9670;&nbsp;</a></span>setValue() <span class="overload">[1/3]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void NimBLECharacteristic::setValue </td>
<td>(</td>
2022-07-31 19:38:16 +02:00
<td class="paramtype">const std::vector&lt; uint8_t &gt; &amp;&#160;</td>
<td class="paramname"><em>vec</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
2022-07-31 19:38:16 +02:00
<p>Set the value of the characteristic from a <code>std::vector&lt;uint8_t&gt;</code>.<br />
. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
2022-07-31 19:38:16 +02:00
<tr><td class="paramdir">[in]</td><td class="paramname">vec</td><td>The std::vector&lt;uint8_t&gt; reference to set the characteristic value from. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="aba05898f446e31222fbe509fa357c730"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aba05898f446e31222fbe509fa357c730">&#9670;&nbsp;</a></span>setValue() <span class="overload">[2/3]</span></h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void NimBLECharacteristic::setValue </td>
<td>(</td>
<td class="paramtype">const T &amp;&#160;</td>
<td class="paramname"><em>s</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
2022-07-31 19:38:16 +02:00
<p>Template to set the characteristic value to &lt;type&gt;val. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">s</td><td>The value to set. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="a7cd211a8bb9a0c2ffaed57f2af273677"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7cd211a8bb9a0c2ffaed57f2af273677">&#9670;&nbsp;</a></span>setValue() <span class="overload">[3/3]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void NimBLECharacteristic::setValue </td>
<td>(</td>
<td class="paramtype">const uint8_t *&#160;</td>
<td class="paramname"><em>data</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t&#160;</td>
<td class="paramname"><em>length</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
2022-07-31 19:38:16 +02:00
<p>Set the value of the characteristic from a data buffer . </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
2022-07-31 19:38:16 +02:00
<tr><td class="paramdir">[in]</td><td class="paramname">data</td><td>The data buffer to set for the characteristic. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">length</td><td>The number of bytes in the data buffer. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="a4fa6b8ed011d12e2b1f16e92a02b9a89"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4fa6b8ed011d12e2b1f16e92a02b9a89">&#9670;&nbsp;</a></span>toString()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">std::string NimBLECharacteristic::toString </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Return a string representation of the characteristic. </p>
<dl class="section return"><dt>Returns</dt><dd>A string representation of the characteristic. </dd></dl>
</div>
</div>
</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="class_nim_b_l_e_characteristic.html">NimBLECharacteristic</a></li>
2022-01-15 23:23:57 +01:00
<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>