mirror of
https://github.com/eclipse/paho.mqtt.c.git
synced 2025-05-09 18:31:01 +08:00
233 lines
15 KiB
HTML
233 lines
15 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">
|
|
<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.17"/>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
|
<title>MQTT C Client Libraries Internals: MQTTClient_message Struct Reference</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="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="projectlogo"><img alt="Logo" src="pahologo.png"/></td>
|
|
<td id="projectalign" style="padding-left: 0.5em;">
|
|
<div id="projectname">MQTT C Client Libraries Internals
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<!-- end header part -->
|
|
<!-- Generated by Doxygen 1.8.17 -->
|
|
<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>
|
|
<!-- 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><!-- top -->
|
|
<div class="header">
|
|
<div class="summary">
|
|
<a href="#pub-attribs">Data Fields</a> </div>
|
|
<div class="headertitle">
|
|
<div class="title">MQTTClient_message Struct Reference</div> </div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
|
|
<p>A structure representing the payload and attributes of an MQTT message.
|
|
<a href="structMQTTClient__message.html#details">More...</a></p>
|
|
|
|
<p><code>#include <MQTTClient.h></code></p>
|
|
<div class="dynheader">
|
|
Collaboration diagram for MQTTClient_message:</div>
|
|
<div class="dyncontent">
|
|
<div class="center"><img src="structMQTTClient__message__coll__graph.png" border="0" usemap="#MQTTClient__message_coll__map" alt="Collaboration graph"/></div>
|
|
<map name="MQTTClient__message_coll__map" id="MQTTClient__message_coll__map">
|
|
<area shape="rect" title="A structure representing the payload and attributes of an MQTT message." alt="" coords="5,288,157,315"/>
|
|
<area shape="rect" href="structMQTTProperties.html" title="MQTT version 5 property list." alt="" coords="22,199,141,225"/>
|
|
<area shape="rect" href="structMQTTProperty.html" title="Structure to hold an MQTT version 5 property of any type." alt="" coords="28,109,135,136"/>
|
|
<area shape="rect" href="structMQTTLenString.html" title="The data for a length delimited string." alt="" coords="24,5,139,32"/>
|
|
</map>
|
|
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
|
|
<table class="memberdecls">
|
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
|
|
Data Fields</h2></td></tr>
|
|
<tr class="memitem:a7f5160eeef15b17f7c8ac493015f558d"><td class="memItemLeft" align="right" valign="top">char </td><td class="memItemRight" valign="bottom"><a class="el" href="structMQTTClient__message.html#a7f5160eeef15b17f7c8ac493015f558d">struct_id</a> [4]</td></tr>
|
|
<tr class="memdesc:a7f5160eeef15b17f7c8ac493015f558d"><td class="mdescLeft"> </td><td class="mdescRight">The eyecatcher for this structure. <a href="structMQTTClient__message.html#a7f5160eeef15b17f7c8ac493015f558d">More...</a><br /></td></tr>
|
|
<tr class="separator:a7f5160eeef15b17f7c8ac493015f558d"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a27b983a1ac95eb5c335d40840129c0c8"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="structMQTTClient__message.html#a27b983a1ac95eb5c335d40840129c0c8">struct_version</a></td></tr>
|
|
<tr class="memdesc:a27b983a1ac95eb5c335d40840129c0c8"><td class="mdescLeft"> </td><td class="mdescRight">The version number of this structure. <a href="structMQTTClient__message.html#a27b983a1ac95eb5c335d40840129c0c8">More...</a><br /></td></tr>
|
|
<tr class="separator:a27b983a1ac95eb5c335d40840129c0c8"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a85b39bde61ef9f5ed853ad6489145a94"><td class="memItemLeft" align="right" valign="top"><a id="a85b39bde61ef9f5ed853ad6489145a94"></a>
|
|
int </td><td class="memItemRight" valign="bottom"><a class="el" href="structMQTTClient__message.html#a85b39bde61ef9f5ed853ad6489145a94">payloadlen</a></td></tr>
|
|
<tr class="memdesc:a85b39bde61ef9f5ed853ad6489145a94"><td class="mdescLeft"> </td><td class="mdescRight">The length of the MQTT message payload in bytes. <br /></td></tr>
|
|
<tr class="separator:a85b39bde61ef9f5ed853ad6489145a94"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a90437a223f235ad4412d0c7c69f08125"><td class="memItemLeft" align="right" valign="top"><a id="a90437a223f235ad4412d0c7c69f08125"></a>
|
|
void * </td><td class="memItemRight" valign="bottom"><a class="el" href="structMQTTClient__message.html#a90437a223f235ad4412d0c7c69f08125">payload</a></td></tr>
|
|
<tr class="memdesc:a90437a223f235ad4412d0c7c69f08125"><td class="mdescLeft"> </td><td class="mdescRight">A pointer to the payload of the MQTT message. <br /></td></tr>
|
|
<tr class="separator:a90437a223f235ad4412d0c7c69f08125"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ab981c28422ec70dbf8127a4f7164d964"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="structMQTTClient__message.html#ab981c28422ec70dbf8127a4f7164d964">qos</a></td></tr>
|
|
<tr class="memdesc:ab981c28422ec70dbf8127a4f7164d964"><td class="mdescLeft"> </td><td class="mdescRight">The quality of service (QoS) assigned to the message. <a href="structMQTTClient__message.html#ab981c28422ec70dbf8127a4f7164d964">More...</a><br /></td></tr>
|
|
<tr class="separator:ab981c28422ec70dbf8127a4f7164d964"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:aad83220f265db124174ad79f528bb367"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="structMQTTClient__message.html#aad83220f265db124174ad79f528bb367">retained</a></td></tr>
|
|
<tr class="memdesc:aad83220f265db124174ad79f528bb367"><td class="mdescLeft"> </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="structMQTTClient__message.html#aad83220f265db124174ad79f528bb367">More...</a><br /></td></tr>
|
|
<tr class="separator:aad83220f265db124174ad79f528bb367"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:abbb5f23377bd9f39cc79756786fa45cc"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="structMQTTClient__message.html#abbb5f23377bd9f39cc79756786fa45cc">dup</a></td></tr>
|
|
<tr class="memdesc:abbb5f23377bd9f39cc79756786fa45cc"><td class="mdescLeft"> </td><td class="mdescRight">The dup flag indicates whether or not this message is a duplicate. <a href="structMQTTClient__message.html#abbb5f23377bd9f39cc79756786fa45cc">More...</a><br /></td></tr>
|
|
<tr class="separator:abbb5f23377bd9f39cc79756786fa45cc"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a3be81df63644606036c0a139564a1d92"><td class="memItemLeft" align="right" valign="top"><a id="a3be81df63644606036c0a139564a1d92"></a>
|
|
int </td><td class="memItemRight" valign="bottom"><a class="el" href="structMQTTClient__message.html#a3be81df63644606036c0a139564a1d92">msgid</a></td></tr>
|
|
<tr class="memdesc:a3be81df63644606036c0a139564a1d92"><td class="mdescLeft"> </td><td class="mdescRight">The message identifier is normally reserved for internal use by the MQTT client and server. <br /></td></tr>
|
|
<tr class="separator:a3be81df63644606036c0a139564a1d92"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:aa24d24d388481c0616a704cabb041f95"><td class="memItemLeft" align="right" valign="top"><a id="aa24d24d388481c0616a704cabb041f95"></a>
|
|
<a class="el" href="structMQTTProperties.html">MQTTProperties</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="structMQTTClient__message.html#aa24d24d388481c0616a704cabb041f95">properties</a></td></tr>
|
|
<tr class="memdesc:aa24d24d388481c0616a704cabb041f95"><td class="mdescLeft"> </td><td class="mdescRight">The MQTT V5 properties associated with the message. <br /></td></tr>
|
|
<tr class="separator:aa24d24d388481c0616a704cabb041f95"><td class="memSeparator" colspan="2"> </td></tr>
|
|
</table>
|
|
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
|
<div class="textblock"><p>A structure representing the payload and attributes of an MQTT message. </p>
|
|
<p>The message topic is not part of this structure (see <a class="el" href="MQTTClient_8c.html#a5e0cfa14237d7557bee2a59747ecadd3" title="This function attempts to publish a message to a given topic (see also MQTTClient_publish()).">MQTTClient_publishMessage()</a>, <a class="el" href="MQTTClient_8c.html#a3cd7a94b48d1d9c6b8af4b9203d69d37" title="This function attempts to publish a message to a given topic (see also MQTTClient_publishMessage()).">MQTTClient_publish()</a>, <a class="el" href="MQTTClient_8c.html#a4c2df88d00a3dadd510a8cb774739366" title="This function performs a synchronous receive of incoming messages.">MQTTClient_receive()</a>, <a class="el" href="MQTTClient_8c.html#a2bc00ce11e0cac5dbc0938c512b4ab31" title="This function frees memory allocated to an MQTT message, including the additional memory allocated to...">MQTTClient_freeMessage()</a> and MQTTClient_messageArrived()). </p>
|
|
</div><h2 class="groupheader">Field Documentation</h2>
|
|
<a id="abbb5f23377bd9f39cc79756786fa45cc"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#abbb5f23377bd9f39cc79756786fa45cc">◆ </a></span>dup</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">int MQTTClient_message::dup</td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>The dup flag indicates whether or not this message is a duplicate. </p>
|
|
<p>It is only meaningful when receiving QoS1 messages. When true, the client application should take appropriate action to deal with the duplicate message. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="ab981c28422ec70dbf8127a4f7164d964"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ab981c28422ec70dbf8127a4f7164d964">◆ </a></span>qos</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">int MQTTClient_message::qos</td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>The quality of service (QoS) assigned to the message. </p>
|
|
<p>There are three levels of QoS: </p><dl>
|
|
<dt><b>QoS0</b> </dt>
|
|
<dd>Fire and forget - the message may not be delivered </dd>
|
|
<dt><b>QoS1</b> </dt>
|
|
<dd>At least once - the message will be delivered, but may be delivered more than once in some circumstances. </dd>
|
|
<dt><b>QoS2</b> </dt>
|
|
<dd>Once and one only - the message will be delivered exactly once. </dd>
|
|
</dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="aad83220f265db124174ad79f528bb367"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#aad83220f265db124174ad79f528bb367">◆ </a></span>retained</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">int MQTTClient_message::retained</td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>The retained flag serves two purposes depending on whether the message it is associated with is being published or received. </p>
|
|
<p><b>retained = true</b><br />
|
|
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>
|
|
<p><b>retained = false</b> <br />
|
|
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>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a7f5160eeef15b17f7c8ac493015f558d"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a7f5160eeef15b17f7c8ac493015f558d">◆ </a></span>struct_id</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">char MQTTClient_message::struct_id[4]</td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>The eyecatcher for this structure. </p>
|
|
<p>must be MQTM. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a27b983a1ac95eb5c335d40840129c0c8"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a27b983a1ac95eb5c335d40840129c0c8">◆ </a></span>struct_version</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">int MQTTClient_message::struct_version</td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>The version number of this structure. </p>
|
|
<p>Must be 0 or 1 0 indicates no message properties </p>
|
|
|
|
</div>
|
|
</div>
|
|
<hr/>The documentation for this struct was generated from the following file:<ul>
|
|
<li>MQTTClient.h</li>
|
|
</ul>
|
|
</div><!-- contents -->
|
|
<!-- start footer part -->
|
|
<hr class="footer"/><address class="footer"><small>
|
|
Generated on Mon May 24 2021 18:05:54 for MQTT C Client Libraries Internals by  <a href="http://www.doxygen.org/index.html">
|
|
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
|
</a> 1.8.17
|
|
</small></address>
|
|
</body>
|
|
</html>
|