mqtt5_client library

Classes

MqttAuthenticateMessage
An authenticate message is sent from the client to the broker or the broker to the client as part of an extended authentication exchange, such as challenge / response authentication.
MqttAuthenticateVariableHeader
The variable Header of the authentication message contains the following fields in the order: authenticate reason code and properties.
MqttAuthenticationManager
Handles the logic and workflow surrounding the authentication processing.
MqttAutoReconnect
Auto reconnect event
MqttBinaryDataEncoding
Binary Data is represented by a Two Byte Integer length which indicates the number of data bytes, followed by that number of bytes. Thus, the length of Binary Data is limited to the range of 0 to 65,535 Bytes.
MqttBinaryDataProperty
Binary data property
MqttByteBuffer
Utility class to allow stream like access to a sized byte buffer. This class is in effect a cut-down implementation of the C# NET System.IO class with Mqtt client specific extensions.
MqttByteProperty
Byte property
MqttCancellableAsyncSleep
Cancellable asynchronous sleep support class
MqttClient
A client class for interacting with MQTT Data Packets. Do not instantiate this class directly, instead instantiate either a MqttClientServer class or an MqttBrowserClient as needed. This class now provides common functionality between server side and web based clients.
MqttConnectAckFlags
Connect acknowledgement message MqttConnectAckMessage flags.
MqttConnectAckMessage
Message that indicates a connection acknowledgement.
MqttConnectAckMessageAvailable
The connect acknowledge message available event raised by the Connection class
MqttConnectAckVariableHeader
The Variable Header of the Connect Acknowledgement message contains the following fields in the order: Connect Acknowledge Flags, Connect Reason Code, and Properties.
MqttConnectFlags
Represents the connect flags part of the MQTT Variable Header
MqttConnectionBase
The MQTT client connection base class
MqttConnectionHandlerBase
This class provides shared connection functionality to serverand browser connection handler implementations.
MqttConnectionKeepAlive
Implements keepalive functionality on the Mqtt Connection, ensuring that the connection remains active according to the keepalive seconds setting. This class implements the keepalive by sending an MqttPingRequest to the broker if a message has not been sent or received within the keepalive period.
MqttConnectionStatus
Records the status of the last connection attempt
MqttConnectMessage
An Mqtt message that is used to initiate a connection to a message broker. After a network connection is established by a client to a broker, the first message sent from the client to the broker MUST be a connect message.
MqttConnectPayload
Class that contains details related to an MQTT Connect messages payload.
MqttConnectVariableHeader
The Variable Header for the connect Packet contains the following fields in this order: Protocol Name, Protocol Level, Connect Flags, Keep Alive, and Properties.
MqttConstants
Library wide constants
MqttDisconnectMessage
The disconnect message is the final MQTT Control Packet sent from the client or the broker. It indicates the reason why the network connection is being closed. The client or broker may send a disconnect message before closing the network connection.
MqttDisconnectVariableHeader
The variable Header of the disconnect message contains the following fields in the order: disconnect reason code, and properties.
MqttEnumHelper<T extends dynamic>
Generic enumeration helper class
MqttFourByteIntegerProperty
Four Byte Integer data values are 32-bit unsigned integers in big-endian order: the high order byte precedes the successively lower order bytes. This means that a 32-bit word is presented on the network as Most Significant Byte (MSB), followed by the next most Significant Byte (MSB), followed by the next most Significant Byte (MSB), followed by Least Significant Byte (LSB).
MqttHeader
Represents the Fixed Header of an MQTT message. Each MQTT Control Packet contains a Fixed Header.
MqttIConnectionHandler
The connection handler interface class
MqttIPayload
MqttIProperty
Base class for MQTT message properties
MqttIVariableHeader
Variable header base class
MqttLogger
Library wide logging class
MqttMessage
Represents an MQTT message that contains a fixed header, variable header and message body.
MqttMessageAvailable
The message available event.
MqttMessageFactory
Factory for generating instances of MQTT Messages
MqttMessageIdentifierDispenser
Message identifier handling
MqttMessageReceived
Message recieved for publishing event.
MqttPayloadBuilder
Utility class to assist with the build in of message topic payloads.
MqttPingRequestMessage
The ping request message is sent from the client to the broker. It can be used to:
MqttPingResponseMessage
Sent by a broker to the client in response to a ping request message.
MqttPropertyContainer
A property container for use in MQTT Messages
MqttPropertyFactory
Factory for generating instances of MQTT message properties
MqttProtocol
Protocol selection helper class, protocol defaults V5
MqttPublicationTopic
Implementation of a Publication topic that performs additional validations of messages that are published.
MqttPublishAckMessage
A publish acknowledge messageis the response to a publish message with QoS 1.
MqttPublishAckVariableHeader
The Variable Header of the publish ack message contains the following fields in the order: message identifier from the publish message that is being acknowledged, publish reason code and the properties.
MqttPublishCompleteMessage
The publish complete message is the response to a publisg release message. It is the fourth and final message of the QoS 2 protocol exchange.
MqttPublishCompleteVariableHeader
The variable header of the publish complete message contains the following fields in the order: Packet(message) identifier from the publish release message that is being acknowledged, reason Code, and properties.
MqttPublishingManager
Handles the logic and workflow surrounding the message publishing and receipt process.
MqttPublishMessage
A Publish message is sent to a broker to transport an application message.
MqttPublishPayload
Class that contains details related to an MQTT Publish message payload
MqttPublishReceivedMessage
A publish receive message is the response to a publish message with QoS 2. It is the second packet of the QoS 2 protocol exchange.
MqttPublishReceivedVariableHeader
The variable Header of the publish received message contains the following fields in the order: message identifier from the publish message that is being acknowledged, publish reason code and the properties.
MqttPublishReleaseMessage
A publish release message is the response to a publish received message. It is the third packet of the QoS 2 protocol exchange.
MqttPublishReleaseVariableHeader
The variable header of the publish release message contains the following fields in the order: the message Identifier from the publish receive message that is being acknowledged, reason code, and properties.
MqttPublishVariableHeader
The Variable Header of the Publish message contains the following fields in the order: Topic Name, Packet Identifier, and Properties.
MqttReadWrapper
State and logic used to read from the underlying network stream.
MqttReasonCodeUtilities
MQTT reason code
MqttReceivedMessage<T>
Represents a MQTT message that has been received from a broker.
MqttResubscribe
Re subscribe event
MqttStringPair
A UTF-8 String Pair consists of two UTF-8 Encoded Strings. This data type is used to hold name-value pairs. The first string serves as the name, and the second string contains the value.
MqttStringPairProperty
String pair property. Typically used to add user properties to a message.
MqttSubscribeAckMessage
A subscribe acknowledgement message is sent by the broker to the client to confirm receipt and processing of a subscribe message.
MqttSubscribeAckPayload
The payload contains a list of reason codes. Each reason code corresponds to a topic filter in the subscribe message being acknowledged.
MqttSubscribeAckVariableHeader
The variable header of the subscription acknowledge message contains the following fields in the order: the packet(message) identifier from the subscribe message that is being acknowledged, and properties.
MqttSubscribeMessage
The subscribe message is sent from the client to the broker to create one or more subscriptions. Each subscription registers the client’s interest in one or more topics. The broker sends publish messagesto the client to forward application messages that were published to topics that match these subscriptions.
MqttSubscribePayload
The payload of a subscribe message contains a list of topic filters indicating the topics to which the client wants to subscribe. Each topic filter is followed by a subscription options value.
MqttSubscribePayloadTopic
The subscription payload topic class. Comprises a topic and its associated topic option.
MqttSubscribeVariableHeader
The variable Header of the subscribe message contains the following fields in the order: Packet(message) identifier, and properties.
MqttSubscription
An individual subscription as used by the client to build and track the status of subscriptions and unsubscriptions.
MqttSubscriptionManager
A class that manages the topic subscription process.
MqttSubscriptionOption
Subscription option for a subscribe message topic
MqttSubscriptionTopic
Implementation of a Subscription topic that performs additional validations of topics that are subscribed to.
MqttTopic
Provides the base implementation of an MQTT topic.
MqttTopicFilter
This class allows specific topics to be listened for. It essentially acts as a bandpass filter for the topics you are interested in if you subscribe to more than one topic or use wildcard topics. Simply construct it, and listen to its message stream rather than that of the client. Note this class will only filter valid receive topics so if you filter on wildcard topics for instance, which you should only subscribe to, it will always generate a no match.
MqttTwoByteIntegerProperty
Two Byte Integer data values are 16-bit unsigned integers in big-endian order: the high order byte precedes the lower order byte. This means that a 16-bit word is presented on the network as Most Significant Byte (MSB), followed by Least Significant Byte (LSB).
MqttUnsubscribeAckMessage
The unsubscribe acknowledgement message is sent by the broker to the client to confirm receipt of an unsubscribe message.
MqttUnsubscribeAckPayload
The payload contains a list of reason codes. Each reason code corresponds to a topic filter in the unsubscribe message being acknowledged.
MqttUnsubscribeAckVariableHeader
The variable header of the unsubscribe acknowledgement message contains the following fields in the order: packet(message) identifier from the unsubscribe message that is being acknowledged, and properties.
MqttUnsubscribeMessage
An unsubscribe message is sent by the client to the broker, to unsubscribe from topics.
MqttUnsubscribePayload
The payload for the unsubscribe message contains the list of topic filters that the client wishes to unsubscribe from
MqttUnsubscribeVariableHeader
The variable header of the unsubscribe contains the following fields in the order: packet(message) identifier, and properties.
MqttUserProperty
A user property. This is a convenience extension of a string pair property to allow more logical setting of user properties.
MqttUtf8Encoding
Encoding implementation that can encode and decode strings in the MQTT UTF8 string format.
MqttUtf8StringProperty
UTF8 String property
MqttUtilities
General library wide utilties
MqttVariableByteIntegerEncoding
The Variable Byte Integer is encoded using an encoding scheme which uses a single byte for values up to 127. Larger values are handled as follows. The least significant seven bits of each byte encode the data, and the most significant bit is used to indicate whether there are bytes following in the representation. Thus, each byte encodes 128 values and a "continuation bit".
MqttVariableByteIntegerProperty
Variable byte integer property
MqttWillProperties
Will Properties

Enums

MqttAuthenticateReasonCode
MQTT reason code
MqttConnectionState
Enumeration that indicates various client connection states
MqttConnectReasonCode
MQTT reason code
MqttDisconnectionOrigin
Enumeration that indicates the origin of a client disconnection
MqttDisconnectReasonCode
MQTT reason code
MqttMessageType
An enumeration of all available MQTT Message Types
MqttPropertyIdentifier
MQTT property identifier
MqttPublishReasonCode
MQTT reason code
MqttQos
Enumeration of available QoS types.
MqttRetainHandling
Enumeration of available rertain handling types.
MqttSubscribeReasonCode
MQTT reason code
MqttSubscriptionStatus
Describes the status of a subscription

Properties

mqttAuthenticateReasonCode MqttEnumHelper<MqttAuthenticateReasonCode?>
getter/setter pair
mqttConnectReasonCode MqttEnumHelper<MqttConnectReasonCode?>
MQTT connect reason code helper
getter/setter pair
mqttDisconnectReasonCode MqttEnumHelper<MqttDisconnectReasonCode?>
MQTT disconnect reason code helper
getter/setter pair
mqttPropertyIdentifier MqttEnumHelper<MqttPropertyIdentifier?>
MQTT property identifier helper
getter/setter pair
mqttPublishReasonCode MqttEnumHelper<MqttPublishReasonCode?>
MQTT publish reason code helper
getter/setter pair
mqttSubscribeReasonCode MqttEnumHelper<MqttSubscribeReasonCode?>
MQTT subscribe reason code helper
getter/setter pair

Typedefs

AutoReconnectCallback = void Function()
The client auto reconnect callback type
AutoReconnectCompleteCallback = void Function()
The client auto reconnect complete callback type
ConnectCallback = void Function()
The client Connect callback type
DisconnectCallback = void Function()
The client disconnect callback type
MessageCallbackFunction = bool Function(MqttMessage message)
Callback function definitions
PongCallback = void Function()
Ping response received callback
SubscribeCallback = void Function(MqttSubscription subscription)
Subscribed and Unsubscribed callback typedefs
SubscribeFailCallback = void Function(MqttSubscription subscription)
UnsubscribeCallback = void Function(MqttSubscription subscription)

Exceptions / Errors

MqttConnectionException
Exception thrown when the connection state is incorrect.
MqttIdentifierException
Exception thrown when a client identifier included in a message is too long.
MqttIncompleteMessageException
Exception thrown when processing a message that is not completely received
MqttIncorrectInstantiationException
Exception thrown when a browser or server client is instantiated incorrectly.
MqttInvalidHeaderException
Exception thrown when processing a header that is invalid in some way.
MqttInvalidMessageException
Exception thrown when processing a message that is invalid in some way.
MqttInvalidPayloadSizeException
Exception that is thrown when the payload of a message is not the correct size.
MqttInvalidTopicException
Exception thrown when the topic of a message is invalid
MqttNoConnectionException
Exception thrown when the client fails to connect