Zephyr API Documentation  2.7.0-rc2
A Scalable Open Source RTOS
mqtt_client Struct Reference

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

#include <mqtt.h>

Data Fields

struct mqtt_internal internal
 
struct mqtt_transport transport
 
struct mqtt_utf8 client_id
 
const voidbroker
 
struct mqtt_utf8user_name
 
struct mqtt_utf8password
 
struct mqtt_topicwill_topic
 
struct mqtt_utf8will_message
 
mqtt_evt_cb_t evt_cb
 
uint8_trx_buf
 
uint32_t rx_buf_size
 
uint8_ttx_buf
 
uint32_t tx_buf_size
 
uint16_t keepalive
 
uint8_t protocol_version
 
int8_t unacked_ping
 
uint8_t will_retain: 1
 
uint8_t clean_session: 1
 

Detailed Description

MQTT Client definition to maintain information relevant to the client.

Field Documentation

◆ broker

const void* mqtt_client::broker

Broker details, for example, address, port. Address type should be compatible with transport used.

◆ clean_session

uint8_t mqtt_client::clean_session

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

◆ client_id

struct mqtt_utf8 mqtt_client::client_id

Unique client identification to be used for the connection.

◆ evt_cb

mqtt_evt_cb_t mqtt_client::evt_cb

Application callback registered with the module to get MQTT events.

◆ internal

struct mqtt_internal mqtt_client::internal

MQTT client internal state.

◆ keepalive

uint16_t mqtt_client::keepalive

Keepalive interval for this client in seconds. Default is CONFIG_MQTT_KEEPALIVE.

◆ password

struct mqtt_utf8* mqtt_client::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.

◆ protocol_version

uint8_t mqtt_client::protocol_version

MQTT protocol version.

◆ rx_buf

uint8_t* mqtt_client::rx_buf

Receive buffer used for MQTT packet reception in RX path.

◆ rx_buf_size

uint32_t mqtt_client::rx_buf_size

Size of receive buffer.

◆ transport

struct mqtt_transport mqtt_client::transport

MQTT transport configuration and data.

◆ tx_buf

uint8_t* mqtt_client::tx_buf

Transmit buffer used for creating MQTT packet in TX path.

◆ tx_buf_size

uint32_t mqtt_client::tx_buf_size

Size of transmit buffer.

◆ unacked_ping

int8_t mqtt_client::unacked_ping

Unanswered PINGREQ count on this connection.

◆ user_name

struct mqtt_utf8* mqtt_client::user_name

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

◆ will_message

struct mqtt_utf8* mqtt_client::will_message

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

◆ will_retain

uint8_t mqtt_client::will_retain

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

◆ will_topic

struct mqtt_topic* mqtt_client::will_topic

Will topic and QoS. Can be NULL.


The documentation for this struct was generated from the following file: