CO528 - Assessment 3 - Guard Room Project
Dependencies: C12832 MMA7660 mbed-http
Fork of http-example by
Core.h
00001 /* mbed library for the mbed Lab Board 128*32 pixel LCD 00002 * use C12832 controller 00003 * Copyright (c) 2012 Peter Drescher - DC2PD 00004 * Released under the MIT License: http://mbed.org/license/mit 00005 * 00006 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 00007 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 00008 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 00009 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 00010 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 00011 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 00012 * THE SOFTWARE. 00013 */ 00014 00015 #ifndef CORE_H 00016 #define CORE_H 00017 00018 #include <string> 00019 #include "MMA7660.h" 00020 #include "C12832.h" 00021 #include "easy-connect.h" 00022 #include "http_request.h" 00023 //#include "select-demo.h" 00024 00025 /** This classe is being used to control the temperature program 00026 * 00027 */ 00028 00029 class Core { 00030 public: 00031 /** Create a Core object and initialise all the values 00032 * 00033 */ 00034 Core(); 00035 00036 /** Plays the program, this is the heart of this class 00037 * 00038 */ 00039 void guard(void); 00040 00041 private: 00042 bool doorIsOpening(void); 00043 void displayMessageOnScreen(void); 00044 void triggerAlarm(void); 00045 void shutDownAlarm(void); 00046 void updateInfoWithAPI(void); 00047 void dumpResponsePut(HttpResponse *); 00048 void dumpResponseGet(HttpResponse *); 00049 void putRequest(void); 00050 void getRequest(void); 00051 00052 /** These are the variables used in the program 00053 * 00054 */ 00055 bool _quiet; 00056 std::string _message; 00057 NetworkInterface* _network; 00058 }; 00059 00060 00061 00062 00063 #endif
Generated on Thu Jul 14 2022 10:16:14 by 1.7.2