MQTT Client Configuration structure.

This structure holds the configuration parameters for the MQTT client, including connection settings, retry policies, session options, and security credentials.

Public Attributes#

bool

Whether to automatically reconnect to the broker in case of disconnection.

uint8_t

Maximum number of retry attempts for auto reconnect.

uint16_t

Minimum back-off time (in seconds) between two successive reconnect attempts.

uint16_t

Maximum back-off time (in seconds) between two successive reconnect attempts.

bool

Clean session flag to send to the broker in the connect request.

MQTT protocol version used by the client.

uint16_t

Port number used by the client for the connection.

sl_net_credential_id_t

Credential ID for the username and password used in the MQTT connect request.

uint8_t *

Pointer to the MQTT client ID string.

uint8_t

Length of the client ID string. Should not exceed 60 bytes including NULL termination character.

TLS flags for various MQTT options. See sl_mqtt_tls_flag_t for details.

Public Attribute Documentation#

auto_reconnect#

bool sl_mqtt_client_configuration_t::auto_reconnect

Whether to automatically reconnect to the broker in case of disconnection.


retry_count#

uint8_t sl_mqtt_client_configuration_t::retry_count

Maximum number of retry attempts for auto reconnect.


minimum_back_off_time#

uint16_t sl_mqtt_client_configuration_t::minimum_back_off_time

Minimum back-off time (in seconds) between two successive reconnect attempts.


maximum_back_off_time#

uint16_t sl_mqtt_client_configuration_t::maximum_back_off_time

Maximum back-off time (in seconds) between two successive reconnect attempts.


is_clean_session#

bool sl_mqtt_client_configuration_t::is_clean_session

Clean session flag to send to the broker in the connect request.


mqt_version#

sl_mqtt_version_t sl_mqtt_client_configuration_t::mqt_version

MQTT protocol version used by the client.


client_port#

uint16_t sl_mqtt_client_configuration_t::client_port

Port number used by the client for the connection.


credential_id#

sl_net_credential_id_t sl_mqtt_client_configuration_t::credential_id

Credential ID for the username and password used in the MQTT connect request.


client_id#

uint8_t* sl_mqtt_client_configuration_t::client_id

Pointer to the MQTT client ID string.


client_id_length#

uint8_t sl_mqtt_client_configuration_t::client_id_length

Length of the client ID string. Should not exceed 60 bytes including NULL termination character.


tls_flags#

sl_mqtt_tls_flag_t sl_mqtt_client_configuration_t::tls_flags

TLS flags for various MQTT options. See sl_mqtt_tls_flag_t for details.