Local copy
Dependencies: C12832_lcd ConfigFile EthernetInterface LM75B MMA7660 MQTTPacket mbed-rtos mbed
Fork of IBMIoTClientExampleForLPC1768 by
src/QuickstartClient.h
- Committer:
- samdanbury
- Date:
- 2014-06-23
- Revision:
- 0:6276e9f72327
- Child:
- 2:25ddff75a8c7
File content as of revision 0:6276e9f72327:
/******************************************************************************* * 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(); };