embedded-software
reusable software modules for embedded systems
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
mqtt.h
Go to the documentation of this file.
1 #ifndef MQTT_H
2 #define MQTT_H
3 
4 #include <stdint.h>
5 #include "aws_iot_mqtt_client.h"
6 #include "aws_iot_error.h"
7 
8 #define MQTT_CONNECT_MAX_ATTEMPT_COUNT 3
9 
10 // every 100 ms yield 10ms to the MQTT client service
11 #define MQTT_YIELD_TIME 10
12 #define MQTT_YIELD_PERIOD 100
13 
17 IoT_Error_t MQTT_Init(void);
18 
27 IoT_Error_t MQTT_Subscribe(char* topic, QoS qos, pApplicationHandler_t callback, char* pData);
28 
37 IoT_Error_t MQTT_Publish(char* topic, QoS qos, char* pData, size_t dLen);
38 
44 IoT_Error_t MQTT_Unsubscribe(char* topic);
45 
46 
47 #endif
IoT_Error_t MQTT_Unsubscribe(char *topic)
Definition: mqtt.c:104
IoT_Error_t MQTT_Subscribe(char *topic, QoS qos, pApplicationHandler_t callback, char *pData)
Definition: mqtt.c:88
IoT_Error_t MQTT_Publish(char *topic, QoS qos, char *pData, size_t dLen)
Definition: mqtt.c:93
IoT_Error_t MQTT_Init(void)
Definition: mqtt.c:17