Zephyr API Documentation 4.1.99
A Scalable Open Source RTOS
 4.1.99
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
mqtt_client Struct Reference

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

#include <mqtt.h>

Data Fields

struct mqtt_internal internal
 MQTT client internal state.
 
struct mqtt_transport transport
 MQTT transport configuration and data.
 
struct mqtt_utf8 client_id
 Unique client identification to be used for the connection.
 
const void * broker
 Broker details, for example, address, port.
 
struct mqtt_utf8user_name
 User name (if any) to be used for the connection.
 
struct mqtt_utf8password
 Password (if any) to be used for the connection.
 
struct { 
 
   struct mqtt_utf8_pair   user_prop [CONFIG_MQTT_USER_PROPERTIES_MAX] 
 MQTT 5.0, chapter 3.1.3.2.8 User Property. More...
 
   struct mqtt_utf8   content_type 
 MQTT 5.0, chapter 3.1.3.2.5 Content Type. More...
 
   struct mqtt_utf8   response_topic 
 MQTT 5.0, chapter 3.1.3.2.6 Response Topic. More...
 
   struct mqtt_binstr   correlation_data 
 MQTT 5.0, chapter 3.1.3.2.7 Correlation Data. More...
 
   uint32_t   will_delay_interval 
 MQTT 5.0, chapter 3.1.3.2.2 Will Delay Interval. More...
 
   uint32_t   message_expiry_interval 
 MQTT 5.0, chapter 3.1.3.2.4 Message Expiry Interval. More...
 
   uint8_t   payload_format_indicator 
 MQTT 5.0, chapter 3.1.3.2.3 Payload Format Indicator. More...
 
will_prop 
 MQTT 5.0 Will properties.
 
struct mqtt_topicwill_topic
 Will topic and QoS.
 
struct mqtt_utf8will_message
 Will message.
 
mqtt_evt_cb_t evt_cb
 Application callback registered with the module to get MQTT events.
 
uint8_trx_buf
 Receive buffer used for MQTT packet reception in RX path.
 
uint32_t rx_buf_size
 Size of receive buffer.
 
uint8_ttx_buf
 Transmit buffer used for creating MQTT packet in TX path.
 
uint32_t tx_buf_size
 Size of transmit buffer.
 
uint16_t keepalive
 Keepalive interval for this client in seconds.
 
uint8_t protocol_version
 MQTT protocol version.
 
int8_t unacked_ping
 Unanswered PINGREQ count on this connection.
 
struct { 
 
   struct mqtt_utf8_pair   user_prop [CONFIG_MQTT_USER_PROPERTIES_MAX] 
 MQTT 5.0, chapter 3.1.2.11.8 User Property. More...
 
   struct mqtt_utf8   auth_method 
 MQTT 5.0, chapter 3.1.2.11.9 Authentication Method. More...
 
   struct mqtt_binstr   auth_data 
 MQTT 5.0, chapter 3.1.2.11.10 Authentication Data. More...
 
   uint32_t   session_expiry_interval 
 MQTT 5.0, chapter 3.1.2.11.2 Session Expiry Interval. More...
 
   uint32_t   maximum_packet_size 
 MQTT 5.0, chapter 3.1.2.11.4 Maximum Packet Size. More...
 
   uint16_t   receive_maximum 
 MQTT 5.0, chapter 3.1.2.11.3 Receive Maximum. More...
 
   bool   request_response_info 
 MQTT 5.0, chapter 3.1.2.11.6 Request Response Information. More...
 
   bool   request_problem_info 
 MQTT 5.0, chapter 3.1.2.11.7 Request Response Information. More...
 
prop 
 MQTT 5.0 properties.
 
uint8_t will_retain: 1
 Will retain flag, 1 if will message shall be retained persistently.
 
uint8_t clean_session: 1
 Clean session flag indicating a fresh (1) or a retained session (0).
 
void * user_data
 User specific opaque data.
 

Detailed Description

MQTT Client definition to maintain information relevant to the client.

Field Documentation

◆ auth_data

struct mqtt_binstr mqtt_client::auth_data

MQTT 5.0, chapter 3.1.2.11.10 Authentication Data.

◆ auth_method

struct mqtt_utf8 mqtt_client::auth_method

MQTT 5.0, chapter 3.1.2.11.9 Authentication Method.

◆ 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.

◆ content_type

struct mqtt_utf8 mqtt_client::content_type

MQTT 5.0, chapter 3.1.3.2.5 Content Type.

◆ correlation_data

struct mqtt_binstr mqtt_client::correlation_data

MQTT 5.0, chapter 3.1.3.2.7 Correlation Data.

◆ 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.

◆ maximum_packet_size

uint32_t mqtt_client::maximum_packet_size

MQTT 5.0, chapter 3.1.2.11.4 Maximum Packet Size.

◆ message_expiry_interval

uint32_t mqtt_client::message_expiry_interval

MQTT 5.0, chapter 3.1.3.2.4 Message Expiry Interval.

◆ 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.

◆ payload_format_indicator

uint8_t mqtt_client::payload_format_indicator

MQTT 5.0, chapter 3.1.3.2.3 Payload Format Indicator.

◆ [struct]

struct { ... } mqtt_client::prop

MQTT 5.0 properties.

◆ protocol_version

uint8_t mqtt_client::protocol_version

MQTT protocol version.

◆ receive_maximum

uint16_t mqtt_client::receive_maximum

MQTT 5.0, chapter 3.1.2.11.3 Receive Maximum.

◆ request_problem_info

bool mqtt_client::request_problem_info

MQTT 5.0, chapter 3.1.2.11.7 Request Response Information.

◆ request_response_info

bool mqtt_client::request_response_info

MQTT 5.0, chapter 3.1.2.11.6 Request Response Information.

◆ response_topic

struct mqtt_utf8 mqtt_client::response_topic

MQTT 5.0, chapter 3.1.3.2.6 Response Topic.

◆ 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.

◆ session_expiry_interval

uint32_t mqtt_client::session_expiry_interval

MQTT 5.0, chapter 3.1.2.11.2 Session Expiry Interval.

◆ 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_data

void* mqtt_client::user_data

User specific opaque data.

◆ user_name

struct mqtt_utf8* mqtt_client::user_name

User name (if any) to be used for the connection.

NULL indicates no user name.

◆ user_prop

struct mqtt_utf8_pair mqtt_client::user_prop[CONFIG_MQTT_USER_PROPERTIES_MAX]

MQTT 5.0, chapter 3.1.3.2.8 User Property.

MQTT 5.0, chapter 3.1.2.11.8 User Property.

◆ will_delay_interval

uint32_t mqtt_client::will_delay_interval

MQTT 5.0, chapter 3.1.3.2.2 Will Delay Interval.

◆ 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.

◆ [struct]

struct { ... } mqtt_client::will_prop

MQTT 5.0 Will properties.

◆ 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: