Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

Platform/Aperios1.3.2/SystemCall.h

Go to the documentation of this file.
00001 /** 
00002 * @file  Platform/Aperios1.3.2/SystemCall.h
00003 * @brief static class for system calls from the non NDA classes
00004 *
00005 * @author <A href="mailto:brunn@sim.informatik.tu-darmstadt.de">Ronnie Brunn</A>
00006 * @author <A href="mailto:risler@sim.informatik.tu-darmstadt.de">Max Risler</A>
00007 */
00008 
00009 #ifndef _SYSTEMCALL_H_
00010 #define _SYSTEMCALL_H_
00011 
00012 class RobotDesign
00013 {
00014 public:
00015   /**
00016   * The design of the robot.
00017   */
00018   enum Design 
00019   {
00020     UNKNOWN,
00021     ERS210, 
00022     ERS7
00023   };
00024 
00025   /**
00026   * Returns name for robot design.
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 * static class for system calls
00041 * @attention the implementation is system specific!
00042 */
00043 class SystemCall
00044 {
00045 public:
00046   /** returns the current system time in milliseconds
00047   */
00048   static unsigned long getCurrentSystemTime ();
00049   
00050   /** returns the time since aTime
00051   */
00052   static unsigned long getTimeSince (unsigned long aTime) {
00053     return (getCurrentSystemTime() - aTime);
00054   }
00055 
00056   /** returns the amount of free memory
00057     */
00058   static unsigned long getFreeMem();
00059 
00060   /** returns the amount of remaining battery power in percent
00061     * or 100 if the robot is attached to powerline
00062     */
00063   static unsigned char getRemainingPower();
00064 
00065   /** reboots the robot */
00066   static void reboot();
00067 
00068   /** shuts the robot down */
00069   static void shutdown();
00070 
00071   /** returns the robot's mac address */
00072   static void getMacAddress(unsigned char address[6]);
00073 
00074   /** returns the robot's design */
00075   static RobotDesign::Design getRobotDesign();
00076 };
00077 
00078 
00079 #endif // _SYSTEMCALL_H_
00080 
00081 /*
00082  * Change log :
00083  * 
00084  * $Log: SystemCall.h,v $
00085  * Revision 1.2  2004/05/27 10:08:08  thomas
00086  * added model-specific locations
00087  *
00088  * Revision 1.1.1.1  2004/05/22 17:23:40  cvsadm
00089  * created new repository GT2004_WM
00090  *
00091  * Revision 1.2  2003/12/31 12:21:25  roefer
00092  * getRobotDesign added
00093  *
00094  * Revision 1.1  2003/10/07 10:06:59  cvsadm
00095  * Created GT2004 (M.J.)
00096  *
00097  * Revision 1.1.1.1  2003/07/02 09:40:24  cvsadm
00098  * created new repository for the competitions in Padova from the 
00099  * tamara CVS (Tuesday 2:00 pm)
00100  *
00101  * removed unused solutions
00102  *
00103  * Revision 1.5  2003/05/03 13:05:49  roefer
00104  * getMacAddress added
00105  *
00106  * Revision 1.4  2002/12/11 15:17:14  dueffert
00107  * getRemainingPower(), shutdown(), reboot() implemented
00108  *
00109  * Revision 1.3  2002/12/04 13:43:33  dueffert
00110  * getFreeMem() implemented
00111  *
00112  * Revision 1.2  2002/11/27 13:47:21  dueffert
00113  * doxygen docu added
00114  *
00115  * Revision 1.1  2002/09/10 15:40:04  cvsadm
00116  * Created new project GT2003 (M.L.)
00117  * - Cleaned up the /Src/DataTypes directory
00118  * - Removed challenge related source code
00119  * - Removed processing of incoming audio data
00120  * - Renamed AcousticMessage to SoundRequest
00121  *
00122  * Revision 1.1.1.1  2002/05/10 12:40:18  cvsadm
00123  * Moved GT2002 Project from ute to tamara.
00124  *
00125  * Revision 1.6  2001/12/10 17:47:08  risler
00126  * change log added
00127  *
00128  */

Generated on Thu Sep 23 19:57:34 2004 for GT2004 by doxygen 1.3.6