Zephyr API Documentation  3.7.0
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
mqtt_sn_client Struct Reference

Structure describing an MQTT-SN client. More...

#include <mqtt_sn.h>

Data Fields

struct mqtt_sn_data client_id
 1-23 character unique client ID
 
struct mqtt_sn_data will_topic
 Topic for Will message.
 
struct mqtt_sn_data will_msg
 Will message.
 
enum mqtt_sn_qos will_qos
 Quality of Service for the Will message.
 
bool will_retain
 Flag indicating if the will message should be retained by the broker.
 
struct mqtt_sn_transporttransport
 Underlying transport to be used by the client.
 
struct net_buf_simple tx
 Buffer for outgoing data.
 
struct net_buf_simple rx
 Buffer for incoming data.
 
mqtt_sn_evt_cb_t evt_cb
 Event callback.
 
uint16_t next_msg_id
 Message ID for the next message to be sent.
 
sys_slist_t publish
 List of pending publish messages.
 
sys_slist_t topic
 List of registered topics.
 
int state
 Current state of the MQTT-SN client.
 
int64_t last_ping
 Timestamp of the last ping request.
 
uint8_t ping_retries
 Number of retries for failed ping attempts.
 
struct k_work_delayable process_work
 Delayable work structure for processing MQTT-SN events.
 

Detailed Description

Structure describing an MQTT-SN client.

Field Documentation

◆ client_id

struct mqtt_sn_data mqtt_sn_client::client_id

1-23 character unique client ID

◆ evt_cb

mqtt_sn_evt_cb_t mqtt_sn_client::evt_cb

Event callback.

◆ last_ping

int64_t mqtt_sn_client::last_ping

Timestamp of the last ping request.

◆ next_msg_id

uint16_t mqtt_sn_client::next_msg_id

Message ID for the next message to be sent.

◆ ping_retries

uint8_t mqtt_sn_client::ping_retries

Number of retries for failed ping attempts.

◆ process_work

struct k_work_delayable mqtt_sn_client::process_work

Delayable work structure for processing MQTT-SN events.

◆ publish

sys_slist_t mqtt_sn_client::publish

List of pending publish messages.

◆ rx

struct net_buf_simple mqtt_sn_client::rx

Buffer for incoming data.

◆ state

int mqtt_sn_client::state

Current state of the MQTT-SN client.

◆ topic

sys_slist_t mqtt_sn_client::topic

List of registered topics.

◆ transport

struct mqtt_sn_transport* mqtt_sn_client::transport

Underlying transport to be used by the client.

◆ tx

struct net_buf_simple mqtt_sn_client::tx

Buffer for outgoing data.

◆ will_msg

struct mqtt_sn_data mqtt_sn_client::will_msg

Will message.

Must be initialized before connecting with will=true

◆ will_qos

enum mqtt_sn_qos mqtt_sn_client::will_qos

Quality of Service for the Will message.

◆ will_retain

bool mqtt_sn_client::will_retain

Flag indicating if the will message should be retained by the broker.

◆ will_topic

struct mqtt_sn_data mqtt_sn_client::will_topic

Topic for Will message.

Must be initialized before connecting with will=true


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