Local copy

Dependencies:   C12832_lcd ConfigFile EthernetInterface LM75B MMA7660 MQTTPacket mbed-rtos mbed

Fork of IBMIoTClientExampleForLPC1768 by Sam Danbury

Revision:
2:25ddff75a8c7
Parent:
0:6276e9f72327
Child:
3:ca5b84eb8f3b
--- a/src/QuickstartClient.h	Mon Jun 23 13:37:46 2014 +0000
+++ b/src/QuickstartClient.h	Mon Jun 23 20:12:18 2014 +0000
@@ -12,17 +12,18 @@
 
 #include "MQTTPacket.h"
 #include "rtos.h"
+#include "mbed.h"
 #include "EthernetInterface.h"
 #include "C12832_lcd.h"
+#include "ConfigFile.h"
 
-#include <iostream>
 #include <string>
 #include <vector>
 #include <map>
 #include <sstream>
 #include <algorithm>
 
-#define IBM_IOT_BROKER "m.qs.internetofthings.ibmcloud.com"
+#define IBM_IOT_BROKER "37.58.109.238"
 #define IBM_IOT_PORT 1883
 
 using namespace std;
@@ -33,12 +34,19 @@
         C12832_LCD lcd;
         TCPSocketConnection mysock;
         string macAddress;
-        char topic[55];
-        int reconnectDelay(int attempt);
+        char topic[25];
+        bool quickstartMode;
+        
+        string org;
+        string type;
+        string id;
+        string token;
                 
         QuickstartClient(string mac);
+        void loadConfig();
         void tryMqttConnect();
         void connect();
         void publish(string payload);
         bool getConnection();
+        int reconnectDelay(int attempt);
 };
\ No newline at end of file