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.
RestMeterHandler.h
00001 #ifndef _RESTMETERHANDLER 00002 #define _RESTMETERHANDLER 00003 00004 #include "HTTPRequestHandler.h" 00005 #include "Servo.h" 00006 00007 class RestMeterHandler : public HTTPRequestHandler 00008 { 00009 public: 00010 RestMeterHandler(const char* rootPath, const char* path, TCPSocket* pTCPSocket); 00011 virtual ~RestMeterHandler(); 00012 00013 static void attach(const char *(*)(const char *)); 00014 00015 //protected: 00016 static inline HTTPRequestHandler* inst(const char* rootPath, const char* path, TCPSocket* pTCPSocket) { 00017 return new RestMeterHandler(rootPath, path, pTCPSocket); 00018 } 00019 00020 virtual void doGet(); 00021 virtual void doPost(); 00022 virtual void doHead(); 00023 00024 virtual void onReadable(); //Data has been read 00025 virtual void onWriteable(); //Data has been written & buf is free 00026 virtual void onClose(); //Connection is closing 00027 00028 private: 00029 static const char *(*callback)(const char *); 00030 00031 }; 00032 #endif
Generated on Tue Jul 12 2022 17:22:32 by
 1.7.2
 1.7.2