esp-nimble-cpp/class_nim_b_l_e_address.html

589 lines
31 KiB
HTML
Raw Normal View History

<!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" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
2022-01-15 23:23:57 +01:00
<title>esp-nimble-cpp: NimBLEAddress 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 id="projectrow">
<td id="projectalign">
<div id="projectname">esp-nimble-cpp<span id="projectnumber">&#160;2.0.0</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.8 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "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:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(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:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('class_nim_b_l_e_address.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">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="class_nim_b_l_e_address-members.html">List of all members</a> </div>
<div class="headertitle"><div class="title">NimBLEAddress Class Reference</div></div>
</div><!--header-->
<div class="contents">
<p>A BLE device address.
<a href="class_nim_b_l_e_address.html#details">More...</a></p>
<p><code>#include &lt;<a class="el" href="_nim_b_l_e_address_8h_source.html">NimBLEAddress.h</a>&gt;</code></p>
<p>Inherits ble_addr_t.</p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:adc38af9709f212868a89e52ea700a417" id="r_adc38af9709f212868a89e52ea700a417"><td class="memItemLeft" align="right" valign="top"><a id="adc38af9709f212868a89e52ea700a417" name="adc38af9709f212868a89e52ea700a417"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>NimBLEAddress</b> ()=default</td></tr>
<tr class="memdesc:adc38af9709f212868a89e52ea700a417"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a blank address, i.e. 00:00:00:00:00:00, type 0. <br /></td></tr>
<tr class="separator:adc38af9709f212868a89e52ea700a417"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac1bad3b929b3a694402cc7354635775e" id="r_ac1bad3b929b3a694402cc7354635775e"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_address.html#ac1bad3b929b3a694402cc7354635775e">NimBLEAddress</a> (const ble_addr_t address)</td></tr>
<tr class="memdesc:ac1bad3b929b3a694402cc7354635775e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create an address from the native NimBLE representation. <br /></td></tr>
<tr class="separator:ac1bad3b929b3a694402cc7354635775e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a567542a3cf8324810751cdd4d92703ab" id="r_a567542a3cf8324810751cdd4d92703ab"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_address.html#a567542a3cf8324810751cdd4d92703ab">NimBLEAddress</a> (const uint8_t address[BLE_DEV_ADDR_LEN], uint8_t type)</td></tr>
<tr class="memdesc:a567542a3cf8324810751cdd4d92703ab"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor for compatibility with bluedroid esp library using native ESP representation. <br /></td></tr>
<tr class="separator:a567542a3cf8324810751cdd4d92703ab"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4339a4ba2a68932000b2168547a37b35" id="r_a4339a4ba2a68932000b2168547a37b35"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_address.html#a4339a4ba2a68932000b2168547a37b35">NimBLEAddress</a> (const std::string &amp;stringAddress, uint8_t type)</td></tr>
<tr class="memdesc:a4339a4ba2a68932000b2168547a37b35"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create an address from a hex string. <br /></td></tr>
<tr class="separator:a4339a4ba2a68932000b2168547a37b35"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adde06cf0cd99fed05b199fcd8df665a9" id="r_adde06cf0cd99fed05b199fcd8df665a9"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_address.html#adde06cf0cd99fed05b199fcd8df665a9">NimBLEAddress</a> (const uint64_t &amp;address, uint8_t type)</td></tr>
<tr class="memdesc:adde06cf0cd99fed05b199fcd8df665a9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor for address using a hex value.<br />
Use the same byte order, so use 0xa4c1385def16 for "a4:c1:38:5d:ef:16". <br /></td></tr>
<tr class="separator:adde06cf0cd99fed05b199fcd8df665a9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a96fba1524ed8ab43f59f5f650e8fd3c8" id="r_a96fba1524ed8ab43f59f5f650e8fd3c8"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_address.html#a96fba1524ed8ab43f59f5f650e8fd3c8">isRpa</a> () const</td></tr>
<tr class="memdesc:a96fba1524ed8ab43f59f5f650e8fd3c8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Determine if this address is a Resolvable Private Address. <br /></td></tr>
<tr class="separator:a96fba1524ed8ab43f59f5f650e8fd3c8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9af65abe3c02a16307b8cffa3b1bcac1" id="r_a9af65abe3c02a16307b8cffa3b1bcac1"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_address.html#a9af65abe3c02a16307b8cffa3b1bcac1">isNrpa</a> () const</td></tr>
<tr class="memdesc:a9af65abe3c02a16307b8cffa3b1bcac1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Determine if this address is a Non-Resolvable Private Address. <br /></td></tr>
<tr class="separator:a9af65abe3c02a16307b8cffa3b1bcac1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a409e3ef141526c8f5c5fad99bd95b660" id="r_a409e3ef141526c8f5c5fad99bd95b660"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_address.html#a409e3ef141526c8f5c5fad99bd95b660">isStatic</a> () const</td></tr>
<tr class="memdesc:a409e3ef141526c8f5c5fad99bd95b660"><td class="mdescLeft">&#160;</td><td class="mdescRight">Determine if this address is a Static Address. <br /></td></tr>
<tr class="separator:a409e3ef141526c8f5c5fad99bd95b660"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7154780415ae201a1fcdf86298b6116c" id="r_a7154780415ae201a1fcdf86298b6116c"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_address.html#a7154780415ae201a1fcdf86298b6116c">isPublic</a> () const</td></tr>
<tr class="memdesc:a7154780415ae201a1fcdf86298b6116c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Determine if this address is a Public Address. <br /></td></tr>
<tr class="separator:a7154780415ae201a1fcdf86298b6116c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa05f35ab6724a00c65dd096006dba2bb" id="r_aa05f35ab6724a00c65dd096006dba2bb"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_address.html#aa05f35ab6724a00c65dd096006dba2bb">isNull</a> () const</td></tr>
<tr class="memdesc:aa05f35ab6724a00c65dd096006dba2bb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Determine if this address is a NULL Address. <br /></td></tr>
<tr class="separator:aa05f35ab6724a00c65dd096006dba2bb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a826fe8850cbc7d54f0696b8af4637169" id="r_a826fe8850cbc7d54f0696b8af4637169"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_address.html#a826fe8850cbc7d54f0696b8af4637169">equals</a> (const <a class="el" href="class_nim_b_l_e_address.html">NimBLEAddress</a> &amp;otherAddress) const</td></tr>
<tr class="memdesc:a826fe8850cbc7d54f0696b8af4637169"><td class="mdescLeft">&#160;</td><td class="mdescRight">Determine if this address equals another. <br /></td></tr>
<tr class="separator:a826fe8850cbc7d54f0696b8af4637169"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a31b466293f6cb752d5aba6b6ffb95351" id="r_a31b466293f6cb752d5aba6b6ffb95351"><td class="memItemLeft" align="right" valign="top">const ble_addr_t *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_address.html#a31b466293f6cb752d5aba6b6ffb95351">getBase</a> () const</td></tr>
<tr class="memdesc:a31b466293f6cb752d5aba6b6ffb95351"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the NimBLE base struct of the address. <br /></td></tr>
<tr class="separator:a31b466293f6cb752d5aba6b6ffb95351"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac53b0cc945e1505d3e72d48164ad01d6" id="r_ac53b0cc945e1505d3e72d48164ad01d6"><td class="memItemLeft" align="right" valign="top">std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_address.html#ac53b0cc945e1505d3e72d48164ad01d6">toString</a> () const</td></tr>
<tr class="memdesc:ac53b0cc945e1505d3e72d48164ad01d6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Convert a BLE address to a string. <br /></td></tr>
<tr class="separator:ac53b0cc945e1505d3e72d48164ad01d6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a18f8361ed20146cbc374a246d87015eb" id="r_a18f8361ed20146cbc374a246d87015eb"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_address.html#a18f8361ed20146cbc374a246d87015eb">getType</a> () const</td></tr>
<tr class="memdesc:a18f8361ed20146cbc374a246d87015eb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the address type. <br /></td></tr>
<tr class="separator:a18f8361ed20146cbc374a246d87015eb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a196801fb1ad972085e748c90159e858e" id="r_a196801fb1ad972085e748c90159e858e"><td class="memItemLeft" align="right" valign="top">const uint8_t *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_address.html#a196801fb1ad972085e748c90159e858e">getVal</a> () const</td></tr>
<tr class="memdesc:a196801fb1ad972085e748c90159e858e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the address value. <br /></td></tr>
<tr class="separator:a196801fb1ad972085e748c90159e858e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0f390fb5f422db8ced1938bd40f87c4d" id="r_a0f390fb5f422db8ced1938bd40f87c4d"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="class_nim_b_l_e_address.html">NimBLEAddress</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_address.html#a0f390fb5f422db8ced1938bd40f87c4d">reverseByteOrder</a> ()</td></tr>
<tr class="memdesc:a0f390fb5f422db8ced1938bd40f87c4d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reverse the byte order of the address. <br /></td></tr>
<tr class="separator:a0f390fb5f422db8ced1938bd40f87c4d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a87e8ccc81c2d83bf0503166939319164" id="r_a87e8ccc81c2d83bf0503166939319164"><td class="memItemLeft" align="right" valign="top"><a id="a87e8ccc81c2d83bf0503166939319164" name="a87e8ccc81c2d83bf0503166939319164"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>operator==</b> (const <a class="el" href="class_nim_b_l_e_address.html">NimBLEAddress</a> &amp;rhs) const</td></tr>
2022-07-31 19:38:16 +02:00
<tr class="memdesc:a87e8ccc81c2d83bf0503166939319164"><td class="mdescLeft">&#160;</td><td class="mdescRight">Convenience operator to check if this address is equal to another. <br /></td></tr>
<tr class="separator:a87e8ccc81c2d83bf0503166939319164"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae243127c78af69b26dfa225effd806ce" id="r_ae243127c78af69b26dfa225effd806ce"><td class="memItemLeft" align="right" valign="top"><a id="ae243127c78af69b26dfa225effd806ce" name="ae243127c78af69b26dfa225effd806ce"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>operator!=</b> (const <a class="el" href="class_nim_b_l_e_address.html">NimBLEAddress</a> &amp;rhs) const</td></tr>
2022-07-31 19:38:16 +02:00
<tr class="memdesc:ae243127c78af69b26dfa225effd806ce"><td class="mdescLeft">&#160;</td><td class="mdescRight">Convenience operator to check if this address is not equal to another. <br /></td></tr>
<tr class="separator:ae243127c78af69b26dfa225effd806ce"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5398ed7c6d8e95a7527103095e07093a" id="r_a5398ed7c6d8e95a7527103095e07093a"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_address.html#a5398ed7c6d8e95a7527103095e07093a">operator std::string</a> () const</td></tr>
<tr class="memdesc:a5398ed7c6d8e95a7527103095e07093a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Convenience operator to convert this address to string representation. <br /></td></tr>
<tr class="separator:a5398ed7c6d8e95a7527103095e07093a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa7d5d8d323d2846bf2082b83381bd7c8" id="r_aa7d5d8d323d2846bf2082b83381bd7c8"><td class="memItemLeft" align="right" valign="top"><a id="aa7d5d8d323d2846bf2082b83381bd7c8" name="aa7d5d8d323d2846bf2082b83381bd7c8"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>operator uint64_t</b> () const</td></tr>
2022-07-31 19:38:16 +02:00
<tr class="memdesc:aa7d5d8d323d2846bf2082b83381bd7c8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Convenience operator to convert the native address representation to uint_64. <br /></td></tr>
<tr class="separator:aa7d5d8d323d2846bf2082b83381bd7c8"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>A BLE device address. </p>
<p>Every BLE device has a unique address which can be used to identify it and form connections. </p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="ac1bad3b929b3a694402cc7354635775e" name="ac1bad3b929b3a694402cc7354635775e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac1bad3b929b3a694402cc7354635775e">&#9670;&#160;</a></span>NimBLEAddress() <span class="overload">[1/4]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">NimBLEAddress::NimBLEAddress </td>
<td>(</td>
<td class="paramtype">const ble_addr_t&#160;</td>
<td class="paramname"><em>address</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Create an address from the native NimBLE representation. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">address</td><td>The native NimBLE address. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="a567542a3cf8324810751cdd4d92703ab" name="a567542a3cf8324810751cdd4d92703ab"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a567542a3cf8324810751cdd4d92703ab">&#9670;&#160;</a></span>NimBLEAddress() <span class="overload">[2/4]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">NimBLEAddress::NimBLEAddress </td>
<td>(</td>
<td class="paramtype">const uint8_t&#160;</td>
<td class="paramname"><em>address</em>[BLE_DEV_ADDR_LEN], </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>type</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Constructor for compatibility with bluedroid esp library using native ESP representation. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">address</td><td>A uint8_t[6] or esp_bd_addr_t containing the address. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">type</td><td>The type of the address should be one of:<ul>
<li>BLE_ADDR_PUBLIC (0)</li>
<li>BLE_ADDR_RANDOM (1) </li>
</ul>
</td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="a4339a4ba2a68932000b2168547a37b35" name="a4339a4ba2a68932000b2168547a37b35"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4339a4ba2a68932000b2168547a37b35">&#9670;&#160;</a></span>NimBLEAddress() <span class="overload">[3/4]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">NimBLEAddress::NimBLEAddress </td>
<td>(</td>
<td class="paramtype">const std::string &amp;&#160;</td>
<td class="paramname"><em>addr</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>type</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Create an address from a hex string. </p>
<p>A hex string is of the format: </p><div class="fragment"><div class="line">00:00:00:00:00:00</div>
</div><!-- fragment --><p> which is 17 characters in length. </p><dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">addr</td><td>The hex string representation of the address. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">type</td><td>The type of the address, should be one of:<ul>
<li>BLE_ADDR_PUBLIC (0)</li>
<li>BLE_ADDR_RANDOM (1) </li>
</ul>
</td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="adde06cf0cd99fed05b199fcd8df665a9" name="adde06cf0cd99fed05b199fcd8df665a9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adde06cf0cd99fed05b199fcd8df665a9">&#9670;&#160;</a></span>NimBLEAddress() <span class="overload">[4/4]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">NimBLEAddress::NimBLEAddress </td>
<td>(</td>
<td class="paramtype">const uint64_t &amp;&#160;</td>
<td class="paramname"><em>address</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>type</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Constructor for address using a hex value.<br />
Use the same byte order, so use 0xa4c1385def16 for "a4:c1:38:5d:ef:16". </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">address</td><td>uint64_t containing the address. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">type</td><td>The type of the address should be one of:<ul>
<li>BLE_ADDR_PUBLIC (0)</li>
<li>BLE_ADDR_RANDOM (1) </li>
</ul>
</td></tr>
</table>
</dd>
</dl>
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a826fe8850cbc7d54f0696b8af4637169" name="a826fe8850cbc7d54f0696b8af4637169"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a826fe8850cbc7d54f0696b8af4637169">&#9670;&#160;</a></span>equals()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool NimBLEAddress::equals </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="class_nim_b_l_e_address.html">NimBLEAddress</a> &amp;&#160;</td>
<td class="paramname"><em>otherAddress</em></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>Determine if this address equals another. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">otherAddress</td><td>The other address to compare against. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>True if the addresses are equal. </dd></dl>
</div>
</div>
<a id="a31b466293f6cb752d5aba6b6ffb95351" name="a31b466293f6cb752d5aba6b6ffb95351"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a31b466293f6cb752d5aba6b6ffb95351">&#9670;&#160;</a></span>getBase()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const ble_addr_t * NimBLEAddress::getBase </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>Get the NimBLE base struct of the address. </p>
<dl class="section return"><dt>Returns</dt><dd>A read only reference to the NimBLE base struct of the address. </dd></dl>
</div>
</div>
<a id="a18f8361ed20146cbc374a246d87015eb" name="a18f8361ed20146cbc374a246d87015eb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a18f8361ed20146cbc374a246d87015eb">&#9670;&#160;</a></span>getType()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint8_t NimBLEAddress::getType </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>Get the address type. </p>
<dl class="section return"><dt>Returns</dt><dd>The address type. </dd></dl>
</div>
</div>
<a id="a196801fb1ad972085e748c90159e858e" name="a196801fb1ad972085e748c90159e858e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a196801fb1ad972085e748c90159e858e">&#9670;&#160;</a></span>getVal()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const uint8_t * NimBLEAddress::getVal </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>Get the address value. </p>
<dl class="section return"><dt>Returns</dt><dd>A read only reference to the address value. </dd></dl>
</div>
</div>
<a id="a9af65abe3c02a16307b8cffa3b1bcac1" name="a9af65abe3c02a16307b8cffa3b1bcac1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9af65abe3c02a16307b8cffa3b1bcac1">&#9670;&#160;</a></span>isNrpa()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool NimBLEAddress::isNrpa </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>Determine if this address is a Non-Resolvable Private Address. </p>
<dl class="section return"><dt>Returns</dt><dd>True if the address is a NRPA. </dd></dl>
</div>
</div>
<a id="aa05f35ab6724a00c65dd096006dba2bb" name="aa05f35ab6724a00c65dd096006dba2bb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa05f35ab6724a00c65dd096006dba2bb">&#9670;&#160;</a></span>isNull()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool NimBLEAddress::isNull </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>Determine if this address is a NULL Address. </p>
<dl class="section return"><dt>Returns</dt><dd>True if the address is a NULL Address. </dd></dl>
</div>
</div>
<a id="a7154780415ae201a1fcdf86298b6116c" name="a7154780415ae201a1fcdf86298b6116c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7154780415ae201a1fcdf86298b6116c">&#9670;&#160;</a></span>isPublic()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool NimBLEAddress::isPublic </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>Determine if this address is a Public Address. </p>
<dl class="section return"><dt>Returns</dt><dd>True if the address is a Public Address. </dd></dl>
</div>
</div>
<a id="a96fba1524ed8ab43f59f5f650e8fd3c8" name="a96fba1524ed8ab43f59f5f650e8fd3c8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a96fba1524ed8ab43f59f5f650e8fd3c8">&#9670;&#160;</a></span>isRpa()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool NimBLEAddress::isRpa </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>Determine if this address is a Resolvable Private Address. </p>
<dl class="section return"><dt>Returns</dt><dd>True if the address is a RPA. </dd></dl>
</div>
</div>
<a id="a409e3ef141526c8f5c5fad99bd95b660" name="a409e3ef141526c8f5c5fad99bd95b660"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a409e3ef141526c8f5c5fad99bd95b660">&#9670;&#160;</a></span>isStatic()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool NimBLEAddress::isStatic </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>Determine if this address is a Static Address. </p>
<dl class="section return"><dt>Returns</dt><dd>True if the address is a Static Address. </dd></dl>
</div>
</div>
<a id="a5398ed7c6d8e95a7527103095e07093a" name="a5398ed7c6d8e95a7527103095e07093a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5398ed7c6d8e95a7527103095e07093a">&#9670;&#160;</a></span>operator std::string()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">NimBLEAddress::operator std::string </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>Convenience operator to convert this address to string representation. </p>
<p>This allows passing <a class="el" href="class_nim_b_l_e_address.html" title="A BLE device address.">NimBLEAddress</a> to functions that accept std::string and/or it's methods as a parameter. </p>
</div>
</div>
<a id="a0f390fb5f422db8ced1938bd40f87c4d" name="a0f390fb5f422db8ced1938bd40f87c4d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0f390fb5f422db8ced1938bd40f87c4d">&#9670;&#160;</a></span>reverseByteOrder()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const <a class="el" href="class_nim_b_l_e_address.html">NimBLEAddress</a> &amp; NimBLEAddress::reverseByteOrder </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Reverse the byte order of the address. </p>
<dl class="section return"><dt>Returns</dt><dd>A reference to this address. </dd></dl>
</div>
</div>
<a id="ac53b0cc945e1505d3e72d48164ad01d6" name="ac53b0cc945e1505d3e72d48164ad01d6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac53b0cc945e1505d3e72d48164ad01d6">&#9670;&#160;</a></span>toString()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">std::string NimBLEAddress::toString </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>Convert a BLE address to a string. </p>
<dl class="section return"><dt>Returns</dt><dd>The string representation of the address. </dd></dl>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000001">Deprecated:</a></b></dt><dd>Use std::string() operator instead. </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_address.html">NimBLEAddress</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.8 </li>
</ul>
</div>
</body>
</html>