This commit is contained in:
Wolfgang Hottgenroth
2014-05-14 19:37:04 +02:00
commit ca8ed709b8
22 changed files with 1468 additions and 0 deletions

39
uptime.h Normal file
View File

@ -0,0 +1,39 @@
#ifndef UPTIME_H_
#define UPTIME_H_
#include "cmd.h"
class Uptime;
class UptimeCmd : public Cmd {
public:
UptimeCmd(Uptime *uptime);
virtual String getCmdName() { return "UP"; }
virtual String getHelp() { return "Uptime"; }
virtual String exec(String params);
private:
Uptime *m_uptime;
};
class Uptime {
public:
Uptime();
void begin(CmdServer *cmdServer);
void exec();
uint8_t getSeconds() { return m_seconds; };
uint8_t getMinutes() { return m_minutes; };
uint8_t getHours() { return m_hours; };
uint8_t getDays() { return m_days; };
private:
UptimeCmd m_uptimeCmd;
uint8_t m_seconds;
uint8_t m_minutes;
uint8_t m_hours;
uint16_t m_days;
};
#endif /* TEST_H_ */