mirror of
https://github.com/h2zero/esp-nimble-cpp.git
synced 2024-12-26 04:30:46 +01:00
870 lines
47 KiB
HTML
870 lines
47 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: NimBLEServer 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_server.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_server-members.html">List of all members</a> </div>
|
|
<div class="headertitle">
|
|
<div class="title">NimBLEServer Class Reference</div> </div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
|
|
<p>The model of a BLE server.
|
|
<a href="class_nim_b_l_e_server.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:a98ea12f57c10c0477b0c1c5efab23ee5"><td class="memItemLeft" align="right" valign="top">size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_server.html#a98ea12f57c10c0477b0c1c5efab23ee5">getConnectedCount</a> ()</td></tr>
|
|
<tr class="memdesc:a98ea12f57c10c0477b0c1c5efab23ee5"><td class="mdescLeft"> </td><td class="mdescRight">Return the number of connected clients. <a href="class_nim_b_l_e_server.html#a98ea12f57c10c0477b0c1c5efab23ee5">More...</a><br /></td></tr>
|
|
<tr class="separator:a98ea12f57c10c0477b0c1c5efab23ee5"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:aaeb58b4de85754d1aac6964e9248aa35"><td class="memItemLeft" align="right" valign="top"><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_server.html#aaeb58b4de85754d1aac6964e9248aa35">createService</a> (const char *uuid)</td></tr>
|
|
<tr class="memdesc:aaeb58b4de85754d1aac6964e9248aa35"><td class="mdescLeft"> </td><td class="mdescRight">Create a BLE Service. <a href="class_nim_b_l_e_server.html#aaeb58b4de85754d1aac6964e9248aa35">More...</a><br /></td></tr>
|
|
<tr class="separator:aaeb58b4de85754d1aac6964e9248aa35"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a5f0d43106db713e2ac716eabd70a10b2"><td class="memItemLeft" align="right" valign="top"><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_server.html#a5f0d43106db713e2ac716eabd70a10b2">createService</a> (const <a class="el" href="class_nim_b_l_e_u_u_i_d.html">NimBLEUUID</a> &uuid)</td></tr>
|
|
<tr class="memdesc:a5f0d43106db713e2ac716eabd70a10b2"><td class="mdescLeft"> </td><td class="mdescRight">Create a BLE Service. <a href="class_nim_b_l_e_server.html#a5f0d43106db713e2ac716eabd70a10b2">More...</a><br /></td></tr>
|
|
<tr class="separator:a5f0d43106db713e2ac716eabd70a10b2"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a00c92f62f41ec1c499dfaf042b487d75"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_server.html#a00c92f62f41ec1c499dfaf042b487d75">removeService</a> (<a class="el" href="class_nim_b_l_e_service.html">NimBLEService</a> *service, bool deleteSvc=false)</td></tr>
|
|
<tr class="memdesc:a00c92f62f41ec1c499dfaf042b487d75"><td class="mdescLeft"> </td><td class="mdescRight">Remove a service from the server. <a href="class_nim_b_l_e_server.html#a00c92f62f41ec1c499dfaf042b487d75">More...</a><br /></td></tr>
|
|
<tr class="separator:a00c92f62f41ec1c499dfaf042b487d75"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a6eda4c9e0ac1dd031c678d4bf7da1d56"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_server.html#a6eda4c9e0ac1dd031c678d4bf7da1d56">addService</a> (<a class="el" href="class_nim_b_l_e_service.html">NimBLEService</a> *service)</td></tr>
|
|
<tr class="memdesc:a6eda4c9e0ac1dd031c678d4bf7da1d56"><td class="mdescLeft"> </td><td class="mdescRight">Adds a service which was either already created but removed from availability,<br />
|
|
or created and later added to services list. <a href="class_nim_b_l_e_server.html#a6eda4c9e0ac1dd031c678d4bf7da1d56">More...</a><br /></td></tr>
|
|
<tr class="separator:a6eda4c9e0ac1dd031c678d4bf7da1d56"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a485c90ce36275f9e4ec26a7f3d348cd9"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_server.html#a485c90ce36275f9e4ec26a7f3d348cd9">setCallbacks</a> (<a class="el" href="class_nim_b_l_e_server_callbacks.html">NimBLEServerCallbacks</a> *pCallbacks, bool deleteCallbacks=true)</td></tr>
|
|
<tr class="memdesc:a485c90ce36275f9e4ec26a7f3d348cd9"><td class="mdescLeft"> </td><td class="mdescRight">Set the server callbacks. <a href="class_nim_b_l_e_server.html#a485c90ce36275f9e4ec26a7f3d348cd9">More...</a><br /></td></tr>
|
|
<tr class="separator:a485c90ce36275f9e4ec26a7f3d348cd9"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ab41d8bb9b334734f95a726f1e15200fc"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_nim_b_l_e_ext_advertising.html">NimBLEExtAdvertising</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_server.html#ab41d8bb9b334734f95a726f1e15200fc">getAdvertising</a> ()</td></tr>
|
|
<tr class="memdesc:ab41d8bb9b334734f95a726f1e15200fc"><td class="mdescLeft"> </td><td class="mdescRight">Retrieve the advertising object that can be used to advertise the existence of the server. <a href="class_nim_b_l_e_server.html#ab41d8bb9b334734f95a726f1e15200fc">More...</a><br /></td></tr>
|
|
<tr class="separator:ab41d8bb9b334734f95a726f1e15200fc"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a8f4b6c2fc5602f5ec34f963df6a21f75"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_server.html#a8f4b6c2fc5602f5ec34f963df6a21f75">startAdvertising</a> (uint8_t inst_id, int duration=0, int max_events=0)</td></tr>
|
|
<tr class="memdesc:a8f4b6c2fc5602f5ec34f963df6a21f75"><td class="mdescLeft"> </td><td class="mdescRight">Start advertising. <a href="class_nim_b_l_e_server.html#a8f4b6c2fc5602f5ec34f963df6a21f75">More...</a><br /></td></tr>
|
|
<tr class="separator:a8f4b6c2fc5602f5ec34f963df6a21f75"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:af827ef8988c1584795447a634502f0df"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_server.html#af827ef8988c1584795447a634502f0df">stopAdvertising</a> (uint8_t inst_id)</td></tr>
|
|
<tr class="memdesc:af827ef8988c1584795447a634502f0df"><td class="mdescLeft"> </td><td class="mdescRight">Convenience function to stop advertising a data set. <a href="class_nim_b_l_e_server.html#af827ef8988c1584795447a634502f0df">More...</a><br /></td></tr>
|
|
<tr class="separator:af827ef8988c1584795447a634502f0df"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:adb1e37c174a5b62f6fd674376fac99d0"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_server.html#adb1e37c174a5b62f6fd674376fac99d0">startAdvertising</a> ()</td></tr>
|
|
<tr class="memdesc:adb1e37c174a5b62f6fd674376fac99d0"><td class="mdescLeft"> </td><td class="mdescRight">Start advertising. <a href="class_nim_b_l_e_server.html#adb1e37c174a5b62f6fd674376fac99d0">More...</a><br /></td></tr>
|
|
<tr class="separator:adb1e37c174a5b62f6fd674376fac99d0"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a7a4c114b572675e82700604db29e6e25"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_server.html#a7a4c114b572675e82700604db29e6e25">stopAdvertising</a> ()</td></tr>
|
|
<tr class="memdesc:a7a4c114b572675e82700604db29e6e25"><td class="mdescLeft"> </td><td class="mdescRight">Stop advertising. <a href="class_nim_b_l_e_server.html#a7a4c114b572675e82700604db29e6e25">More...</a><br /></td></tr>
|
|
<tr class="separator:a7a4c114b572675e82700604db29e6e25"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ae94ad52f3c97f62553af9765acdb7bcb"><td class="memItemLeft" align="right" valign="top"><a id="ae94ad52f3c97f62553af9765acdb7bcb"></a>
|
|
void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_server.html#ae94ad52f3c97f62553af9765acdb7bcb">start</a> ()</td></tr>
|
|
<tr class="memdesc:ae94ad52f3c97f62553af9765acdb7bcb"><td class="mdescLeft"> </td><td class="mdescRight">Start the GATT server. Required to be called after setup of all services and characteristics / descriptors for the NimBLE host to register them. <br /></td></tr>
|
|
<tr class="separator:ae94ad52f3c97f62553af9765acdb7bcb"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a87ebb3d230e98a6b3cf85bc403d227e0"><td class="memItemLeft" align="right" valign="top"><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_server.html#a87ebb3d230e98a6b3cf85bc403d227e0">getServiceByUUID</a> (const char *uuid, uint16_t instanceId=0)</td></tr>
|
|
<tr class="memdesc:a87ebb3d230e98a6b3cf85bc403d227e0"><td class="mdescLeft"> </td><td class="mdescRight">Get a BLE Service by its UUID. <a href="class_nim_b_l_e_server.html#a87ebb3d230e98a6b3cf85bc403d227e0">More...</a><br /></td></tr>
|
|
<tr class="separator:a87ebb3d230e98a6b3cf85bc403d227e0"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ac28df6ead4d7151df3e84f4fa991eb1f"><td class="memItemLeft" align="right" valign="top"><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_server.html#ac28df6ead4d7151df3e84f4fa991eb1f">getServiceByUUID</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:ac28df6ead4d7151df3e84f4fa991eb1f"><td class="mdescLeft"> </td><td class="mdescRight">Get a BLE Service by its UUID. <a href="class_nim_b_l_e_server.html#ac28df6ead4d7151df3e84f4fa991eb1f">More...</a><br /></td></tr>
|
|
<tr class="separator:ac28df6ead4d7151df3e84f4fa991eb1f"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a1ff39fc5235d1374d99b4f3d3acb5ddb"><td class="memItemLeft" align="right" valign="top"><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_server.html#a1ff39fc5235d1374d99b4f3d3acb5ddb">getServiceByHandle</a> (uint16_t handle)</td></tr>
|
|
<tr class="memdesc:a1ff39fc5235d1374d99b4f3d3acb5ddb"><td class="mdescLeft"> </td><td class="mdescRight">Get a BLE Service by its handle. <a href="class_nim_b_l_e_server.html#a1ff39fc5235d1374d99b4f3d3acb5ddb">More...</a><br /></td></tr>
|
|
<tr class="separator:a1ff39fc5235d1374d99b4f3d3acb5ddb"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a63c9dce5c4bbc1c6bc720b6c51bcf3e1"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_server.html#a63c9dce5c4bbc1c6bc720b6c51bcf3e1">disconnect</a> (uint16_t connID, uint8_t reason=BLE_ERR_REM_USER_CONN_TERM)</td></tr>
|
|
<tr class="memdesc:a63c9dce5c4bbc1c6bc720b6c51bcf3e1"><td class="mdescLeft"> </td><td class="mdescRight">Disconnect the specified client with optional reason. <a href="class_nim_b_l_e_server.html#a63c9dce5c4bbc1c6bc720b6c51bcf3e1">More...</a><br /></td></tr>
|
|
<tr class="separator:a63c9dce5c4bbc1c6bc720b6c51bcf3e1"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a9b08738766de90d7065263761314030a"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_server.html#a9b08738766de90d7065263761314030a">updateConnParams</a> (uint16_t conn_handle, uint16_t minInterval, uint16_t maxInterval, uint16_t latency, uint16_t timeout)</td></tr>
|
|
<tr class="memdesc:a9b08738766de90d7065263761314030a"><td class="mdescLeft"> </td><td class="mdescRight">Request an Update the connection parameters: <a href="class_nim_b_l_e_server.html#a9b08738766de90d7065263761314030a">More...</a><br /></td></tr>
|
|
<tr class="separator:a9b08738766de90d7065263761314030a"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a15112931d1eb6226188c7e383523ba06"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_server.html#a15112931d1eb6226188c7e383523ba06">setDataLen</a> (uint16_t conn_handle, uint16_t tx_octets)</td></tr>
|
|
<tr class="memdesc:a15112931d1eb6226188c7e383523ba06"><td class="mdescLeft"> </td><td class="mdescRight">Request an update of the data packet length. <a href="class_nim_b_l_e_server.html#a15112931d1eb6226188c7e383523ba06">More...</a><br /></td></tr>
|
|
<tr class="separator:a15112931d1eb6226188c7e383523ba06"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a9eb1f32b72ac93736585d6d89f393021"><td class="memItemLeft" align="right" valign="top">uint16_t </td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_server.html#a9eb1f32b72ac93736585d6d89f393021">getPeerMTU</a> (uint16_t conn_id)</td></tr>
|
|
<tr class="memdesc:a9eb1f32b72ac93736585d6d89f393021"><td class="mdescLeft"> </td><td class="mdescRight">Get the MTU of the client. <a href="class_nim_b_l_e_server.html#a9eb1f32b72ac93736585d6d89f393021">More...</a><br /></td></tr>
|
|
<tr class="separator:a9eb1f32b72ac93736585d6d89f393021"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ab95c428ddc94eb019a26d91e70f5974b"><td class="memItemLeft" align="right" valign="top"><a id="ab95c428ddc94eb019a26d91e70f5974b"></a>
|
|
std::vector< uint16_t > </td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_server.html#ab95c428ddc94eb019a26d91e70f5974b">getPeerDevices</a> ()</td></tr>
|
|
<tr class="memdesc:ab95c428ddc94eb019a26d91e70f5974b"><td class="mdescLeft"> </td><td class="mdescRight">Get the vector of the connected client ID's. <br /></td></tr>
|
|
<tr class="separator:ab95c428ddc94eb019a26d91e70f5974b"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a347c74f4ad6e2bcc2e301da11ae13e91"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_nim_b_l_e_conn_info.html">NimBLEConnInfo</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_server.html#a347c74f4ad6e2bcc2e301da11ae13e91">getPeerInfo</a> (size_t index)</td></tr>
|
|
<tr class="memdesc:a347c74f4ad6e2bcc2e301da11ae13e91"><td class="mdescLeft"> </td><td class="mdescRight">Get the connection information of a connected peer by vector index. <a href="class_nim_b_l_e_server.html#a347c74f4ad6e2bcc2e301da11ae13e91">More...</a><br /></td></tr>
|
|
<tr class="separator:a347c74f4ad6e2bcc2e301da11ae13e91"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ad91fbcb2717aa1969329f365692e1072"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_nim_b_l_e_conn_info.html">NimBLEConnInfo</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_server.html#ad91fbcb2717aa1969329f365692e1072">getPeerInfo</a> (const <a class="el" href="class_nim_b_l_e_address.html">NimBLEAddress</a> &address)</td></tr>
|
|
<tr class="memdesc:ad91fbcb2717aa1969329f365692e1072"><td class="mdescLeft"> </td><td class="mdescRight">Get the connection information of a connected peer by address. <a href="class_nim_b_l_e_server.html#ad91fbcb2717aa1969329f365692e1072">More...</a><br /></td></tr>
|
|
<tr class="separator:ad91fbcb2717aa1969329f365692e1072"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ad241eb42e9775fb2f8aaa87c9fb9a76b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_nim_b_l_e_conn_info.html">NimBLEConnInfo</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_server.html#ad241eb42e9775fb2f8aaa87c9fb9a76b">getPeerIDInfo</a> (uint16_t id)</td></tr>
|
|
<tr class="memdesc:ad241eb42e9775fb2f8aaa87c9fb9a76b"><td class="mdescLeft"> </td><td class="mdescRight">Get the connection information of a connected peer by connection ID. <a href="class_nim_b_l_e_server.html#ad241eb42e9775fb2f8aaa87c9fb9a76b">More...</a><br /></td></tr>
|
|
<tr class="separator:ad241eb42e9775fb2f8aaa87c9fb9a76b"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a6bfd923ecd0ea06d5564343ab7209122"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_server.html#a6bfd923ecd0ea06d5564343ab7209122">advertiseOnDisconnect</a> (bool)</td></tr>
|
|
<tr class="memdesc:a6bfd923ecd0ea06d5564343ab7209122"><td class="mdescLeft"> </td><td class="mdescRight">Set the server to automatically start advertising when a client disconnects. <a href="class_nim_b_l_e_server.html#a6bfd923ecd0ea06d5564343ab7209122">More...</a><br /></td></tr>
|
|
<tr class="separator:a6bfd923ecd0ea06d5564343ab7209122"><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 server. </p>
|
|
</div><h2 class="groupheader">Member Function Documentation</h2>
|
|
<a id="a6eda4c9e0ac1dd031c678d4bf7da1d56"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a6eda4c9e0ac1dd031c678d4bf7da1d56">◆ </a></span>addService()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void NimBLEServer::addService </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="class_nim_b_l_e_service.html">NimBLEService</a> * </td>
|
|
<td class="paramname"><em>service</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Adds a service which was either already created but removed from availability,<br />
|
|
or created and later added to services list. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">service</td><td>The service object to add. </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section note"><dt>Note</dt><dd>If it is desired to advertise the service it must be added by calling <a class="el" href="class_nim_b_l_e_advertising.html#a4f334752ea04223185292fe9ab524b69" title="Add a service uuid to exposed list of services.">NimBLEAdvertising::addServiceUUID</a>. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a6bfd923ecd0ea06d5564343ab7209122"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a6bfd923ecd0ea06d5564343ab7209122">◆ </a></span>advertiseOnDisconnect()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void NimBLEServer::advertiseOnDisconnect </td>
|
|
<td>(</td>
|
|
<td class="paramtype">bool </td>
|
|
<td class="paramname"><em>aod</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Set the server to automatically start advertising when a client disconnects. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">aod</td><td>true == advertise, false == don't advertise. </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="aaeb58b4de85754d1aac6964e9248aa35"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#aaeb58b4de85754d1aac6964e9248aa35">◆ </a></span>createService() <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_service.html">NimBLEService</a> * NimBLEServer::createService </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>Create a BLE 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 new service. </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>A reference to the new service object. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a5f0d43106db713e2ac716eabd70a10b2"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a5f0d43106db713e2ac716eabd70a10b2">◆ </a></span>createService() <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_service.html">NimBLEService</a> * NimBLEServer::createService </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>Create a BLE 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 new service. </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>A reference to the new service object. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a63c9dce5c4bbc1c6bc720b6c51bcf3e1"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a63c9dce5c4bbc1c6bc720b6c51bcf3e1">◆ </a></span>disconnect()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">int NimBLEServer::disconnect </td>
|
|
<td>(</td>
|
|
<td class="paramtype">uint16_t </td>
|
|
<td class="paramname"><em>connId</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">uint8_t </td>
|
|
<td class="paramname"><em>reason</em> = <code>BLE_ERR_REM_USER_CONN_TERM</code> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Disconnect the specified client with optional reason. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">connId</td><td>Connection Id of the client to disconnect. </td></tr>
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">reason</td><td>code for disconnecting. </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>NimBLE host return code. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="ab41d8bb9b334734f95a726f1e15200fc"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ab41d8bb9b334734f95a726f1e15200fc">◆ </a></span>getAdvertising()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="class_nim_b_l_e_advertising.html">NimBLEAdvertising</a> * NimBLEServer::getAdvertising </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Retrieve the advertising object that can be used to advertise the existence of the server. </p>
|
|
<dl class="section return"><dt>Returns</dt><dd>An advertising object. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a98ea12f57c10c0477b0c1c5efab23ee5"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a98ea12f57c10c0477b0c1c5efab23ee5">◆ </a></span>getConnectedCount()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">size_t NimBLEServer::getConnectedCount </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Return the number of connected clients. </p>
|
|
<dl class="section return"><dt>Returns</dt><dd>The number of connected clients. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="ad241eb42e9775fb2f8aaa87c9fb9a76b"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ad241eb42e9775fb2f8aaa87c9fb9a76b">◆ </a></span>getPeerIDInfo()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="class_nim_b_l_e_conn_info.html">NimBLEConnInfo</a> NimBLEServer::getPeerIDInfo </td>
|
|
<td>(</td>
|
|
<td class="paramtype">uint16_t </td>
|
|
<td class="paramname"><em>id</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Get the connection information of a connected peer by connection ID. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">id</td><td>The connection id of the peer. </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="ad91fbcb2717aa1969329f365692e1072"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ad91fbcb2717aa1969329f365692e1072">◆ </a></span>getPeerInfo() <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_conn_info.html">NimBLEConnInfo</a> NimBLEServer::getPeerInfo </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const <a class="el" href="class_nim_b_l_e_address.html">NimBLEAddress</a> & </td>
|
|
<td class="paramname"><em>address</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Get the connection information of a connected peer by address. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">address</td><td>The address of the peer. </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a347c74f4ad6e2bcc2e301da11ae13e91"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a347c74f4ad6e2bcc2e301da11ae13e91">◆ </a></span>getPeerInfo() <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_conn_info.html">NimBLEConnInfo</a> NimBLEServer::getPeerInfo </td>
|
|
<td>(</td>
|
|
<td class="paramtype">size_t </td>
|
|
<td class="paramname"><em>index</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Get the connection information of a connected peer by vector index. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">index</td><td>The vector index of the peer. </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a9eb1f32b72ac93736585d6d89f393021"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a9eb1f32b72ac93736585d6d89f393021">◆ </a></span>getPeerMTU()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">uint16_t NimBLEServer::getPeerMTU </td>
|
|
<td>(</td>
|
|
<td class="paramtype">uint16_t </td>
|
|
<td class="paramname"><em>conn_id</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Get the MTU of the client. </p>
|
|
<dl class="section return"><dt>Returns</dt><dd>The client MTU or 0 if not found/connected. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a1ff39fc5235d1374d99b4f3d3acb5ddb"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a1ff39fc5235d1374d99b4f3d3acb5ddb">◆ </a></span>getServiceByHandle()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="class_nim_b_l_e_service.html">NimBLEService</a> * NimBLEServer::getServiceByHandle </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 BLE Service by its handle. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">handle</td><td>The handle of the service. </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>A pointer to the service object or nullptr if not found. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a87ebb3d230e98a6b3cf85bc403d227e0"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a87ebb3d230e98a6b3cf85bc403d227e0">◆ </a></span>getServiceByUUID() <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_service.html">NimBLEService</a> * NimBLEServer::getServiceByUUID </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 BLE Service by its 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 service. </td></tr>
|
|
<tr><td class="paramdir"></td><td class="paramname">instanceId</td><td>The index of the service to return (used when multiple services have the same UUID). </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>A pointer to the service object or nullptr if not found. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="ac28df6ead4d7151df3e84f4fa991eb1f"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ac28df6ead4d7151df3e84f4fa991eb1f">◆ </a></span>getServiceByUUID() <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_service.html">NimBLEService</a> * NimBLEServer::getServiceByUUID </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 BLE Service by its 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 service. </td></tr>
|
|
<tr><td class="paramdir"></td><td class="paramname">instanceId</td><td>The index of the service to return (used when multiple services have the same UUID). </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>A pointer to the service object or nullptr if not found. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a00c92f62f41ec1c499dfaf042b487d75"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a00c92f62f41ec1c499dfaf042b487d75">◆ </a></span>removeService()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void NimBLEServer::removeService </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="class_nim_b_l_e_service.html">NimBLEService</a> * </td>
|
|
<td class="paramname"><em>service</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">bool </td>
|
|
<td class="paramname"><em>deleteSvc</em> = <code>false</code> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Remove a service from the server. </p>
|
|
<p>Immediately removes access to the service by clients, sends a service changed indication, and removes the service (if applicable) from the advertisements. The service is not deleted unless the deleteSvc parameter is true, otherwise the service remains available and can be re-added in the future. If desired a removed but not deleted service can be deleted later by calling this method with deleteSvc set to true.</p>
|
|
<dl class="section note"><dt>Note</dt><dd>The service will not be removed from the database until all open connections are closed as it requires resetting the GATT server. In the interim the service will have it's visibility disabled.</dd>
|
|
<dd>
|
|
Advertising will need to be restarted by the user after calling this as we must stop advertising in order to remove the service.</dd></dl>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">service</td><td>The service object to remove. </td></tr>
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">deleteSvc</td><td>true if the service should be deleted. </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a485c90ce36275f9e4ec26a7f3d348cd9"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a485c90ce36275f9e4ec26a7f3d348cd9">◆ </a></span>setCallbacks()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void NimBLEServer::setCallbacks </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="class_nim_b_l_e_server_callbacks.html">NimBLEServerCallbacks</a> * </td>
|
|
<td class="paramname"><em>pCallbacks</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">bool </td>
|
|
<td class="paramname"><em>deleteCallbacks</em> = <code>true</code> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Set the server callbacks. </p>
|
|
<p>As a BLE server operates, it will generate server level events such as a new client connecting or a previous client disconnecting. This function can be called to register a callback handler that will be invoked when these events are detected.</p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">pCallbacks</td><td>The callbacks to be invoked. </td></tr>
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">deleteCallbacks</td><td>if true callback class will be deleted when server is destructed. </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a15112931d1eb6226188c7e383523ba06"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a15112931d1eb6226188c7e383523ba06">◆ </a></span>setDataLen()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void NimBLEServer::setDataLen </td>
|
|
<td>(</td>
|
|
<td class="paramtype">uint16_t </td>
|
|
<td class="paramname"><em>conn_handle</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">uint16_t </td>
|
|
<td class="paramname"><em>tx_octets</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Request an update of the data packet length. </p>
|
|
<ul>
|
|
<li><p class="startli">Can only be used after a connection has been established.</p>
|
|
<p class="startli">Sends a data length update request to the peer. The Data Length Extension (DLE) allows to increase the Data Channel Payload from 27 bytes to up to 251 bytes. The peer needs to support the Bluetooth 4.2 specifications, to be capable of DLE. </p><dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">conn_handle</td><td>The connection handle of the peer to send the request to. </td></tr>
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">tx_octets</td><td>The preferred number of payload octets to use (Range 0x001B-0x00FB). </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="adb1e37c174a5b62f6fd674376fac99d0"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#adb1e37c174a5b62f6fd674376fac99d0">◆ </a></span>startAdvertising() <span class="overload">[1/2]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">bool NimBLEServer::startAdvertising </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Start advertising. </p>
|
|
<dl class="section return"><dt>Returns</dt><dd>True if advertising started successfully.</dd></dl>
|
|
<p>Start the server advertising its existence. This is a convenience function and is equivalent to retrieving the advertising object and invoking start upon it. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a8f4b6c2fc5602f5ec34f963df6a21f75"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a8f4b6c2fc5602f5ec34f963df6a21f75">◆ </a></span>startAdvertising() <span class="overload">[2/2]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">bool NimBLEServer::startAdvertising </td>
|
|
<td>(</td>
|
|
<td class="paramtype">uint8_t </td>
|
|
<td class="paramname"><em>inst_id</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">int </td>
|
|
<td class="paramname"><em>duration</em> = <code>0</code>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">int </td>
|
|
<td class="paramname"><em>max_events</em> = <code>0</code> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Start advertising. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">inst_id</td><td>The extended advertisement instance ID to start. </td></tr>
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">duration</td><td>How long to advertise for in milliseconds, 0 = forever (default). </td></tr>
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">max_events</td><td>Maximum number of advertisement events to send, 0 = no limit (default). </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>True if advertising started successfully.</dd></dl>
|
|
<p>Start the server advertising its existence. This is a convenience function and is equivalent to retrieving the advertising object and invoking start upon it. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a7a4c114b572675e82700604db29e6e25"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a7a4c114b572675e82700604db29e6e25">◆ </a></span>stopAdvertising() <span class="overload">[1/2]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">bool NimBLEServer::stopAdvertising </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Stop advertising. </p>
|
|
<dl class="section return"><dt>Returns</dt><dd>True if advertising stopped successfully. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="af827ef8988c1584795447a634502f0df"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#af827ef8988c1584795447a634502f0df">◆ </a></span>stopAdvertising() <span class="overload">[2/2]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">bool NimBLEServer::stopAdvertising </td>
|
|
<td>(</td>
|
|
<td class="paramtype">uint8_t </td>
|
|
<td class="paramname"><em>inst_id</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Convenience function to stop advertising a data set. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">inst_id</td><td>The extended advertisement instance ID to stop advertising. </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>True if advertising stopped successfully. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a9b08738766de90d7065263761314030a"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a9b08738766de90d7065263761314030a">◆ </a></span>updateConnParams()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void NimBLEServer::updateConnParams </td>
|
|
<td>(</td>
|
|
<td class="paramtype">uint16_t </td>
|
|
<td class="paramname"><em>conn_handle</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">uint16_t </td>
|
|
<td class="paramname"><em>minInterval</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">uint16_t </td>
|
|
<td class="paramname"><em>maxInterval</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">uint16_t </td>
|
|
<td class="paramname"><em>latency</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">uint16_t </td>
|
|
<td class="paramname"><em>timeout</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Request an Update the connection parameters: </p>
|
|
<ul>
|
|
<li>Can only be used after a connection has been established. <dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">conn_handle</td><td>The connection handle of the peer to send the request to. </td></tr>
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">minInterval</td><td>The minimum connection interval in 1.25ms units. </td></tr>
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">maxInterval</td><td>The maximum connection interval in 1.25ms units. </td></tr>
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">latency</td><td>The number of packets allowed to skip (extends max interval). </td></tr>
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">timeout</td><td>The timeout time in 10ms units before disconnecting. </td></tr>
|
|
</table>
|
|
</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_server.html">NimBLEServer</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>
|