Soletta™ Framework
|
Routines to handle the MQTT protocol. More...
#include <sol-buffer.h>
#include <sol-certificate.h>
#include <sol-common-buildopts.h>
#include <stdbool.h>
#include <stdlib.h>
#include <inttypes.h>
Go to the source code of this file.
Data Structures | |
struct | sol_mqtt_config |
Server Configuration. More... | |
struct | sol_mqtt_handlers |
MQTT callback handlers. More... | |
struct | sol_mqtt_message |
MQTT Message. More... | |
Macros | |
#define | SOL_MQTT_CONFIG_API_VERSION (1) |
#define | SOL_MQTT_HANDLERS_API_VERSION (1) |
#define | SOL_MQTT_MESSAGE_API_VERSION (1) |
#define | SOL_MQTT_MESSAGE_CHECK_API_VERSION(msg_,...) |
Macro used to check if a struct struct sol_mqtt_message has the expected API version. More... | |
Typedefs | |
typedef struct sol_mqtt | sol_mqtt |
MQTT Object. More... | |
typedef struct sol_mqtt_config | sol_mqtt_config |
Server Configuration. More... | |
typedef struct sol_mqtt_handlers | sol_mqtt_handlers |
MQTT callback handlers. More... | |
typedef struct sol_mqtt_message | sol_mqtt_message |
MQTT Message. More... | |
Enumerations | |
enum | sol_mqtt_conn_status { SOL_MQTT_DISCONNECTED = -1, SOL_MQTT_CONNECTED = 0, SOL_MQTT_WRONG_PROTOCOL = 1, SOL_MQTT_ID_REJECTED = 2, SOL_MQTT_UNAVAILABLE = 3 } |
Connection status. More... | |
enum | sol_mqtt_qos { SOL_MQTT_QOS_AT_MOST_ONCE = 0, SOL_MQTT_QOS_AT_LEAST_ONCE = 1, SOL_MQTT_QOS_EXACTLY_ONCE = 2 } |
MQTT QOS level for message delivery. More... | |
Functions | |
struct sol_mqtt * | sol_mqtt_connect (const struct sol_mqtt_config *config) |
Connect to a MQTT broker. More... | |
void | sol_mqtt_disconnect (struct sol_mqtt *mqtt) |
Disconnect from MQTT Broker. More... | |
int | sol_mqtt_get_connection_status (const struct sol_mqtt *mqtt) |
Get connection status. More... | |
int | sol_mqtt_publish (const struct sol_mqtt *mqtt, struct sol_mqtt_message *message) |
Send the Broker a message to be published in a given topic. More... | |
int | sol_mqtt_reconnect (struct sol_mqtt *mqtt) |
Reestablish the connection to the MQTT broker. More... | |
int | sol_mqtt_subscribe (const struct sol_mqtt *mqtt, const char *topic, sol_mqtt_qos qos) |
Ask the Broker to be subscribed to a given topic. More... | |
Routines to handle the MQTT protocol.
Wrapper library for MQTT communication using the mosquitto MQTT library.
#define SOL_MQTT_CONFIG_API_VERSION (1) |
Referenced by main().
#define SOL_MQTT_HANDLERS_API_VERSION (1) |
Referenced by main().
#define SOL_MQTT_MESSAGE_API_VERSION (1) |
Referenced by iio_gyroscope_reader_cb(), and main().