Local copy

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

Fork of IBMIoTClientExampleForLPC1768 by Sam Danbury

Revision:
0:6276e9f72327
Child:
2:25ddff75a8c7
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/QuickstartClient.h	Mon Jun 23 13:37:46 2014 +0000
@@ -0,0 +1,44 @@
+/*******************************************************************************
+* Copyright (c) 2014 IBM Corporation and other Contributors.
+*
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors: Sam Danbury
+* IBM - Initial Contribution
+*******************************************************************************/
+
+#include "MQTTPacket.h"
+#include "rtos.h"
+#include "EthernetInterface.h"
+#include "C12832_lcd.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_PORT 1883
+
+using namespace std;
+
+class QuickstartClient {
+    public:
+        bool connected;
+        C12832_LCD lcd;
+        TCPSocketConnection mysock;
+        string macAddress;
+        char topic[55];
+        int reconnectDelay(int attempt);
+                
+        QuickstartClient(string mac);
+        void tryMqttConnect();
+        void connect();
+        void publish(string payload);
+        bool getConnection();
+};
\ No newline at end of file