MqttMonitor/Documentation/source/Plugin_Mqtt_Monitor.MqttMonitor.MqttClient.html

branch
eric7
changeset 123
3d7e63ed4fd1
parent 115
357257ad48d2
child 132
b4fde9ee3d83
--- a/MqttMonitor/Documentation/source/Plugin_Mqtt_Monitor.MqttMonitor.MqttClient.html	Thu Dec 30 16:36:40 2021 +0100
+++ b/MqttMonitor/Documentation/source/Plugin_Mqtt_Monitor.MqttMonitor.MqttClient.html	Wed Sep 21 09:42:33 2022 +0200
@@ -153,8 +153,52 @@
 <td>Private method to initialize the MQTT callback methods.</td>
 </tr>
 <tr>
+<td><a href="#MqttClient.__onConnectV3">__onConnectV3</a></td>
+<td>Private method to handle the connect to the broker (MQTT v3.1 and v3.1.1).</td>
+</tr>
+<tr>
+<td><a href="#MqttClient.__onConnectV5">__onConnectV5</a></td>
+<td>Private method to handle the connect to the broker (MQTT v5.0).</td>
+</tr>
+<tr>
+<td><a href="#MqttClient.__onDisconnectedV3">__onDisconnectedV3</a></td>
+<td>Private method to handle the disconnect from the broker (MQTT v3.1 and v3.1.1).</td>
+</tr>
+<tr>
 <td><a href="#MqttClient.__onDisconnectedV5">__onDisconnectedV5</a></td>
-<td>Private method to handle the disconnect from the broker.</td>
+<td>Private method to handle the disconnect from the broker (MQTT v5.0).</td>
+</tr>
+<tr>
+<td><a href="#MqttClient.__onLog">__onLog</a></td>
+<td>Private method to handle a log event (MQTT v3.1, v3.1.1 and v5.0).</td>
+</tr>
+<tr>
+<td><a href="#MqttClient.__onMessageV3">__onMessageV3</a></td>
+<td>Private method to handle a new message received from the broker (MQTT v3.1 and v3.1.1).</td>
+</tr>
+<tr>
+<td><a href="#MqttClient.__onMessageV5">__onMessageV5</a></td>
+<td>Private method to handle a new message received from the broker (MQTT v5.0).</td>
+</tr>
+<tr>
+<td><a href="#MqttClient.__onPublish">__onPublish</a></td>
+<td>Private method to handle the publishing of a message (MQTT v3.1, v3.1.1 and v5.0).</td>
+</tr>
+<tr>
+<td><a href="#MqttClient.__onSubscribeV3">__onSubscribeV3</a></td>
+<td>Private method to handle a subscribe event (MQTT v3.1 and v3.1.1).</td>
+</tr>
+<tr>
+<td><a href="#MqttClient.__onSubscribeV5">__onSubscribeV5</a></td>
+<td>Private method to handle a subscribe event (MQTT v5.0).</td>
+</tr>
+<tr>
+<td><a href="#MqttClient.__onUnsubscribeV3">__onUnsubscribeV3</a></td>
+<td>Private method to handle an unsubscribe event (MQTT v3.1 and v3.1.1).</td>
+</tr>
+<tr>
+<td><a href="#MqttClient.__onUnsubscribeV5">__onUnsubscribeV5</a></td>
+<td>Private method to handle an unsubscribe event (MQTT v5.0).</td>
 </tr>
 <tr>
 <td><a href="#MqttClient.clearLastWill">clearLastWill</a></td>
@@ -261,7 +305,7 @@
 </dl>
 <a NAME="MqttClient.__init__" ID="MqttClient.__init__"></a>
 <h4>MqttClient (Constructor)</h4>
-<b>MqttClient</b>(<i>clientId="", cleanSession=True, userdata=None, protocol=mqtt.MQTTv311, transport="tcp", parent=None</i>)
+<b>MqttClient</b>(<i>clientId="", cleanSession=True, userdata=None, protocol=mqtt.MQTTv311, transport="tcp", parent=None, </i>)
 
 <p>
         Constructor
@@ -344,12 +388,147 @@
 MQTT protocol version
 </dd>
 </dl>
+<a NAME="MqttClient.__onConnectV3" ID="MqttClient.__onConnectV3"></a>
+<h4>MqttClient.__onConnectV3</h4>
+<b>__onConnectV3</b>(<i>client, userdata, flags, rc, properties=None</i>)
+
+<p>
+        Private method to handle the connect to the broker (MQTT v3.1 and v3.1.1).
+</p>
+<dl>
+
+<dt><i>client</i> (paho.mqtt.Client)</dt>
+<dd>
+reference to the client object
+</dd>
+<dt><i>userdata</i> (Any)</dt>
+<dd>
+user data
+</dd>
+<dt><i>flags</i> (dict)</dt>
+<dd>
+dictionary containing the response flags sent by the broker
+</dd>
+<dt><i>rc</i> (int)</dt>
+<dd>
+result code
+</dd>
+<dt><i>properties</i> (dict (optional))</dt>
+<dd>
+optional properties (defaults to None)
+</dd>
+</dl>
+<a NAME="MqttClient.__onConnectV5" ID="MqttClient.__onConnectV5"></a>
+<h4>MqttClient.__onConnectV5</h4>
+<b>__onConnectV5</b>(<i>client, userdata, flags, rc, properties=None</i>)
+
+<p>
+        Private method to handle the connect to the broker (MQTT v5.0).
+</p>
+<dl>
+
+<dt><i>client</i> (paho.mqtt.Client)</dt>
+<dd>
+reference to the client object
+</dd>
+<dt><i>userdata</i> (Any)</dt>
+<dd>
+user data
+</dd>
+<dt><i>flags</i> (dict)</dt>
+<dd>
+dictionary containing the response flags sent by the broker
+</dd>
+<dt><i>rc</i> (paho.mqtt.ReasonCodes)</dt>
+<dd>
+reason code
+</dd>
+<dt><i>properties</i> (dict (optional))</dt>
+<dd>
+optional properties (defaults to None)
+</dd>
+</dl>
+<a NAME="MqttClient.__onDisconnectedV3" ID="MqttClient.__onDisconnectedV3"></a>
+<h4>MqttClient.__onDisconnectedV3</h4>
+<b>__onDisconnectedV3</b>(<i>client, userdata, rc</i>)
+
+<p>
+        Private method to handle the disconnect from the broker (MQTT v3.1 and v3.1.1).
+</p>
+<dl>
+
+<dt><i>client</i> (paho.mqtt.Client)</dt>
+<dd>
+reference to the client object
+</dd>
+<dt><i>userdata</i> (Any)</dt>
+<dd>
+user data
+</dd>
+<dt><i>rc</i> (int)</dt>
+<dd>
+result code
+</dd>
+</dl>
 <a NAME="MqttClient.__onDisconnectedV5" ID="MqttClient.__onDisconnectedV5"></a>
 <h4>MqttClient.__onDisconnectedV5</h4>
 <b>__onDisconnectedV5</b>(<i>client, userdata, rc, properties=None</i>)
 
 <p>
-        Private method to handle the disconnect from the broker.
+        Private method to handle the disconnect from the broker (MQTT v5.0).
+</p>
+<dl>
+
+<dt><i>client</i> (paho.mqtt.Client)</dt>
+<dd>
+reference to the client object
+</dd>
+<dt><i>userdata</i> (Any)</dt>
+<dd>
+user data
+</dd>
+<dt><i>rc</i> (int or paho.mqtt.ReasonCodes)</dt>
+<dd>
+result code or reason code
+</dd>
+<dt><i>properties</i> (dict (optional))</dt>
+<dd>
+optional properties (defaults to None)
+</dd>
+</dl>
+<a NAME="MqttClient.__onLog" ID="MqttClient.__onLog"></a>
+<h4>MqttClient.__onLog</h4>
+<b>__onLog</b>(<i>client, userdata, level, buf</i>)
+
+<p>
+        Private method to handle a log event (MQTT v3.1, v3.1.1 and v5.0).
+</p>
+<dl>
+
+<dt><i>client</i> (paho.mqtt.Client)</dt>
+<dd>
+reference to the client object
+</dd>
+<dt><i>userdata</i> (Any)</dt>
+<dd>
+user data
+</dd>
+<dt><i>level</i> (int)</dt>
+<dd>
+severity of the log message
+</dd>
+<dt><i>buf</i> (str)</dt>
+<dd>
+log message
+</dd>
+</dl>
+<a NAME="MqttClient.__onMessageV3" ID="MqttClient.__onMessageV3"></a>
+<h4>MqttClient.__onMessageV3</h4>
+<b>__onMessageV3</b>(<i>client, userdata, message</i>)
+
+<p>
+        Private method to handle a new message received from the broker (MQTT v3.1
+        and v3.1.1).
 </p>
 <dl>
 
@@ -361,15 +540,164 @@
 <dd>
 user data
 </dd>
-<dt><i>rc</i> (int or ReasonCodes)</dt>
+<dt><i>message</i> (paho.mqtt.MQTTMessage)</dt>
+<dd>
+received message object
+</dd>
+</dl>
+<a NAME="MqttClient.__onMessageV5" ID="MqttClient.__onMessageV5"></a>
+<h4>MqttClient.__onMessageV5</h4>
+<b>__onMessageV5</b>(<i>client, userdata, message</i>)
+
+<p>
+        Private method to handle a new message received from the broker (MQTT v5.0).
+</p>
+<dl>
+
+<dt><i>client</i> (paho.mqtt.Client)</dt>
+<dd>
+reference to the client object
+</dd>
+<dt><i>userdata</i> (Any)</dt>
+<dd>
+user data
+</dd>
+<dt><i>message</i> (paho.mqtt.MQTTMessage)</dt>
+<dd>
+received message object
+</dd>
+</dl>
+<a NAME="MqttClient.__onPublish" ID="MqttClient.__onPublish"></a>
+<h4>MqttClient.__onPublish</h4>
+<b>__onPublish</b>(<i>client, userdata, mid</i>)
+
+<p>
+        Private method to handle the publishing of a message (MQTT v3.1, v3.1.1
+        and v5.0).
+</p>
+<dl>
+
+<dt><i>client</i> (paho.mqtt.Client)</dt>
+<dd>
+reference to the client object
+</dd>
+<dt><i>userdata</i> (Any)</dt>
+<dd>
+user data
+</dd>
+<dt><i>mid</i> (int)</dt>
 <dd>
-result code or reason code
+message ID
+</dd>
+</dl>
+<a NAME="MqttClient.__onSubscribeV3" ID="MqttClient.__onSubscribeV3"></a>
+<h4>MqttClient.__onSubscribeV3</h4>
+<b>__onSubscribeV3</b>(<i>client, userdata, mid, grantedQos</i>)
+
+<p>
+        Private method to handle a subscribe event (MQTT v3.1 and v3.1.1).
+</p>
+<dl>
+
+<dt><i>client</i> (paho.mqtt.Client)</dt>
+<dd>
+reference to the client object
+</dd>
+<dt><i>userdata</i> (Any)</dt>
+<dd>
+user data
+</dd>
+<dt><i>mid</i> (int)</dt>
+<dd>
+message ID
+</dd>
+<dt><i>grantedQos</i> (list of int)</dt>
+<dd>
+list of granted QoS for each subscription request
+</dd>
+</dl>
+<a NAME="MqttClient.__onSubscribeV5" ID="MqttClient.__onSubscribeV5"></a>
+<h4>MqttClient.__onSubscribeV5</h4>
+<b>__onSubscribeV5</b>(<i>client, userdata, mid, reasonCodes, properties=None</i>)
+
+<p>
+        Private method to handle a subscribe event (MQTT v5.0).
+</p>
+<dl>
+
+<dt><i>client</i> (paho.mqtt.Client)</dt>
+<dd>
+reference to the client object
+</dd>
+<dt><i>userdata</i> (Any)</dt>
+<dd>
+user data
+</dd>
+<dt><i>mid</i> (int)</dt>
+<dd>
+message ID
+</dd>
+<dt><i>reasonCodes</i> (list of paho.mqtt.ReasonCodes)</dt>
+<dd>
+list of reason code for each subscribed topic
 </dd>
 <dt><i>properties</i> (dict (optional))</dt>
 <dd>
 optional properties (defaults to None)
 </dd>
 </dl>
+<a NAME="MqttClient.__onUnsubscribeV3" ID="MqttClient.__onUnsubscribeV3"></a>
+<h4>MqttClient.__onUnsubscribeV3</h4>
+<b>__onUnsubscribeV3</b>(<i>client, userdata, mid</i>)
+
+<p>
+        Private method to handle an unsubscribe event (MQTT v3.1 and v3.1.1).
+</p>
+<dl>
+
+<dt><i>client</i> (paho.mqtt.Client)</dt>
+<dd>
+reference to the client object
+</dd>
+<dt><i>userdata</i> (Any)</dt>
+<dd>
+user data
+</dd>
+<dt><i>mid</i> (int)</dt>
+<dd>
+message ID
+</dd>
+</dl>
+<a NAME="MqttClient.__onUnsubscribeV5" ID="MqttClient.__onUnsubscribeV5"></a>
+<h4>MqttClient.__onUnsubscribeV5</h4>
+<b>__onUnsubscribeV5</b>(<i>client, userdata, mid, properties, reasonCodes</i>)
+
+<p>
+        Private method to handle an unsubscribe event (MQTT v5.0).
+</p>
+<dl>
+
+<dt><i>client</i> (paho.mqtt.Client)</dt>
+<dd>
+reference to the client object
+</dd>
+<dt><i>userdata</i> (Any)</dt>
+<dd>
+user data
+</dd>
+<dt><i>mid</i> (int)</dt>
+<dd>
+message ID
+</dd>
+<dt><i>properties</i> (dict (optional))</dt>
+<dd>
+optional properties (defaults to None)
+</dd>
+<dt><i>reasonCodes</i> (list of paho.mqtt.ReasonCodes)</dt>
+<dd>
+list of reason code for each unsubscribed topic
+</dd>
+</dl>
 <a NAME="MqttClient.clearLastWill" ID="MqttClient.clearLastWill"></a>
 <h4>MqttClient.clearLastWill</h4>
 <b>clearLastWill</b>(<i></i>)
@@ -380,7 +708,7 @@
 </p>
 <a NAME="MqttClient.connectToServer" ID="MqttClient.connectToServer"></a>
 <h4>MqttClient.connectToServer</h4>
-<b>connectToServer</b>(<i>host, port=1883, keepalive=60, bindAddress="", properties=None, clearWill=False</i>)
+<b>connectToServer</b>(<i>host, port=1883, keepalive=60, bindAddress="", properties=None, clearWill=False, </i>)
 
 <p>
         Public method to connect to a remote MQTT broker.

eric ide

mercurial