Ryan OShea | de36e4a | 2020-03-13 16:26:19 +0000 | [diff] [blame] | 1 | <!-- Copyright (c) 2020 ARM Limited. --> |
| 2 | <!-- --> |
| 3 | <!-- SPDX-License-Identifier: MIT --> |
| 4 | <!-- --> |
| 5 | <!-- HTML header for doxygen 1.8.13--> |
| 6 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| 7 | <html xmlns="http://www.w3.org/1999/xhtml"> |
| 8 | <head> |
| 9 | <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> |
| 10 | <meta http-equiv="X-UA-Compatible" content="IE=9"/> |
| 11 | <meta name="generator" content="Doxygen 1.8.13"/> |
| 12 | <meta name="robots" content="NOINDEX, NOFOLLOW" /> |
| 13 | <meta name="viewport" content="width=device-width, initial-scale=1"/> |
| 14 | <title>ArmNN: CommandHandlerRegistry Class Reference</title> |
| 15 | <link href="tabs.css" rel="stylesheet" type="text/css"/> |
| 16 | <script type="text/javascript" src="jquery.js"></script> |
| 17 | <script type="text/javascript" src="dynsections.js"></script> |
| 18 | <link href="navtree.css" rel="stylesheet" type="text/css"/> |
| 19 | <script type="text/javascript" src="resize.js"></script> |
| 20 | <script type="text/javascript" src="navtreedata.js"></script> |
| 21 | <script type="text/javascript" src="navtree.js"></script> |
| 22 | <script type="text/javascript"> |
| 23 | $(document).ready(initResizable); |
| 24 | </script> |
| 25 | <link href="search/search.css" rel="stylesheet" type="text/css"/> |
| 26 | <script type="text/javascript" src="search/searchdata.js"></script> |
| 27 | <script type="text/javascript" src="search/search.js"></script> |
| 28 | <script type="text/x-mathjax-config"> |
| 29 | MathJax.Hub.Config({ |
| 30 | extensions: ["tex2jax.js"], |
| 31 | jax: ["input/TeX","output/HTML-CSS"], |
| 32 | }); |
| 33 | </script><script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js"></script> |
| 34 | <link href="doxygen.css" rel="stylesheet" type="text/css" /> |
| 35 | <link href="stylesheet.css" rel="stylesheet" type="text/css"/> |
| 36 | </head> |
| 37 | <body> |
| 38 | <div id="top"><!-- do not remove this div, it is closed by doxygen! --> |
| 39 | <div id="titlearea"> |
| 40 | <table cellspacing="0" cellpadding="0"> |
| 41 | <tbody> |
| 42 | <tr style="height: 56px;"> |
| 43 | <img alt="ArmNN" src="Arm_NN_horizontal_blue.png" style="max-width: 10rem; margin-top: .5rem; margin-left 10px"/> |
| 44 | <td style="padding-left: 0.5em;"> |
| 45 | <div id="projectname"> |
| 46 |  <span id="projectnumber">20.02</span> |
| 47 | </div> |
| 48 | </td> |
| 49 | </tr> |
| 50 | </tbody> |
| 51 | </table> |
| 52 | </div> |
| 53 | <!-- end header part --> |
| 54 | <!-- Generated by Doxygen 1.8.13 --> |
| 55 | <script type="text/javascript"> |
| 56 | var searchBox = new SearchBox("searchBox", "search",false,'Search'); |
| 57 | </script> |
| 58 | <script type="text/javascript" src="menudata.js"></script> |
| 59 | <script type="text/javascript" src="menu.js"></script> |
| 60 | <script type="text/javascript"> |
| 61 | $(function() { |
| 62 | initMenu('',true,false,'search.php','Search'); |
| 63 | $(document).ready(function() { init_search(); }); |
| 64 | }); |
| 65 | </script> |
| 66 | <div id="main-nav"></div> |
| 67 | </div><!-- top --> |
| 68 | <div id="side-nav" class="ui-resizable side-nav-resizable"> |
| 69 | <div id="nav-tree"> |
| 70 | <div id="nav-tree-contents"> |
| 71 | <div id="nav-sync" class="sync"></div> |
| 72 | </div> |
| 73 | </div> |
| 74 | <div id="splitbar" style="-moz-user-select:none;" |
| 75 | class="ui-resizable-handle"> |
| 76 | </div> |
| 77 | </div> |
| 78 | <script type="text/javascript"> |
| 79 | $(document).ready(function(){initNavTree('classarmnn_1_1profiling_1_1_command_handler_registry.xhtml','');}); |
| 80 | </script> |
| 81 | <div id="doc-content"> |
| 82 | <!-- window showing the filter options --> |
| 83 | <div id="MSearchSelectWindow" |
| 84 | onmouseover="return searchBox.OnSearchSelectShow()" |
| 85 | onmouseout="return searchBox.OnSearchSelectHide()" |
| 86 | onkeydown="return searchBox.OnSearchSelectKey(event)"> |
| 87 | </div> |
| 88 | |
| 89 | <!-- iframe showing the search results (closed by default) --> |
| 90 | <div id="MSearchResultsWindow"> |
| 91 | <iframe src="javascript:void(0)" frameborder="0" |
| 92 | name="MSearchResults" id="MSearchResults"> |
| 93 | </iframe> |
| 94 | </div> |
| 95 | |
| 96 | <div class="header"> |
| 97 | <div class="summary"> |
| 98 | <a href="#pub-methods">Public Member Functions</a> | |
| 99 | <a href="classarmnn_1_1profiling_1_1_command_handler_registry-members.xhtml">List of all members</a> </div> |
| 100 | <div class="headertitle"> |
| 101 | <div class="title">CommandHandlerRegistry Class Reference</div> </div> |
| 102 | </div><!--header--> |
| 103 | <div class="contents"> |
| 104 | |
| 105 | <p><code>#include <<a class="el" href="_command_handler_registry_8hpp_source.xhtml">CommandHandlerRegistry.hpp</a>></code></p> |
| 106 | <table class="memberdecls"> |
| 107 | <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a> |
| 108 | Public Member Functions</h2></td></tr> |
| 109 | <tr class="memitem:a46f9edb3e365423b93373629e9a13509"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1profiling_1_1_command_handler_registry.xhtml#a46f9edb3e365423b93373629e9a13509">CommandHandlerRegistry</a> ()=default</td></tr> |
| 110 | <tr class="separator:a46f9edb3e365423b93373629e9a13509"><td class="memSeparator" colspan="2"> </td></tr> |
| 111 | <tr class="memitem:a7875d60ac5ca76c70f599367ec61261a"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1profiling_1_1_command_handler_registry.xhtml#a7875d60ac5ca76c70f599367ec61261a">RegisterFunctor</a> (<a class="el" href="classarmnn_1_1profiling_1_1_command_handler_functor.xhtml">CommandHandlerFunctor</a> *functor, uint32_t familyId, uint32_t packetId, uint32_t version)</td></tr> |
| 112 | <tr class="separator:a7875d60ac5ca76c70f599367ec61261a"><td class="memSeparator" colspan="2"> </td></tr> |
| 113 | <tr class="memitem:ae56042d93e16ea2c1e99233fc0451d51"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1profiling_1_1_command_handler_registry.xhtml#ae56042d93e16ea2c1e99233fc0451d51">RegisterFunctor</a> (<a class="el" href="classarmnn_1_1profiling_1_1_command_handler_functor.xhtml">CommandHandlerFunctor</a> *functor)</td></tr> |
| 114 | <tr class="separator:ae56042d93e16ea2c1e99233fc0451d51"><td class="memSeparator" colspan="2"> </td></tr> |
| 115 | <tr class="memitem:ab421312295ae76edb4a540900d96103b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classarmnn_1_1profiling_1_1_command_handler_functor.xhtml">CommandHandlerFunctor</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1profiling_1_1_command_handler_registry.xhtml#ab421312295ae76edb4a540900d96103b">GetFunctor</a> (uint32_t familyId, uint32_t packetId, uint32_t version) const</td></tr> |
| 116 | <tr class="separator:ab421312295ae76edb4a540900d96103b"><td class="memSeparator" colspan="2"> </td></tr> |
| 117 | </table> |
| 118 | <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2> |
| 119 | <div class="textblock"> |
| 120 | <p class="definition">Definition at line <a class="el" href="_command_handler_registry_8hpp_source.xhtml#l00032">32</a> of file <a class="el" href="_command_handler_registry_8hpp_source.xhtml">CommandHandlerRegistry.hpp</a>.</p> |
| 121 | </div><h2 class="groupheader">Constructor & Destructor Documentation</h2> |
| 122 | <a id="a46f9edb3e365423b93373629e9a13509"></a> |
| 123 | <h2 class="memtitle"><span class="permalink"><a href="#a46f9edb3e365423b93373629e9a13509">◆ </a></span>CommandHandlerRegistry()</h2> |
| 124 | |
| 125 | <div class="memitem"> |
| 126 | <div class="memproto"> |
| 127 | <table class="mlabels"> |
| 128 | <tr> |
| 129 | <td class="mlabels-left"> |
| 130 | <table class="memname"> |
| 131 | <tr> |
| 132 | <td class="memname"><a class="el" href="classarmnn_1_1profiling_1_1_command_handler_registry.xhtml">CommandHandlerRegistry</a> </td> |
| 133 | <td>(</td> |
| 134 | <td class="paramname"></td><td>)</td> |
| 135 | <td></td> |
| 136 | </tr> |
| 137 | </table> |
| 138 | </td> |
| 139 | <td class="mlabels-right"> |
| 140 | <span class="mlabels"><span class="mlabel">default</span></span> </td> |
| 141 | </tr> |
| 142 | </table> |
| 143 | </div><div class="memdoc"> |
| 144 | |
| 145 | </div> |
| 146 | </div> |
| 147 | <h2 class="groupheader">Member Function Documentation</h2> |
| 148 | <a id="ab421312295ae76edb4a540900d96103b"></a> |
| 149 | <h2 class="memtitle"><span class="permalink"><a href="#ab421312295ae76edb4a540900d96103b">◆ </a></span>GetFunctor()</h2> |
| 150 | |
| 151 | <div class="memitem"> |
| 152 | <div class="memproto"> |
| 153 | <table class="memname"> |
| 154 | <tr> |
| 155 | <td class="memname"><a class="el" href="classarmnn_1_1profiling_1_1_command_handler_functor.xhtml">CommandHandlerFunctor</a> * GetFunctor </td> |
| 156 | <td>(</td> |
| 157 | <td class="paramtype">uint32_t </td> |
| 158 | <td class="paramname"><em>familyId</em>, </td> |
| 159 | </tr> |
| 160 | <tr> |
| 161 | <td class="paramkey"></td> |
| 162 | <td></td> |
| 163 | <td class="paramtype">uint32_t </td> |
| 164 | <td class="paramname"><em>packetId</em>, </td> |
| 165 | </tr> |
| 166 | <tr> |
| 167 | <td class="paramkey"></td> |
| 168 | <td></td> |
| 169 | <td class="paramtype">uint32_t </td> |
| 170 | <td class="paramname"><em>version</em> </td> |
| 171 | </tr> |
| 172 | <tr> |
| 173 | <td></td> |
| 174 | <td>)</td> |
| 175 | <td></td><td> const</td> |
| 176 | </tr> |
| 177 | </table> |
| 178 | </div><div class="memdoc"> |
| 179 | |
| 180 | <p class="definition">Definition at line <a class="el" href="_command_handler_registry_8cpp_source.xhtml#l00035">35</a> of file <a class="el" href="_command_handler_registry_8cpp_source.xhtml">CommandHandlerRegistry.cpp</a>.</p> |
| 181 | |
| 182 | <p class="reference">Referenced by <a class="el" href="_profiling_tests_8cpp_source.xhtml#l00379">BOOST_AUTO_TEST_CASE()</a>, and <a class="el" href="_command_handler_8cpp_source.xhtml#l00034">CommandHandler::Stop()</a>.</p> |
| 183 | <div class="fragment"><div class="line"><a name="l00036"></a><span class="lineno"> 36</span> {</div><div class="line"><a name="l00037"></a><span class="lineno"> 37</span>  CommandHandlerKey key(familyId, packetId, version);</div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span> </div><div class="line"><a name="l00039"></a><span class="lineno"> 39</span>  <span class="comment">// Check that the requested key exists</span></div><div class="line"><a name="l00040"></a><span class="lineno"> 40</span>  <span class="keywordflow">if</span> (registry.find(key) == registry.end())</div><div class="line"><a name="l00041"></a><span class="lineno"> 41</span>  {</div><div class="line"><a name="l00042"></a><span class="lineno"> 42</span>  <span class="keywordflow">throw</span> <a class="code" href="classarmnn_1_1_invalid_argument_exception.xhtml">armnn::InvalidArgumentException</a>(</div><div class="line"><a name="l00043"></a><span class="lineno"> 43</span>  boost::str(boost::format(<span class="stringliteral">"Functor with requested PacketId=%1% and Version=%2% does not exist"</span>)</div><div class="line"><a name="l00044"></a><span class="lineno"> 44</span>  % packetId</div><div class="line"><a name="l00045"></a><span class="lineno"> 45</span>  % version));</div><div class="line"><a name="l00046"></a><span class="lineno"> 46</span>  }</div><div class="line"><a name="l00047"></a><span class="lineno"> 47</span> </div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span>  CommandHandlerFunctor* commandHandlerFunctor = registry.at(key);</div><div class="line"><a name="l00049"></a><span class="lineno"> 49</span>  <span class="keywordflow">if</span> (commandHandlerFunctor == <span class="keyword">nullptr</span>)</div><div class="line"><a name="l00050"></a><span class="lineno"> 50</span>  {</div><div class="line"><a name="l00051"></a><span class="lineno"> 51</span>  <span class="keywordflow">throw</span> RuntimeException(</div><div class="line"><a name="l00052"></a><span class="lineno"> 52</span>  boost::str(boost::format(<span class="stringliteral">"Invalid functor registered for PacketId=%1% and Version=%2%"</span>)</div><div class="line"><a name="l00053"></a><span class="lineno"> 53</span>  % packetId</div><div class="line"><a name="l00054"></a><span class="lineno"> 54</span>  % version));</div><div class="line"><a name="l00055"></a><span class="lineno"> 55</span>  }</div><div class="line"><a name="l00056"></a><span class="lineno"> 56</span> </div><div class="line"><a name="l00057"></a><span class="lineno"> 57</span>  <span class="keywordflow">return</span> commandHandlerFunctor;</div><div class="line"><a name="l00058"></a><span class="lineno"> 58</span> }</div><div class="ttc" id="classarmnn_1_1_invalid_argument_exception_xhtml"><div class="ttname"><a href="classarmnn_1_1_invalid_argument_exception.xhtml">armnn::InvalidArgumentException</a></div><div class="ttdef"><b>Definition:</b> <a href="_exceptions_8hpp_source.xhtml#l00080">Exceptions.hpp:80</a></div></div> |
| 184 | </div><!-- fragment --> |
| 185 | </div> |
| 186 | </div> |
| 187 | <a id="a7875d60ac5ca76c70f599367ec61261a"></a> |
| 188 | <h2 class="memtitle"><span class="permalink"><a href="#a7875d60ac5ca76c70f599367ec61261a">◆ </a></span>RegisterFunctor() <span class="overload">[1/2]</span></h2> |
| 189 | |
| 190 | <div class="memitem"> |
| 191 | <div class="memproto"> |
| 192 | <table class="memname"> |
| 193 | <tr> |
| 194 | <td class="memname">void RegisterFunctor </td> |
| 195 | <td>(</td> |
| 196 | <td class="paramtype"><a class="el" href="classarmnn_1_1profiling_1_1_command_handler_functor.xhtml">CommandHandlerFunctor</a> * </td> |
| 197 | <td class="paramname"><em>functor</em>, </td> |
| 198 | </tr> |
| 199 | <tr> |
| 200 | <td class="paramkey"></td> |
| 201 | <td></td> |
| 202 | <td class="paramtype">uint32_t </td> |
| 203 | <td class="paramname"><em>familyId</em>, </td> |
| 204 | </tr> |
| 205 | <tr> |
| 206 | <td class="paramkey"></td> |
| 207 | <td></td> |
| 208 | <td class="paramtype">uint32_t </td> |
| 209 | <td class="paramname"><em>packetId</em>, </td> |
| 210 | </tr> |
| 211 | <tr> |
| 212 | <td class="paramkey"></td> |
| 213 | <td></td> |
| 214 | <td class="paramtype">uint32_t </td> |
| 215 | <td class="paramname"><em>version</em> </td> |
| 216 | </tr> |
| 217 | <tr> |
| 218 | <td></td> |
| 219 | <td>)</td> |
| 220 | <td></td><td></td> |
| 221 | </tr> |
| 222 | </table> |
| 223 | </div><div class="memdoc"> |
| 224 | |
| 225 | <p class="definition">Definition at line <a class="el" href="_command_handler_registry_8cpp_source.xhtml#l00017">17</a> of file <a class="el" href="_command_handler_registry_8cpp_source.xhtml">CommandHandlerRegistry.cpp</a>.</p> |
| 226 | |
| 227 | <p class="reference">Referenced by <a class="el" href="_profiling_tests_8cpp_source.xhtml#l00131">BOOST_AUTO_TEST_CASE()</a>, <a class="el" href="_gatord_mock_main_8cpp_source.xhtml#l00018">main()</a>, <a class="el" href="_profiling_service_8hpp_source.xhtml#l00160">ProfilingService::ProfilingService()</a>, and <a class="el" href="_command_handler_registry_8cpp_source.xhtml#l00028">CommandHandlerRegistry::RegisterFunctor()</a>.</p> |
| 228 | <div class="fragment"><div class="line"><a name="l00021"></a><span class="lineno"> 21</span> {</div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span>  BOOST_ASSERT_MSG(functor, <span class="stringliteral">"Provided functor should not be a nullptr"</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>  CommandHandlerKey key(familyId, packetId, version);</div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span>  registry[key] = functor;</div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span> }</div></div><!-- fragment --> |
| 229 | </div> |
| 230 | </div> |
| 231 | <a id="ae56042d93e16ea2c1e99233fc0451d51"></a> |
| 232 | <h2 class="memtitle"><span class="permalink"><a href="#ae56042d93e16ea2c1e99233fc0451d51">◆ </a></span>RegisterFunctor() <span class="overload">[2/2]</span></h2> |
| 233 | |
| 234 | <div class="memitem"> |
| 235 | <div class="memproto"> |
| 236 | <table class="memname"> |
| 237 | <tr> |
| 238 | <td class="memname">void RegisterFunctor </td> |
| 239 | <td>(</td> |
| 240 | <td class="paramtype"><a class="el" href="classarmnn_1_1profiling_1_1_command_handler_functor.xhtml">CommandHandlerFunctor</a> * </td> |
| 241 | <td class="paramname"><em>functor</em></td><td>)</td> |
| 242 | <td></td> |
| 243 | </tr> |
| 244 | </table> |
| 245 | </div><div class="memdoc"> |
| 246 | |
| 247 | <p class="definition">Definition at line <a class="el" href="_command_handler_registry_8cpp_source.xhtml#l00028">28</a> of file <a class="el" href="_command_handler_registry_8cpp_source.xhtml">CommandHandlerRegistry.cpp</a>.</p> |
| 248 | |
| 249 | <p class="reference">References <a class="el" href="_command_handler_functor_8cpp_source.xhtml#l00014">CommandHandlerFunctor::GetFamilyId()</a>, <a class="el" href="_command_handler_functor_8cpp_source.xhtml#l00019">CommandHandlerFunctor::GetPacketId()</a>, <a class="el" href="_command_handler_functor_8cpp_source.xhtml#l00024">CommandHandlerFunctor::GetVersion()</a>, and <a class="el" href="_command_handler_registry_8cpp_source.xhtml#l00017">CommandHandlerRegistry::RegisterFunctor()</a>.</p> |
| 250 | <div class="fragment"><div class="line"><a name="l00029"></a><span class="lineno"> 29</span> {</div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span>  BOOST_ASSERT_MSG(functor, <span class="stringliteral">"Provided functor should not be a nullptr"</span>);</div><div class="line"><a name="l00031"></a><span class="lineno"> 31</span> </div><div class="line"><a name="l00032"></a><span class="lineno"> 32</span>  <a class="code" href="classarmnn_1_1profiling_1_1_command_handler_registry.xhtml#a7875d60ac5ca76c70f599367ec61261a">RegisterFunctor</a>(functor, functor->GetFamilyId(), functor->GetPacketId(), functor->GetVersion());</div><div class="line"><a name="l00033"></a><span class="lineno"> 33</span> }</div><div class="ttc" id="classarmnn_1_1profiling_1_1_command_handler_registry_xhtml_a7875d60ac5ca76c70f599367ec61261a"><div class="ttname"><a href="classarmnn_1_1profiling_1_1_command_handler_registry.xhtml#a7875d60ac5ca76c70f599367ec61261a">armnn::profiling::CommandHandlerRegistry::RegisterFunctor</a></div><div class="ttdeci">void RegisterFunctor(CommandHandlerFunctor *functor, uint32_t familyId, uint32_t packetId, uint32_t version)</div><div class="ttdef"><b>Definition:</b> <a href="_command_handler_registry_8cpp_source.xhtml#l00017">CommandHandlerRegistry.cpp:17</a></div></div> |
| 251 | </div><!-- fragment --> |
| 252 | </div> |
| 253 | </div> |
| 254 | <hr/>The documentation for this class was generated from the following files:<ul> |
| 255 | <li>src/profiling/<a class="el" href="_command_handler_registry_8hpp_source.xhtml">CommandHandlerRegistry.hpp</a></li> |
| 256 | <li>src/profiling/<a class="el" href="_command_handler_registry_8cpp_source.xhtml">CommandHandlerRegistry.cpp</a></li> |
| 257 | </ul> |
| 258 | </div><!-- contents --> |
| 259 | </div><!-- doc-content --> |
| 260 | <!-- start footer part --> |
| 261 | <div id="nav-path" class="navpath"><!-- id is needed for treeview function! --> |
| 262 | <ul> |
| 263 | <li class="navelem"><a class="el" href="namespacearmnn.xhtml">armnn</a></li><li class="navelem"><a class="el" href="namespacearmnn_1_1profiling.xhtml">profiling</a></li><li class="navelem"><a class="el" href="classarmnn_1_1profiling_1_1_command_handler_registry.xhtml">CommandHandlerRegistry</a></li> |
| 264 | <li class="footer">Generated on Fri Mar 13 2020 16:09:21 for ArmNN by |
| 265 | <a href="http://www.doxygen.org/index.html"> |
| 266 | <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li> |
| 267 | </ul> |
| 268 | </div> |
| 269 | </body> |
| 270 | </html> |