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

branch
eric7
changeset 143
51bc5bcc672a
parent 141
864edfb1bb63
--- a/MqttMonitor/Documentation/source/Plugin_Mqtt_Monitor.MqttMonitor.MqttClient.html	Sat Jan 06 13:11:01 2024 +0100
+++ b/MqttMonitor/Documentation/source/Plugin_Mqtt_Monitor.MqttMonitor.MqttClient.html	Fri Apr 19 15:15:01 2024 +0200
@@ -27,10 +27,6 @@
 <h3>Functions</h3>
 <table>
 <tr>
-<td><a href="#mqttConnackMessage">mqttConnackMessage</a></td>
-<td>Module function to get the string associated with a CONNACK result.</td>
-</tr>
-<tr>
 <td><a href="#mqttErrorMessage">mqttErrorMessage</a></td>
 <td>Module function to get the error string associated with an MQTT error number.</td>
 </tr>
@@ -56,59 +52,40 @@
 emitted to indicate, that a connection attempt
         timed out
 </dd>
-<dt>onConnectV3(flags, rc)</dt>
-<dd>
-emitted after the client has connected to
-        the broker (MQTT v3)
-</dd>
-<dt>onConnectV5(flags, rc, packetType, properties emitted after theclient has connected to the broker (MQTT v5)</dt>
+<dt>onConnect(connectFlags, rc, packetType, properties)</dt>
 <dd>
-
+emitted after the
+        client has connected to the broker
 </dd>
-<dt>onDisconnectedV3(rc)</dt>
-<dd>
-emitted after the client has disconnected from
-        the broker (MQTT v3)
-</dd>
-<dt>onDisconnectedV5(rc, packetType)</dt>
+<dt>onDisconnected(rc, packetType)</dt>
 <dd>
 emitted after the client has
-        disconnected from the broker (MQTT v5)
+        disconnected from the broker
 </dd>
 <dt>onLog(level, message)</dt>
 <dd>
 emitted to send client log data
 </dd>
-<dt>onMessageV3(topic, payload, qos, retain)</dt>
-<dd>
-emitted after a message
-        has been received by the client (MQTT v3)
-</dd>
-<dt>onMessageV5(topic, payload, qos, retain, properties)</dt>
+<dt>onMessage(topic, payload, qos, retain, properties)</dt>
 <dd>
 emitted after
-        a message has been received by the client (MQTT v5)
+        a message has been received by the client
 </dd>
 <dt>onPublish(mid)</dt>
 <dd>
 emitted after a message has been published
 </dd>
-<dt>onSubscribeV3(mid, grantedQos)</dt>
-<dd>
-emitted after the client has
-        subscribed to some topics (MQTT v3)
-</dd>
-<dt>onSubscribeV5(mid, reasonCodes, properties)</dt>
+<dt>onSubscribe(mid, reasonCodes, properties)</dt>
 <dd>
 emitted after the
-        client has subscribed to some topics (MQTT v5)
+        client has subscribed to some topics
 </dd>
-<dt>onUnsubscribeV3(mid)</dt>
+<dt>onUnsubscribe(mid)</dt>
 <dd>
 emitted after the client has unsubscribed from
         some topics (MQTT v3)
 </dd>
-<dt>onUnsubscribeV5(mid, rc, packetType, properties)</dt>
+<dt>onUnsubscribe(mid, rc, packetType, properties)</dt>
 <dd>
 emitted after the
         client has unsubscribed from some topics (MQTT v5)
@@ -155,52 +132,32 @@
 <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>
+<td><a href="#MqttClient.__onConnect">__onConnect</a></td>
+<td>Private method to handle the connect to the broker.</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 (MQTT v5.0).</td>
+<td><a href="#MqttClient.__onDisconnected">__onDisconnected</a></td>
+<td>Private method to handle the disconnect from the broker.</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>
+<td>Private method to handle a log event.</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>
+<td><a href="#MqttClient.__onMessage">__onMessage</a></td>
+<td>Private method to handle a new message received from the broker.</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>
+<td>Private method to handle the publishing of a message.</td>
 </tr>
 <tr>
-<td><a href="#MqttClient.__onSubscribeV5">__onSubscribeV5</a></td>
-<td>Private method to handle a subscribe event (MQTT v5.0).</td>
+<td><a href="#MqttClient.__onSubscribe">__onSubscribe</a></td>
+<td>Private method to handle a subscribe event.</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>
+<td><a href="#MqttClient.__onUnsubscribe">__onUnsubscribe</a></td>
+<td>Private method to handle an unsubscribe event.</td>
 </tr>
 <tr>
 <td><a href="#MqttClient.clearLastWill">clearLastWill</a></td>
@@ -379,142 +336,89 @@
 </dl>
 <a NAME="MqttClient.__initCallbacks" ID="MqttClient.__initCallbacks"></a>
 <h4>MqttClient.__initCallbacks</h4>
-<b>__initCallbacks</b>(<i>protocol</i>)
+<b>__initCallbacks</b>(<i></i>)
 <p>
         Private method to initialize the MQTT callback methods.
 </p>
 
-<dl>
-
-<dt><i>protocol</i> (MqttProtocols)</dt>
-<dd>
-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>)
+<a NAME="MqttClient.__onConnect" ID="MqttClient.__onConnect"></a>
+<h4>MqttClient.__onConnect</h4>
+<b>__onConnect</b>(<i>_client, _userdata, connectFlags, rc, properties, </i>)
 <p>
-        Private method to handle the connect to the broker (MQTT v3.1 and v3.1.1).
+        Private method to handle the connect to the broker.
 </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>
+<dt><i>_client</i> (paho.mqtt.Client)</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)
+reference to the client object (unused)
 </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>
+<dt><i>_userdata</i> (Any)</dt>
 <dd>
-reference to the client object
+user data (unused)
 </dd>
-<dt><i>userdata</i> (Any)</dt>
+<dt><i>connectFlags</i> (mqtt.ConnectFlags)</dt>
 <dd>
-user data
-</dd>
-<dt><i>flags</i> (dict)</dt>
-<dd>
-dictionary containing the response flags sent by the broker
+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>
+<dt><i>properties</i> (dict)</dt>
 <dd>
-optional properties (defaults to None)
+MQTT v5.0 properties received from the broker
 </dd>
 </dl>
-<a NAME="MqttClient.__onDisconnectedV3" ID="MqttClient.__onDisconnectedV3"></a>
-<h4>MqttClient.__onDisconnectedV3</h4>
-<b>__onDisconnectedV3</b>(<i>client, userdata, rc, </i>)
+<a NAME="MqttClient.__onDisconnected" ID="MqttClient.__onDisconnected"></a>
+<h4>MqttClient.__onDisconnected</h4>
+<b>__onDisconnected</b>(<i>_client, _userdata, _flags, rc, _properties=None, </i>)
 <p>
-        Private method to handle the disconnect from the broker (MQTT v3.1 and v3.1.1).
+        Private method to handle the disconnect from the broker.
 </p>
 
 <dl>
 
-<dt><i>client</i> (paho.mqtt.Client)</dt>
-<dd>
-reference to the client object
-</dd>
-<dt><i>userdata</i> (Any)</dt>
+<dt><i>_client</i> (paho.mqtt.Client)</dt>
 <dd>
-user data
-</dd>
-<dt><i>rc</i> (int)</dt>
-<dd>
-result code
+reference to the client object (unused)
 </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 (MQTT v5.0).
-</p>
-
-<dl>
-
-<dt><i>client</i> (paho.mqtt.Client)</dt>
+<dt><i>_userdata</i> (Any)</dt>
 <dd>
-reference to the client object
+user data (unused)
 </dd>
-<dt><i>userdata</i> (Any)</dt>
+<dt><i>_flags</i> (dict)</dt>
 <dd>
-user data
+dictionary containing the response flags sent by the broker
+            (unused)
 </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>
+<dt><i>_properties</i> (dict (optional))</dt>
 <dd>
-optional properties (defaults to None)
+MQTT v5.0 properties received from the broker
+            (defaults to None) (unused)
 </dd>
 </dl>
 <a NAME="MqttClient.__onLog" ID="MqttClient.__onLog"></a>
 <h4>MqttClient.__onLog</h4>
-<b>__onLog</b>(<i>client, userdata, level, buf, </i>)
+<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).
+        Private method to handle a log event.
 </p>
 
 <dl>
 
-<dt><i>client</i> (paho.mqtt.Client)</dt>
+<dt><i>_client</i> (paho.mqtt.Client)</dt>
 <dd>
-reference to the client object
+reference to the client object (unused)
 </dd>
-<dt><i>userdata</i> (Any)</dt>
+<dt><i>_userdata</i> (Any)</dt>
 <dd>
-user data
+user data (unused)
 </dd>
 <dt><i>level</i> (int)</dt>
 <dd>
@@ -525,45 +429,22 @@
 log message
 </dd>
 </dl>
-<a NAME="MqttClient.__onMessageV3" ID="MqttClient.__onMessageV3"></a>
-<h4>MqttClient.__onMessageV3</h4>
-<b>__onMessageV3</b>(<i>client, userdata, message, </i>)
+<a NAME="MqttClient.__onMessage" ID="MqttClient.__onMessage"></a>
+<h4>MqttClient.__onMessage</h4>
+<b>__onMessage</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).
+        Private method to handle a new message received from the broker.
 </p>
 
 <dl>
 
-<dt><i>client</i> (paho.mqtt.Client)</dt>
-<dd>
-reference to the client object
-</dd>
-<dt><i>userdata</i> (Any)</dt>
+<dt><i>_client</i> (paho.mqtt.Client)</dt>
 <dd>
-user data
-</dd>
-<dt><i>message</i> (paho.mqtt.MQTTMessage)</dt>
-<dd>
-received message object
+reference to the client object (unused)
 </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>
+<dt><i>_userdata</i> (Any)</dt>
 <dd>
-reference to the client object
-</dd>
-<dt><i>userdata</i> (Any)</dt>
-<dd>
-user data
+user data (unused)
 </dd>
 <dt><i>message</i> (paho.mqtt.MQTTMessage)</dt>
 <dd>
@@ -572,69 +453,50 @@
 </dl>
 <a NAME="MqttClient.__onPublish" ID="MqttClient.__onPublish"></a>
 <h4>MqttClient.__onPublish</h4>
-<b>__onPublish</b>(<i>client, userdata, mid, </i>)
+<b>__onPublish</b>(<i>_client, _userdata, mid, _reasonCode, _properties, </i>)
 <p>
-        Private method to handle the publishing of a message (MQTT v3.1, v3.1.1
-        and v5.0).
+        Private method to handle the publishing of a message.
 </p>
 
 <dl>
 
-<dt><i>client</i> (paho.mqtt.Client)</dt>
+<dt><i>_client</i> (paho.mqtt.Client)</dt>
 <dd>
-reference to the client object
+reference to the client object (unused)
 </dd>
-<dt><i>userdata</i> (Any)</dt>
+<dt><i>_userdata</i> (Any)</dt>
 <dd>
-user data
+user data (unused)
 </dd>
 <dt><i>mid</i> (int)</dt>
 <dd>
 message ID
 </dd>
+<dt><i>_reasonCode</i> (paho.mqtt.ReasonCodes)</dt>
+<dd>
+reason code (unused)
+</dd>
+<dt><i>_properties</i> (dict)</dt>
+<dd>
+MQTT v5.0 properties received from the broker (unused)
+</dd>
 </dl>
-<a NAME="MqttClient.__onSubscribeV3" ID="MqttClient.__onSubscribeV3"></a>
-<h4>MqttClient.__onSubscribeV3</h4>
-<b>__onSubscribeV3</b>(<i>client, userdata, mid, grantedQos, </i>)
+<a NAME="MqttClient.__onSubscribe" ID="MqttClient.__onSubscribe"></a>
+<h4>MqttClient.__onSubscribe</h4>
+<b>__onSubscribe</b>(<i>_client, _userdata, mid, reasonCodes, properties, </i>)
 <p>
-        Private method to handle a subscribe event (MQTT v3.1 and v3.1.1).
+        Private method to handle a subscribe event.
 </p>
 
 <dl>
 
-<dt><i>client</i> (paho.mqtt.Client)</dt>
-<dd>
-reference to the client object
-</dd>
-<dt><i>userdata</i> (Any)</dt>
+<dt><i>_client</i> (paho.mqtt.Client)</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
+reference to the client object (unused)
 </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>
+<dt><i>_userdata</i> (Any)</dt>
 <dd>
-reference to the client object
-</dd>
-<dt><i>userdata</i> (Any)</dt>
-<dd>
-user data
+user data (unused)
 </dd>
 <dt><i>mid</i> (int)</dt>
 <dd>
@@ -644,62 +506,40 @@
 <dd>
 list of reason code for each subscribed topic
 </dd>
-<dt><i>properties</i> (dict (optional))</dt>
+<dt><i>properties</i> (dict)</dt>
 <dd>
-optional properties (defaults to None)
+MQTT v5.0 properties received from the broker
 </dd>
 </dl>
-<a NAME="MqttClient.__onUnsubscribeV3" ID="MqttClient.__onUnsubscribeV3"></a>
-<h4>MqttClient.__onUnsubscribeV3</h4>
-<b>__onUnsubscribeV3</b>(<i>client, userdata, mid, </i>)
+<a NAME="MqttClient.__onUnsubscribe" ID="MqttClient.__onUnsubscribe"></a>
+<h4>MqttClient.__onUnsubscribe</h4>
+<b>__onUnsubscribe</b>(<i>_client, _userdata, mid, reasonCodes, properties, </i>)
 <p>
-        Private method to handle an unsubscribe event (MQTT v3.1 and v3.1.1).
+        Private method to handle an unsubscribe event.
 </p>
 
 <dl>
 
-<dt><i>client</i> (paho.mqtt.Client)</dt>
+<dt><i>_client</i> (paho.mqtt.Client)</dt>
 <dd>
-reference to the client object
+reference to the client object (unused)
 </dd>
-<dt><i>userdata</i> (Any)</dt>
+<dt><i>_userdata</i> (Any)</dt>
 <dd>
-user data
+user data (unused)
 </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>
+<dt><i>properties</i> (dict)</dt>
+<dd>
+MQTT v5.0 properties received from the broker
+</dd>
 </dl>
 <a NAME="MqttClient.clearLastWill" ID="MqttClient.clearLastWill"></a>
 <h4>MqttClient.clearLastWill</h4>
@@ -1088,35 +928,6 @@
 <div align="right"><a href="#top">Up</a></div>
 <hr />
 <hr />
-<a NAME="mqttConnackMessage" ID="mqttConnackMessage"></a>
-<h2>mqttConnackMessage</h2>
-<b>mqttConnackMessage</b>(<i>connackCode</i>)
-<p>
-    Module function to get the string associated with a CONNACK result.
-</p>
-
-<dl>
-
-<dt><i>connackCode</i> (int)</dt>
-<dd>
-result code of the connection request
-</dd>
-</dl>
-<dl>
-<dt>Return:</dt>
-<dd>
-textual representation for the result code
-</dd>
-</dl>
-<dl>
-<dt>Return Type:</dt>
-<dd>
-str
-</dd>
-</dl>
-<div align="right"><a href="#top">Up</a></div>
-<hr />
-<hr />
 <a NAME="mqttErrorMessage" ID="mqttErrorMessage"></a>
 <h2>mqttErrorMessage</h2>
 <b>mqttErrorMessage</b>(<i>mqttErrno</i>)

eric ide

mercurial