Suad Suljic / Mbed OS KOPIRANO_cell_locker

Dependencies:   MPU6050_SIM5320_TEST

Fork of MPU_SDCARD by Suad Suljic

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers DataLogger.h Source File

DataLogger.h

00001 #ifndef _DATALOGGER_H
00002 #define _DATALOGGER_H
00003 
00004 //#include "DataLogger.h"
00005 #include <stdint.h>
00006 
00007 #define DATASIZE 20
00008 
00009 using namespace std;
00010 
00011 
00012 //*************************************************************LOGGER**************************************************************************//
00013 
00014 template<class T>
00015 class DataLogger{
00016 private:
00017 
00018   T _datalist[DATASIZE];
00019   int _index;
00020 
00021 
00022 public:
00023 
00024 
00025     DataLogger(){//cout<<"Default Constructor"<<endl;
00026      for(int i=0;i<DATASIZE;i++)
00027         _datalist[i]._date=0;
00028     _index=-1;}
00029     DataLogger(T b){//cout<<"Constructor"<<endl;
00030     _index=-1;}
00031     void savelog(T templog);
00032     void print();
00033     uint16_t getsize();
00034     uint8_t position();
00035     T* getfirst();
00036     T* getlast();
00037     uint16_t getnumberOfDays();
00038     T* getLastStop();
00039 
00040 
00041 
00042 };
00043 #endif
00044