mirror of
https://github.com/h2zero/esp-nimble-cpp.git
synced 2024-11-23 13:40:55 +01:00
876 lines
49 KiB
HTML
876 lines
49 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
|
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
|
<meta name="generator" content="Doxygen 1.9.0"/>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
|
<title>esp-nimble-cpp / NimBLE-Arduino: 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;">
|
|
<div id="projectname">esp-nimble-cpp / NimBLE-Arduino
|
|
 <span id="projectnumber">1.3.1</span>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<!-- end header part -->
|
|
<!-- Generated by Doxygen 1.9.0 -->
|
|
<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('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> |
|
|
<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>
|
|
<tr class="memitem:a942b2d29d77fcef233549d0c4fd798da"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_characteristic.html#a942b2d29d77fcef233549d0c4fd798da">NimBLECharacteristic</a> (const char *uuid, uint16_t properties=NIMBLE_PROPERTY::READ|NIMBLE_PROPERTY::WRITE, <a class="el" href="class_nim_b_l_e_service.html">NimBLEService</a> *pService=nullptr)</td></tr>
|
|
<tr class="memdesc:a942b2d29d77fcef233549d0c4fd798da"><td class="mdescLeft"> </td><td class="mdescRight">Construct a characteristic. <a href="class_nim_b_l_e_characteristic.html#a942b2d29d77fcef233549d0c4fd798da">More...</a><br /></td></tr>
|
|
<tr class="separator:a942b2d29d77fcef233549d0c4fd798da"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:acdbd57f7e97646403e520edc35c34c8b"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_characteristic.html#acdbd57f7e97646403e520edc35c34c8b">NimBLECharacteristic</a> (const <a class="el" href="class_nim_b_l_e_u_u_i_d.html">NimBLEUUID</a> &uuid, uint16_t properties=NIMBLE_PROPERTY::READ|NIMBLE_PROPERTY::WRITE, <a class="el" href="class_nim_b_l_e_service.html">NimBLEService</a> *pService=nullptr)</td></tr>
|
|
<tr class="memdesc:acdbd57f7e97646403e520edc35c34c8b"><td class="mdescLeft"> </td><td class="mdescRight">Construct a characteristic. <a href="class_nim_b_l_e_characteristic.html#acdbd57f7e97646403e520edc35c34c8b">More...</a><br /></td></tr>
|
|
<tr class="separator:acdbd57f7e97646403e520edc35c34c8b"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a7fe29c5ec571d0513c51b8cbac942f4a"><td class="memItemLeft" align="right" valign="top"><a id="a7fe29c5ec571d0513c51b8cbac942f4a"></a>
|
|
 </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"> </td><td class="mdescRight">Destructor. <br /></td></tr>
|
|
<tr class="separator:a7fe29c5ec571d0513c51b8cbac942f4a"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:acc3ea122771cd447103adfce22537379"><td class="memItemLeft" align="right" valign="top">uint16_t </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"> </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"> </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> </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"> </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"> </td></tr>
|
|
<tr class="memitem:a4fa6b8ed011d12e2b1f16e92a02b9a89"><td class="memItemLeft" align="right" valign="top">std::string </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"> </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"> </td></tr>
|
|
<tr class="memitem:a29dc2505e1d3b4a7d6800d1547965d17"><td class="memItemLeft" align="right" valign="top">void </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"> </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"> </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> * </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"> </td><td class="mdescRight">Get the callback handlers for this characteristic. <br /></td></tr>
|
|
<tr class="separator:a1747ac4889c7adbb93a2d88a10327a47"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a2ce9f62ecc3d1644ef4d58efe7a3c434"><td class="memItemLeft" align="right" valign="top"><a id="a2ce9f62ecc3d1644ef4d58efe7a3c434"></a>
|
|
void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_characteristic.html#a2ce9f62ecc3d1644ef4d58efe7a3c434">indicate</a> ()</td></tr>
|
|
<tr class="memdesc:a2ce9f62ecc3d1644ef4d58efe7a3c434"><td class="mdescLeft"> </td><td class="mdescRight">Send an indication.<br />
|
|
An indication is a transmission of up to the first 20 bytes of the characteristic value.<br />
|
|
An indication will block waiting for a positive confirmation from the client. <br /></td></tr>
|
|
<tr class="separator:a2ce9f62ecc3d1644ef4d58efe7a3c434"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:aa45461059e1992c816e32c371d17e813"><td class="memItemLeft" align="right" valign="top">void </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>
|
|
<tr class="memdesc:aa45461059e1992c816e32c371d17e813"><td class="mdescLeft"> </td><td class="mdescRight">Send a notification.<br />
|
|
A notification is a transmission of up to the first 20 bytes of the characteristic value.<br />
|
|
A notification will not block; it is a fire and forget. <a href="class_nim_b_l_e_characteristic.html#aa45461059e1992c816e32c371d17e813">More...</a><br /></td></tr>
|
|
<tr class="separator:aa45461059e1992c816e32c371d17e813"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:aced225d46153b6969f6ded30c0190e39"><td class="memItemLeft" align="right" valign="top">size_t </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"> </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"> </td></tr>
|
|
<tr class="memitem:aae014669e9ce1ad01520d68fe0cc0fda"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_nim_b_l_e_descriptor.html">NimBLEDescriptor</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_characteristic.html#aae014669e9ce1ad01520d68fe0cc0fda">createDescriptor</a> (const char *uuid, uint32_t properties=NIMBLE_PROPERTY::READ|NIMBLE_PROPERTY::WRITE, uint16_t max_len=100)</td></tr>
|
|
<tr class="memdesc:aae014669e9ce1ad01520d68fe0cc0fda"><td class="mdescLeft"> </td><td class="mdescRight">Create a new BLE Descriptor associated with this characteristic. <a href="class_nim_b_l_e_characteristic.html#aae014669e9ce1ad01520d68fe0cc0fda">More...</a><br /></td></tr>
|
|
<tr class="separator:aae014669e9ce1ad01520d68fe0cc0fda"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a6523266a751a778a2c04fea19fed4de5"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_nim_b_l_e_descriptor.html">NimBLEDescriptor</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_characteristic.html#a6523266a751a778a2c04fea19fed4de5">createDescriptor</a> (const <a class="el" href="class_nim_b_l_e_u_u_i_d.html">NimBLEUUID</a> &uuid, uint32_t properties=NIMBLE_PROPERTY::READ|NIMBLE_PROPERTY::WRITE, uint16_t max_len=100)</td></tr>
|
|
<tr class="memdesc:a6523266a751a778a2c04fea19fed4de5"><td class="mdescLeft"> </td><td class="mdescRight">Create a new BLE Descriptor associated with this characteristic. <a href="class_nim_b_l_e_characteristic.html#a6523266a751a778a2c04fea19fed4de5">More...</a><br /></td></tr>
|
|
<tr class="separator:a6523266a751a778a2c04fea19fed4de5"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:aed4b2241c89ad2a8f49117e2b9433e5b"><td class="memItemLeft" align="right" valign="top">void </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"> </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"> </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> * </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"> </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"> </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> * </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> &uuid)</td></tr>
|
|
<tr class="memdesc:ae310b081d2d7d2a52ab2ddc11d5dbd99"><td class="mdescLeft"> </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"> </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> * </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"> </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"> </td></tr>
|
|
<tr class="memitem:a2c0ed8932ee257a8632e3d72e353489b"><td class="memItemLeft" align="right" valign="top">void </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>
|
|
<tr class="memdesc:a2c0ed8932ee257a8632e3d72e353489b"><td class="mdescLeft"> </td><td class="mdescRight">Remove a descriptor from the characterisitc. <a href="class_nim_b_l_e_characteristic.html#a2c0ed8932ee257a8632e3d72e353489b">More...</a><br /></td></tr>
|
|
<tr class="separator:a2c0ed8932ee257a8632e3d72e353489b"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a37e908d114f6ad2b4bf19c7cc4db9c54"><td class="memItemLeft" align="right" valign="top">std::string </td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_characteristic.html#a37e908d114f6ad2b4bf19c7cc4db9c54">getValue</a> (time_t *timestamp=nullptr)</td></tr>
|
|
<tr class="memdesc:a37e908d114f6ad2b4bf19c7cc4db9c54"><td class="mdescLeft"> </td><td class="mdescRight">Retrieve the current value of the characteristic. <a href="class_nim_b_l_e_characteristic.html#a37e908d114f6ad2b4bf19c7cc4db9c54">More...</a><br /></td></tr>
|
|
<tr class="separator:a37e908d114f6ad2b4bf19c7cc4db9c54"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a580ad0133fd82a673027c91cbb1c74fa"><td class="memItemLeft" align="right" valign="top">size_t </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"> </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"> </td></tr>
|
|
<tr class="memitem:a7d09c29b26362f6ddcaf51a9c9dc8be4"><td class="memTemplParams" colspan="2">template<typename T > </td></tr>
|
|
<tr class="memitem:a7d09c29b26362f6ddcaf51a9c9dc8be4"><td class="memTemplItemLeft" align="right" valign="top">T </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"> </td><td class="mdescRight">A template to convert the characteristic data to <type>. <a href="class_nim_b_l_e_characteristic.html#a7d09c29b26362f6ddcaf51a9c9dc8be4">More...</a><br /></td></tr>
|
|
<tr class="separator:a7d09c29b26362f6ddcaf51a9c9dc8be4"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a7cd211a8bb9a0c2ffaed57f2af273677"><td class="memItemLeft" align="right" valign="top">void </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>
|
|
<tr class="memdesc:a7cd211a8bb9a0c2ffaed57f2af273677"><td class="mdescLeft"> </td><td class="mdescRight">Set the value of the characteristic. <a href="class_nim_b_l_e_characteristic.html#a7cd211a8bb9a0c2ffaed57f2af273677">More...</a><br /></td></tr>
|
|
<tr class="separator:a7cd211a8bb9a0c2ffaed57f2af273677"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a3e77647e4c9bd02c96b761639c4d206f"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_characteristic.html#a3e77647e4c9bd02c96b761639c4d206f">setValue</a> (const std::string &value)</td></tr>
|
|
<tr class="memdesc:a3e77647e4c9bd02c96b761639c4d206f"><td class="mdescLeft"> </td><td class="mdescRight">Set the value of the characteristic from string data.<br />
|
|
We set the value of the characteristic from the bytes contained in the string. <a href="class_nim_b_l_e_characteristic.html#a3e77647e4c9bd02c96b761639c4d206f">More...</a><br /></td></tr>
|
|
<tr class="separator:a3e77647e4c9bd02c96b761639c4d206f"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:aba05898f446e31222fbe509fa357c730"><td class="memTemplParams" colspan="2">template<typename T > </td></tr>
|
|
<tr class="memitem:aba05898f446e31222fbe509fa357c730"><td class="memTemplItemLeft" align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_characteristic.html#aba05898f446e31222fbe509fa357c730">setValue</a> (const T &s)</td></tr>
|
|
<tr class="memdesc:aba05898f446e31222fbe509fa357c730"><td class="mdescLeft"> </td><td class="mdescRight">Convenience template to set the characteristic value to <type>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"> </td></tr>
|
|
<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> * </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"> </td><td class="mdescRight">Get the service associated with this characteristic. <br /></td></tr>
|
|
<tr class="separator:a84aa251a612810ec8d07e77ab03cb483"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a79759a98d9bdb761cb12c1ea6f601afc"><td class="memItemLeft" align="right" valign="top">uint16_t </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"> </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"> </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 & Destructor Documentation</h2>
|
|
<a id="a942b2d29d77fcef233549d0c4fd798da"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a942b2d29d77fcef233549d0c4fd798da">◆ </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 * </td>
|
|
<td class="paramname"><em>uuid</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">uint16_t </td>
|
|
<td class="paramname"><em>properties</em> = <code>NIMBLE_PROPERTY::READ | NIMBLE_PROPERTY::WRITE</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> * </td>
|
|
<td class="paramname"><em>pService</em> = <code>nullptr</code> </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>
|
|
<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>
|
|
<a id="acdbd57f7e97646403e520edc35c34c8b"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#acdbd57f7e97646403e520edc35c34c8b">◆ </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> & </td>
|
|
<td class="paramname"><em>uuid</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">uint16_t </td>
|
|
<td class="paramname"><em>properties</em> = <code>NIMBLE_PROPERTY::READ | NIMBLE_PROPERTY::WRITE</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> * </td>
|
|
<td class="paramname"><em>pService</em> = <code>nullptr</code> </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>
|
|
<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">◆ </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> * </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>
|
|
<a id="aae014669e9ce1ad01520d68fe0cc0fda"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#aae014669e9ce1ad01520d68fe0cc0fda">◆ </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 * </td>
|
|
<td class="paramname"><em>uuid</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">uint32_t </td>
|
|
<td class="paramname"><em>properties</em> = <code>NIMBLE_PROPERTY::READ | NIMBLE_PROPERTY::WRITE</code>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">uint16_t </td>
|
|
<td class="paramname"><em>max_len</em> = <code>100</code> </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="a6523266a751a778a2c04fea19fed4de5"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a6523266a751a778a2c04fea19fed4de5">◆ </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> & </td>
|
|
<td class="paramname"><em>uuid</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">uint32_t </td>
|
|
<td class="paramname"><em>properties</em> = <code>NIMBLE_PROPERTY::READ | NIMBLE_PROPERTY::WRITE</code>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">uint16_t </td>
|
|
<td class="paramname"><em>max_len</em> = <code>100</code> </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">◆ </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">◆ </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 </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">◆ </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 * </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">◆ </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> & </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">◆ </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">◆ </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">◆ </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">◆ </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>
|
|
<a id="a37e908d114f6ad2b4bf19c7cc4db9c54"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a37e908d114f6ad2b4bf19c7cc4db9c54">◆ </a></span>getValue() <span class="overload">[1/2]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">std::string NimBLECharacteristic::getValue </td>
|
|
<td>(</td>
|
|
<td class="paramtype">time_t * </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>
|
|
<dl class="section return"><dt>Returns</dt><dd>A std::string containing the current characteristic value. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a7d09c29b26362f6ddcaf51a9c9dc8be4"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a7d09c29b26362f6ddcaf51a9c9dc8be4">◆ </a></span>getValue() <span class="overload">[2/2]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<div class="memtemplate">
|
|
template<typename T > </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 * </td>
|
|
<td class="paramname"><em>timestamp</em> = <code>nullptr</code>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">bool </td>
|
|
<td class="paramname"><em>skipSizeCheck</em> = <code>false</code> </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>A template to convert the characteristic data to <type>. </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">
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">timestamp</td><td>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>If true it will skip checking if the data size is less than <code>sizeof(<type>)</code>. </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>The data converted to <type> or NULL if skipSizeCheck is false and the data is less than <code>sizeof(<type>)</code>.</dd></dl>
|
|
<p><b>Use:</b> <code>getValue<type>(&timestamp, skipSizeCheck);</code> </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="aa45461059e1992c816e32c371d17e813"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#aa45461059e1992c816e32c371d17e813">◆ </a></span>notify()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void NimBLECharacteristic::notify </td>
|
|
<td>(</td>
|
|
<td class="paramtype">bool </td>
|
|
<td class="paramname"><em>is_notification</em> = <code>true</code></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Send a notification.<br />
|
|
A notification is a transmission of up to the first 20 bytes of the characteristic value.<br />
|
|
A notification will not block; it is a fire and forget. </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="a2c0ed8932ee257a8632e3d72e353489b"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a2c0ed8932ee257a8632e3d72e353489b">◆ </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> * </td>
|
|
<td class="paramname"><em>pDescriptor</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">bool </td>
|
|
<td class="paramname"><em>deleteDsc</em> = <code>false</code> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Remove a descriptor from the characterisitc. </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 instance to remove from the characterisitc. </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">◆ </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> * </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>
|
|
<a id="a3e77647e4c9bd02c96b761639c4d206f"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a3e77647e4c9bd02c96b761639c4d206f">◆ </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>
|
|
<td class="paramtype">const std::string & </td>
|
|
<td class="paramname"><em>value</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Set the value of the characteristic from string data.<br />
|
|
We set the value of the characteristic from the bytes contained in the string. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">value</td><td>the std::string value of the characteristic. </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="aba05898f446e31222fbe509fa357c730"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#aba05898f446e31222fbe509fa357c730">◆ </a></span>setValue() <span class="overload">[2/3]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<div class="memtemplate">
|
|
template<typename T > </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 & </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">
|
|
|
|
<p>Convenience template to set the characteristic value to <type>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">◆ </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 * </td>
|
|
<td class="paramname"><em>data</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">size_t </td>
|
|
<td class="paramname"><em>length</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Set the value of the characteristic. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">data</td><td>The data to set for the characteristic. </td></tr>
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">length</td><td>The length of the data in bytes. </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a4fa6b8ed011d12e2b1f16e92a02b9a89"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a4fa6b8ed011d12e2b1f16e92a02b9a89">◆ </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>
|
|
<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.0 </li>
|
|
</ul>
|
|
</div>
|
|
</body>
|
|
</html>
|