Provides Javascript wrappers for MQTT.

Dependencies:   mbed-http DEVI2C_JS MQTTPacket FP

Embed: (wiki syntax)

« Back to documentation index

Async< Network, Timer, Thread, Mutex > Class Template Reference

Async< Network, Timer, Thread, Mutex > Class Template Reference

non-blocking, threaded MQTT client API More...

#include <MQTTAsync.h>

Public Member Functions

void setConnectionLostHandler (connectionLostHandlers clh)
 Set the connection lost callback - called whenever the connection is lost and we should be connected.
void setDefaultMessageHandler (messageHandler mh)
 Set the default message handling callback - used for any message which does not match a subscription message handler.

Detailed Description

template<class Network, class Timer, class Thread, class Mutex>
class MQTT::Async< Network, Timer, Thread, Mutex >

non-blocking, threaded MQTT client API

Parameters:
Networka network class which supports send, receive
Timera timer class with the methods:

Definition at line 79 of file MQTTAsync.h.


Member Function Documentation

void setConnectionLostHandler ( connectionLostHandlers  clh )

Set the connection lost callback - called whenever the connection is lost and we should be connected.

Parameters:
clh- pointer to the callback function

Definition at line 106 of file MQTTAsync.h.

void setDefaultMessageHandler ( messageHandler  mh )

Set the default message handling callback - used for any message which does not match a subscription message handler.

Parameters:
mh- pointer to the callback function

Definition at line 114 of file MQTTAsync.h.