mirror of
https://github.com/h2zero/esp-nimble-cpp.git
synced 2024-12-26 04:30:46 +01:00
253 lines
40 KiB
HTML
253 lines
40 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: /github/workspace/src/NimBLEAdvertising.h Source File</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.1</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>
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
|
$(document).ready(function() { init_codefold(0); });
|
|
/* @license-end */
|
|
</script>
|
|
</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('_nim_b_l_e_advertising_8h_source.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="headertitle"><div class="title">NimBLEAdvertising.h</div></div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
<div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span><span class="comment">/*</span></div>
|
|
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno"> 2</span><span class="comment"> * Copyright 2020-2024 Ryan Powell <ryan@nable-embedded.io> and</span></div>
|
|
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno"> 3</span><span class="comment"> * esp-nimble-cpp, NimBLE-Arduino contributors.</span></div>
|
|
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span><span class="comment"> *</span></div>
|
|
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span><span class="comment"> * Licensed under the Apache License, Version 2.0 (the "License");</span></div>
|
|
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span><span class="comment"> * you may not use this file except in compliance with the License.</span></div>
|
|
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span><span class="comment"> * You may obtain a copy of the License at</span></div>
|
|
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span><span class="comment"> *</span></div>
|
|
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span><span class="comment"> * http://www.apache.org/licenses/LICENSE-2.0</span></div>
|
|
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span><span class="comment"> *</span></div>
|
|
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span><span class="comment"> * Unless required by applicable law or agreed to in writing, software</span></div>
|
|
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span><span class="comment"> * distributed under the License is distributed on an "AS IS" BASIS,</span></div>
|
|
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span><span class="comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span></div>
|
|
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span><span class="comment"> * See the License for the specific language governing permissions and</span></div>
|
|
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span><span class="comment"> * limitations under the License.</span></div>
|
|
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span><span class="comment"> */</span></div>
|
|
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span> </div>
|
|
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span><span class="preprocessor">#ifndef NIMBLE_CPP_ADVERTISING_H_</span></div>
|
|
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span><span class="preprocessor">#define NIMBLE_CPP_ADVERTISING_H_</span></div>
|
|
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span> </div>
|
|
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span><span class="preprocessor">#include "<a class="code" href="nimconfig_8h.html">nimconfig.h</a>"</span></div>
|
|
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span><span class="preprocessor">#if (defined(CONFIG_BT_ENABLED) && defined(CONFIG_BT_NIMBLE_ROLE_BROADCASTER) && !CONFIG_BT_NIMBLE_EXT_ADV) || \</span></div>
|
|
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span><span class="preprocessor"> defined(_DOXYGEN_)</span></div>
|
|
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span> </div>
|
|
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span><span class="preprocessor"># if defined(CONFIG_NIMBLE_CPP_IDF)</span></div>
|
|
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span><span class="preprocessor"># include "host/ble_gap.h"</span></div>
|
|
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span><span class="preprocessor"># else</span></div>
|
|
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span><span class="preprocessor"># include "nimble/nimble/host/include/host/ble_gap.h"</span></div>
|
|
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span><span class="preprocessor"># endif</span></div>
|
|
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> </div>
|
|
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span><span class="comment">/**** FIX COMPILATION ****/</span></div>
|
|
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span><span class="preprocessor"># undef min</span></div>
|
|
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span><span class="preprocessor"># undef max</span></div>
|
|
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span><span class="comment">/**************************/</span></div>
|
|
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span> </div>
|
|
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span><span class="preprocessor"># include "NimBLEUUID.h"</span></div>
|
|
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span><span class="preprocessor"># include "NimBLEAddress.h"</span></div>
|
|
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span><span class="preprocessor"># include "NimBLEAdvertisementData.h"</span></div>
|
|
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span> </div>
|
|
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span><span class="preprocessor"># include <functional></span></div>
|
|
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span><span class="preprocessor"># include <string></span></div>
|
|
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span><span class="preprocessor"># include <vector></span></div>
|
|
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span> </div>
|
|
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span><span class="keyword">class </span><a class="code hl_class" href="class_nim_b_l_e_advertising.html">NimBLEAdvertising</a>;</div>
|
|
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span><span class="keyword">typedef</span> std::function<void(<a class="code hl_class" href="class_nim_b_l_e_advertising.html">NimBLEAdvertising</a>*)> advCompleteCB_t;</div>
|
|
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span> </div>
|
|
<div class="foldopen" id="foldopen00052" data-start="{" data-end="};">
|
|
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"><a class="line" href="class_nim_b_l_e_advertising.html"> 52</a></span><span class="keyword">class </span><a class="code hl_class" href="class_nim_b_l_e_advertising.html">NimBLEAdvertising</a> {</div>
|
|
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> <span class="keyword">public</span>:</div>
|
|
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> <a class="code hl_function" href="class_nim_b_l_e_advertising.html#abe6258a917243a4567c3d6eece2ddcdd">NimBLEAdvertising</a>();</div>
|
|
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="class_nim_b_l_e_advertising.html#a8a5c880ee36fd44e0c72c14c47c8e15e">start</a>(uint32_t duration = 0, <span class="keyword">const</span> <a class="code hl_class" href="class_nim_b_l_e_address.html">NimBLEAddress</a>* dirAddr = <span class="keyword">nullptr</span>);</div>
|
|
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span> <span class="keywordtype">void</span> <a class="code hl_function" href="class_nim_b_l_e_advertising.html#a3e81d7d3aa2b72b8db58427d4a42727b">setAdvertisingCompleteCallback</a>(advCompleteCB_t callback);</div>
|
|
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="class_nim_b_l_e_advertising.html#a3ab772936ace18c9a7e509740aa59800">stop</a>();</div>
|
|
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="class_nim_b_l_e_advertising.html#ae49d2bd91cabca46ec7c4bbd7fc49407">setConnectableMode</a>(uint8_t mode);</div>
|
|
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="class_nim_b_l_e_advertising.html#a710eacfc97ecea1bf9a9a3569c58d410">setDiscoverableMode</a>(uint8_t mode);</div>
|
|
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="class_nim_b_l_e_advertising.html#a91cde5680de36840fc18f6fd76665af7">reset</a>();</div>
|
|
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="class_nim_b_l_e_advertising.html#ac257ab68520a244cb6494d793f9b6c2a">isAdvertising</a>();</div>
|
|
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span> <span class="keywordtype">void</span> <a class="code hl_function" href="class_nim_b_l_e_advertising.html#aa3da80c7d17a7824484ee254076e4790">setScanFilter</a>(<span class="keywordtype">bool</span> scanRequestWhitelistOnly, <span class="keywordtype">bool</span> connectWhitelistOnly);</div>
|
|
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span> <span class="keywordtype">void</span> <a class="code hl_function" href="class_nim_b_l_e_advertising.html#a6badd669ddf4ff8507561d5041d093d6">enableScanResponse</a>(<span class="keywordtype">bool</span> enable);</div>
|
|
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span> <span class="keywordtype">void</span> <a class="code hl_function" href="class_nim_b_l_e_advertising.html#a28c082bb540325ada66b4e203ae6998a">setAdvertisingInterval</a>(uint16_t interval);</div>
|
|
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span> <span class="keywordtype">void</span> <a class="code hl_function" href="class_nim_b_l_e_advertising.html#a97bf63603b9aabdf0a5284269dfc5549">setMaxInterval</a>(uint16_t maxInterval);</div>
|
|
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> <span class="keywordtype">void</span> <a class="code hl_function" href="class_nim_b_l_e_advertising.html#a6b5be947a5e188d512e3338d36a039cb">setMinInterval</a>(uint16_t minInterval);</div>
|
|
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> </div>
|
|
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="class_nim_b_l_e_advertising.html#ab8afd94479ebac3996fa3712d3d92325">setAdvertisementData</a>(<span class="keyword">const</span> <a class="code hl_class" href="class_nim_b_l_e_advertisement_data.html">NimBLEAdvertisementData</a>& advertisementData);</div>
|
|
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="class_nim_b_l_e_advertising.html#a97798e6d9d7721eb588c5e67d54e97ef">setScanResponseData</a>(<span class="keyword">const</span> <a class="code hl_class" href="class_nim_b_l_e_advertisement_data.html">NimBLEAdvertisementData</a>& advertisementData);</div>
|
|
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span> <span class="keyword">const</span> <a class="code hl_class" href="class_nim_b_l_e_advertisement_data.html">NimBLEAdvertisementData</a>& <a class="code hl_function" href="class_nim_b_l_e_advertising.html#a1e23657839038e5219f9c009cf360a32">getAdvertisementData</a>();</div>
|
|
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span> <span class="keyword">const</span> <a class="code hl_class" href="class_nim_b_l_e_advertisement_data.html">NimBLEAdvertisementData</a>& <a class="code hl_function" href="class_nim_b_l_e_advertising.html#ae0e7d64d51882830750bcb87e2d9678c">getScanData</a>();</div>
|
|
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span> <span class="keywordtype">void</span> <a class="code hl_function" href="class_nim_b_l_e_advertising.html#af7cee42f24ad38872936a0bbc9e2ac1e">clearData</a>();</div>
|
|
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="class_nim_b_l_e_advertising.html#ad899be16fa054a01908692a504af9832">refreshAdvertisingData</a>();</div>
|
|
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span> </div>
|
|
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="class_nim_b_l_e_advertising.html#a67c9589dff7e0ee3ec24f2c930d56c06">addServiceUUID</a>(<span class="keyword">const</span> <a class="code hl_class" href="class_nim_b_l_e_u_u_i_d.html">NimBLEUUID</a>& serviceUUID);</div>
|
|
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="class_nim_b_l_e_advertising.html#a67c9589dff7e0ee3ec24f2c930d56c06">addServiceUUID</a>(<span class="keyword">const</span> <span class="keywordtype">char</span>* serviceUUID);</div>
|
|
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="class_nim_b_l_e_advertising.html#aba383012133dd694f56cf86966b2d80a">removeServiceUUID</a>(<span class="keyword">const</span> <a class="code hl_class" href="class_nim_b_l_e_u_u_i_d.html">NimBLEUUID</a>& serviceUUID);</div>
|
|
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="class_nim_b_l_e_advertising.html#aba383012133dd694f56cf86966b2d80a">removeServiceUUID</a>(<span class="keyword">const</span> <span class="keywordtype">char</span>* serviceUUID);</div>
|
|
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="class_nim_b_l_e_advertising.html#ad159c2e2a65d9bc7dcc5babed146936d">removeServices</a>();</div>
|
|
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="class_nim_b_l_e_advertising.html#a1f4e1ae9552400fb2bb3cd73b2a483b0">setAppearance</a>(uint16_t appearance);</div>
|
|
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="class_nim_b_l_e_advertising.html#a9dbb66ca66aa040731fcfd737f881469">setPreferredParams</a>(uint16_t minInterval, uint16_t maxInterval);</div>
|
|
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"> 82</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="class_nim_b_l_e_advertising.html#a0d3c5cb3a93416a4206abb1f8e443ebf">addTxPower</a>();</div>
|
|
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"> 83</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="class_nim_b_l_e_advertising.html#a7fb4b74eb7acb1f46e57ff772baccd88">setName</a>(<span class="keyword">const</span> std::string& name);</div>
|
|
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="class_nim_b_l_e_advertising.html#ac433e3458ac5259ae21c4bdbd1198781">setManufacturerData</a>(<span class="keyword">const</span> uint8_t* data, <span class="keywordtype">size_t</span> length);</div>
|
|
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="class_nim_b_l_e_advertising.html#ac433e3458ac5259ae21c4bdbd1198781">setManufacturerData</a>(<span class="keyword">const</span> std::string& data);</div>
|
|
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"> 86</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="class_nim_b_l_e_advertising.html#ac433e3458ac5259ae21c4bdbd1198781">setManufacturerData</a>(<span class="keyword">const</span> std::vector<uint8_t>& data);</div>
|
|
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"> 87</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="class_nim_b_l_e_advertising.html#a9fe23a52ac3f699095d84d2ba8f90c28">setURI</a>(<span class="keyword">const</span> std::string& uri);</div>
|
|
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"> 88</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="class_nim_b_l_e_advertising.html#a815faed49fb4f29337fda94bd39c0bbc">setServiceData</a>(<span class="keyword">const</span> <a class="code hl_class" href="class_nim_b_l_e_u_u_i_d.html">NimBLEUUID</a>& uuid, <span class="keyword">const</span> uint8_t* data, <span class="keywordtype">size_t</span> length);</div>
|
|
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno"> 89</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="class_nim_b_l_e_advertising.html#a815faed49fb4f29337fda94bd39c0bbc">setServiceData</a>(<span class="keyword">const</span> <a class="code hl_class" href="class_nim_b_l_e_u_u_i_d.html">NimBLEUUID</a>& uuid, <span class="keyword">const</span> std::string& data);</div>
|
|
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="class_nim_b_l_e_advertising.html#a815faed49fb4f29337fda94bd39c0bbc">setServiceData</a>(<span class="keyword">const</span> <a class="code hl_class" href="class_nim_b_l_e_u_u_i_d.html">NimBLEUUID</a>& uuid, <span class="keyword">const</span> std::vector<uint8_t>& data);</div>
|
|
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno"> 91</span> </div>
|
|
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"> 92</span> <span class="keyword">private</span>:</div>
|
|
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno"> 93</span> <span class="keyword">friend</span> <span class="keyword">class </span><a class="code hl_class" href="class_nim_b_l_e_device.html">NimBLEDevice</a>;</div>
|
|
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno"> 94</span> <span class="keyword">friend</span> <span class="keyword">class </span><a class="code hl_class" href="class_nim_b_l_e_server.html">NimBLEServer</a>;</div>
|
|
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno"> 95</span> </div>
|
|
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"> 96</span> <span class="keywordtype">void</span> onHostSync();</div>
|
|
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"> 97</span> <span class="keyword">static</span> <span class="keywordtype">int</span> handleGapEvent(ble_gap_event* event, <span class="keywordtype">void</span>* arg);</div>
|
|
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span> </div>
|
|
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"> 99</span> <a class="code hl_class" href="class_nim_b_l_e_advertisement_data.html">NimBLEAdvertisementData</a> m_advData;</div>
|
|
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"> 100</span> <a class="code hl_class" href="class_nim_b_l_e_advertisement_data.html">NimBLEAdvertisementData</a> m_scanData;</div>
|
|
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno"> 101</span> ble_gap_adv_params m_advParams;</div>
|
|
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno"> 102</span> advCompleteCB_t m_advCompCb;</div>
|
|
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno"> 103</span> uint8_t m_slaveItvl[4];</div>
|
|
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno"> 104</span> uint32_t m_duration;</div>
|
|
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno"> 105</span> <span class="keywordtype">bool</span> m_scanResp : 1;</div>
|
|
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno"> 106</span> <span class="keywordtype">bool</span> m_advDataSet : 1;</div>
|
|
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno"> 107</span>};</div>
|
|
</div>
|
|
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno"> 108</span> </div>
|
|
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno"> 109</span><span class="preprocessor">#endif </span><span class="comment">/* CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_BROADCASTER && !CONFIG_BT_NIMBLE_EXT_ADV */</span><span class="preprocessor"></span></div>
|
|
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno"> 110</span><span class="preprocessor">#endif </span><span class="comment">/* NIMBLE_CPP_ADVERTISING_H_ */</span><span class="preprocessor"></span></div>
|
|
<div class="ttc" id="aclass_nim_b_l_e_address_html"><div class="ttname"><a href="class_nim_b_l_e_address.html">NimBLEAddress</a></div><div class="ttdoc">A BLE device address.</div><div class="ttdef"><b>Definition</b> NimBLEAddress.h:41</div></div>
|
|
<div class="ttc" id="aclass_nim_b_l_e_advertisement_data_html"><div class="ttname"><a href="class_nim_b_l_e_advertisement_data.html">NimBLEAdvertisementData</a></div><div class="ttdoc">Advertisement data set by the programmer to be published by the BLE server.</div><div class="ttdef"><b>Definition</b> NimBLEAdvertisementData.h:33</div></div>
|
|
<div class="ttc" id="aclass_nim_b_l_e_advertising_html"><div class="ttname"><a href="class_nim_b_l_e_advertising.html">NimBLEAdvertising</a></div><div class="ttdoc">Perform and manage BLE advertising.</div><div class="ttdef"><b>Definition</b> NimBLEAdvertising.h:52</div></div>
|
|
<div class="ttc" id="aclass_nim_b_l_e_advertising_html_a0d3c5cb3a93416a4206abb1f8e443ebf"><div class="ttname"><a href="class_nim_b_l_e_advertising.html#a0d3c5cb3a93416a4206abb1f8e443ebf">NimBLEAdvertising::addTxPower</a></div><div class="ttdeci">bool addTxPower()</div><div class="ttdoc">Add the transmission power level to the advertisement packet.</div><div class="ttdef"><b>Definition</b> NimBLEAdvertising.cpp:501</div></div>
|
|
<div class="ttc" id="aclass_nim_b_l_e_advertising_html_a1e23657839038e5219f9c009cf360a32"><div class="ttname"><a href="class_nim_b_l_e_advertising.html#a1e23657839038e5219f9c009cf360a32">NimBLEAdvertising::getAdvertisementData</a></div><div class="ttdeci">const NimBLEAdvertisementData & getAdvertisementData()</div><div class="ttdoc">Get the current advertisement data.</div><div class="ttdef"><b>Definition</b> NimBLEAdvertising.cpp:348</div></div>
|
|
<div class="ttc" id="aclass_nim_b_l_e_advertising_html_a1f4e1ae9552400fb2bb3cd73b2a483b0"><div class="ttname"><a href="class_nim_b_l_e_advertising.html#a1f4e1ae9552400fb2bb3cd73b2a483b0">NimBLEAdvertising::setAppearance</a></div><div class="ttdeci">bool setAppearance(uint16_t appearance)</div><div class="ttdoc">Set the device appearance in the advertising data.</div><div class="ttdef"><b>Definition</b> NimBLEAdvertising.cpp:468</div></div>
|
|
<div class="ttc" id="aclass_nim_b_l_e_advertising_html_a28c082bb540325ada66b4e203ae6998a"><div class="ttname"><a href="class_nim_b_l_e_advertising.html#a28c082bb540325ada66b4e203ae6998a">NimBLEAdvertising::setAdvertisingInterval</a></div><div class="ttdeci">void setAdvertisingInterval(uint16_t interval)</div><div class="ttdoc">Set the advertising interval.</div><div class="ttdef"><b>Definition</b> NimBLEAdvertising.cpp:123</div></div>
|
|
<div class="ttc" id="aclass_nim_b_l_e_advertising_html_a3ab772936ace18c9a7e509740aa59800"><div class="ttname"><a href="class_nim_b_l_e_advertising.html#a3ab772936ace18c9a7e509740aa59800">NimBLEAdvertising::stop</a></div><div class="ttdeci">bool stop()</div><div class="ttdoc">Stop advertising.</div><div class="ttdef"><b>Definition</b> NimBLEAdvertising.cpp:249</div></div>
|
|
<div class="ttc" id="aclass_nim_b_l_e_advertising_html_a3e81d7d3aa2b72b8db58427d4a42727b"><div class="ttname"><a href="class_nim_b_l_e_advertising.html#a3e81d7d3aa2b72b8db58427d4a42727b">NimBLEAdvertising::setAdvertisingCompleteCallback</a></div><div class="ttdeci">void setAdvertisingCompleteCallback(advCompleteCB_t callback)</div><div class="ttdoc">Set the callback to be invoked when advertising stops.</div><div class="ttdef"><b>Definition</b> NimBLEAdvertising.cpp:263</div></div>
|
|
<div class="ttc" id="aclass_nim_b_l_e_advertising_html_a67c9589dff7e0ee3ec24f2c930d56c06"><div class="ttname"><a href="class_nim_b_l_e_advertising.html#a67c9589dff7e0ee3ec24f2c930d56c06">NimBLEAdvertising::addServiceUUID</a></div><div class="ttdeci">bool addServiceUUID(const NimBLEUUID &serviceUUID)</div><div class="ttdoc">Add a service uuid to exposed list of services.</div><div class="ttdef"><b>Definition</b> NimBLEAdvertising.cpp:410</div></div>
|
|
<div class="ttc" id="aclass_nim_b_l_e_advertising_html_a6b5be947a5e188d512e3338d36a039cb"><div class="ttname"><a href="class_nim_b_l_e_advertising.html#a6b5be947a5e188d512e3338d36a039cb">NimBLEAdvertising::setMinInterval</a></div><div class="ttdeci">void setMinInterval(uint16_t minInterval)</div><div class="ttdoc">Set the minimum advertising interval.</div><div class="ttdef"><b>Definition</b> NimBLEAdvertising.cpp:132</div></div>
|
|
<div class="ttc" id="aclass_nim_b_l_e_advertising_html_a6badd669ddf4ff8507561d5041d093d6"><div class="ttname"><a href="class_nim_b_l_e_advertising.html#a6badd669ddf4ff8507561d5041d093d6">NimBLEAdvertising::enableScanResponse</a></div><div class="ttdeci">void enableScanResponse(bool enable)</div><div class="ttdoc">Enable scan response data.</div><div class="ttdef"><b>Definition</b> NimBLEAdvertising.cpp:149</div></div>
|
|
<div class="ttc" id="aclass_nim_b_l_e_advertising_html_a710eacfc97ecea1bf9a9a3569c58d410"><div class="ttname"><a href="class_nim_b_l_e_advertising.html#a710eacfc97ecea1bf9a9a3569c58d410">NimBLEAdvertising::setDiscoverableMode</a></div><div class="ttdeci">bool setDiscoverableMode(uint8_t mode)</div><div class="ttdoc">Set the discoverable mode to use.</div><div class="ttdef"><b>Definition</b> NimBLEAdvertising.cpp:99</div></div>
|
|
<div class="ttc" id="aclass_nim_b_l_e_advertising_html_a7fb4b74eb7acb1f46e57ff772baccd88"><div class="ttname"><a href="class_nim_b_l_e_advertising.html#a7fb4b74eb7acb1f46e57ff772baccd88">NimBLEAdvertising::setName</a></div><div class="ttdeci">bool setName(const std::string &name)</div><div class="ttdoc">Set the advertised name of the device.</div><div class="ttdef"><b>Definition</b> NimBLEAdvertising.cpp:519</div></div>
|
|
<div class="ttc" id="aclass_nim_b_l_e_advertising_html_a815faed49fb4f29337fda94bd39c0bbc"><div class="ttname"><a href="class_nim_b_l_e_advertising.html#a815faed49fb4f29337fda94bd39c0bbc">NimBLEAdvertising::setServiceData</a></div><div class="ttdeci">bool setServiceData(const NimBLEUUID &uuid, const uint8_t *data, size_t length)</div><div class="ttdoc">Set the service data advertised for the UUID.</div><div class="ttdef"><b>Definition</b> NimBLEAdvertising.cpp:592</div></div>
|
|
<div class="ttc" id="aclass_nim_b_l_e_advertising_html_a8a5c880ee36fd44e0c72c14c47c8e15e"><div class="ttname"><a href="class_nim_b_l_e_advertising.html#a8a5c880ee36fd44e0c72c14c47c8e15e">NimBLEAdvertising::start</a></div><div class="ttdeci">bool start(uint32_t duration=0, const NimBLEAddress *dirAddr=nullptr)</div><div class="ttdoc">Start advertising.</div><div class="ttdef"><b>Definition</b> NimBLEAdvertising.cpp:184</div></div>
|
|
<div class="ttc" id="aclass_nim_b_l_e_advertising_html_a91cde5680de36840fc18f6fd76665af7"><div class="ttname"><a href="class_nim_b_l_e_advertising.html#a91cde5680de36840fc18f6fd76665af7">NimBLEAdvertising::reset</a></div><div class="ttdeci">bool reset()</div><div class="ttdoc">Stops the current advertising and resets the advertising data to the default values.</div><div class="ttdef"><b>Definition</b> NimBLEAdvertising.cpp:60</div></div>
|
|
<div class="ttc" id="aclass_nim_b_l_e_advertising_html_a97798e6d9d7721eb588c5e67d54e97ef"><div class="ttname"><a href="class_nim_b_l_e_advertising.html#a97798e6d9d7721eb588c5e67d54e97ef">NimBLEAdvertising::setScanResponseData</a></div><div class="ttdeci">bool setScanResponseData(const NimBLEAdvertisementData &advertisementData)</div><div class="ttdoc">Set the data that is to be provided in a scan response.</div><div class="ttdef"><b>Definition</b> NimBLEAdvertising.cpp:359</div></div>
|
|
<div class="ttc" id="aclass_nim_b_l_e_advertising_html_a97bf63603b9aabdf0a5284269dfc5549"><div class="ttname"><a href="class_nim_b_l_e_advertising.html#a97bf63603b9aabdf0a5284269dfc5549">NimBLEAdvertising::setMaxInterval</a></div><div class="ttdeci">void setMaxInterval(uint16_t maxInterval)</div><div class="ttdoc">Set the maximum advertising interval.</div><div class="ttdef"><b>Definition</b> NimBLEAdvertising.cpp:140</div></div>
|
|
<div class="ttc" id="aclass_nim_b_l_e_advertising_html_a9dbb66ca66aa040731fcfd737f881469"><div class="ttname"><a href="class_nim_b_l_e_advertising.html#a9dbb66ca66aa040731fcfd737f881469">NimBLEAdvertising::setPreferredParams</a></div><div class="ttdeci">bool setPreferredParams(uint16_t minInterval, uint16_t maxInterval)</div><div class="ttdoc">Set the preferred min and max connection intervals to advertise.</div><div class="ttdef"><b>Definition</b> NimBLEAdvertising.cpp:486</div></div>
|
|
<div class="ttc" id="aclass_nim_b_l_e_advertising_html_a9fe23a52ac3f699095d84d2ba8f90c28"><div class="ttname"><a href="class_nim_b_l_e_advertising.html#a9fe23a52ac3f699095d84d2ba8f90c28">NimBLEAdvertising::setURI</a></div><div class="ttdeci">bool setURI(const std::string &uri)</div><div class="ttdoc">Set the advertised URI.</div><div class="ttdef"><b>Definition</b> NimBLEAdvertising.cpp:573</div></div>
|
|
<div class="ttc" id="aclass_nim_b_l_e_advertising_html_aa3da80c7d17a7824484ee254076e4790"><div class="ttname"><a href="class_nim_b_l_e_advertising.html#aa3da80c7d17a7824484ee254076e4790">NimBLEAdvertising::setScanFilter</a></div><div class="ttdeci">void setScanFilter(bool scanRequestWhitelistOnly, bool connectWhitelistOnly)</div><div class="ttdoc">Set the filtering for the scan filter.</div><div class="ttdef"><b>Definition</b> NimBLEAdvertising.cpp:159</div></div>
|
|
<div class="ttc" id="aclass_nim_b_l_e_advertising_html_ab8afd94479ebac3996fa3712d3d92325"><div class="ttname"><a href="class_nim_b_l_e_advertising.html#ab8afd94479ebac3996fa3712d3d92325">NimBLEAdvertising::setAdvertisementData</a></div><div class="ttdeci">bool setAdvertisementData(const NimBLEAdvertisementData &advertisementData)</div><div class="ttdoc">Set the advertisement data that is to be broadcast in a regular advertisement.</div><div class="ttdef"><b>Definition</b> NimBLEAdvertising.cpp:331</div></div>
|
|
<div class="ttc" id="aclass_nim_b_l_e_advertising_html_aba383012133dd694f56cf86966b2d80a"><div class="ttname"><a href="class_nim_b_l_e_advertising.html#aba383012133dd694f56cf86966b2d80a">NimBLEAdvertising::removeServiceUUID</a></div><div class="ttdeci">bool removeServiceUUID(const NimBLEUUID &serviceUUID)</div><div class="ttdoc">Remove a service UUID from the advertisement.</div><div class="ttdef"><b>Definition</b> NimBLEAdvertising.cpp:435</div></div>
|
|
<div class="ttc" id="aclass_nim_b_l_e_advertising_html_abe6258a917243a4567c3d6eece2ddcdd"><div class="ttname"><a href="class_nim_b_l_e_advertising.html#abe6258a917243a4567c3d6eece2ddcdd">NimBLEAdvertising::NimBLEAdvertising</a></div><div class="ttdeci">NimBLEAdvertising()</div><div class="ttdoc">Construct a default advertising object.</div><div class="ttdef"><b>Definition</b> NimBLEAdvertising.cpp:38</div></div>
|
|
<div class="ttc" id="aclass_nim_b_l_e_advertising_html_ac257ab68520a244cb6494d793f9b6c2a"><div class="ttname"><a href="class_nim_b_l_e_advertising.html#ac257ab68520a244cb6494d793f9b6c2a">NimBLEAdvertising::isAdvertising</a></div><div class="ttdeci">bool isAdvertising()</div><div class="ttdoc">Check if currently advertising.</div><div class="ttdef"><b>Definition</b> NimBLEAdvertising.cpp:271</div></div>
|
|
<div class="ttc" id="aclass_nim_b_l_e_advertising_html_ac433e3458ac5259ae21c4bdbd1198781"><div class="ttname"><a href="class_nim_b_l_e_advertising.html#ac433e3458ac5259ae21c4bdbd1198781">NimBLEAdvertising::setManufacturerData</a></div><div class="ttdeci">bool setManufacturerData(const uint8_t *data, size_t length)</div><div class="ttdoc">Set the advertised manufacturer data.</div><div class="ttdef"><b>Definition</b> NimBLEAdvertising.cpp:539</div></div>
|
|
<div class="ttc" id="aclass_nim_b_l_e_advertising_html_ad159c2e2a65d9bc7dcc5babed146936d"><div class="ttname"><a href="class_nim_b_l_e_advertising.html#ad159c2e2a65d9bc7dcc5babed146936d">NimBLEAdvertising::removeServices</a></div><div class="ttdeci">bool removeServices()</div><div class="ttdoc">Remove all service UUIDs from the advertisement.</div><div class="ttdef"><b>Definition</b> NimBLEAdvertising.cpp:455</div></div>
|
|
<div class="ttc" id="aclass_nim_b_l_e_advertising_html_ad899be16fa054a01908692a504af9832"><div class="ttname"><a href="class_nim_b_l_e_advertising.html#ad899be16fa054a01908692a504af9832">NimBLEAdvertising::refreshAdvertisingData</a></div><div class="ttdeci">bool refreshAdvertisingData()</div><div class="ttdoc">Refresh advertsing data dynamically without stop/start cycle. For instance allows refreshing manufact...</div><div class="ttdef"><b>Definition</b> NimBLEAdvertising.cpp:396</div></div>
|
|
<div class="ttc" id="aclass_nim_b_l_e_advertising_html_ae0e7d64d51882830750bcb87e2d9678c"><div class="ttname"><a href="class_nim_b_l_e_advertising.html#ae0e7d64d51882830750bcb87e2d9678c">NimBLEAdvertising::getScanData</a></div><div class="ttdeci">const NimBLEAdvertisementData & getScanData()</div><div class="ttdoc">Get the current scan response data.</div><div class="ttdef"><b>Definition</b> NimBLEAdvertising.cpp:375</div></div>
|
|
<div class="ttc" id="aclass_nim_b_l_e_advertising_html_ae49d2bd91cabca46ec7c4bbd7fc49407"><div class="ttname"><a href="class_nim_b_l_e_advertising.html#ae49d2bd91cabca46ec7c4bbd7fc49407">NimBLEAdvertising::setConnectableMode</a></div><div class="ttdeci">bool setConnectableMode(uint8_t mode)</div><div class="ttdoc">Set the type of connectable mode to advertise.</div><div class="ttdef"><b>Definition</b> NimBLEAdvertising.cpp:77</div></div>
|
|
<div class="ttc" id="aclass_nim_b_l_e_advertising_html_af7cee42f24ad38872936a0bbc9e2ac1e"><div class="ttname"><a href="class_nim_b_l_e_advertising.html#af7cee42f24ad38872936a0bbc9e2ac1e">NimBLEAdvertising::clearData</a></div><div class="ttdeci">void clearData()</div><div class="ttdoc">Clear the advertisement and scan response data and set the flags to BLE_HS_ADV_F_DISC_GEN.</div><div class="ttdef"><b>Definition</b> NimBLEAdvertising.cpp:382</div></div>
|
|
<div class="ttc" id="aclass_nim_b_l_e_device_html"><div class="ttname"><a href="class_nim_b_l_e_device.html">NimBLEDevice</a></div><div class="ttdoc">A model of a BLE Device from which all the BLE roles are created.</div><div class="ttdef"><b>Definition</b> NimBLEDevice.h:109</div></div>
|
|
<div class="ttc" id="aclass_nim_b_l_e_server_html"><div class="ttname"><a href="class_nim_b_l_e_server.html">NimBLEServer</a></div><div class="ttdoc">The model of a BLE server.</div><div class="ttdef"><b>Definition</b> NimBLEServer.h:60</div></div>
|
|
<div class="ttc" id="aclass_nim_b_l_e_u_u_i_d_html"><div class="ttname"><a href="class_nim_b_l_e_u_u_i_d.html">NimBLEUUID</a></div><div class="ttdoc">A model of a BLE UUID.</div><div class="ttdef"><b>Definition</b> NimBLEUUID.h:41</div></div>
|
|
<div class="ttc" id="animconfig_8h_html"><div class="ttname"><a href="nimconfig_8h.html">nimconfig.h</a></div></div>
|
|
</div><!-- fragment --></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="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><b>NimBLEAdvertising.h</b></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>
|