Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

/home/gilberto/prog/tesi2.31/lib/Packages/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 "time.h"
00006 
00007 using namespace std;
00012 enum typeOfCommand {
00013   LEGS, 
00014   HEAD 
00015 };
00016 
00024 class CommandPkg : public TelepatiPkg{
00025  public:
00029   CommandPkg(int a, const char command[8], time_t when, typeOfCommand cmdType, bool ack);
00033   CommandPkg(byte* ptr);
00034 
00036   virtual ~CommandPkg();
00037 
00040   virtual TelepatiPkg* clone();
00041 
00045   byte* getMsg();  
00046   
00050   inline typeOfCommand getTypeOfCommand() {return _cmdType;} ;
00053   const char* getCommand() {return _command;}; 
00056   inline time_t whenExecuteCommand() {return _when;};
00057 
00058  private:
00059   /* Comandi riconosciuti:
00060      --- Zampe ---
00061      WAKE_UP= Posizione di Riposo
00062      STANDUP= Alzati
00063      ELBOWLK= Camminata sui gomiti start
00064      STPEWLK= Camminata sui gomiti stop
00065      STRTWLK= Camminata in avanti start
00066      STOPWLK= Camminata in avanti stop
00067      TRNRGHT= Gira a destra
00068      STP_T_R= Stop gira a destra
00069      TRNLEFT= Gira a sinistra
00070      STP_T_L= Stop gira a sinistra
00071      SITDOWN= Siediti... a cuccia
00072      LAYDOWN= Mettiti in posizione di riposo dopo un SITDOWN
00073 
00074      --- Testa ---
00075      MOVE_FP= Muove la testa nella posizione avanti
00076      MOVE_MP= Muove la testa nella posizine centrale
00077      MOVE_BP= Muove la testa nella posizione dietro
00078      MV_RGHT= muove la testa a dx
00079      STOP_MR= alt moviemnto dx
00080      MV_LEFT= muove la testa a sx
00081      STOP_ML= stop movimento sx
00082      MV_FWRD= muove la testa in avanti
00083      STOP_MF= stop movimento avanti
00084      MV_BACK= muove la testa in dietro
00085      STOP_MB= stop movimento in dietro
00086      MOVE_UP= muovi in altro
00087      STOP_MU= stop movimento in alto
00088      MV_DOWN= muovi in basso
00089      STOP_MD= stop movimento in basso*/
00090 
00091   /* Tipo di comando. LEGS se per le zampe, HEAD se per la testa*/
00092   typeOfCommand _cmdType;
00093   
00094   /* Comando da spedire*/
00095   char _command[8];
00096 
00097   /* Quando eseguire il comando. Tempo assoluto*/
00098   time_t _when;
00099 
00100 };
00101 
00102 #endif

Generated on Tue Mar 1 15:06:16 2005 for Packages_Library by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002