Messages_8c.html 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
  5. <meta http-equiv="X-UA-Compatible" content="IE=9"/>
  6. <meta name="generator" content="Doxygen 1.8.17"/>
  7. <meta name="viewport" content="width=device-width, initial-scale=1"/>
  8. <title>MQTT C Client Libraries Internals: Messages.c File Reference</title>
  9. <link href="tabs.css" rel="stylesheet" type="text/css"/>
  10. <script type="text/javascript" src="jquery.js"></script>
  11. <script type="text/javascript" src="dynsections.js"></script>
  12. <link href="search/search.css" rel="stylesheet" type="text/css"/>
  13. <script type="text/javascript" src="search/searchdata.js"></script>
  14. <script type="text/javascript" src="search/search.js"></script>
  15. <link href="doxygen.css" rel="stylesheet" type="text/css" />
  16. </head>
  17. <body>
  18. <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
  19. <div id="titlearea">
  20. <table cellspacing="0" cellpadding="0">
  21. <tbody>
  22. <tr style="height: 56px;">
  23. <td id="projectlogo"><img alt="Logo" src="pahologo.png"/></td>
  24. <td id="projectalign" style="padding-left: 0.5em;">
  25. <div id="projectname">MQTT C Client Libraries Internals
  26. </div>
  27. </td>
  28. </tr>
  29. </tbody>
  30. </table>
  31. </div>
  32. <!-- end header part -->
  33. <!-- Generated by Doxygen 1.8.17 -->
  34. <script type="text/javascript">
  35. /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  36. var searchBox = new SearchBox("searchBox", "search",false,'Search');
  37. /* @license-end */
  38. </script>
  39. <script type="text/javascript" src="menudata.js"></script>
  40. <script type="text/javascript" src="menu.js"></script>
  41. <script type="text/javascript">
  42. /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  43. $(function() {
  44. initMenu('',true,false,'search.php','Search');
  45. $(document).ready(function() { init_search(); });
  46. });
  47. /* @license-end */</script>
  48. <div id="main-nav"></div>
  49. <!-- window showing the filter options -->
  50. <div id="MSearchSelectWindow"
  51. onmouseover="return searchBox.OnSearchSelectShow()"
  52. onmouseout="return searchBox.OnSearchSelectHide()"
  53. onkeydown="return searchBox.OnSearchSelectKey(event)">
  54. </div>
  55. <!-- iframe showing the search results (closed by default) -->
  56. <div id="MSearchResultsWindow">
  57. <iframe src="javascript:void(0)" frameborder="0"
  58. name="MSearchResults" id="MSearchResults">
  59. </iframe>
  60. </div>
  61. </div><!-- top -->
  62. <div class="header">
  63. <div class="summary">
  64. <a href="#define-members">Macros</a> &#124;
  65. <a href="#func-members">Functions</a> &#124;
  66. <a href="#var-members">Variables</a> </div>
  67. <div class="headertitle">
  68. <div class="title">Messages.c File Reference</div> </div>
  69. </div><!--header-->
  70. <div class="contents">
  71. <p>Trace messages.
  72. <a href="#details">More...</a></p>
  73. <div class="textblock"><code>#include &quot;Messages.h&quot;</code><br />
  74. <code>#include &quot;Log.h&quot;</code><br />
  75. <code>#include &lt;stdio.h&gt;</code><br />
  76. <code>#include &lt;stdlib.h&gt;</code><br />
  77. <code>#include &lt;string.h&gt;</code><br />
  78. <code>#include &quot;Heap.h&quot;</code><br />
  79. </div><div class="textblock"><div class="dynheader">
  80. Include dependency graph for Messages.c:</div>
  81. <div class="dyncontent">
  82. <div class="center"><img src="Messages_8c__incl.png" border="0" usemap="#Messages_8c" alt=""/></div>
  83. <map name="Messages_8c" id="Messages_8c">
  84. <area shape="rect" title="Trace messages." alt="" coords="75,5,167,32"/>
  85. <area shape="rect" title=" " alt="" coords="5,80,65,107"/>
  86. <area shape="rect" title=" " alt="" coords="89,80,152,107"/>
  87. <area shape="rect" title=" " alt="" coords="177,80,241,107"/>
  88. </map>
  89. </div>
  90. </div><table class="memberdecls">
  91. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
  92. Macros</h2></td></tr>
  93. <tr class="memitem:a25f003de16c08a4888b69f619d70f427"><td class="memItemLeft" align="right" valign="top"><a id="a25f003de16c08a4888b69f619d70f427"></a>
  94. #define&#160;</td><td class="memItemRight" valign="bottom"><b>ARRAY_SIZE</b>(a)&#160;&#160;&#160;(sizeof(a) / sizeof(a[0]))</td></tr>
  95. <tr class="separator:a25f003de16c08a4888b69f619d70f427"><td class="memSeparator" colspan="2">&#160;</td></tr>
  96. <tr class="memitem:a0501b4f721f414af3be2412a4407baa3"><td class="memItemLeft" align="right" valign="top"><a id="a0501b4f721f414af3be2412a4407baa3"></a>
  97. #define&#160;</td><td class="memItemRight" valign="bottom"><b>max_msg_len</b>&#160;&#160;&#160;120</td></tr>
  98. <tr class="separator:a0501b4f721f414af3be2412a4407baa3"><td class="memSeparator" colspan="2">&#160;</td></tr>
  99. </table><table class="memberdecls">
  100. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
  101. Functions</h2></td></tr>
  102. <tr class="memitem:ab0c342273f8f7d3c206314ae8215a14c"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="Messages_8c.html#ab0c342273f8f7d3c206314ae8215a14c">Messages_get</a> (int index, enum LOG_LEVELS log_level)</td></tr>
  103. <tr class="memdesc:ab0c342273f8f7d3c206314ae8215a14c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get a log message by its index. <a href="Messages_8c.html#ab0c342273f8f7d3c206314ae8215a14c">More...</a><br /></td></tr>
  104. <tr class="separator:ab0c342273f8f7d3c206314ae8215a14c"><td class="memSeparator" colspan="2">&#160;</td></tr>
  105. </table><table class="memberdecls">
  106. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="var-members"></a>
  107. Variables</h2></td></tr>
  108. <tr class="memitem:a47e9d77b3e172ece1191f0783a76d77d"><td class="memItemLeft" align="right" valign="top"><a id="a47e9d77b3e172ece1191f0783a76d77d"></a>
  109. static const char *&#160;</td><td class="memItemRight" valign="bottom"><b>protocol_message_list</b> []</td></tr>
  110. <tr class="separator:a47e9d77b3e172ece1191f0783a76d77d"><td class="memSeparator" colspan="2">&#160;</td></tr>
  111. <tr class="memitem:ac8d1fa961cffcd7242e54eff3fff797b"><td class="memItemLeft" align="right" valign="top">static const char *&#160;</td><td class="memItemRight" valign="bottom"><b>trace_message_list</b> []</td></tr>
  112. <tr class="separator:ac8d1fa961cffcd7242e54eff3fff797b"><td class="memSeparator" colspan="2">&#160;</td></tr>
  113. </table>
  114. <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
  115. <div class="textblock"><p>Trace messages. </p>
  116. </div><h2 class="groupheader">Function Documentation</h2>
  117. <a id="ab0c342273f8f7d3c206314ae8215a14c"></a>
  118. <h2 class="memtitle"><span class="permalink"><a href="#ab0c342273f8f7d3c206314ae8215a14c">&#9670;&nbsp;</a></span>Messages_get()</h2>
  119. <div class="memitem">
  120. <div class="memproto">
  121. <table class="memname">
  122. <tr>
  123. <td class="memname">const char* Messages_get </td>
  124. <td>(</td>
  125. <td class="paramtype">int&#160;</td>
  126. <td class="paramname"><em>index</em>, </td>
  127. </tr>
  128. <tr>
  129. <td class="paramkey"></td>
  130. <td></td>
  131. <td class="paramtype">enum LOG_LEVELS&#160;</td>
  132. <td class="paramname"><em>log_level</em>&#160;</td>
  133. </tr>
  134. <tr>
  135. <td></td>
  136. <td>)</td>
  137. <td></td><td></td>
  138. </tr>
  139. </table>
  140. </div><div class="memdoc">
  141. <p>Get a log message by its index. </p>
  142. <dl class="params"><dt>Parameters</dt><dd>
  143. <table class="params">
  144. <tr><td class="paramname">index</td><td>the integer index </td></tr>
  145. <tr><td class="paramname">log_level</td><td>the log level, used to determine which message list to use </td></tr>
  146. </table>
  147. </dd>
  148. </dl>
  149. <dl class="section return"><dt>Returns</dt><dd>the message format string </dd></dl>
  150. </div>
  151. </div>
  152. <h2 class="groupheader">Variable Documentation</h2>
  153. <a id="ac8d1fa961cffcd7242e54eff3fff797b"></a>
  154. <h2 class="memtitle"><span class="permalink"><a href="#ac8d1fa961cffcd7242e54eff3fff797b">&#9670;&nbsp;</a></span>trace_message_list</h2>
  155. <div class="memitem">
  156. <div class="memproto">
  157. <table class="mlabels">
  158. <tr>
  159. <td class="mlabels-left">
  160. <table class="memname">
  161. <tr>
  162. <td class="memname">const char* trace_message_list[]</td>
  163. </tr>
  164. </table>
  165. </td>
  166. <td class="mlabels-right">
  167. <span class="mlabels"><span class="mlabel">static</span></span> </td>
  168. </tr>
  169. </table>
  170. </div><div class="memdoc">
  171. <b>Initial value:</b><div class="fragment"><div class="line">=</div>
  172. <div class="line">{</div>
  173. <div class="line"> <span class="stringliteral">&quot;Failed to remove client from bstate-&gt;clients&quot;</span>, </div>
  174. <div class="line"> <span class="stringliteral">&quot;Removed client %s from bstate-&gt;clients, socket %d&quot;</span>, </div>
  175. <div class="line"> <span class="stringliteral">&quot;Packet_Factory: unhandled packet type %d&quot;</span>, </div>
  176. <div class="line"> <span class="stringliteral">&quot;Packet %s received from client %s for message identifier %d, but no record of that message identifier found&quot;</span>, </div>
  177. <div class="line"> <span class="stringliteral">&quot;Packet %s received from client %s for message identifier %d, but message is wrong QoS, %d&quot;</span>, </div>
  178. <div class="line"> <span class="stringliteral">&quot;Packet %s received from client %s for message identifier %d, but message is in wrong state&quot;</span>, </div>
  179. <div class="line"> <span class="stringliteral">&quot;%s received from client %s for message id %d - removing publication&quot;</span>, </div>
  180. <div class="line"> <span class="stringliteral">&quot;Trying %s again for client %s, socket %d, message identifier %d&quot;</span>, </div>
  181. <div class="line"> <span class="stringliteral">&quot;&quot;</span>, </div>
  182. <div class="line"> <span class="stringliteral">&quot;(%lu) %*s(%d)&gt; %s:%d&quot;</span>, </div>
  183. <div class="line"> <span class="stringliteral">&quot;(%lu) %*s(%d)&lt; %s:%d&quot;</span>, </div>
  184. <div class="line"> <span class="stringliteral">&quot;(%lu) %*s(%d)&lt; %s:%d (%d)&quot;</span>, </div>
  185. <div class="line"> <span class="stringliteral">&quot;Storing unsent QoS 0 message&quot;</span>, </div>
  186. <div class="line">}</div>
  187. </div><!-- fragment -->
  188. </div>
  189. </div>
  190. </div><!-- contents -->
  191. <!-- start footer part -->
  192. <hr class="footer"/><address class="footer"><small>
  193. Generated on Thu Sep 29 2022 11:34:46 for MQTT C Client Libraries Internals by &#160;<a href="http://www.doxygen.org/index.html">
  194. <img class="footer" src="doxygen.png" alt="doxygen"/>
  195. </a> 1.8.17
  196. </small></address>
  197. </body>
  198. </html>