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

Tools/Debugging/Watchdog.h

Go to the documentation of this file.
00001 /**
00002  * @file Tools/Debugging/Watchdog.h
00003  *
00004  * This file declares the view classes and macros.
00005  *
00006  * @author <A href=mailto:schumann@germanteam.org>Michael Wachter / Carsten Schumann</A>
00007  */
00008 #ifndef __Watchdog_H__
00009 #define __Watchdog_H__
00010 
00011 #define WATCHDOG_EXECUTE(module, command) watchdog.enter(module); command; watchdog.leave(module);
00012 /**
00013  * The class is a base class for image views.
00014  */
00015 class Watchdog
00016 {
00017 public:
00018   enum ModuleID
00019   {
00020     colorTableMod,
00021     sensorDataProcessor, /*!< See class SensorDataProcessorSelector */
00022     imageProcessor, /*!< See class ImageProcessorSelector */
00023     ballLocator, /*!< See class BallLocatorSelector */
00024     teamBallLocator, /*!< See class TeamBallLocatorSelector */
00025     obstaclesLocator, /*!< See class ObstaclesLocatorSelector */
00026     playersLocator, /*!< See class PlayersLocatorSelector */
00027     selfLocator, /*!< See class SelfLocatorSelector */
00028     robotStateDetector, /*!< See class RobotStateDetectorSelector */
00029     collisionDetector, /*!< See class CollisionDetectorSelector */
00030     behaviorControl, /*!< See class BehaviorControlSelector */
00031     motionControl, /*!< See class MotionControlSelector */
00032     walkingEngineNormal, /*!< See class WalkingEngineNormalSelector */
00033     headControl, /*!< See class HeadControlSelector */
00034     ledControl, /*!< See class LEDControlSelector */
00035     getupEngine, /*!< See class GetupEngineSelector */
00036     soundControl, /*!< See class SoundControlSelector */
00037     sensorBehaviorControl, /*!< See class SensorBehaviorControlSelector */
00038     gtCam,
00039     numOfModules, /*!< Number of exchangeable modules */
00040     teamcommDDPReceive = 1000,
00041     teamcommUDPReceive = 1001,
00042     teamcommProgress = 1002,
00043     teamcommSend = 1003
00044 
00045   };
00046 
00047     Watchdog();
00048     void enter(int i);
00049     void leave(int i);
00050     void dump();
00051 
00052   private:
00053     enum { stackSize=100};
00054     int stack[stackSize];
00055     int top;
00056     unsigned long lastDump;
00057     int operations;
00058 
00059 };
00060 
00061 extern Watchdog watchdog;
00062 
00063 #endif

Generated on Mon Mar 20 22:00:05 2006 for GT2005 by doxygen 1.3.6