MQTT Client Handle structure.
This structure represents the handle for an MQTT client. It holds the current state of the client, broker configuration, last will message configuration, client configuration, subscription list, and event handler.
Note
This structure is managed internally by the SDK. Users should not modify its members directly. Use the provided APIs (e.g., sl_mqtt_client_init, sl_mqtt_client_connect, sl_mqtt_client_deinit) to manage the client lifecycle.
Public Attributes#
Current state of the MQTT client.
Pointer to the broker configuration, provided at the time of the connect() API call.
Pointer to the last will message configuration, provided at the time of the connect() API call.
Pointer to the client configuration, provided at the time of the connect() API call.
Pointer to the head of the subscription linked list.
Function pointer to the event handler, provided at the time of sl_mqtt_client_init.
Advanced TCP/TLS configuration options, set via sl_mqtt_client_set_tcp_tls_advanced_configuration.
Flag indicating if advanced TCP/TLS options have been set.
Public Attribute Documentation#
broker#
const sl_mqtt_broker_t* sl_mqtt_client_t::broker
Pointer to the broker configuration, provided at the time of the connect() API call.
last_will_message#
const sl_mqtt_client_last_will_message_t* sl_mqtt_client_t::last_will_message
Pointer to the last will message configuration, provided at the time of the connect() API call.
client_configuration#
const sl_mqtt_client_configuration_t* sl_mqtt_client_t::client_configuration
Pointer to the client configuration, provided at the time of the connect() API call.
subscription_list_head#
sl_mqtt_client_topic_subscription_info_t* sl_mqtt_client_t::subscription_list_head
Pointer to the head of the subscription linked list.
client_event_handler#
sl_mqtt_client_event_handler_t sl_mqtt_client_t::client_event_handler
Function pointer to the event handler, provided at the time of sl_mqtt_client_init.
tcp_options#
sl_mqtt_client_tcp_tls_advanced_options_t sl_mqtt_client_t::tcp_options
Advanced TCP/TLS configuration options, set via sl_mqtt_client_set_tcp_tls_advanced_configuration.
tcp_options_configured#
bool sl_mqtt_client_t::tcp_options_configured
Flag indicating if advanced TCP/TLS options have been set.