00001 // 00002 // Nxt.h 00003 // 00004 // Copyright 2009 by Takashi Chikamasa, Jon C. Martin and Robert W. Kramer 00005 // 00006 00007 #ifndef NXT_H_ 00008 #define NXT_H_ 00009 00010 extern "C" 00011 { 00012 #include "ecrobot_interface.h" 00013 #include "rtoscalls.h" 00014 }; 00015 00016 namespace ecrobot 00017 { 00021 class Nxt 00022 { 00023 public: 00027 enum eButton 00028 { 00029 RUN_ON = 0x01, 00030 ENTR_ON = 0x02, 00031 RUN_ENTR_ON = (RUN_ON | ENTR_ON), 00032 BUTTONS_OFF = 0x00 00033 }; 00034 00040 Nxt(void); 00041 00047 eButton getButtons(void) const; 00048 00054 S16 getBattMv(void) const; 00055 }; 00056 } 00057 00058 #endif