|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123 |
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
- <meta http-equiv="X-UA-Compatible" content="IE=9"/>
- <meta name="generator" content="Doxygen 1.8.14"/>
- <meta name="viewport" content="width=device-width, initial-scale=1"/>
- <title>uTL: include/utl/com/_1wire_id.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>
- <script type="text/javascript">
- /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
- $(document).ready(initResizable);
- /* @license-end */</script>
- <link href="search/search.css" rel="stylesheet" type="text/css"/>
- <script type="text/javascript" src="search/searchdata.js"></script>
- <script type="text/javascript" src="search/search.js"></script>
- <link href="doxygen.css" rel="stylesheet" type="text/css" />
- </head>
- <body>
- <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
- <div id="titlearea">
- <table cellspacing="0" cellpadding="0">
- <tbody>
- <tr style="height: 56px;">
- <td id="projectalign" style="padding-left: 0.5em;">
- <div id="projectname">uTL
- </div>
- <div id="projectbrief">micro Template library</div>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- <!-- end header part -->
- <!-- Generated by Doxygen 1.8.14 -->
- <script type="text/javascript">
- /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
- var searchBox = new SearchBox("searchBox", "search",false,'Search');
- /* @license-end */
- </script>
- <script type="text/javascript" src="menudata.js"></script>
- <script type="text/javascript" src="menu.js"></script>
- <script type="text/javascript">
- /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
- $(function() {
- initMenu('',true,false,'search.php','Search');
- $(document).ready(function() { init_search(); });
- });
- /* @license-end */</script>
- <div id="main-nav"></div>
- </div><!-- top -->
- <div id="side-nav" class="ui-resizable side-nav-resizable">
- <div id="nav-tree">
- <div id="nav-tree-contents">
- <div id="nav-sync" class="sync"></div>
- </div>
- </div>
- <div id="splitbar" style="-moz-user-select:none;"
- class="ui-resizable-handle">
- </div>
- </div>
- <script type="text/javascript">
- /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
- $(document).ready(function(){initNavTree('__1wire__id_8h_source.html','');});
- /* @license-end */
- </script>
- <div id="doc-content">
- <!-- window showing the filter options -->
- <div id="MSearchSelectWindow"
- onmouseover="return searchBox.OnSearchSelectShow()"
- onmouseout="return searchBox.OnSearchSelectHide()"
- onkeydown="return searchBox.OnSearchSelectKey(event)">
- </div>
-
- <!-- iframe showing the search results (closed by default) -->
- <div id="MSearchResultsWindow">
- <iframe src="javascript:void(0)" frameborder="0"
- name="MSearchResults" id="MSearchResults">
- </iframe>
- </div>
-
- <div class="header">
- <div class="headertitle">
- <div class="title">_1wire_id.h</div> </div>
- </div><!--header-->
- <div class="contents">
- <a href="__1wire__id_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> </div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span> <span class="preprocessor">#ifndef __utl_com_1wire_id_h__</span></div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span> <span class="preprocessor">#define __utl_com_1wire_id_h__</span></div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span> </div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span> <span class="preprocessor">#include <<a class="code" href="impl_8h.html">utl/core/impl.h</a>></span></div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span> <span class="preprocessor">#include <<a class="code" href="id_8h.html">utl/container/id.h</a>></span></div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span> </div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span> <span class="keyword">namespace </span><a class="code" href="namespaceutl.html">utl</a> {</div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span> </div><div class="line"><a name="l00032"></a><span class="lineno"><a class="line" href="classutl_1_1__1wire__id__t.html"> 32</a></span>  <span class="keyword">class </span><a class="code" href="classutl_1_1__1wire__id__t.html">_1wire_id_t</a> : <span class="keyword">public</span> <a class="code" href="structutl_1_1id__t.html">id_t</a><uint8_t, 8> {</div><div class="line"><a name="l00033"></a><span class="lineno"> 33</span> </div><div class="line"><a name="l00037"></a><span class="lineno"> 37</span>  <span class="keyword">public</span>:</div><div class="line"><a name="l00039"></a><span class="lineno"><a class="line" href="classutl_1_1__1wire__id__t.html#a813f69adfff7bcdcba6b07bf52e3546e"> 39</a></span>  <a class="code" href="classutl_1_1__1wire__id__t.html#a813f69adfff7bcdcba6b07bf52e3546e">_1wire_id_t</a> () noexcept</div><div class="line"><a name="l00040"></a><span class="lineno"> 40</span>  : <a class="code" href="structutl_1_1id__t.html">id_t</a><uint8_t, 8> {0, 0, 0, 0, 0, 0, 0, 0} { }</div><div class="line"><a name="l00041"></a><span class="lineno"><a class="line" href="classutl_1_1__1wire__id__t.html#a042aa65cc13c6040f795c8198f5afc23"> 41</a></span>  <a class="code" href="classutl_1_1__1wire__id__t.html#a042aa65cc13c6040f795c8198f5afc23">_1wire_id_t</a> (<span class="keyword">const</span> <a class="code" href="classutl_1_1__1wire__id__t.html">_1wire_id_t</a>& <span class="keywordtype">id</span>) noexcept {</div><div class="line"><a name="l00042"></a><span class="lineno"> 42</span>  std::copy(<span class="keywordtype">id</span>.<a class="code" href="structutl_1_1id__t.html#abf6354098b87ecd333bfb3a160e757df">begin</a>(), <span class="keywordtype">id</span>.<a class="code" href="structutl_1_1id__t.html#ad3e1553b24e43c71b64d080922c42148">end</a>(), this-><a class="code" href="structutl_1_1id__t.html#abf6354098b87ecd333bfb3a160e757df">begin</a>());</div><div class="line"><a name="l00043"></a><span class="lineno"> 43</span>  }</div><div class="line"><a name="l00045"></a><span class="lineno"> 45</span> </div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span>  <span class="keyword">static</span> constexpr <span class="keyword">const</span> <a class="code" href="classutl_1_1__1wire__id__t.html">_1wire_id_t</a>& <a class="code" href="classutl_1_1__1wire__id__t.html#adad08aa5ce38e1a87800de57a91db81b">nullDev</a> () { <span class="keywordflow">return</span> <a class="code" href="classutl_1_1__1wire__id__t.html#a9d1d7610961adf2ae3669cbbcace74d2">nullDev_</a>; }</div><div class="line"><a name="l00051"></a><span class="lineno"> 51</span> </div><div class="line"><a name="l00054"></a><span class="lineno"><a class="line" href="classutl_1_1__1wire__id__t.html#adb30b65bcab59bdad980793377a8e52f"> 54</a></span>  uint8_t& <a class="code" href="classutl_1_1__1wire__id__t.html#adb30b65bcab59bdad980793377a8e52f">family</a>() noexcept { <span class="keywordflow">return</span> <a class="code" href="structutl_1_1id__t.html#a00d98ffd688e3c146b7dca509487b821">front</a>(); }</div><div class="line"><a name="l00055"></a><span class="lineno"><a class="line" href="classutl_1_1__1wire__id__t.html#a6ed0d86d1fce0073776d83092a874b91"> 55</a></span>  <span class="keyword">const</span> uint8_t& <a class="code" href="classutl_1_1__1wire__id__t.html#a6ed0d86d1fce0073776d83092a874b91">family</a>() const noexcept { <span class="keywordflow">return</span> <a class="code" href="structutl_1_1id__t.html#a00d98ffd688e3c146b7dca509487b821">front</a>(); }</div><div class="line"><a name="l00057"></a><span class="lineno"> 57</span> </div><div class="line"><a name="l00060"></a><span class="lineno"><a class="line" href="classutl_1_1__1wire__id__t.html#a03a112d8910c67611a3b302fe7c0706b"> 60</a></span>  uint8_t& <a class="code" href="classutl_1_1__1wire__id__t.html#a03a112d8910c67611a3b302fe7c0706b">crc8</a>() noexcept { <span class="keywordflow">return</span> <a class="code" href="structutl_1_1id__t.html#a9a289ddc68f8ceec5368bf63334a2829">back</a>(); }</div><div class="line"><a name="l00061"></a><span class="lineno"><a class="line" href="classutl_1_1__1wire__id__t.html#af3a0ea2c575f96ac01b0aac91166d767"> 61</a></span>  <span class="keyword">const</span> uint8_t& <a class="code" href="classutl_1_1__1wire__id__t.html#af3a0ea2c575f96ac01b0aac91166d767">crc8</a>() const noexcept { <span class="keywordflow">return</span> <a class="code" href="structutl_1_1id__t.html#a9a289ddc68f8ceec5368bf63334a2829">back</a>(); }</div><div class="line"><a name="l00063"></a><span class="lineno"> 63</span> </div><div class="line"><a name="l00072"></a><span class="lineno"><a class="line" href="classutl_1_1__1wire__id__t.html#aef89950aeb9d40ca058fabcc5532e01d"> 72</a></span>  <span class="keyword">static</span> <span class="keywordtype">int</span> <a class="code" href="classutl_1_1__1wire__id__t.html#aef89950aeb9d40ca058fabcc5532e01d">compare</a> (<span class="keyword">const</span> <a class="code" href="classutl_1_1__1wire__id__t.html">_1wire_id_t</a>& lhs, <span class="keyword">const</span> <a class="code" href="classutl_1_1__1wire__id__t.html">_1wire_id_t</a>& rhs) noexcept {</div><div class="line"><a name="l00073"></a><span class="lineno"> 73</span>  <span class="keyword">auto</span> p = std::mismatch (lhs.rbegin(), lhs.rend(), rhs.rbegin());</div><div class="line"><a name="l00074"></a><span class="lineno"> 74</span>  <span class="keywordflow">if</span> (p.first == lhs.rend()) <span class="keywordflow">return</span> 0;</div><div class="line"><a name="l00075"></a><span class="lineno"> 75</span>  <span class="keywordflow">else</span> <span class="keywordflow">if</span> (*p.first < *p.second) <span class="keywordflow">return</span> -1;</div><div class="line"><a name="l00076"></a><span class="lineno"> 76</span>  <span class="keywordflow">else</span> <span class="keywordflow">return</span> 1;</div><div class="line"><a name="l00077"></a><span class="lineno"> 77</span>  }</div><div class="line"><a name="l00079"></a><span class="lineno"> 79</span> </div><div class="line"><a name="l00082"></a><span class="lineno"> 82</span>  <span class="keyword">private</span>:</div><div class="line"><a name="l00083"></a><span class="lineno"><a class="line" href="classutl_1_1__1wire__id__t.html#a9d1d7610961adf2ae3669cbbcace74d2"> 83</a></span>  <span class="keyword">static</span> <span class="keyword">const</span> <a class="code" href="classutl_1_1__1wire__id__t.html">_1wire_id_t</a> <a class="code" href="classutl_1_1__1wire__id__t.html#a9d1d7610961adf2ae3669cbbcace74d2">nullDev_</a>;</div><div class="line"><a name="l00085"></a><span class="lineno"> 85</span>  };</div><div class="line"><a name="l00086"></a><span class="lineno"> 86</span> </div><div class="line"><a name="l00087"></a><span class="lineno"> 87</span>  <span class="comment">// Init static member</span></div><div class="line"><a name="l00088"></a><span class="lineno"> 88</span>  <span class="keyword">const</span> <a class="code" href="classutl_1_1__1wire__id__t.html">_1wire_id_t</a> <a class="code" href="classutl_1_1__1wire__id__t.html#a9d1d7610961adf2ae3669cbbcace74d2">_1wire_id_t::nullDev_</a> { };</div><div class="line"><a name="l00089"></a><span class="lineno"> 89</span> </div><div class="line"><a name="l00090"></a><span class="lineno"> 90</span> } <span class="comment">// namespace tbx</span></div><div class="line"><a name="l00091"></a><span class="lineno"> 91</span> </div><div class="line"><a name="l00092"></a><span class="lineno"> 92</span> <span class="preprocessor">#endif </span><span class="comment">/* __utl_com_1wire_id_h__ */</span><span class="preprocessor"></span></div><div class="ttc" id="structutl_1_1id__t_html_a9a289ddc68f8ceec5368bf63334a2829"><div class="ttname"><a href="structutl_1_1id__t.html#a9a289ddc68f8ceec5368bf63334a2829">utl::id_t< uint8_t, 8 >::back</a></div><div class="ttdeci">reference back() noexcept</div><div class="ttdef"><b>Definition:</b> <a href="id_8h_source.html#l00184">id.h:184</a></div></div>
- <div class="ttc" id="structutl_1_1id__t_html_ad3e1553b24e43c71b64d080922c42148"><div class="ttname"><a href="structutl_1_1id__t.html#ad3e1553b24e43c71b64d080922c42148">utl::id_t< uint8_t, 8 >::end</a></div><div class="ttdeci">iterator end() noexcept</div><div class="ttdef"><b>Definition:</b> <a href="id_8h_source.html#l00109">id.h:109</a></div></div>
- <div class="ttc" id="classutl_1_1__1wire__id__t_html_a042aa65cc13c6040f795c8198f5afc23"><div class="ttname"><a href="classutl_1_1__1wire__id__t.html#a042aa65cc13c6040f795c8198f5afc23">utl::_1wire_id_t::_1wire_id_t</a></div><div class="ttdeci">_1wire_id_t(const _1wire_id_t &id) noexcept</div><div class="ttdef"><b>Definition:</b> <a href="__1wire__id_8h_source.html#l00041">_1wire_id.h:41</a></div></div>
- <div class="ttc" id="classutl_1_1__1wire__id__t_html_aef89950aeb9d40ca058fabcc5532e01d"><div class="ttname"><a href="classutl_1_1__1wire__id__t.html#aef89950aeb9d40ca058fabcc5532e01d">utl::_1wire_id_t::compare</a></div><div class="ttdeci">static int compare(const _1wire_id_t &lhs, const _1wire_id_t &rhs) noexcept</div><div class="ttdoc">Full compare two dev_ids. </div><div class="ttdef"><b>Definition:</b> <a href="__1wire__id_8h_source.html#l00072">_1wire_id.h:72</a></div></div>
- <div class="ttc" id="structutl_1_1id__t_html_a00d98ffd688e3c146b7dca509487b821"><div class="ttname"><a href="structutl_1_1id__t.html#a00d98ffd688e3c146b7dca509487b821">utl::id_t< uint8_t, 8 >::front</a></div><div class="ttdeci">reference front() noexcept</div><div class="ttdef"><b>Definition:</b> <a href="id_8h_source.html#l00176">id.h:176</a></div></div>
- <div class="ttc" id="classutl_1_1__1wire__id__t_html_a03a112d8910c67611a3b302fe7c0706b"><div class="ttname"><a href="classutl_1_1__1wire__id__t.html#a03a112d8910c67611a3b302fe7c0706b">utl::_1wire_id_t::crc8</a></div><div class="ttdeci">uint8_t & crc8() noexcept</div><div class="ttdef"><b>Definition:</b> <a href="__1wire__id_8h_source.html#l00060">_1wire_id.h:60</a></div></div>
- <div class="ttc" id="id_8h_html"><div class="ttname"><a href="id_8h.html">id.h</a></div><div class="ttdoc">A container for device IDs. </div></div>
- <div class="ttc" id="classutl_1_1__1wire__id__t_html"><div class="ttname"><a href="classutl_1_1__1wire__id__t.html">utl::_1wire_id_t</a></div><div class="ttdef"><b>Definition:</b> <a href="__1wire__id_8h_source.html#l00032">_1wire_id.h:32</a></div></div>
- <div class="ttc" id="classutl_1_1__1wire__id__t_html_adb30b65bcab59bdad980793377a8e52f"><div class="ttname"><a href="classutl_1_1__1wire__id__t.html#adb30b65bcab59bdad980793377a8e52f">utl::_1wire_id_t::family</a></div><div class="ttdeci">uint8_t & family() noexcept</div><div class="ttdef"><b>Definition:</b> <a href="__1wire__id_8h_source.html#l00054">_1wire_id.h:54</a></div></div>
- <div class="ttc" id="classutl_1_1__1wire__id__t_html_a6ed0d86d1fce0073776d83092a874b91"><div class="ttname"><a href="classutl_1_1__1wire__id__t.html#a6ed0d86d1fce0073776d83092a874b91">utl::_1wire_id_t::family</a></div><div class="ttdeci">const uint8_t & family() const noexcept</div><div class="ttdef"><b>Definition:</b> <a href="__1wire__id_8h_source.html#l00055">_1wire_id.h:55</a></div></div>
- <div class="ttc" id="classutl_1_1__1wire__id__t_html_af3a0ea2c575f96ac01b0aac91166d767"><div class="ttname"><a href="classutl_1_1__1wire__id__t.html#af3a0ea2c575f96ac01b0aac91166d767">utl::_1wire_id_t::crc8</a></div><div class="ttdeci">const uint8_t & crc8() const noexcept</div><div class="ttdef"><b>Definition:</b> <a href="__1wire__id_8h_source.html#l00061">_1wire_id.h:61</a></div></div>
- <div class="ttc" id="namespaceutl_html"><div class="ttname"><a href="namespaceutl.html">utl</a></div><div class="ttdoc">STL&#39;s core language concepts. </div><div class="ttdef"><b>Definition:</b> <a href="__1wire_8h_source.html#l00030">_1wire.h:30</a></div></div>
- <div class="ttc" id="classutl_1_1__1wire__id__t_html_a9d1d7610961adf2ae3669cbbcace74d2"><div class="ttname"><a href="classutl_1_1__1wire__id__t.html#a9d1d7610961adf2ae3669cbbcace74d2">utl::_1wire_id_t::nullDev_</a></div><div class="ttdeci">static const _1wire_id_t nullDev_</div><div class="ttdef"><b>Definition:</b> <a href="__1wire__id_8h_source.html#l00083">_1wire_id.h:83</a></div></div>
- <div class="ttc" id="structutl_1_1id__t_html"><div class="ttname"><a href="structutl_1_1id__t.html">utl::id_t</a></div><div class="ttdoc">A standard container for storing IDs as a fixed size sequence of bytes. This type is based on etl::ar...</div><div class="ttdef"><b>Definition:</b> <a href="id_8h_source.html#l00078">id.h:78</a></div></div>
- <div class="ttc" id="classutl_1_1__1wire__id__t_html_adad08aa5ce38e1a87800de57a91db81b"><div class="ttname"><a href="classutl_1_1__1wire__id__t.html#adad08aa5ce38e1a87800de57a91db81b">utl::_1wire_id_t::nullDev</a></div><div class="ttdeci">static constexpr const _1wire_id_t & nullDev()</div><div class="ttdoc">Return nullDev reference. </div><div class="ttdef"><b>Definition:</b> <a href="__1wire__id_8h_source.html#l00050">_1wire_id.h:50</a></div></div>
- <div class="ttc" id="classutl_1_1__1wire__id__t_html_a813f69adfff7bcdcba6b07bf52e3546e"><div class="ttname"><a href="classutl_1_1__1wire__id__t.html#a813f69adfff7bcdcba6b07bf52e3546e">utl::_1wire_id_t::_1wire_id_t</a></div><div class="ttdeci">_1wire_id_t() noexcept</div><div class="ttdef"><b>Definition:</b> <a href="__1wire__id_8h_source.html#l00039">_1wire_id.h:39</a></div></div>
- <div class="ttc" id="structutl_1_1id__t_html_abf6354098b87ecd333bfb3a160e757df"><div class="ttname"><a href="structutl_1_1id__t.html#abf6354098b87ecd333bfb3a160e757df">utl::id_t< uint8_t, 8 >::begin</a></div><div class="ttdeci">iterator begin() noexcept</div><div class="ttdef"><b>Definition:</b> <a href="id_8h_source.html#l00107">id.h:107</a></div></div>
- <div class="ttc" id="impl_8h_html"><div class="ttname"><a href="impl_8h.html">impl.h</a></div><div class="ttdoc">Implementation detail main forward header. </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_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_82754f54d9380477ef02477185c1f103.html">utl</a></li><li class="navelem"><a class="el" href="dir_b2ad3c1a6521a4924fa9194d98c323e2.html">com</a></li><li class="navelem"><a class="el" href="__1wire__id_8h.html">_1wire_id.h</a></li>
- <li class="footer">Generated by
- <a href="http://www.doxygen.org/index.html">
- <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.14 </li>
- </ul>
- </div>
- </body>
- </html>
|