Homepage Demos Overview Downloads Tutorials Reference
Credits
Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members | Related Pages | Search

ProfilerCheckControl.h

Go to the documentation of this file.
00001 //-*-c++-*-
00002 #ifndef INCLUDED_ProfilerCheckControl_h_
00003 #define INCLUDED_ProfilerCheckControl_h_
00004 
00005 #include "ControlBase.h"
00006 #include "Shared/WorldState.h"
00007 
00008 //! causes the WorldState::mainProfile and WorldState::motionProfile to display reports to cout
00009 class ProfilerCheckControl : public ControlBase {
00010 public:
00011   //! Constructor
00012   ProfilerCheckControl() : ControlBase("Profiler Check","Reports time spent in all of the profiled sections in all processes") {}
00013 
00014   //! Destructor
00015   ~ProfilerCheckControl() {}
00016   
00017   //! Prints a report to cout
00018   virtual ControlBase * activate(MotionManager::MC_ID display, Socket *) {
00019     if(display!=MotionManager::invalid_MC_ID) {
00020       //!@todo make the leds flash
00021     }
00022     printf("~~~ Main: ~~~\n%s",state->mainProfile.report().c_str());
00023     printf("~~~ Motion: ~~~\n%s",state->motionProfile.report().c_str());
00024     return NULL;
00025   }
00026 };
00027 
00028 /*! @file
00029  * @brief Defines ProfilerCheckControl, which causes the WorldState::mainProfile and WorldState::motionProfile to display reports to cout
00030  * @author ejt (Creator)
00031  *
00032  * $Author: ejt $
00033  * $Name: tekkotsu-1_4_1 $
00034  * $Revision: 1.3 $
00035  * $State: Exp $
00036  * $Date: 2003/06/10 00:53:48 $
00037  */
00038 
00039 #endif

Tekkotsu v1.4
Generated Sat Jul 19 00:06:31 2003 by Doxygen 1.3.2