mqtt_protocol.h

This header contains definitions of MQTT values as defined in the specifications.

Summary
mqtt_protocol.hThis header contains definitions of MQTT values as defined in the specifications.
Enumerations
mqtt311_connack_codesThe CONNACK results for MQTT v3.1.1, and v3.1.
mqtt5_return_codesThe reason codes returned in various MQTT commands.
mqtt5_propertyOptions for use with MQTTv5 properties.
mqtt5_sub_optionsOptions for use with MQTTv5 subscriptions.

Enumerations

mqtt311_connack_codes

The CONNACK results for MQTT v3.1.1, and v3.1.

Values

CONNACK_ACCEPTED0
CONNACK_REFUSED_PROTOCOL_VERSION1
CONNACK_REFUSED_IDENTIFIER_REJECTED2
CONNACK_REFUSED_SERVER_UNAVAILABLE3
CONNACK_REFUSED_BAD_USERNAME_PASSWORD4
CONNACK_REFUSED_NOT_AUTHORIZED5

mqtt5_return_codes

The reason codes returned in various MQTT commands.

Values

MQTT_RC_SUCCESS0
MQTT_RC_NORMAL_DISCONNECTION0
MQTT_RC_GRANTED_QOS00
MQTT_RC_GRANTED_QOS11
MQTT_RC_GRANTED_QOS22
MQTT_RC_DISCONNECT_WITH_WILL_MSG4
MQTT_RC_NO_MATCHING_SUBSCRIBERS16
MQTT_RC_NO_SUBSCRIPTION_EXISTED17
MQTT_RC_CONTINUE_AUTHENTICATION24
MQTT_RC_REAUTHENTICATE25
MQTT_RC_UNSPECIFIED128
MQTT_RC_MALFORMED_PACKET129
MQTT_RC_PROTOCOL_ERROR130
MQTT_RC_IMPLEMENTATION_SPECIFIC131
MQTT_RC_UNSUPPORTED_PROTOCOL_VERSION132
MQTT_RC_CLIENTID_NOT_VALID133
MQTT_RC_BAD_USERNAME_OR_PASSWORD134
MQTT_RC_NOT_AUTHORIZED135
MQTT_RC_SERVER_UNAVAILABLE136
MQTT_RC_SERVER_BUSY137
MQTT_RC_BANNED138
MQTT_RC_SERVER_SHUTTING_DOWN139
MQTT_RC_BAD_AUTHENTICATION_METHOD140
MQTT_RC_KEEP_ALIVE_TIMEOUT141
MQTT_RC_SESSION_TAKEN_OVER142
MQTT_RC_TOPIC_FILTER_INVALID143
MQTT_RC_TOPIC_NAME_INVALID144
MQTT_RC_PACKET_ID_IN_USE145
MQTT_RC_PACKET_ID_NOT_FOUND146
MQTT_RC_RECEIVE_MAXIMUM_EXCEEDED147
MQTT_RC_TOPIC_ALIAS_INVALID148
MQTT_RC_PACKET_TOO_LARGE149
MQTT_RC_MESSAGE_RATE_TOO_HIGH150
MQTT_RC_QUOTA_EXCEEDED151
MQTT_RC_ADMINISTRATIVE_ACTION152
MQTT_RC_PAYLOAD_FORMAT_INVALID153
MQTT_RC_RETAIN_NOT_SUPPORTED154
MQTT_RC_QOS_NOT_SUPPORTED155
MQTT_RC_USE_ANOTHER_SERVER156
MQTT_RC_SERVER_MOVED157
MQTT_RC_SHARED_SUBS_NOT_SUPPORTED158
MQTT_RC_CONNECTION_RATE_EXCEEDED159
MQTT_RC_MAXIMUM_CONNECT_TIME160
MQTT_RC_SUBSCRIPTION_IDS_NOT_SUPPORTED161
MQTT_RC_WILDCARD_SUBS_NOT_SUPPORTED162

mqtt5_property

Options for use with MQTTv5 properties.  Options:

MQTT_PROP_PAYLOAD_FORMAT_INDICATORproperty option.
MQTT_PROP_MESSAGE_EXPIRY_INTERVALproperty option.
MQTT_PROP_CONTENT_TYPEproperty option.
MQTT_PROP_RESPONSE_TOPICproperty option.
MQTT_PROP_CORRELATION_DATAproperty option.
MQTT_PROP_SUBSCRIPTION_IDENTIFIERproperty option.
MQTT_PROP_SESSION_EXPIRY_INTERVALproperty option.
MQTT_PROP_ASSIGNED_CLIENT_IDENTIFIERproperty option.
MQTT_PROP_SERVER_KEEP_ALIVEproperty option.
MQTT_PROP_AUTHENTICATION_METHODproperty option.
MQTT_PROP_AUTHENTICATION_DATAproperty option.
MQTT_PROP_REQUEST_PROBLEM_INFORMATIONproperty option.
MQTT_PROP_WILL_DELAY_INTERVALproperty option.
MQTT_PROP_REQUEST_RESPONSE_INFORMATIONproperty option.
MQTT_PROP_RESPONSE_INFORMATIONproperty option.
MQTT_PROP_SERVER_REFERENCEproperty option.
MQTT_PROP_REASON_STRINGproperty option.
MQTT_PROP_RECEIVE_MAXIMUMproperty option.
MQTT_PROP_TOPIC_ALIAS_MAXIMUMproperty option.
MQTT_PROP_TOPIC_ALIASproperty option.
MQTT_PROP_MAXIMUM_QOSproperty option.
MQTT_PROP_RETAIN_AVAILABLEproperty option.
MQTT_PROP_USER_PROPERTYproperty option.
MQTT_PROP_MAXIMUM_PACKET_SIZEproperty option.
MQTT_PROP_WILDCARD_SUB_AVAILABLEproperty option.
MQTT_PROP_SUBSCRIPTION_ID_AVAILABLEproperty option.
MQTT_PROP_SHARED_SUB_AVAILABLEproperty option.

mqtt5_sub_options

Options for use with MQTTv5 subscriptions.

MQTT_SUB_OPT_NO_LOCALwith this option set, if this client publishes to a topic to which it is subscribed, the broker will not publish the message back to the client.
MQTT_SUB_OPT_RETAIN_AS_PUBLISHEDwith this option set, messages published for this subscription will keep the retain flag as was set by the publishing client.  The default behaviour without this option set has the retain flag indicating whether a message is fresh/stale.
MQTT_SUB_OPT_SEND_RETAIN_ALWAYSwith this option set, pre-existing retained messages are sent as soon as the subscription is made, even if the subscription already exists.  This is the default behaviour, so it is not necessary to set this option.
MQTT_SUB_OPT_SEND_RETAIN_NEWwith this option set, pre-existing retained messages for this subscription will be sent when the subscription is made, but only if the subscription does not already exist.
MQTT_SUB_OPT_SEND_RETAIN_NEVERwith this option set, pre-existing retained messages will never be sent for this subscription.
Close