Constants#

This section provides a reference to the MQTT API constants.

Enumerations#

enum
SL_MQTT_QOS_LEVEL_0
SL_MQTT_QOS_LEVEL_1
SL_MQTT_QOS_LEVEL_2
}

MQTT quality of service (QoS) levels.

enum
SL_MQTT_CLIENT_DISCONNECTED
SL_MQTT_CLIENT_CONNECTING
SL_MQTT_CLIENT_CONNECTED
SL_MQTT_CLIENT_DISCONNECTING
}

MQTT Client connection states.

enum
SL_MQTT_VERSION_3
SL_MQTT_VERSION_3_1
}

MQTT Protocol version.

enum
SL_MQTT_CLIENT_CONNECTED_EVENT
SL_MQTT_CLIENT_DISCONNECTED_EVENT
SL_MQTT_CLIENT_MESSAGE_PUBLISHED_EVENT
SL_MQTT_CLIENT_MESSAGED_RECEIVED_EVENT
SL_MQTT_CLIENT_SUBSCRIBED_EVENT
SL_MQTT_CLIENT_UNSUBSCRIBED_EVENT
SL_MQTT_CLIENT_ERROR_EVENT
}

MQTT Client Events.

enum
SL_MQTT_CLIENT_CONNECT_FAILED
SL_MQTT_CLIENT_PUBLISH_FAILED
SL_MQTT_CLIENT_SUBSCRIBE_FAILED
SL_MQTT_CLIENT_UNSUBSCRIBED_FAILED
SL_MQTT_CLIENT_DISCONNECT_FAILED
SL_MQTT_CLIENT_UNKNKOWN_ERROR
}

MQTT Client error status.

Enumeration Documentation#

sl_mqtt_qos_t#

sl_mqtt_qos_t

MQTT quality of service (QoS) levels.

Note

  • Quality of service (QoS) level 2 not currently supported.

Enumerator
SL_MQTT_QOS_LEVEL_0

MQTT QoS level 0.

SL_MQTT_QOS_LEVEL_1

MQTT QoS level 1.

SL_MQTT_QOS_LEVEL_2

MQTT QoS level 2 (not currently supported)


Definition at line 34 of file components/service/mqtt/inc/sl_mqtt_client_types.h

sl_mqtt_client_connection_state_t#

sl_mqtt_client_connection_state_t

MQTT Client connection states.

Enumerator
SL_MQTT_CLIENT_DISCONNECTED

Initial state.

SL_MQTT_CLIENT_CONNECTING

Attains this state when the connect is called and await for results.

SL_MQTT_CLIENT_CONNECTED

Connection established with MQTT broker.

SL_MQTT_CLIENT_DISCONNECTING

Moves to this state when the disconnect is called and await for results.


Definition at line 41 of file components/service/mqtt/inc/sl_mqtt_client_types.h

sl_mqtt_version_t#

sl_mqtt_version_t

MQTT Protocol version.

Enumerator
SL_MQTT_VERSION_3

MQTT Version 3.0.

SL_MQTT_VERSION_3_1

MQTT Version 3.1.


Definition at line 49 of file components/service/mqtt/inc/sl_mqtt_client_types.h

sl_mqtt_client_event_t#

sl_mqtt_client_event_t

MQTT Client Events.

Enumerator
SL_MQTT_CLIENT_CONNECTED_EVENT

MQTT client connected event.

SL_MQTT_CLIENT_DISCONNECTED_EVENT

MQTT client disconnected event.

SL_MQTT_CLIENT_MESSAGE_PUBLISHED_EVENT

MQTT client message published event.

SL_MQTT_CLIENT_MESSAGED_RECEIVED_EVENT

MQTT client message received event.

SL_MQTT_CLIENT_SUBSCRIBED_EVENT

MQTT client subscribed event.

SL_MQTT_CLIENT_UNSUBSCRIBED_EVENT

MQTT client unsubscribed event.

SL_MQTT_CLIENT_ERROR_EVENT

MQTT client error event.


Definition at line 55 of file components/service/mqtt/inc/sl_mqtt_client_types.h

sl_mqtt_client_error_status_t#

sl_mqtt_client_error_status_t

MQTT Client error status.

Enumerator
SL_MQTT_CLIENT_CONNECT_FAILED

MQTT client connect failed status.

SL_MQTT_CLIENT_PUBLISH_FAILED

MQTT client publish failed status.

SL_MQTT_CLIENT_SUBSCRIBE_FAILED

MQTT client subscribe failed status.

SL_MQTT_CLIENT_UNSUBSCRIBED_FAILED

MQTT client unsubscribe failed status.

SL_MQTT_CLIENT_DISCONNECT_FAILED

MQTT client disconnect failed status.

SL_MQTT_CLIENT_UNKNKOWN_ERROR

MQTT client unknown error status.


Definition at line 66 of file components/service/mqtt/inc/sl_mqtt_client_types.h