Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

CommandPkg.h

Go to the documentation of this file.
00001 #ifndef COMMANDPKG_H_DEF
00002 #define COMMANDPKG_H_DEF
00003 
00004 #include "TelepatiPkg.h"
00005 #include <SystemTime.h>
00006 #include <time.h>
00007 
00008 using namespace std;
00013 enum typeOfCommand {
00014   LEGS, 
00015   HEAD 
00016 };
00017 
00025 class CommandPkg : public TelepatiPkg{
00026  public:
00030   CommandPkg(int a, const char command[8], const SystemTime& when, typeOfCommand cmdType, bool ack);
00034   CommandPkg(byte* ptr);
00035   
00037   virtual ~CommandPkg() {};
00038   
00041   virtual TelepatiPkg* clone();
00042   
00046   byte* getMsg();  
00047   
00051   inline typeOfCommand getTypeOfCommand() {
00052     return _cmdType;
00053   };
00056   inline const char* getCommand(){
00057     return _command;
00058   }; 
00061   inline SystemTime whenExecuteCommand(){
00062     return SystemTime(seconds, useconds);
00063   };
00064   
00065  protected:
00066   /* Comandi riconosciuti:
00067      --- Zampe ---
00068      WAKE_UP= Posizione di Riposo
00069      STANDUP= Alzati
00070      ELBOWLK= Camminata sui gomiti start
00071      STPEWLK= Camminata sui gomiti stop
00072      STRTWLK= Camminata in avanti start
00073      STOPWLK= Camminata in avanti stop
00074      TRNRGHT= Gira a destra
00075      STP_T_R= Stop gira a destra
00076      TRNLEFT= Gira a sinistra
00077      STP_T_L= Stop gira a sinistra
00078      SITDOWN= Siediti... a cuccia
00079      LAYDOWN= Mettiti in posizione di riposo dopo un SITDOWN
00080 
00081      --- Testa ---
00082      MOVE_FP= Muove la testa nella posizione avanti
00083      MOVE_MP= Muove la testa nella posizine centrale
00084      MOVE_BP= Muove la testa nella posizione dietro
00085      MV_RGHT= muove la testa a dx
00086      STOP_MR= alt moviemnto dx
00087      MV_LEFT= muove la testa a sx
00088      STOP_ML= stop movimento sx
00089      MV_FWRD= muove la testa in avanti
00090      STOP_MF= stop movimento avanti
00091      MV_BACK= muove la testa in dietro
00092      STOP_MB= stop movimento in dietro
00093      MOVE_UP= muovi in altro
00094      STOP_MU= stop movimento in alto
00095      MV_DOWN= muovi in basso
00096      STOP_MD= stop movimento in basso*/
00097 
00099   typeOfCommand _cmdType;
00100   
00102   char _command[8];
00103 
00105   longword seconds;
00107   longword useconds;
00108 };
00109 
00110 #endif

Generated on Thu Jun 23 16:51:17 2005 for Packages_Library by  doxygen 1.3.9.1