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.


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

retry_count#

uint8_t sl_mqtt_client_configuration_t::retry_count

Maximum number of retry attempts for auto reconnect.


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

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.


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

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.


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

is_clean_session#

bool sl_mqtt_client_configuration_t::is_clean_session

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


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

mqt_version#

sl_mqtt_version_t sl_mqtt_client_configuration_t::mqt_version

MQTT protocol version used by the client.


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

client_port#

uint16_t sl_mqtt_client_configuration_t::client_port

Port number used by the client for the connection.


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

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.


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

client_id#

uint8_t* sl_mqtt_client_configuration_t::client_id

Pointer to the MQTT client ID string.


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

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.


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

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.


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