00001
00002
00003
00004
00005
00006
00007
00008
00009 #ifndef _SYSTEMCALL_H_
00010 #define _SYSTEMCALL_H_
00011
00012 class RobotDesign
00013 {
00014 public:
00015
00016
00017
00018 enum Design
00019 {
00020 UNKNOWN,
00021 ERS210,
00022 ERS7
00023 };
00024
00025
00026
00027
00028 static const char* getRobotDesignName(Design design)
00029 {
00030 switch(design)
00031 {
00032 case ERS210: return "ers210";
00033 case ERS7: return "ers7";
00034 default: return "unknown";
00035 }
00036 }
00037 };
00038
00039
00040
00041
00042
00043 class SystemCall
00044 {
00045 public:
00046
00047
00048 static unsigned long getCurrentSystemTime ();
00049
00050
00051
00052 static unsigned long getTimeSince (unsigned long aTime) {
00053 return (getCurrentSystemTime() - aTime);
00054 }
00055
00056
00057
00058 static unsigned long getFreeMem();
00059
00060
00061
00062
00063 static unsigned char getRemainingPower();
00064
00065
00066 static void reboot();
00067
00068
00069 static void shutdown();
00070
00071
00072 static void getMacAddress(unsigned char address[6]);
00073
00074
00075 static RobotDesign::Design getRobotDesign();
00076 };
00077
00078
00079 #endif // _SYSTEMCALL_H_