Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of mbed-os-example-mbed5-blinky by
MQTTInterface.h
00001 00002 #if !defined(MQTTINTERFACE_H) 00003 #define MQTTINTERFACE_H 00004 00005 #include "mbed.h" 00006 #include "MQTTmbed.h" 00007 #include "TCPSocket.h" 00008 #include "MQTTSocket.h" 00009 00010 class MQTTInterface : public MQTTSocket 00011 { 00012 public: 00013 MQTTInterface(NetworkInterface* nif) 00014 { 00015 _nif = nif; 00016 open(_nif); 00017 } 00018 00019 NetworkInterface& getEth() 00020 { 00021 return *_nif; 00022 } 00023 00024 void reconnect() 00025 { 00026 _nif->disconnect(); 00027 _nif->connect(); 00028 } 00029 00030 private: 00031 00032 NetworkInterface* _nif; 00033 00034 }; 00035 00036 00037 #endif
Generated on Wed Jul 13 2022 21:16:17 by
