structMQTTAsync__message.html 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248
  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: MQTTAsync_message Struct 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="#pub-attribs">Data Fields</a> </div>
  65. <div class="headertitle">
  66. <div class="title">MQTTAsync_message Struct Reference</div> </div>
  67. </div><!--header-->
  68. <div class="contents">
  69. <p>A structure representing the payload and attributes of an MQTT message.
  70. <a href="structMQTTAsync__message.html#details">More...</a></p>
  71. <p><code>#include &lt;MQTTAsync.h&gt;</code></p>
  72. <div class="dynheader">
  73. Collaboration diagram for MQTTAsync_message:</div>
  74. <div class="dyncontent">
  75. <div class="center"><img src="structMQTTAsync__message__coll__graph.png" border="0" usemap="#MQTTAsync__message_coll__map" alt="Collaboration graph"/></div>
  76. <map name="MQTTAsync__message_coll__map" id="MQTTAsync__message_coll__map">
  77. <area shape="rect" title="A structure representing the payload and attributes of an MQTT message." alt="" coords="5,288,160,315"/>
  78. <area shape="rect" href="structMQTTProperties.html" title="MQTT version 5 property list." alt="" coords="23,199,142,225"/>
  79. <area shape="rect" href="structMQTTProperty.html" title="Structure to hold an MQTT version 5 property of any type." alt="" coords="29,109,136,136"/>
  80. <area shape="rect" href="structMQTTLenString.html" title="The data for a length delimited string." alt="" coords="25,5,140,32"/>
  81. </map>
  82. <center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
  83. <table class="memberdecls">
  84. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
  85. Data Fields</h2></td></tr>
  86. <tr class="memitem:a4621b522c9923c68003d30e9dba9aa4e"><td class="memItemLeft" align="right" valign="top">char&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structMQTTAsync__message.html#a4621b522c9923c68003d30e9dba9aa4e">struct_id</a> [4]</td></tr>
  87. <tr class="memdesc:a4621b522c9923c68003d30e9dba9aa4e"><td class="mdescLeft">&#160;</td><td class="mdescRight">The eyecatcher for this structure. <a href="structMQTTAsync__message.html#a4621b522c9923c68003d30e9dba9aa4e">More...</a><br /></td></tr>
  88. <tr class="separator:a4621b522c9923c68003d30e9dba9aa4e"><td class="memSeparator" colspan="2">&#160;</td></tr>
  89. <tr class="memitem:af79efdfc9a4e082cbbafaed8fd333ce1"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structMQTTAsync__message.html#af79efdfc9a4e082cbbafaed8fd333ce1">struct_version</a></td></tr>
  90. <tr class="memdesc:af79efdfc9a4e082cbbafaed8fd333ce1"><td class="mdescLeft">&#160;</td><td class="mdescRight">The version number of this structure. <a href="structMQTTAsync__message.html#af79efdfc9a4e082cbbafaed8fd333ce1">More...</a><br /></td></tr>
  91. <tr class="separator:af79efdfc9a4e082cbbafaed8fd333ce1"><td class="memSeparator" colspan="2">&#160;</td></tr>
  92. <tr class="memitem:a9271900e2789ff81e382a47842aaee8f"><td class="memItemLeft" align="right" valign="top"><a id="a9271900e2789ff81e382a47842aaee8f"></a>
  93. int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structMQTTAsync__message.html#a9271900e2789ff81e382a47842aaee8f">payloadlen</a></td></tr>
  94. <tr class="memdesc:a9271900e2789ff81e382a47842aaee8f"><td class="mdescLeft">&#160;</td><td class="mdescRight">The length of the MQTT message payload in bytes. <br /></td></tr>
  95. <tr class="separator:a9271900e2789ff81e382a47842aaee8f"><td class="memSeparator" colspan="2">&#160;</td></tr>
  96. <tr class="memitem:a13d88e9c871b5b39b73370a0784331af"><td class="memItemLeft" align="right" valign="top"><a id="a13d88e9c871b5b39b73370a0784331af"></a>
  97. void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structMQTTAsync__message.html#a13d88e9c871b5b39b73370a0784331af">payload</a></td></tr>
  98. <tr class="memdesc:a13d88e9c871b5b39b73370a0784331af"><td class="mdescLeft">&#160;</td><td class="mdescRight">A pointer to the payload of the MQTT message. <br /></td></tr>
  99. <tr class="separator:a13d88e9c871b5b39b73370a0784331af"><td class="memSeparator" colspan="2">&#160;</td></tr>
  100. <tr class="memitem:a6e0971dbde0f04b6dd3bfab97ad5cdb7"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structMQTTAsync__message.html#a6e0971dbde0f04b6dd3bfab97ad5cdb7">qos</a></td></tr>
  101. <tr class="memdesc:a6e0971dbde0f04b6dd3bfab97ad5cdb7"><td class="mdescLeft">&#160;</td><td class="mdescRight">The quality of service (QoS) assigned to the message. <a href="structMQTTAsync__message.html#a6e0971dbde0f04b6dd3bfab97ad5cdb7">More...</a><br /></td></tr>
  102. <tr class="separator:a6e0971dbde0f04b6dd3bfab97ad5cdb7"><td class="memSeparator" colspan="2">&#160;</td></tr>
  103. <tr class="memitem:a680f5368d5a13ff605466ab6a3d881bd"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structMQTTAsync__message.html#a680f5368d5a13ff605466ab6a3d881bd">retained</a></td></tr>
  104. <tr class="memdesc:a680f5368d5a13ff605466ab6a3d881bd"><td class="mdescLeft">&#160;</td><td class="mdescRight">The retained flag serves two purposes depending on whether the message it is associated with is being published or received. <a href="structMQTTAsync__message.html#a680f5368d5a13ff605466ab6a3d881bd">More...</a><br /></td></tr>
  105. <tr class="separator:a680f5368d5a13ff605466ab6a3d881bd"><td class="memSeparator" colspan="2">&#160;</td></tr>
  106. <tr class="memitem:aa9da73253863089ee90033c7f0dd28bf"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structMQTTAsync__message.html#aa9da73253863089ee90033c7f0dd28bf">dup</a></td></tr>
  107. <tr class="memdesc:aa9da73253863089ee90033c7f0dd28bf"><td class="mdescLeft">&#160;</td><td class="mdescRight">The dup flag indicates whether or not this message is a duplicate. <a href="structMQTTAsync__message.html#aa9da73253863089ee90033c7f0dd28bf">More...</a><br /></td></tr>
  108. <tr class="separator:aa9da73253863089ee90033c7f0dd28bf"><td class="memSeparator" colspan="2">&#160;</td></tr>
  109. <tr class="memitem:a2c8572ec595842768848982321835bfe"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structMQTTAsync__message.html#a2c8572ec595842768848982321835bfe">msgid</a></td></tr>
  110. <tr class="memdesc:a2c8572ec595842768848982321835bfe"><td class="mdescLeft">&#160;</td><td class="mdescRight">The message identifier is reserved for internal use by the MQTT client and server. <a href="structMQTTAsync__message.html#a2c8572ec595842768848982321835bfe">More...</a><br /></td></tr>
  111. <tr class="separator:a2c8572ec595842768848982321835bfe"><td class="memSeparator" colspan="2">&#160;</td></tr>
  112. <tr class="memitem:a48ff43122b16a12b6b8a9890ebfb6410"><td class="memItemLeft" align="right" valign="top"><a id="a48ff43122b16a12b6b8a9890ebfb6410"></a>
  113. <a class="el" href="structMQTTProperties.html">MQTTProperties</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structMQTTAsync__message.html#a48ff43122b16a12b6b8a9890ebfb6410">properties</a></td></tr>
  114. <tr class="memdesc:a48ff43122b16a12b6b8a9890ebfb6410"><td class="mdescLeft">&#160;</td><td class="mdescRight">The MQTT V5 properties associated with the message. <br /></td></tr>
  115. <tr class="separator:a48ff43122b16a12b6b8a9890ebfb6410"><td class="memSeparator" colspan="2">&#160;</td></tr>
  116. </table>
  117. <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
  118. <div class="textblock"><p>A structure representing the payload and attributes of an MQTT message. </p>
  119. <p>The message topic is not part of this structure (see MQTTAsync_publishMessage(), MQTTAsync_publish(), MQTTAsync_receive(), MQTTAsync_freeMessage() and MQTTAsync_messageArrived()). </p>
  120. </div><h2 class="groupheader">Field Documentation</h2>
  121. <a id="aa9da73253863089ee90033c7f0dd28bf"></a>
  122. <h2 class="memtitle"><span class="permalink"><a href="#aa9da73253863089ee90033c7f0dd28bf">&#9670;&nbsp;</a></span>dup</h2>
  123. <div class="memitem">
  124. <div class="memproto">
  125. <table class="memname">
  126. <tr>
  127. <td class="memname">int MQTTAsync_message::dup</td>
  128. </tr>
  129. </table>
  130. </div><div class="memdoc">
  131. <p>The dup flag indicates whether or not this message is a duplicate. </p>
  132. <p>It is only meaningful when receiving QoS1 messages. When true, the client application should take appropriate action to deal with the duplicate message. This is an output parameter only. </p>
  133. </div>
  134. </div>
  135. <a id="a2c8572ec595842768848982321835bfe"></a>
  136. <h2 class="memtitle"><span class="permalink"><a href="#a2c8572ec595842768848982321835bfe">&#9670;&nbsp;</a></span>msgid</h2>
  137. <div class="memitem">
  138. <div class="memproto">
  139. <table class="memname">
  140. <tr>
  141. <td class="memname">int MQTTAsync_message::msgid</td>
  142. </tr>
  143. </table>
  144. </div><div class="memdoc">
  145. <p>The message identifier is reserved for internal use by the MQTT client and server. </p>
  146. <p>It is an output parameter only - writing to it will serve no purpose. It contains the MQTT message id of an incoming publish message. </p>
  147. </div>
  148. </div>
  149. <a id="a6e0971dbde0f04b6dd3bfab97ad5cdb7"></a>
  150. <h2 class="memtitle"><span class="permalink"><a href="#a6e0971dbde0f04b6dd3bfab97ad5cdb7">&#9670;&nbsp;</a></span>qos</h2>
  151. <div class="memitem">
  152. <div class="memproto">
  153. <table class="memname">
  154. <tr>
  155. <td class="memname">int MQTTAsync_message::qos</td>
  156. </tr>
  157. </table>
  158. </div><div class="memdoc">
  159. <p>The quality of service (QoS) assigned to the message. </p>
  160. <p>There are three levels of QoS: </p><dl>
  161. <dt><b>QoS0</b> </dt>
  162. <dd>Fire and forget - the message may not be delivered </dd>
  163. <dt><b>QoS1</b> </dt>
  164. <dd>At least once - the message will be delivered, but may be delivered more than once in some circumstances. </dd>
  165. <dt><b>QoS2</b> </dt>
  166. <dd>Once and one only - the message will be delivered exactly once. </dd>
  167. </dl>
  168. </div>
  169. </div>
  170. <a id="a680f5368d5a13ff605466ab6a3d881bd"></a>
  171. <h2 class="memtitle"><span class="permalink"><a href="#a680f5368d5a13ff605466ab6a3d881bd">&#9670;&nbsp;</a></span>retained</h2>
  172. <div class="memitem">
  173. <div class="memproto">
  174. <table class="memname">
  175. <tr>
  176. <td class="memname">int MQTTAsync_message::retained</td>
  177. </tr>
  178. </table>
  179. </div><div class="memdoc">
  180. <p>The retained flag serves two purposes depending on whether the message it is associated with is being published or received. </p>
  181. <p><b>retained = true</b><br />
  182. For messages being published, a true setting indicates that the MQTT server should retain a copy of the message. The message will then be transmitted to new subscribers to a topic that matches the message topic. For subscribers registering a new subscription, the flag being true indicates that the received message is not a new one, but one that has been retained by the MQTT server.</p>
  183. <p><b>retained = false</b> <br />
  184. For publishers, this indicates that this message should not be retained by the MQTT server. For subscribers, a false setting indicates this is a normal message, received as a result of it being published to the server. </p>
  185. </div>
  186. </div>
  187. <a id="a4621b522c9923c68003d30e9dba9aa4e"></a>
  188. <h2 class="memtitle"><span class="permalink"><a href="#a4621b522c9923c68003d30e9dba9aa4e">&#9670;&nbsp;</a></span>struct_id</h2>
  189. <div class="memitem">
  190. <div class="memproto">
  191. <table class="memname">
  192. <tr>
  193. <td class="memname">char MQTTAsync_message::struct_id[4]</td>
  194. </tr>
  195. </table>
  196. </div><div class="memdoc">
  197. <p>The eyecatcher for this structure. </p>
  198. <p>must be MQTM. </p>
  199. </div>
  200. </div>
  201. <a id="af79efdfc9a4e082cbbafaed8fd333ce1"></a>
  202. <h2 class="memtitle"><span class="permalink"><a href="#af79efdfc9a4e082cbbafaed8fd333ce1">&#9670;&nbsp;</a></span>struct_version</h2>
  203. <div class="memitem">
  204. <div class="memproto">
  205. <table class="memname">
  206. <tr>
  207. <td class="memname">int MQTTAsync_message::struct_version</td>
  208. </tr>
  209. </table>
  210. </div><div class="memdoc">
  211. <p>The version number of this structure. </p>
  212. <p>Must be 0 or 1. 0 indicates no message properties </p>
  213. </div>
  214. </div>
  215. <hr/>The documentation for this struct was generated from the following file:<ul>
  216. <li>MQTTAsync.h</li>
  217. </ul>
  218. </div><!-- contents -->
  219. <!-- start footer part -->
  220. <hr class="footer"/><address class="footer"><small>
  221. 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">
  222. <img class="footer" src="doxygen.png" alt="doxygen"/>
  223. </a> 1.8.17
  224. </small></address>
  225. </body>
  226. </html>