mirror of
https://github.com/h2zero/esp-nimble-cpp.git
synced 2024-11-23 13:40:55 +01:00
924 lines
51 KiB
HTML
924 lines
51 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: NimBLEClient 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_client.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_client-members.html">List of all members</a> </div>
|
|
<div class="headertitle">
|
|
<div class="title">NimBLEClient Class Reference</div> </div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
|
|
<p>A model of a BLE client.
|
|
<a href="class_nim_b_l_e_client.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:aab311f0a8af21fb63f78e7fbac29951a"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_client.html#aab311f0a8af21fb63f78e7fbac29951a">connect</a> (<a class="el" href="class_nim_b_l_e_advertised_device.html">NimBLEAdvertisedDevice</a> *device, bool deleteAttibutes=true)</td></tr>
|
|
<tr class="memdesc:aab311f0a8af21fb63f78e7fbac29951a"><td class="mdescLeft"> </td><td class="mdescRight">Connect to an advertising device. <a href="class_nim_b_l_e_client.html#aab311f0a8af21fb63f78e7fbac29951a">More...</a><br /></td></tr>
|
|
<tr class="separator:aab311f0a8af21fb63f78e7fbac29951a"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a9188741bf29d58d5ff1352383c959b7b"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_client.html#a9188741bf29d58d5ff1352383c959b7b">connect</a> (const <a class="el" href="class_nim_b_l_e_address.html">NimBLEAddress</a> &address, bool deleteAttibutes=true)</td></tr>
|
|
<tr class="memdesc:a9188741bf29d58d5ff1352383c959b7b"><td class="mdescLeft"> </td><td class="mdescRight">Connect to the BLE Server. <a href="class_nim_b_l_e_client.html#a9188741bf29d58d5ff1352383c959b7b">More...</a><br /></td></tr>
|
|
<tr class="separator:a9188741bf29d58d5ff1352383c959b7b"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a836438fc9d5c2001207249661ad10e01"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_client.html#a836438fc9d5c2001207249661ad10e01">connect</a> (bool deleteAttibutes=true)</td></tr>
|
|
<tr class="memdesc:a836438fc9d5c2001207249661ad10e01"><td class="mdescLeft"> </td><td class="mdescRight">Connect to the BLE Server. <a href="class_nim_b_l_e_client.html#a836438fc9d5c2001207249661ad10e01">More...</a><br /></td></tr>
|
|
<tr class="separator:a836438fc9d5c2001207249661ad10e01"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a5f77999664cc8a83f3cdb603ba4a5c8c"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_client.html#a5f77999664cc8a83f3cdb603ba4a5c8c">disconnect</a> (uint8_t reason=BLE_ERR_REM_USER_CONN_TERM)</td></tr>
|
|
<tr class="memdesc:a5f77999664cc8a83f3cdb603ba4a5c8c"><td class="mdescLeft"> </td><td class="mdescRight">Disconnect from the peer. <a href="class_nim_b_l_e_client.html#a5f77999664cc8a83f3cdb603ba4a5c8c">More...</a><br /></td></tr>
|
|
<tr class="separator:a5f77999664cc8a83f3cdb603ba4a5c8c"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a0477ba593f0b7c0cfc4697efdba703eb"><td class="memItemLeft" align="right" valign="top"><a id="a0477ba593f0b7c0cfc4697efdba703eb"></a>
|
|
<a class="el" href="class_nim_b_l_e_address.html">NimBLEAddress</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_client.html#a0477ba593f0b7c0cfc4697efdba703eb">getPeerAddress</a> ()</td></tr>
|
|
<tr class="memdesc:a0477ba593f0b7c0cfc4697efdba703eb"><td class="mdescLeft"> </td><td class="mdescRight">Retrieve the address of the peer. <br /></td></tr>
|
|
<tr class="separator:a0477ba593f0b7c0cfc4697efdba703eb"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a93b5b7c01e58a95dcea335f837d81d07"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_client.html#a93b5b7c01e58a95dcea335f837d81d07">setPeerAddress</a> (const <a class="el" href="class_nim_b_l_e_address.html">NimBLEAddress</a> &address)</td></tr>
|
|
<tr class="memdesc:a93b5b7c01e58a95dcea335f837d81d07"><td class="mdescLeft"> </td><td class="mdescRight">Set the peer address. <a href="class_nim_b_l_e_client.html#a93b5b7c01e58a95dcea335f837d81d07">More...</a><br /></td></tr>
|
|
<tr class="separator:a93b5b7c01e58a95dcea335f837d81d07"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ae216993cf4eeb5780a104a8b14044f78"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_client.html#ae216993cf4eeb5780a104a8b14044f78">getRssi</a> ()</td></tr>
|
|
<tr class="memdesc:ae216993cf4eeb5780a104a8b14044f78"><td class="mdescLeft"> </td><td class="mdescRight">Ask the BLE server for the RSSI value. <a href="class_nim_b_l_e_client.html#ae216993cf4eeb5780a104a8b14044f78">More...</a><br /></td></tr>
|
|
<tr class="separator:ae216993cf4eeb5780a104a8b14044f78"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:acb9007569b3bb13b3b49f3c4cb47b21a"><td class="memItemLeft" align="right" valign="top">std::vector< <a class="el" href="class_nim_b_l_e_remote_service.html">NimBLERemoteService</a> * > * </td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_client.html#acb9007569b3bb13b3b49f3c4cb47b21a">getServices</a> (bool refresh=false)</td></tr>
|
|
<tr class="memdesc:acb9007569b3bb13b3b49f3c4cb47b21a"><td class="mdescLeft"> </td><td class="mdescRight">Get a pointer to the vector of found services. <a href="class_nim_b_l_e_client.html#acb9007569b3bb13b3b49f3c4cb47b21a">More...</a><br /></td></tr>
|
|
<tr class="separator:acb9007569b3bb13b3b49f3c4cb47b21a"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ab09639b499fdcd0021a2432b2b8203f5"><td class="memItemLeft" align="right" valign="top">std::vector< <a class="el" href="class_nim_b_l_e_remote_service.html">NimBLERemoteService</a> * >::iterator </td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_client.html#ab09639b499fdcd0021a2432b2b8203f5">begin</a> ()</td></tr>
|
|
<tr class="memdesc:ab09639b499fdcd0021a2432b2b8203f5"><td class="mdescLeft"> </td><td class="mdescRight">Get iterator to the beginning of the vector of remote service pointers. <a href="class_nim_b_l_e_client.html#ab09639b499fdcd0021a2432b2b8203f5">More...</a><br /></td></tr>
|
|
<tr class="separator:ab09639b499fdcd0021a2432b2b8203f5"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a0accd665926ea77d85ecb483b2b853fe"><td class="memItemLeft" align="right" valign="top">std::vector< <a class="el" href="class_nim_b_l_e_remote_service.html">NimBLERemoteService</a> * >::iterator </td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_client.html#a0accd665926ea77d85ecb483b2b853fe">end</a> ()</td></tr>
|
|
<tr class="memdesc:a0accd665926ea77d85ecb483b2b853fe"><td class="mdescLeft"> </td><td class="mdescRight">Get iterator to the end of the vector of remote service pointers. <a href="class_nim_b_l_e_client.html#a0accd665926ea77d85ecb483b2b853fe">More...</a><br /></td></tr>
|
|
<tr class="separator:a0accd665926ea77d85ecb483b2b853fe"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ae22379ab10bd82932d2303fb3753c366"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_nim_b_l_e_remote_service.html">NimBLERemoteService</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_client.html#ae22379ab10bd82932d2303fb3753c366">getService</a> (const char *uuid)</td></tr>
|
|
<tr class="memdesc:ae22379ab10bd82932d2303fb3753c366"><td class="mdescLeft"> </td><td class="mdescRight">Get the service BLE Remote Service instance corresponding to the uuid. <a href="class_nim_b_l_e_client.html#ae22379ab10bd82932d2303fb3753c366">More...</a><br /></td></tr>
|
|
<tr class="separator:ae22379ab10bd82932d2303fb3753c366"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ad8ba10522d79af1136019606802f0978"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_nim_b_l_e_remote_service.html">NimBLERemoteService</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_client.html#ad8ba10522d79af1136019606802f0978">getService</a> (const <a class="el" href="class_nim_b_l_e_u_u_i_d.html">NimBLEUUID</a> &uuid)</td></tr>
|
|
<tr class="memdesc:ad8ba10522d79af1136019606802f0978"><td class="mdescLeft"> </td><td class="mdescRight">Get the service object corresponding to the uuid. <a href="class_nim_b_l_e_client.html#ad8ba10522d79af1136019606802f0978">More...</a><br /></td></tr>
|
|
<tr class="separator:ad8ba10522d79af1136019606802f0978"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a668d476de250055a106a9f46bb7719f3"><td class="memItemLeft" align="right" valign="top"><a id="a668d476de250055a106a9f46bb7719f3"></a>
|
|
void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_client.html#a668d476de250055a106a9f46bb7719f3">deleteServices</a> ()</td></tr>
|
|
<tr class="memdesc:a668d476de250055a106a9f46bb7719f3"><td class="mdescLeft"> </td><td class="mdescRight">Delete all service objects created by this client and clear the vector. <br /></td></tr>
|
|
<tr class="separator:a668d476de250055a106a9f46bb7719f3"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a0f940c51807469db1f1802b742180beb"><td class="memItemLeft" align="right" valign="top">size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_client.html#a0f940c51807469db1f1802b742180beb">deleteService</a> (const <a class="el" href="class_nim_b_l_e_u_u_i_d.html">NimBLEUUID</a> &uuid)</td></tr>
|
|
<tr class="memdesc:a0f940c51807469db1f1802b742180beb"><td class="mdescLeft"> </td><td class="mdescRight">Delete service by UUID. <a href="class_nim_b_l_e_client.html#a0f940c51807469db1f1802b742180beb">More...</a><br /></td></tr>
|
|
<tr class="separator:a0f940c51807469db1f1802b742180beb"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:afd7b5c40f3c190a542f25b0b9e4afaf3"><td class="memItemLeft" align="right" valign="top">std::string </td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_client.html#afd7b5c40f3c190a542f25b0b9e4afaf3">getValue</a> (const <a class="el" href="class_nim_b_l_e_u_u_i_d.html">NimBLEUUID</a> &serviceUUID, const <a class="el" href="class_nim_b_l_e_u_u_i_d.html">NimBLEUUID</a> &characteristicUUID)</td></tr>
|
|
<tr class="memdesc:afd7b5c40f3c190a542f25b0b9e4afaf3"><td class="mdescLeft"> </td><td class="mdescRight">Get the value of a specific characteristic associated with a specific service. <a href="class_nim_b_l_e_client.html#afd7b5c40f3c190a542f25b0b9e4afaf3">More...</a><br /></td></tr>
|
|
<tr class="separator:afd7b5c40f3c190a542f25b0b9e4afaf3"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a0910bbe298a68e9122a169ab229bf767"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_client.html#a0910bbe298a68e9122a169ab229bf767">setValue</a> (const <a class="el" href="class_nim_b_l_e_u_u_i_d.html">NimBLEUUID</a> &serviceUUID, const <a class="el" href="class_nim_b_l_e_u_u_i_d.html">NimBLEUUID</a> &characteristicUUID, const std::string &value, bool response=false)</td></tr>
|
|
<tr class="memdesc:a0910bbe298a68e9122a169ab229bf767"><td class="mdescLeft"> </td><td class="mdescRight">Set the value of a specific characteristic associated with a specific service. <a href="class_nim_b_l_e_client.html#a0910bbe298a68e9122a169ab229bf767">More...</a><br /></td></tr>
|
|
<tr class="separator:a0910bbe298a68e9122a169ab229bf767"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a2fc46f43a71dd0df63a377961baf8009"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_nim_b_l_e_remote_characteristic.html">NimBLERemoteCharacteristic</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_client.html#a2fc46f43a71dd0df63a377961baf8009">getCharacteristic</a> (const uint16_t handle)</td></tr>
|
|
<tr class="memdesc:a2fc46f43a71dd0df63a377961baf8009"><td class="mdescLeft"> </td><td class="mdescRight">Get the remote characteristic with the specified handle. <a href="class_nim_b_l_e_client.html#a2fc46f43a71dd0df63a377961baf8009">More...</a><br /></td></tr>
|
|
<tr class="separator:a2fc46f43a71dd0df63a377961baf8009"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:af1603da59b829f75b162ac4a65ce181c"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_client.html#af1603da59b829f75b162ac4a65ce181c">isConnected</a> ()</td></tr>
|
|
<tr class="memdesc:af1603da59b829f75b162ac4a65ce181c"><td class="mdescLeft"> </td><td class="mdescRight">Are we connected to a server? <a href="class_nim_b_l_e_client.html#af1603da59b829f75b162ac4a65ce181c">More...</a><br /></td></tr>
|
|
<tr class="separator:af1603da59b829f75b162ac4a65ce181c"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:aeede4deef7421b9121387a786c07820c"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_client.html#aeede4deef7421b9121387a786c07820c">setClientCallbacks</a> (<a class="el" href="class_nim_b_l_e_client_callbacks.html">NimBLEClientCallbacks</a> *pClientCallbacks, bool deleteCallbacks=true)</td></tr>
|
|
<tr class="memdesc:aeede4deef7421b9121387a786c07820c"><td class="mdescLeft"> </td><td class="mdescRight">Set the callbacks that will be invoked when events are received. <a href="class_nim_b_l_e_client.html#aeede4deef7421b9121387a786c07820c">More...</a><br /></td></tr>
|
|
<tr class="separator:aeede4deef7421b9121387a786c07820c"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:aba9ae035357776514b61c2b6286ce1ab"><td class="memItemLeft" align="right" valign="top">std::string </td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_client.html#aba9ae035357776514b61c2b6286ce1ab">toString</a> ()</td></tr>
|
|
<tr class="memdesc:aba9ae035357776514b61c2b6286ce1ab"><td class="mdescLeft"> </td><td class="mdescRight">Return a string representation of this client. <a href="class_nim_b_l_e_client.html#aba9ae035357776514b61c2b6286ce1ab">More...</a><br /></td></tr>
|
|
<tr class="separator:aba9ae035357776514b61c2b6286ce1ab"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:aa09466a7050bf08bab2390da66007896"><td class="memItemLeft" align="right" valign="top">uint16_t </td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_client.html#aa09466a7050bf08bab2390da66007896">getConnId</a> ()</td></tr>
|
|
<tr class="memdesc:aa09466a7050bf08bab2390da66007896"><td class="mdescLeft"> </td><td class="mdescRight">Get the connection id for this client. <a href="class_nim_b_l_e_client.html#aa09466a7050bf08bab2390da66007896">More...</a><br /></td></tr>
|
|
<tr class="separator:aa09466a7050bf08bab2390da66007896"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ab971537eec4e53d621598eb1c760af3a"><td class="memItemLeft" align="right" valign="top">uint16_t </td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_client.html#ab971537eec4e53d621598eb1c760af3a">getMTU</a> ()</td></tr>
|
|
<tr class="memdesc:ab971537eec4e53d621598eb1c760af3a"><td class="mdescLeft"> </td><td class="mdescRight">Get the current mtu of this connection. <a href="class_nim_b_l_e_client.html#ab971537eec4e53d621598eb1c760af3a">More...</a><br /></td></tr>
|
|
<tr class="separator:ab971537eec4e53d621598eb1c760af3a"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a79935ecbe94f2a41e0106d011edafac4"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_client.html#a79935ecbe94f2a41e0106d011edafac4">secureConnection</a> ()</td></tr>
|
|
<tr class="memdesc:a79935ecbe94f2a41e0106d011edafac4"><td class="mdescLeft"> </td><td class="mdescRight">Initiate a secure connection (pair/bond) with the server.<br />
|
|
Called automatically when a characteristic or descriptor requires encryption or authentication to access it. <a href="class_nim_b_l_e_client.html#a79935ecbe94f2a41e0106d011edafac4">More...</a><br /></td></tr>
|
|
<tr class="separator:a79935ecbe94f2a41e0106d011edafac4"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a4068b29a9bd12e3110465908864dd20e"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_client.html#a4068b29a9bd12e3110465908864dd20e">setConnectTimeout</a> (uint8_t timeout)</td></tr>
|
|
<tr class="memdesc:a4068b29a9bd12e3110465908864dd20e"><td class="mdescLeft"> </td><td class="mdescRight">Set the timeout to wait for connection attempt to complete. <a href="class_nim_b_l_e_client.html#a4068b29a9bd12e3110465908864dd20e">More...</a><br /></td></tr>
|
|
<tr class="separator:a4068b29a9bd12e3110465908864dd20e"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a17718339f76eb621db0d7919c73b9267"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_client.html#a17718339f76eb621db0d7919c73b9267">setConnectionParams</a> (uint16_t minInterval, uint16_t maxInterval, uint16_t latency, uint16_t timeout, uint16_t scanInterval=16, uint16_t scanWindow=16)</td></tr>
|
|
<tr class="memdesc:a17718339f76eb621db0d7919c73b9267"><td class="mdescLeft"> </td><td class="mdescRight">Set the connection paramaters to use when connecting to a server. <a href="class_nim_b_l_e_client.html#a17718339f76eb621db0d7919c73b9267">More...</a><br /></td></tr>
|
|
<tr class="separator:a17718339f76eb621db0d7919c73b9267"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:aff7d389ec48567286ea732c54d320526"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_client.html#aff7d389ec48567286ea732c54d320526">updateConnParams</a> (uint16_t minInterval, uint16_t maxInterval, uint16_t latency, uint16_t timeout)</td></tr>
|
|
<tr class="memdesc:aff7d389ec48567286ea732c54d320526"><td class="mdescLeft"> </td><td class="mdescRight">Update the connection parameters: <a href="class_nim_b_l_e_client.html#aff7d389ec48567286ea732c54d320526">More...</a><br /></td></tr>
|
|
<tr class="separator:aff7d389ec48567286ea732c54d320526"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a3d8cbf51caf8b3b8a0ec6ce2074ba71d"><td class="memItemLeft" align="right" valign="top"><a id="a3d8cbf51caf8b3b8a0ec6ce2074ba71d"></a>
|
|
void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_client.html#a3d8cbf51caf8b3b8a0ec6ce2074ba71d">discoverAttributes</a> ()</td></tr>
|
|
<tr class="memdesc:a3d8cbf51caf8b3b8a0ec6ce2074ba71d"><td class="mdescLeft"> </td><td class="mdescRight">Retrieves the full database of attributes that the peripheral has available. <br /></td></tr>
|
|
<tr class="separator:a3d8cbf51caf8b3b8a0ec6ce2074ba71d"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a566207f548c6b799792fc092f1748267"><td class="memItemLeft" align="right" valign="top"><a id="a566207f548c6b799792fc092f1748267"></a>
|
|
<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_client.html#a566207f548c6b799792fc092f1748267">getConnInfo</a> ()</td></tr>
|
|
<tr class="memdesc:a566207f548c6b799792fc092f1748267"><td class="mdescLeft"> </td><td class="mdescRight">Get detailed information about the current peer connection. <br /></td></tr>
|
|
<tr class="separator:a566207f548c6b799792fc092f1748267"><td class="memSeparator" colspan="2"> </td></tr>
|
|
</table>
|
|
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
|
<div class="textblock"><p>A model of a BLE client. </p>
|
|
</div><h2 class="groupheader">Member Function Documentation</h2>
|
|
<a id="ab09639b499fdcd0021a2432b2b8203f5"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ab09639b499fdcd0021a2432b2b8203f5">◆ </a></span>begin()</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_remote_service.html">NimBLERemoteService</a> * >::iterator NimBLEClient::begin </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Get iterator to the beginning of the vector of remote service pointers. </p>
|
|
<dl class="section return"><dt>Returns</dt><dd>An iterator to the beginning of the vector of remote service pointers. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a836438fc9d5c2001207249661ad10e01"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a836438fc9d5c2001207249661ad10e01">◆ </a></span>connect() <span class="overload">[1/3]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">bool NimBLEClient::connect </td>
|
|
<td>(</td>
|
|
<td class="paramtype">bool </td>
|
|
<td class="paramname"><em>deleteAttibutes</em> = <code>true</code></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Connect to the BLE Server. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">deleteAttibutes</td><td>If true this will delete any attribute objects this client may already<br />
|
|
have created and clears the vectors after successful connection. </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>True on success. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a9188741bf29d58d5ff1352383c959b7b"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a9188741bf29d58d5ff1352383c959b7b">◆ </a></span>connect() <span class="overload">[2/3]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">bool NimBLEClient::connect </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>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">bool </td>
|
|
<td class="paramname"><em>deleteAttibutes</em> = <code>true</code> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Connect to the BLE Server. </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 server. </td></tr>
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">deleteAttibutes</td><td>If true this will delete any attribute objects this client may already<br />
|
|
have created and clears the vectors after successful connection. </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>True on success. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="aab311f0a8af21fb63f78e7fbac29951a"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#aab311f0a8af21fb63f78e7fbac29951a">◆ </a></span>connect() <span class="overload">[3/3]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">bool NimBLEClient::connect </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="class_nim_b_l_e_advertised_device.html">NimBLEAdvertisedDevice</a> * </td>
|
|
<td class="paramname"><em>device</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">bool </td>
|
|
<td class="paramname"><em>deleteAttibutes</em> = <code>true</code> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Connect to an advertising device. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">device</td><td>The device to connect to. </td></tr>
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">deleteAttibutes</td><td>If true this will delete any attribute objects this client may already<br />
|
|
have created and clears the vectors after successful connection. </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>True on success. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a0f940c51807469db1f1802b742180beb"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a0f940c51807469db1f1802b742180beb">◆ </a></span>deleteService()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">size_t NimBLEClient::deleteService </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>Delete service by 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 to be deleted from the local database. </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>Number of services left. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a5f77999664cc8a83f3cdb603ba4a5c8c"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a5f77999664cc8a83f3cdb603ba4a5c8c">◆ </a></span>disconnect()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">int NimBLEClient::disconnect </td>
|
|
<td>(</td>
|
|
<td class="paramtype">uint8_t </td>
|
|
<td class="paramname"><em>reason</em> = <code>BLE_ERR_REM_USER_CONN_TERM</code></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Disconnect from the peer. </p>
|
|
<dl class="section return"><dt>Returns</dt><dd>Error code from NimBLE stack, 0 = success. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a0accd665926ea77d85ecb483b2b853fe"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a0accd665926ea77d85ecb483b2b853fe">◆ </a></span>end()</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_remote_service.html">NimBLERemoteService</a> * >::iterator NimBLEClient::end </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Get iterator to the end of the vector of remote service pointers. </p>
|
|
<dl class="section return"><dt>Returns</dt><dd>An iterator to the end of the vector of remote service pointers. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a2fc46f43a71dd0df63a377961baf8009"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a2fc46f43a71dd0df63a377961baf8009">◆ </a></span>getCharacteristic()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="class_nim_b_l_e_remote_characteristic.html">NimBLERemoteCharacteristic</a> * NimBLEClient::getCharacteristic </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const uint16_t </td>
|
|
<td class="paramname"><em>handle</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Get the remote characteristic with the specified 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 desired characteristic. </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>The matching remote characteristic, nullptr otherwise. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="aa09466a7050bf08bab2390da66007896"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#aa09466a7050bf08bab2390da66007896">◆ </a></span>getConnId()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">uint16_t NimBLEClient::getConnId </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Get the connection id for this client. </p>
|
|
<dl class="section return"><dt>Returns</dt><dd>The connection id. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="ab971537eec4e53d621598eb1c760af3a"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ab971537eec4e53d621598eb1c760af3a">◆ </a></span>getMTU()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">uint16_t NimBLEClient::getMTU </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Get the current mtu of this connection. </p>
|
|
<dl class="section return"><dt>Returns</dt><dd>The MTU value. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="ae216993cf4eeb5780a104a8b14044f78"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ae216993cf4eeb5780a104a8b14044f78">◆ </a></span>getRssi()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">int NimBLEClient::getRssi </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Ask the BLE server for the RSSI value. </p>
|
|
<dl class="section return"><dt>Returns</dt><dd>The RSSI value. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="ae22379ab10bd82932d2303fb3753c366"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ae22379ab10bd82932d2303fb3753c366">◆ </a></span>getService() <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_remote_service.html">NimBLERemoteService</a> * NimBLEClient::getService </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>Get the service BLE Remote Service instance corresponding to the 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 being sought. </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>A pointer to the service or nullptr if not found. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="ad8ba10522d79af1136019606802f0978"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ad8ba10522d79af1136019606802f0978">◆ </a></span>getService() <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_remote_service.html">NimBLERemoteService</a> * NimBLEClient::getService </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>Get the service object corresponding to the 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 being sought. </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>A pointer to the service or nullptr if not found. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="acb9007569b3bb13b3b49f3c4cb47b21a"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#acb9007569b3bb13b3b49f3c4cb47b21a">◆ </a></span>getServices()</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_remote_service.html">NimBLERemoteService</a> * > * NimBLEClient::getServices </td>
|
|
<td>(</td>
|
|
<td class="paramtype">bool </td>
|
|
<td class="paramname"><em>refresh</em> = <code>false</code></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Get a pointer to the vector of found services. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">refresh</td><td>If true the current services vector will be cleared and<br />
|
|
all services will be retrieved from the peripheral.<br />
|
|
If false the vector will be returned with the currently stored services. </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>A pointer to the vector of available services. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="afd7b5c40f3c190a542f25b0b9e4afaf3"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#afd7b5c40f3c190a542f25b0b9e4afaf3">◆ </a></span>getValue()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">std::string NimBLEClient::getValue </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>serviceUUID</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></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>characteristicUUID</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Get the value of a specific characteristic associated with a specific service. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">serviceUUID</td><td>The service that owns the characteristic. </td></tr>
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">characteristicUUID</td><td>The characteristic whose value we wish to read. </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>characteristic value or an empty string if not found </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="af1603da59b829f75b162ac4a65ce181c"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#af1603da59b829f75b162ac4a65ce181c">◆ </a></span>isConnected()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">bool NimBLEClient::isConnected </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Are we connected to a server? </p>
|
|
<dl class="section return"><dt>Returns</dt><dd>True if we are connected and false if we are not connected. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a79935ecbe94f2a41e0106d011edafac4"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a79935ecbe94f2a41e0106d011edafac4">◆ </a></span>secureConnection()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">bool NimBLEClient::secureConnection </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Initiate a secure connection (pair/bond) with the server.<br />
|
|
Called automatically when a characteristic or descriptor requires encryption or authentication to access it. </p>
|
|
<dl class="section return"><dt>Returns</dt><dd>True on success. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="aeede4deef7421b9121387a786c07820c"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#aeede4deef7421b9121387a786c07820c">◆ </a></span>setClientCallbacks()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void NimBLEClient::setClientCallbacks </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="class_nim_b_l_e_client_callbacks.html">NimBLEClientCallbacks</a> * </td>
|
|
<td class="paramname"><em>pClientCallbacks</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 callbacks that will be invoked when events are received. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">pClientCallbacks</td><td>A pointer to a class to receive the event callbacks. </td></tr>
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">deleteCallbacks</td><td>If true this will delete the callback class sent when the client is destructed. </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a17718339f76eb621db0d7919c73b9267"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a17718339f76eb621db0d7919c73b9267">◆ </a></span>setConnectionParams()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void NimBLEClient::setConnectionParams </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 class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">uint16_t </td>
|
|
<td class="paramname"><em>scanInterval</em> = <code>16</code>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">uint16_t </td>
|
|
<td class="paramname"><em>scanWindow</em> = <code>16</code> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Set the connection paramaters to use when connecting to a server. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<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>
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">scanInterval</td><td>The scan interval to use when attempting to connect in 0.625ms units. </td></tr>
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">scanWindow</td><td>The scan window to use when attempting to connect in 0.625ms units. </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a4068b29a9bd12e3110465908864dd20e"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a4068b29a9bd12e3110465908864dd20e">◆ </a></span>setConnectTimeout()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void NimBLEClient::setConnectTimeout </td>
|
|
<td>(</td>
|
|
<td class="paramtype">uint8_t </td>
|
|
<td class="paramname"><em>time</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Set the timeout to wait for connection attempt to complete. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">time</td><td>The number of seconds before timeout. </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a93b5b7c01e58a95dcea335f837d81d07"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a93b5b7c01e58a95dcea335f837d81d07">◆ </a></span>setPeerAddress()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void NimBLEClient::setPeerAddress </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>Set the peer 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 that this client is connected or should connect to. </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a0910bbe298a68e9122a169ab229bf767"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a0910bbe298a68e9122a169ab229bf767">◆ </a></span>setValue()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">bool NimBLEClient::setValue </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>serviceUUID</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></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>characteristicUUID</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">const std::string & </td>
|
|
<td class="paramname"><em>value</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">bool </td>
|
|
<td class="paramname"><em>response</em> = <code>false</code> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Set the value of a specific characteristic associated with a specific service. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">serviceUUID</td><td>The service that owns the characteristic. </td></tr>
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">characteristicUUID</td><td>The characteristic whose value we wish to write. </td></tr>
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">value</td><td>The value to write to the characteristic. </td></tr>
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">response</td><td>If true, uses write with response operation. </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>true if successful otherwise false </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="aba9ae035357776514b61c2b6286ce1ab"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#aba9ae035357776514b61c2b6286ce1ab">◆ </a></span>toString()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">std::string NimBLEClient::toString </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Return a string representation of this client. </p>
|
|
<dl class="section return"><dt>Returns</dt><dd>A string representation of this client. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="aff7d389ec48567286ea732c54d320526"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#aff7d389ec48567286ea732c54d320526">◆ </a></span>updateConnParams()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void NimBLEClient::updateConnParams </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>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">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_client.html">NimBLEClient</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>
|