nRF5 IoT SDK  v0.9.0
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
mqtt_client_t Struct Reference

MQTT Client definition to maintain information relevant to the client. More...

#include <mqtt.h>

Data Fields

mqtt_client_id_t client_id
 
mqtt_username_tp_user_name
 
mqtt_password_tp_password
 
mqtt_topic_tp_will_topic
 
mqtt_will_message_tp_will_message
 
nrf_tls_key_settings_tp_security_settings
 
mqtt_evt_cb_t evt_cb
 
ipv6_addr_t broker_addr
 
uint16_t broker_port
 
uint8_t poll_abort_counter
 
uint8_t transport_type
 
uint8_t will_retain:1
 
uint8_t clean_session:1
 
iot_timer_time_in_ms_t last_activity
 
uint32_t state
 
uint32_t tcp_id
 
uint8_t * p_packet
 
uint8_t * p_pending_packet
 
nrf_tls_instance_t tls_instance
 
uint32_t pending_packetlen
 

Detailed Description

MQTT Client definition to maintain information relevant to the client.

Field Documentation

ipv6_addr_t mqtt_client_t::broker_addr

IPv6 Address of MQTT broker to which client connection is requested.

uint16_t mqtt_client_t::broker_port

Broker's Port number.

uint8_t mqtt_client_t::clean_session

Clean session flag indicating a fresh (1) or a retained session (0). Default is 1.

mqtt_client_id_t mqtt_client_t::client_id

Unique client identification to be used for the connection. Shall be zero length or NULL valued.

mqtt_evt_cb_t mqtt_client_t::evt_cb

Application callback registered with the module to get MQTT events.

iot_timer_time_in_ms_t mqtt_client_t::last_activity

Internal. Ticks maintaining wallcock in last activity that occurred. Needed for periodic PING.

uint8_t* mqtt_client_t::p_packet

Internal. Shall not be touched by the application. Used for creating MQTT packet in TX path.

mqtt_password_t* mqtt_client_t::p_password

Password (if any) to be used for the connection. Note that if password is provided, user name shall also be provided. NULL indicates no password.

uint8_t* mqtt_client_t::p_pending_packet

Internal. Shall not be touched by the application.

nrf_tls_key_settings_t* mqtt_client_t::p_security_settings

Provide security settings like PSK, own certificate etc here. The memory provided for the settings shall be resident.

mqtt_username_t* mqtt_client_t::p_user_name

User name (if any) to be used for the connection. NULL indicates no user name.

mqtt_will_message_t* mqtt_client_t::p_will_message

Will message. Can be NULL. Non NULL value valid only if will topic is not NULL.

mqtt_topic_t* mqtt_client_t::p_will_topic

Will topic and QoS. Can be NULL.

uint32_t mqtt_client_t::pending_packetlen

Internal. Shall not be touched by the application.

uint8_t mqtt_client_t::poll_abort_counter

Poll abort counter maintained for the TCP connection.

uint32_t mqtt_client_t::state

Internal. Shall not be touched by the application. Client's state in the connection.

uint32_t mqtt_client_t::tcp_id

Internal. Shall not be touched by the application. TCP Connection Reference provided by the IP stack.

nrf_tls_instance_t mqtt_client_t::tls_instance

Internal. Shall not be touched by the application. TLS instance identifier. Valid only if transport is a secure one.

uint8_t mqtt_client_t::transport_type

Transport type selection for client instance. mqtt_transport_type_t for possible values. MQTT_TRASNPORT_MAX is not a valid type.

uint8_t mqtt_client_t::will_retain

Will retain flag, 1 if will message shall be retained persistently.