Microchip® Advanced Software Framework

AWS_SDK/AWS_SDK/aws_mqtt_embedded_client_lib/MQTTClient-C/src/MQTTClient.c File Reference
#include "MQTTClient.h"
#include <string.h>

Functions

void copyMQTTConnectData (MQTTPacket_connectData *destination, MQTTPacket_connectData *source)
 
MQTTReturnCode cycle (Client *c, Timer *timer, uint8_t *packet_type)
 
MQTTReturnCode decodePacket (Client *c, uint32_t *value, uint32_t timeout)
 
MQTTReturnCode deliverMessage (Client *c, MQTTString *topicName, MQTTMessage *message)
 
uint32_t GetFreeMessageHandlerIndex (Client *c)
 
uint16_t getNextPacketId (Client *c)
 
MQTTReturnCode handleDisconnect (Client *c)
 
MQTTReturnCode handlePublish (Client *c, Timer *timer)
 
MQTTReturnCode handlePubrec (Client *c, Timer *timer)
 
MQTTReturnCode handleReconnect (Client *c)
 
char isTopicMatched (char *topicFilter, MQTTString *topicName)
 
MQTTReturnCode keepalive (Client *c)
 
MQTTReturnCode MQTTAttemptReconnect (Client *c)
 
MQTTReturnCode MQTTClient (Client *c, uint32_t commandTimeoutMs, unsigned char *buf, size_t bufSize, unsigned char *readbuf, size_t readBufSize, uint8_t enableAutoReconnect, networkInitHandler_t networkInitHandler, TLSConnectParams *tlsConnectParams)
 
MQTTReturnCode MQTTConnect (Client *c, MQTTPacket_connectData *options)
 
MQTTReturnCode MQTTDisconnect (Client *c)
 
static void MQTTForceDisconnect (Client *c)
 This is for the case when the sendPacket Fails. More...
 
uint32_t MQTTGetNetworkDisconnectedCount (Client *c)
 
uint8_t MQTTIsAutoReconnectEnabled (Client *c)
 
uint8_t MQTTIsConnected (Client *c)
 
MQTTReturnCode MQTTPublish (Client *c, const char *topicName, MQTTMessage *message)
 
void MQTTResetNetworkDisconnectedCount (Client *c)
 
MQTTReturnCode MQTTResubscribe (Client *c)
 
MQTTReturnCode MQTTSubscribe (Client *c, const char *topicFilter, QoS qos, messageHandler messageHandler, pApplicationHandler_t applicationHandler)
 
MQTTReturnCode MQTTUnsubscribe (Client *c, const char *topicFilter)
 
MQTTReturnCode MQTTYield (Client *c, uint32_t timeout_ms)
 
void NewMessageData (MessageData *md, MQTTString *aTopicName, MQTTMessage *aMessage, pApplicationHandler_t applicationHandler)
 
MQTTReturnCode readPacket (Client *c, Timer *timer, uint8_t *packet_type)
 
MQTTReturnCode sendPacket (Client *c, uint32_t length, Timer *timer)
 
MQTTReturnCode setAutoReconnectEnabled (Client *c, uint8_t value)
 
MQTTReturnCode setDisconnectHandler (Client *c, disconnectHandler_t disconnectHandler)
 
MQTTReturnCode waitfor (Client *c, uint8_t packet_type, Timer *timer)
 

MQTTReturnCode decodePacket ( Client c,
uint32_t *  value,
uint32_t  timeout 
)
uint32_t GetFreeMessageHandlerIndex ( Client c)
uint16_t getNextPacketId ( Client c)
char isTopicMatched ( char *  topicFilter,
MQTTString topicName 
)
static void MQTTForceDisconnect ( Client c)
static

This is for the case when the sendPacket Fails.

References Network::destroy, Network::disconnect, Client::isConnected, and Client::networkStack.

Referenced by handleDisconnect().

uint32_t MQTTGetNetworkDisconnectedCount ( Client c)
uint8_t MQTTIsAutoReconnectEnabled ( Client c)
uint8_t MQTTIsConnected ( Client c)

References Client::isConnected, and NULL.

Referenced by aws_iot_is_mqtt_connected().

void MQTTResetNetworkDisconnectedCount ( Client c)
void NewMessageData ( MessageData md,
MQTTString aTopicName,
MQTTMessage aMessage,
pApplicationHandler_t  applicationHandler 
)
MQTTReturnCode setAutoReconnectEnabled ( Client c,
uint8_t  value 
)
MQTTReturnCode setDisconnectHandler ( Client c,
disconnectHandler_t  disconnectHandler 
)
MQTTReturnCode waitfor ( Client c,
uint8_t  packet_type,
Timer timer 
)