mirror of
https://github.com/h2zero/esp-nimble-cpp.git
synced 2024-12-25 20:20:47 +01:00
801 lines
48 KiB
HTML
801 lines
48 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" 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"/>
|
|
<title>esp-nimble-cpp: NimBLEAttValue 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"> 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&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&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&dn=expat.txt MIT */
|
|
$(document).ready(function(){initNavTree('class_nim_b_l_e_att_value.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> |
|
|
<a href="class_nim_b_l_e_att_value-members.html">List of all members</a> </div>
|
|
<div class="headertitle"><div class="title">NimBLEAttValue Class Reference</div></div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
|
|
<p>A specialized container class to hold BLE attribute values.
|
|
<a href="class_nim_b_l_e_att_value.html#details">More...</a></p>
|
|
|
|
<p><code>#include <<a class="el" href="_nim_b_l_e_att_value_8h_source.html">NimBLEAttValue.h</a>></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:aa801ed93f65e8cbc507c6ea6f4f49294" id="r_aa801ed93f65e8cbc507c6ea6f4f49294"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_att_value.html#aa801ed93f65e8cbc507c6ea6f4f49294">NimBLEAttValue</a> (uint16_t init_len=<a class="el" href="nimconfig_8h.html#a4d4ea715325f75455b43c7dbaa69d7a0">CONFIG_NIMBLE_CPP_ATT_VALUE_INIT_LENGTH</a>, uint16_t max_len=BLE_ATT_ATTR_MAX_LEN)</td></tr>
|
|
<tr class="memdesc:aa801ed93f65e8cbc507c6ea6f4f49294"><td class="mdescLeft"> </td><td class="mdescRight">Default constructor. <br /></td></tr>
|
|
<tr class="separator:aa801ed93f65e8cbc507c6ea6f4f49294"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ad0bbdf17e7861cbb4bb2cadae9cbe32c" id="r_ad0bbdf17e7861cbb4bb2cadae9cbe32c"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_att_value.html#ad0bbdf17e7861cbb4bb2cadae9cbe32c">NimBLEAttValue</a> (const uint8_t *value, uint16_t len, uint16_t max_len=BLE_ATT_ATTR_MAX_LEN)</td></tr>
|
|
<tr class="memdesc:ad0bbdf17e7861cbb4bb2cadae9cbe32c"><td class="mdescLeft"> </td><td class="mdescRight">Construct with an initial value from a buffer. <br /></td></tr>
|
|
<tr class="separator:ad0bbdf17e7861cbb4bb2cadae9cbe32c"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a4322572d778438318f5750f6df5fdb35" id="r_a4322572d778438318f5750f6df5fdb35"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_att_value.html#a4322572d778438318f5750f6df5fdb35">NimBLEAttValue</a> (const char *value, uint16_t max_len=BLE_ATT_ATTR_MAX_LEN)</td></tr>
|
|
<tr class="memdesc:a4322572d778438318f5750f6df5fdb35"><td class="mdescLeft"> </td><td class="mdescRight">Construct with an initial value from a const char string. <br /></td></tr>
|
|
<tr class="separator:a4322572d778438318f5750f6df5fdb35"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a61813a898f1bfb1b00e670a7fbb413df" id="r_a61813a898f1bfb1b00e670a7fbb413df"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_att_value.html#a61813a898f1bfb1b00e670a7fbb413df">NimBLEAttValue</a> (std::initializer_list< uint8_t > list, uint16_t max_len=BLE_ATT_ATTR_MAX_LEN)</td></tr>
|
|
<tr class="memdesc:a61813a898f1bfb1b00e670a7fbb413df"><td class="mdescLeft"> </td><td class="mdescRight">Construct with an initializer list. <br /></td></tr>
|
|
<tr class="separator:a61813a898f1bfb1b00e670a7fbb413df"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a584cac329cd5d3c0a14aa855e6e6143e" id="r_a584cac329cd5d3c0a14aa855e6e6143e"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_att_value.html#a584cac329cd5d3c0a14aa855e6e6143e">NimBLEAttValue</a> (const std::string str, uint16_t max_len=BLE_ATT_ATTR_MAX_LEN)</td></tr>
|
|
<tr class="memdesc:a584cac329cd5d3c0a14aa855e6e6143e"><td class="mdescLeft"> </td><td class="mdescRight">Construct with an initial value from a std::string. <br /></td></tr>
|
|
<tr class="separator:a584cac329cd5d3c0a14aa855e6e6143e"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a03347eab1f3df449762902a4256d2b1c" id="r_a03347eab1f3df449762902a4256d2b1c"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_att_value.html#a03347eab1f3df449762902a4256d2b1c">NimBLEAttValue</a> (const std::vector< uint8_t > vec, uint16_t max_len=BLE_ATT_ATTR_MAX_LEN)</td></tr>
|
|
<tr class="memdesc:a03347eab1f3df449762902a4256d2b1c"><td class="mdescLeft"> </td><td class="mdescRight">Construct with an initial value from a std::vector<uint8_t>. <br /></td></tr>
|
|
<tr class="separator:a03347eab1f3df449762902a4256d2b1c"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a7473ad95c2240e0d1ce5c2d57f8914c2" id="r_a7473ad95c2240e0d1ce5c2d57f8914c2"><td class="memItemLeft" align="right" valign="top"><a id="a7473ad95c2240e0d1ce5c2d57f8914c2" name="a7473ad95c2240e0d1ce5c2d57f8914c2"></a>
|
|
 </td><td class="memItemRight" valign="bottom"><b>NimBLEAttValue</b> (const <a class="el" href="class_nim_b_l_e_att_value.html">NimBLEAttValue</a> &source)</td></tr>
|
|
<tr class="memdesc:a7473ad95c2240e0d1ce5c2d57f8914c2"><td class="mdescLeft"> </td><td class="mdescRight">Copy constructor. <br /></td></tr>
|
|
<tr class="separator:a7473ad95c2240e0d1ce5c2d57f8914c2"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a778d1da5334049292fdfba221bcd5772" id="r_a778d1da5334049292fdfba221bcd5772"><td class="memItemLeft" align="right" valign="top"><a id="a778d1da5334049292fdfba221bcd5772" name="a778d1da5334049292fdfba221bcd5772"></a>
|
|
 </td><td class="memItemRight" valign="bottom"><b>NimBLEAttValue</b> (<a class="el" href="class_nim_b_l_e_att_value.html">NimBLEAttValue</a> &&source)</td></tr>
|
|
<tr class="memdesc:a778d1da5334049292fdfba221bcd5772"><td class="mdescLeft"> </td><td class="mdescRight">Move constructor. <br /></td></tr>
|
|
<tr class="separator:a778d1da5334049292fdfba221bcd5772"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a08f3b04d05cf0c2b76a24cc37cd1f8ab" id="r_a08f3b04d05cf0c2b76a24cc37cd1f8ab"><td class="memItemLeft" align="right" valign="top"><a id="a08f3b04d05cf0c2b76a24cc37cd1f8ab" name="a08f3b04d05cf0c2b76a24cc37cd1f8ab"></a>
|
|
 </td><td class="memItemRight" valign="bottom"><b>~NimBLEAttValue</b> ()</td></tr>
|
|
<tr class="memdesc:a08f3b04d05cf0c2b76a24cc37cd1f8ab"><td class="mdescLeft"> </td><td class="mdescRight">Destructor. <br /></td></tr>
|
|
<tr class="separator:a08f3b04d05cf0c2b76a24cc37cd1f8ab"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ac7abc6cd08adb0b654e051d62af725d5" id="r_ac7abc6cd08adb0b654e051d62af725d5"><td class="memItemLeft" align="right" valign="top"><a id="ac7abc6cd08adb0b654e051d62af725d5" name="ac7abc6cd08adb0b654e051d62af725d5"></a>
|
|
uint16_t </td><td class="memItemRight" valign="bottom"><b>max_size</b> () const</td></tr>
|
|
<tr class="memdesc:ac7abc6cd08adb0b654e051d62af725d5"><td class="mdescLeft"> </td><td class="mdescRight">Returns the max size in bytes. <br /></td></tr>
|
|
<tr class="separator:ac7abc6cd08adb0b654e051d62af725d5"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a49a8a126d0b534c999c4a341cdcf7ba2" id="r_a49a8a126d0b534c999c4a341cdcf7ba2"><td class="memItemLeft" align="right" valign="top"><a id="a49a8a126d0b534c999c4a341cdcf7ba2" name="a49a8a126d0b534c999c4a341cdcf7ba2"></a>
|
|
uint16_t </td><td class="memItemRight" valign="bottom"><b>capacity</b> () const</td></tr>
|
|
<tr class="memdesc:a49a8a126d0b534c999c4a341cdcf7ba2"><td class="mdescLeft"> </td><td class="mdescRight">Returns the currently allocated capacity in bytes. <br /></td></tr>
|
|
<tr class="separator:a49a8a126d0b534c999c4a341cdcf7ba2"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a35df29c514613b1d00841abd6fffa320" id="r_a35df29c514613b1d00841abd6fffa320"><td class="memItemLeft" align="right" valign="top"><a id="a35df29c514613b1d00841abd6fffa320" name="a35df29c514613b1d00841abd6fffa320"></a>
|
|
uint16_t </td><td class="memItemRight" valign="bottom"><b>length</b> () const</td></tr>
|
|
<tr class="memdesc:a35df29c514613b1d00841abd6fffa320"><td class="mdescLeft"> </td><td class="mdescRight">Returns the current length of the value in bytes. <br /></td></tr>
|
|
<tr class="separator:a35df29c514613b1d00841abd6fffa320"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:aa8c75101d9898c3ff4646d84521ed61c" id="r_aa8c75101d9898c3ff4646d84521ed61c"><td class="memItemLeft" align="right" valign="top"><a id="aa8c75101d9898c3ff4646d84521ed61c" name="aa8c75101d9898c3ff4646d84521ed61c"></a>
|
|
uint16_t </td><td class="memItemRight" valign="bottom"><b>size</b> () const</td></tr>
|
|
<tr class="memdesc:aa8c75101d9898c3ff4646d84521ed61c"><td class="mdescLeft"> </td><td class="mdescRight">Returns the current size of the value in bytes. <br /></td></tr>
|
|
<tr class="separator:aa8c75101d9898c3ff4646d84521ed61c"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a86acbb5ab3a35b3d5692c2e05fdccadd" id="r_a86acbb5ab3a35b3d5692c2e05fdccadd"><td class="memItemLeft" align="right" valign="top"><a id="a86acbb5ab3a35b3d5692c2e05fdccadd" name="a86acbb5ab3a35b3d5692c2e05fdccadd"></a>
|
|
const uint8_t * </td><td class="memItemRight" valign="bottom"><b>data</b> () const</td></tr>
|
|
<tr class="memdesc:a86acbb5ab3a35b3d5692c2e05fdccadd"><td class="mdescLeft"> </td><td class="mdescRight">Returns a pointer to the internal buffer of the value. <br /></td></tr>
|
|
<tr class="separator:a86acbb5ab3a35b3d5692c2e05fdccadd"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a4d18b6e6839afc943f11200e76414c17" id="r_a4d18b6e6839afc943f11200e76414c17"><td class="memItemLeft" align="right" valign="top"><a id="a4d18b6e6839afc943f11200e76414c17" name="a4d18b6e6839afc943f11200e76414c17"></a>
|
|
const char * </td><td class="memItemRight" valign="bottom"><b>c_str</b> () const</td></tr>
|
|
<tr class="memdesc:a4d18b6e6839afc943f11200e76414c17"><td class="mdescLeft"> </td><td class="mdescRight">Returns a pointer to the internal buffer of the value as a const char*. <br /></td></tr>
|
|
<tr class="separator:a4d18b6e6839afc943f11200e76414c17"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:aec41d0fe983f8c4ded137d7d5017bcb7" id="r_aec41d0fe983f8c4ded137d7d5017bcb7"><td class="memItemLeft" align="right" valign="top"><a id="aec41d0fe983f8c4ded137d7d5017bcb7" name="aec41d0fe983f8c4ded137d7d5017bcb7"></a>
|
|
const uint8_t * </td><td class="memItemRight" valign="bottom"><b>begin</b> () const</td></tr>
|
|
<tr class="memdesc:aec41d0fe983f8c4ded137d7d5017bcb7"><td class="mdescLeft"> </td><td class="mdescRight">Iterator begin. <br /></td></tr>
|
|
<tr class="separator:aec41d0fe983f8c4ded137d7d5017bcb7"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a91cbe0ba44781943390a80514383ee58" id="r_a91cbe0ba44781943390a80514383ee58"><td class="memItemLeft" align="right" valign="top"><a id="a91cbe0ba44781943390a80514383ee58" name="a91cbe0ba44781943390a80514383ee58"></a>
|
|
const uint8_t * </td><td class="memItemRight" valign="bottom"><b>end</b> () const</td></tr>
|
|
<tr class="memdesc:a91cbe0ba44781943390a80514383ee58"><td class="mdescLeft"> </td><td class="mdescRight">Iterator end. <br /></td></tr>
|
|
<tr class="separator:a91cbe0ba44781943390a80514383ee58"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a5c8c5ecfa3864d45ea5b155385e3f9fa" id="r_a5c8c5ecfa3864d45ea5b155385e3f9fa"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_att_value.html#a5c8c5ecfa3864d45ea5b155385e3f9fa">setValue</a> (const uint8_t *value, uint16_t len)</td></tr>
|
|
<tr class="memdesc:a5c8c5ecfa3864d45ea5b155385e3f9fa"><td class="mdescLeft"> </td><td class="mdescRight">Set the value from a buffer. <br /></td></tr>
|
|
<tr class="separator:a5c8c5ecfa3864d45ea5b155385e3f9fa"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:aade512f55c6f962941aee7078677356b" id="r_aade512f55c6f962941aee7078677356b"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_att_value.html#aade512f55c6f962941aee7078677356b">setValue</a> (const char *s, uint16_t len=0)</td></tr>
|
|
<tr class="memdesc:aade512f55c6f962941aee7078677356b"><td class="mdescLeft"> </td><td class="mdescRight">Set value to the value of const char*. <br /></td></tr>
|
|
<tr class="separator:aade512f55c6f962941aee7078677356b"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:aa217dfc649daed50eb75c7168442f86e" id="r_aa217dfc649daed50eb75c7168442f86e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_nim_b_l_e_att_value.html">NimBLEAttValue</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_att_value.html#aa217dfc649daed50eb75c7168442f86e">append</a> (const uint8_t *value, uint16_t len)</td></tr>
|
|
<tr class="memdesc:aa217dfc649daed50eb75c7168442f86e"><td class="mdescLeft"> </td><td class="mdescRight">Append data to the value. <br /></td></tr>
|
|
<tr class="separator:aa217dfc649daed50eb75c7168442f86e"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a98da1765d9cfd2d93cdac2fb7a108a79" id="r_a98da1765d9cfd2d93cdac2fb7a108a79"><td class="memTemplParams" colspan="2">template<typename T > </td></tr>
|
|
<tr class="memitem:a98da1765d9cfd2d93cdac2fb7a108a79"><td class="memTemplItemLeft" align="right" valign="top">bool </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_att_value.html#a98da1765d9cfd2d93cdac2fb7a108a79">setValue</a> (const T &v)</td></tr>
|
|
<tr class="memdesc:a98da1765d9cfd2d93cdac2fb7a108a79"><td class="mdescLeft"> </td><td class="mdescRight">Template to set value to the value of <type>val. <br /></td></tr>
|
|
<tr class="separator:a98da1765d9cfd2d93cdac2fb7a108a79"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ac94a41f0c0d42d48b29d5b18d7ad7bd8" id="r_ac94a41f0c0d42d48b29d5b18d7ad7bd8"><td class="memTemplParams" colspan="2">template<typename T > </td></tr>
|
|
<tr class="memitem:ac94a41f0c0d42d48b29d5b18d7ad7bd8"><td class="memTemplItemLeft" align="right" valign="top">bool </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_att_value.html#ac94a41f0c0d42d48b29d5b18d7ad7bd8">setValue</a> (const T &s)</td></tr>
|
|
<tr class="memdesc:ac94a41f0c0d42d48b29d5b18d7ad7bd8"><td class="mdescLeft"> </td><td class="mdescRight">Template to set value to the value of <type>val. <br /></td></tr>
|
|
<tr class="separator:ac94a41f0c0d42d48b29d5b18d7ad7bd8"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a98da1765d9cfd2d93cdac2fb7a108a79" id="r_a98da1765d9cfd2d93cdac2fb7a108a79"><td class="memTemplParams" colspan="2">template<typename T > </td></tr>
|
|
<tr class="memitem:a98da1765d9cfd2d93cdac2fb7a108a79"><td class="memTemplItemLeft" align="right" valign="top">bool </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_att_value.html#a98da1765d9cfd2d93cdac2fb7a108a79">setValue</a> (const T &v)</td></tr>
|
|
<tr class="memdesc:a98da1765d9cfd2d93cdac2fb7a108a79"><td class="mdescLeft"> </td><td class="mdescRight">Template to set value to the value of <type>val. <br /></td></tr>
|
|
<tr class="separator:a98da1765d9cfd2d93cdac2fb7a108a79"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ab16b9901e6ff9374c7d2e1afa5aa4671" id="r_ab16b9901e6ff9374c7d2e1afa5aa4671"><td class="memTemplParams" colspan="2">template<typename T > </td></tr>
|
|
<tr class="memitem:ab16b9901e6ff9374c7d2e1afa5aa4671"><td class="memTemplItemLeft" align="right" valign="top">T </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_att_value.html#ab16b9901e6ff9374c7d2e1afa5aa4671">getValue</a> (time_t *timestamp=nullptr, bool skipSizeCheck=false) const</td></tr>
|
|
<tr class="memdesc:ab16b9901e6ff9374c7d2e1afa5aa4671"><td class="mdescLeft"> </td><td class="mdescRight">Template to return the value as a <type>. <br /></td></tr>
|
|
<tr class="separator:ab16b9901e6ff9374c7d2e1afa5aa4671"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a8ca8d07c06a79e30bf6279e6817e4881" id="r_a8ca8d07c06a79e30bf6279e6817e4881"><td class="memItemLeft" align="right" valign="top"><a id="a8ca8d07c06a79e30bf6279e6817e4881" name="a8ca8d07c06a79e30bf6279e6817e4881"></a>
|
|
uint8_t </td><td class="memItemRight" valign="bottom"><b>operator[]</b> (int pos) const</td></tr>
|
|
<tr class="memdesc:a8ca8d07c06a79e30bf6279e6817e4881"><td class="mdescLeft"> </td><td class="mdescRight">Subscript operator. <br /></td></tr>
|
|
<tr class="separator:a8ca8d07c06a79e30bf6279e6817e4881"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a3af3b6efb528b1063df2de409c64a0d6" id="r_a3af3b6efb528b1063df2de409c64a0d6"><td class="memItemLeft" align="right" valign="top"><a id="a3af3b6efb528b1063df2de409c64a0d6" name="a3af3b6efb528b1063df2de409c64a0d6"></a>
|
|
 </td><td class="memItemRight" valign="bottom"><b>operator std::vector< uint8_t ></b> () const</td></tr>
|
|
<tr class="memdesc:a3af3b6efb528b1063df2de409c64a0d6"><td class="mdescLeft"> </td><td class="mdescRight">Operator; Get the value as a std::vector<uint8_t>. <br /></td></tr>
|
|
<tr class="separator:a3af3b6efb528b1063df2de409c64a0d6"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a5edd484c83c5efa62916add8927a6371" id="r_a5edd484c83c5efa62916add8927a6371"><td class="memItemLeft" align="right" valign="top"><a id="a5edd484c83c5efa62916add8927a6371" name="a5edd484c83c5efa62916add8927a6371"></a>
|
|
 </td><td class="memItemRight" valign="bottom"><b>operator std::string</b> () const</td></tr>
|
|
<tr class="memdesc:a5edd484c83c5efa62916add8927a6371"><td class="mdescLeft"> </td><td class="mdescRight">Operator; Get the value as a std::string. <br /></td></tr>
|
|
<tr class="separator:a5edd484c83c5efa62916add8927a6371"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a3aa926c56cd58146a5b1c6e02c97894b" id="r_a3aa926c56cd58146a5b1c6e02c97894b"><td class="memItemLeft" align="right" valign="top"><a id="a3aa926c56cd58146a5b1c6e02c97894b" name="a3aa926c56cd58146a5b1c6e02c97894b"></a>
|
|
 </td><td class="memItemRight" valign="bottom"><b>operator const uint8_t *</b> () const</td></tr>
|
|
<tr class="memdesc:a3aa926c56cd58146a5b1c6e02c97894b"><td class="mdescLeft"> </td><td class="mdescRight">Operator; Get the value as a const uint8_t*. <br /></td></tr>
|
|
<tr class="separator:a3aa926c56cd58146a5b1c6e02c97894b"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a643f989881afd01a25f9d102421c36ec" id="r_a643f989881afd01a25f9d102421c36ec"><td class="memItemLeft" align="right" valign="top"><a id="a643f989881afd01a25f9d102421c36ec" name="a643f989881afd01a25f9d102421c36ec"></a>
|
|
<a class="el" href="class_nim_b_l_e_att_value.html">NimBLEAttValue</a> & </td><td class="memItemRight" valign="bottom"><b>operator+=</b> (const <a class="el" href="class_nim_b_l_e_att_value.html">NimBLEAttValue</a> &source)</td></tr>
|
|
<tr class="memdesc:a643f989881afd01a25f9d102421c36ec"><td class="mdescLeft"> </td><td class="mdescRight">Operator; Append another <a class="el" href="class_nim_b_l_e_att_value.html" title="A specialized container class to hold BLE attribute values.">NimBLEAttValue</a>. <br /></td></tr>
|
|
<tr class="separator:a643f989881afd01a25f9d102421c36ec"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:add319bc80a9a7569f42c8568879c8be9" id="r_add319bc80a9a7569f42c8568879c8be9"><td class="memItemLeft" align="right" valign="top"><a id="add319bc80a9a7569f42c8568879c8be9" name="add319bc80a9a7569f42c8568879c8be9"></a>
|
|
<a class="el" href="class_nim_b_l_e_att_value.html">NimBLEAttValue</a> & </td><td class="memItemRight" valign="bottom"><b>operator=</b> (const std::string &source)</td></tr>
|
|
<tr class="memdesc:add319bc80a9a7569f42c8568879c8be9"><td class="mdescLeft"> </td><td class="mdescRight">Operator; Set the value from a std::string source. <br /></td></tr>
|
|
<tr class="separator:add319bc80a9a7569f42c8568879c8be9"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a47d30a61ba65f5d9a21fa593cf15d4b9" id="r_a47d30a61ba65f5d9a21fa593cf15d4b9"><td class="memItemLeft" align="right" valign="top"><a id="a47d30a61ba65f5d9a21fa593cf15d4b9" name="a47d30a61ba65f5d9a21fa593cf15d4b9"></a>
|
|
<a class="el" href="class_nim_b_l_e_att_value.html">NimBLEAttValue</a> & </td><td class="memItemRight" valign="bottom"><b>operator=</b> (<a class="el" href="class_nim_b_l_e_att_value.html">NimBLEAttValue</a> &&source)</td></tr>
|
|
<tr class="memdesc:a47d30a61ba65f5d9a21fa593cf15d4b9"><td class="mdescLeft"> </td><td class="mdescRight">Move assignment operator. <br /></td></tr>
|
|
<tr class="separator:a47d30a61ba65f5d9a21fa593cf15d4b9"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:aa53ee00be956c25596cf7cce71b502ba" id="r_aa53ee00be956c25596cf7cce71b502ba"><td class="memItemLeft" align="right" valign="top"><a id="aa53ee00be956c25596cf7cce71b502ba" name="aa53ee00be956c25596cf7cce71b502ba"></a>
|
|
<a class="el" href="class_nim_b_l_e_att_value.html">NimBLEAttValue</a> & </td><td class="memItemRight" valign="bottom"><b>operator=</b> (const <a class="el" href="class_nim_b_l_e_att_value.html">NimBLEAttValue</a> &source)</td></tr>
|
|
<tr class="memdesc:aa53ee00be956c25596cf7cce71b502ba"><td class="mdescLeft"> </td><td class="mdescRight">Copy assignment operator. <br /></td></tr>
|
|
<tr class="separator:aa53ee00be956c25596cf7cce71b502ba"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ad01c8ae4ce617b5ed31733ac245b2e91" id="r_ad01c8ae4ce617b5ed31733ac245b2e91"><td class="memItemLeft" align="right" valign="top"><a id="ad01c8ae4ce617b5ed31733ac245b2e91" name="ad01c8ae4ce617b5ed31733ac245b2e91"></a>
|
|
bool </td><td class="memItemRight" valign="bottom"><b>operator==</b> (const <a class="el" href="class_nim_b_l_e_att_value.html">NimBLEAttValue</a> &source) const</td></tr>
|
|
<tr class="memdesc:ad01c8ae4ce617b5ed31733ac245b2e91"><td class="mdescLeft"> </td><td class="mdescRight">Equality operator. <br /></td></tr>
|
|
<tr class="separator:ad01c8ae4ce617b5ed31733ac245b2e91"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:afda6ab2bce142146bad453249bd0dc43" id="r_afda6ab2bce142146bad453249bd0dc43"><td class="memItemLeft" align="right" valign="top"><a id="afda6ab2bce142146bad453249bd0dc43" name="afda6ab2bce142146bad453249bd0dc43"></a>
|
|
bool </td><td class="memItemRight" valign="bottom"><b>operator!=</b> (const <a class="el" href="class_nim_b_l_e_att_value.html">NimBLEAttValue</a> &source) const</td></tr>
|
|
<tr class="memdesc:afda6ab2bce142146bad453249bd0dc43"><td class="mdescLeft"> </td><td class="mdescRight">Inequality operator. <br /></td></tr>
|
|
<tr class="separator:afda6ab2bce142146bad453249bd0dc43"><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 specialized container class to hold BLE attribute values. </p>
|
|
<p>This class is designed to be more memory efficient than using<br />
|
|
standard container types for value storage, while being convertible to<br />
|
|
many different container classes. </p>
|
|
</div><h2 class="groupheader">Constructor & Destructor Documentation</h2>
|
|
<a id="aa801ed93f65e8cbc507c6ea6f4f49294" name="aa801ed93f65e8cbc507c6ea6f4f49294"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#aa801ed93f65e8cbc507c6ea6f4f49294">◆ </a></span>NimBLEAttValue() <span class="overload">[1/6]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">NimBLEAttValue::NimBLEAttValue </td>
|
|
<td>(</td>
|
|
<td class="paramtype">uint16_t </td>
|
|
<td class="paramname"><em>init_len</em> = <code><a class="el" href="nimconfig_8h.html#a4d4ea715325f75455b43c7dbaa69d7a0">CONFIG_NIMBLE_CPP_ATT_VALUE_INIT_LENGTH</a></code>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">uint16_t </td>
|
|
<td class="paramname"><em>max_len</em> = <code>BLE_ATT_ATTR_MAX_LEN</code> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Default constructor. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">init_len</td><td>The initial size in bytes. </td></tr>
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">max_len</td><td>The max size in bytes that the value can be. </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="ad0bbdf17e7861cbb4bb2cadae9cbe32c" name="ad0bbdf17e7861cbb4bb2cadae9cbe32c"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ad0bbdf17e7861cbb4bb2cadae9cbe32c">◆ </a></span>NimBLEAttValue() <span class="overload">[2/6]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">NimBLEAttValue::NimBLEAttValue </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const uint8_t * </td>
|
|
<td class="paramname"><em>value</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">uint16_t </td>
|
|
<td class="paramname"><em>len</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">uint16_t </td>
|
|
<td class="paramname"><em>max_len</em> = <code>BLE_ATT_ATTR_MAX_LEN</code> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Construct with an initial value from a buffer. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir"></td><td class="paramname">value</td><td>A pointer to the initial value to set. </td></tr>
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">len</td><td>The size in bytes of the value to set. </td></tr>
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">max_len</td><td>The max size in bytes that the value can be. </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a4322572d778438318f5750f6df5fdb35" name="a4322572d778438318f5750f6df5fdb35"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a4322572d778438318f5750f6df5fdb35">◆ </a></span>NimBLEAttValue() <span class="overload">[3/6]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">NimBLEAttValue::NimBLEAttValue </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const char * </td>
|
|
<td class="paramname"><em>value</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">uint16_t </td>
|
|
<td class="paramname"><em>max_len</em> = <code>BLE_ATT_ATTR_MAX_LEN</code> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Construct with an initial value from a const char string. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir"></td><td class="paramname">value</td><td>A pointer to the initial value to set. </td></tr>
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">max_len</td><td>The max size in bytes that the value can be. </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a61813a898f1bfb1b00e670a7fbb413df" name="a61813a898f1bfb1b00e670a7fbb413df"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a61813a898f1bfb1b00e670a7fbb413df">◆ </a></span>NimBLEAttValue() <span class="overload">[4/6]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">NimBLEAttValue::NimBLEAttValue </td>
|
|
<td>(</td>
|
|
<td class="paramtype">std::initializer_list< uint8_t > </td>
|
|
<td class="paramname"><em>list</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">uint16_t </td>
|
|
<td class="paramname"><em>max_len</em> = <code>BLE_ATT_ATTR_MAX_LEN</code> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Construct with an initializer list. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir"></td><td class="paramname">list</td><td>An initializer list containing the initial value to set. </td></tr>
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">max_len</td><td>The max size in bytes that the value can be. </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a584cac329cd5d3c0a14aa855e6e6143e" name="a584cac329cd5d3c0a14aa855e6e6143e"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a584cac329cd5d3c0a14aa855e6e6143e">◆ </a></span>NimBLEAttValue() <span class="overload">[5/6]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">NimBLEAttValue::NimBLEAttValue </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const std::string </td>
|
|
<td class="paramname"><em>str</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">uint16_t </td>
|
|
<td class="paramname"><em>max_len</em> = <code>BLE_ATT_ATTR_MAX_LEN</code> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Construct with an initial value from a std::string. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir"></td><td class="paramname">str</td><td>A std::string containing to the initial value to set. </td></tr>
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">max_len</td><td>The max size in bytes that the value can be. </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a03347eab1f3df449762902a4256d2b1c" name="a03347eab1f3df449762902a4256d2b1c"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a03347eab1f3df449762902a4256d2b1c">◆ </a></span>NimBLEAttValue() <span class="overload">[6/6]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">NimBLEAttValue::NimBLEAttValue </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const std::vector< uint8_t > </td>
|
|
<td class="paramname"><em>vec</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">uint16_t </td>
|
|
<td class="paramname"><em>max_len</em> = <code>BLE_ATT_ATTR_MAX_LEN</code> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Construct with an initial value from a std::vector<uint8_t>. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir"></td><td class="paramname">vec</td><td>A std::vector<uint8_t> containing to the initial value to set. </td></tr>
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">max_len</td><td>The max size in bytes that the value can be. </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
|
|
</div>
|
|
</div>
|
|
<h2 class="groupheader">Member Function Documentation</h2>
|
|
<a id="aa217dfc649daed50eb75c7168442f86e" name="aa217dfc649daed50eb75c7168442f86e"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#aa217dfc649daed50eb75c7168442f86e">◆ </a></span>append()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="class_nim_b_l_e_att_value.html">NimBLEAttValue</a> & NimBLEAttValue::append </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const uint8_t * </td>
|
|
<td class="paramname"><em>value</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">uint16_t </td>
|
|
<td class="paramname"><em>len</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Append data to the value. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">value</td><td>A ponter to a data buffer with the value to append. </td></tr>
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">len</td><td>The length of the value to append in bytes. </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>A reference to the appended <a class="el" href="class_nim_b_l_e_att_value.html" title="A specialized container class to hold BLE attribute values.">NimBLEAttValue</a>. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="ab16b9901e6ff9374c7d2e1afa5aa4671" name="ab16b9901e6ff9374c7d2e1afa5aa4671"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ab16b9901e6ff9374c7d2e1afa5aa4671">◆ </a></span>getValue()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<div class="memtemplate">
|
|
template<typename T > </div>
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">T NimBLEAttValue::getValue </td>
|
|
<td>(</td>
|
|
<td class="paramtype">time_t * </td>
|
|
<td class="paramname"><em>timestamp</em> = <code>nullptr</code>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">bool </td>
|
|
<td class="paramname"><em>skipSizeCheck</em> = <code>false</code> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td> const</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Template to return the value as a <type>. </p>
|
|
<dl class="tparams"><dt>Template Parameters</dt><dd>
|
|
<table class="tparams">
|
|
<tr><td class="paramname">T</td><td>The type to convert the data to. </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">timestamp</td><td>A pointer to a time_t struct to store the time the value was read. </td></tr>
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">skipSizeCheck</td><td>If true it will skip checking if the data size is less than<br />
|
|
<code>sizeof(<type>)</code>. </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>The data converted to <type> or NULL if skipSizeCheck is false and the data is<br />
|
|
less than <code>sizeof(<type>)</code>.</dd></dl>
|
|
<p><b>Use:</b> <code>getValue<type>(&timestamp, skipSizeCheck);</code> </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="aade512f55c6f962941aee7078677356b" name="aade512f55c6f962941aee7078677356b"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#aade512f55c6f962941aee7078677356b">◆ </a></span>setValue() <span class="overload">[1/5]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">bool NimBLEAttValue::setValue </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const char * </td>
|
|
<td class="paramname"><em>s</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">uint16_t </td>
|
|
<td class="paramname"><em>len</em> = <code>0</code> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Set value to the value of const char*. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">s</td><td>A pointer to a const char value to set. </td></tr>
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">len</td><td>The length of the value in bytes, defaults to strlen(s). </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="ac94a41f0c0d42d48b29d5b18d7ad7bd8" name="ac94a41f0c0d42d48b29d5b18d7ad7bd8"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ac94a41f0c0d42d48b29d5b18d7ad7bd8">◆ </a></span>setValue() <span class="overload">[2/5]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<div class="memtemplate">
|
|
template<typename T > </div>
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">bool NimBLEAttValue::setValue </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const T & </td>
|
|
<td class="paramname"><em>s</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Template to set value to the value of <type>val. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">s</td><td>The <type>value to set.</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<p>Only used if the <type> has a <code><a class="el" href="class_nim_b_l_e_att_value.html#a4d18b6e6839afc943f11200e76414c17" title="Returns a pointer to the internal buffer of the value as a const char*.">c_str()</a></code> method. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a98da1765d9cfd2d93cdac2fb7a108a79" name="a98da1765d9cfd2d93cdac2fb7a108a79"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a98da1765d9cfd2d93cdac2fb7a108a79">◆ </a></span>setValue() <span class="overload">[3/5]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<div class="memtemplate">
|
|
template<typename T > </div>
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">bool NimBLEAttValue::setValue </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const T & </td>
|
|
<td class="paramname"><em>v</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Template to set value to the value of <type>val. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">v</td><td>The <type>value to set.</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<p>Only used for types without a <code><a class="el" href="class_nim_b_l_e_att_value.html#a4d18b6e6839afc943f11200e76414c17" title="Returns a pointer to the internal buffer of the value as a const char*.">c_str()</a></code> and <code><a class="el" href="class_nim_b_l_e_att_value.html#a35df29c514613b1d00841abd6fffa320" title="Returns the current length of the value in bytes.">length()</a></code> or <code><a class="el" href="class_nim_b_l_e_att_value.html#a86acbb5ab3a35b3d5692c2e05fdccadd" title="Returns a pointer to the internal buffer of the value.">data()</a></code> and <code><a class="el" href="class_nim_b_l_e_att_value.html#aa8c75101d9898c3ff4646d84521ed61c" title="Returns the current size of the value in bytes.">size()</a></code> method. <type> size must be evaluatable by <code>sizeof()</code>. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a98da1765d9cfd2d93cdac2fb7a108a79" name="a98da1765d9cfd2d93cdac2fb7a108a79"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a98da1765d9cfd2d93cdac2fb7a108a79">◆ </a></span>setValue() <span class="overload">[4/5]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<div class="memtemplate">
|
|
template<typename T > </div>
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">bool NimBLEAttValue::setValue </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const T & </td>
|
|
<td class="paramname"><em>v</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Template to set value to the value of <type>val. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">v</td><td>The <type>value to set.</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<p>Only used if the <type> has a <code><a class="el" href="class_nim_b_l_e_att_value.html#a86acbb5ab3a35b3d5692c2e05fdccadd" title="Returns a pointer to the internal buffer of the value.">data()</a></code> and <code><a class="el" href="class_nim_b_l_e_att_value.html#aa8c75101d9898c3ff4646d84521ed61c" title="Returns the current size of the value in bytes.">size()</a></code> method. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a5c8c5ecfa3864d45ea5b155385e3f9fa" name="a5c8c5ecfa3864d45ea5b155385e3f9fa"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a5c8c5ecfa3864d45ea5b155385e3f9fa">◆ </a></span>setValue() <span class="overload">[5/5]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">bool NimBLEAttValue::setValue </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const uint8_t * </td>
|
|
<td class="paramname"><em>value</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">uint16_t </td>
|
|
<td class="paramname"><em>len</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Set the value from a buffer. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">value</td><td>A pointer to a buffer containing the value. </td></tr>
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">len</td><td>The length of the value in bytes. </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>True if successful. </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_att_value.html">NimBLEAttValue</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>
|