mqttd.messages

Definition of MQTT protocol messages

Members

Classes

PacketFormatException
class PacketFormatException

Exception thrown when package format is somehow malformed

Enums

ConnectReturnCode
enum ConnectReturnCode

Connect Return code values - 0 = accepted, the rest means refused (6-255 are reserved)

PacketType
enum PacketType

MQTT Control Packet type

QoSLevel
enum QoSLevel

Indicates the level of assurance for delivery of an Application Message http://docs.oasis-open.org/mqtt/mqtt/v3.1.1/os/mqtt-v3.1.1-os.html#_Table_3.11_-

Structs

ConnAck
struct ConnAck

Responce to Connect request

ConnAckFlags
struct ConnAckFlags

Connect Acknowledge Flags

Connect
struct Connect

After a Network Connection is established by a Client to a Server, the first Packet sent from the Client to the Server MUST be a CONNECT Packet.

ConnectFlags
struct ConnectFlags

The Connect Flags byte contains a number of parameters specifying the behavior of the MQTT connection. It also indicates the presence or absence of fields in the payload.

Disconnect
struct Disconnect

The DISCONNECT Packet is the final Control Packet sent from the Client to the Server. It indicates that the Client is disconnecting cleanly.

FixedHeader
struct FixedHeader

Each MQTT Control Packet contains a fixed header.

PingReq
struct PingReq

The PINGREQ Packet is sent from a Client to the Server. It can be used to:

PingResp
struct PingResp

A PINGRESP Packet is sent by the Server to the Client in response to a PINGREQ Packet. It indicates that the Server is alive. This Packet is used in Keep Alive processing.

PubAck
struct PubAck

A PUBACK Packet is the response to a PUBLISH Packet with QoS level 1.

PubComp
struct PubComp

The PUBCOMP Packet is the response to a PUBREL Packet. It is the fourth and final packet of the QoS 2 protocol exchange.

PubRec
struct PubRec

A PUBREC Packet is the response to a PUBLISH Packet with QoS 2. It is the second packet of the QoS 2 protocol exchange.

PubRel
struct PubRel

A PUBREL Packet is the response to a PUBREC Packet. It is the third packet of the QoS 2 protocol exchange.

Publish
struct Publish

A PUBLISH Control Packet is sent from a Client to a Server or from Server to a Client to transport an Application Message.

SubAck
struct SubAck

A SUBACK Packet is sent by the Server to the Client to confirm receipt and processing of a SUBSCRIBE Packet. A SUBACK Packet contains a list of return codes, that specify the maximum QoS level that was granted in each Subscription that was requested by the SUBSCRIBE.

Subscribe
struct Subscribe

The SUBSCRIBE Packet is sent from the Client to the Server to create one or more Subscriptions. Each Subscription registers a Client’s interest in one or more Topics. The Server sends PUBLISH Packets to the Client in order to forward Application Messages that were published to Topics that match these Subscriptions. The SUBSCRIBE Packet also specifies (for each Subscription) the maximum QoS with which the Server can send Application Messages to the Client.

Topic
struct Topic

The payload of a SUBSCRIBE Packet

UnsubAck
struct UnsubAck

The UNSUBACK Packet is sent by the Server to the Client to confirm receipt of an UNSUBSCRIBE Packet.

Unsubscribe
struct Unsubscribe

An UNSUBSCRIBE Packet is sent by the Client to the Server, to unsubscribe from topics.

Variables

MQTT_PROTOCOL_LEVEL_3_1_1
enum ubyte MQTT_PROTOCOL_LEVEL_3_1_1;
Undocumented in source.
MQTT_PROTOCOL_NAME
enum string MQTT_PROTOCOL_NAME;
Undocumented in source.

Meta

Authors

Tomáš Chaloupka <chalucha@gmail.com>

License

Boost Software License 1.0 (BSL-1.0)

Permission is hereby granted, free of charge, to any person or organization obtaining a copy of the software and accompanying documentation covered by this license (the "Software") to use, reproduce, display, distribute, execute, and transmit the Software, and to prepare derivative works of the Software, and to permit third-parties to whom the Software is furnished to do so, all subject to the following:

The copyright notices in the Software and this entire statement, including the above license grant, this restriction and the following disclaimer, must be included in all copies of the Software, in whole or in part, and all derivative works of the Software, unless such copies or derivative works are solely in the form of machine-executable object code generated by a source language processor.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.