embedded-software
reusable software modules for embedded systems
|
#include "main.h"
#include "mqtt.h"
#include "aws_iot_mqtt_client.h"
#include "aws_iot_error.h"
#include "task.h"
Functions | |
IoT_Error_t | MQTT_Init (void) |
IoT_Error_t | MQTT_Subscribe (char *topic, QoS qos, pApplicationHandler_t callback, char *pData) |
IoT_Error_t | MQTT_Publish (char *topic, QoS qos, char *pData, size_t dLen) |
IoT_Error_t | MQTT_Unsubscribe (char *topic) |
IoT_Error_t MQTT_Init | ( | void | ) |
Initalize the MQTT Device
IoT_Error_t MQTT_Publish | ( | char * | topic, |
QoS | qos, | ||
char * | pData, | ||
size_t | dLen | ||
) |
Publish to a topic
topic | - Topic to publish to |
qos | - Quality of service of the MQTT connection |
pData | - Data being published |
dLen | - Length of the data |
IoT_Error_t MQTT_Subscribe | ( | char * | topic, |
QoS | qos, | ||
pApplicationHandler_t | callback, | ||
char * | pData | ||
) |
Subscribe to a topic
topic | - Topic to subscribe to |
qos | - Quality of Service of the MQTT connection |
callback | - Handles receiving data from the broker |
pData | - Pointer to data that gets sent to the callback handler (make it NULL / 0 if not used) |
IoT_Error_t MQTT_Unsubscribe | ( | char * | topic | ) |
Unsubscribe from a topic
topic | - The topic to unsubscribe from |