Rick McConney / MQTT-JMF

Dependencies:   FP

Dependents:   WNCProximityMqtt

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers MQTTWNCInterface.h Source File

MQTTWNCInterface.h

00001 
00002 #if !defined(MQTT_WNCInterface_H)
00003 #define MQTT_WNCInterface_H
00004 
00005 #include "MQTTmbed.h"
00006 #include "WNCInterface.h"
00007 #include "MQTTSocket.h"
00008 
00009 class MQTTwnc : public MQTTSocket
00010 {
00011 public:    
00012     MQTTwnc()
00013     {
00014         eth.init();                          // Use DHCP
00015         eth.connect();
00016     }
00017     
00018     WNCInterface& getEth()
00019     {
00020         return eth;
00021     }
00022     
00023     void reconnect()
00024     {
00025         eth.connect();  // nothing I've tried actually works to reconnect 
00026     }
00027     
00028 private:
00029 
00030     WNCInterface eth;
00031     
00032 };
00033 
00034 
00035 #endif