module documentation

MQTT Client

This module contains the MQTT client code. It defines classes for the MQTT Client and manages the connection to the MQTT broker.

The MQTT client is a singleton.

MQTT version 3.1.1 as documented https://docs.oasis-open.org/mqtt/mqtt/v3.1.1/os/mqtt-v3.1.1-os.html

QoS2 not supported - only QoS0 or 1

Sessions are clean - i.e. no context saved between sessions.

Optional client disconnects are not implemented. Unless an error occurs or the broker terminates the session the session remains open until power is removed!

The same logic applies to subscriptions - unsubscribe is not implemented.

Authentication is not implemented.

Subscriptions are static. The subscription list is loaded by the client at instantiation and is immutable.

Author
Paul Redhead
Class MQTTClient MQTT Client
Class MQTTPacketOut MQTT Control Packet Out
Constant MQTT_BROKER_PORT Default MQTT broker port number This is the default port number for the MQTT broker. It can be overridden in the configuration file.
Constant _ACK_TIME Undocumented
Constant _AUTH Undocumented
Constant _CONNACK Undocumented
Constant _CONNECT Undocumented
Constant _DISCONNECT Undocumented
Constant _KEEP_ALIVE Undocumented
Constant _MAX_MUX Undocumented
Constant _MAX_PID Undocumented
Constant _PING_TIME Undocumented
Constant _PINGREQ Undocumented
Constant _PINGRESP Undocumented
Constant _PUBACK Undocumented
Constant _PUBCOMP Undocumented
Constant _PUBLISH Undocumented
Constant _PUBREC Undocumented
Constant _PUBREL Undocumented
Constant _REOPEN_TIME Undocumented
Constant _SUBACK Undocumented
Constant _SUBSCRIBE Undocumented
Constant _UNSUBACK Undocumented
Constant _UNSUBSCRIBE Undocumented
MQTT_BROKER_PORT =

Default MQTT broker port number This is the default port number for the MQTT broker. It can be overridden in the configuration file.

Value
const(1883)
_ACK_TIME =

Undocumented

Value
const(10000)
_AUTH =

Undocumented

Value
const(15)
_CONNACK =

Undocumented

Value
const(2)
_CONNECT =

Undocumented

Value
const(1)
_DISCONNECT =

Undocumented

Value
const(14)
_KEEP_ALIVE =

Undocumented

Value
const(60)
_MAX_MUX =

Undocumented

Value
const((128 * 128 * 128))
_MAX_PID =

Undocumented

Value
const(10)
_PING_TIME =

Undocumented

Value
const(50000)
_PINGREQ =

Undocumented

Value
const(12)
_PINGRESP =

Undocumented

Value
const(13)
_PUBACK =

Undocumented

Value
const(4)
_PUBCOMP =

Undocumented

Value
const(7)
_PUBLISH =

Undocumented

Value
const(3)
_PUBREC =

Undocumented

Value
const(5)
_PUBREL =

Undocumented

Value
const(6)
_REOPEN_TIME =

Undocumented

Value
const(5000)
_SUBACK =

Undocumented

Value
const(9)
_SUBSCRIBE =

Undocumented

Value
const(8)
_UNSUBACK =

Undocumented

Value
const(11)
_UNSUBSCRIBE =

Undocumented

Value
const(10)