--- a/MqttMonitor/Documentation/source/Plugin_Mqtt_Monitor.MqttMonitor.MqttClient.html Sat Dec 23 19:45:41 2023 +0100 +++ b/MqttMonitor/Documentation/source/Plugin_Mqtt_Monitor.MqttMonitor.MqttClient.html Sat Jan 06 13:10:46 2024 +0100 @@ -7,28 +7,25 @@ <body> <a NAME="top" ID="top"></a> <h1>Plugin_Mqtt_Monitor.MqttMonitor.MqttClient</h1> - <p> Module implementing a PyQt wrapper around the paho MQTT client. </p> + <h3>Global Attributes</h3> - <table> <tr><td>None</td></tr> </table> + <h3>Classes</h3> - <table> - <tr> <td><a href="#MqttClient">MqttClient</a></td> <td>Class implementing a PyQt wrapper around the paho MQTT client.</td> </tr> </table> + <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> @@ -42,14 +39,15 @@ <td>Module function to get the log level string associated with a log level.</td> </tr> </table> + <hr /> <hr /> <a NAME="MqttClient" ID="MqttClient"></a> <h2>MqttClient</h2> - <p> Class implementing a PyQt wrapper around the paho MQTT client. </p> + <h3>Signals</h3> <dl> @@ -119,23 +117,27 @@ <h3>Derived from</h3> QObject <h3>Class Attributes</h3> - <table> -<tr><td>DefaultConnectTimeout</td></tr><tr><td>LogDebug</td></tr><tr><td>LogDisabled</td></tr><tr><td>LogError</td></tr><tr><td>LogInfo</td></tr><tr><td>LogLevelMap</td></tr><tr><td>LogNotice</td></tr><tr><td>LogWarning</td></tr> +<tr><td>DefaultConnectTimeout</td></tr> +<tr><td>LogDebug</td></tr> +<tr><td>LogDisabled</td></tr> +<tr><td>LogError</td></tr> +<tr><td>LogInfo</td></tr> +<tr><td>LogLevelMap</td></tr> +<tr><td>LogNotice</td></tr> +<tr><td>LogWarning</td></tr> </table> + <h3>Class Methods</h3> - <table> - <tr> <td><a href="#MqttClient.defaultConnectionOptions">defaultConnectionOptions</a></td> <td>Class method to get a connection options dictionary with default values.</td> </tr> </table> + <h3>Methods</h3> - <table> - <tr> <td><a href="#MqttClient.__init__">MqttClient</a></td> <td>Constructor</td> @@ -273,20 +275,21 @@ <td>Public method to unsubscribe topics.</td> </tr> </table> + <h3>Static Methods</h3> - <table> <tr><td>None</td></tr> </table> + <a NAME="MqttClient.defaultConnectionOptions" ID="MqttClient.defaultConnectionOptions"></a> <h4>MqttClient.defaultConnectionOptions (class method)</h4> <b>defaultConnectionOptions</b>(<i></i>) - <p> Class method to get a connection options dictionary with default values. </p> + <dl> <dt>Return:</dt> <dd> @@ -306,10 +309,10 @@ <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>) - <p> Constructor </p> + <dl> <dt><i>clientId</i> (str)</dt> @@ -340,17 +343,17 @@ <a NAME="MqttClient.__connectTimeout" ID="MqttClient.__connectTimeout"></a> <h4>MqttClient.__connectTimeout</h4> <b>__connectTimeout</b>(<i></i>) - <p> Private slot handling a failed connection attempt. </p> + <a NAME="MqttClient.__createPropertiesObject" ID="MqttClient.__createPropertiesObject"></a> <h4>MqttClient.__createPropertiesObject</h4> <b>__createPropertiesObject</b>(<i>packetType, properties</i>) - <p> Private method to assemble the MQTT v5 properties object. </p> + <dl> <dt><i>packetType</i> (PacketTypes (= int))</dt> @@ -377,10 +380,10 @@ <a NAME="MqttClient.__initCallbacks" ID="MqttClient.__initCallbacks"></a> <h4>MqttClient.__initCallbacks</h4> <b>__initCallbacks</b>(<i>protocol</i>) - <p> Private method to initialize the MQTT callback methods. </p> + <dl> <dt><i>protocol</i> (MqttProtocols)</dt> @@ -391,10 +394,10 @@ <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> @@ -421,10 +424,10 @@ <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> @@ -451,10 +454,10 @@ <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> @@ -473,10 +476,10 @@ <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> @@ -499,10 +502,10 @@ <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> @@ -525,11 +528,11 @@ <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> <dt><i>client</i> (paho.mqtt.Client)</dt> @@ -548,10 +551,10 @@ <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> @@ -570,11 +573,11 @@ <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> @@ -593,10 +596,10 @@ <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> @@ -619,10 +622,10 @@ <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> @@ -649,10 +652,10 @@ <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> @@ -671,10 +674,10 @@ <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> @@ -701,18 +704,18 @@ <a NAME="MqttClient.clearLastWill" ID="MqttClient.clearLastWill"></a> <h4>MqttClient.clearLastWill</h4> <b>clearLastWill</b>(<i></i>) - <p> Public method to remove a will that was previously configured with setLastWill(). </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>) - <p> Public method to connect to a remote MQTT broker. </p> + <dl> <dt><i>host</i> (str)</dt> @@ -747,10 +750,10 @@ <a NAME="MqttClient.connectToServerWithOptions" ID="MqttClient.connectToServerWithOptions"></a> <h4>MqttClient.connectToServerWithOptions</h4> <b>connectToServerWithOptions</b>(<i>host, port=1883, bindAddress="", options=None, clearWill=False</i>) - <p> Public method to connect to a remote MQTT broker. </p> + <dl> <dt><i>host</i> (str)</dt> @@ -784,17 +787,17 @@ <a NAME="MqttClient.disconnectFromServer" ID="MqttClient.disconnectFromServer"></a> <h4>MqttClient.disconnectFromServer</h4> <b>disconnectFromServer</b>(<i></i>) - <p> Public method to disconnect the client from the remote broker. </p> + <a NAME="MqttClient.getProtocol" ID="MqttClient.getProtocol"></a> <h4>MqttClient.getProtocol</h4> <b>getProtocol</b>(<i></i>) - <p> Public method to get the MQTT protocol version. </p> + <dl> <dt>Return:</dt> <dd> @@ -810,10 +813,10 @@ <a NAME="MqttClient.publish" ID="MqttClient.publish"></a> <h4>MqttClient.publish</h4> <b>publish</b>(<i>topic, payload=None, qos=0, retain=False, properties=None</i>) - <p> Public method to publish to a topic. </p> + <dl> <dt><i>topic</i> (str)</dt> @@ -854,17 +857,17 @@ <a NAME="MqttClient.reconnectToServer" ID="MqttClient.reconnectToServer"></a> <h4>MqttClient.reconnectToServer</h4> <b>reconnectToServer</b>(<i></i>) - <p> Public method to reconnect the client with the same parameters. </p> + <a NAME="MqttClient.setConnectionTimeout" ID="MqttClient.setConnectionTimeout"></a> <h4>MqttClient.setConnectionTimeout</h4> <b>setConnectionTimeout</b>(<i>timeout</i>) - <p> Public method to set the connection timeout value. </p> + <dl> <dt><i>timeout</i> (int)</dt> @@ -875,10 +878,10 @@ <a NAME="MqttClient.setLastWill" ID="MqttClient.setLastWill"></a> <h4>MqttClient.setLastWill</h4> <b>setLastWill</b>(<i>topic, payload=None, qos=0, retain=False, properties=None</i>) - <p> Public method to set the last will of the client. </p> + <dl> <dt><i>topic</i> (str)</dt> @@ -907,11 +910,11 @@ <a NAME="MqttClient.setMaxInflightMessages" ID="MqttClient.setMaxInflightMessages"></a> <h4>MqttClient.setMaxInflightMessages</h4> <b>setMaxInflightMessages</b>(<i>inflight=20</i>) - <p> Public method to set the maximum number of messages with QoS > 0 that can be part way through their network flow at once. </p> + <dl> <dt><i>inflight</i> (int)</dt> @@ -922,11 +925,11 @@ <a NAME="MqttClient.setMaxQueuedMessages" ID="MqttClient.setMaxQueuedMessages"></a> <h4>MqttClient.setMaxQueuedMessages</h4> <b>setMaxQueuedMessages</b>(<i>queueSize=0</i>) - <p> Public method to set the maximum number of messages with QoS > 0 that can be pending in the outgoing message queue. </p> + <dl> <dt><i>queueSize</i> (int)</dt> @@ -937,10 +940,10 @@ <a NAME="MqttClient.setTLS" ID="MqttClient.setTLS"></a> <h4>MqttClient.setTLS</h4> <b>setTLS</b>(<i>caCerts=None, certFile=None, keyFile=None</i>) - <p> Public method to enable secure connections and set the TLS parameters. </p> + <dl> <dt><i>caCerts</i> (str)</dt> @@ -972,10 +975,10 @@ <a NAME="MqttClient.setUserCredentials" ID="MqttClient.setUserCredentials"></a> <h4>MqttClient.setUserCredentials</h4> <b>setUserCredentials</b>(<i>username, password=None</i>) - <p> Public method to set the user name and optionally the password. </p> + <dl> <dt><i>username</i> (str)</dt> @@ -990,10 +993,10 @@ <a NAME="MqttClient.setUserData" ID="MqttClient.setUserData"></a> <h4>MqttClient.setUserData</h4> <b>setUserData</b>(<i>userdata</i>) - <p> Public method to set the user data. </p> + <dl> <dt><i>userdata</i> (any)</dt> @@ -1004,24 +1007,24 @@ <a NAME="MqttClient.startLoop" ID="MqttClient.startLoop"></a> <h4>MqttClient.startLoop</h4> <b>startLoop</b>(<i></i>) - <p> Public method to start the MQTT client loop. </p> + <a NAME="MqttClient.stopLoop" ID="MqttClient.stopLoop"></a> <h4>MqttClient.stopLoop</h4> <b>stopLoop</b>(<i></i>) - <p> Public method to stop the MQTT client loop. </p> + <a NAME="MqttClient.subscribe" ID="MqttClient.subscribe"></a> <h4>MqttClient.subscribe</h4> <b>subscribe</b>(<i>topic, qos=0, properties=None</i>) - <p> Public method to subscribe to topics with quality of service. </p> + <dl> <dt><i>topic</i> (str or tuple of (str, int) or list of tuple of (str, int))</dt> @@ -1054,10 +1057,10 @@ <a NAME="MqttClient.unsubscribe" ID="MqttClient.unsubscribe"></a> <h4>MqttClient.unsubscribe</h4> <b>unsubscribe</b>(<i>topic, properties=None</i>) - <p> Public method to unsubscribe topics. </p> + <dl> <dt><i>topic</i> (str or list of str)</dt> @@ -1088,10 +1091,10 @@ <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> @@ -1117,11 +1120,11 @@ <a NAME="mqttErrorMessage" ID="mqttErrorMessage"></a> <h2>mqttErrorMessage</h2> <b>mqttErrorMessage</b>(<i>mqttErrno</i>) - <p> Module function to get the error string associated with an MQTT error number. </p> + <dl> <dt><i>mqttErrno</i> (int)</dt> @@ -1147,10 +1150,10 @@ <a NAME="mqttLogLevelString" ID="mqttLogLevelString"></a> <h2>mqttLogLevelString</h2> <b>mqttLogLevelString</b>(<i>mqttLogLevel, isMqttLogLevel=True</i>) - <p> Module function to get the log level string associated with a log level. </p> + <dl> <dt><i>mqttLogLevel</i> (int)</dt> @@ -1177,4 +1180,4 @@ </dl> <div align="right"><a href="#top">Up</a></div> <hr /> -</body></html> \ No newline at end of file +</body></html>