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

Modules/BehaviorControl/MotionRatingBehaviorControl/MotionRatingBehaviorMessage.h

Go to the documentation of this file.
00001 /**
00002 * @file MotionRatingBehaviorMessage.h
00003 * 
00004 * Definition of class MotionRatingBehaviorMessage
00005 *
00006 * @author Sebastian Petters
00007 * @author Dirk Thomas
00008 */
00009 
00010 #ifndef __MotionRatingBehaviorMessage_h_
00011 #define __MotionRatingBehaviorMessage_h_
00012 
00013 // forward declaration
00014 class MotionRatingBehaviorMessage;
00015 
00016 #include "Tools/Streams/InOut.h"
00017 #include "Tools/Math/Vector2.h"
00018 #include <string.h>
00019 
00020 /**
00021 * @class MotionRatingBehaviorMessage
00022 *
00023 * @author Sebastian Petters
00024 * @author Dirk Thomas
00025 */
00026 class MotionRatingBehaviorMessage
00027 {
00028 public:
00029   
00030   enum MessageType {
00031     none = 0,
00032     test,
00033     // messages to robot
00034     ping, report,
00035     // messages to controler
00036     init, request, abort, pause, proceed, stop, sleep,
00037     numOfMessageTypes
00038   };
00039 
00040   enum States { unknown, sleeping, preparing, waiting, testing, dead };
00041   
00042   MessageType type;
00043   States state;
00044   int paramSetId;
00045   int data;
00046   double currentSpeed;
00047   double averageSpeed;
00048   int currentWalk;
00049   int walkCount;
00050   bool finished;
00051   char remainingPower;
00052   double distance;
00053   unsigned long time;
00054 
00055   Vector2<double> start;
00056   Vector2<double> end;
00057   
00058   /** Constructor */
00059   MotionRatingBehaviorMessage();
00060  
00061   static char* getStateName ( States state )
00062   {
00063     switch ( state )
00064     {
00065       case unknown: return "unknown";
00066       case sleeping: return "sleeping";
00067       case preparing: return "preparing";
00068       case waiting: return "waiting";
00069       case testing: return "testing";
00070       case dead: return "dead";
00071       default: return "undefined state";
00072     }
00073   };
00074 
00075 };
00076 
00077 In& operator>>(In& stream, MotionRatingBehaviorMessage& message);
00078 
00079 Out& operator<<(Out& stream, const MotionRatingBehaviorMessage& message);
00080 
00081 
00082 #endif// __MotionRatingBehaviorMessage_h_
00083 
00084 /*
00085 * Change log :
00086 * 
00087 * $Log: MotionRatingBehaviorMessage.h,v $
00088 * Revision 1.1  2004/03/17 16:18:49  thomas
00089 * added preversion of motion optimisation with behaviour, selflocator, headcontrol and robotcontrol dialog
00090 *
00091 *
00092 */

Generated on Mon Mar 20 21:59:43 2006 for GT2005 by doxygen 1.3.6