MQTTClient

Dependents:   IoTGateway_Basic test

Files at this revision

API Documentation at this revision

Comitter:
SomeRandomBloke
Date:
Wed Mar 21 21:49:28 2012 +0000
Parent:
1:a50b6c866a3b
Child:
3:ac326c5b065c
Commit message:

Changed in this revision

MQTTClient.cpp Show annotated file Show diff for this revision Revisions of this file
MQTTClient.h Show annotated file Show diff for this revision Revisions of this file
--- a/MQTTClient.cpp	Wed Mar 21 21:43:02 2012 +0000
+++ b/MQTTClient.cpp	Wed Mar 21 21:49:28 2012 +0000
@@ -1,4 +1,4 @@
-/*
+/**
 MQTTClient.cpp
 Based on MQTTClient from http://ceit.uq.edu.au/content/mqttclient-mbed-version-20
 A simple MQTT client for mbed, version 2.0
--- a/MQTTClient.h	Wed Mar 21 21:43:02 2012 +0000
+++ b/MQTTClient.h	Wed Mar 21 21:49:28 2012 +0000
@@ -1,4 +1,4 @@
-/*
+/**
 MQTTClient.cpp
 Based on MQTTClient from http://ceit.uq.edu.au/content/mqttclient-mbed-version-20
 A simple MQTT client for mbed, version 2.0
@@ -39,12 +39,30 @@
 #define MAX_PACKET_SIZE 128
 #define KEEPALIVE 15000
 
+/** MQTTClient class
+ *
+ */
 class MQTTClient 
 {
 public:
-    MQTTClient(IpAddr server, int port, void (*callback)(char*, char*));
+
+/** Default Constructor
+ */
     MQTTClient();
+
+/** Default Destructor
+ */
     ~MQTTClient();
+
+/** Alternative Constructor with parameters
+ * 
+ * Allow object to be constructed with minimum parameters. 
+ *
+ * @param server The IP address of the server to connect to
+ * @param port   The TCP/IP port on the server to connect to
+ * @param callback Callback function to handle subscription to topics
+ */
+    MQTTClient(IpAddr server, int port, void (*callback)(char*, char*));
     void init(IpAddr *server, int port, void (*callback)(char*, char*));
     void init(IpAddr *server, int port, char *userName, char *password, void (*callback)(char*, char*));
     int connect(char *);