more stuff

This commit is contained in:
hg
2014-02-23 21:12:13 +01:00
parent bc8a9023aa
commit 7c2ff00bc4
12 changed files with 351 additions and 19 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_ */