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.
Dependencies: DebouncedEdgeIn I2cLCD_cursor Rtc8564 mbed beep
Clock.h
00001 #ifndef CLOCK_H 00002 #define CLOCK_H 00003 00004 #include "mbed.h" 00005 #include <vector> 00006 #include "I_NotifyUpdate.h" 00007 #include "I_SetPresentTime.h" 00008 #include "I_SetMode.h" 00009 #include "OperationMode.h" 00010 00011 namespace Model 00012 { 00013 class Clock 00014 { 00015 public: 00016 Clock(I_NotifyUpdate* notifyUpdate, I_SetPresentTime* setPresentTime); 00017 00018 void addSetMode(I_SetMode* setMode); 00019 void initialize(); 00020 void renew(); 00021 struct tm* getDateTime(); 00022 void requestModeChange(); 00023 void requestIncrementValue(); 00024 void requestDecrementValue(); 00025 00026 private: 00027 I_NotifyUpdate* m_notifyUpdate; 00028 I_SetPresentTime* m_setPresentTime; 00029 struct tm m_dateTime; 00030 OperationMode m_mode; 00031 std::vector<I_SetMode*> m_setModes; 00032 00033 void notifyMode(); 00034 int getDays(); 00035 void decideDayOfMonth(); 00036 void decideDayOfWeek(); 00037 }; 00038 } 00039 00040 #endif // CLOCK_H
Generated on Wed Jul 13 2022 02:25:45 by
1.7.2