mirror of
https://github.com/h2zero/esp-nimble-cpp.git
synced 2024-12-26 04:30:46 +01:00
654 lines
36 KiB
HTML
654 lines
36 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
|
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
|
<meta name="generator" content="Doxygen 1.9.1"/>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
|
<title>esp-nimble-cpp: NimBLEService 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
|
|
 <span id="projectnumber">1.4.1</span>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<!-- end header part -->
|
|
<!-- Generated by Doxygen 1.9.1 -->
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
|
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
|
|
/* @license-end */
|
|
</script>
|
|
<script type="text/javascript" src="menudata.js"></script>
|
|
<script type="text/javascript" src="menu.js"></script>
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
|
$(function() {
|
|
initMenu('',true,false,'search.php','Search');
|
|
$(document).ready(function() { init_search(); });
|
|
});
|
|
/* @license-end */</script>
|
|
<div id="main-nav"></div>
|
|
</div><!-- top -->
|
|
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
|
<div id="nav-tree">
|
|
<div id="nav-tree-contents">
|
|
<div id="nav-sync" class="sync"></div>
|
|
</div>
|
|
</div>
|
|
<div id="splitbar" style="-moz-user-select:none;"
|
|
class="ui-resizable-handle">
|
|
</div>
|
|
</div>
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
|
$(document).ready(function(){initNavTree('class_nim_b_l_e_service.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_service-members.html">List of all members</a> </div>
|
|
<div class="headertitle">
|
|
<div class="title">NimBLEService Class Reference</div> </div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
|
|
<p>The model of a BLE service.
|
|
<a href="class_nim_b_l_e_service.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:a5084a6db9c9b5ddb4f3e9261606b1e65"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_service.html#a5084a6db9c9b5ddb4f3e9261606b1e65">NimBLEService</a> (const char *uuid)</td></tr>
|
|
<tr class="memdesc:a5084a6db9c9b5ddb4f3e9261606b1e65"><td class="mdescLeft"> </td><td class="mdescRight">Construct an instance of the <a class="el" href="class_nim_b_l_e_service.html" title="The model of a BLE service.">NimBLEService</a>. <a href="class_nim_b_l_e_service.html#a5084a6db9c9b5ddb4f3e9261606b1e65">More...</a><br /></td></tr>
|
|
<tr class="separator:a5084a6db9c9b5ddb4f3e9261606b1e65"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:af4e9e030046352a6ff3d9ba67fe872e3"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_service.html#af4e9e030046352a6ff3d9ba67fe872e3">NimBLEService</a> (const <a class="el" href="class_nim_b_l_e_u_u_i_d.html">NimBLEUUID</a> &uuid)</td></tr>
|
|
<tr class="memdesc:af4e9e030046352a6ff3d9ba67fe872e3"><td class="mdescLeft"> </td><td class="mdescRight">Construct an instance of the BLEService. <a href="class_nim_b_l_e_service.html#af4e9e030046352a6ff3d9ba67fe872e3">More...</a><br /></td></tr>
|
|
<tr class="separator:af4e9e030046352a6ff3d9ba67fe872e3"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:af304386c4e067dd0eeb27b86c0e59d0f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_nim_b_l_e_server.html">NimBLEServer</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_service.html#af304386c4e067dd0eeb27b86c0e59d0f">getServer</a> ()</td></tr>
|
|
<tr class="memdesc:af304386c4e067dd0eeb27b86c0e59d0f"><td class="mdescLeft"> </td><td class="mdescRight">Get the BLE server associated with this service. <a href="class_nim_b_l_e_service.html#af304386c4e067dd0eeb27b86c0e59d0f">More...</a><br /></td></tr>
|
|
<tr class="separator:af304386c4e067dd0eeb27b86c0e59d0f"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ab000b7d2b7dbb3978a5a8c1e17b1d649"><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_service.html#ab000b7d2b7dbb3978a5a8c1e17b1d649">getUUID</a> ()</td></tr>
|
|
<tr class="memdesc:ab000b7d2b7dbb3978a5a8c1e17b1d649"><td class="mdescLeft"> </td><td class="mdescRight">Get the UUID of the service. <a href="class_nim_b_l_e_service.html#ab000b7d2b7dbb3978a5a8c1e17b1d649">More...</a><br /></td></tr>
|
|
<tr class="separator:ab000b7d2b7dbb3978a5a8c1e17b1d649"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a86d65ef61a77bdd660632b4041c2b640"><td class="memItemLeft" align="right" valign="top">uint16_t </td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_service.html#a86d65ef61a77bdd660632b4041c2b640">getHandle</a> ()</td></tr>
|
|
<tr class="memdesc:a86d65ef61a77bdd660632b4041c2b640"><td class="mdescLeft"> </td><td class="mdescRight">Get the handle associated with this service. <a href="class_nim_b_l_e_service.html#a86d65ef61a77bdd660632b4041c2b640">More...</a><br /></td></tr>
|
|
<tr class="separator:a86d65ef61a77bdd660632b4041c2b640"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a10d10d14f8c5a970a06915cd407a0a73"><td class="memItemLeft" align="right" valign="top">std::string </td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_service.html#a10d10d14f8c5a970a06915cd407a0a73">toString</a> ()</td></tr>
|
|
<tr class="memdesc:a10d10d14f8c5a970a06915cd407a0a73"><td class="mdescLeft"> </td><td class="mdescRight">Return a string representation of this service. A service is defined by: <a href="class_nim_b_l_e_service.html#a10d10d14f8c5a970a06915cd407a0a73">More...</a><br /></td></tr>
|
|
<tr class="separator:a10d10d14f8c5a970a06915cd407a0a73"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a71488881933ae8adbf11c5986f9dfb75"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_service.html#a71488881933ae8adbf11c5986f9dfb75">dump</a> ()</td></tr>
|
|
<tr class="memdesc:a71488881933ae8adbf11c5986f9dfb75"><td class="mdescLeft"> </td><td class="mdescRight">Dump details of this BLE GATT service. <a href="class_nim_b_l_e_service.html#a71488881933ae8adbf11c5986f9dfb75">More...</a><br /></td></tr>
|
|
<tr class="separator:a71488881933ae8adbf11c5986f9dfb75"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ad37324ed0404d596923d6fdc0133b985"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_service.html#ad37324ed0404d596923d6fdc0133b985">start</a> ()</td></tr>
|
|
<tr class="memdesc:ad37324ed0404d596923d6fdc0133b985"><td class="mdescLeft"> </td><td class="mdescRight">Builds the database of characteristics/descriptors for the service and registers it with the NimBLE stack. <a href="class_nim_b_l_e_service.html#ad37324ed0404d596923d6fdc0133b985">More...</a><br /></td></tr>
|
|
<tr class="separator:ad37324ed0404d596923d6fdc0133b985"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a415e1b836946831c6f9edd74adba8763"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_nim_b_l_e_characteristic.html">NimBLECharacteristic</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_service.html#a415e1b836946831c6f9edd74adba8763">createCharacteristic</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:a415e1b836946831c6f9edd74adba8763"><td class="mdescLeft"> </td><td class="mdescRight">Create a new BLE Characteristic associated with this service. <a href="class_nim_b_l_e_service.html#a415e1b836946831c6f9edd74adba8763">More...</a><br /></td></tr>
|
|
<tr class="separator:a415e1b836946831c6f9edd74adba8763"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:aa780d072e6257258e27cbc96106626ad"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_nim_b_l_e_characteristic.html">NimBLECharacteristic</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_service.html#aa780d072e6257258e27cbc96106626ad">createCharacteristic</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=BLE_ATT_ATTR_MAX_LEN)</td></tr>
|
|
<tr class="memdesc:aa780d072e6257258e27cbc96106626ad"><td class="mdescLeft"> </td><td class="mdescRight">Create a new BLE Characteristic associated with this service. <a href="class_nim_b_l_e_service.html#aa780d072e6257258e27cbc96106626ad">More...</a><br /></td></tr>
|
|
<tr class="separator:aa780d072e6257258e27cbc96106626ad"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:af8215dbfdaf7ced32d6158f8ff5116e8"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_service.html#af8215dbfdaf7ced32d6158f8ff5116e8">addCharacteristic</a> (<a class="el" href="class_nim_b_l_e_characteristic.html">NimBLECharacteristic</a> *pCharacteristic)</td></tr>
|
|
<tr class="memdesc:af8215dbfdaf7ced32d6158f8ff5116e8"><td class="mdescLeft"> </td><td class="mdescRight">Add a characteristic to the service. <a href="class_nim_b_l_e_service.html#af8215dbfdaf7ced32d6158f8ff5116e8">More...</a><br /></td></tr>
|
|
<tr class="separator:af8215dbfdaf7ced32d6158f8ff5116e8"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:af992d0c27e3a559789fb77fc46623234"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_service.html#af992d0c27e3a559789fb77fc46623234">removeCharacteristic</a> (<a class="el" href="class_nim_b_l_e_characteristic.html">NimBLECharacteristic</a> *pCharacteristic, bool deleteChr=false)</td></tr>
|
|
<tr class="memdesc:af992d0c27e3a559789fb77fc46623234"><td class="mdescLeft"> </td><td class="mdescRight">Remove a characteristic from the service. <a href="class_nim_b_l_e_service.html#af992d0c27e3a559789fb77fc46623234">More...</a><br /></td></tr>
|
|
<tr class="separator:af992d0c27e3a559789fb77fc46623234"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a305b680286096638a4239620ec2de567"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_nim_b_l_e_characteristic.html">NimBLECharacteristic</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_service.html#a305b680286096638a4239620ec2de567">getCharacteristic</a> (const char *uuid, uint16_t instanceId=0)</td></tr>
|
|
<tr class="memdesc:a305b680286096638a4239620ec2de567"><td class="mdescLeft"> </td><td class="mdescRight">Get a pointer to the characteristic object with the specified UUID. <a href="class_nim_b_l_e_service.html#a305b680286096638a4239620ec2de567">More...</a><br /></td></tr>
|
|
<tr class="separator:a305b680286096638a4239620ec2de567"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:adfc4e67f79aaabc8f2c6bdb5c6966609"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_nim_b_l_e_characteristic.html">NimBLECharacteristic</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_service.html#adfc4e67f79aaabc8f2c6bdb5c6966609">getCharacteristic</a> (const <a class="el" href="class_nim_b_l_e_u_u_i_d.html">NimBLEUUID</a> &uuid, uint16_t instanceId=0)</td></tr>
|
|
<tr class="memdesc:adfc4e67f79aaabc8f2c6bdb5c6966609"><td class="mdescLeft"> </td><td class="mdescRight">Get a pointer to the characteristic object with the specified UUID. <a href="class_nim_b_l_e_service.html#adfc4e67f79aaabc8f2c6bdb5c6966609">More...</a><br /></td></tr>
|
|
<tr class="separator:adfc4e67f79aaabc8f2c6bdb5c6966609"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a35b56ab3ef7fffb2b299f95d3176d07e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_nim_b_l_e_characteristic.html">NimBLECharacteristic</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_service.html#a35b56ab3ef7fffb2b299f95d3176d07e">getCharacteristicByHandle</a> (uint16_t handle)</td></tr>
|
|
<tr class="memdesc:a35b56ab3ef7fffb2b299f95d3176d07e"><td class="mdescLeft"> </td><td class="mdescRight">Get a pointer to the characteristic object with the specified handle. <a href="class_nim_b_l_e_service.html#a35b56ab3ef7fffb2b299f95d3176d07e">More...</a><br /></td></tr>
|
|
<tr class="separator:a35b56ab3ef7fffb2b299f95d3176d07e"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:aa2cba47cb4c935e15c77707643e5e9a5"><td class="memItemLeft" align="right" valign="top">std::vector< <a class="el" href="class_nim_b_l_e_characteristic.html">NimBLECharacteristic</a> * > </td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_service.html#aa2cba47cb4c935e15c77707643e5e9a5">getCharacteristics</a> ()</td></tr>
|
|
<tr class="separator:aa2cba47cb4c935e15c77707643e5e9a5"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a24cf868e9eec7b5ecdf1e88d257e91d9"><td class="memItemLeft" align="right" valign="top">std::vector< <a class="el" href="class_nim_b_l_e_characteristic.html">NimBLECharacteristic</a> * > </td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_service.html#a24cf868e9eec7b5ecdf1e88d257e91d9">getCharacteristics</a> (const char *uuid)</td></tr>
|
|
<tr class="separator:a24cf868e9eec7b5ecdf1e88d257e91d9"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a55724788b3bf4614995ea656bf8fe1bb"><td class="memItemLeft" align="right" valign="top">std::vector< <a class="el" href="class_nim_b_l_e_characteristic.html">NimBLECharacteristic</a> * > </td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_service.html#a55724788b3bf4614995ea656bf8fe1bb">getCharacteristics</a> (const <a class="el" href="class_nim_b_l_e_u_u_i_d.html">NimBLEUUID</a> &uuid)</td></tr>
|
|
<tr class="separator:a55724788b3bf4614995ea656bf8fe1bb"><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 service. </p>
|
|
</div><h2 class="groupheader">Constructor & Destructor Documentation</h2>
|
|
<a id="a5084a6db9c9b5ddb4f3e9261606b1e65"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a5084a6db9c9b5ddb4f3e9261606b1e65">◆ </a></span>NimBLEService() <span class="overload">[1/2]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">NimBLEService::NimBLEService </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>Construct an instance of the <a class="el" href="class_nim_b_l_e_service.html" title="The model of a BLE service.">NimBLEService</a>. </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 service. </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="af4e9e030046352a6ff3d9ba67fe872e3"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#af4e9e030046352a6ff3d9ba67fe872e3">◆ </a></span>NimBLEService() <span class="overload">[2/2]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">NimBLEService::NimBLEService </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>Construct an instance of the BLEService. </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 service. </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
|
|
</div>
|
|
</div>
|
|
<h2 class="groupheader">Member Function Documentation</h2>
|
|
<a id="af8215dbfdaf7ced32d6158f8ff5116e8"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#af8215dbfdaf7ced32d6158f8ff5116e8">◆ </a></span>addCharacteristic()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void NimBLEService::addCharacteristic </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="class_nim_b_l_e_characteristic.html">NimBLECharacteristic</a> * </td>
|
|
<td class="paramname"><em>pCharacteristic</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Add a characteristic to the service. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">pCharacteristic</td><td>A pointer to the characteristic instance to add to the service. </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a415e1b836946831c6f9edd74adba8763"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a415e1b836946831c6f9edd74adba8763">◆ </a></span>createCharacteristic() <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_characteristic.html">NimBLECharacteristic</a> * NimBLEService::createCharacteristic </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>BLE_ATT_ATTR_MAX_LEN</code> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Create a new BLE Characteristic associated with this service. </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 characteristic. </td></tr>
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">properties</td><td>- The properties of the characteristic. </td></tr>
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">max_len</td><td>- The maximum length in bytes that the characteristic value can hold. </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>The new BLE characteristic. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="aa780d072e6257258e27cbc96106626ad"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#aa780d072e6257258e27cbc96106626ad">◆ </a></span>createCharacteristic() <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_characteristic.html">NimBLECharacteristic</a> * NimBLEService::createCharacteristic </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>BLE_ATT_ATTR_MAX_LEN</code> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Create a new BLE Characteristic associated with this service. </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 characteristic. </td></tr>
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">properties</td><td>- The properties of the characteristic. </td></tr>
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">max_len</td><td>- The maximum length in bytes that the characteristic value can hold. </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>The new BLE characteristic. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a71488881933ae8adbf11c5986f9dfb75"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a71488881933ae8adbf11c5986f9dfb75">◆ </a></span>dump()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void NimBLEService::dump </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Dump details of this BLE GATT service. </p>
|
|
<dl class="section return"><dt>Returns</dt><dd>N/A. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a305b680286096638a4239620ec2de567"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a305b680286096638a4239620ec2de567">◆ </a></span>getCharacteristic() <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_characteristic.html">NimBLECharacteristic</a> * NimBLEService::getCharacteristic </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>instanceId</em> = <code>0</code> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Get a pointer to the characteristic object with the specified 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 characteristic. </td></tr>
|
|
<tr><td class="paramdir"></td><td class="paramname">instanceId</td><td>The index of the characteristic to return (used when multiple characteristics have the same UUID). </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>A pointer to the characteristic object or nullptr if not found. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="adfc4e67f79aaabc8f2c6bdb5c6966609"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#adfc4e67f79aaabc8f2c6bdb5c6966609">◆ </a></span>getCharacteristic() <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_characteristic.html">NimBLECharacteristic</a> * NimBLEService::getCharacteristic </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>instanceId</em> = <code>0</code> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Get a pointer to the characteristic object with the specified 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 characteristic. </td></tr>
|
|
<tr><td class="paramdir"></td><td class="paramname">instanceId</td><td>The index of the characteristic to return (used when multiple characteristics have the same UUID). </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>A pointer to the characteristic object or nullptr if not found. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a35b56ab3ef7fffb2b299f95d3176d07e"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a35b56ab3ef7fffb2b299f95d3176d07e">◆ </a></span>getCharacteristicByHandle()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="class_nim_b_l_e_characteristic.html">NimBLECharacteristic</a> * NimBLEService::getCharacteristicByHandle </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>Get a pointer to the characteristic object with the specified handle. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">handle</td><td>The handle of the characteristic. </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>A pointer to the characteristic object or nullptr if not found. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="aa2cba47cb4c935e15c77707643e5e9a5"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#aa2cba47cb4c935e15c77707643e5e9a5">◆ </a></span>getCharacteristics() <span class="overload">[1/3]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">std::vector< <a class="el" href="class_nim_b_l_e_characteristic.html">NimBLECharacteristic</a> * > NimBLEService::getCharacteristics </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<dl class="section return"><dt>Returns</dt><dd>A vector containing pointers to each characteristic associated with this service. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a24cf868e9eec7b5ecdf1e88d257e91d9"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a24cf868e9eec7b5ecdf1e88d257e91d9">◆ </a></span>getCharacteristics() <span class="overload">[2/3]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">std::vector< <a class="el" href="class_nim_b_l_e_characteristic.html">NimBLECharacteristic</a> * > NimBLEService::getCharacteristics </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">
|
|
<dl class="section return"><dt>Returns</dt><dd>A vector containing pointers to each characteristic with the provided UUID associated with this service. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a55724788b3bf4614995ea656bf8fe1bb"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a55724788b3bf4614995ea656bf8fe1bb">◆ </a></span>getCharacteristics() <span class="overload">[3/3]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">std::vector< <a class="el" href="class_nim_b_l_e_characteristic.html">NimBLECharacteristic</a> * > NimBLEService::getCharacteristics </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">
|
|
<dl class="section return"><dt>Returns</dt><dd>A vector containing pointers to each characteristic with the provided UUID associated with this service. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a86d65ef61a77bdd660632b4041c2b640"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a86d65ef61a77bdd660632b4041c2b640">◆ </a></span>getHandle()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">uint16_t NimBLEService::getHandle </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Get the handle associated with this service. </p>
|
|
<dl class="section return"><dt>Returns</dt><dd>The handle associated with this service. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="af304386c4e067dd0eeb27b86c0e59d0f"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#af304386c4e067dd0eeb27b86c0e59d0f">◆ </a></span>getServer()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="class_nim_b_l_e_server.html">NimBLEServer</a> * NimBLEService::getServer </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Get the BLE server associated with this service. </p>
|
|
<dl class="section return"><dt>Returns</dt><dd>The BLEServer associated with this service. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="ab000b7d2b7dbb3978a5a8c1e17b1d649"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ab000b7d2b7dbb3978a5a8c1e17b1d649">◆ </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> NimBLEService::getUUID </td>
|
|
<td>(</td>
|
|
<td class="paramtype">void </td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Get the UUID of the service. </p>
|
|
<dl class="section return"><dt>Returns</dt><dd>the UUID of the service. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="af992d0c27e3a559789fb77fc46623234"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#af992d0c27e3a559789fb77fc46623234">◆ </a></span>removeCharacteristic()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void NimBLEService::removeCharacteristic </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="class_nim_b_l_e_characteristic.html">NimBLECharacteristic</a> * </td>
|
|
<td class="paramname"><em>pCharacteristic</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">bool </td>
|
|
<td class="paramname"><em>deleteChr</em> = <code>false</code> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Remove a characteristic from the service. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">pCharacteristic</td><td>A pointer to the characteristic instance to remove from the service. </td></tr>
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">deleteChr</td><td>If true it will delete the characteristic instance and free it's resources. </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="ad37324ed0404d596923d6fdc0133b985"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ad37324ed0404d596923d6fdc0133b985">◆ </a></span>start()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">bool NimBLEService::start </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Builds the database of characteristics/descriptors for the service and registers it with the NimBLE stack. </p>
|
|
<dl class="section return"><dt>Returns</dt><dd>bool success/failure . </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a10d10d14f8c5a970a06915cd407a0a73"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a10d10d14f8c5a970a06915cd407a0a73">◆ </a></span>toString()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">std::string NimBLEService::toString </td>
|
|
<td>(</td>
|
|
<td class="paramtype">void </td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Return a string representation of this service. A service is defined by: </p>
|
|
<ul>
|
|
<li>Its UUID</li>
|
|
<li>Its handle <dl class="section return"><dt>Returns</dt><dd>A string representation of this service. </dd></dl>
|
|
</li>
|
|
</ul>
|
|
|
|
</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_service.html">NimBLEService</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.1 </li>
|
|
</ul>
|
|
</div>
|
|
</body>
|
|
</html>
|