17#include <zephyr/net/mqtt.h>
61 const struct mqtt_evt *
const event);
63 bool session_present);
static const struct event_proxy_config cfg
Definition event_proxy_def.h:28
void(* mqtt_helper_on_puback_t)(uint16_t message_id, int result)
Definition mqtt_helper.h:67
int mqtt_helper_deinit(void)
Deinitialize library. Must be called when all MQTT operations are done to release resources and allow...
int mqtt_helper_connect(struct mqtt_helper_conn_params *conn_params)
Connect to an MQTT broker.
int mqtt_helper_disconnect(void)
Disconnect from the MQTT broker.
int mqtt_helper_publish(const struct mqtt_publish_param *param)
Publish an MQTT message.
uint16_t mqtt_helper_msg_id_get(void)
Get a message ID.
void(* mqtt_helper_on_pingresp_t)(void)
Definition mqtt_helper.h:69
int mqtt_helper_init(struct mqtt_helper_cfg *cfg)
Initialize the MQTT helper.
void(* mqtt_helper_on_connack_t)(enum mqtt_conn_return_code return_code, bool session_present)
Definition mqtt_helper.h:62
mqtt_state
Definition mqtt_helper.h:23
@ MQTT_STATE_UNINIT
Definition mqtt_helper.h:24
@ MQTT_STATE_DISCONNECTED
Definition mqtt_helper.h:25
@ MQTT_STATE_CONNECTING
Definition mqtt_helper.h:27
@ MQTT_STATE_DISCONNECTING
Definition mqtt_helper.h:30
@ MQTT_STATE_CONNECTED
Definition mqtt_helper.h:29
@ MQTT_STATE_TRANSPORT_CONNECTED
Definition mqtt_helper.h:28
@ MQTT_STATE_COUNT
Definition mqtt_helper.h:32
@ MQTT_STATE_TRANSPORT_CONNECTING
Definition mqtt_helper.h:26
void(* mqtt_helper_on_disconnect_t)(int result)
Definition mqtt_helper.h:64
mqtt_helper_error
Definition mqtt_helper.h:35
@ MQTT_HELPER_ERROR_MSG_SIZE
Definition mqtt_helper.h:37
void(* mqtt_helper_on_error_t)(enum mqtt_helper_error error)
Definition mqtt_helper.h:70
void(* mqtt_helper_on_publish_t)(struct mqtt_helper_buf topic_buf, struct mqtt_helper_buf payload_buf)
Definition mqtt_helper.h:65
void(* mqtt_helper_on_suback_t)(uint16_t message_id, int result)
Definition mqtt_helper.h:68
int mqtt_helper_subscribe(struct mqtt_subscription_list *sub_list)
Subscribe to MQTT topics.
bool(* mqtt_helper_on_all_events_t)(struct mqtt_client *const client, const struct mqtt_evt *const event)
Handler invoked for events that are received from the MQTT stack. This callback handler can be used t...
Definition mqtt_helper.h:60
size_t size
Definition mqtt_helper.h:45
char * ptr
Definition mqtt_helper.h:42
Definition mqtt_helper.h:40
mqtt_helper_on_disconnect_t on_disconnect
Definition mqtt_helper.h:76
mqtt_helper_on_all_events_t on_all_events
Definition mqtt_helper.h:74
mqtt_helper_on_publish_t on_publish
Definition mqtt_helper.h:77
mqtt_helper_on_connack_t on_connack
Definition mqtt_helper.h:75
mqtt_helper_on_pingresp_t on_pingresp
Definition mqtt_helper.h:80
mqtt_helper_on_suback_t on_suback
Definition mqtt_helper.h:79
struct mqtt_helper_cfg::@205 cb
mqtt_helper_on_puback_t on_puback
Definition mqtt_helper.h:78
mqtt_helper_on_error_t on_error
Definition mqtt_helper.h:81
Definition mqtt_helper.h:72
struct mqtt_helper_buf password
Definition mqtt_helper.h:90
struct mqtt_helper_buf hostname
Definition mqtt_helper.h:87
struct mqtt_helper_buf device_id
Definition mqtt_helper.h:88
struct mqtt_helper_buf user_name
Definition mqtt_helper.h:89
Definition mqtt_helper.h:85