esp-nimble-cpp/class_nim_b_l_e_u_u_i_d.html

636 lines
35 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: NimBLEUUID 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.2</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_u_u_i_d.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="#pub-static-methods">Static Public Member Functions</a> &#124;
<a href="class_nim_b_l_e_u_u_i_d-members.html">List of all members</a> </div>
<div class="headertitle"><div class="title">NimBLEUUID Class Reference</div></div>
</div><!--header-->
<div class="contents">
<p>A model of a BLE UUID.
<a href="class_nim_b_l_e_u_u_i_d.html#details">More...</a></p>
<p><code>#include &lt;<a class="el" href="_nim_b_l_e_u_u_i_d_8h_source.html">NimBLEUUID.h</a>&gt;</code></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:a7265f67b8ca3a2cd55b37a74b66d18bc" id="r_a7265f67b8ca3a2cd55b37a74b66d18bc"><td class="memItemLeft" align="right" valign="top"><a id="a7265f67b8ca3a2cd55b37a74b66d18bc" name="a7265f67b8ca3a2cd55b37a74b66d18bc"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>NimBLEUUID</b> ()=default</td></tr>
<tr class="memdesc:a7265f67b8ca3a2cd55b37a74b66d18bc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Created a blank UUID. <br /></td></tr>
<tr class="separator:a7265f67b8ca3a2cd55b37a74b66d18bc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a11f607fa0f7afbad0f047c6e9cba9d4d" id="r_a11f607fa0f7afbad0f047c6e9cba9d4d"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_u_u_i_d.html#a11f607fa0f7afbad0f047c6e9cba9d4d">NimBLEUUID</a> (const ble_uuid_any_t &amp;uuid)</td></tr>
<tr class="memdesc:a11f607fa0f7afbad0f047c6e9cba9d4d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a UUID from the native UUID. <br /></td></tr>
<tr class="separator:a11f607fa0f7afbad0f047c6e9cba9d4d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6fd3849062c96cee3d6cd00544fadfac" id="r_a6fd3849062c96cee3d6cd00544fadfac"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_u_u_i_d.html#a6fd3849062c96cee3d6cd00544fadfac">NimBLEUUID</a> (const std::string &amp;uuid)</td></tr>
<tr class="memdesc:a6fd3849062c96cee3d6cd00544fadfac"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a UUID from a string. <br /></td></tr>
<tr class="separator:a6fd3849062c96cee3d6cd00544fadfac"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aadbfc5504e63cd91c59c778607b8dd92" id="r_aadbfc5504e63cd91c59c778607b8dd92"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_u_u_i_d.html#aadbfc5504e63cd91c59c778607b8dd92">NimBLEUUID</a> (uint16_t uuid)</td></tr>
<tr class="memdesc:aadbfc5504e63cd91c59c778607b8dd92"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a UUID from the 16bit value. <br /></td></tr>
<tr class="separator:aadbfc5504e63cd91c59c778607b8dd92"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab4e1658b1c414edb9aea5cf5140fa461" id="r_ab4e1658b1c414edb9aea5cf5140fa461"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_u_u_i_d.html#ab4e1658b1c414edb9aea5cf5140fa461">NimBLEUUID</a> (uint32_t uuid)</td></tr>
<tr class="memdesc:ab4e1658b1c414edb9aea5cf5140fa461"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a UUID from the 32bit value. <br /></td></tr>
<tr class="separator:ab4e1658b1c414edb9aea5cf5140fa461"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac9fbd00e7ffeb334571016c61bca9286" id="r_ac9fbd00e7ffeb334571016c61bca9286"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_u_u_i_d.html#ac9fbd00e7ffeb334571016c61bca9286">NimBLEUUID</a> (const ble_uuid128_t *uuid)</td></tr>
<tr class="memdesc:ac9fbd00e7ffeb334571016c61bca9286"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a UUID from the native UUID. <br /></td></tr>
<tr class="separator:ac9fbd00e7ffeb334571016c61bca9286"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aca27c0b572bb65ff9559f3b7ce8541fd" id="r_aca27c0b572bb65ff9559f3b7ce8541fd"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_u_u_i_d.html#aca27c0b572bb65ff9559f3b7ce8541fd">NimBLEUUID</a> (const uint8_t *pData, size_t size)</td></tr>
<tr class="memdesc:aca27c0b572bb65ff9559f3b7ce8541fd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a UUID from 2, 4, 16 bytes of memory. <br /></td></tr>
<tr class="separator:aca27c0b572bb65ff9559f3b7ce8541fd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a399dca7d70ee262aa155b39d357321b1" id="r_a399dca7d70ee262aa155b39d357321b1"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_u_u_i_d.html#a399dca7d70ee262aa155b39d357321b1">NimBLEUUID</a> (uint32_t first, uint16_t second, uint16_t third, uint64_t fourth)</td></tr>
<tr class="memdesc:a399dca7d70ee262aa155b39d357321b1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a UUID from the 128bit value using hex parts instead of string, instead of <a class="el" href="class_nim_b_l_e_u_u_i_d.html" title="A model of a BLE UUID.">NimBLEUUID</a>("ebe0ccb0-7a0a-4b0c-8a1a-6ff2997da3a6"), it becomes <a class="el" href="class_nim_b_l_e_u_u_i_d.html" title="A model of a BLE UUID.">NimBLEUUID(0xebe0ccb0, 0x7a0a, 0x4b0c, 0x8a1a6ff2997da3a6)</a> <br /></td></tr>
<tr class="separator:a399dca7d70ee262aa155b39d357321b1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aefc88e493b63ccd6dc86227dc92af0c6" id="r_aefc88e493b63ccd6dc86227dc92af0c6"><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_u_u_i_d.html#aefc88e493b63ccd6dc86227dc92af0c6">bitSize</a> () const</td></tr>
<tr class="memdesc:aefc88e493b63ccd6dc86227dc92af0c6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the bit size of the UUID, 16, 32 or 128. <br /></td></tr>
<tr class="separator:aefc88e493b63ccd6dc86227dc92af0c6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acf379fca7d3689a73e6750d7ab50a0af" id="r_acf379fca7d3689a73e6750d7ab50a0af"><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_u_u_i_d.html#acf379fca7d3689a73e6750d7ab50a0af">getValue</a> () const</td></tr>
<tr class="memdesc:acf379fca7d3689a73e6750d7ab50a0af"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the uuid value. <br /></td></tr>
<tr class="separator:acf379fca7d3689a73e6750d7ab50a0af"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a68c61ae225675ac84d60f76058a5bdd4" id="r_a68c61ae225675ac84d60f76058a5bdd4"><td class="memItemLeft" align="right" valign="top">const ble_uuid_t *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_u_u_i_d.html#a68c61ae225675ac84d60f76058a5bdd4">getBase</a> () const</td></tr>
<tr class="memdesc:a68c61ae225675ac84d60f76058a5bdd4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get a pointer to the NimBLE UUID base structure. <br /></td></tr>
<tr class="separator:a68c61ae225675ac84d60f76058a5bdd4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3d9763ff434905457ed69118e93a35fd" id="r_a3d9763ff434905457ed69118e93a35fd"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_u_u_i_d.html#a3d9763ff434905457ed69118e93a35fd">equals</a> (const <a class="el" href="class_nim_b_l_e_u_u_i_d.html">NimBLEUUID</a> &amp;uuid) const</td></tr>
<tr class="memdesc:a3d9763ff434905457ed69118e93a35fd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compare a UUID against this UUID. <br /></td></tr>
<tr class="separator:a3d9763ff434905457ed69118e93a35fd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9708e07b8e0915aafcfa32fe74ccdf64" id="r_a9708e07b8e0915aafcfa32fe74ccdf64"><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_u_u_i_d.html#a9708e07b8e0915aafcfa32fe74ccdf64">toString</a> () const</td></tr>
<tr class="memdesc:a9708e07b8e0915aafcfa32fe74ccdf64"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get a string representation of the UUID. <br /></td></tr>
<tr class="separator:a9708e07b8e0915aafcfa32fe74ccdf64"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7103976da820d0c1840aa77aca38306c" id="r_a7103976da820d0c1840aa77aca38306c"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="class_nim_b_l_e_u_u_i_d.html">NimBLEUUID</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_u_u_i_d.html#a7103976da820d0c1840aa77aca38306c">to128</a> ()</td></tr>
<tr class="memdesc:a7103976da820d0c1840aa77aca38306c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Convert a UUID to its 128 bit representation. <br /></td></tr>
<tr class="separator:a7103976da820d0c1840aa77aca38306c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a618f6c29565338a496715ca951c98afb" id="r_a618f6c29565338a496715ca951c98afb"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="class_nim_b_l_e_u_u_i_d.html">NimBLEUUID</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_u_u_i_d.html#a618f6c29565338a496715ca951c98afb">to16</a> ()</td></tr>
<tr class="memdesc:a618f6c29565338a496715ca951c98afb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Convert 128 bit UUID to its 16 bit representation. <br /></td></tr>
2022-07-31 19:38:16 +02:00
<tr class="separator:a618f6c29565338a496715ca951c98afb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9b96d90463f02f6a21afbaebcc242dd9" id="r_a9b96d90463f02f6a21afbaebcc242dd9"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="class_nim_b_l_e_u_u_i_d.html">NimBLEUUID</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_u_u_i_d.html#a9b96d90463f02f6a21afbaebcc242dd9">reverseByteOrder</a> ()</td></tr>
<tr class="memdesc:a9b96d90463f02f6a21afbaebcc242dd9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reverse the byte order of the UUID. <br /></td></tr>
<tr class="separator:a9b96d90463f02f6a21afbaebcc242dd9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a46484dcb0a1bfef6a8afe97f49f97875" id="r_a46484dcb0a1bfef6a8afe97f49f97875"><td class="memItemLeft" align="right" valign="top"><a id="a46484dcb0a1bfef6a8afe97f49f97875" name="a46484dcb0a1bfef6a8afe97f49f97875"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>operator==</b> (const <a class="el" href="class_nim_b_l_e_u_u_i_d.html">NimBLEUUID</a> &amp;rhs) const</td></tr>
2022-07-31 19:38:16 +02:00
<tr class="memdesc:a46484dcb0a1bfef6a8afe97f49f97875"><td class="mdescLeft">&#160;</td><td class="mdescRight">Convenience operator to check if this UUID is equal to another. <br /></td></tr>
<tr class="separator:a46484dcb0a1bfef6a8afe97f49f97875"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abeee22e6661f7533f05802e1f89fedfe" id="r_abeee22e6661f7533f05802e1f89fedfe"><td class="memItemLeft" align="right" valign="top"><a id="abeee22e6661f7533f05802e1f89fedfe" name="abeee22e6661f7533f05802e1f89fedfe"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>operator!=</b> (const <a class="el" href="class_nim_b_l_e_u_u_i_d.html">NimBLEUUID</a> &amp;rhs) const</td></tr>
2022-07-31 19:38:16 +02:00
<tr class="memdesc:abeee22e6661f7533f05802e1f89fedfe"><td class="mdescLeft">&#160;</td><td class="mdescRight">Convenience operator to check if this UUID is not equal to another. <br /></td></tr>
<tr class="separator:abeee22e6661f7533f05802e1f89fedfe"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4315e760bf763333022658ff980f3048" id="r_a4315e760bf763333022658ff980f3048"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_u_u_i_d.html#a4315e760bf763333022658ff980f3048">operator std::string</a> () const</td></tr>
<tr class="memdesc:a4315e760bf763333022658ff980f3048"><td class="mdescLeft">&#160;</td><td class="mdescRight">Convenience operator to convert this UUID to string representation. <br /></td></tr>
<tr class="separator:a4315e760bf763333022658ff980f3048"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-static-methods" name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:ae09acdc52e23a3a38c57aaf859c278c2" id="r_ae09acdc52e23a3a38c57aaf859c278c2"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="class_nim_b_l_e_u_u_i_d.html">NimBLEUUID</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_u_u_i_d.html#ae09acdc52e23a3a38c57aaf859c278c2">fromString</a> (const std::string &amp;uuid)</td></tr>
<tr class="separator:ae09acdc52e23a3a38c57aaf859c278c2"><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 model of a BLE UUID. </p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a11f607fa0f7afbad0f047c6e9cba9d4d" name="a11f607fa0f7afbad0f047c6e9cba9d4d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a11f607fa0f7afbad0f047c6e9cba9d4d">&#9670;&#160;</a></span>NimBLEUUID() <span class="overload">[1/7]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">NimBLEUUID::NimBLEUUID </td>
<td>(</td>
<td class="paramtype">const ble_uuid_any_t &amp;&#160;</td>
<td class="paramname"><em>uuid</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Create a UUID from the native 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 native UUID. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="a6fd3849062c96cee3d6cd00544fadfac" name="a6fd3849062c96cee3d6cd00544fadfac"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6fd3849062c96cee3d6cd00544fadfac">&#9670;&#160;</a></span>NimBLEUUID() <span class="overload">[2/7]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">NimBLEUUID::NimBLEUUID </td>
<td>(</td>
<td class="paramtype">const std::string &amp;&#160;</td>
<td class="paramname"><em>value</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Create a UUID from a string. </p>
<p>Create a UUID from a string. There will be two possible stories here. Either the string represents a binary data field or the string represents a hex encoding of a UUID. For the hex encoding, here is an example:</p>
<div class="fragment"><div class="line"><span class="stringliteral">&quot;beb5483e-36e1-4688-b7f5-ea07361b26a8&quot;</span></div>
<div class="line"> 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5</div>
<div class="line"> 12345678-90ab-cdef-1234-567890abcdef</div>
</div><!-- fragment --><p>This has a length of 36 characters. We need to parse this into 16 bytes.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">value</td><td>The string to build a UUID from. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="aadbfc5504e63cd91c59c778607b8dd92" name="aadbfc5504e63cd91c59c778607b8dd92"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aadbfc5504e63cd91c59c778607b8dd92">&#9670;&#160;</a></span>NimBLEUUID() <span class="overload">[3/7]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">NimBLEUUID::NimBLEUUID </td>
<td>(</td>
<td class="paramtype">uint16_t&#160;</td>
<td class="paramname"><em>uuid</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Create a UUID from the 16bit value. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">uuid</td><td>The 16bit short form UUID. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="ab4e1658b1c414edb9aea5cf5140fa461" name="ab4e1658b1c414edb9aea5cf5140fa461"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab4e1658b1c414edb9aea5cf5140fa461">&#9670;&#160;</a></span>NimBLEUUID() <span class="overload">[4/7]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">NimBLEUUID::NimBLEUUID </td>
<td>(</td>
<td class="paramtype">uint32_t&#160;</td>
<td class="paramname"><em>uuid</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Create a UUID from the 32bit value. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">uuid</td><td>The 32bit short form UUID. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="ac9fbd00e7ffeb334571016c61bca9286" name="ac9fbd00e7ffeb334571016c61bca9286"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac9fbd00e7ffeb334571016c61bca9286">&#9670;&#160;</a></span>NimBLEUUID() <span class="overload">[5/7]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">NimBLEUUID::NimBLEUUID </td>
<td>(</td>
<td class="paramtype">const ble_uuid128_t *&#160;</td>
<td class="paramname"><em>uuid</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Create a UUID from the native 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 native UUID. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="aca27c0b572bb65ff9559f3b7ce8541fd" name="aca27c0b572bb65ff9559f3b7ce8541fd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aca27c0b572bb65ff9559f3b7ce8541fd">&#9670;&#160;</a></span>NimBLEUUID() <span class="overload">[6/7]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">NimBLEUUID::NimBLEUUID </td>
<td>(</td>
<td class="paramtype">const uint8_t *&#160;</td>
<td class="paramname"><em>pData</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t&#160;</td>
<td class="paramname"><em>size</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Create a UUID from 2, 4, 16 bytes of memory. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">pData</td><td>The pointer to the start of the UUID. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">size</td><td>The size of the data. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="a399dca7d70ee262aa155b39d357321b1" name="a399dca7d70ee262aa155b39d357321b1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a399dca7d70ee262aa155b39d357321b1">&#9670;&#160;</a></span>NimBLEUUID() <span class="overload">[7/7]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">NimBLEUUID::NimBLEUUID </td>
<td>(</td>
<td class="paramtype">uint32_t&#160;</td>
<td class="paramname"><em>first</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint16_t&#160;</td>
<td class="paramname"><em>second</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint16_t&#160;</td>
<td class="paramname"><em>third</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint64_t&#160;</td>
<td class="paramname"><em>fourth</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Create a UUID from the 128bit value using hex parts instead of string, instead of <a class="el" href="class_nim_b_l_e_u_u_i_d.html" title="A model of a BLE UUID.">NimBLEUUID</a>("ebe0ccb0-7a0a-4b0c-8a1a-6ff2997da3a6"), it becomes <a class="el" href="class_nim_b_l_e_u_u_i_d.html" title="A model of a BLE UUID.">NimBLEUUID(0xebe0ccb0, 0x7a0a, 0x4b0c, 0x8a1a6ff2997da3a6)</a> </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">first</td><td>The first 32bit of the UUID. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">second</td><td>The next 16bit of the UUID. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">third</td><td>The next 16bit of the UUID. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">fourth</td><td>The last 64bit of the UUID, combining the last 2 parts of the string equivalent </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="aefc88e493b63ccd6dc86227dc92af0c6" name="aefc88e493b63ccd6dc86227dc92af0c6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aefc88e493b63ccd6dc86227dc92af0c6">&#9670;&#160;</a></span>bitSize()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint8_t NimBLEUUID::bitSize </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>Get the bit size of the UUID, 16, 32 or 128. </p>
<dl class="section return"><dt>Returns</dt><dd>The bit size of the UUID or 0 if not initialized. </dd></dl>
</div>
</div>
<a id="a3d9763ff434905457ed69118e93a35fd" name="a3d9763ff434905457ed69118e93a35fd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3d9763ff434905457ed69118e93a35fd">&#9670;&#160;</a></span>equals()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool NimBLEUUID::equals </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="class_nim_b_l_e_u_u_i_d.html">NimBLEUUID</a> &amp;&#160;</td>
<td class="paramname"><em>uuid</em></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>Compare a UUID against this 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 to compare against. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>True if the UUIDs are equal and false otherwise. </dd></dl>
</div>
</div>
<a id="ae09acdc52e23a3a38c57aaf859c278c2" name="ae09acdc52e23a3a38c57aaf859c278c2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae09acdc52e23a3a38c57aaf859c278c2">&#9670;&#160;</a></span>fromString()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="class_nim_b_l_e_u_u_i_d.html">NimBLEUUID</a> NimBLEUUID::fromString </td>
<td>(</td>
<td class="paramtype">const std::string &amp;&#160;</td>
<td class="paramname"><em>uuid</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>Create a <a class="el" href="class_nim_b_l_e_u_u_i_d.html" title="A model of a BLE UUID.">NimBLEUUID</a> from a string of the form: 0xNNNN 0xNNNNNNNN 0x&lt;UUID&gt; NNNN NNNNNNNN &lt;UUID&gt;</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">uuid</td><td>The string to create the UUID from. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="a68c61ae225675ac84d60f76058a5bdd4" name="a68c61ae225675ac84d60f76058a5bdd4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a68c61ae225675ac84d60f76058a5bdd4">&#9670;&#160;</a></span>getBase()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const ble_uuid_t * NimBLEUUID::getBase </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>Get a pointer to the NimBLE UUID base structure. </p>
<dl class="section return"><dt>Returns</dt><dd>A Read-only pointer to the NimBLE UUID base structure. </dd></dl>
<dl class="section note"><dt>Note</dt><dd>The type value should be checked, if no 16, 32 or 128 then the UUID is not initialized. </dd></dl>
</div>
</div>
<a id="acf379fca7d3689a73e6750d7ab50a0af" name="acf379fca7d3689a73e6750d7ab50a0af"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acf379fca7d3689a73e6750d7ab50a0af">&#9670;&#160;</a></span>getValue()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const uint8_t * NimBLEUUID::getValue </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>Get the uuid value. </p>
<dl class="section return"><dt>Returns</dt><dd>A pointer to the UUID value or nullptr if not initialized. </dd></dl>
<dl class="section note"><dt>Note</dt><dd>This should be checked with <code><a class="el" href="class_nim_b_l_e_u_u_i_d.html#aefc88e493b63ccd6dc86227dc92af0c6" title="Get the bit size of the UUID, 16, 32 or 128.">bitSize()</a></code> before accessing. </dd></dl>
</div>
</div>
<a id="a4315e760bf763333022658ff980f3048" name="a4315e760bf763333022658ff980f3048"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4315e760bf763333022658ff980f3048">&#9670;&#160;</a></span>operator std::string()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">NimBLEUUID::operator std::string </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
2022-07-31 19:38:16 +02:00
<p>Convenience operator to convert this UUID to string representation. </p>
<p>This allows passing <a class="el" href="class_nim_b_l_e_u_u_i_d.html" title="A model of a BLE UUID.">NimBLEUUID</a> to functions that accept std::string and/or or it's methods as a parameter. </p>
</div>
</div>
<a id="a9b96d90463f02f6a21afbaebcc242dd9" name="a9b96d90463f02f6a21afbaebcc242dd9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9b96d90463f02f6a21afbaebcc242dd9">&#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_u_u_i_d.html">NimBLEUUID</a> &amp; NimBLEUUID::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 UUID. </p>
<dl class="section return"><dt>Returns</dt><dd>The <a class="el" href="class_nim_b_l_e_u_u_i_d.html" title="A model of a BLE UUID.">NimBLEUUID</a> with the byte order reversed.</dd></dl>
<p>This is useful when comparing UUIDs or when the advertisement data is reversed. </p>
</div>
</div>
<a id="a7103976da820d0c1840aa77aca38306c" name="a7103976da820d0c1840aa77aca38306c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7103976da820d0c1840aa77aca38306c">&#9670;&#160;</a></span>to128()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const <a class="el" href="class_nim_b_l_e_u_u_i_d.html">NimBLEUUID</a> &amp; NimBLEUUID::to128 </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Convert a UUID to its 128 bit representation. </p>
2022-07-31 19:38:16 +02:00
<p>A UUID can be internally represented as 16bit, 32bit or the full 128bit. This method will convert 16 or 32bit representations to the full 128bit. </p><dl class="section return"><dt>Returns</dt><dd>The <a class="el" href="class_nim_b_l_e_u_u_i_d.html" title="A model of a BLE UUID.">NimBLEUUID</a> converted to 128bit. </dd></dl>
</div>
</div>
<a id="a618f6c29565338a496715ca951c98afb" name="a618f6c29565338a496715ca951c98afb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a618f6c29565338a496715ca951c98afb">&#9670;&#160;</a></span>to16()</h2>
2022-07-31 19:38:16 +02:00
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const <a class="el" href="class_nim_b_l_e_u_u_i_d.html">NimBLEUUID</a> &amp; NimBLEUUID::to16 </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Convert 128 bit UUID to its 16 bit representation. </p>
<p>A UUID can be internally represented as 16bit, 32bit or the full 128bit. This method will convert a 128bit uuid to 16bit if it contains the ble base uuid. </p><dl class="section return"><dt>Returns</dt><dd>The <a class="el" href="class_nim_b_l_e_u_u_i_d.html" title="A model of a BLE UUID.">NimBLEUUID</a> converted to 16bit if successful, otherwise the original uuid. </dd></dl>
</div>
</div>
<a id="a9708e07b8e0915aafcfa32fe74ccdf64" name="a9708e07b8e0915aafcfa32fe74ccdf64"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9708e07b8e0915aafcfa32fe74ccdf64">&#9670;&#160;</a></span>toString()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">std::string NimBLEUUID::toString </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>Get a string representation of the UUID. </p>
<p>The format of a string is: 01234567 8901 2345 6789 012345678901 0000180d-0000-1000-8000-00805f9b34fb 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5</p>
<dl class="section return"><dt>Returns</dt><dd>A string representation of the UUID. </dd></dl>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000002">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_u_u_i_d.html">NimBLEUUID</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>