Constants#
This section provides a reference to the MQTT API constants.
Enumerations#
MQTT quality of service (QoS) levels.
MQTT Client connection states.
MQTT Client Events.
MQTT Client error status.
MQTT Client disconnection reason.
MQTT TLS and certificate options.
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) |
49
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_TA_INIT | Attains this state when TA MQTT is initialized successfully. |
SL_MQTT_CLIENT_CONNECTION_FAILED | Attains this state when the connection to MQTT broker failed. |
SL_MQTT_CLIENT_CONNECTED | Connection established with MQTT broker. |
SL_MQTT_CLIENT_TA_DISCONNECTED |
56
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. |
65
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. |
71
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. |
82
of file components/service/mqtt/inc/sl_mqtt_client_types.h
sl_mqtt_client_disconnection_reason_t#
sl_mqtt_client_disconnection_reason_t
MQTT Client disconnection reason.
Enumerator | |
---|---|
SL_MQTT_CLIENT_REMOTE_TERMINATE_DISCONNECTION | Disconnection due to remote termination. |
SL_MQTT_CLIENT_WLAN_DISCONNECTION | Disconnection due to WLAN disconnection. |
SL_MQTT_CLIENT_USER_INITIATED_DISCONNECTION | User initiated disconnection. |
SL_MQTT_CLIENT_KEEP_ALIVE_RESPONSE_TIMEOUT_DISCONNECTION | Disconnection due to keep alive timeout. |
92
of file components/service/mqtt/inc/sl_mqtt_client_types.h
sl_mqtt_tls_flag_t#
sl_mqtt_tls_flag_t
MQTT TLS and certificate options.
Note
Only one TLS version (SL_MQTT_TLS_TLSV_X_X) can be set at a time.
Only one certificate index (SL_MQTT_TLS_CERT_INDEX_X) can be set at a time.
Enumerator | |
---|---|
SL_MQTT_TLS_ENABLE | Enable TLS for MQTT. |
SL_MQTT_TLS_TLSV_1_0 | Enable TLS version 1.0 for MQTT. |
SL_MQTT_TLS_TLSV_1_1 | Enable TLS version 1.1 for MQTT. |
SL_MQTT_TLS_TLSV_1_2 | Enable TLS version 1.2 for MQTT. |
SL_MQTT_TLS_TLSV_1_3 | Enable TLS version 1.3 for MQTT. |
SL_MQTT_TLS_CERT_INDEX_1 | Use certificate index 1 for MQTT. |
SL_MQTT_TLS_CERT_INDEX_2 | Use certificate index 2 for MQTT. |
105
of file components/service/mqtt/inc/sl_mqtt_client_types.h