mirror of
https://github.com/h2zero/esp-nimble-cpp.git
synced 2024-11-23 13:40:55 +01:00
368 lines
16 KiB
HTML
368 lines
16 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: NimBLEUtils 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.3.2</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_utils.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-static-methods">Static Public Member Functions</a> |
|
|
<a href="class_nim_b_l_e_utils-members.html">List of all members</a> </div>
|
|
<div class="headertitle">
|
|
<div class="title">NimBLEUtils Class Reference</div> </div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
|
|
<p>A BLE Utility class with methods for debugging and general purpose use.
|
|
<a href="class_nim_b_l_e_utils.html#details">More...</a></p>
|
|
<table class="memberdecls">
|
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
|
|
Static Public Member Functions</h2></td></tr>
|
|
<tr class="memitem:a27df310308e72c477a3fda7a65806e01"><td class="memItemLeft" align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_utils.html#a27df310308e72c477a3fda7a65806e01">dumpGapEvent</a> (ble_gap_event *event, void *arg)</td></tr>
|
|
<tr class="memdesc:a27df310308e72c477a3fda7a65806e01"><td class="mdescLeft"> </td><td class="mdescRight">Utility function to log the gap event info. <a href="class_nim_b_l_e_utils.html#a27df310308e72c477a3fda7a65806e01">More...</a><br /></td></tr>
|
|
<tr class="separator:a27df310308e72c477a3fda7a65806e01"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:afb2df39418324f93a2477e314883ccae"><td class="memItemLeft" align="right" valign="top">static const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_utils.html#afb2df39418324f93a2477e314883ccae">gapEventToString</a> (uint8_t eventType)</td></tr>
|
|
<tr class="memdesc:afb2df39418324f93a2477e314883ccae"><td class="mdescLeft"> </td><td class="mdescRight">Convert a GAP event type to a string representation. <a href="class_nim_b_l_e_utils.html#afb2df39418324f93a2477e314883ccae">More...</a><br /></td></tr>
|
|
<tr class="separator:afb2df39418324f93a2477e314883ccae"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a6382edb7e8e4030b4fc65d463fa2a886"><td class="memItemLeft" align="right" valign="top">static char * </td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_utils.html#a6382edb7e8e4030b4fc65d463fa2a886">buildHexData</a> (uint8_t *target, const uint8_t *source, uint8_t length)</td></tr>
|
|
<tr class="memdesc:a6382edb7e8e4030b4fc65d463fa2a886"><td class="mdescLeft"> </td><td class="mdescRight">Create a hex representation of data. <a href="class_nim_b_l_e_utils.html#a6382edb7e8e4030b4fc65d463fa2a886">More...</a><br /></td></tr>
|
|
<tr class="separator:a6382edb7e8e4030b4fc65d463fa2a886"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a6de9354eeba9f126aa14cfa7ed43cda4"><td class="memItemLeft" align="right" valign="top">static const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_utils.html#a6de9354eeba9f126aa14cfa7ed43cda4">advTypeToString</a> (uint8_t advType)</td></tr>
|
|
<tr class="memdesc:a6de9354eeba9f126aa14cfa7ed43cda4"><td class="mdescLeft"> </td><td class="mdescRight">Convert the advertising type flag to a string. <a href="class_nim_b_l_e_utils.html#a6de9354eeba9f126aa14cfa7ed43cda4">More...</a><br /></td></tr>
|
|
<tr class="separator:a6de9354eeba9f126aa14cfa7ed43cda4"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a9885eda5c51477aefc0ba9e1c96d5a34"><td class="memItemLeft" align="right" valign="top">static const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_utils.html#a9885eda5c51477aefc0ba9e1c96d5a34">returnCodeToString</a> (int rc)</td></tr>
|
|
<tr class="memdesc:a9885eda5c51477aefc0ba9e1c96d5a34"><td class="mdescLeft"> </td><td class="mdescRight">Converts a return code from the NimBLE stack to a text string. <a href="class_nim_b_l_e_utils.html#a9885eda5c51477aefc0ba9e1c96d5a34">More...</a><br /></td></tr>
|
|
<tr class="separator:a9885eda5c51477aefc0ba9e1c96d5a34"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ae521f9a6363c03e42da2f76f64ea431e"><td class="memItemLeft" align="right" valign="top">static int </td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_utils.html#ae521f9a6363c03e42da2f76f64ea431e">checkConnParams</a> (ble_gap_conn_params *params)</td></tr>
|
|
<tr class="memdesc:ae521f9a6363c03e42da2f76f64ea431e"><td class="mdescLeft"> </td><td class="mdescRight">A function for checking validity of connection parameters. <a href="class_nim_b_l_e_utils.html#ae521f9a6363c03e42da2f76f64ea431e">More...</a><br /></td></tr>
|
|
<tr class="separator:ae521f9a6363c03e42da2f76f64ea431e"><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 BLE Utility class with methods for debugging and general purpose use. </p>
|
|
</div><h2 class="groupheader">Member Function Documentation</h2>
|
|
<a id="a6de9354eeba9f126aa14cfa7ed43cda4"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a6de9354eeba9f126aa14cfa7ed43cda4">◆ </a></span>advTypeToString()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">const char * NimBLEUtils::advTypeToString </td>
|
|
<td>(</td>
|
|
<td class="paramtype">uint8_t </td>
|
|
<td class="paramname"><em>advType</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">static</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Convert the advertising type flag to a string. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">advType</td><td>The type to convert. </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>A string representation of the advertising flags. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a6382edb7e8e4030b4fc65d463fa2a886"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a6382edb7e8e4030b4fc65d463fa2a886">◆ </a></span>buildHexData()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">char * NimBLEUtils::buildHexData </td>
|
|
<td>(</td>
|
|
<td class="paramtype">uint8_t * </td>
|
|
<td class="paramname"><em>target</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">const uint8_t * </td>
|
|
<td class="paramname"><em>source</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">uint8_t </td>
|
|
<td class="paramname"><em>length</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">static</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Create a hex representation of data. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">target</td><td>Where to write the hex string. If this is null, we malloc storage. </td></tr>
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">source</td><td>The start of the binary data. </td></tr>
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">length</td><td>The length of the data to convert. </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>A pointer to the formatted buffer. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="ae521f9a6363c03e42da2f76f64ea431e"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ae521f9a6363c03e42da2f76f64ea431e">◆ </a></span>checkConnParams()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">int NimBLEUtils::checkConnParams </td>
|
|
<td>(</td>
|
|
<td class="paramtype">ble_gap_conn_params * </td>
|
|
<td class="paramname"><em>params</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">static</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>A function for checking validity of connection parameters. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">params</td><td>A pointer to the structure containing the parameters to check. </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>valid == 0 or error code. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a27df310308e72c477a3fda7a65806e01"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a27df310308e72c477a3fda7a65806e01">◆ </a></span>dumpGapEvent()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void NimBLEUtils::dumpGapEvent </td>
|
|
<td>(</td>
|
|
<td class="paramtype">ble_gap_event * </td>
|
|
<td class="paramname"><em>event</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">void * </td>
|
|
<td class="paramname"><em>arg</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">static</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Utility function to log the gap event info. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">event</td><td>A pointer to the gap event structure. </td></tr>
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">arg</td><td>Unused. </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="afb2df39418324f93a2477e314883ccae"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#afb2df39418324f93a2477e314883ccae">◆ </a></span>gapEventToString()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">const char * NimBLEUtils::gapEventToString </td>
|
|
<td>(</td>
|
|
<td class="paramtype">uint8_t </td>
|
|
<td class="paramname"><em>eventType</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">static</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Convert a GAP event type to a string representation. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">eventType</td><td>The type of event. </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>A string representation of the event type. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a9885eda5c51477aefc0ba9e1c96d5a34"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a9885eda5c51477aefc0ba9e1c96d5a34">◆ </a></span>returnCodeToString()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">const char * NimBLEUtils::returnCodeToString </td>
|
|
<td>(</td>
|
|
<td class="paramtype">int </td>
|
|
<td class="paramname"><em>rc</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">static</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Converts a return code from the NimBLE stack to a text string. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">rc</td><td>The return code to convert. </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>A string representation of the return code. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
</div><!-- contents -->
|
|
</div><!-- doc-content -->
|
|
<!-- start footer part -->
|
|
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
|
<ul>
|
|
<li class="navelem"><a class="el" href="class_nim_b_l_e_utils.html">NimBLEUtils</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>
|