nRF Connect SDK API 2.8.99
|
Convenience library that simplifies Zephyr MQTT API and socket handling. More...
Data Structures | |
struct | mqtt_helper_buf |
struct | mqtt_helper_cfg |
struct | mqtt_helper_conn_params |
Typedefs | |
typedef 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 to filter incoming MQTT events before they are processed by the MQTT helper library. | |
typedef void(* | mqtt_helper_on_connack_t) (enum mqtt_conn_return_code return_code, bool session_present) |
typedef void(* | mqtt_helper_on_disconnect_t) (int result) |
typedef void(* | mqtt_helper_on_publish_t) (struct mqtt_helper_buf topic_buf, struct mqtt_helper_buf payload_buf) |
typedef void(* | mqtt_helper_on_puback_t) (uint16_t message_id, int result) |
typedef void(* | mqtt_helper_on_suback_t) (uint16_t message_id, int result) |
typedef void(* | mqtt_helper_on_pingresp_t) (void) |
typedef void(* | mqtt_helper_on_error_t) (enum mqtt_helper_error error) |
Functions | |
int | mqtt_helper_init (struct mqtt_helper_cfg *cfg) |
Initialize the MQTT helper. | |
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_subscribe (struct mqtt_subscription_list *sub_list) |
Subscribe to MQTT topics. | |
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. | |
int | mqtt_helper_deinit (void) |
Deinitialize library. Must be called when all MQTT operations are done to release resources and allow for a new client. The client must be in a disconnected state. | |
Convenience library that simplifies Zephyr MQTT API and socket handling.