Baseline for testing

Dependents:   mbed_escm2000

Revision:
1:aaddf80105fe
Parent:
0:929bb73983c5
Child:
2:486d068deff9
--- a/EventLog.h	Thu Jul 25 00:43:28 2019 +0000
+++ b/EventLog.h	Thu Sep 12 11:28:11 2019 +0000
@@ -11,9 +11,23 @@
 {
 public:
 
-    int port;
-    int address;
-    char timeStr[MAX_EVENT_LENGTH];
+    uint16_t port;
+    uint16_t address;
+    uint16_t hours;
+    uint16_t mins;
+    uint16_t secs;
+    uint16_t month;
+    uint16_t day;
+    uint16_t year;
+    
+    
+    ESCM_Event();
+    ESCM_Event(uint16_t address);
+    
+    
+    void getTime (char* buffer);
+    void setTimeNow(void);
+    
 
 };
 
@@ -28,15 +42,19 @@
     
     ESCM_Event events[MAX_EVENTS] ;
     
-    void init();
-    int  load();
-    void save();
+    int init();
+    int load();
+    int save();
+    
     void display(Serial *pc);
-    void add(int address);
-    void add(int address, char* timeStamp);
+    void add(uint16_t address);
+    void add(uint16_t address, uint16_t port);
+    void add(uint16_t address, char* timeStamp);
     void clear();
+    ESCM_Event * index (int pos );
 
-    static const int max_size_ = 5;
+
+    static const int max_size_ = 50;
     
     int head_ ;
     int tail_ ;